Command line allowed xtreme AI which currently isn't supported
[crack-attack.git] / configure.ac
blob49cf473e82c720d2304047b6e67e0204afd11fda
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.59)
3 AC_INIT(crack-attack,1.1.12,lorien420@myrealbox.com)
4 AC_CONFIG_SRCDIR(src/Attack.cxx)
5 AM_INIT_AUTOMAKE
6 AM_CONFIG_HEADER(src/config.h)
8 dnl Checks for programs.
9 AC_PROG_CC
10 AC_PROG_CXX
11 AC_PROG_INSTALL
12 AC_PROG_RANLIB
14 AC_CANONICAL_HOST 
15 AC_CANONICAL_TARGET
17 dnl Checks for libraries.
18 # FIXME: Replace `main' with a function in `-lGL':
19 AC_CHECK_LIB([GL], [glBegin])
20 # FIXME: Replace `main' with a function in `-lGLU':
21 AC_CHECK_LIB([GLU], [gluLookAt])
22 # I don't know how to check these.
23 # FIXME: Replace `main' with a function in `-lX11':
24 #AC_CHECK_LIB([X11], [main])
25 # FIXME: Replace `main' with a function in `-lXi':
26 #AC_CHECK_LIB([Xi], [main])
27 # FIXME: Replace `main' with a function in `-lXmu':
28 #AC_CHECK_LIB([Xmu], [main])
29 # FIXME: Replace `main' with a function in `-lglut':
30 AC_CHECK_LIB([glut], [glutInit])
32 dnl Checks for header files.
33 AC_HEADER_STDC
34 AC_HEADER_SYS_WAIT
35 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h string.h sys/socket.h unistd.h])
37 dnl Check for gtk
38 AC_ARG_ENABLE(gtk,
39   AC_HELP_STRING([--enable-gtk=[yes/no]],[Use gtk front-end [default=yes]]),
40   enable_gtk="$enableval",
41   enable_gtk=yes)
42 if test "$enable_gtk" = "yes"; then
43   pkg_modules="gtk+-2.0 >= 2.0.0"
44   PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
45   AC_DEFINE([WANT_GTK], [], [Wants to compile gtk front-end])
46 else
47   PACKAGE_CFLAGS=""
48   PACKAGE_LIBS=""
50 AC_SUBST(PACKAGE_CFLAGS)
51 AC_SUBST(PACKAGE_LIBS)
52 AM_CONDITIONAL([WANT_GTK], [test "$enable_gtk" = yes])
54 dnl Check for SDL_mixer
55 AC_ARG_ENABLE(sound,
56   AC_HELP_STRING([--enable-sound=[yes/no]],
57     [Play sounds and music during game[default=yes]]),
58   enable_sound="$enableval",
59   enable_sound=yes)
60 if test "$enable_sound" = "yes"; then
61   AM_PATH_SDL(1.2.0,, AC_MSG_ERROR([libSDL is needed]))
62   AC_CHECK_LIB([SDL_mixer],
63     [Mix_OpenAudio],
64     AC_MSG_RESULT("SDL_mixer found"); SOUND_LIBS="-lSDL_mixer"; enable_sound=no;,
65     AC_MSG_RESULT("SDL_mixer not found"); SOUND_LIBS=""; enable_sound=no;)
66 else
67   SOUND_LIBS=""
69 AC_SUBST(SOUND_LIBS)
70 AM_CONDITIONAL([AUDIO_ENABLED], [test "$enable_sound" = yes])
73 dnl Check for debugging
74 AC_ARG_ENABLE(debug,
75   AC_HELP_STRING([--enable-debug=[no/yes]],[Compile extra debugging info [default=no]]),
76   enable_debug="$enableval",
77   enable_debug=no)
78 if test "$enable_debug" = "yes"; then
79   DEBUG_INCLUDES=-DDEVELOPMENT
80   DEBUG_CFLAGS="-g"
81 else
82   DEBUG_INCLUDES=-DNDEBUG
83   DEBUG_CFLAGS=
85 AC_SUBST(DEBUG_INCLUDES)
86 AC_SUBST(DEBUG_CFLAGS)
88 dnl Checks for typedefs, structures, and compiler characteristics.
89 AC_HEADER_STDBOOL
90 AC_C_CONST
91 AC_C_INLINE
92 AC_TYPE_PID_T
94 AC_PATH_XTRA
96 dnl Checks for library functions.
97 AC_FUNC_FORK
98 AC_FUNC_MEMCMP
99 AC_FUNC_STAT
100 AC_CHECK_FUNCS([atexit gethostbyname inet_ntoa mkdir pow socket sqrt strchr strcspn strstr poll])
102 AC_CONFIG_FILES(
103   Makefile 
104   src/Makefile 
105   src/gtk-gui/Makefile
106   data/Makefile 
107   doc/Makefile)
109 AC_OUTPUT