1 dnl ===========================================================================
5 dnl SuperTux development team
9 dnl neoneurone@users.sf.net
10 dnl ===========================================================================
12 dnl Process this file with autoconf to produce a configure script.
14 AC_INIT(supertux, 0.2-svn)
15 AC_CONFIG_SRCDIR([src/main.cpp])
16 AC_CONFIG_AUX_DIR([mk/autoconf])
19 AC_CONFIG_HEADERS(config.h)
21 # we don't want the stupid autoconf default -g -O2
22 test ".$CXXFLAGS" = "." && CXXFLAGS=" "
24 CXXFLAGS="$CXXFLAGS -ffast-math"
32 AC_CHECK_PROGS(XGETTEXT, [xgettext xgettext.exe])
33 if test -n "$XGETTEXT" ; then
34 AC_MSG_CHECKING([if xgettext supports lisp])
35 if echo '(gettext "test")' | xgettext -o - -L Lisp - >& /dev/null; then
39 AC_MSG_WARN([It seems your gettext installation is too old, try updating it])
47 AC_CHECK_PROGS([BISON], [bison bison.exe])
50 dnl Checks for header files.
53 AC_CHECK_HEADERS(unistd.h)
55 dnl Checks for typedefs, structures, and compiler characteristics.
58 dnl ===========================================================================
59 dnl Give advanced users some options to play with
62 AC_MSG_CHECKING(for gprof mode)
64 AC_HELP_STRING([--enable-gprof], [enable GNU profiling support]),
65 [enable_gprof=$enableval], [enable_gprof=no])
66 if test "$enable_gprof" = "yes"; then
67 #CXXFLAGS="$CXXFLAGS -pg"
69 AC_MSG_RESULT([enabled])
71 AC_MSG_RESULT([disabled])
74 AC_MSG_CHECKING(for debug mode)
76 AC_HELP_STRING([--enable-debug], [enable debugging mode]),
77 [enable_debug=$enableval], [enable_debug=no])
78 if test "$enable_debug" = "yes"; then
79 AC_DEFINE([DEBUG], 1, [define to compile in debug checks])
81 AC_MSG_RESULT([enabled])
84 AC_MSG_RESULT([disabled])
91 AC_SUBST([ICONV_LIBS], [$LIBICONV])
93 dnl ===========================================================================
96 AM_PATH_SDL($SDL_VERSION,
98 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
100 XIPH_PATH_VORBIS(, [AC_MSG_ERROR([Please install libvorbis])])
101 XIPH_PATH_OGG(, [AC_MSG_ERROR([Please install libogg])])
103 NP_FINDLIB([SDLIMAGE], [SDL_image], [SDL_image >= 1.2],
104 NP_LANG_PROGRAM([#include <SDL_image.h>], [IMG_Load("");]),
107 [AC_MSG_ERROR([Please install SDLImage >= 1.2.1])],
108 [$SDL_CFLAGS], [$SDL_LIBS])
110 NP_FINDLIB([PHYSFS], [physfs], [physfs >= 1.0.0],
114 #if PHYSFS_VER_MAJOR < 1
115 # error PHYSFS is too old
119 [AC_MSG_ERROR([Please install physfs >= 1.0])])
121 NP_FINDLIB([OPENAL], [OpenAL], [OpenAL],
122 NP_LANG_PROGRAM([#include <AL/al.h>],
123 [alcOpenDevice(0);]),
126 [AC_MSG_ERROR([Please intall OpenAL])],
130 if test "$no_gl" = "yes"; then
131 AC_MSG_ERROR([Please install opengl libraries and headers])
134 dnl Checks for library functions.
135 AC_CHECK_FUNCS(mkdir strdup strstr)
138 AC_CONFIG_FILES([Jamconfig])
145 echo " Profile Mode: $enable_gprof"
146 echo " Debug Mode: $enable_debug"
149 echo " NOTE: This project uses jam (and not make) as build tool"