quake2forge/configure.in

162 lines
3.7 KiB
Text
Raw Normal View History

# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(src/main.c)
AC_REVISION($Revision$) dnl
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(quake2, 0.1)
AM_MAINTAINER_MODE
AC_SUBST(PROGRAM)
AC_SUBST(VERSION)
2002-04-10 01:41:52 +00:00
dnl --------------------
dnl Checks for programs.
dnl --------------------
AC_PROG_CC
2002-04-10 01:41:52 +00:00
#AC_PROG_RANLIB
#AC_PROG_LIBTOOL
HAVE_MASM=""
AC_SUBST(HAVE_MASM)
AS="$CC"
ASFLAGS="\$(DEFS) \$(CFLAGS) \$(CPPFLAGS) \$(DEFAULT_INCLUDES) \$(INCLUDES)"
AC_SUBST(AS)
AC_SUBST(ASFLAGS)
dnl ---------------------
dnl Checks for libraries.
dnl ---------------------
#AC_CHECK_LIB(GL, glBegin)
# FIXME: Replace `main' with a function in `-lX11':
#AC_CHECK_LIB(X11, [main])
# FIXME: Replace `main' with a function in `-lXext':
#AC_CHECK_LIB([Xext], [main])
# FIXME: Replace `main' with a function in `-lXxf86dga':
#AC_CHECK_LIB([Xxf86dga], [main])
# FIXME: Replace `main' with a function in `-lXxf86vm':
#AC_CHECK_LIB([Xxf86vm], [main])
#AC_CHECK_LIB(dl, dlopen)
#AC_CHECK_LIB(m, sin)
# FIXME: Replace `main' with a function in `-lossaudio':
#AC_CHECK_LIB([ossaudio], [main])
# FIXME: Replace `main' with a function in `-lpthread':
#AC_CHECK_LIB([pthread], [main])
# FIXME: Replace `main' with a function in `-lvga':
#AC_CHECK_LIB([vga], [main])
dnl ------------------------
dnl Checks for header files.
dnl ------------------------
2002-04-10 01:41:52 +00:00
#AC_PATH_X
#AC_HEADER_DIRENT
#AC_HEADER_STDC
dnl AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ sys/soundcard.h ])
dnl --------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
dnl --------------------------------------------------------------
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UID_T
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)
)
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)
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
#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)
SDL_FLAGS=`sdl-config --libs`
AC_SUBST(SDL_FLAGS)
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 -----------
AC_CONFIG_FILES([Makefile
src/Makefile
src/baseq2/Makefile
src/ctf/Makefile
src/xatrix/Makefile
src/rogue/Makefile])
AC_OUTPUT