1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(crack-attack,1.1.14-cvs,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])
37 dnl BinReloc source additions
39 AM_CONDITIONAL([WANT_BINRELOC], [test "$br_cv_binreloc" = "yes"])
43 AC_HELP_STRING([--enable-gtk=[yes/no]],[Use gtk front-end [default=yes]]),
44 enable_gtk="$enableval",
46 if test "$enable_gtk" = "yes"; then
47 pkg_modules="gtk+-2.0 >= 2.0.0"
48 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
49 AC_DEFINE([WANT_GTK], [], [Wants to compile gtk front-end])
54 AC_SUBST(PACKAGE_CFLAGS)
55 AC_SUBST(PACKAGE_LIBS)
56 AM_CONDITIONAL([WANT_GTK], [test "$enable_gtk" = yes])
58 dnl Check for sound support
60 AC_HELP_STRING([--enable-sound=[yes/no]],
61 [Play sounds and music during game [default=yes]]),
62 enable_sound="$enableval",
66 if test "$enable_sound" != "no"; then
70 AC_CHECK_LIB([SDL_mixer],
78 if test "$enable_sound" == "yes" -a "$found_sound" == "no"; then
79 AC_MSG_ERROR(libSDL and SDL_mixer are required for sound)
81 if test "$found_sound" == "yes"; then
82 AUDIO_CFLAGS="$SDL_CFLAGS"
83 AUDIO_LIBS="$SDL_LIBS -lSDL_mixer"
84 AC_DEFINE(AUDIO_ENABLED, 1, [Has audio support])
87 AC_SUBST(AUDIO_CFLAGS)
89 AM_CONDITIONAL([AUDIO_ENABLED], [test "$found_sound" = "yes"])
92 dnl Check for debugging
94 AC_HELP_STRING([--enable-debug=[no/yes]],[Compile extra debugging info [default=no]]),
95 enable_debug="$enableval",
97 if test "$enable_debug" = "yes"; then
98 DEBUG_INCLUDES=-DDEVELOPMENT
99 DEBUG_CFLAGS="-g -Wall -pedantic"
101 DEBUG_INCLUDES=-DNDEBUG
104 AC_SUBST(DEBUG_INCLUDES)
105 AC_SUBST(DEBUG_CFLAGS)
107 dnl Checks for typedefs, structures, and compiler characteristics.
115 dnl Checks for library functions.
119 AC_CHECK_FUNCS([atexit gethostbyname inet_ntoa mkdir pow socket sqrt strchr strcspn strstr poll])
127 autopackage/default.apspec)