Set processor affinity under non-Windows platforms using the POSIX API.
[chocolate-doom.git] / configure.in
blobbf2a2c75ff4e6eac2cb91e3722087d3ea832bcff
1 AC_INIT(Chocolate Doom, 1.1.1, fraggle@gmail.com, chocolate-doom)
3 AC_CONFIG_AUX_DIR(autotools)
5 orig_CFLAGS="$CFLAGS"
7 AC_PROG_CC
8 AC_PROG_RANLIB
9 AC_CHECK_PROG(HAVE_PYTHON, python, true, false)
10 AC_CHECK_FUNCS(mmap)
12 OPT_LEVEL=2
14 # Engine room, we need more speed!
16 AC_ARG_ENABLE(penis-extension, 
17 [  --enable-penis-extension   Enable counterproductive compiler optimisations ],
18 [ OPT_LEVEL=3 ])
20 # If this is gcc, we have some options we'd like to turn on.  Turn on 
21 # optimisation and debugging symbols.
23 if test "$GCC" = "yes"
24 then
25         CFLAGS="-O$OPT_LEVEL -g -Wall $orig_CFLAGS"
28 AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h])
30 AM_PATH_SDL(1.1.3)
32 AC_CHECK_LIB(SDL_mixer,Mix_LoadMUS,[
33 dnl    AC_DEFINE(HAVE_LIBSDL_MIXER)
34     SDLMIXER_LIBS="$SDLMIXER_LIBS -lSDL_mixer"
35 ],[
36     echo "*** Could not find SDL_mixer.  Please install it."
37     exit -1
38 ],$SDL_LIBS $SDLMIXER_LIBS)
40 AC_CHECK_LIB(SDL_net,SDLNet_UDP_Send,[
41     SDLNET_LIBS="$SDLNET_LIBS -lSDL_net"
42 ],[
43     echo "*** Could not find SDL_net.  Please install it."
44     exit -1
45 ] ,$SDL_LIBS $SDLNET_LIBS)
47 # DWF 2008-02-10:  FIXME
48 AC_CHECK_LIB(samplerate, src_new)
50 AC_CHECK_TOOL(WINDRES, windres, )
52 AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "")
53 AM_CONDITIONAL(HAVE_PYTHON, $HAVE_PYTHON)
55 dnl Automake v1.8.0 is required, please upgrade!
57 AM_INIT_AUTOMAKE([1.8.0])
59 WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION.0 | sed 's/\./, /g' `
61 AM_CONFIG_HEADER(config.h:config.hin)
63 AC_SUBST(WINDOWS_RC_VERSION)
64 AC_SUBST(SDLMIXER_CFLAGS)
65 AC_SUBST(SDLMIXER_LIBS)
67 AC_SUBST(SDLNET_CFLAGS)
68 AC_SUBST(SDLNET_LIBS)
70 AC_SUBST(ac_aux_dir)
72 dnl Shut up the datarootdir warnings.
73 AC_DEFUN([AC_DATAROOTDIR_CHECKED])
75 AC_OUTPUT([
76 Makefile
77 textscreen/Makefile
78 textscreen/examples/Makefile
79 setup/Makefile
80 man/Makefile
81 src/Makefile
82 pcsound/Makefile
83 src/resource.rc
84 src/doom-screensaver.desktop
85 setup/setup-res.rc