bad_guy vs. player collision fixes.
[supertux.git] / configure.in
1 dnl ===========================================================================
2 dnl    "configure.in"
3 dnl
4 dnl author: Duong-Khang NGUYEN
5 dnl         neoneurone@users.sf.net
6 dnl ===========================================================================
7
8 dnl Process this file with autoconf to produce a configure script.
9
10 AC_INIT(src/supertux.c)
11
12 dnl Setup for automake
13 SDL_VERSION=1.2.5
14 AM_INIT_AUTOMAKE(SuperTux, "0.0.6 cvs")
15
16 CC=gcc
17 AC_SUBST(CC)
18
19 dnl Checks for programs.
20
21 dnl ===========================================================================
22 dnl Give advanced users some options to play with
23
24 AC_ARG_ENABLE(gprof,
25               [  --enable-gprof          enable GNU profiling support],)
26 if test "x${enable_gprof}" = "xyes"; then
27         enable_gprof="-pg"
28 else
29         unset enable_gprof
30 fi
31
32 AC_ARG_ENABLE(debug,
33               [  --enable-debug          enable debugging mode],)
34 if test "x${enable_debug}" = "xyes"; then
35         enable_debug="-DDEBUG"
36 else
37         unset enable_debug
38 fi
39
40 dnl ===========================================================================
41 dnl Check for SDL
42 AM_PATH_SDL($SDL_VERSION,
43             :,
44             AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
45 )
46
47 dnl ===========================================================================
48 dnl Define the necessary FLAGS
49 LDFLAGS="-L/usr/X11R6/lib"
50
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))
55
56 CFLAGS="-DDATA_PREFIX=\\\"$PWD/data\\\" -DLINUX ${enable_debug} ${enable_gprof}"
57 CFLAGS="$CFLAGS $SDL_CFLAGS"
58 LDFLAGS="$LDFLAGS $SDL_LIBS"
59 dnl AC_SUBST(CFLAGS)
60 dnl AC_SUBST(LDFLAGS)
61
62 dnl Checks for header files.
63 AC_HEADER_DIRENT
64 AC_HEADER_STDC
65 AC_CHECK_HEADERS(unistd.h)
66
67 dnl Checks for typedefs, structures, and compiler characteristics.
68 AC_C_CONST
69
70 dnl Checks for library functions.
71 AC_CHECK_FUNCS(mkdir strdup strstr)
72
73 AC_OUTPUT(src/Makefile Makefile)