1 AC_INIT(Chocolate Doom, 1.2.1, fraggle@gmail.com, chocolate-doom)
3 AC_CONFIG_AUX_DIR(autotools)
9 AC_CHECK_PROG(HAVE_PYTHON, python, true, false)
13 # Engine room, we need more speed!
15 AC_ARG_ENABLE(penis-extension,
16 [ --enable-penis-extension Enable counterproductive compiler optimisations ],
19 # If this is gcc, we have some options we'd like to turn on. Turn on
20 # optimisation and debugging symbols.
22 if test "$GCC" = "yes"
24 CFLAGS="-O$OPT_LEVEL -g -Wall $orig_CFLAGS"
27 dnl Search for SDL ...
31 # Add the SDL compiler flags to the default compiler flag variables.
32 # It is important to do this now, before checking for headers and
33 # library functions. The reason being that on Windows, sdl-config
34 # sets the -mno-cygwin compiler option in order to generate MinGW
35 # executables. If we don't do this now, we might end up discovering
36 # header files that are not actually available to us when we come
39 CFLAGS="$CFLAGS $SDL_CFLAGS"
40 LDFLAGS="$LDFLAGS $SDL_LIBS"
42 # On some platforms, SDL renames main() to SDL_main() using a #define,
43 # so that its own main, stored in the SDLmain library, can be run first.
44 # Unfortunately, this causes problems for autoconf, which builds
45 # test programs to probe the system. All library/header/symbol checks
46 # must be run in this block, that performs a workaround for the problem.
48 AC_SDL_MAIN_WORKAROUND([
50 # Check for SDL_mixer.
52 AC_CHECK_LIB(SDL_mixer,Mix_LoadMUS,[
53 SDLMIXER_LIBS="$SDLMIXER_LIBS -lSDL_mixer"
55 echo "*** Could not find SDL_mixer. Please install it."
61 AC_CHECK_LIB(SDL_net,SDLNet_UDP_Send,[
62 SDLNET_LIBS="$SDLNET_LIBS -lSDL_net"
64 echo "*** Could not find SDL_net. Please install it."
68 # Check for libsamplerate.
70 AC_CHECK_LIB(samplerate, src_new)
72 AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h])
73 AC_CHECK_FUNCS(mmap sched_setaffinity)
76 AC_CHECK_TOOL(WINDRES, windres, )
83 *mingw32ce*|*cegcc*|*wince*)
84 CFLAGS="-I../wince $CFLAGS"
91 AM_CONDITIONAL(WINDOWS_CE, $WINDOWS_CE)
92 AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "")
93 AM_CONDITIONAL(HAVE_PYTHON, $HAVE_PYTHON)
95 dnl Automake v1.8.0 is required, please upgrade!
97 AM_INIT_AUTOMAKE([1.8.0])
99 WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION.0 | sed 's/\./, /g' `
101 AM_CONFIG_HEADER(config.h:config.hin)
103 AC_SUBST(WINDOWS_RC_VERSION)
104 AC_SUBST(SDLMIXER_CFLAGS)
105 AC_SUBST(SDLMIXER_LIBS)
107 AC_SUBST(SDLNET_CFLAGS)
108 AC_SUBST(SDLNET_LIBS)
112 dnl Shut up the datarootdir warnings.
113 AC_DEFUN([AC_DATAROOTDIR_CHECKED])
119 textscreen/examples/Makefile
125 pkg/wince/GNUmakefile
127 src/doom-screensaver.desktop