2002-04-02 05:47:23 +00:00
|
|
|
AC_PREREQ(2.50)
|
2002-07-04 00:50:09 +00:00
|
|
|
|
2004-03-28 05:10:18 +00:00
|
|
|
AC_INIT(quake2, 0.3.1, quake2-devel@lists.quakeforge.net)
|
2003-01-01 02:34:13 +00:00
|
|
|
AC_CONFIG_AUX_DIR(.)
|
2002-09-19 06:04:37 +00:00
|
|
|
AC_CONFIG_SRCDIR(src/main.c)
|
2002-04-02 06:23:02 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2002-04-02 05:47:23 +00:00
|
|
|
|
2007-12-16 18:28:03 +00:00
|
|
|
AM_PROG_AS
|
|
|
|
|
2002-04-10 06:57:39 +00:00
|
|
|
AC_CANONICAL_SYSTEM
|
2002-09-19 06:04:37 +00:00
|
|
|
AC_DEFINE_UNQUOTED(BUILDHOST, "${target_cpu}-${target_os}",
|
|
|
|
[Set to the canonical name of the target machine])
|
|
|
|
AC_SUBST(PROGRAM)
|
|
|
|
AC_SUBST(VERSION)
|
|
|
|
|
2004-03-28 05:10:18 +00:00
|
|
|
AM_INIT_AUTOMAKE([foreign dist-bzip2 dist-zip])
|
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2003-02-09 23:36:46 +00:00
|
|
|
dnl ----------------------------------
|
|
|
|
dnl Overall configuration success flag
|
|
|
|
dnl ----------------------------------
|
|
|
|
|
|
|
|
quake2_config_ok=yes
|
|
|
|
|
2002-05-20 04:49:54 +00:00
|
|
|
dnl -------------------
|
|
|
|
dnl Checks for programs
|
|
|
|
dnl -------------------
|
2002-04-05 00:24:29 +00:00
|
|
|
|
2002-04-02 05:47:23 +00:00
|
|
|
AC_PROG_CC
|
2002-07-04 00:50:09 +00:00
|
|
|
|
|
|
|
dnl libtool is evil
|
|
|
|
AC_PROG_LIBTOOL
|
2002-04-02 05:47:23 +00:00
|
|
|
|
2002-04-10 06:57:39 +00:00
|
|
|
HAVE_MASM=""
|
|
|
|
AC_SUBST(HAVE_MASM)
|
|
|
|
|
|
|
|
AS="$CC"
|
|
|
|
ASFLAGS="\$(DEFS) \$(CFLAGS) \$(CPPFLAGS) \$(DEFAULT_INCLUDES) \$(INCLUDES)"
|
2002-05-03 03:53:38 +00:00
|
|
|
CCAS="$AS"
|
|
|
|
CCASFLAGS="$ASFLAGS"
|
2002-04-10 06:57:39 +00:00
|
|
|
AC_SUBST(AS)
|
|
|
|
AC_SUBST(ASFLAGS)
|
2002-05-03 03:53:38 +00:00
|
|
|
AC_SUBST(CCAS)
|
|
|
|
AC_SUBST(CCASFLAGS)
|
2002-04-10 06:57:39 +00:00
|
|
|
|
2002-05-20 04:49:54 +00:00
|
|
|
dnl --------------------
|
|
|
|
dnl Checks for libraries
|
|
|
|
dnl --------------------
|
2002-04-10 06:57:39 +00:00
|
|
|
|
2003-02-09 23:36:46 +00:00
|
|
|
dnl Solaris networking libraries
|
2002-11-24 05:14:29 +00:00
|
|
|
AC_PATH_PROG(unamepath, uname)
|
|
|
|
if test "_$unamepath" = _; then
|
|
|
|
system="unknown"
|
|
|
|
else
|
|
|
|
AC_MSG_CHECKING(system type)
|
|
|
|
system=`$unamepath -s`
|
|
|
|
AC_MSG_RESULT($system)
|
|
|
|
if test "$system" = "SunOS"; then
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lsocket -lnsl"
|
|
|
|
else
|
|
|
|
SYSTEM_LIBS=""
|
|
|
|
fi
|
|
|
|
AC_SUBST(SYSTEM_LIBS)
|
|
|
|
fi
|
|
|
|
|
2004-02-23 13:23:43 +00:00
|
|
|
dnl -----------------------------
|
|
|
|
dnl checks for graphics libraries
|
|
|
|
dnl -----------------------------
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([available graphics options])
|
|
|
|
AC_MSG_RESULT([])
|
2002-07-04 14:17:24 +00:00
|
|
|
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl -----------------
|
2002-07-01 04:53:50 +00:00
|
|
|
dnl Check for SVGAlib
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl -----------------
|
|
|
|
|
|
|
|
HAVE_SVGALIB=no
|
|
|
|
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_ARG_WITH(svgalib,
|
2003-02-19 14:16:16 +00:00
|
|
|
AC_HELP_STRING([--with-svgalib(=DIR)],
|
|
|
|
[use SVGAlib (optionally, found in DIR)]),
|
|
|
|
dnl argument was given, check for --without
|
|
|
|
if test "x${with_svgalib}" != xno ; then
|
|
|
|
ac_with_svgalib=yes
|
|
|
|
else
|
|
|
|
ac_with_svgalib=no
|
|
|
|
fi,
|
|
|
|
ac_with_svgalib=auto
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x${ac_with_svgalib}" != xno ; then
|
|
|
|
|
|
|
|
# --with-svgalib was explicitly given, then, so
|
|
|
|
# look in that directory
|
2004-03-24 06:37:27 +00:00
|
|
|
if test "x${withval}" != xyes; then
|
2002-07-01 04:53:50 +00:00
|
|
|
SVGALIB_CFLAGS="$SVGALIB_CFLAGS -I$withval/include"
|
|
|
|
SVGALIB_LIBS="$SVGALIB_LIBS -L$withval/lib"
|
|
|
|
fi
|
2003-02-19 14:16:16 +00:00
|
|
|
|
2004-02-23 13:23:43 +00:00
|
|
|
# save and set CPPFLAGS for the coming tests
|
2002-07-01 04:53:50 +00:00
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $SVGALIB_CFLAGS"
|
2003-02-19 14:16:16 +00:00
|
|
|
|
|
|
|
# test for the library first, for people who may have the libs
|
|
|
|
# installed but no headers
|
|
|
|
AC_CHECK_LIB(vga, vga_getmousetype,
|
2006-01-14 21:16:20 +00:00
|
|
|
SVGALIB_LIBS="$SVGALIB_LIBS -lvga"
|
2003-02-21 03:15:37 +00:00
|
|
|
HAVE_SVGALIB=maybe,
|
|
|
|
HAVE_SVGALIB=no,
|
2003-02-19 14:16:16 +00:00
|
|
|
[ $SVGALIB_LIBS ]
|
|
|
|
)
|
|
|
|
|
|
|
|
# check the header now
|
|
|
|
if test "x$HAVE_SVGALIB" = xmaybe ; then
|
|
|
|
AC_CHECK_HEADER(vga.h,
|
|
|
|
HAVE_SVGALIB="yes",
|
|
|
|
HAVE_SVGALIB="no"
|
2002-07-01 04:53:50 +00:00
|
|
|
)
|
|
|
|
fi
|
2003-02-19 14:16:16 +00:00
|
|
|
|
|
|
|
# if it's all there, define the relevant bits
|
|
|
|
if test "x$HAVE_SVGALIB" = xyes ; then
|
|
|
|
AC_DEFINE(HAVE_SVGALIB, 1, [Define this if you have SVGAlib])
|
|
|
|
AC_SUBST(SVGALIB_CFLAGS)
|
|
|
|
AC_SUBST(SVGALIB_LIBS)
|
|
|
|
else
|
|
|
|
# we were explicitly told to use svgalib and it's not there
|
|
|
|
if test "x${ac_with_svgalib}" = xyes; then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
*** You have explicitly asked for SVGAlib support, but the required libraries
|
|
|
|
*** and development files could not be found.
|
2004-02-23 13:23:43 +00:00
|
|
|
*** SVGAlib based refreshers will NOT be built.])
|
2003-02-19 14:16:16 +00:00
|
|
|
fi
|
2002-07-01 04:53:50 +00:00
|
|
|
fi
|
2003-02-19 14:16:16 +00:00
|
|
|
|
|
|
|
# unset CPPFLAGS
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
else
|
|
|
|
HAVE_SVGALIB=disabled
|
2002-07-01 04:53:50 +00:00
|
|
|
fi
|
|
|
|
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl -------------
|
2002-07-01 04:53:50 +00:00
|
|
|
dnl Check for X11
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl -------------
|
|
|
|
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_PATH_XTRA
|
|
|
|
if test "x$no_x" = x; then
|
|
|
|
HAVE_X=yes
|
2002-11-24 05:14:29 +00:00
|
|
|
HAVE_XF86_VIDMODE=yes
|
|
|
|
HAVE_XF86_DGA=yes
|
2002-07-01 04:53:50 +00:00
|
|
|
XTRA_LIBS="-lX11"
|
|
|
|
AC_CHECK_LIB(Xext, XShmQueryExtension,
|
|
|
|
XTRA_LIBS="$XTRA_LIBS -lXext",
|
|
|
|
HAVE_X=no,
|
|
|
|
[ $X_LIBS $XTRA_LIBS $X_EXTRA_LIBS ]
|
|
|
|
)
|
|
|
|
if test "x$HAVE_X" = xyes; then
|
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
|
|
|
AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
|
|
|
|
dnl Make sure the library works
|
|
|
|
AC_CHECK_LIB(Xxf86vm, XF86VidModeSwitchToMode,
|
2002-11-24 05:14:29 +00:00
|
|
|
XTRA_LIBS="$XTRA_LIBS -lXxf86vm"
|
|
|
|
AC_DEFINE(HAVE_XF86_VIDMODE, 1, [Define this if you have the xf86vmode extension and its Xxf86vm library.]),
|
|
|
|
HAVE_XF86_VIDMODE=no,
|
2002-07-01 04:53:50 +00:00
|
|
|
[$X_LIBS $XTRA_LIBS $X_EXTRA_LIBS]
|
|
|
|
),
|
2002-11-24 05:14:29 +00:00
|
|
|
HAVE_XF86_VIDMODE=no,
|
2002-07-01 04:53:50 +00:00
|
|
|
[#include <X11/Xlib.h>]
|
|
|
|
)
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
fi
|
|
|
|
if test "x$HAVE_X" = xyes; then
|
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
|
|
|
AC_CHECK_HEADER(X11/extensions/xf86dga.h,
|
|
|
|
AC_CHECK_LIB(Xxf86dga, XF86DGAQueryVersion,
|
2002-11-24 05:14:29 +00:00
|
|
|
XTRA_LIBS="$XTRA_LIBS -lXxf86dga"
|
|
|
|
AC_DEFINE(HAVE_XF86_DGA, 1, [Define this if you have the xf86dga extension and its Xxf86dga library.]),
|
|
|
|
HAVE_XF86_DGA=no,
|
2002-07-01 04:53:50 +00:00
|
|
|
[$X_LIBS $XTRA_LIBS $X_EXTRA_LIBS]
|
|
|
|
),
|
2002-11-24 05:14:29 +00:00
|
|
|
HAVE_XF86_DGA=no,
|
2002-07-01 04:53:50 +00:00
|
|
|
[#include <X11/Xlib.h>]
|
|
|
|
)
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
fi
|
|
|
|
if test "x$HAVE_X" != xyes; then
|
|
|
|
XTRA_LIBS=""
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(HAVE_X)
|
2002-11-24 05:14:29 +00:00
|
|
|
AC_SUBST(HAVE_XF86_VIDMODE)
|
|
|
|
AC_SUBST(HAVE_XF86_DGA)
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_SUBST(XTRA_LIBS)
|
|
|
|
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl ----------------
|
2002-07-01 04:53:50 +00:00
|
|
|
dnl Check for OpenGL
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl ----------------
|
|
|
|
|
|
|
|
HAVE_OPENGL=no
|
|
|
|
|
2002-09-25 12:45:21 +00:00
|
|
|
AC_ARG_WITH(opengl,
|
2003-02-19 14:16:16 +00:00
|
|
|
AC_HELP_STRING([--with-opengl(=DIR)],
|
|
|
|
[use OpenGL (optionall, found in DIR)]),
|
|
|
|
dnl argument was given check for --without
|
|
|
|
if test "x${with_opengl}" != xno ; then
|
|
|
|
ac_with_opengl=yes
|
|
|
|
else
|
|
|
|
ac_with_opengl=no
|
|
|
|
fi,
|
|
|
|
ac_with_opengl=auto
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x${ac_with_opengl}" != xno ; then
|
|
|
|
# --with-opengl was explicitly given, so look in that directory
|
2004-03-24 06:37:27 +00:00
|
|
|
if test "x${withval}" != xyes ; then
|
2002-07-01 04:53:50 +00:00
|
|
|
OPENGL_CFLAGS="$OPENGL_CFLAGS -I$withval/include"
|
2006-01-14 21:16:20 +00:00
|
|
|
OPENGL_LIBS="$OPENGL_LIBS -L$withval/lib"
|
2002-07-01 04:53:50 +00:00
|
|
|
fi
|
2004-02-23 13:23:43 +00:00
|
|
|
# save and set CPPFLAGS for coming tests
|
2002-07-01 04:53:50 +00:00
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $OPENGL_CFLAGS"
|
2003-02-19 14:16:16 +00:00
|
|
|
|
|
|
|
# test for installed library first, for people who may have
|
|
|
|
# the libs installed but no headers
|
|
|
|
AC_CHECK_LIB(GL, glBegin,
|
|
|
|
OPENGL_LIBS="$OPENGL_LIBS -lGL"
|
|
|
|
HAVE_OPENGL="maybe",
|
|
|
|
dnl add -lX11 and -lXext if the first test failed
|
|
|
|
dnl (for, e.g. FreeBSD)
|
|
|
|
unset ac_cv_lib_GL_glBegin
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_CHECK_LIB(GL, glBegin,
|
2003-02-19 14:16:16 +00:00
|
|
|
OPENGL_LIBS="$OPENGL_LIBS -lX11 -lXext"
|
|
|
|
HAVE_OPENGL="maybe",
|
|
|
|
HAVE_OPENGL="no",
|
|
|
|
[$OPENGL_LIBS -lX11 -lXext]
|
|
|
|
),
|
|
|
|
[ $OPENGL_LIBS ]
|
|
|
|
)
|
|
|
|
|
|
|
|
# check the header now
|
|
|
|
if test "x$HAVE_OPENGL" = xmaybe ; then
|
|
|
|
AC_CHECK_HEADER(GL/gl.h,
|
|
|
|
HAVE_OPENGL="yes",
|
|
|
|
HAVE_OPENGL="no"
|
2002-07-01 04:53:50 +00:00
|
|
|
)
|
|
|
|
fi
|
2003-02-19 14:16:16 +00:00
|
|
|
|
|
|
|
# check for glext.h
|
2002-11-24 05:14:29 +00:00
|
|
|
if test "x$HAVE_OPENGL" = xyes; then
|
2003-02-19 14:16:16 +00:00
|
|
|
AC_CHECK_HEADER(GL/glext.h,
|
|
|
|
HAVE_OPENGL_GLEXT=yes
|
2002-11-24 05:14:29 +00:00
|
|
|
AC_DEFINE(HAVE_OPENGL_GLEXT, 1, [Define this if you have GL/glext.h]),
|
|
|
|
HAVE_OPENGL_GLEXT=no,
|
|
|
|
[#include <GL/gl.h>])
|
|
|
|
fi
|
2003-02-19 14:16:16 +00:00
|
|
|
|
|
|
|
if test "x$HAVE_OPENGL" = xyes; then
|
|
|
|
AC_DEFINE(HAVE_OPENGL, 1, [Define this if you have OpenGL])
|
|
|
|
AC_SUBST(OPENGL_CFLAGS)
|
|
|
|
AC_SUBST(OPENGL_LIBS)
|
|
|
|
else
|
|
|
|
# we were explicitly told to use opengl and it's not there
|
|
|
|
if test "x${ac_with_opengl}" = xyes ; then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
*** You have explicitly asked for OpenGL support, but the required libraries
|
|
|
|
*** and development files could not be found.
|
2004-02-23 13:23:43 +00:00
|
|
|
*** OpenGL based refreshers will NOT be built.])
|
2003-02-19 14:16:16 +00:00
|
|
|
fi
|
2002-07-01 04:53:50 +00:00
|
|
|
fi
|
2003-02-19 14:16:16 +00:00
|
|
|
|
|
|
|
# unset CPPFLAGS
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
else
|
|
|
|
HAVE_OPENGL=disabled
|
2002-07-01 04:53:50 +00:00
|
|
|
fi
|
|
|
|
|
2003-02-20 05:57:11 +00:00
|
|
|
dnl -------------
|
2002-07-01 04:53:50 +00:00
|
|
|
dnl Check for SDL
|
2003-02-20 05:57:11 +00:00
|
|
|
dnl -------------
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_ARG_ENABLE(sdl,
|
2002-07-17 16:33:54 +00:00
|
|
|
[ --disable-sdl disable checking for SDL ],
|
2002-07-01 04:53:50 +00:00
|
|
|
)
|
|
|
|
if test "x$enable_sdl" != xno; then
|
|
|
|
AM_PATH_SDL(1.2.0,
|
|
|
|
HAVE_SDL=yes,
|
|
|
|
HAVE_SDL=no)
|
|
|
|
AC_SUBST(HAVE_SDL)
|
|
|
|
fi
|
2004-03-15 12:50:39 +00:00
|
|
|
if test "x$HAVE_SDL" = xyes ; then
|
|
|
|
SNDDRIVERS="$SNDDRIVERS snd_sdl.la"
|
|
|
|
BUILD_SNDSDL="yes"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(BUILD_SNDSDL, test "x$BUILD_SNDSDL" = xyes)
|
2002-07-01 04:53:50 +00:00
|
|
|
|
2003-02-21 03:15:37 +00:00
|
|
|
dnl ------------------------
|
|
|
|
dnl Check for MPG123 library
|
|
|
|
dnl ------------------------
|
|
|
|
|
2003-02-23 11:50:40 +00:00
|
|
|
HAVE_MPG123=disabled
|
2002-04-02 05:47:23 +00:00
|
|
|
|
2003-02-23 12:12:37 +00:00
|
|
|
dnl ---------------------
|
|
|
|
dnl Check for zip library
|
|
|
|
dnl ---------------------
|
|
|
|
|
|
|
|
HAVE_ZIP=disabled
|
|
|
|
|
2004-02-23 13:23:43 +00:00
|
|
|
dnl --------------------------
|
|
|
|
dnl Checks for sound libraries
|
|
|
|
dnl --------------------------
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([available sound options])
|
|
|
|
AC_MSG_RESULT([])
|
|
|
|
|
|
|
|
dnl ------------------
|
|
|
|
dnl Check for ossaudio
|
|
|
|
dnl ------------------
|
|
|
|
|
2004-03-15 12:50:39 +00:00
|
|
|
HAVE_OSS="yes"
|
2004-02-23 13:23:43 +00:00
|
|
|
OSS_CFLAGS=""
|
|
|
|
OSS_LIBS=""
|
|
|
|
AC_CHECK_LIB([ossaudio], [_oss_ioctl], [OSS_LIBS="-lossaudio"])
|
2004-03-15 02:25:43 +00:00
|
|
|
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h])
|
2004-02-23 13:23:43 +00:00
|
|
|
AC_SUBST(OSS_CFLAGS)
|
|
|
|
AC_SUBST(OSS_LIBS)
|
2004-03-15 02:25:43 +00:00
|
|
|
if test "x$ac_cv_header_sys_soundcard_h" = "xyes"; then
|
|
|
|
AC_MSG_CHECKING(for AFMT_S16_NE in sys/soundcard.h)
|
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],
|
|
|
|
[ #include <sys/soundcard.h>
|
|
|
|
#ifdef AFMT_S16_NE
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif ],
|
|
|
|
HAVE_AFMT_S16_NE=yes
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
,
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
)
|
|
|
|
else if test "x$ac_cv_header_soundcard_h" = "xyes"; then
|
|
|
|
AC_MSG_CHECKING(for AFMT_S16_NE in soundcard.h)
|
|
|
|
AC_EGREP_CPP([QF_maGiC_VALUE],
|
|
|
|
[ #include <soundcard.h>
|
|
|
|
#ifdef AFMT_S16_NE
|
|
|
|
QF_maGiC_VALUE
|
|
|
|
#endif ],
|
|
|
|
HAVE_AFMT_S16_NE=yes
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
,
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(HAVE_AFMT_S16_NE)
|
2004-03-15 12:50:39 +00:00
|
|
|
AM_CONDITIONAL(BUILD_SNDOSS, test "x$HAVE_OSS" = xyes)
|
2004-03-15 02:25:43 +00:00
|
|
|
SNDDRIVERS="$SNDDRIVERS snd_oss.la"
|
2004-02-23 13:23:43 +00:00
|
|
|
|
2004-02-02 12:42:18 +00:00
|
|
|
dnl ---------------
|
|
|
|
dnl Check for libao
|
|
|
|
dnl ---------------
|
|
|
|
|
|
|
|
HAVE_AO=no
|
|
|
|
AC_ARG_WITH(ao,
|
|
|
|
AC_HELP_STRING([--with-ao(=DIR)],
|
|
|
|
[use libao (optionally, found in DIR)]),
|
|
|
|
dnl argument was given, check for --without
|
|
|
|
if test "x${with_ao}" != xno ; then
|
|
|
|
ac_with_ao=yes
|
|
|
|
else
|
|
|
|
ac_with_ao=no
|
|
|
|
fi,
|
|
|
|
ac_with_ao=auto
|
|
|
|
)
|
|
|
|
if test "x${ac_with_ao}" != xno ; then
|
|
|
|
dnl --with-ao was explicitly given, so look in the given dir
|
2004-03-24 06:37:27 +00:00
|
|
|
if test "x${withval}" != xyes ; then
|
2004-02-02 12:42:18 +00:00
|
|
|
AO_CFLAGS="$AO_CFLAGS -I$withval/include"
|
|
|
|
AO_LIBS="$AO_LIBS -L$withval/lib"
|
|
|
|
fi
|
2004-02-23 13:23:43 +00:00
|
|
|
dnl save and set CPPFLAGS for coming tests
|
2004-02-02 12:42:18 +00:00
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $AO_CFLAGS"
|
|
|
|
dnl test for installed library first, for people who may have
|
|
|
|
dnl the libs installed by no headers
|
|
|
|
AC_CHECK_LIB(ao, ao_initialize,
|
|
|
|
AO_LIBS="$AO_LIBS -lao"
|
|
|
|
HAVE_AO=maybe,
|
|
|
|
HAVE_AO=no,
|
|
|
|
[$AO_LIBS])
|
|
|
|
dnl check the header
|
|
|
|
if test "x$HAVE_AO" = xmaybe ; then
|
|
|
|
AC_CHECK_HEADER(ao/ao.h,
|
|
|
|
HAVE_AO=yes,
|
|
|
|
HAVE_AO=no
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
dnl sum up
|
|
|
|
if test "x$HAVE_AO" = xyes ; then
|
|
|
|
AC_DEFINE(HAVE_AO, 1, [Define this if you have libao])
|
|
|
|
AC_SUBST(AO_LIBS)
|
|
|
|
AC_SUBST(AO_CFLAGS)
|
2004-03-15 02:25:43 +00:00
|
|
|
SNDDRIVERS="$SNDDRIVERS snd_ao.la"
|
2004-02-02 12:42:18 +00:00
|
|
|
else
|
|
|
|
dnl if we were explicitly told to use ao and it's not there
|
|
|
|
if test "x${ac_with_ao}" = xyes ; then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
*** You have explicitly asked for libao support, but the required libraries
|
2004-02-23 13:23:43 +00:00
|
|
|
*** and development files could not be found.
|
|
|
|
*** libao audio driver will NOT be built.])
|
2004-02-02 12:42:18 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
dnl clean up
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
else
|
|
|
|
HAVE_AO=disabled
|
|
|
|
fi
|
2004-03-15 12:50:39 +00:00
|
|
|
AM_CONDITIONAL(BUILD_SNDAO, test "x$HAVE_AO" = xyes)
|
2004-02-23 13:23:43 +00:00
|
|
|
|
|
|
|
dnl --------------
|
|
|
|
dnl Check for ALSA
|
|
|
|
dnl --------------
|
|
|
|
|
|
|
|
HAVE_ALSA=no
|
|
|
|
AC_ARG_WITH(alsa,
|
|
|
|
AC_HELP_STRING([--with-alsa(=DIR)],
|
|
|
|
[use alsa (optionally, found in DIR)]),
|
|
|
|
dnl argument was given, check for --without
|
|
|
|
if test "x${with_alsa}" != xno ; then
|
|
|
|
ac_with_alsa=yes
|
|
|
|
else
|
|
|
|
ac_with_alsa=no
|
|
|
|
fi,
|
|
|
|
ac_with_alsa=auto
|
|
|
|
)
|
|
|
|
if test "x${ac_with_alsa}" != xno ; then
|
|
|
|
dnl --with-alsa was explicitly given, so look in the given dir
|
2004-03-24 06:37:27 +00:00
|
|
|
if test "x${withval}" != xyes ; then
|
2004-02-23 13:23:43 +00:00
|
|
|
ALSA_CFLAGS="$ALSA_CFLAGS -I$withval/include"
|
|
|
|
ALSA_LIBS="$ALSA_LIBS -L$withval/lib"
|
|
|
|
fi
|
|
|
|
dnl save and set CPPFLAGS for coming tests
|
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $ALSA_CFLAGS"
|
|
|
|
dnl test for installed library first, for people who may have
|
|
|
|
dnl the libs installed but no headers
|
|
|
|
AC_CHECK_LIB(asound, snd_pcm_open,
|
|
|
|
ALSA_LIBS="$ALSA_LIBS -lasound"
|
|
|
|
HAVE_ALSA=maybe,
|
|
|
|
HAVE_ALSA=no,
|
|
|
|
[$ALSA_LIBS])
|
|
|
|
dnl check the header
|
|
|
|
if test "x$HAVE_ALSA" = xmaybe ; then
|
2004-03-15 02:25:43 +00:00
|
|
|
AC_CHECK_HEADER(alsa/asoundlib.h,
|
2004-02-23 13:23:43 +00:00
|
|
|
HAVE_ALSA=yes,
|
|
|
|
HAVE_ALSA=no
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
dnl sum up
|
|
|
|
if test "x$HAVE_ALSA" = xyes ; then
|
|
|
|
AC_DEFINE(HAVE_ALSA, 1, [Define this if you have ALSA])
|
|
|
|
AC_SUBST(ALSA_CFLAGS)
|
|
|
|
AC_SUBST(ALSA_LIBS)
|
2004-03-15 02:25:43 +00:00
|
|
|
SNDDRIVERS="$SNDDRIVERS snd_alsa.la"
|
2004-02-23 13:23:43 +00:00
|
|
|
else
|
|
|
|
dnl if we were explicitly told to use alsa and it's not there
|
|
|
|
if test "x${ac_with_alsa}" = xyes ; then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
*** You have explicitly asked for ALSA support, but the required libraries
|
|
|
|
*** and development files could not be found.
|
|
|
|
*** ALSA audio driver will NOT be built.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
dnl clean up
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
else
|
|
|
|
HAVE_ALSA=disabled
|
|
|
|
fi
|
2004-03-15 12:50:39 +00:00
|
|
|
AM_CONDITIONAL(BUILD_SNDALSA, test "x$HAVE_ALSA" = xyes)
|
|
|
|
|
|
|
|
dnl -----------------------
|
|
|
|
dnl Check for Solaris audio
|
|
|
|
dnl -----------------------
|
|
|
|
|
|
|
|
SOLARIS_CFLAGS=""
|
|
|
|
SOLARIS_LIBS=""
|
|
|
|
AC_CHECK_HEADER([sys/audioio.h])
|
|
|
|
HAVE_SOLARIS="$ac_cv_header_sys_audioio_h"
|
|
|
|
AC_SUBST(SOLARIS_CFLAGS)
|
|
|
|
AC_SUBST(SOLARIS_LIBS)
|
|
|
|
if test "x$HAVE_SOLARIS" = xyes ; then
|
|
|
|
SNDDRIVERS="$SNDDRIVERS snd_solaris.la"
|
|
|
|
BUILD_SNDSOLARIS="yes"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(BUILD_SNDSOLARIS, test "x$BUILD_SNDSOLARIS" = xyes)
|
|
|
|
|
2002-05-20 04:49:54 +00:00
|
|
|
dnl -------------------------------------------------------------
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics
|
|
|
|
dnl -------------------------------------------------------------
|
2002-04-10 06:57:39 +00:00
|
|
|
|
2002-04-02 05:47:23 +00:00
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
|
|
|
AC_TYPE_UID_T
|
2002-05-02 15:45:55 +00:00
|
|
|
AC_TYPE_VA_LIST
|
2002-04-02 05:47:23 +00:00
|
|
|
|
2002-04-10 06:57:39 +00:00
|
|
|
AC_MSG_CHECKING(for underscore prefix in names)
|
|
|
|
AC_TRY_LINK(
|
|
|
|
[asm(".long _bar");
|
|
|
|
int bar;],
|
|
|
|
[],
|
|
|
|
AC_DEFINE(HAVE_SYM_PREFIX_UNDERSCORE, 1, [Define this if C symbols are prefixed with an underscore]) AC_MSG_RESULT(yes),
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
)
|
|
|
|
|
2002-04-10 01:18:41 +00:00
|
|
|
dnl -----------------------------
|
|
|
|
dnl Checks for library functions.
|
|
|
|
dnl -----------------------------
|
|
|
|
|
|
|
|
#AC_FUNC_ERROR_AT_LINE
|
|
|
|
#AC_PROG_GCC_TRADITIONAL
|
2002-04-10 01:41:52 +00:00
|
|
|
#AC_FUNC_MALLOC
|
|
|
|
#AC_FUNC_MEMCMP
|
|
|
|
#AC_FUNC_MMAP
|
|
|
|
#AC_TYPE_SIGNAL
|
|
|
|
#AC_FUNC_STAT
|
|
|
|
#AC_FUNC_VPRINTF
|
2002-04-10 01:18:41 +00:00
|
|
|
#AC_CHECK_FUNCS([bzero floor getcwd gethostbyname getmntent getpagesize gettimeofday memmove memset mkdir munmap pow putenv select socket sqrt strcasecmp strchr strdup strerror strrchr strstr])
|
2002-05-02 15:45:55 +00:00
|
|
|
AC_FUNC_VA_COPY
|
|
|
|
AC_FUNC__VA_COPY
|
2002-04-10 01:18:41 +00:00
|
|
|
|
2002-07-04 00:50:09 +00:00
|
|
|
dnl Check for dynamic loader -- needed for the GL refreshers
|
|
|
|
AC_CHECK_FUNCS(dlopen)
|
2002-04-10 01:18:41 +00:00
|
|
|
DL_LIBS=""
|
|
|
|
if test "x$ac_cv_func_dlopen" != "xyes"; then
|
|
|
|
AC_CHECK_LIB(dl,
|
2002-07-05 00:28:04 +00:00
|
|
|
dlopen,
|
|
|
|
AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have the dlopen function.]) DL_LIBS="-ldl"
|
2002-04-10 01:18:41 +00:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
AC_SUBST(DL_LIBS)
|
2002-04-02 05:47:23 +00:00
|
|
|
|
2002-07-01 04:53:50 +00:00
|
|
|
#SDL_FLAGS=`sdl-config --libs`
|
|
|
|
#AC_SUBST(SDL_FLAGS)
|
2002-04-08 05:42:08 +00:00
|
|
|
|
2002-10-13 13:18:03 +00:00
|
|
|
dnl --------------------
|
|
|
|
dnl Input device support
|
|
|
|
dnl --------------------
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to enable joystick support)
|
|
|
|
AC_ARG_ENABLE(joystick,
|
|
|
|
[ --disable-joystick disable joystick support ],
|
|
|
|
AC_MSG_RESULT(no),
|
|
|
|
AC_MSG_RESULT(yes)
|
2002-11-24 05:14:29 +00:00
|
|
|
HAVE_JOYSTICK=yes
|
2002-10-13 13:18:03 +00:00
|
|
|
)
|
2002-11-24 05:14:29 +00:00
|
|
|
if test "x$HAVE_JOYSTICK" = "xyes";then
|
2004-02-26 20:53:01 +00:00
|
|
|
AC_CHECK_HEADER(linux/joystick.h,
|
|
|
|
HAVE_JOYSTICK=yes
|
|
|
|
AC_DEFINE(HAVE_JOYSTICK, 1, [Define this if you want joystick support to be built]),
|
|
|
|
HAVE_JOYSTICK=no
|
|
|
|
)
|
2002-11-24 05:14:29 +00:00
|
|
|
fi
|
2002-10-13 13:18:03 +00:00
|
|
|
|
2002-07-17 06:41:16 +00:00
|
|
|
dnl -------------------------
|
|
|
|
dnl Optimising compiler flags
|
|
|
|
dnl -------------------------
|
|
|
|
|
|
|
|
OPT_CFLAGS=""
|
|
|
|
USE_OPT=""
|
|
|
|
AC_MSG_CHECKING(whether to allow compiler optimisations)
|
|
|
|
AC_ARG_ENABLE(opt,
|
|
|
|
[ --disable-opt disable compiler optimisations ],
|
2002-10-13 13:18:03 +00:00
|
|
|
AC_MSG_RESULT(no),
|
|
|
|
AC_MSG_RESULT(yes)
|
2002-07-17 06:41:16 +00:00
|
|
|
USE_OPT="yes"
|
2004-03-15 02:25:43 +00:00
|
|
|
OPT_CFLAGS="$OPT_CFLAGS -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
|
2002-07-17 06:41:16 +00:00
|
|
|
)
|
|
|
|
if test "x$USE_OPT" = "xyes"; then
|
|
|
|
case "${host}" in
|
|
|
|
i?86-*-*)
|
2002-07-18 19:33:01 +00:00
|
|
|
AC_MSG_CHECKING(whether -falign-functions works)
|
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="-falign-functions"
|
|
|
|
AC_TRY_COMPILE(
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
OPT_CFLAGS="$OPT_CFLAGS -falign-loops=2 -falign-jumps=2 -falign-functions=2"
|
|
|
|
AC_MSG_RESULT(yes),
|
|
|
|
OPT_CFLAGS="$OPT_CFLAGS -malign-loops=2 -malign-jumps=2 -malign-functions=2"
|
|
|
|
AC_MSG_RESULT(no),
|
|
|
|
)
|
2002-07-18 19:51:10 +00:00
|
|
|
CFLAGS="$save_CFLAGS"
|
2002-07-17 06:41:16 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2004-03-15 02:25:43 +00:00
|
|
|
else
|
|
|
|
# kill off that fucking retarded -O2 that gets bunged in by default
|
|
|
|
temp_CFLAGS=`echo $CFLAGS | sed 's/O2/O0/g'`
|
|
|
|
CFLAGS="$temp_CFLAGS"
|
|
|
|
AC_MSG_WARN([[** Compiler optimisations switched off **]])
|
2002-07-17 06:41:16 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(OPT_CFLAGS)
|
|
|
|
|
2002-12-23 14:04:34 +00:00
|
|
|
dnl -----------------
|
|
|
|
dnl Compiler warnings
|
|
|
|
dnl -----------------
|
|
|
|
|
|
|
|
WARN_CFLAGS=""
|
2004-03-08 11:14:08 +00:00
|
|
|
AC_MSG_CHECKING(whether to abort on compiler warnings)
|
2002-12-23 14:04:34 +00:00
|
|
|
AC_ARG_ENABLE(warn,
|
2004-03-08 11:14:08 +00:00
|
|
|
[ --disable-warn don't abort on compiler warnings ],
|
2002-12-23 14:04:34 +00:00
|
|
|
AC_MSG_RESULT(no),
|
|
|
|
AC_MSG_RESULT(yes)
|
2004-03-15 02:25:43 +00:00
|
|
|
#WARN_CFLAGS="$WARN_CFLAGS -W -Wall -Werror"
|
2002-12-23 14:04:34 +00:00
|
|
|
WARN_CFLAGS="$WARN_CFLAGS -Wall -Werror"
|
2004-03-15 02:25:43 +00:00
|
|
|
# -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings
|
|
|
|
# -Wpointer-arith -Wundef -Wmissing-declarations -Winline -Wconversion
|
2002-12-23 14:04:34 +00:00
|
|
|
)
|
|
|
|
AC_SUBST(WARN_CFLAGS)
|
|
|
|
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl ------------------------------
|
|
|
|
dnl Check for archs that use lib64
|
|
|
|
dnl ------------------------------
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether 64 bit library install path applies)
|
|
|
|
if test "x${libdir}" = "x\${exec_prefix}/lib"; then
|
|
|
|
case "${host}" in
|
|
|
|
powerpc64|x86_64|mips64|s390x-*)
|
|
|
|
libdir=${libdir}64
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
2002-04-10 06:57:39 +00:00
|
|
|
dnl -------------------
|
|
|
|
dnl Checks for asm junk
|
|
|
|
dnl -------------------
|
|
|
|
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_MSG_CHECKING(if assembler can be used)
|
2002-04-10 06:57:39 +00:00
|
|
|
case "${host}" in
|
|
|
|
i?86-*-*)
|
|
|
|
AC_MSG_RESULT(yes)
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_MSG_CHECKING(if asm is disabled)
|
2002-04-10 06:57:39 +00:00
|
|
|
AC_ARG_ENABLE(asm,
|
2002-07-05 00:28:04 +00:00
|
|
|
[ --disable-asm disable assembler optimisation ],
|
|
|
|
AC_MSG_RESULT(asm disabled),
|
|
|
|
AC_DEFINE(USE_ASM, 1, [Define this if you want to use assembler optimised code])
|
|
|
|
ASM_ARCH=yes
|
|
|
|
AC_MSG_RESULT(asm enabled)
|
2002-04-10 06:57:39 +00:00
|
|
|
)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AM_CONDITIONAL(ASM_ARCH, test "$ASM_ARCH" = "yes")
|
|
|
|
|
2002-05-20 04:49:54 +00:00
|
|
|
dnl ---------------------------------------------------
|
|
|
|
dnl Check if the xatrix and rogue sources are available
|
|
|
|
dnl ---------------------------------------------------
|
|
|
|
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_MSG_CHECKING(if Xatrix missionpack source is available)
|
2002-05-20 04:49:54 +00:00
|
|
|
if test -f src/xatrix/g_main.c; then
|
|
|
|
AC_MSG_RESULT(yes)
|
2002-05-20 05:12:04 +00:00
|
|
|
DO_XATRIX=yes
|
2002-05-20 05:01:40 +00:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2002-05-20 04:49:54 +00:00
|
|
|
fi
|
|
|
|
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_MSG_CHECKING(if Rogue missionpack source is available)
|
2002-05-20 04:49:54 +00:00
|
|
|
if test -f src/rogue/g_main.c; then
|
|
|
|
AC_MSG_RESULT(yes)
|
2002-05-20 05:12:04 +00:00
|
|
|
DO_ROGUE=yes
|
2002-05-20 05:01:40 +00:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2002-05-20 04:49:54 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(DO_XATRIX, test "$DO_XATRIX" = "yes")
|
|
|
|
AM_CONDITIONAL(DO_ROGUE, test "$DO_ROGUE" = "yes")
|
|
|
|
|
2002-07-04 00:50:09 +00:00
|
|
|
dnl ----------------------
|
|
|
|
dnl Fill in path variables
|
|
|
|
dnl ----------------------
|
|
|
|
|
|
|
|
dnl $libdir usually gets set to ${exec_prefix}/lib,
|
2002-07-17 05:10:09 +00:00
|
|
|
dnl $prefix and $exec_prefix is likely to be "NONE"
|
2002-07-04 00:50:09 +00:00
|
|
|
dnl Autoconf usually sets pkglibdir correctly in the Makefile, but not in
|
|
|
|
dnl the configure script :(
|
2002-07-17 05:45:57 +00:00
|
|
|
test "$prefix" = "NONE" && prefix=/usr/local
|
|
|
|
test "$exec_prefix" = "NONE" && exec_prefix=$prefix
|
2002-07-17 05:10:09 +00:00
|
|
|
|
|
|
|
eval PKGLIBDIR="$libdir/$PACKAGE"
|
2002-07-04 00:50:09 +00:00
|
|
|
AC_DEFINE_UNQUOTED(PKGLIBDIR, "$PKGLIBDIR", [Define this to the path containing the dynamic modules (\${exec-prefix}/lib/quake2/)])
|
|
|
|
|
2008-06-06 14:26:40 +00:00
|
|
|
eval foo="$datadir/$PACKAGE"
|
|
|
|
eval PKGDATADIR="$foo"
|
2002-07-22 02:03:47 +00:00
|
|
|
AC_DEFINE_UNQUOTED(PKGDATADIR, "$PKGDATADIR", [Define this to the path containing the game data (\${prefix}/share/quake2/)])
|
2002-07-04 00:50:09 +00:00
|
|
|
|
2004-03-08 11:14:08 +00:00
|
|
|
eval BINDIR="$bindir"
|
|
|
|
|
2002-07-01 04:53:50 +00:00
|
|
|
dnl ---------------------------------
|
|
|
|
dnl Work out what refreshers to build
|
|
|
|
dnl ---------------------------------
|
|
|
|
|
|
|
|
VID_REFS=""
|
|
|
|
|
|
|
|
if test "x$HAVE_SVGALIB" = xyes; then
|
2002-07-04 00:50:09 +00:00
|
|
|
VID_REFS="$VID_REFS ref_soft.la"
|
2002-07-01 04:53:50 +00:00
|
|
|
BUILD_SOFT="yes"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$HAVE_X" = xyes; then
|
2002-07-04 00:50:09 +00:00
|
|
|
VID_REFS="$VID_REFS ref_softx.la"
|
2002-07-01 04:53:50 +00:00
|
|
|
BUILD_SOFTX="yes"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$HAVE_SDL" = xyes; then
|
2002-07-04 00:50:09 +00:00
|
|
|
VID_REFS="$VID_REFS ref_softsdl.la"
|
2002-07-01 04:53:50 +00:00
|
|
|
BUILD_SOFTSDL="yes"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$HAVE_X" = xyes -a "x$HAVE_OPENGL" = xyes; then
|
2002-07-04 00:50:09 +00:00
|
|
|
VID_REFS="$VID_REFS ref_glx.la"
|
2002-07-01 04:53:50 +00:00
|
|
|
BUILD_GLX="yes"
|
|
|
|
fi
|
|
|
|
|
2002-07-20 04:30:46 +00:00
|
|
|
if test "x$HAVE_X" = xyes -a "x$HAVE_OPENGL" = xyes -a "x$HAVE_SVGALIB" = xyes; then
|
2002-07-04 00:50:09 +00:00
|
|
|
VID_REFS="$VID_REFS ref_tdfx.la"
|
|
|
|
BUILD_TDFX="yes"
|
2002-07-01 04:53:50 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$HAVE_X" = xyes -a "x$HAVE_OPENGL" = xyes -a "x$HAVE_SDL" = xyes; then
|
2002-07-04 00:50:09 +00:00
|
|
|
VID_REFS="$VID_REFS ref_sdlgl.la"
|
2002-07-01 04:53:50 +00:00
|
|
|
BUILD_SDLGL="yes"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(BUILD_SOFT, test "x$BUILD_SOFT" = xyes)
|
|
|
|
AM_CONDITIONAL(BUILD_SOFTX, test "x$BUILD_SOFTX" = xyes)
|
|
|
|
AM_CONDITIONAL(BUILD_SOFTSDL, test "x$BUILD_SOFTSDL" = xyes)
|
|
|
|
AM_CONDITIONAL(BUILD_GLX, test "x$BUILD_GLX" = xyes)
|
2002-07-04 00:50:09 +00:00
|
|
|
AM_CONDITIONAL(BUILD_TDFX, test "x$BUILD_TDFX" = xyes)
|
2002-07-01 04:53:50 +00:00
|
|
|
AM_CONDITIONAL(BUILD_SDLGL, test "x$BUILD_SDLGL" = xyes)
|
|
|
|
|
|
|
|
AC_SUBST(VID_REFS)
|
2004-03-15 02:25:43 +00:00
|
|
|
AC_SUBST(SNDDRIVERS)
|
2002-07-01 04:53:50 +00:00
|
|
|
|
2003-02-09 23:36:46 +00:00
|
|
|
dnl -----------------------------------------------------------
|
|
|
|
dnl Configuraton tests complete -- provide a summary of results
|
|
|
|
dnl -----------------------------------------------------------
|
2002-04-08 06:17:02 +00:00
|
|
|
|
2003-02-09 23:36:46 +00:00
|
|
|
if test $quake2_config_ok = no ; then
|
|
|
|
|
2004-02-23 13:23:43 +00:00
|
|
|
AC_MSG_RESULT([
|
|
|
|
Quake2Forge $VERSION: Automatic configuration FAILED.
|
|
|
|
|
|
|
|
The file config.log has full details.
|
|
|
|
])
|
2003-02-09 23:36:46 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
dnl Dump it out
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/baseq2/Makefile
|
|
|
|
src/ctf/Makefile
|
|
|
|
src/xatrix/Makefile
|
|
|
|
src/rogue/Makefile
|
2002-09-16 14:02:04 +00:00
|
|
|
data/Makefile
|
2002-09-16 23:47:30 +00:00
|
|
|
data/pixmaps/Makefile
|
2002-09-16 14:02:04 +00:00
|
|
|
data/baseq2/Makefile
|
2004-03-15 12:50:39 +00:00
|
|
|
docs/Makefile
|
|
|
|
docs/ctf/Makefile
|
2002-12-24 00:19:15 +00:00
|
|
|
quake2.spec
|
2002-07-01 04:53:50 +00:00
|
|
|
])
|
2002-04-02 05:47:23 +00:00
|
|
|
AC_OUTPUT
|
2002-07-01 04:53:50 +00:00
|
|
|
|
2002-07-04 00:50:09 +00:00
|
|
|
VID_REFS=`echo $VID_REFS | sed -e 's/ref_//g' -e 's/\.la//g'`
|
2004-03-15 02:25:43 +00:00
|
|
|
SNDDRIVERS=`echo $SNDDRIVERS | sed -e 's/snd_//g' -e 's/\.la//g'`
|
2002-07-01 04:53:50 +00:00
|
|
|
AC_MSG_RESULT([
|
2003-02-09 23:36:46 +00:00
|
|
|
Quake2Forge $VERSION: Automatic configuration OK.
|
|
|
|
|
|
|
|
Configuration summary:
|
2003-02-19 14:16:16 +00:00
|
|
|
Platform: .......... ${host}
|
2004-03-28 05:10:18 +00:00
|
|
|
|
|
|
|
Dependent libraries:])
|
2003-02-19 14:16:16 +00:00
|
|
|
|
|
|
|
AC_MSG_RESULT([ SVGAlib: ......... $HAVE_SVGALIB])
|
|
|
|
if test "x${ac_with_svgalib}" = xyes; then
|
|
|
|
if test "x${HAVE_SVGALIB}" != xyes; then
|
|
|
|
AC_MSG_RESULT([
|
|
|
|
*** SVGAlib was specifically requested but the development files
|
|
|
|
*** and libraries could not be found.
|
|
|
|
])
|
|
|
|
if test "x${with_svgalib}" != xyes; then
|
|
|
|
AC_MSG_RESULT([*** The path given was `$with_svgalib'.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT([ X11: ............. $HAVE_X])
|
2004-03-28 05:10:18 +00:00
|
|
|
|
2003-02-19 14:16:16 +00:00
|
|
|
AC_MSG_RESULT([ OpenGL: .......... $HAVE_OPENGL])
|
|
|
|
if test "x${ac_with_opengl}" = xyes ; then
|
|
|
|
if test "x${HAVE_OPENGL}" != xyes ; then
|
|
|
|
AC_MSG_RESULT([
|
|
|
|
*** OpenGL was specifically requested but the development files
|
|
|
|
*** and libraries could not be found.
|
|
|
|
])
|
2004-02-23 13:23:43 +00:00
|
|
|
if test "x${with_opengl}" != xyes ; then
|
|
|
|
AC_MSG_RESULT([*** The path given was `$with_opengl'.])
|
2003-02-19 14:16:16 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT([ SDL: ............. $HAVE_SDL])
|
2004-03-28 05:10:18 +00:00
|
|
|
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl AC_MSG_RESULT([ Framebuffer: ..... $HAVE_FB])
|
2004-03-28 05:10:18 +00:00
|
|
|
|
2003-02-19 14:16:16 +00:00
|
|
|
dnl AC_MSG_RESULT([ AAlib: ........... $HAVE_AA])
|
2003-02-09 23:36:46 +00:00
|
|
|
|
2004-03-15 12:50:39 +00:00
|
|
|
AC_MSG_RESULT([ OSS: ............. $HAVE_OSS])
|
2004-03-28 05:10:18 +00:00
|
|
|
|
2004-03-15 12:50:39 +00:00
|
|
|
AC_MSG_RESULT([ ALSA: ............ $HAVE_ALSA])
|
2004-02-23 13:23:43 +00:00
|
|
|
if test "x${ac_with_alsa}" = xyes ; then
|
|
|
|
if test "x${HAVE_ALSA}" != xyes ; then
|
|
|
|
AC_MSG_RESULT([
|
|
|
|
*** ALSA was specifically requested but the development files
|
|
|
|
*** and libraries could not be found.
|
|
|
|
])
|
|
|
|
if test "x${with_alsa}" != xyes ; then
|
|
|
|
AC_MSG_RESULT([*** The path given was `$with_alsa'.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2004-03-28 05:10:18 +00:00
|
|
|
|
2004-03-15 12:50:39 +00:00
|
|
|
AC_MSG_RESULT([ libao: ........... $HAVE_AO])
|
2004-02-23 13:23:43 +00:00
|
|
|
if test "x${ac_with_ao}" = xyes ; then
|
|
|
|
if test "x${HAVE_AO}" != xyes ; then
|
|
|
|
AC_MSG_RESULT([
|
|
|
|
*** libao was specifically requested but the development files
|
|
|
|
*** and libraries could not be found.
|
|
|
|
])
|
|
|
|
if test "x${with_ao}" != xyes ; then
|
|
|
|
AC_MSG_RESULT([*** The path given was `$with_ao'.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2004-03-28 05:10:18 +00:00
|
|
|
|
|
|
|
AC_MSG_RESULT([ solaris audioio: . $HAVE_SOLARIS])
|
2004-02-02 12:42:18 +00:00
|
|
|
|
2003-02-19 14:16:16 +00:00
|
|
|
AC_MSG_RESULT([
|
2004-03-28 05:10:18 +00:00
|
|
|
Video refreshers: .. ${VID_REFS- none}
|
|
|
|
Sound drivers: ..... ${SNDDRIVERS- none}
|
|
|
|
|
2003-02-09 23:36:46 +00:00
|
|
|
Installation directories:
|
|
|
|
|
2004-03-08 11:14:08 +00:00
|
|
|
Program: ........... $BINDIR
|
2003-02-09 23:36:46 +00:00
|
|
|
Audio/Video plugins: $PKGLIBDIR
|
|
|
|
Game data: ......... $PKGDATADIR
|
|
|
|
|
|
|
|
Type 'make' to compile Quake2Forge.
|
|
|
|
|
|
|
|
Type 'make install' to install Quake2Forge. Game data needs to be
|
2004-03-15 12:50:39 +00:00
|
|
|
installed in the game data directory shown above before the game can
|
|
|
|
be played. See the file README in the top directory of the source
|
2003-02-19 14:16:16 +00:00
|
|
|
for more details.
|
2003-02-09 23:36:46 +00:00
|
|
|
|
|
|
|
Happy fragging!
|
2002-07-01 04:53:50 +00:00
|
|
|
])
|
2003-02-09 23:36:46 +00:00
|
|
|
|
|
|
|
fi
|