2001-02-20 03:10:06 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2010-08-19 06:01:43 +00:00
|
|
|
AC_PREREQ(2.67)
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
dnl This is the only place where the package name and version appear
|
2010-08-19 16:59:16 +00:00
|
|
|
AC_INIT([QuakeForge], m4_esyscmd([git log -1 --pretty=%h HEAD | tr -d '\n']))
|
2010-08-19 06:01:43 +00:00
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
|
|
LT_INIT([win32-dll])
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
AC_REVISION([$Revision$]) dnl
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
AC_CONFIG_HEADERS([include/config.h])
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_HOST
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/versions.m4)
|
2001-02-20 03:10:06 +00:00
|
|
|
|
|
|
|
AC_LANG_C
|
|
|
|
|
2005-05-09 12:11:18 +00:00
|
|
|
if test "x${CFLAGS-unset}" = xunset; then
|
|
|
|
CFLAGS=""
|
|
|
|
fi
|
|
|
|
if test "$x{AR-unset}" = xunset; then
|
|
|
|
AR="ar"
|
|
|
|
fi
|
|
|
|
export AR
|
2010-08-19 06:01:43 +00:00
|
|
|
AC_SUBST(AR)
|
|
|
|
AC_SUBST(RANLIB)
|
2005-05-09 12:11:18 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/windows.m4)
|
|
|
|
m4_include(config.d/asm.m4)
|
|
|
|
m4_include(config.d/programs.m4)
|
|
|
|
m4_include(config.d/system_services.m4)
|
|
|
|
m4_include(config.d/header_files.m4)
|
|
|
|
m4_include(config.d/library_functions.m4)
|
|
|
|
m4_include(config.d/typedefs_structs_compiler.m4)
|
2001-07-10 22:36:22 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/cross_compile.m4)
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/pthread.m4)
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2002-01-22 07:10:18 +00:00
|
|
|
WINMM=""
|
2010-08-18 12:53:43 +00:00
|
|
|
case "$host_os" in
|
2001-10-09 21:36:57 +00:00
|
|
|
cygwin*)
|
2002-01-22 07:10:18 +00:00
|
|
|
WINMM="-lwinmm"
|
2001-10-09 21:36:57 +00:00
|
|
|
;;
|
|
|
|
mingw32*)
|
2002-01-22 07:10:18 +00:00
|
|
|
WINMM="-lwinmm"
|
2001-10-09 21:36:57 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
dnl Checks for working -lm
|
|
|
|
AC_CHECK_LIB(m, pow,, AC_MSG_ERROR([math library (-lm) appears broken]))
|
|
|
|
;;
|
|
|
|
esac
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/compression.m4)
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/mgl.m4)
|
|
|
|
m4_include(config.d/fbdev.m4)
|
|
|
|
m4_include(config.d/svga.m4)
|
|
|
|
m4_include(config.d/x11.m4)
|
|
|
|
m4_include(config.d/sdl.m4)
|
2001-10-05 19:36:35 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/curses.m4)
|
2001-10-05 19:36:35 +00:00
|
|
|
|
2001-02-20 03:10:06 +00:00
|
|
|
dnl ==================================================================
|
|
|
|
dnl Checks for system type
|
|
|
|
dnl ==================================================================
|
|
|
|
|
|
|
|
dnl Checks for which system driver to use
|
|
|
|
AC_MSG_CHECKING(for system driver)
|
|
|
|
case "${host}" in
|
2001-09-30 22:59:28 +00:00
|
|
|
i?86-*-mingw32*)
|
|
|
|
SYSTYPE=WIN32
|
|
|
|
AC_MSG_RESULT([Win32 driver])
|
2002-06-04 16:17:10 +00:00
|
|
|
WIN32_LIBS=' $(NET_LIBS)'
|
2004-01-21 21:21:44 +00:00
|
|
|
if test "x$host" != "x$build"; then
|
|
|
|
case "$build_os" in
|
|
|
|
cygwin*)
|
|
|
|
WIN32_LIBS=" -L/usr/lib/w32api $WIN32_LIBS"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2001-09-30 22:59:28 +00:00
|
|
|
;;
|
|
|
|
i?86-*-cygwin*)
|
|
|
|
SYSTYPE=WIN32
|
|
|
|
AC_MSG_RESULT([Win32 driver])
|
2002-06-04 16:17:10 +00:00
|
|
|
WIN32_LIBS=' $(NET_LIBS)'
|
2001-09-30 22:59:28 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
SYSTYPE=POSIX
|
|
|
|
AC_MSG_RESULT([default POSIX driver])
|
2002-06-04 16:17:10 +00:00
|
|
|
WIN32_LIBS=''
|
2001-09-30 22:59:28 +00:00
|
|
|
;;
|
2001-02-20 03:10:06 +00:00
|
|
|
esac
|
2003-08-06 18:20:48 +00:00
|
|
|
AM_CONDITIONAL(SYSTYPE_WIN32, test "x$SYSTYPE" = "xWIN32")
|
2002-06-04 16:17:10 +00:00
|
|
|
AC_SUBST(WIN32_LIBS)
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/sound.m4)
|
|
|
|
m4_include(config.d/joystick.m4)
|
|
|
|
m4_include(config.d/cdrom.m4)
|
2002-02-22 08:55:24 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/networking.m4)
|
2002-08-27 00:27:33 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/paths.m4)
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/build_control.m4)
|
|
|
|
m4_include(config.d/qfcc.m4)
|
|
|
|
m4_include(config.d/compiling.m4)
|
2001-02-21 21:13:29 +00:00
|
|
|
|
2001-06-08 00:11:54 +00:00
|
|
|
AC_ARG_ENABLE(typecheck-progs,
|
2001-09-30 22:59:28 +00:00
|
|
|
[ --enable-typecheck-progs Enable type checking on progs field access])
|
|
|
|
if test "x$enable_typecheck_progs" = xyes; then
|
2002-03-14 20:49:16 +00:00
|
|
|
AC_DEFINE(TYPECHECK_PROGS, 1, [Define this if you want progs typechecking])
|
2001-06-08 00:11:54 +00:00
|
|
|
fi
|
|
|
|
|
2009-12-19 04:45:01 +00:00
|
|
|
AC_ARG_ENABLE(boxclip,
|
|
|
|
[ --enable-boxclip enable box clipping],
|
|
|
|
boxclip=$enable_boxclip,
|
|
|
|
boxclip=no
|
|
|
|
)
|
|
|
|
if test "x$boxclip" != xno; then
|
|
|
|
AC_DEFINE(ENABLE_BOXCLIP, 1, [Define if you want boxclipping])
|
|
|
|
else
|
|
|
|
AC_DEFINE(ENABLE_BOXCLIP, 0, [Define if you want boxclipping])
|
|
|
|
fi
|
|
|
|
|
2010-08-19 16:59:16 +00:00
|
|
|
TOPDIR=`readlink -f ${srcdir}`
|
|
|
|
AC_SUBST(TOPDIR)
|
2001-09-28 16:03:45 +00:00
|
|
|
|
2001-02-20 03:10:06 +00:00
|
|
|
dnl Output files
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/rpm.m4)
|
|
|
|
AC_CONFIG_FILES(m4_include(config.d/ac_config_files.m4))
|
|
|
|
AC_OUTPUT
|
2007-03-07 06:43:21 +00:00
|
|
|
|
2010-08-19 06:01:43 +00:00
|
|
|
m4_include(config.d/result.m4)
|