1 dnl ===========================================================================
4 dnl author: Duong-Khang NGUYEN
5 dnl neoneurone@users.sf.net
6 dnl ===========================================================================
8 dnl Process this file with autoconf to produce a configure script.
10 AC_INIT(src/supertux.c)
12 dnl Setup for automake
14 AM_INIT_AUTOMAKE(SuperTux, "0.0.6 cvs")
19 dnl Checks for programs.
21 dnl ===========================================================================
22 dnl Give advanced users some options to play with
25 [ --enable-gprof enable GNU profiling support],)
26 if test "x${enable_gprof}" = "xyes"; then
33 [ --enable-debug enable debugging mode],)
34 if test "x${enable_debug}" = "xyes"; then
35 enable_debug="-DDEBUG"
40 dnl ===========================================================================
42 AM_PATH_SDL($SDL_VERSION,
44 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
47 dnl ===========================================================================
48 dnl Define the necessary FLAGS
49 LDFLAGS="-L/usr/X11R6/lib"
51 dnl Checks for libraries.
52 AC_CHECK_LIB(SDL_mixer, SDL_OpenAudio, ,AC_MSG_ERROR(SDL_mixer library required))
53 AC_CHECK_LIB(SDL_image, IMG_Load, ,AC_MSG_ERROR(SDL_image library required))
54 AC_CHECK_LIB(GL, glBegin, ,AC_MSG_ERROR(GL library required))
56 CFLAGS="-DDATA_PREFIX=\\\"$PWD/data\\\" -DLINUX ${enable_debug} ${enable_gprof}"
57 CFLAGS="$CFLAGS $SDL_CFLAGS"
58 LDFLAGS="$LDFLAGS $SDL_LIBS"
62 dnl Checks for header files.
65 AC_CHECK_HEADERS(unistd.h)
67 dnl Checks for typedefs, structures, and compiler characteristics.
70 dnl Checks for library functions.
71 AC_CHECK_FUNCS(mkdir strdup strstr)
73 AC_OUTPUT(src/Makefile Makefile)