File: configure.in

package info (click to toggle)
bumprace 1.5.4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,824 kB
  • sloc: sh: 3,743; ansic: 2,738; objc: 224; makefile: 51
file content (64 lines) | stat: -rw-r--r-- 1,528 bytes parent folder | download | duplicates (3)
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
######## Process this file with autoconf to produce a configure script.
AC_INIT(README)

######## Detect the canonical host and target build environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET

######## Setup for automake
NAME="bumprace"
SDL_VERSION=1.1.5
AM_INIT_AUTOMAKE($NAME, 1.5.4)

######## Check for tools
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB

######## Check for compiler environment
AC_C_CONST

######## Figure out which math library to use
case "$target" in
    *-*-mingw32*)
        MATHLIB=""
        ;;
    *-*-beos*)
        MATHLIB=""
        ;;
    *)
        MATHLIB="-lm"
	AC_CHECK_LIB(m, main, , AC_MSG_ERROR(Your system is missing libm (mathlib)!))
        ;;
esac
AC_SUBST(MATHLIB)

######## Check for SDL
AM_PATH_SDL($SDL_VERSION,
            :,
	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)

######## Check for other libs
AC_CHECK_LIB(jpeg, main, , AC_MSG_ERROR(Your system is missing libjpeg!))

#Commented out because of a bug in the SuSE 6.2
#AC_CHECK_LIB(png, main, , AC_MSG_ERROR(Your system is missing libpng!))

AC_CHECK_LIB(SDL_mixer, main, SOUND="-lSDL_mixer";CFLAGS="$CFLAGS -DSOUND")
AC_CHECK_LIB(SDL_image, main, , AC_MSG_ERROR(Your system is missing libSDL_image!))

######## Set compiler flags and libraries
CFLAGS="$CFLAGS $SDL_CFLAGS -DDATADIR=\\\"$datadir/bumprace\\\""
LIBS="$LIBS $SDL_LIBS -lSDL_image $SOUND -lz -lSDL"

######## Check for headers


######## Finally create all the generated files
AC_OUTPUT([
Makefile
src/Makefile
data/Makefile
data/gfx/Makefile
])