1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(crack-attack,1.1.14,lorien420@myrealbox.com)
AC_CONFIG_SRCDIR(src/Attack.cxx)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(src/config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl Checks for libraries.
# FIXME: Replace `main' with a function in `-lGL':
AC_CHECK_LIB([GL], [glBegin])
# FIXME: Replace `main' with a function in `-lGLU':
AC_CHECK_LIB([GLU], [gluLookAt])
# I don't know how to check these.
# FIXME: Replace `main' with a function in `-lX11':
#AC_CHECK_LIB([X11], [main])
# FIXME: Replace `main' with a function in `-lXi':
#AC_CHECK_LIB([Xi], [main])
# FIXME: Replace `main' with a function in `-lXmu':
#AC_CHECK_LIB([Xmu], [main])
# FIXME: Replace `main' with a function in `-lglut':
AC_CHECK_LIB([glut], [glutInit])
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h string.h sys/socket.h unistd.h])
dnl BinReloc source additions
AM_BINRELOC
AM_CONDITIONAL([WANT_BINRELOC], [test "$br_cv_binreloc" = "yes"])
dnl Check for gtk
AC_ARG_ENABLE(gtk,
AC_HELP_STRING([--enable-gtk=[yes/no]],[Use gtk front-end [default=yes]]),
enable_gtk="$enableval",
enable_gtk=yes)
if test "$enable_gtk" = "yes"; then
pkg_modules="gtk+-2.0 >= 2.0.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_DEFINE([WANT_GTK], [], [Wants to compile gtk front-end])
else
PACKAGE_CFLAGS=""
PACKAGE_LIBS=""
fi
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
AM_CONDITIONAL([WANT_GTK], [test "$enable_gtk" = yes])
dnl Check for sound support
AC_ARG_ENABLE(sound,
AC_HELP_STRING([--enable-sound=[yes/no]],
[Play sounds and music during game [default=yes]]),
enable_sound="$enableval",
enable_sound="no")
AUDIO_CFLAGS=""
AUDIO_LIBS=""
if test "$enable_sound" != "no"; then
found_sound="no"
AM_PATH_SDL(1.2.0,
[
AC_CHECK_LIB([SDL_mixer],
[Mix_OpenAudio],
[found_sound=yes],
[found_sound=no]
)
],[found_sound=no]
)
if test "$enable_sound" == "yes" -a "$found_sound" == "no"; then
AC_MSG_ERROR(libSDL and SDL_mixer are required for sound)
fi
if test "$found_sound" == "yes"; then
AUDIO_CFLAGS="$SDL_CFLAGS"
AUDIO_LIBS="$SDL_LIBS -lSDL_mixer"
AC_DEFINE(AUDIO_ENABLED, 1, [Has audio support])
fi
fi
AC_SUBST(AUDIO_CFLAGS)
AC_SUBST(AUDIO_LIBS)
AM_CONDITIONAL([AUDIO_ENABLED], [test "$found_sound" = "yes"])
dnl Check for debugging
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug=[no/yes]],[Compile extra debugging info [default=no]]),
enable_debug="$enableval",
enable_debug=no)
if test "$enable_debug" = "yes"; then
DEBUG_INCLUDES=-DDEVELOPMENT
DEBUG_CFLAGS="-g -Wall -pedantic"
else
DEBUG_INCLUDES=-DNDEBUG
DEBUG_CFLAGS=
fi
AC_SUBST(DEBUG_INCLUDES)
AC_SUBST(DEBUG_CFLAGS)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_PID_T
AC_PATH_XTRA
dnl Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MEMCMP
AC_FUNC_STAT
AC_CHECK_FUNCS([atexit gethostbyname inet_ntoa mkdir pow socket sqrt strchr strcspn strstr poll])
AC_CONFIG_FILES(
Makefile
src/Makefile
src/gtk-gui/Makefile
data/Makefile
doc/Makefile
autopackage/default.apspec)
AC_OUTPUT
|