mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-22 11:51:17 +00:00
Check for dlfcn.h and dlopen().
Due to re-designed gl_vidglx.c we don't need XMesaSetFXmode in the GL library if we have dlopen(). Define DYN_LIBS for Makefiles.
This commit is contained in:
parent
c3035f6f7a
commit
b7527923bd
2 changed files with 25 additions and 7 deletions
|
@ -17,6 +17,9 @@
|
|||
/* Define this to something sane if you don't have stricmp */
|
||||
#undef stricmp
|
||||
|
||||
/* Define if you have the dlopen function. */
|
||||
#undef HAVE_DLOPEN
|
||||
|
||||
/* Define this if you are using Mesa */
|
||||
#undef XMESA
|
||||
|
||||
|
@ -34,4 +37,3 @@
|
|||
|
||||
/* Define this to use experimental code */
|
||||
#undef _EXPERIMENTAL_
|
||||
|
||||
|
|
28
configure.in
28
configure.in
|
@ -23,7 +23,7 @@ AC_PROG_CPP
|
|||
AC_PROG_MAKE_SET
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_CHECK_HEADERS(unistd.h fcntl.h windows.h sys/ioctl.h sys/mman.h \
|
||||
AC_CHECK_HEADERS(unistd.h fcntl.h dlfcn.h windows.h sys/ioctl.h sys/mman.h \
|
||||
sys/io.h asm/io.h \
|
||||
sys/stat.h sys/time.h sys/timeb.h \
|
||||
sys/socket.h netinet/in.h netdb.h arpa/inet.h sys/filio.h \
|
||||
|
@ -58,7 +58,7 @@ AC_FUNC_MMAP
|
|||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(gethostname gethostbyname connect gettimeofday getwd mkdir \
|
||||
ftime _ftime fcntl stat putenv select socket strerror strstr \
|
||||
snprintf _snprintf vsnprintf _vsnprintf strsep)
|
||||
snprintf _snprintf vsnprintf _vsnprintf strsep dlopen)
|
||||
|
||||
AC_ARG_ENABLE(experimental,
|
||||
[ --enable-experimental compile with experimental code. Use at your
|
||||
|
@ -101,6 +101,15 @@ if test "x$ac_cv_func_vsnprintf" = "xno" -a \
|
|||
AC_CHECK_LIB(db,vsnprintf)
|
||||
fi
|
||||
|
||||
dnl Check for dlopen
|
||||
if test "x$ac_cv_func_dlopen" = "xno"; then
|
||||
AC_CHECK_LIB(dl, dlopen, DYN_LIBS="$DYN_LIBS -ldl"
|
||||
have_dynload=yes
|
||||
AC_DEFINE(HAVE_DLOPEN))
|
||||
else
|
||||
have_dynload=yes
|
||||
fi
|
||||
|
||||
dnl Checks for working -lm
|
||||
AC_CHECK_LIB(m, pow,, AC_MSG_ERROR([math library (-lm) appears broken]))
|
||||
|
||||
|
@ -355,15 +364,21 @@ dnl Make sure -lGL or -lMesaGL works
|
|||
if test "x$HAS_OGL" = xyes; then
|
||||
AC_CHECK_LIB(GL, glColor4f, OGL_LIBS="$OGL_LIBS -lGL"
|
||||
HAS_OGL=yes
|
||||
AC_CHECK_LIB(GL, XMesaSetFXmode, qwfoo=qwfoo, HAS_XMESA=no,
|
||||
[ $OGL_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS]),
|
||||
if test "x$have_dynload" != "xyes"; then
|
||||
AC_CHECK_LIB(GL, XMesaSetFXmode, qwfoo=qwfoo, HAS_XMESA=no,
|
||||
[ $OGL_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
fi
|
||||
,
|
||||
HAS_OGL=no,
|
||||
[$OGL_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
if test "x$HAS_OGL" != xyes; then
|
||||
AC_CHECK_LIB(MesaGL, glColor4f, OGL_LIBS="$OGL_LIBS -lMesaGL"
|
||||
HAS_OGL=yes
|
||||
AC_CHECK_LIB(MesaGL, XMesaSetFXmode, qwfoo=qwfoo, HAS_XMESA=no,
|
||||
[ $OGL_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS]),
|
||||
if test "x$have_dynload" != "xyes"; then
|
||||
AC_CHECK_LIB(MesaGL, XMesaSetFXmode, qwfoo=qwfoo, HAS_XMESA=no,
|
||||
[ $OGL_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
fi
|
||||
,
|
||||
HAS_OGL=no,
|
||||
[$OGL_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
||||
fi
|
||||
|
@ -714,6 +729,7 @@ AC_SUBST(SDL_CFLAGS)
|
|||
AC_SUBST(SDL_LIBS)
|
||||
AC_SUBST(SND_STYLE)
|
||||
AC_SUBST(SND_LIBS)
|
||||
AC_SUBST(DYN_LIBS)
|
||||
AC_SUBST(INTEL_ARCH)
|
||||
AC_SUBST(NET_LIBS)
|
||||
AC_SUBST(SYS_SRC)
|
||||
|
|
Loading…
Reference in a new issue