1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(crack-attack,1.1.12-r1,lorien420@myrealbox.com)
4 AC_CONFIG_SRCDIR(src/Attack.cxx)
6 AM_CONFIG_HEADER(src/config.h)
9 dnl Checks for programs.
18 dnl BinReloc source additions
19 AM_CONDITIONAL([WANT_BINRELOC], [test "$br_cv_binreloc" = "yes"])
21 dnl Checks for libraries.
22 # FIXME: Replace `main' with a function in `-lGL':
23 AC_CHECK_LIB([GL], [glBegin])
24 # FIXME: Replace `main' with a function in `-lGLU':
25 AC_CHECK_LIB([GLU], [gluLookAt])
26 # I don't know how to check these.
27 # FIXME: Replace `main' with a function in `-lX11':
28 #AC_CHECK_LIB([X11], [main])
29 # FIXME: Replace `main' with a function in `-lXi':
30 #AC_CHECK_LIB([Xi], [main])
31 # FIXME: Replace `main' with a function in `-lXmu':
32 #AC_CHECK_LIB([Xmu], [main])
33 # FIXME: Replace `main' with a function in `-lglut':
34 AC_CHECK_LIB([glut], [glutInit])
36 dnl Checks for header files.
39 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h string.h sys/socket.h unistd.h])
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 SDL_mixer
60 AC_HELP_STRING([--enable-sound=[yes/no]],
61 [Play sounds and music during game[default=yes]]),
62 enable_sound="$enableval",
64 if test "$enable_sound" = "yes"; then
65 AM_PATH_SDL(1.2.0,, AC_MSG_ERROR([libSDL is needed]))
66 AC_CHECK_LIB([SDL_mixer],
68 AC_MSG_RESULT("SDL_mixer found"); SOUND_LIBS="-lSDL_mixer"; enable_sound=no;,
69 AC_MSG_RESULT("SDL_mixer not found"); SOUND_LIBS=""; enable_sound=no;)
74 AM_CONDITIONAL([AUDIO_ENABLED], [test "$enable_sound" = yes])
77 dnl Check for debugging
79 AC_HELP_STRING([--enable-debug=[no/yes]],[Compile extra debugging info [default=no]]),
80 enable_debug="$enableval",
82 if test "$enable_debug" = "yes"; then
83 DEBUG_INCLUDES=-DDEVELOPMENT
86 DEBUG_INCLUDES=-DNDEBUG
89 AC_SUBST(DEBUG_INCLUDES)
90 AC_SUBST(DEBUG_CFLAGS)
92 dnl Checks for typedefs, structures, and compiler characteristics.
100 dnl Checks for library functions.
104 AC_CHECK_FUNCS([atexit gethostbyname inet_ntoa mkdir pow socket sqrt strchr strcspn strstr poll])
112 autopackage/default.apspec)