update for modern auto tools

This commit is contained in:
Bill Currie 2002-10-26 04:27:10 +00:00
parent 630b1e7a4f
commit 9a9367ae08
2 changed files with 36 additions and 145 deletions

View File

@ -1,113 +0,0 @@
/*
Compiler/Machine-Specific Configuration
*/
#ifndef __config_h_
#define __config_h_
@TOP@
/* "Proper" package name */
#undef PROGRAM
/* Define this to the QuakeWorld standard version you support */
#undef QW_VERSION
/* Define this to the QSG standard version you support */
#undef QSG_VERSION
/* Define this to the location of the global config file */
#undef FS_GLOBALCFG
/* Define this to the location of the user config file */
#undef FS_USERCFG
/* Define this to the shared game directory root */
#undef FS_SHAREPATH
/* Define this to the unshared game directory root */
#undef FS_USERPATH
/* Define this to use experimental code */
#undef _EXPERIMENTAL_
/* Define this if you want to use Intel assembly optimizations */
#undef USE_INTEL_ASM
/* Define this if you have a Linux-style CD-ROM API */
#undef USE_LINUX_CD
/* Define this if you have a BSD-style CD-ROM API */
#undef USE_BSD_CD
/* Define if you have the XFree86 DGA extension */
#undef HAVE_DGA
/* Define if you have the XFree86 VIDMODE extension */
#undef HAVE_VIDMODE
/* Define this if you have GLX */
#undef HAVE_GLX
/* Define this if you have Glide */
#undef HAVE_GLIDE
/* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */
#undef HAVE_GL_COLOR_INDEX8_EXT
/* Define this if you want IPv6 support */
#undef HAVE_IPV6
/* Define this if C symbols are prefixed with an underscore */
#undef HAVE_SYM_PREFIX_UNDERSCORE
/* Define this if your system has socklen_t */
#undef HAVE_SOCKLEN_T
/* Define this if your system has size_t */
#undef HAVE_SIZE_T
/* Define this if you have ss_len member in struct sockaddr_storage (BSD) */
#undef HAVE_SS_LEN
/* Define this if you have sin6_len member in struct sockaddr_in6 (BSD) */
#undef HAVE_SIN6_LEN
/* Define this if you have sa_len member in struct sockaddr (BSD) */
#undef HAVE_SA_LEN
/* Define if you have the dlopen function. */
#undef HAVE_DLOPEN
/* Define if you have zlib */
#undef HAVE_ZLIB
/* Define if you have pthread support. */
#undef HAVE_LIBPTHREAD
/* Define this to something sane if you don't have strcasecmp */
#undef strcasecmp
/* If your version of OpenGL uses APIENTRY, define GLAPIENTRY to be APIENTRY */
#undef GLAPIENTRY
/* Define this if fnmatch is prototyped in fnmatch.h */
#undef HAVE_FNMATCH_PROTO
/* Define this to something appropriate for declaring 0 length arrays */
#undef ZERO_LENGTH_ARRAY
/* Define this if you want to have packet logging */
#undef PACKET_LOGGING
/* Define this if you have fnmatch.h */
#undef HAVE_FNMATCH_H
/* Define this if you have FB_AUX_VGA_PLANES_VGA4 */
#undef HAVE_FB_AUX_VGA_PLANES_VGA4
/* Define this if you have FB_AUX_VGA_PLANES_VGA4 */
#undef HAVE_FB_AUX_VGA_PLANES_CFB4
/* Define this if you have FB_AUX_VGA_PLANES_VGA4 */
#undef HAVE_FB_AUX_VGA_PLANES_CFB8
@BOTTOM@
#endif // __config_h_

View File

