mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
669771681a
Most of the guts of configure.ac have been moved to config.d and are then brought in by m4_include. This will make maintaining configure.ac much easier. Also drop use of PROGRAM and VERSION, using PACKAGE_NAME, PACKAGE_VERSION, and on occasion, PACKAGE_STRING instead, and clean out some old files we no longer need.
38 lines
970 B
Text
38 lines
970 B
Text
dnl Checks for MGL support
|
|
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"
|
|
|
|
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)
|
|
AC_SUBST(MGL_LIBS)
|