- configure now checks for xatrix and rogue, so no need for

punters to have to manually edit src/Makefile.am (and now
  I don't have to remember to swap it back before checking
  in anymore!)
This commit is contained in:
Jamie Wilkinson 2002-05-20 04:49:54 +00:00
parent 5d2053580d
commit ebc1f99b81
4 changed files with 45 additions and 19 deletions

View file

@ -1,21 +1,26 @@
# Process this file with autoconf to produce a configure script. dnl $Id$
dnl Process this file with autoconf to produce a configure script.
dnl usual stuff
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_INIT(src/main.c) AC_INIT(src/main.c)
AC_REVISION($Revision$) dnl AC_REVISION($Revision$) dnl
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
dnl get the build and target hosts
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
dnl set the program and version
AM_INIT_AUTOMAKE(quake2, 0.1) AM_INIT_AUTOMAKE(quake2, 0.1)
AM_MAINTAINER_MODE
AC_SUBST(PROGRAM) AC_SUBST(PROGRAM)
AC_SUBST(VERSION) AC_SUBST(VERSION)
dnl -------------------- dnl configure --enable-maintainer-mode gets some extra targets
dnl Checks for programs. AM_MAINTAINER_MODE
dnl --------------------
dnl -------------------
dnl Checks for programs
dnl -------------------
AC_PROG_CC AC_PROG_CC
#AC_PROG_RANLIB #AC_PROG_RANLIB
@ -33,9 +38,9 @@ AC_SUBST(ASFLAGS)
AC_SUBST(CCAS) AC_SUBST(CCAS)
AC_SUBST(CCASFLAGS) AC_SUBST(CCASFLAGS)
dnl --------------------- dnl --------------------
dnl Checks for libraries. dnl Checks for libraries
dnl --------------------- dnl --------------------
#AC_CHECK_LIB(GL, glBegin) #AC_CHECK_LIB(GL, glBegin)
# FIXME: Replace `main' with a function in `-lX11': # FIXME: Replace `main' with a function in `-lX11':
@ -55,9 +60,9 @@ dnl ---------------------
# FIXME: Replace `main' with a function in `-lvga': # FIXME: Replace `main' with a function in `-lvga':
#AC_CHECK_LIB([vga], [main]) #AC_CHECK_LIB([vga], [main])
dnl ------------------------ dnl -----------------------
dnl Checks for header files. dnl Checks for header files
dnl ------------------------ dnl -----------------------
#AC_PATH_X #AC_PATH_X
#AC_HEADER_DIRENT #AC_HEADER_DIRENT
@ -65,9 +70,9 @@ dnl ------------------------
dnl AC_HEADER_SYS_WAIT dnl AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ sys/soundcard.h ]) AC_CHECK_HEADERS([ sys/soundcard.h ])
dnl -------------------------------------------------------------- dnl -------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics
dnl -------------------------------------------------------------- dnl -------------------------------------------------------------
AC_C_CONST AC_C_CONST
AC_C_INLINE AC_C_INLINE
@ -155,6 +160,25 @@ case "${host}" in
esac esac
AM_CONDITIONAL(ASM_ARCH, test "$ASM_ARCH" = "yes") AM_CONDITIONAL(ASM_ARCH, test "$ASM_ARCH" = "yes")
dnl ---------------------------------------------------
dnl Check if the xatrix and rogue sources are available
dnl ---------------------------------------------------
AC_MSG_CHECKING(to see if xatrix source is available)
if test -f src/xatrix/g_main.c; then
AC_MSG_RESULT(yes)
AC_DEFINE(DO_XATRIX, 1, [Define this if you have the xatrix source])
fi
AC_MSG_CHECKING(to see if rogue source is available)
if test -f src/rogue/g_main.c; then
AC_MSG_RESULT(yes)
AC_DEFINE(DO_ROGUE, 1, [Define this if you have the rogue source])
fi
AM_CONDITIONAL(DO_XATRIX, test "$DO_XATRIX" = "yes")
AM_CONDITIONAL(DO_ROGUE, test "$DO_ROGUE" = "yes")
dnl ----------- dnl -----------
dnl Dump it out dnl Dump it out
dnl ----------- dnl -----------

View file

@ -1,8 +1,6 @@
# $Id$ # $Id$
# swap comments to build the modpacks SUBDIRS = . baseq2 ctf xatrix rogue
SUBDIRS = . baseq2 ctf
#SUBDIRS = . baseq2 ctf xatrix rogue
bin_PROGRAMS = quake2 \ bin_PROGRAMS = quake2 \
ref_soft.so ref_softx.so ref_softsdl.so \ ref_soft.so ref_softx.so ref_softsdl.so \

View file

@ -1,5 +1,6 @@
# $Id$ # $Id$
if DO_ROGUE
bin_PROGRAMS = game.so bin_PROGRAMS = game.so
game_so_SOURCES = \ game_so_SOURCES = \
dm_ball.c \ dm_ball.c \
@ -69,3 +70,4 @@ game_so_SOURCES = \
AM_CFLAGS = -fPIC -pipe AM_CFLAGS = -fPIC -pipe
AM_CPPFLAGS = -I.. AM_CPPFLAGS = -I..
LDFLAGS = -shared LDFLAGS = -shared
endif # DO_ROGUE

View file

@ -1,5 +1,6 @@
# $Id$ # $Id$
if DO_XATRIX
bin_PROGRAMS = game.so bin_PROGRAMS = game.so
game_so_SOURCES = \ game_so_SOURCES = \
g_ai.c \ g_ai.c \
@ -59,3 +60,4 @@ game_so_SOURCES = \
AM_CFLAGS = -fPIC -pipe AM_CFLAGS = -fPIC -pipe
AM_CPPFLAGS = -I.. AM_CPPFLAGS = -I..
LDFLAGS = -shared LDFLAGS = -shared
endif # DO_XATRIX