@ -18,9 +18,9 @@ PROGRAM=QuakeForge
QW_VERSION=2.40
QSG_VERSION=2.0
AC_DEFINE_UNQUOTED(PROGRAM, "$PROGRAM")
AC_DEFINE_UNQUOTED(QW_VERSION, "$QW_VERSION")
AC_DEFINE_UNQUOTED(QSG_VERSION, "$QSG_VERSION")
AC_DEFINE_UNQUOTED(PROGRAM, "$PROGRAM", ["Proper" package name])
AC_DEFINE_UNQUOTED(QW_VERSION, "$QW_VERSION", [Define this to the QuakeWorld standard version you support])
AC_DEFINE_UNQUOTED(QSG_VERSION, "$QSG_VERSION", [Define this to the QSG standard version you support in QuakeWorld])
AC_SUBST(PROGRAM)
AC_SUBST(QW_VERSION)
@ -101,7 +101,7 @@ AC_CHECK_HEADERS(
if test "x$mingw" = xyes; then
AC_MSG_CHECKING(for fnmatch.h)
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FNMATCH_H)
AC_DEFINE(HAVE_FNMATCH_H, 1, [Define this if you have fnmatch.h])
else
AC_CHECK_HEADERS(fnmatch.h)
fi
@ -151,7 +151,7 @@ AC_MSG_CHECKING(that fnmatch is in fnmatch.h)
AC_TRY_COMPILE(
[#include "fnmatch.h"],
[int (*foo)() = fnmatch;],
AC_DEFINE(HAVE_FNMATCH_PROTO)
AC_DEFINE(HAVE_FNMATCH_PROTO, 1, [Define this if fnmatch is prototyped in fnmatch.h])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
@ -160,7 +160,7 @@ AC_MSG_CHECKING(for socklen_t in sys/types.h)
AC_TRY_COMPILE(
[#include <sys/types.h>],
[ socklen_t x = 0;],
AC_DEFINE(HAVE_SOCKLEN_T)
AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define this if your system has socklen_t])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
dnl FreeBSD 4.0 has it in sys/socket.h
@ -169,7 +169,7 @@ AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>],
[ socklen_t x = 0;],
AC_DEFINE(HAVE_SOCKLEN_T) AC_MSG_RESULT(yes),
AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define this if your system has socklen_t]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
)
@ -179,7 +179,7 @@ AC_TRY_LINK(
[asm(".long _bar");
int bar;],
[],
AC_DEFINE(HAVE_SYM_PREFIX_UNDERSCORE) AC_MSG_RESULT(yes),
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)
)
@ -187,7 +187,7 @@ AC_MSG_CHECKING(for size_t in sys/types.h)
AC_TRY_COMPILE(
[#include <sys/types.h>],
[ size_t x = 0;],
AC_DEFINE(HAVE_SIZE_T) AC_MSG_RESULT(yes),
AC_DEFINE(HAVE_SIZE_T, 1, [Define this if your system has size_t]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
@ -197,7 +197,7 @@ AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>],
[ void f(void) { struct sockaddr_storage ss; ss.ss_len=0; }],
AC_DEFINE(HAVE_SS_LEN) AC_MSG_RESULT(yes),
AC_DEFINE(HAVE_SS_LEN, 1, [Define this if you have ss_len member in struct sockaddr_storage (BSD)]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
@ -206,7 +206,7 @@ AC_TRY_COMPILE(
[#include <sys/types.h>
#include <netinet/in.h>],
[ void f(void) { struct sockaddr_in6 s6; s6.sin6_len=0; }],
AC_DEFINE(HAVE_SIN6_LEN) AC_MSG_RESULT(yes),
AC_DEFINE(HAVE_SIN6_LEN, 1, [Define this if you have sin6_len member in struct sockaddr_in6 (BSD)]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
@ -215,7 +215,7 @@ AC_TRY_COMPILE(
[#include <sys/types.h>
#include <netinet/in.h>],
[ void f(void) { struct sockaddr sa; sa.sa_len=0; }],
AC_DEFINE(HAVE_SA_LEN) AC_MSG_RESULT(yes),
AC_DEFINE(HAVE_SA_LEN, 1, [Define this if you have sa_len member in struct sockaddr (BSD)]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
@ -223,12 +223,12 @@ AC_MSG_CHECKING(for zero length array syntax)
AC_TRY_COMPILE(
[],
[struct { int foo; int bar[0]; } foo;],
AC_DEFINE(ZERO_LENGTH_ARRAY,0) AC_MSG_RESULT([0]),
AC_DEFINE(ZERO_LENGTH_ARRAY,0,[zero lenth arrays]) AC_MSG_RESULT([0]),
AC_TRY_COMPILE(
[],
[struct { int foo; int bar[]; } foo;],
AC_DEFINE(ZERO_LENGTH_ARRAY,) AC_MSG_RESULT([]),
AC_DEFINE(ZERO_LENGTH_ARRAY,1) AC_MSG_RESULT([1] sorry about the waste)
AC_DEFINE(ZERO_LENGTH_ARRAY,1,[zero lenth arrays]) AC_MSG_RESULT([1] sorry about the waste)
)
)
@ -258,7 +258,7 @@ dnl Checks for stricmp/strcasecmp
AC_CHECK_FUNC(strcasecmp, strcasecmp=yes, strcasecmp=no)
if test $strcasecmp = no; then
AC_CHECK_FUNC(stricmp,
AC_DEFINE(strcasecmp, stricmp),
AC_DEFINE(strcasecmp, stricmp, [Define strcasecmp as stricmp if you have one but not the other]),
AC_MSG_ERROR([Neither stricmp nor strcasecmp found])
)
fi
@ -271,7 +271,7 @@ AC_CHECK_LIB(m, pow,,
DL_LIBS=""
if test "x$ac_cv_func_dlopen" != "xyes"; then
AC_CHECK_LIB(dl, dlopen,
AC_DEFINE(HAVE_DLOPEN) DL_LIBS="-ldl"
AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have the dlopen function.]) DL_LIBS="-ldl"
)
fi
AC_SUBST(DL_LIBS)
@ -297,7 +297,7 @@ if test "x$enable_zlib" != "xno"; then
AC_CHECK_HEADER(zlib.h, HAVE_ZLIB=yes, HAVE_ZLIB=no)
if test "x$HAVE_ZLIB" = "xyes"; then
Z_LIBS="-lz"
AC_DEFINE(HAVE_ZLIB)
AC_DEFINE(HAVE_ZLIB, 1, [Define if you have zlib])
fi
fi
fi
@ -310,7 +310,7 @@ AC_ARG_WITH(ipv6,
if test "x$withval" = xno ; then
NETTYPE_IPV6=no
else
AC_DEFINE(HAVE_IPV6)
AC_DEFINE(HAVE_IPV6, 1, [Define this if you want IPv6 support])
NETTYPE_IPV6=yes
if test "x$withval" != xyes ; then
LIBS="$LIBS -L${withval}"
@ -408,7 +408,7 @@ if test "x$HAVE_FBDEV" = xyes; then
AC_TRY_COMPILE(
[#include "linux/fb.h"],
[int foo = FB_AUX_VGA_PLANES_VGA4;],
AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_VGA4)
AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_VGA4, 1, [Define this if you have FB_AUX_VGA_PLANES_VGA4])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
@ -416,7 +416,7 @@ if test "x$HAVE_FBDEV" = xyes; then
AC_TRY_COMPILE(
[#include "linux/fb.h"],
[int foo = FB_AUX_VGA_PLANES_CFB4;],
AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB4)
AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB4, 1, [Define this if you have HAVE_FB_AUX_VGA_PLANES_CFB4])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
@ -424,7 +424,7 @@ if test "x$HAVE_FBDEV" = xyes; then
AC_TRY_COMPILE(
[#include "linux/fb.h"],
[int foo = FB_AUX_VGA_PLANES_CFB8;],
AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB8)
AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB8, 1, [Define this if you have HAVE_FB_AUX_VGA_PLANES_CFB8])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
@ -484,7 +484,7 @@ if test "x$HAVE_VIDMODE" != xno; then
AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
dnl Make sure the library works
AC_CHECK_LIB(Xxf86vm, XF86VidModeSwitchToMode,
AC_DEFINE(HAVE_VIDMODE)
AC_DEFINE(HAVE_VIDMODEi, 1, [Define if you have the XFree86 VIDMODE extension])
VIDMODE_LIBS="-lXxf86vm",,
[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]
)
@ -503,7 +503,7 @@ if test "x$HAVE_DGA" != xno; then
AC_CHECK_HEADER(X11/extensions/xf86dga.h,
dnl Make sure the library works
AC_CHECK_LIB(Xxf86dga, XF86DGAQueryVersion,
AC_DEFINE(HAVE_DGA)
AC_DEFINE(HAVE_DGA, 1, [Define if you have the XFree86 DGA extension])
DGA_LIBS="-lXxf86dga",,
[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]
)
@ -529,7 +529,7 @@ if test "x$HAS_GLIDE" != xno; then
if test "x$HAS_GLIDE" != xyes; then
HAS_GLIDE=no
else
AC_DEFINE(HAVE_GLIDE)
AC_DEFINE(HAVE_GLIDE, 1, [Define if you have the glide stuff])
fi
CPPFLAGS="$save_CPPFLAGS"
fi
@ -575,7 +575,7 @@ if test "x$HAVE_GLX" != xno; then
AC_MSG_CHECKING(for GL_COLOR_INDEX8_EXT in GL/gl.h)
AC_TRY_COMPILE([#include "GL/gl.h"],
[ int x = (int) GL_COLOR_INDEX8_EXT;],
AC_DEFINE(HAVE_GL_COLOR_INDEX8_EXT) AC_MSG_RESULT(yes),
AC_DEFINE(HAVE_GL_COLOR_INDEX8_EXT, 1, [Define if you have HAVE_GL_COLOR_INDEX8_EXT]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
AC_CHECK_HEADERS(GL/glext.h, HAVE_GL_GLEXT_H=yes)
@ -648,7 +648,7 @@ if test "x$HAVE_GLX" = xyes; then
test "x$GLX_CFLAGS" != x && GLX_CFLAGS="-I$GLX_CFLAGS"
test "x$glx_libraries" != x && GLX_LIBS="-L$glx_libraries"
GLX_LIBS="$GLX_LIBS -l$OGL_NAME"
AC_DEFINE(HAVE_GLX)
AC_DEFINE(HAVE_GLX, 1, [Define if you have GL/X11 stuff])
else
GLX_CFLAGS=""
GLX_LIBS=""
@ -738,7 +738,7 @@ case "${host}" in
AC_ARG_ENABLE(asmopt,
[ --disable-asmopt disable assembler optimization],
AC_MSG_RESULT(yes),
AC_DEFINE(USE_INTEL_ASM)
AC_DEFINE(USE_INTEL_ASM, 1, [Define this if you want to use Intel assembly optimizations])
ASM_ARCH=yes
AC_MSG_RESULT(no)
)
@ -1067,7 +1067,7 @@ if test "x$globalconf" = "xauto" || test "x$globalconf" = "xyes" || \
test "x$globalconf" = "xno"; then dnl yes/no sanity checks
globalconf="$default_globalconf"
fi
AC_DEFINE_UNQUOTED(FS_GLOBALCFG, "$globalconf")
AC_DEFINE_UNQUOTED(FS_GLOBALCFG, "$globalconf", [Define this to the location of the global config file])
AC_ARG_WITH(user-cfg,
[ --with-user-cfg=FILE If set will change the name and location of the
@ -1078,7 +1078,7 @@ if test "x$userconf" = "xauto" || test "x$userconf" = "xyes" || \
test "x$userconf" = "xno"; then dnl yes/no sanity checks
userconf="$default_userconf"
fi
AC_DEFINE_UNQUOTED(FS_USERCFG, "$userconf")
AC_DEFINE_UNQUOTED(FS_USERCFG, "$userconf", [Define this to the location of the user config file])
AC_ARG_WITH(sharepath,
[ --with-sharepath=DIR Use DIR for shared game data, defaults to
@ -1089,7 +1089,7 @@ if test "x$sharepath" = "xauto" -o "x$sharepath" = "xyes" -o "x$sharepath" = "x"
elif test "x$sharepath" = xno; then
sharepath="."
fi
AC_DEFINE_UNQUOTED(FS_SHAREPATH, "$sharepath")
AC_DEFINE_UNQUOTED(FS_SHAREPATH, "$sharepath", [Define this to the shared game directory root])
AC_ARG_WITH(userpath,
[ --with-userpath=DIR Use DIR for unshared game data, defaults to
@ -1100,7 +1100,7 @@ if test "x$userpath" = "xauto" -o "x$userpath" = "xyes" -o "x$userpath" = "x"; t
elif test "x$userpath" = xno; then
userpath="."
fi
AC_DEFINE_UNQUOTED(FS_USERPATH, "$userpath")
AC_DEFINE_UNQUOTED(FS_USERPATH, "$userpath", [Define this to the unshared game directory root])
dnl CFLAGS for release and devel versions
CFLAGS=""
@ -1170,7 +1170,7 @@ fi
AC_MSG_CHECKING(for packet logging)
if test "x$packetlog" = xyes; then
AC_MSG_RESULT(yes)
AC_DEFINE(PACKET_LOGGING)
AC_DEFINE(PACKET_LOGGING, 1, [Define this if you want packet logging])
else
AC_MSG_RESULT(no)
fi
@ -1265,8 +1265,12 @@ fi
AS="$CC"
ASFLAGS="\$(DEFS) \$(DEFAULT_INCLUDES) \$(INCLUDES)"
CCASFLAGS="$ASFLAGS"
CCAS="$AS"
AC_SUBST(AS)
AC_SUBST(ASFLAGS)
AC_SUBST(CCAS)
AC_SUBST(CCASFLAGS)
dnl ==================================================================
dnl Make sure we link against a working zlib