-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
81 lines (70 loc) · 1.71 KB
/
configure.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
73
74
75
76
77
78
79
80
81
dnl Process this file with autoconf to produce a configure script.
AC_INIT(README.SDL)
dnl Setup for automake
AM_INIT_AUTOMAKE(sdlquake, 1.0.9)
dnl Detect the canonical target build environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl Check for tools
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_INSTALL
dnl The alpha architecture needs special flags for binary portability
AC_CANONICAL_TARGET
case "$target" in
i686-*-linux*)
CFLAGS="-g -mpentiumpro -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
#CFLAGS="-g -mpentiumpro -O6 -ffast-math -funroll-loops -fexpensive-optimizations"
;;
alpha*-*-linux*)
CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
;;
esac
dnl Figure out which math and networking libraries to use
case "$target" in
*-*-mingw32*)
MATHLIB=""
INETLIB="-lwsock32"
;;
*-*-beos*)
MATHLIB=""
INETLIB=""
;;
*)
MATHLIB="-lm"
INETLIB=""
;;
esac
AC_SUBST(MATHLIB)
AC_SUBST(INETLIB)
dnl Check for SDL
SDL_VERSION=1.0.1
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CFLAGS="$CFLAGS $SDL_CFLAGS -DSDL"
LIBS="$LIBS $SDL_LIBS"
dnl Set up the icon object file, for Mingw32
case "$target" in
*-*-mingw32*)
cp ico_o ico.o
ICONOBJ="ico.o"
;;
*)
ICONOBJ=""
;;
esac
AC_SUBST(ICONOBJ)
dnl Enable/disable the i686 asm
AC_ARG_ENABLE(asm,
[ --enable-asm enable i686 assembly routines [default=no]],
, enable_asm=no)
if test x$enable_asm = xyes; then
CFLAGS="$CFLAGS -DUSE_ASM"
fi
CFLAGS="$CFLAGS -DELF"
# Finally create all the generated files
AC_OUTPUT([
Makefile
])