2002-04-02 05:47:23 +00:00
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ(2.50)
|
2002-04-05 00:24:29 +00:00
|
|
|
AC_INIT(src/main.c)
|
|
|
|
AC_REVISION($Revision$) dnl
|
2002-04-02 06:23:02 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2002-04-02 05:47:23 +00:00
|
|
|
|
2002-04-10 06:57:39 +00:00
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
2002-04-05 01:02:17 +00:00
|
|
|
AM_INIT_AUTOMAKE(quake2, 0.1)
|
2002-04-05 00:24:29 +00:00
|
|
|
|
2002-04-02 05:47:23 +00:00
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2002-04-05 00:24:29 +00:00
|
|
|
AC_SUBST(PROGRAM)
|
|
|
|
AC_SUBST(VERSION)
|
|
|
|
|
2002-04-10 01:41:52 +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-04-10 01:41:52 +00:00
|
|
|
#AC_PROG_RANLIB
|
2002-04-03 00:27:05 +00:00
|
|
|
#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)"
|
|
|
|
AC_SUBST(AS)
|
|
|
|
AC_SUBST(ASFLAGS)
|
|
|
|
|
|
|
|
dnl ---------------------
|
2002-04-10 01:18:41 +00:00
|
|
|
dnl Checks for libraries.
|
2002-04-10 06:57:39 +00:00
|
|
|
dnl ---------------------
|
|
|
|
|
2002-04-06 05:56:23 +00:00
|
|
|
#AC_CHECK_LIB(GL, glBegin)
|
2002-04-02 05:47:23 +00:00
|
|
|
# FIXME: Replace `main' with a function in `-lX11':
|
2002-04-03 00:27:05 +00:00
|
|
|
#AC_CHECK_LIB(X11, [main])
|
2002-04-02 05:47:23 +00:00
|
|
|
# FIXME: Replace `main' with a function in `-lXext':
|
2002-04-03 00:27:05 +00:00
|
|
|
#AC_CHECK_LIB([Xext], [main])
|
2002-04-02 05:47:23 +00:00
|
|
|
# FIXME: Replace `main' with a function in `-lXxf86dga':
|
2002-04-03 00:27:05 +00:00
|
|
|
#AC_CHECK_LIB([Xxf86dga], [main])
|
2002-04-02 05:47:23 +00:00
|
|
|
# FIXME: Replace `main' with a function in `-lXxf86vm':
|
2002-04-03 00:27:05 +00:00
|
|
|
#AC_CHECK_LIB([Xxf86vm], [main])
|
2002-04-06 05:56:23 +00:00
|
|
|
#AC_CHECK_LIB(dl, dlopen)
|
|
|
|
#AC_CHECK_LIB(m, sin)
|
2002-04-02 05:47:23 +00:00
|
|
|
# FIXME: Replace `main' with a function in `-lossaudio':
|
|
|
|
#AC_CHECK_LIB([ossaudio], [main])
|
|
|
|
# FIXME: Replace `main' with a function in `-lpthread':
|
2002-04-06 05:56:23 +00:00
|
|
|
#AC_CHECK_LIB([pthread], [main])
|
2002-04-02 05:47:23 +00:00
|
|
|
# FIXME: Replace `main' with a function in `-lvga':
|
|
|
|
#AC_CHECK_LIB([vga], [main])
|
|
|
|
|
2002-04-10 06:57:39 +00:00
|
|
|
dnl ------------------------
|
|
|
|
dnl Checks for header files.
|
|
|
|
dnl ------------------------
|
|
|
|
|
2002-04-10 01:41:52 +00:00
|
|
|
#AC_PATH_X
|
|
|
|
#AC_HEADER_DIRENT
|
|
|
|
#AC_HEADER_STDC
|
2002-04-09 02:01:36 +00:00
|
|
|
dnl AC_HEADER_SYS_WAIT
|
2002-04-10 01:23:13 +00:00
|
|
|
AC_CHECK_HEADERS([ sys/soundcard.h ])
|
2002-04-02 05:47:23 +00:00
|
|
|
|
2002-04-10 06:57:39 +00:00
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
|
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-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-11 00:38:25 +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)
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
AC_SUBST(HAVE_AFMT_S16_NE)
|
|
|
|
|
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])
|
|
|
|
AC_CHECK_FUNCS(dlopen)
|
|
|
|
|
|
|
|
DL_LIBS=""
|
|
|
|
if test "x$ac_cv_func_dlopen" != "xyes"; then
|
|
|
|
AC_CHECK_LIB(dl,
|
|
|
|
dlopen,
|
|
|
|
AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have the dlopen function.]) DL_LIBS="-ldl"
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
AC_SUBST(DL_LIBS)
|
2002-04-02 05:47:23 +00:00
|
|
|
|
2002-04-08 05:42:08 +00:00
|
|
|
SDL_FLAGS=`sdl-config --libs`
|
|
|
|
AC_SUBST(SDL_FLAGS)
|
|
|
|
|
2002-04-10 06:57:39 +00:00
|
|
|
dnl -------------------
|
|
|
|
dnl Checks for asm junk
|
|
|
|
dnl -------------------
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(to see if assembler can be used)
|
|
|
|
case "${host}" in
|
|
|
|
i?86-*-*)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_MSG_CHECKING(to see if asm is disabled)
|
|
|
|
AC_ARG_ENABLE(asm,
|
|
|
|
[ --disable-asm disable assembler optimisation ],
|
|
|
|
AC_MSG_RESULT(yes),
|
|
|
|
AC_DEFINE(USE_ASM, 1, [Define this if you want to use assembler optimised code])
|
|
|
|
ASM_ARCH=yes
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AM_CONDITIONAL(ASM_ARCH, test "$ASM_ARCH" = "yes")
|
|
|
|
|
|
|
|
dnl -----------
|
|
|
|
dnl Dump it out
|
|
|
|
dnl -----------
|
2002-04-08 06:17:02 +00:00
|
|
|
|
2002-04-02 05:47:23 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2002-04-03 00:52:42 +00:00
|
|
|
src/Makefile
|
2002-04-06 06:30:19 +00:00
|
|
|
src/baseq2/Makefile
|
|
|
|
src/ctf/Makefile
|
|
|
|
src/xatrix/Makefile
|
|
|
|
src/rogue/Makefile])
|
2002-04-02 05:47:23 +00:00
|
|
|
AC_OUTPUT
|