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],
HAVE_MGL=$withval, HAVE_MGL=auto)
if test "x$HAVE_MGL" != xno; then
if test "x$ac_cv_header_windows_h" != "xyes"; then
HAVE_MGL=no
else
if test "x$HAVE_MGL" != xauto; then
MGL_CFLAGS="$MGL_CFLAGS -I$withval/include"
MGL_LIBS="$MGL_LIBS -L$withval/lib"
fi
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $MGL_CFLAGS"
AC_CHECK_HEADER(mgraph.h, HAVE_MGL=yes, HAVE_MGL=no)
CPPFLAGS="$save_CPPFLAGS"
if test "x$ac_cv_header_windows_h" != "xyes"; then
HAVE_MGL=no
else
if test "x$HAVE_MGL" != xauto; then
MGL_CFLAGS="$MGL_CFLAGS -I$withval/include"
MGL_LIBS="$MGL_LIBS -L$withval/lib"
fi
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $MGL_CFLAGS"
AC_CHECK_HEADER(mgraph.h, HAVE_MGL=yes, HAVE_MGL=no)
CPPFLAGS="$save_CPPFLAGS"
dnl Make sure -lmgllt or -lmglfx works
if test "x$HAVE_MGL" = xyes; then
for lib in mglfx mgllt; do
MGL_LIBS="$MGL_LIBS -lgdi32 -lwinmm -ldinput -lddraw"
AC_CHECK_LIB($lib,MGL_registerDriver,
MGL_LIBS="-l$lib $MGL_LIBS"
HAVE_MGL=yes
break, HAVE_MGL=no, [$MGL_LIBS])
done
fi
fi
if test "x$HAVE_MGL" != xyes; then
MGL_CFLAGS="" MGL_LIBS=""
fi
dnl Make sure -lmgllt or -lmglfx works
if test "x$HAVE_MGL" = xyes; then
for lib in mglfx mgllt; do
MGL_LIBS="$MGL_LIBS -lgdi32 -lwinmm -ldinput -lddraw"
AC_CHECK_LIB($lib, MGL_registerDriver,
MGL_LIBS="-l$lib $MGL_LIBS"
HAVE_MGL=yes
break,
HAVE_MGL=no,
[$MGL_LIBS]
)
done
fi
fi
if test "x$HAVE_MGL" != xyes; then
MGL_CFLAGS="" MGL_LIBS=""
fi
fi
AC_SUBST(HAVE_MGL)
AC_SUBST(MGL_CFLAGS)
@ -265,8 +268,11 @@ if test "x$HAVE_GGI" != xno; then
dnl Make sure -lggi works
if test "x$HAVE_GGI" = xyes; then
AC_CHECK_LIB(ggi, ggiEventsQueued, GGI_LIBS="$GGI_LIBS -lggi"
HAVE_GGI=yes, HAVE_GGI=no, [$GGI_LIBS]
AC_CHECK_LIB(ggi, ggiEventsQueued,
GGI_LIBS="$GGI_LIBS -lggi"
HAVE_GGI=yes,
HAVE_GGI=no,
[$GGI_LIBS]
)
fi
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],
HAS_GLIDE=$withval, HAS_GLIDE=auto)
if test "x$HAS_GLIDE" != xno; then
if test "x$HAS_GLIDE" != xauto; then
GLIDE_CFLAGS="$GLIDE_CFLAGS -I$withval/include"
GLIDE_LIBS="$GLIDE_LIBS -L$withval/lib"
else
GLIDE_CFLAGS="$GLIDE_CFLAGS -I/usr/include/glide -I/usr/local/include/glide"
fi
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GLIDE_CFLAGS"
AC_CHECK_HEADER(glide.h, HAS_GLIDE=yes, HAS_GLIDE=no)
if test "x$HAS_GLIDE" != xyes; then
HAS_GLIDE=no
fi
CPPFLAGS="$save_CPPFLAGS"
if test "x$HAS_GLIDE" != xauto; then
GLIDE_CFLAGS="$GLIDE_CFLAGS -I$withval/include"
GLIDE_LIBS="$GLIDE_LIBS -L$withval/lib"
else
GLIDE_CFLAGS="$GLIDE_CFLAGS -I/usr/include/glide -I/usr/local/include/glide"
fi
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GLIDE_CFLAGS"
AC_CHECK_HEADER(glide.h, HAS_GLIDE=yes, HAS_GLIDE=no)
if test "x$HAS_GLIDE" != xyes; then
HAS_GLIDE=no
else
AC_DEFINE(HAVE_GLIDE)
fi
CPPFLAGS="$save_CPPFLAGS"
fi
AC_SUBST(GLIDE_CFLAGS)
AC_SUBST(GLIDE_LIBS)
dnl Checks for GLX support
AC_ARG_WITH(glx,
@ -420,16 +430,6 @@ if test "x$HAVE_GLX" != xno; then
AC_MSG_RESULT(no)
)
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
CPPFLAGS="$save_CPPFLAGS"
@ -502,7 +502,7 @@ AC_SUBST(HAVE_SGL)
TDFXGL_NAME=""
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
for glide.],
HAS_3dfx=$withval, HAS_3dfx=auto)
@ -534,12 +534,6 @@ fi
AC_SUBST(TDFXGL_CFLAGS)
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 Checks for system type
dnl ==================================================================
@ -802,7 +796,6 @@ else
AC_MSG_RESULT(no)
fi
if test "x$ac_cv_func_connect" != "xyes"; then
AC_MSG_CHECKING([for connect in -lwsock32])
SAVELIBS="$LIBS"