Various and sundry improvements to configure.

This commit is contained in:
Jeff Teunissen 2000-12-08 04:45:04 +00:00
parent 1e604c6c33
commit 7744fcd560

View file

@ -216,32 +216,35 @@ AC_ARG_WITH(mgl,
[ --with-mgl[=DIR] use MGL found in DIR], [ --with-mgl[=DIR] use MGL found in DIR],
HAVE_MGL=$withval, HAVE_MGL=auto) HAVE_MGL=$withval, HAVE_MGL=auto)
if test "x$HAVE_MGL" != xno; then if test "x$HAVE_MGL" != xno; then
if test "x$ac_cv_header_windows_h" != "xyes"; then if test "x$ac_cv_header_windows_h" != "xyes"; then
HAVE_MGL=no HAVE_MGL=no
else else
if test "x$HAVE_MGL" != xauto; then if test "x$HAVE_MGL" != xauto; then
MGL_CFLAGS="$MGL_CFLAGS -I$withval/include" MGL_CFLAGS="$MGL_CFLAGS -I$withval/include"
MGL_LIBS="$MGL_LIBS -L$withval/lib" MGL_LIBS="$MGL_LIBS -L$withval/lib"
fi fi
save_CPPFLAGS="$CPPFLAGS" save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $MGL_CFLAGS" CPPFLAGS="$CPPFLAGS $MGL_CFLAGS"
AC_CHECK_HEADER(mgraph.h, HAVE_MGL=yes, HAVE_MGL=no) AC_CHECK_HEADER(mgraph.h, HAVE_MGL=yes, HAVE_MGL=no)
CPPFLAGS="$save_CPPFLAGS" CPPFLAGS="$save_CPPFLAGS"
dnl Make sure -lmgllt or -lmglfx works dnl Make sure -lmgllt or -lmglfx works
if test "x$HAVE_MGL" = xyes; then if test "x$HAVE_MGL" = xyes; then
for lib in mglfx mgllt; do for lib in mglfx mgllt; do
MGL_LIBS="$MGL_LIBS -lgdi32 -lwinmm -ldinput -lddraw" MGL_LIBS="$MGL_LIBS -lgdi32 -lwinmm -ldinput -lddraw"
AC_CHECK_LIB($lib,MGL_registerDriver, AC_CHECK_LIB($lib, MGL_registerDriver,
MGL_LIBS="-l$lib $MGL_LIBS" MGL_LIBS="-l$lib $MGL_LIBS"
HAVE_MGL=yes HAVE_MGL=yes
break, HAVE_MGL=no, [$MGL_LIBS]) break,
done HAVE_MGL=no,
fi [$MGL_LIBS]
fi )
if test "x$HAVE_MGL" != xyes; then done
MGL_CFLAGS="" MGL_LIBS="" fi
fi fi
if test "x$HAVE_MGL" != xyes; then
MGL_CFLAGS="" MGL_LIBS=""
fi
fi fi
AC_SUBST(HAVE_MGL) AC_SUBST(HAVE_MGL)
AC_SUBST(MGL_CFLAGS) AC_SUBST(MGL_CFLAGS)
@ -265,8 +268,11 @@ if test "x$HAVE_GGI" != xno; then
dnl Make sure -lggi works dnl Make sure -lggi works
if test "x$HAVE_GGI" = xyes; then if test "x$HAVE_GGI" = xyes; then
AC_CHECK_LIB(ggi, ggiEventsQueued, GGI_LIBS="$GGI_LIBS -lggi" AC_CHECK_LIB(ggi, ggiEventsQueued,
HAVE_GGI=yes, HAVE_GGI=no, [$GGI_LIBS] GGI_LIBS="$GGI_LIBS -lggi"
HAVE_GGI=yes,
HAVE_GGI=no,
[$GGI_LIBS]
) )
fi fi
if test "x$HAVE_GGI" != xyes; then if test "x$HAVE_GGI" != xyes; then
@ -362,20 +368,24 @@ AC_ARG_WITH(glide,
[ --with-glide=DIR use the GLIDE 2.x SDK found in DIR], [ --with-glide=DIR use the GLIDE 2.x SDK found in DIR],
HAS_GLIDE=$withval, HAS_GLIDE=auto) HAS_GLIDE=$withval, HAS_GLIDE=auto)
if test "x$HAS_GLIDE" != xno; then if test "x$HAS_GLIDE" != xno; then
if test "x$HAS_GLIDE" != xauto; then if test "x$HAS_GLIDE" != xauto; then
GLIDE_CFLAGS="$GLIDE_CFLAGS -I$withval/include" GLIDE_CFLAGS="$GLIDE_CFLAGS -I$withval/include"
GLIDE_LIBS="$GLIDE_LIBS -L$withval/lib" GLIDE_LIBS="$GLIDE_LIBS -L$withval/lib"
else else
GLIDE_CFLAGS="$GLIDE_CFLAGS -I/usr/include/glide -I/usr/local/include/glide" GLIDE_CFLAGS="$GLIDE_CFLAGS -I/usr/include/glide -I/usr/local/include/glide"
fi fi
save_CPPFLAGS="$CPPFLAGS" save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GLIDE_CFLAGS" CPPFLAGS="$CPPFLAGS $GLIDE_CFLAGS"
AC_CHECK_HEADER(glide.h, HAS_GLIDE=yes, HAS_GLIDE=no) AC_CHECK_HEADER(glide.h, HAS_GLIDE=yes, HAS_GLIDE=no)
if test "x$HAS_GLIDE" != xyes; then if test "x$HAS_GLIDE" != xyes; then
HAS_GLIDE=no HAS_GLIDE=no
fi else
CPPFLAGS="$save_CPPFLAGS" AC_DEFINE(HAVE_GLIDE)
fi
CPPFLAGS="$save_CPPFLAGS"
fi fi
AC_SUBST(GLIDE_CFLAGS)
AC_SUBST(GLIDE_LIBS)
dnl Checks for GLX support dnl Checks for GLX support
AC_ARG_WITH(glx, AC_ARG_WITH(glx,
@ -420,16 +430,6 @@ if test "x$HAVE_GLX" != xno; then
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
) )
AC_CHECK_HEADERS(GL/glext.h, HAVE_GL_GLEXT_H=yes) AC_CHECK_HEADERS(GL/glext.h, HAVE_GL_GLEXT_H=yes)
if test "x$HAVE_GL_GLEXT_H" = xyes; then
AC_MSG_CHECKING(for PFNGLCOLORTABLEEXTPROC)
AC_TRY_COMPILE(
[#include <GL/gl.h>]
[#include <GL/glext.h>],
[PFNGLCOLORTABLEEXTPROC x;],
AC_DEFINE(HAVE_PFNGLCOLORTABLEEXTPROC) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
fi
fi fi
CPPFLAGS="$save_CPPFLAGS" CPPFLAGS="$save_CPPFLAGS"
@ -502,7 +502,7 @@ AC_SUBST(HAVE_SGL)
TDFXGL_NAME="" TDFXGL_NAME=""
AC_ARG_WITH(3dfx, AC_ARG_WITH(3dfx,
[ --with-3dfx support 3Dfx output for the V1/V2, if a argument [ --with-3dfx support 3Dfx output for the V1/V2, if an argument
is specified it will be used as the GL wrapper lib is specified it will be used as the GL wrapper lib
for glide.], for glide.],
HAS_3dfx=$withval, HAS_3dfx=auto) HAS_3dfx=$withval, HAS_3dfx=auto)
@ -534,12 +534,6 @@ fi
AC_SUBST(TDFXGL_CFLAGS) AC_SUBST(TDFXGL_CFLAGS)
AC_SUBST(TDFXGL_LIBS) AC_SUBST(TDFXGL_LIBS)
if test "x$ac_cv_lib_pthread_pthread_exit" = "xyes"; then
SND_LIBS="$SND_LIBS -lpthread"
AC_DEFINE(HAVE_LIBPTHREAD)
fi
dnl ================================================================== dnl ==================================================================
dnl Checks for system type dnl Checks for system type
dnl ================================================================== dnl ==================================================================
@ -802,7 +796,6 @@ else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi fi
if test "x$ac_cv_func_connect" != "xyes"; then if test "x$ac_cv_func_connect" != "xyes"; then
AC_MSG_CHECKING([for connect in -lwsock32]) AC_MSG_CHECKING([for connect in -lwsock32])
SAVELIBS="$LIBS" SAVELIBS="$LIBS"