- Applied a patch from Ulrich Spoerlein that fixes build

problems on OpenBSD.
This commit is contained in:
Jamie Wilkinson 2002-11-04 13:11:40 +00:00
parent c6fc9c5e06
commit fb673df934
3 changed files with 21 additions and 8 deletions

View file

@ -208,6 +208,7 @@ dnl -----------------------
#AC_HEADER_DIRENT #AC_HEADER_DIRENT
#AC_HEADER_STDC #AC_HEADER_STDC
dnl AC_HEADER_SYS_WAIT dnl AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ soundcard.h ])
AC_CHECK_HEADERS([ sys/soundcard.h ]) AC_CHECK_HEADERS([ sys/soundcard.h ])
dnl ------------------------------------------------------------- dnl -------------------------------------------------------------
@ -234,17 +235,28 @@ AC_TRY_LINK(
if test "x$ac_cv_header_sys_soundcard_h" = "xyes"; then if test "x$ac_cv_header_sys_soundcard_h" = "xyes"; then
AC_MSG_CHECKING(for AFMT_S16_NE in sys/soundcard.h) AC_MSG_CHECKING(for AFMT_S16_NE in sys/soundcard.h)
AC_EGREP_CPP([QF_maGiC_VALUE], AC_EGREP_CPP([QF_maGiC_VALUE],
[ [ #include <sys/soundcard.h>
#include <sys/soundcard.h>
#ifdef AFMT_S16_NE #ifdef AFMT_S16_NE
QF_maGiC_VALUE QF_maGiC_VALUE
#endif #endif ],
],
HAVE_AFMT_S16_NE=yes HAVE_AFMT_S16_NE=yes
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
, ,
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
) )
else if test "x$ac_cv_header_soundcard_h" = "xyes"; then
AC_MSG_CHECKING(for AFMT_S16_NE in soundcard.h)
AC_EGREP_CPP([QF_maGiC_VALUE],
[ #include <soundcard.h>
#ifdef AFMT_S16_NE
QF_maGiC_VALUE
#endif ],
HAVE_AFMT_S16_NE=yes
AC_MSG_RESULT(yes)
,
AC_MSG_RESULT(no)
)
fi
fi fi
AC_SUBST(HAVE_AFMT_S16_NE) AC_SUBST(HAVE_AFMT_S16_NE)

View file

@ -30,7 +30,8 @@
#ifndef __GLW_H__ #ifndef __GLW_H__
#define __GLW_H__ #define __GLW_H__
#if defined __linux__ || defined __bsd__ || defined __sgi || defined __FreeBSD__ || defined __NetBSD__ /* This is getting silly -- q */
#if defined __linux__ || defined __bsd__ || defined __sgi || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__
typedef struct typedef struct
{ {

View file

@ -3039,7 +3039,7 @@ void QGL_Shutdown( void )
} }
/* merged in from qgl_bsd.c -- jaq */ /* merged in from qgl_bsd.c -- jaq */
#if defined(__linux__) || defined (__FreeBSD__) || defined(__NetBSD__) #if defined(__linux__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#define GPA( a ) dlsym( glw_state.OpenGLLib, a ) #define GPA( a ) dlsym( glw_state.OpenGLLib, a )
void *qwglGetProcAddress(char *symbol) void *qwglGetProcAddress(char *symbol)