1 AC_INIT(Chocolate Doom, 1.4.0, fraggle@gmail.com, chocolate-doom)
3 PACKAGE_SHORTDESC="Conservative Doom source port"
4 PACKAGE_COPYRIGHT="Copyright (C) 1993-2010"
5 PACKAGE_LICENSE="GNU General Public License, version 2"
6 PACKAGE_MAINTAINER="Simon Howard"
7 PACKAGE_URL="http://www.chocolate-doom.org/"
9 AC_CONFIG_AUX_DIR(autotools)
15 AC_CHECK_PROG(HAVE_PYTHON, python, true, false)
19 # Engine room, we need more speed!
21 AC_ARG_ENABLE(penis-extension,
22 [ --enable-penis-extension Enable counterproductive compiler optimisations ],
25 # If this is gcc, we have some options we'd like to turn on. Turn on
26 # optimisation and debugging symbols.
28 if test "$GCC" = "yes"
30 CFLAGS="-O$OPT_LEVEL -g -Wall $orig_CFLAGS"
33 dnl Search for SDL ...
37 # Add the SDL compiler flags to the default compiler flag variables.
38 # It is important to do this now, before checking for headers and
39 # library functions. The reason being that on Windows, sdl-config
40 # sets the -mno-cygwin compiler option in order to generate MinGW
41 # executables. If we don't do this now, we might end up discovering
42 # header files that are not actually available to us when we come
45 CFLAGS="$CFLAGS $SDL_CFLAGS"
46 LDFLAGS="$LDFLAGS $SDL_LIBS"
48 # On some platforms, SDL renames main() to SDL_main() using a #define,
49 # so that its own main, stored in the SDLmain library, can be run first.
50 # Unfortunately, this causes problems for autoconf, which builds
51 # test programs to probe the system. All library/header/symbol checks
52 # must be run in this block, that performs a workaround for the problem.
54 AC_SDL_MAIN_WORKAROUND([
56 # Check for SDL_mixer.
58 AC_CHECK_LIB(SDL_mixer,Mix_LoadMUS,[
59 SDLMIXER_LIBS="$SDLMIXER_LIBS -lSDL_mixer"
61 echo "*** Could not find SDL_mixer. Please install it."
67 AC_CHECK_LIB(SDL_net,SDLNet_UDP_Send,[
68 SDLNET_LIBS="$SDLNET_LIBS -lSDL_net"
70 echo "*** Could not find SDL_net. Please install it."
74 # Check for libsamplerate.
76 AC_CHECK_LIB(samplerate, src_new)
79 AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h])
80 AC_CHECK_FUNCS(mmap sched_setaffinity ioperm)
82 # OpenBSD I/O i386 library for I/O port access.
83 # (64 bit has the same thing with a different name!)
85 AC_CHECK_LIB(i386, i386_iopl)
86 AC_CHECK_LIB(amd64, amd64_iopl)
89 AC_CHECK_TOOL(WINDRES, windres, )
90 AC_CHECK_TOOL(STRIP, strip, )
97 *mingw32ce*|*cegcc*|*wince*)
98 CFLAGS="-I../wince $CFLAGS"
105 AM_CONDITIONAL(WINDOWS_CE, $WINDOWS_CE)
106 AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "")
107 AM_CONDITIONAL(HAVE_PYTHON, $HAVE_PYTHON)
109 dnl Automake v1.8.0 is required, please upgrade!
111 AM_INIT_AUTOMAKE([1.8.0])
113 WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION.0 | sed 's/\./, /g' `
115 AM_CONFIG_HEADER(config.h:config.hin)
117 AC_SUBST(WINDOWS_RC_VERSION)
118 AC_SUBST(SDLMIXER_CFLAGS)
119 AC_SUBST(SDLMIXER_LIBS)
121 AC_SUBST(SDLNET_CFLAGS)
122 AC_SUBST(SDLNET_LIBS)
126 AC_SUBST(PACKAGE_SHORTDESC)
127 AC_SUBST(PACKAGE_COPYRIGHT)
128 AC_SUBST(PACKAGE_LICENSE)
129 AC_SUBST(PACKAGE_MAINTAINER)
130 AC_SUBST(PACKAGE_URL)
132 dnl Shut up the datarootdir warnings.
133 AC_DEFUN([AC_DATAROOTDIR_CHECKED])
140 opl/examples/Makefile
145 pkg/osx/Info-gnustep.plist
149 src/doom-screensaver.desktop
152 textscreen/examples/Makefile