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.3.0-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"
30 if test "$AR" = "" ; then
31 AC_MSG_ERROR([Couldn't find ar])
37 AC_CHECK_PROGS(XGETTEXT, [xgettext xgettext.exe])
38 if test -n "$XGETTEXT" ; then
39 AC_MSG_CHECKING([if xgettext supports lisp])
40 if echo '(gettext "test")' | xgettext -o - -L Lisp - >& /dev/null; then
44 AC_MSG_WARN([It seems your gettext installation is too old, try updating it])
52 AC_CHECK_PROGS([BISON], [bison bison.exe])
55 dnl Checks for header files.
58 AC_CHECK_HEADERS(unistd.h)
60 dnl Checks for typedefs, structures, and compiler characteristics.
63 AC_CHECK_SIZEOF([void *])
65 #if SIZEOF_VOID_P == 8
70 dnl ===========================================================================
71 dnl Give advanced users some options to play with
74 AC_MSG_CHECKING([for build variant])
77 AC_HELP_STRING([--enable-gprof], [enable GNU profiling support]),
78 [enable_gprof=$enableval], [enable_gprof=no])
79 if test "$enable_gprof" = "yes"; then
84 AC_HELP_STRING([--enable-debug], [enable debugging mode]),
85 [enable_debug=$enableval], [enable_debug=no])
86 if test "$enable_debug" = "yes"; then
87 AC_DEFINE([DEBUG], 1, [define to compile in debug checks])
93 AC_MSG_RESULT([$VARIANT])
96 AC_HELP_STRING([--enable-sqdbg], [enable squirrel remote debugger]),
97 [enable_sqdbg=$enableval], [enable_sqdbg=no])
98 if test "$enable_sqdbg" = "yes"; then
99 AC_DEFINE([ENABLE_SQDBG], 1, [define if sqdbg should be enabled])
100 AC_SUBST([enable_sqdbg])
107 AC_SUBST([ICONV_LIBS], [$LIBICONV])
109 dnl ===========================================================================
110 dnl Check for libcurl
113 AC_SUBST([LIBCURL_LIBS], [$LIBCURL])
115 dnl ===========================================================================
118 AM_PATH_SDL($SDL_VERSION,
120 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
122 XIPH_PATH_VORBIS(, [AC_MSG_ERROR([Please install libvorbis])])
123 XIPH_PATH_OGG(, [AC_MSG_ERROR([Please install libogg])])
125 NP_FINDLIB([SDLIMAGE], [SDL_image], [SDL_image >= 1.2],
126 NP_LANG_PROGRAM([#include <SDL_image.h>], [IMG_Load("");]),
129 [AC_MSG_ERROR([Please install SDLImage >= 1.2.1])],
130 [$SDL_CFLAGS], [$SDL_LIBS])
132 NP_FINDLIB([PHYSFS], [physfs], [physfs >= 1.0.0],
136 #if PHYSFS_VER_MAJOR < 1
137 # error PHYSFS is too old
141 [AC_MSG_ERROR([Please install physfs >= 1.0])])
143 if test "x`uname -s`" = "xDarwin"; then
144 allib="-framework OpenAL"
149 NP_FINDLIB([OPENAL], [OpenAL], [OpenAL],
150 NP_LANG_PROGRAM([#include <AL/al.h>],
151 [alcOpenDevice(0);]),
154 [AC_MSG_ERROR([Please intall OpenAL])],
158 if test "$no_gl" = "yes"; then
159 AC_MSG_ERROR([Please install opengl libraries and headers])
162 dnl Checks for library functions.
163 AC_CHECK_FUNCS(mkdir strdup strstr)
166 AC_CONFIG_FILES([Jamconfig])
171 echo " NOTE: This project uses jam (and not make) as build tool"