1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(crack-attack,1.1.10,lorien420@myrealbox.com)
4 AC_CONFIG_SRCDIR(src/Attack.cxx)
6 AM_CONFIG_HEADER(src/config.h)
8 dnl Checks for programs.
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.
35 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h string.h sys/socket.h unistd.h])
39 AC_HELP_STRING([--enable-gtk=[yes/no]],[Use gtk front-end [default=yes]]),
40 enable_gtk="$enableval",
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])
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
56 AC_HELP_STRING([--enable-sound=[yes/no]],
57 [Play sounds and music during game[default=yes]]),
58 enable_sound="$enableval",
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],
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;)
70 AM_CONDITIONAL([AUDIO_ENABLED], [test "$enable_sound" = yes])
73 dnl Check for debugging
75 AC_HELP_STRING([--enable-debug=[no/yes]],[Compile extra debugging info [default=no]]),
76 enable_debug="$enableval",
78 if test "$enable_debug" = "yes"; then
79 DEBUG_INCLUDES=-DDEVELOPMENT
82 DEBUG_INCLUDES=-DNDEBUG
85 AC_SUBST(DEBUG_INCLUDES)
86 AC_SUBST(DEBUG_CFLAGS)
88 dnl Checks for typedefs, structures, and compiler characteristics.
96 dnl Checks for library functions.
100 AC_CHECK_FUNCS([atexit gethostbyname inet_ntoa mkdir pow socket sqrt strchr strcspn strstr poll])