-
Notifications
You must be signed in to change notification settings - Fork 48
/
configure.in.in
72 lines (66 loc) · 1.5 KB
/
configure.in.in
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
65
66
67
68
69
70
71
72
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/nofrendo.c)
AM_INIT_AUTOMAKE(nofrendo, 1.9)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_RANLIB
AC_STDC_HEADERS
AC_PROG_MAKE_SET
AC_CHECK_LIB(z, gzopen,
[
CFLAGS="$CFLAGS -DZLIB"
LDFLAGS="$LDFLAGS -lz"
],
[])
dnl Require SDL 1.2 just because it's the new stable version, and it's what I have
dnl oh, and the blitters are a lot faster than in older SDL 1.1 releases
NO_PATH_SDL([1.2.0], [],
[
AC_MSG_ERROR(I pity da foo who don't have SDL 1.2)
])
dnl hook for portability
case "$target" in
*beos*) SYSTEM=beos ;;
*win*) SYSTEM=win32 ;;
dnl hope for the best
*) SYSTEM=unix
esac
AC_SUBST(SYSTEM)
dnl debug option
AC_ARG_ENABLE(debug,
[ --enable-debug Turn on debugging (default: no)],
[case "${enableval}" in
yes)
debug=true
CFLAGS="$CFLAGS -DDEBUG -W -Wall -g"
CFLAGS=`echo $CFLAGS | sed "s/-O2//"`
;;
no)
debug=false
CFLAGS="$CFLAGS -DNDEBUG"
;;
*)
AC_MSG_ERROR(bad value ${enableval} for --enable-debug)
;;
esac
],
[
CFLAGS="$CFLAGS -DNDEBUG"
])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
AC_ARG_ENABLE(optimize,
[ --enable-optimize Turn on optimizations (default: no)],
[case "${enableval}" in
yes)
optimize=true
CFLAGS="$CFLAGS -O3 -mpentiumpro -fstrict-aliasing -fomit-frame-pointer -ffast-math -fexpensive-optimizations -funroll-loops"
;;
no)
;;
*)
AC_MSG_ERROR(bad value ${enableval} for --enable-optimize)
;;
esac
],
[])