Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5131 | clevermous | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_INIT(README.SDL) |
||
3 | |||
4 | dnl Setup for automake |
||
5 | AM_INIT_AUTOMAKE(sdlquake, 1.0.9) |
||
6 | |||
7 | dnl Detect the canonical target build environment |
||
8 | AC_CANONICAL_HOST |
||
9 | AC_CANONICAL_TARGET |
||
10 | |||
11 | dnl Check for tools |
||
12 | |||
13 | AC_PROG_MAKE_SET |
||
14 | AC_PROG_CC |
||
15 | AC_PROG_INSTALL |
||
16 | |||
17 | dnl The alpha architecture needs special flags for binary portability |
||
18 | AC_CANONICAL_TARGET |
||
19 | case "$target" in |
||
20 | i686-*-linux*) |
||
21 | CFLAGS="-g -mpentiumpro -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations" |
||
22 | #CFLAGS="-g -mpentiumpro -O6 -ffast-math -funroll-loops -fexpensive-optimizations" |
||
23 | ;; |
||
24 | alpha*-*-linux*) |
||
25 | CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall" |
||
26 | ;; |
||
27 | esac |
||
28 | |||
29 | dnl Figure out which math and networking libraries to use |
||
30 | case "$target" in |
||
31 | *-*-mingw32*) |
||
32 | MATHLIB="" |
||
33 | INETLIB="-lwsock32" |
||
34 | ;; |
||
35 | *-*-beos*) |
||
36 | MATHLIB="" |
||
37 | INETLIB="" |
||
38 | ;; |
||
39 | *) |
||
40 | MATHLIB="-lm" |
||
41 | INETLIB="" |
||
42 | ;; |
||
43 | esac |
||
44 | AC_SUBST(MATHLIB) |
||
45 | AC_SUBST(INETLIB) |
||
46 | |||
47 | dnl Check for SDL |
||
48 | SDL_VERSION=1.0.1 |
||
49 | AM_PATH_SDL($SDL_VERSION, |
||
50 | :, |
||
51 | AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
||
52 | ) |
||
53 | CFLAGS="$CFLAGS $SDL_CFLAGS -DSDL" |
||
54 | LIBS="$LIBS $SDL_LIBS" |
||
55 | |||
56 | dnl Set up the icon object file, for Mingw32 |
||
57 | case "$target" in |
||
58 | *-*-mingw32*) |
||
59 | cp ico_o ico.o |
||
60 | ICONOBJ="ico.o" |
||
61 | ;; |
||
62 | *) |
||
63 | ICONOBJ="" |
||
64 | ;; |
||
65 | esac |
||
66 | AC_SUBST(ICONOBJ) |
||
67 | |||
68 | dnl Enable/disable the i686 asm |
||
69 | AC_ARG_ENABLE(asm, |
||
70 | [ --enable-asm enable i686 assembly routines [default=no]], |
||
71 | , enable_asm=no) |
||
72 | if test x$enable_asm = xyes; then |
||
73 | CFLAGS="$CFLAGS -DUSE_ASM" |
||
74 | fi |
||
75 | |||
76 | CFLAGS="$CFLAGS -DELF" |
||
77 | |||
78 | # Finally create all the generated files |
||
79 | AC_OUTPUT([ |
||
80 | Makefile |
||
81 | ]) |