File armagetron-autoreconf.diff of Package armagetron
--- configure.in
+++ configure.in
@@ -2,7 +2,7 @@
AC_INIT(src/tron/gArmagetron.cpp)
dnl a modern autoconf is required to process this
-AC_PREREQ(2.50)
+AC_PREREQ(2.57)
dnl LibTool configuration
dnl AC_LIBTOOL_DLOPEN
@@ -11,6 +11,24 @@
dnl Header file
AC_CONFIG_HEADER(config.h)
+AH_BOTTOM([
+/* PowerPak 2D debugging output */
+#undef POWERPAK_DEB
+#undef HAVE_LIBPP
+
+#ifdef DEDICATED
+#undef HAVE_LIBSDL
+#undef HAVE_FXMESA
+#undef HAVE_LIBIMG
+#undef HAVE_LIBSDL_IMAGE
+#undef POWERPAK_DEB
+#endif
+
+#if HAVE_LIBSDL_MIXER
+#define DATA_DIR @DATA_DIR@
+#define CONFIG_DIR @CONFIG_DIR@
+#endif
+])
dnl Checks for programs.
@@ -89,52 +107,52 @@
dnl Checks for libraries.
AC_ARG_ENABLE(glout,
-[ --enable-glout enable graphical output; otherwise, compile
- a dedicated server (default=enabled)],,
-enable_glout=yes)
+ AC_HELP_STRING([--enable-glout],
+ [enable graphical output; otherwise, compile a dedicated server (default=enabled)]),,
+ enable_glout=yes)
AC_ARG_ENABLE(memmanager,
-[ --enable-memmanager enable custom memory manager on systems that
-allow it (default=disabled)],,
-enable_memmanager=no)
+ AC_HELP_STRING([--enable-memmanager],
+ [enable custom memory manager on systems that allow it (default=disabled)]),,
+ enable_memmanager=no)
AC_ARG_ENABLE(music,
-[ --enable-music compile in support for background music
- (default=disabled)],,
-enable_music=no)
+ AC_HELP_STRING([--enable-music],
+ [compile in support for background music (default=disabled)]),,
+ enable_music=no)
AC_ARG_ENABLE(krawall,
-[ --enable-krawall enable special code for the krawall gaming
- network (user authentification...) (default=disabled)],,
-enable_krawall=no)
+ AC_HELP_STRING([--enable-krawall],
+ [enable special code for the krawall gaming network (user authentification...) (default=disabled)]),,
+ enable_krawall=no)
AC_ARG_ENABLE(krawallserver,
-[ --enable-krawallserver enable special code for the krawall gaming
- network SERVER (user database query...).
- dont't touch this! (default=disabled)],,
-enable_krawallserver=no)
+ AC_HELP_STRING([--enable-krawallserver],
+ [enable special code for the krawall gaming network SERVER (user database query...).
+ dont't touch this! (default=disabled)]),,
+ enable_krawallserver=no)
AC_ARG_ENABLE(dirty,
-[ --enable-dirty allow dirty GL initialisation (like used with
- SDL 1.0) even if you have SDL 1.1 or up (default=disabled)],,
-enable_dirty=no)
+ AC_HELP_STRING([--enable-dirty],
+ [allow dirty GL initialisation (like used with SDL 1.0) even if you have SDL 1.1 or up (default=disabled)]),,
+ enable_dirty=no)
AC_ARG_ENABLE(etc,
-[ --enable-etc will store configuration files in /etc/armagetron
- instead of /usr/local/games/armagetron/config (default=enabled)],,
-enable_etc=yes)
+ AC_HELP_STRING([--enable-etc],
+ [will store configuration files in /etc/armagetron instead of /usr/local/games/armagetron/config (default=enabled)]),,
+ enable_etc=yes)
if test x$enable_krawall = xyes; then
- AC_DEFINE(KRAWALL)
+ AC_DEFINE(KRAWALL,1,[enable special code for the krawall gaming network])
fi
if test x$enable_krawallserver = xyes; then
- AC_DEFINE(KRAWALL_SERVER)
+ AC_DEFINE(KRAWALL_SERVER,1,[enable special code for the krawall gaming network SERVER])
fi
dnl determine memmanager state
if test x$enable_memmanager != xyes ; then
- AC_DEFINE(DONTUSEMEMMANAGER)
+ AC_DEFINE(DONTUSEMEMMANAGER,1)
fi
test x$enable_etc = xyes && configdir="--configdir /etc/$prognamebase"
@@ -157,28 +175,31 @@
dnl *************************************************
dnl GL AND MATHLIB SELECTION ( SYSTEM DEPENDANT)
dnl *************************************************
+
+AH_TEMPLATE([DONTUSEMEMMANAGER],,[disable memory manager; it may depend on 32 bit.])
+
case "$target" in
*-*-cygwin* | *-*-mingw32*)
- AC_DEFINE(WIN32)
+ AC_DEFINE(WIN32,1,[Define if running on Win32])
MATHLIB=""
SYS_GL_LIB="opengl32"
SYS_GLU_LIB="glu32"
;;
*-*-beos*)
- AC_DEFINE(BEOS)
+ AC_DEFINE(BEOS,1,[Define if you're using BEOS])
MATHLIB=""
SYS_GL_LIB="GL"
SYS_GLU_LIB="GLU"
;;
*-*-darwin*)
- AC_DEFINE(MACOSX)
+ AC_DEFINE(MACOSX,1,[Define if you're using Mac OS X])
MATHLIB=""
SYS_GL_LIB=""
SYS_GLU_LIB=""
LIBS = "$LIBS -framework GLU -framework Quicktime -lsmpeg"
;;
*-*-aix*)
- AC_DEFINE(AIX)
+ AC_DEFINE(AIX,,[Define if running on AIX])
MATHLIB=""
if test x$ac_cv_prog_gcc = xyes; then
CXXFLAGS="$CXXFLAGS -mthreads"
@@ -187,11 +208,10 @@
SYS_GLU_LIB=""
;;
*-*-solaris*)
- AC_DEFINE(SOLARIS)
- AC_DEFINE(CAUTION_WALL)
+ AC_DEFINE(SOLARIS,1,[Define if you're using Solaris])
+ AC_DEFINE(CAUTION_WALL,,[Define to use the wall hack])
MATHLIB="m"
LIBS="$LIBS -lnsl -lsocket"
- AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
@@ -204,9 +224,8 @@
fi
;;
*-*-linux* )
- AC_DEFINE(LINUX)
+ AC_DEFINE(LINUX,1,[Define if running on Linux])
MATHLIB="m"
- AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
@@ -220,8 +239,7 @@
;;
*)
MATHLIB="m"
- AC_DEFINE(DONTUSEMEMMANAGER)
- AC_PATH_X
+ AC_DEFINE(DONTUSEMEMMANAGER,1,[Don't use the memory manager])
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
@@ -254,7 +272,7 @@
Configuring dedicated server, skipping libraries...
])
- AC_DEFINE(DEDICATED)
+ AC_DEFINE(DEDICATED,1,[define if you wish to compile a dedicated server])
progname=${prognamebase}-dedicated
AC_SUBST(progname)
@@ -266,7 +284,7 @@
if test x$enable_dirty = xyes; then
- AC_DEFINE(DIRTY)
+ AC_DEFINE(DIRTY,1,[define if you wish to use the dirty initialisation method])
fi
@@ -300,7 +318,7 @@
done
export LIBS
dnl z-man: old code is LIBS="`sdl-config --libs | sed -e "s@-L/usr/lib@@"` $LIBS"
-AC_DEFINE(HAVE_LIBSDL),
+AC_DEFINE(HAVE_LIBSDL,1,[define if you have the SDL]),
AC_MSG_ERROR([You need the library SDL to compile Armagetron. Read the file doc/install_linux.html.])
,`sdl-config --libs`)
@@ -310,8 +328,8 @@
if test x$enable_music = xyes; then
AC_CHECK_LIB(SDL_mixer,Mix_OpenAudio,
- AC_DEFINE(HAVE_LIBSDL_MIXER)
- LIBS="-lSDL_mixer $LIBS",
+ [AC_DEFINE(HAVE_LIBSDL_MIXER,1,[Define if libSDL_mixer is available])
+ LIBS="-lSDL_mixer $LIBS"],
AC_MSG_WARN([
SDL_mixer library not found. You will not hear music.])
enable_music=no
@@ -332,26 +350,25 @@
if test $SYS_GL_LIB && echo $LIBS | grep -v "\-lGL" > /dev/null; then
+AH_TEMPLATE([HAVE_FXMESA], [define if you have the Mesa 3DFX implementation of OpenGL])
+
dnl AC_CHECK_LIB($SYS_GL_LIB, glEnd,,
AC_CHECK_LIB($SYS_GL_LIB, glVertex3f,,
AC_MSG_RESULT([OpenGL not found. Maybe it needs X11 to compile? Checking that...])
AC_CHECK_LIB(X11,main,
- LIBS="-lX11 -L/usr/X11R6/lib $LIBS"
- export LIBS
- AC_DEFINE(HAVE_LIBX11)
+ AC_DEFINE(HAVE_LIBX11,,[Define if libX11 is available])
,
AC_MSG_WARN([
- Standard X11 library needed by OpenGL not found.
- ]),-L/usr/X11R6/lib)
- AC_CHECK_LIB(Xext,main,-L/usr/X11R6/lib)
- AC_CHECK_LIB(Xt,main,-L/usr/X11R6/lib)
- AC_CHECK_LIB(Xi,main,-L/usr/X11R6/lib)
- AC_CHECK_LIB(Xmu,main,-L/usr/X11R6/lib)
+ Standard X11 library needed by OpenGL not found.]))
+ AC_CHECK_LIB(Xext,main)
+ AC_CHECK_LIB(Xt,main)
+ AC_CHECK_LIB(Xi,main)
+ AC_CHECK_LIB(Xmu,main)
AC_CHECK_LIB($SYS_GL_LIB, glBegin,,AC_MSG_ERROR([
You need Mesa or an OpenGL-System to compile Armagetron.
Maybe your libGL needs the X libraries and your system does not
- find them? Read the file doc/install_linux.html.]),-L/usr/X11R6/lib)
+ find them? Read the file doc/install_linux.html.]))
)
dnl check for 3DFX-MESA
@@ -378,9 +395,6 @@
dnl Other Stuff
dnl *************************************************
-dnl AC_CHECK_LIB(g++, main,,
-dnl AC_MSG_WARN([C++ standard library not found. You can ignore this warning on non-GNU-systems.]))
-
AC_CHECK_LIB(z, main,,
AC_MSG_ERROR([You need libz to compile Armagetron.]))
@@ -464,9 +478,10 @@
CXXFLAGS="-I. -I.. -I../.. $CXXFLAGS"
export CXXFLAGS
-echo timestamp > config.h.stamp
+AC_CONFIG_COMMANDS([config.h.stamp], [echo timestamp >config.h.stamp])
-AC_OUTPUT(src/Makefile src/engine/Makefile
+AC_CONFIG_FILES([
+src/Makefile src/engine/Makefile
src/tools/Makefile src/render/Makefile
src/ui/Makefile src/network/Makefile
src/tron/Makefile
@@ -478,5 +493,6 @@
language/languages.txt
config/aiplayers.cfg config/rc.config
src/doc/Makefile src/doc/net/Makefile
-)
+])
+AC_OUTPUT