2001-02-20 03:10:06 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2021-11-21 22:35:54 +00:00
|
|
|
AC_PREREQ([2.69])
|
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
|
2021-11-20 03:13:46 +00:00
|
|
|
AC_INIT([QuakeForge],m4_esyscmd(config.d/git-version-gen --prefix '' .tarball-version))
|
2020-06-21 14:15:17 +00:00
|
|
|
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
2010-08-20 02:31:59 +00:00
|
|
|
|
|
|
|
dnl LT_INIT messes with CFLAGS (evil bastard)
|
|
|
|
if test "x${CFLAGS-unset}" = xunset; then
|
|
|
|
CFLAGS=""
|
|
|
|
fi
|
|
|
|
saved_CFLAGS="$CFLAGS"
|
2010-11-15 15:53:44 +00:00
|
|
|
dnl LT_INIT([win32-dll])
|
2021-11-20 03:13:46 +00:00
|
|
|
LT_INIT
|
2010-08-20 02:31:59 +00:00
|
|
|
CFLAGS="$saved_CFLAGS"
|
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
|
|
|
|
2021-11-20 03:13:46 +00:00
|
|
|
AC_LANG([C])
|
2001-02-20 03:10:06 +00:00
|
|
|
|
2005-05-09 12:11:18 +00:00
|
|
|
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)
|
2019-07-06 05:42:53 +00:00
|
|
|
m4_include(config.d/vulkan.m4)
|
2019-07-08 16:00:47 +00:00
|
|
|
m4_include(config.d/x11.m4)
|
2010-08-19 06:01:43 +00:00
|
|
|
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
|
2021-06-29 06:39:15 +00:00
|
|
|
|
2001-02-20 03:10:06 +00:00
|
|
|
AC_MSG_CHECKING(for system driver)
|
|
|
|
case "${host}" in
|
2021-03-27 11:09:37 +00:00
|
|
|
i?86-*-mingw32*|x86_64-w64-mingw32*)
|
2001-09-30 22:59:28 +00:00
|
|
|
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
|
|
|
;;
|
2012-03-03 11:46:13 +00:00
|
|
|
*-openbsd*)
|
|
|
|
SYSTYPE=OPENBSD
|
|
|
|
AC_MSG_RESULT([OpenBSD driver])
|
|
|
|
WIN32_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)
|
2021-09-28 01:57:12 +00:00
|
|
|
m4_include(config.d/evdev.m4)
|
2010-08-19 06:01:43 +00:00
|
|
|
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
|
|
|
|
2010-12-21 00:21:30 +00:00
|
|
|
AC_ARG_ENABLE(static-doc,
|
2021-12-20 05:48:02 +00:00
|
|
|
AS_HELP_STRING([--enable-static-doc],
|
|
|
|
[enable generation of doxygen docs for static functions.]))
|
2010-12-21 00:21:30 +00:00
|
|
|
STATIC_DOC=NO
|
|
|
|
if test "x$enable_static_doc" = xyes; then
|
|
|
|
STATIC_DOC=YES
|
|
|
|
fi
|
|
|
|
AC_SUBST(STATIC_DOC)
|
|
|
|
|
2001-06-08 00:11:54 +00:00
|
|
|
AC_ARG_ENABLE(typecheck-progs,
|
2021-12-20 05:48:02 +00:00
|
|
|
AS_HELP_STRING([--enable-typecheck-progs],
|
|
|
|
[enable type checking on progs field access]))
|
2001-09-30 22:59:28 +00:00
|
|
|
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
|
|
|
|
|
2010-08-23 03:53:06 +00:00
|
|
|
TOPSRC=`readlink -f ${srcdir}`
|
|
|
|
AC_SUBST(TOPSRC)
|
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)
|