Mercurial > sdl-ios-xcode
comparison test/configure.in @ 1380:d94b080ff6ce
Completely removed dependency on automake
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 20 Feb 2006 02:09:49 +0000 |
parents | e440d5c488c1 |
children | 835c1831f903 |
comparison
equal
deleted
inserted
replaced
1379:c0a74f199ecf | 1380:d94b080ff6ce |
---|---|
1 dnl Process this file with autoconf to produce a configure script. | 1 dnl Process this file with autoconf to produce a configure script. |
2 AC_INIT(README) | 2 AC_INIT(README) |
3 | 3 |
4 dnl Setup for automake | |
5 SDL_VERSION=1.2.7 | |
6 | |
7 dnl Detect the canonical host and target build environment | 4 dnl Detect the canonical host and target build environment |
5 AC_CONFIG_AUX_DIRS($srcdir/../build-scripts) | |
8 AC_CANONICAL_SYSTEM | 6 AC_CANONICAL_SYSTEM |
9 | |
10 dnl Setup for automake | |
11 AM_INIT_AUTOMAKE(SDL_tests, $SDL_VERSION) | |
12 | 7 |
13 dnl Check for tools | 8 dnl Check for tools |
14 | 9 |
15 AC_PROG_CC | 10 AC_PROG_CC |
16 | 11 |
17 dnl Check for compiler environment | 12 dnl Check for compiler environment |
18 | 13 |
19 AC_C_CONST | 14 AC_C_CONST |
20 | 15 |
21 FIXME: add math library for testsprite | |
22 | |
23 dnl Figure out which math library to use | 16 dnl Figure out which math library to use |
24 case "$target" in | 17 case "$target" in |
25 *-*-cygwin* | *-*-mingw32*) | 18 *-*-cygwin* | *-*-mingw32*) |
19 EXE=".exe" | |
26 MATHLIB="" | 20 MATHLIB="" |
27 SYS_GL_LIBS="-lopengl32" | 21 SYS_GL_LIBS="-lopengl32" |
28 ;; | 22 ;; |
29 *-*-beos*) | 23 *-*-beos*) |
24 EXE="" | |
30 MATHLIB="" | 25 MATHLIB="" |
31 SYS_GL_LIBS="-lGL" | 26 SYS_GL_LIBS="-lGL" |
32 ;; | 27 ;; |
33 *-*-darwin* ) | 28 *-*-darwin* ) |
29 EXE="" | |
34 MATHLIB="" | 30 MATHLIB="" |
35 SYS_GL_LIBS="" | 31 SYS_GL_LIBS="" |
36 ;; | 32 ;; |
37 *-*-aix*) | 33 *-*-aix*) |
34 EXE="" | |
38 if test x$ac_cv_prog_gcc = xyes; then | 35 if test x$ac_cv_prog_gcc = xyes; then |
39 CFLAGS="-mthreads" | 36 CFLAGS="-mthreads" |
40 fi | 37 fi |
41 SYS_GL_LIBS="" | 38 SYS_GL_LIBS="" |
42 ;; | 39 ;; |
43 *-*-mint*) | 40 *-*-mint*) |
41 EXE="" | |
44 MATHLIB="" | 42 MATHLIB="" |
45 AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no) | 43 AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no) |
46 if test "x$OSMESA_CONFIG" = "xyes"; then | 44 if test "x$OSMESA_CONFIG" = "xyes"; then |
47 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags` | 45 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags` |
48 OSMESA_LIBS=`$OSMESA_CONFIG --libs` | 46 OSMESA_LIBS=`$OSMESA_CONFIG --libs` |
51 else | 49 else |
52 SYS_GL_LIBS="-lOSMesa" | 50 SYS_GL_LIBS="-lOSMesa" |
53 fi | 51 fi |
54 ;; | 52 ;; |
55 *) | 53 *) |
54 EXE="" | |
56 MATHLIB="-lm" | 55 MATHLIB="-lm" |
57 AC_PATH_X | 56 SYS_GL_LIBS="-lGL" |
58 AC_PATH_XTRA | |
59 if test x$have_x = xyes; then | |
60 CFLAGS="$CFLAGS $X_CFLAGS" | |
61 SYS_GL_LIBS="$X_LIBS -lGL" | |
62 else | |
63 SYS_GL_LIBS="-lGL" | |
64 fi | |
65 ;; | 57 ;; |
66 esac | 58 esac |
59 AC_SUBST(EXE) | |
67 AC_SUBST(MATHLIB) | 60 AC_SUBST(MATHLIB) |
68 | 61 |
69 dnl Check for SDL | 62 dnl Check for SDL |
70 | 63 SDL_VERSION=1.2.7 |
71 AM_PATH_SDL($SDL_VERSION, | 64 AM_PATH_SDL($SDL_VERSION, |
72 :, | 65 :, |
73 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) | 66 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
74 ) | 67 ) |
75 CFLAGS="$CFLAGS $SDL_CFLAGS" | 68 CFLAGS="$CFLAGS $SDL_CFLAGS" |
85 have_opengl=yes | 78 have_opengl=yes |
86 ]) | 79 ]) |
87 AC_MSG_RESULT($have_opengl) | 80 AC_MSG_RESULT($have_opengl) |
88 if test x$have_opengl = xyes; then | 81 if test x$have_opengl = xyes; then |
89 CFLAGS="$CFLAGS -DHAVE_OPENGL" | 82 CFLAGS="$CFLAGS -DHAVE_OPENGL" |
90 GL_LIBS="$SYS_GL_LIBS" | 83 GLLIB="$SYS_GL_LIBS" |
91 else | 84 else |
92 GL_LIBS="" | 85 GLLIB="" |
93 fi | 86 fi |
94 AC_SUBST(GL_LIBS) | 87 AC_SUBST(GLLIB) |
95 | 88 |
96 # Finally create all the generated files | 89 dnl Finally create all the generated files |
97 AC_OUTPUT([Makefile]) | 90 AC_OUTPUT([Makefile]) |