1999-12-29 13:58:47 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2000-01-14 02:46:08 +00:00
|
|
|
AC_PREREQ(2.13)
|
1999-12-29 13:58:47 +00:00
|
|
|
AC_INIT(common/crc.h)
|
2000-01-01 20:45:27 +00:00
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
dnl Version of this release
|
2000-02-20 20:46:13 +00:00
|
|
|
QF_VERSION=0.2-d
|
2000-01-18 02:58:36 +00:00
|
|
|
VERSION=2.40
|
|
|
|
AC_DEFINE_UNQUOTED(QF_VERSION,"$QF_VERSION")
|
|
|
|
AC_DEFINE_UNQUOTED(VERSION,"$VERSION")
|
2000-01-01 20:45:27 +00:00
|
|
|
|
2000-01-17 02:53:39 +00:00
|
|
|
dnl Set to yes for releases
|
|
|
|
RELEASE=no
|
|
|
|
|
2000-01-25 05:59:19 +00:00
|
|
|
dnl Set this to no for Id defaults
|
|
|
|
NEWSTYLE=yes
|
2000-01-17 02:53:39 +00:00
|
|
|
|
1999-12-29 13:58:47 +00:00
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
AC_LANG_C
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_MAKE_SET
|
2000-01-29 23:16:17 +00:00
|
|
|
AC_PROG_RANLIB
|
1999-12-29 13:58:47 +00:00
|
|
|
|
2000-01-02 16:18:22 +00:00
|
|
|
dnl Checks for header files.
|
2000-01-19 01:21:28 +00:00
|
|
|
AC_CHECK_HEADERS(unistd.h fcntl.h dlfcn.h windows.h sys/ioctl.h sys/mman.h \
|
2000-01-09 02:18:10 +00:00
|
|
|
sys/io.h asm/io.h \
|
2000-01-07 01:15:48 +00:00
|
|
|
sys/stat.h sys/time.h sys/timeb.h \
|
2000-01-05 16:55:01 +00:00
|
|
|
sys/socket.h netinet/in.h netdb.h arpa/inet.h sys/filio.h \
|
2000-01-02 16:18:22 +00:00
|
|
|
sys/soundcard.h linux/soundcard.h machine/soundcard.h sys/audioio.h \
|
2000-01-04 22:00:41 +00:00
|
|
|
dsound.h mmsystem.h initguid.h mme/mmsystem.h mme/mme_public.h \
|
2000-02-26 03:42:27 +00:00
|
|
|
sys/asoundlib.h string.h strings.h memory.h malloc.h)
|
2000-01-02 16:18:22 +00:00
|
|
|
|
2000-01-04 22:00:41 +00:00
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_PROG_GCC_TRADITIONAL
|
2000-01-04 22:00:41 +00:00
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
1999-12-29 13:58:47 +00:00
|
|
|
AC_C_BIGENDIAN
|
2000-02-03 08:46:52 +00:00
|
|
|
AC_MSG_CHECKING(for socklen_t in sys/socket.h)
|
2000-02-05 16:15:15 +00:00
|
|
|
AC_TRY_COMPILE([#include <sys/socket.h>],
|
2000-02-03 08:46:52 +00:00
|
|
|
[ socklen_t x = 0;],
|
2000-02-05 16:15:15 +00:00
|
|
|
AC_DEFINE(HAVE_SOCKLEN_T) AC_MSG_RESULT(yes),
|
|
|
|
AC_MSG_RESULT(no))
|
2000-02-26 03:42:27 +00:00
|
|
|
AC_MSG_CHECKING(for socklen_t in sys/types.h)
|
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>],
|
|
|
|
[ socklen_t x = 0;],
|
|
|
|
AC_DEFINE(HAVE_SOCKLEN_T) AC_MSG_RESULT(yes),
|
|
|
|
AC_MSG_RESULT(no))
|
2000-02-05 16:15:15 +00:00
|
|
|
AC_MSG_CHECKING(for size_t in sys/types.h)
|
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>],
|
|
|
|
[ size_t x = 0;],
|
|
|
|
AC_DEFINE(HAVE_SIZE_T) AC_MSG_RESULT(yes),
|
2000-02-03 08:46:52 +00:00
|
|
|
AC_MSG_RESULT(no))
|
1999-12-29 13:58:47 +00:00
|
|
|
|
2000-01-06 00:54:51 +00:00
|
|
|
dnl Check for symbol underscore prefix
|
|
|
|
dnl !!! FIXME !!! Do some real check here...
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether C symbols are prefixed by '_')
|
|
|
|
case "${target}" in
|
2000-01-07 01:15:48 +00:00
|
|
|
*-*-msdos* | *-*-djgpp* | *-*-mingw* | *-*-cygwin* | *-*-openbsd*)
|
2000-01-06 00:54:51 +00:00
|
|
|
AC_DEFINE(HAVE_SYM_PREFIX_UNDERSCORE)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2000-01-04 22:00:41 +00:00
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_CHECK_FUNCS(gethostname gethostbyname connect gettimeofday getwd mkdir \
|
2000-01-07 01:15:48 +00:00
|
|
|
ftime _ftime fcntl stat putenv select socket strerror strstr \
|
2000-02-08 21:23:06 +00:00
|
|
|
snprintf _snprintf vsnprintf _vsnprintf strsep dlopen getaddrinfo getnameinfo)
|
2000-01-04 22:00:41 +00:00
|
|
|
|
2000-01-18 04:02:58 +00:00
|
|
|
AC_ARG_ENABLE(experimental,
|
2000-01-18 20:57:18 +00:00
|
|
|
[ --enable-experimental compile with experimental code. Use at your
|
2000-01-18 04:02:58 +00:00
|
|
|
own risk]
|
|
|
|
)
|
|
|
|
if test "x$enable_experimental" = xyes; then
|
|
|
|
AC_DEFINE(_EXPERIMENTAL_)
|
|
|
|
fi
|
|
|
|
|
2000-01-17 02:53:39 +00:00
|
|
|
AC_ARG_ENABLE(newstyle,
|
|
|
|
[ --enable-newstyle compile with defaults a bit different than those
|
|
|
|
used by Id Software (does not affect gameplay)],
|
|
|
|
NEWSTYLE=$enable_newstyle
|
|
|
|
)
|
|
|
|
if test "x$NEWSTYLE" = xyes; then
|
|
|
|
AC_DEFINE(NEWSTYLE)
|
2000-01-18 03:13:38 +00:00
|
|
|
AC_DEFINE(GAMENAME, "base")
|
|
|
|
else
|
|
|
|
AC_DEFINE(GAMENAME, "id1")
|
2000-01-17 02:53:39 +00:00
|
|
|
fi
|
|
|
|
|
2000-03-04 02:44:59 +00:00
|
|
|
GENERATIONS=no
|
|
|
|
AC_ARG_ENABLE(generations,
|
|
|
|
[ --enable-generations enable .qz support. Requires zlib)],
|
|
|
|
GENERATIONS=$enable_generations
|
|
|
|
)
|
|
|
|
|
1999-12-29 13:58:47 +00:00
|
|
|
AC_ARG_ENABLE(release,
|
1999-12-30 14:26:53 +00:00
|
|
|
[ --enable-release compile release (with optimization)],
|
1999-12-29 13:58:47 +00:00
|
|
|
RELEASE=$enable_release
|
|
|
|
)
|
2000-01-04 01:03:18 +00:00
|
|
|
|
2000-02-08 21:23:06 +00:00
|
|
|
AC_ARG_ENABLE(ipv6,
|
|
|
|
[ --enable-ipv6 enable IPv6 support],
|
|
|
|
AC_DEFINE(HAVE_IPV6)
|
|
|
|
NET_SOURCE=net_udp6.c
|
|
|
|
,
|
|
|
|
NET_SOURCE=net_udp.c
|
|
|
|
)
|
|
|
|
|
2000-02-13 07:12:42 +00:00
|
|
|
AC_ARG_ENABLE(alsa,
|
2000-02-23 23:12:15 +00:00
|
|
|
[ --disable-alsa disable alsa support],
|
2000-02-13 07:12:42 +00:00
|
|
|
)
|
|
|
|
|
2000-02-03 08:46:52 +00:00
|
|
|
AC_ARG_ENABLE(zlib,
|
2000-02-03 21:44:46 +00:00
|
|
|
[ --disable-zlib disable zlib support],
|
2000-02-03 08:46:52 +00:00
|
|
|
)
|
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
dnl Checks for stricmp/strcasecmp
|
|
|
|
AC_CHECK_FUNC(stricmp,,
|
|
|
|
AC_CHECK_FUNC(strcasecmp, AC_DEFINE(stricmp,strcasecmp)))
|
|
|
|
|
2000-01-05 22:42:06 +00:00
|
|
|
dnl Check for vsnprintf
|
|
|
|
if test "x$ac_cv_func_vsnprintf" = "xno" -a \
|
|
|
|
"x$ac_cv_func__vsnprintf" = "xno"; then
|
|
|
|
dnl libdb may have this
|
|
|
|
AC_CHECK_LIB(db,vsnprintf)
|
|
|
|
fi
|
|
|
|
|
2000-01-19 01:21:28 +00:00
|
|
|
dnl Check for dlopen
|
|
|
|
if test "x$ac_cv_func_dlopen" = "xno"; then
|
2000-02-12 05:34:22 +00:00
|
|
|
AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl"
|
2000-01-19 01:21:28 +00:00
|
|
|
have_dynload=yes
|
|
|
|
AC_DEFINE(HAVE_DLOPEN))
|
|
|
|
else
|
|
|
|
have_dynload=yes
|
|
|
|
fi
|
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
dnl Checks for working -lm
|
|
|
|
AC_CHECK_LIB(m, pow,, AC_MSG_ERROR([math library (-lm) appears broken]))
|
2000-02-03 21:44:46 +00:00
|
|
|
|
|
|
|
if test "x$enable_zlib" != "xno"; then
|
2000-02-03 00:34:12 +00:00
|
|
|
dnl Check for working -lz
|
2000-02-03 08:46:52 +00:00
|
|
|
dnl Note - must have gztell *and* gzgets in -lz *and* zlib.h
|
|
|
|
AC_CHECK_LIB(z, gztell, HAS_ZLIB=yes, HAS_ZLIB=no, [$LIBS])
|
|
|
|
if test "x$HAS_ZLIB" = "xyes"; then
|
|
|
|
AC_CHECK_LIB(z, gzgets, HAS_ZLIB=yes, HAS_ZLIB=no, [$LIBS])
|
|
|
|
if test "x$HAS_ZLIB" = "xyes"; then
|
|
|
|
AC_CHECK_HEADER(zlib.h, HAS_ZLIB=yes, HAS_ZLIB=no)
|
|
|
|
if test "x$HAS_ZLIB" = "xyes"; then
|
|
|
|
LIBS="-lz $LIBS"
|
|
|
|
AC_DEFINE(HAS_ZLIB)
|
2000-03-04 02:44:59 +00:00
|
|
|
if test "x$GENERATIONS" = "xyes"; then
|
|
|
|
AC_DEFINE(GENERATIONS)
|
|
|
|
fi
|
2000-02-03 08:46:52 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
1999-12-29 13:58:47 +00:00
|
|
|
|
1999-12-31 23:03:00 +00:00
|
|
|
dnl Checks for X11 support
|
2000-02-13 09:06:11 +00:00
|
|
|
dnl (XoXus: Since vid_x11.c relies on XShm being there, this now disables
|
2000-01-18 22:45:44 +00:00
|
|
|
dnl the X11 video driver if -lXext can not be found)
|
1999-12-30 08:23:07 +00:00
|
|
|
AC_PATH_XTRA
|
|
|
|
if test "x$no_x" = x; then
|
1999-12-31 23:03:00 +00:00
|
|
|
HAS_X11=yes
|
1999-12-30 08:23:07 +00:00
|
|
|
AC_CHECK_LIB(Xext, XShmQueryExtension, [X11_SHM_LIB=-lXext],
|
2000-01-14 03:41:40 +00:00
|
|
|
[HAS_X11="no"], [ $X_LIBS -lX11 $X_EXTRA_LIBS ])
|
1999-12-30 08:23:07 +00:00
|
|
|
fi
|
|
|
|
|
1999-12-31 23:03:00 +00:00
|
|
|
dnl Check for DGA support
|
|
|
|
AC_ARG_ENABLE(DGA,
|
|
|
|
[ --enable-DGA use XFree86 DGA extension, if available],
|
2000-03-06 03:19:38 +00:00
|
|
|
HAS_DGA=$enable_DGA)
|
|
|
|
if test "x$HAS_DGA" = xyes; then
|
1999-12-31 23:03:00 +00:00
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
|
|
|
|
AC_CHECK_HEADER(X11/extensions/xf86dga.h, HAS_DGA=yes, HAS_DGA=no)
|
2000-01-11 01:16:26 +00:00
|
|
|
AC_CHECK_HEADER(X11/extensions/xf86vmode.h, qwfoo=qwfoo, HAS_DGA=no)
|
1999-12-31 23:03:00 +00:00
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
1999-12-29 13:58:47 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-07 01:15:48 +00:00
|
|
|
dnl Checks for VGA support
|
|
|
|
case "${target}" in
|
|
|
|
i?86-*-*djgpp* | i?86-*-*msdos*)
|
|
|
|
HAS_VGA=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
HAS_VGA=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2000-01-04 22:00:41 +00:00
|
|
|
dnl Checks for MGL support
|
|
|
|
AC_ARG_WITH(mgl,
|
|
|
|
[ --with-mgl=DIR use MGL found in DIR],
|
|
|
|
HAS_MGL=$withval, HAS_MGL=auto)
|
|
|
|
if test "x$HAS_MGL" != xno; then
|
|
|
|
if test "x$ac_cv_header_windows_h" != "xyes"; then
|
|
|
|
HAS_MGL=no
|
|
|
|
else
|
|
|
|
if test "x$HAS_MGL" != xauto; then
|
2000-01-08 22:12:04 +00:00
|
|
|
MGL_CFLAGS="$MGL_CFLAGS -I$withval/include"
|
|
|
|
MGL_LIBS="$MGL_LIBS -L$withval/lib"
|
2000-01-04 22:00:41 +00:00
|
|
|
fi
|
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $MGL_CFLAGS"
|
|
|
|
AC_CHECK_HEADER(mgraph.h, HAS_MGL=yes, HAS_MGL=no)
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
fi
|
|
|
|
fi
|
1999-12-31 02:59:25 +00:00
|
|
|
|
2000-01-02 08:50:13 +00:00
|
|
|
dnl Checks for GGI support
|
|
|
|
AC_ARG_WITH(ggi,
|
2000-01-04 22:00:41 +00:00
|
|
|
[ --with-ggi=DIR use LibGGI found in DIR],
|
2000-01-02 08:50:13 +00:00
|
|
|
HAS_GGI=$withval, HAS_GGI=auto)
|
|
|
|
if test "x$HAS_GGI" != xno; then
|
|
|
|
if test "x$HAS_GGI" != xauto; then
|
2000-01-08 22:12:04 +00:00
|
|
|
GGI_CFLAGS="$GGI_CFLAGS -I$withval/include"
|
|
|
|
GGI_LIBS="$GGI_LIBS -L$withval/lib"
|
2000-01-02 08:50:13 +00:00
|
|
|
fi
|
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $GGI_CFLAGS"
|
|
|
|
AC_CHECK_HEADER(ggi/ggi.h, HAS_GGI=yes, HAS_GGI=no)
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
fi
|
|
|
|
|
1999-12-31 23:03:00 +00:00
|
|
|
dnl Checks for SVGALib support
|
|
|
|
AC_ARG_WITH(svga,
|
|
|
|
[ --with-svga=DIR use SVGALib found in DIR],
|
|
|
|
HAS_SVGA=$withval, HAS_SVGA=auto)
|
|
|
|
if test "x$HAS_SVGA" != xno; then
|
|
|
|
if test "x$HAS_SVGA" != xauto; then
|
2000-01-08 22:12:04 +00:00
|
|
|
SVGA_CFLAGS="$SVGA_CFLAGS= -I$withval/include"
|
|
|
|
SVGA_LIBS="$SVGA_LIBS -L$withval/lib"
|
1999-12-31 23:03:00 +00:00
|
|
|
dnl The default system location is /usr/include or /usr/local/include
|
2000-01-08 23:27:17 +00:00
|
|
|
dnl and we (obviously) do not need to set CFLAGS for that
|
1999-12-31 23:03:00 +00:00
|
|
|
fi
|
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $SVGA_CFLAGS"
|
|
|
|
AC_CHECK_HEADER(vga.h, HAS_SVGA=yes, HAS_SVGA=no)
|
|
|
|
if test "x$HAS_SVGA" != xyes; then
|
|
|
|
HAS_TDFXGL=no
|
|
|
|
fi
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
1999-12-29 13:58:47 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-03 06:18:32 +00:00
|
|
|
dnl Checks for SDL support
|
|
|
|
AC_ARG_WITH(sdl,
|
2000-01-04 22:00:41 +00:00
|
|
|
[ --with-sdl=DIR use SDL found in DIR],
|
2000-01-03 06:18:32 +00:00
|
|
|
HAS_SDL=$withval, HAS_SDL=auto)
|
|
|
|
if test "x$HAS_SDL" != xno; then
|
|
|
|
if test "x$HAS_SDL" != xauto; then
|
2000-01-08 22:12:04 +00:00
|
|
|
SDL_CFLAGS="$SDL_CFLAGS -I$withval/include"
|
|
|
|
SDL_LIB="$SDL_LIBS -L$withbal/lib"
|
2000-01-03 06:18:32 +00:00
|
|
|
fi
|
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
|
|
|
|
AC_CHECK_HEADER(SDL/SDL.h, HAS_SDL=yes, HAS_SDL=no)
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
fi
|
|
|
|
|
1999-12-29 13:58:47 +00:00
|
|
|
|
1999-12-30 08:23:07 +00:00
|
|
|
dnl Checks for GLIDE support
|
1999-12-30 14:26:53 +00:00
|
|
|
AC_ARG_WITH(glide,
|
|
|
|
[ --with-glide=DIR use the GLIDE 2.x SDK found in DIR],
|
1999-12-31 23:03:00 +00:00
|
|
|
HAS_GLIDE=$withval, HAS_GLIDE=auto)
|
1999-12-30 08:23:07 +00:00
|
|
|
if test "x$HAS_GLIDE" != xno; then
|
|
|
|
if test "x$HAS_GLIDE" != xauto; then
|
2000-01-08 22:12:04 +00:00
|
|
|
GLIDE_CFLAGS="$GLIDE_CFLAGS -I$withval/include"
|
|
|
|
GLIDE_LIBS="$GLIDE_LIBS -L$withval/lib"
|
1999-12-31 23:03:00 +00:00
|
|
|
else
|
2000-01-08 22:12:04 +00:00
|
|
|
GLIDE_CFLAGS="$GLIDE_CFLAGS -I/usr/include/glide -I/usr/local/include/glide"
|
1999-12-30 08:23:07 +00:00
|
|
|
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
|
1999-12-31 23:03:00 +00:00
|
|
|
HAS_GLIDE=no
|
1999-12-30 08:23:07 +00:00
|
|
|
fi
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
1999-12-31 23:03:00 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for OGL support
|
|
|
|
dnl GL is a special case, we need seperate includes/libs entires
|
|
|
|
AC_ARG_WITH(opengl,
|
|
|
|
[ --with-opengl=DIR use OpenGL with libraries found in DIR],
|
|
|
|
HAS_OGL=$withval, HAS_OGL=auto)
|
|
|
|
AC_ARG_WITH(opengl-includes,
|
|
|
|
[ --with-opengl-includes=DIR
|
|
|
|
use OpenGL with header files found in DIR],
|
|
|
|
OGL_INCLUDES=$withval, OGL_INCLUDES=auto)
|
|
|
|
if test "x$OGL_INCLUDES" = xno; then
|
|
|
|
HAS_OGL="no"
|
|
|
|
fi
|
|
|
|
if test "x$HAS_OGL" != xno; then
|
|
|
|
if test "x$HAS_OGL" != xauto; then
|
2000-01-08 22:12:04 +00:00
|
|
|
OGL_LIBS="$OGL_LIBS -L$HAS_OGL"
|
1999-12-30 08:23:07 +00:00
|
|
|
fi
|
1999-12-31 23:03:00 +00:00
|
|
|
if test "x$OGL_INCLUDES" != xauto; then
|
2000-01-08 22:12:04 +00:00
|
|
|
OGL_CFLAGS="$OGL_CFLAGS -I$OGL_INCLUDES"
|
1999-12-31 23:03:00 +00:00
|
|
|
else
|
2000-01-08 22:12:04 +00:00
|
|
|
OGL_CFLAGS="$OGL_CFLAGS -I/usr/local/include -I${x_includes:-.}"
|
1999-12-29 13:58:47 +00:00
|
|
|
fi
|
1999-12-31 23:03:00 +00:00
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $OGL_CFLAGS"
|
|
|
|
AC_CHECK_HEADER(GL/gl.h, HAS_OGL=yes, HAS_OGL=no)
|
2000-01-01 13:30:54 +00:00
|
|
|
if test "x$HAS_OGL" != xno; then
|
2000-01-08 08:28:23 +00:00
|
|
|
AC_CHECK_HEADER(GL/xmesa.h, HAS_XMESA=yes, HAS_XMESA=no)
|
1999-12-31 23:03:00 +00:00
|
|
|
AC_MSG_CHECKING(for GL_COLOR_INDEX8_EXT in GL/gl.h)
|
|
|
|
AC_TRY_COMPILE([#include "GL/gl.h"],
|
|
|
|
[ int x = (int) GL_COLOR_INDEX8_EXT;],
|
2000-01-04 05:33:00 +00:00
|
|
|
AC_DEFINE(HAVE_GL_COLOR_INDEX8_EXT) AC_MSG_RESULT(yes),
|
2000-01-01 20:45:27 +00:00
|
|
|
AC_MSG_RESULT(no))
|
1999-12-31 23:03:00 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for GLAPIENTRY in GL/gl.h)
|
|
|
|
AC_TRY_COMPILE([#include "GL/gl.h"],
|
|
|
|
[ int x = GLAPIENTRY printf("");],
|
|
|
|
HAS_GLAPIENTRY=yes, HAS_GLAPIENTRY=no)
|
|
|
|
if test "x$HAS_GLAPIENTRY" != xno; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2000-01-04 05:33:00 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for APIENTRY in GL/gl.h)
|
|
|
|
AC_TRY_COMPILE([#include "GL/gl.h"],
|
|
|
|
[ int x = APIENTRY printf("");],
|
|
|
|
AC_DEFINE(GLAPIENTRY, APIENTRY) AC_MSG_RESULT(yes),
|
|
|
|
AC_DEFINE(GLAPIENTRY, ) AC_MSG_RESULT(no))
|
1999-12-31 23:03:00 +00:00
|
|
|
fi
|
|
|
|
if test "x$HAS_GLIDE" != xno; then
|
|
|
|
CPPFLAGS="$GLIDE_CFLAGS $CPPFLAGS"
|
|
|
|
AC_CHECK_HEADER(GL/fxmesa.h, HAS_FXMESA=yes, HAS_FXMESA=no)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
1999-12-29 13:58:47 +00:00
|
|
|
fi
|
2000-01-23 04:42:43 +00:00
|
|
|
if test "x$HAS_OGL" = xyes; then
|
|
|
|
AC_DEFINE(HAS_OGL)
|
|
|
|
fi
|
1999-12-29 13:58:47 +00:00
|
|
|
|
1999-12-31 23:03:00 +00:00
|
|
|
dnl Make sure DGA works
|
|
|
|
if test "x$HAS_DGA" = xyes; then
|
2000-01-08 22:56:05 +00:00
|
|
|
AC_CHECK_LIB(Xxf86dga, XF86DGAQueryVersion,qwfoo=qwfoo,
|
2000-01-04 01:03:18 +00:00
|
|
|
HAS_DGA=no, [$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
2000-01-08 22:56:05 +00:00
|
|
|
AC_CHECK_LIB(Xxf86vm, XF86VidModeSwitchToMode,qwfoo=qwfoo,
|
2000-01-04 01:03:18 +00:00
|
|
|
HAS_DGA=no, [$X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
1999-12-31 23:03:00 +00:00
|
|
|
fi
|
2000-01-04 01:03:18 +00:00
|
|
|
if test "x$HAS_DGA" != xyes; then
|
|
|
|
DGA_LIBS=""
|
|
|
|
else
|
2000-01-06 17:36:36 +00:00
|
|
|
AC_DEFINE(HAS_DGA)
|
2000-01-04 01:03:18 +00:00
|
|
|
DGA_LIBS="-lXxf86dga -lXxf86vm"
|
1999-12-31 23:03:00 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-04 22:00:41 +00:00
|
|
|
dnl Make sure -lmgllt works
|
|
|
|
if test "x$HAS_MGL" = xyes; then
|
|
|
|
MGL_LIBS="$MGL_LIBS -lgdi32 -lwinmm -ldinput -lddraw"
|
|
|
|
AC_CHECK_LIB(mgllt,MGL_registerDriver, MGL_LIBS="-lmgllt $MGL_LIBS"
|
|
|
|
HAS_MGL=yes, HAS_MGL=no, [$MGL_LIBS])
|
|
|
|
fi
|
|
|
|
if test "x$HAS_MGL" != xyes; then
|
|
|
|
MGL_CFLAGS="" MGL_LIBS=""
|
|
|
|
fi
|
|
|
|
|
2000-01-02 08:50:13 +00:00
|
|
|
dnl Make sure -lggi works
|
|
|
|
if test "x$HAS_GGI" = xyes; then
|
|
|
|
AC_CHECK_LIB(ggi, ggiEventsQueued, GGI_LIBS="$GGI_LIBS -lggi"
|
|
|
|
HAS_GGI=yes, HAS_GGI=no, [$GGI_LIBS])
|
|
|
|
fi
|
|
|
|
if test "x$HAS_GGI" != xyes; then
|
|
|
|
GGI_CFLAGS="" GGI_LIBS=""
|
|
|
|
fi
|
|
|
|
|
1999-12-31 23:03:00 +00:00
|
|
|
dnl Make sure -lvga works
|
|
|
|
if test "x$HAS_SVGA" = xyes; then
|
|
|
|
AC_CHECK_LIB(vga, vga_getmousetype, SVGA_LIBS="$SVGA_LIBS -lvga"
|
2000-01-07 01:15:48 +00:00
|
|
|
HAS_SVGA=yes, HAS_SVGA=no, [$SVGA_LIBS])
|
1999-12-31 23:03:00 +00:00
|
|
|
fi
|
|
|
|
if test "x$HAS_SVGA" != xyes; then
|
|
|
|
SVGA_CFLAGS="" SVGA_LIBS=""
|
|
|
|
fi
|
|
|
|
|
2000-01-03 06:18:32 +00:00
|
|
|
dnl Make sure -lpthread works (for SDL)
|
|
|
|
if test "x$HAS_SDL" = xyes; then
|
|
|
|
AC_CHECK_LIB(pthread, pthread_exit ,SDL_LIBS="$SDL_LIBS -lpthread"
|
|
|
|
HAS_SDL=yes, HAS_SDL=no, [$SDL_LIBS])
|
|
|
|
fi
|
|
|
|
if test "x$HAS_SDL" != xyes; then
|
|
|
|
SDL_CFLAGS="" SDL_LIBS=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Make sure -lSDL works
|
|
|
|
if test "x$HAS_SDL" = xyes; then
|
|
|
|
AC_CHECK_LIB(SDL, SDL_Init, SDL_LIBS="$SDL_LIBS -lSDL"
|
|
|
|
HAS_SDL=yes, HAS_SDL=no, [$SDL_LIBS])
|
|
|
|
fi
|
|
|
|
if test "x$HAS_SDL" != xyes; then
|
|
|
|
SDL_CFLAGS="" SDL_LIBS=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1999-12-31 23:03:00 +00:00
|
|
|
dnl Make sure -lglide2x works
|
|
|
|
if test "x$HAS_GLIDE" = xyes; then
|
|
|
|
AC_CHECK_LIB(glide2x, main, GLIDE_LIBS="$GLIDE_LIBS -lglide2x"
|
|
|
|
HAS_GLIDE=yes, HAS_GLIDE=no, [$GLIDE_LIBS -lm])
|
|
|
|
fi
|
|
|
|
if test "x$HAS_GLIDE" != xyes; then
|
|
|
|
GLIDE_CFLAGS="" GLIDE_LIBS=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Make sure -lGL or -lMesaGL works
|
|
|
|
if test "x$HAS_OGL" = xyes; then
|
|
|
|
AC_CHECK_LIB(GL, glColor4f, OGL_LIBS="$OGL_LIBS -lGL"
|
2000-01-08 21:20:02 +00:00
|
|
|
HAS_OGL=yes
|
2000-01-19 01:21:28 +00:00
|
|
|
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
|
|
|
|
,
|
2000-01-08 21:20:02 +00:00
|
|
|
HAS_OGL=no,
|
|
|
|
[$OGL_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
1999-12-31 23:03:00 +00:00
|
|
|
if test "x$HAS_OGL" != xyes; then
|
|
|
|
AC_CHECK_LIB(MesaGL, glColor4f, OGL_LIBS="$OGL_LIBS -lMesaGL"
|
2000-01-08 21:20:02 +00:00
|
|
|
HAS_OGL=yes
|
2000-01-19 01:21:28 +00:00
|
|
|
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
|
|
|
|
,
|
2000-01-08 21:20:02 +00:00
|
|
|
HAS_OGL=no,
|
|
|
|
[$OGL_LIBS $X_LIBS -lXext -lX11 $X_EXTRA_LIBS])
|
1999-12-31 23:03:00 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test "x$HAS_OGL" != xyes; then
|
2000-01-01 04:21:44 +00:00
|
|
|
OGL_CFLAGS="" OGL_LIBS=""
|
2000-01-08 08:28:23 +00:00
|
|
|
else
|
2000-01-08 21:20:02 +00:00
|
|
|
if test "x$HAS_XMESA" = xyes; then
|
2000-01-08 08:28:23 +00:00
|
|
|
AC_DEFINE(XMESA)
|
|
|
|
fi
|
1999-12-31 23:03:00 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
dnl Check for xil
|
1999-12-31 23:03:00 +00:00
|
|
|
AC_CHECK_LIB(xil,xil_import, HAS_XIL=yes, HAS_XIL=no)
|
|
|
|
|
|
|
|
TDFXGL_CFLAGS=""
|
|
|
|
TDFXGL_LIBS=""
|
|
|
|
TDFXGL_NAME=""
|
1999-12-30 14:26:53 +00:00
|
|
|
AC_ARG_WITH(3dfxgl,
|
|
|
|
[ --with-3dfxgl=DIR use 3Dfx MiniGL library found in DIR],
|
1999-12-31 23:03:00 +00:00
|
|
|
HAS_TDFXGL=$withval, HAS_TDFXGL=auto)
|
|
|
|
AC_ARG_WITH(3dfxgl-name,
|
|
|
|
[ --with-3dfxgl-name=NAME
|
|
|
|
use -lNAME instead of -l3dfxgl],
|
|
|
|
TDFXGL_NAME=$withval, TDFXGL_NAME=3dfxgl)
|
1999-12-30 11:58:44 +00:00
|
|
|
if test "x$HAS_TDFXGL" != xno; then
|
|
|
|
if test "x$HAS_TDFXGL" != xauto; then
|
1999-12-31 23:03:00 +00:00
|
|
|
TDFXGL_LIBS="-L$withval"
|
1999-12-30 10:35:52 +00:00
|
|
|
fi
|
|
|
|
if test "x$HAS_GLIDE" != x; then
|
|
|
|
if test "x$HAS_OGL" != x; then
|
2000-01-07 01:15:48 +00:00
|
|
|
if test "x$HAS_SVGA" != x; then
|
1999-12-31 23:03:00 +00:00
|
|
|
AC_CHECK_LIB($TDFXGL_NAME, glColor4f,
|
|
|
|
HAS_TDFXGL=yes, HAS_TDFXGL=no, [$GLIDE_LIBS $TDFXGL_LIBS])
|
1999-12-30 10:35:52 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
1999-12-30 16:08:34 +00:00
|
|
|
if test "x$HAS_TDFXGL" = xyes; then
|
1999-12-31 23:03:00 +00:00
|
|
|
TDFXGL_CFLAGS="$GLIDE_CFLAGS"
|
|
|
|
TDFXGL_LIBS="$TDFXGL_LIBS $GLIDE_LIBS -l$TDFXGL_NAME"
|
1999-12-30 16:08:34 +00:00
|
|
|
else
|
1999-12-31 23:03:00 +00:00
|
|
|
TDFXGL_NAME=""
|
|
|
|
TDFXGL_LIBS=""
|
1999-12-30 16:08:34 +00:00
|
|
|
HAS_TDFXGL="no"
|
|
|
|
fi
|
1999-12-31 23:03:00 +00:00
|
|
|
|
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
dnl CFLAGS for release and devel versions
|
1999-12-29 13:58:47 +00:00
|
|
|
if test "x$RELEASE" = xyes; then
|
1999-12-30 08:23:07 +00:00
|
|
|
if test "x$GCC" = xyes; then
|
|
|
|
AC_MSG_CHECKING(for special release compiler settings)
|
2000-02-27 22:19:12 +00:00
|
|
|
BASE_RELEASE_CFLAGS="-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
|
1999-12-30 08:23:07 +00:00
|
|
|
case "${target}" in
|
|
|
|
changequote(,)dnl
|
2000-01-04 01:03:18 +00:00
|
|
|
i?86-*-*)
|
1999-12-30 08:23:07 +00:00
|
|
|
changequote([,])dnl
|
2000-01-04 01:03:18 +00:00
|
|
|
MORE_RELEASE_CFLAGS="-malign-loops=2 -malign-jumps=2 -malign-functions=2"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
MORE_RELEASE_CFLAGS=""
|
|
|
|
;;
|
1999-12-30 08:23:07 +00:00
|
|
|
esac
|
|
|
|
if test "x$MORE_RELEASE_CFLAGS" = x; then
|
|
|
|
RELEASE_CFLAGS=-O
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
RELEASE_CFLAGS=$BASE_RELEASE_CFLAGS
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
RELEASE_CFLAGS="$BASE_RELEASE_CFLAGS $MORE_RELEASE_CFALGS"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
RELEASE_CFLAGS=-O2
|
|
|
|
fi
|
1999-12-29 13:58:47 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-06 17:29:23 +00:00
|
|
|
dnl Quakeforge code has lots of C++ comments, which cause
|
|
|
|
dnl problems with any compiler that is ANSI/ISO-C compliant.
|
|
|
|
dnl Make the compiler swallow its pride...
|
|
|
|
if test "x$GCC" != xyes; then
|
2000-02-17 16:21:23 +00:00
|
|
|
AC_MSG_CHECKING(for how to deal with C++ comments)
|
2000-01-06 17:29:23 +00:00
|
|
|
case "$target" in
|
|
|
|
*-aix*)
|
2000-02-27 18:51:50 +00:00
|
|
|
CFLAGS="$CFLAGS -qcpluscmt"
|
2000-02-17 16:21:23 +00:00
|
|
|
AC_MSG_RESULT([-qcpluscmt])
|
2000-01-06 17:29:23 +00:00
|
|
|
;;
|
|
|
|
*-irix6*)
|
|
|
|
CFLAGS="$CFLAGS -Xcpluscomm"
|
2000-02-17 16:21:23 +00:00
|
|
|
AC_MSG_RESULT([-Xcpluscomm])
|
2000-01-06 17:29:23 +00:00
|
|
|
;;
|
|
|
|
*-solaris*)
|
|
|
|
CFLAGS="$CFLAGS -xCC"
|
2000-02-17 16:21:23 +00:00
|
|
|
AC_MSG_RESULT([-xCC])
|
|
|
|
;;
|
2000-02-19 13:51:37 +00:00
|
|
|
*)
|
2000-02-17 16:21:23 +00:00
|
|
|
AC_MSG_RESULT(nothing needed or no switch known)
|
2000-01-06 17:29:23 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl We want warnings, lots of warnings...
|
|
|
|
if test "x$GCC" = xyes; then
|
2000-02-27 18:51:50 +00:00
|
|
|
CFLAGS="$CFLAGS -Wall -Werror"
|
2000-01-06 17:29:23 +00:00
|
|
|
fi
|
2000-01-10 08:49:58 +00:00
|
|
|
# CFLAGS="$CFLAGS -Wall -pedantic"
|
2000-01-04 01:03:18 +00:00
|
|
|
|
|
|
|
dnl Check for ia32
|
|
|
|
AC_MSG_CHECKING(for an ia32 machine)
|
1999-12-29 13:58:47 +00:00
|
|
|
case "${target}" in
|
2000-01-04 01:03:18 +00:00
|
|
|
i?86-*-*)
|
1999-12-29 13:58:47 +00:00
|
|
|
INTEL_ARCH=yes
|
|
|
|
AC_MSG_RESULT(yes)
|
2000-02-03 02:34:26 +00:00
|
|
|
AC_MSG_CHECKING(to see if we should disable x86 optimizations)
|
|
|
|
AC_ARG_ENABLE(asmopt,
|
|
|
|
[ --disable-asmopt Disable assembler optimization (on ia32 machines)],
|
|
|
|
NO_ASMOPT=yes, NO_ASMOPT=no
|
|
|
|
)
|
|
|
|
if test "x$NO_ASMOPT" = xyes; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
2000-02-03 08:46:52 +00:00
|
|
|
;;
|
|
|
|
*) AC_MSG_RESULT(no)
|
|
|
|
NO_ASMOPT=yes
|
|
|
|
esac
|
|
|
|
|
2000-01-02 16:18:22 +00:00
|
|
|
|
|
|
|
dnl Check for sound libraries
|
|
|
|
AC_CHECK_LIB(mme,waveOutOpen,HAVE_LIBMME=yes)
|
|
|
|
|
2000-01-27 17:06:02 +00:00
|
|
|
SOUND_LIBS=""
|
|
|
|
SOUND_STYLE=""
|
1999-12-29 13:58:47 +00:00
|
|
|
AC_MSG_CHECKING(for sound support)
|
2000-02-13 07:12:42 +00:00
|
|
|
if test "x$enable_alsa" != "xno"; then
|
|
|
|
if test -z "$SOUND_STYLE" -a "x$ac_cv_header_sys_asoundlib_h" = "xyes"; then
|
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
2000-01-04 01:03:18 +00:00
|
|
|
#include <sys/asoundlib.h>
|
|
|
|
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR)
|
|
|
|
#if SND_LIB_MAJOR>0 || (SND_LIB_MAJOR==0 && SND_LIB_MINOR>=5)
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
|
|
|
#endif
|
2000-02-13 07:12:42 +00:00
|
|
|
],[ SOUND_STYLE="ALSA" SOUND_LIBS="-lasound"])
|
|
|
|
fi
|
2000-01-04 01:03:18 +00:00
|
|
|
fi
|
2000-01-02 16:18:22 +00:00
|
|
|
|
2000-01-27 17:06:02 +00:00
|
|
|
if test -z "$SOUND_STYLE" -a "x$ac_cv_header_sys_soundcard_h" = "xyes"; then
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
2000-01-02 16:18:22 +00:00
|
|
|
#include <sys/soundcard.h>
|
|
|
|
#ifdef SNDCTL_DSP_SETTRIGGER
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
2000-01-27 17:06:02 +00:00
|
|
|
], SOUND_STYLE="OSS")
|
2000-01-02 16:18:22 +00:00
|
|
|
fi
|
2000-01-27 17:06:02 +00:00
|
|
|
if test -z "$SOUND_STYLE" -a "x$ac_cv_header_linux_soundcard_h" = "xyes"; then
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
2000-01-02 16:18:22 +00:00
|
|
|
#include <linux/soundcard.h>
|
|
|
|
#ifdef SNDCTL_DSP_SETTRIGGER
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
2000-01-27 17:06:02 +00:00
|
|
|
], SOUND_STYLE="OSS")
|
2000-01-02 16:18:22 +00:00
|
|
|
fi
|
2000-01-27 17:06:02 +00:00
|
|
|
if test -z "$SOUND_STYLE" -a "x$ac_cv_header_machine_soundcard_h" = "xyes"; then
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
2000-01-02 16:18:22 +00:00
|
|
|
#include <machine/soundcard.h>
|
|
|
|
#ifdef SNDCTL_DSP_SETTRIGGER
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
2000-01-27 17:06:02 +00:00
|
|
|
], SOUND_STYLE="OSS")
|
2000-01-02 16:18:22 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-27 17:06:02 +00:00
|
|
|
if test -z "$SOUND_STYLE" -a "x$ac_cv_header_sys_audioio_h" = "xyes"; then
|
2000-01-02 16:18:22 +00:00
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
|
|
|
#include <sys/audioio.h>
|
|
|
|
#ifdef AUDIO_SETINFO
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
2000-01-27 17:06:02 +00:00
|
|
|
], SOUND_STYLE="Solaris")
|
2000-01-02 16:18:22 +00:00
|
|
|
fi
|
2000-01-27 17:06:02 +00:00
|
|
|
if test -z "$SOUND_STYLE" -a "x$ac_cv_header_mme_mmsystem_h" = "xyes" -a \
|
2000-01-02 16:18:22 +00:00
|
|
|
"x$HAVE_LIBMME" = "xyes"; then
|
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
|
|
|
#include <mme/mmsystem.h>
|
|
|
|
#ifdef WAVE_OPEN_SHAREABLE
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
2000-01-27 17:06:02 +00:00
|
|
|
], SOUND_STYLE="MME"
|
|
|
|
SOUND_LIBS="-lmme")
|
2000-01-02 16:18:22 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-27 17:06:02 +00:00
|
|
|
if test -z "$SOUND_STYLE" -a "x$ac_cv_header_windows_h" = "xyes" -a \
|
2000-01-02 16:18:22 +00:00
|
|
|
"x$ac_cv_header_mmsystem_h" = "xyes"; then
|
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
|
|
|
#include <windows.h>
|
|
|
|
#include <mmsystem.h>
|
|
|
|
#ifdef GMEM_MOVEABLE
|
|
|
|
#ifdef WAVE_FORMAT_PCM
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
|
|
|
#endif
|
2000-01-27 17:06:02 +00:00
|
|
|
], SOUND_STYLE="Windows"
|
|
|
|
SOUND_LIBS="-lwinmm")
|
2000-01-02 16:18:22 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-27 17:06:02 +00:00
|
|
|
if test "x$SOUND_STYLE" = "x"; then
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_MSG_RESULT(no)
|
2000-01-27 17:06:02 +00:00
|
|
|
SOUND_STYLE="NULL"
|
1999-12-29 13:58:47 +00:00
|
|
|
else
|
2000-01-27 17:06:02 +00:00
|
|
|
AC_MSG_RESULT(yes ($SOUND_STYLE style))
|
1999-12-29 13:58:47 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-04 22:00:41 +00:00
|
|
|
|
2000-01-06 02:31:32 +00:00
|
|
|
dnl ========================================================================
|
|
|
|
dnl Check for CD-ROM
|
|
|
|
|
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
|
|
|
#include <linux/cdrom.h>
|
|
|
|
#ifdef CDROMREADTOCENTRY
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
|
|
|
], AC_DEFINE(USE_LINUX_CD),
|
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],[
|
|
|
|
#include <sys/cdio.h>
|
2000-02-26 03:42:27 +00:00
|
|
|
#if defined (CDIOREADTOCENTRY) || defined (CDIOREADTOCENTRYS)
|
2000-01-06 02:31:32 +00:00
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif
|
|
|
|
], AC_DEFINE(USE_BSD_CD))
|
|
|
|
)
|
2000-01-08 20:39:28 +00:00
|
|
|
AC_HAVE_STRUCT_FIELD(struct ioc_read_toc_single_entry, entry,[
|
|
|
|
#include <sys/cdio.h>
|
|
|
|
])
|
2000-01-06 02:31:32 +00:00
|
|
|
|
|
|
|
|
2000-01-04 22:00:41 +00:00
|
|
|
dnl ========================================================================
|
|
|
|
dnl Check for networking
|
|
|
|
|
|
|
|
NET_LIBS=""
|
|
|
|
|
|
|
|
dnl Check for network libraries
|
|
|
|
if test "x$ac_cv_func_connect" != "xyes"; then
|
|
|
|
AC_CHECK_LIB(socket,connect,
|
|
|
|
NET_LIBS="$NET_LIBS -lsocket"
|
|
|
|
ac_cv_func_connect=yes)
|
|
|
|
fi
|
|
|
|
if test "x$ac_cv_func_gethostbyname" != "xyes"; then
|
|
|
|
AC_CHECK_LIB(nsl,gethostbyname,
|
|
|
|
NET_LIBS="$NET_LIBS -lnsl"
|
|
|
|
ac_cv_func_gethostbyname=yes)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for connect in -lwsock32])
|
|
|
|
SAVELIBS="$LIBS"
|
|
|
|
LIBS="$LIBS -lwsock32"
|
|
|
|
AC_TRY_LINK([
|
|
|
|
#include <winsock.h>
|
|
|
|
],[
|
|
|
|
connect(0, NULL, 42);
|
|
|
|
],
|
|
|
|
NET_LIBS="$NET_LIBS -lwsock32 -lwinmm"
|
|
|
|
ac_cv_func_connect=yes
|
|
|
|
ac_cv_func_gethostbyname=yes
|
2000-01-07 01:15:48 +00:00
|
|
|
HAVE_WSOCK=yes
|
2000-01-04 22:00:41 +00:00
|
|
|
AC_MSG_RESULT(yes),
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
LIBS="$SAVELIBS"
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for UDP support)
|
|
|
|
if test "x$ac_cv_func_connect" = "xyes" -a \
|
|
|
|
"x$ac_cv_func_gethostbyname" = "xyes"; then
|
2000-01-07 01:15:48 +00:00
|
|
|
HAVE_UDP=yes
|
2000-01-04 22:00:41 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
dnl Checks for which system driver to use
|
1999-12-29 13:58:47 +00:00
|
|
|
AC_MSG_CHECKING(for system driver)
|
|
|
|
case "${target}" in
|
2000-01-04 01:03:18 +00:00
|
|
|
*-*-linux-gnu*)
|
1999-12-29 13:58:47 +00:00
|
|
|
SYS_SRC="sys_linux.c"
|
|
|
|
QW_CL_SYS_SRC="sys_linux.c"
|
|
|
|
QW_SRV_SYS_SRC="sys_unix.c"
|
|
|
|
;;
|
2000-01-04 22:00:41 +00:00
|
|
|
i?86-*-mingw32*)
|
|
|
|
SYS_SRC="sys_win.c"
|
|
|
|
QW_CL_SYS_SRC="sys_win.c"
|
|
|
|
QW_SRV_SYS_SRC="sys_win.c"
|
|
|
|
;;
|
2000-01-07 01:15:48 +00:00
|
|
|
i?86-*-*djgpp* | i?86-*-*msdos*)
|
|
|
|
SYS_SRC="sys_dos.c"
|
|
|
|
QW_CL_SYS_SRC=""
|
|
|
|
QW_SRV_SYS_SRC=""
|
|
|
|
;;
|
1999-12-29 13:58:47 +00:00
|
|
|
*)
|
1999-12-31 03:26:08 +00:00
|
|
|
SYS_SRC="sys_unix.c"
|
1999-12-29 13:58:47 +00:00
|
|
|
QW_CL_SYS_SRC="sys_linux.c"
|
|
|
|
QW_SRV_SYS_SRC="sys_unix.c"
|
2000-01-04 01:03:18 +00:00
|
|
|
DEFAULT_SYS=yes
|
|
|
|
;;
|
1999-12-29 13:58:47 +00:00
|
|
|
# XXX - dos - conproc.c(?) sys_dos.c
|
2000-01-04 22:00:41 +00:00
|
|
|
# XXX - need to add dos
|
1999-12-29 13:58:47 +00:00
|
|
|
esac
|
|
|
|
if test "x$DEFAULT_SYS" = xyes; then
|
1999-12-30 08:23:07 +00:00
|
|
|
AC_MSG_RESULT([no, using default])
|
1999-12-29 13:58:47 +00:00
|
|
|
else
|
1999-12-30 08:23:07 +00:00
|
|
|
AC_MSG_RESULT(yes ($SYS_SRC $QW_CL_SYS_SRC $QW_SRV_SYS_SRC))
|
1999-12-29 13:58:47 +00:00
|
|
|
fi
|
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
dnl check for X11 video driver
|
1999-12-29 13:58:47 +00:00
|
|
|
AC_MSG_CHECKING(for X11 video driver)
|
|
|
|
case "${target}" in
|
|
|
|
*-solaris*)
|
|
|
|
X11_VID_SRC="vid_sunx.c" ;;
|
|
|
|
*)
|
|
|
|
if test "x$HAS_X11"; then
|
2000-02-13 09:06:11 +00:00
|
|
|
X11_VID_SRC="vid_x11.c";
|
1999-12-29 13:58:47 +00:00
|
|
|
else
|
|
|
|
X11_VID_SRC=
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if test "x$X11_VID_SRC" = x; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
1999-12-30 08:23:07 +00:00
|
|
|
AC_MSG_RESULT(yes ($X11_VID_SRC))
|
1999-12-29 13:58:47 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Check for system services
|
|
|
|
AC_EXEEXT
|
|
|
|
AC_OBJEXT
|
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
|
2000-02-14 00:35:13 +00:00
|
|
|
AC_SUBST(libdir)
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_SUBST(RELEASE)
|
|
|
|
AC_SUBST(RELEASE_CFLAGS)
|
|
|
|
AC_SUBST(HAS_XIL)
|
|
|
|
AC_SUBST(X_LIBS)
|
|
|
|
AC_SUBST(X_CFLAGS)
|
|
|
|
AC_SUBST(X11_SHM_LIB)
|
|
|
|
AC_SUBST(HAS_X11)
|
|
|
|
AC_SUBST(HAS_DGA)
|
|
|
|
AC_SUBST(DGA_LIBS)
|
2000-01-07 01:15:48 +00:00
|
|
|
AC_SUBST(HAS_VGA)
|
|
|
|
AC_SUBST(VGA_CFLAGS)
|
|
|
|
AC_SUBST(VGA_LIBS)
|
2000-01-04 23:28:12 +00:00
|
|
|
AC_SUBST(HAS_MGL)
|
|
|
|
AC_SUBST(MGL_CFLAGS)
|
|
|
|
AC_SUBST(MGL_LIBS)
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_SUBST(HAS_GGI)
|
|
|
|
AC_SUBST(GGI_CFLAGS)
|
|
|
|
AC_SUBST(GGI_LIBS)
|
|
|
|
AC_SUBST(HAS_SVGA)
|
|
|
|
AC_SUBST(SVGA_CFLAGS)
|
|
|
|
AC_SUBST(SVGA_LIBS)
|
|
|
|
AC_SUBST(HAS_GLIDE)
|
|
|
|
AC_SUBST(GLIDE_CFLAGS)
|
|
|
|
AC_SUBST(GLIDE_LIBS)
|
|
|
|
AC_SUBST(HAS_OGL)
|
|
|
|
AC_SUBST(OGL_CFLAGS)
|
|
|
|
AC_SUBST(OGL_LIBS)
|
|
|
|
AC_SUBST(HAS_TDFXGL)
|
|
|
|
AC_SUBST(TDFXGL_CFLAGS)
|
|
|
|
AC_SUBST(TDFXGL_LIBS)
|
|
|
|
AC_SUBST(HAS_SDL)
|
|
|
|
AC_SUBST(SDL_CFLAGS)
|
|
|
|
AC_SUBST(SDL_LIBS)
|
2000-01-27 17:06:02 +00:00
|
|
|
AC_SUBST(SOUND_STYLE)
|
|
|
|
AC_SUBST(SOUND_LIBS)
|
2000-02-12 05:34:22 +00:00
|
|
|
AC_SUBST(LIBS)
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_SUBST(INTEL_ARCH)
|
2000-02-03 02:34:26 +00:00
|
|
|
AC_SUBST(NO_ASMOPT)
|
2000-01-04 22:00:41 +00:00
|
|
|
AC_SUBST(NET_LIBS)
|
2000-01-04 01:03:18 +00:00
|
|
|
AC_SUBST(SYS_SRC)
|
|
|
|
AC_SUBST(QW_CL_SYS_SRC)
|
|
|
|
AC_SUBST(QW_SRV_SYS_SRC)
|
|
|
|
AC_SUBST(X11_VID_SRC)
|
2000-01-07 01:15:48 +00:00
|
|
|
AC_SUBST(HAVE_WSOCK)
|
|
|
|
AC_SUBST(HAVE_UDP)
|
2000-02-08 21:23:06 +00:00
|
|
|
AC_SUBST(NET_SOURCE)
|
2000-01-18 02:58:36 +00:00
|
|
|
AC_SUBST(VERSION)
|
|
|
|
AC_SUBST(QF_VERSION)
|
2000-02-27 23:38:15 +00:00
|
|
|
AC_SUBST(ac_configure_args)
|
2000-03-04 03:06:46 +00:00
|
|
|
AC_SUBST(GENERATIONS)
|
2000-01-01 20:45:27 +00:00
|
|
|
|
2000-01-04 01:03:18 +00:00
|
|
|
dnl Output files
|
2000-01-01 04:21:44 +00:00
|
|
|
AC_CONFIG_HEADER(common/config.h)
|
2000-01-18 04:02:58 +00:00
|
|
|
AC_OUTPUT(
|
|
|
|
qw_client/Makefile
|
|
|
|
qw_server/Makefile
|
|
|
|
uquake/Makefile
|
2000-01-27 17:06:02 +00:00
|
|
|
common/Makefile
|
2000-01-18 04:02:58 +00:00
|
|
|
Makefile
|
2000-01-19 10:31:53 +00:00
|
|
|
rpm/quakeforge.spec
|
|
|
|
rpm/build_rpm
|
2000-01-18 04:02:58 +00:00
|
|
|
,
|
2000-01-19 10:31:53 +00:00
|
|
|
chmod +x rpm/build_rpm
|
2000-01-18 04:02:58 +00:00
|
|
|
)
|