Skip to content

Latest commit

 

History

History
83 lines (71 loc) · 1.58 KB

configure.in

File metadata and controls

83 lines (71 loc) · 1.58 KB
 
Apr 26, 2001
Apr 26, 2001
1
2
3
4
dnl Process this file with autoconf to produce a configure script.
AC_INIT(README)
dnl Setup for automake
Jan 31, 2004
Jan 31, 2004
5
SDL_VERSION=1.2.7
Apr 26, 2001
Apr 26, 2001
6
7
dnl Detect the canonical host and target build environment
Nov 17, 2004
Nov 17, 2004
8
AC_CANONICAL_SYSTEM
Apr 26, 2001
Apr 26, 2001
9
Jun 10, 2001
Jun 10, 2001
10
11
12
dnl Setup for automake
AM_INIT_AUTOMAKE(SDL_tests, $SDL_VERSION)
Apr 26, 2001
Apr 26, 2001
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
dnl Check for tools
AC_PROG_CC
dnl Check for compiler environment
AC_C_CONST
dnl Figure out which math library to use
case "$target" in
*-*-cygwin* | *-*-mingw32*)
MATHLIB=""
SYS_GL_LIBS="-lopengl32"
;;
*-*-beos*)
MATHLIB=""
SYS_GL_LIBS="-lGL"
;;
Nov 20, 2004
Nov 20, 2004
31
*-*-darwin* | *-*-mint* )
Apr 26, 2001
Apr 26, 2001
32
33
34
35
36
37
MATHLIB=""
SYS_GL_LIBS=""
;;
*-*-aix*)
if test x$ac_cv_prog_gcc = xyes; then
CFLAGS="-mthreads"
Nov 17, 2004
Nov 17, 2004
38
fi
Apr 26, 2001
Apr 26, 2001
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
SYS_GL_LIBS=""
;;
*)
MATHLIB="-lm"
AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
SYS_GL_LIBS="$X_LIBS -lGL"
else
SYS_GL_LIBS="-lGL"
fi
;;
esac
AC_SUBST(MATHLIB)
dnl Check for SDL
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl Check for OpenGL
AC_MSG_CHECKING(for OpenGL support)
have_opengl=no
AC_TRY_COMPILE([
Mar 5, 2002
Mar 5, 2002
68
#include "SDL_opengl.h"
Apr 26, 2001
Apr 26, 2001
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
],[
],[
have_opengl=yes
])
AC_MSG_RESULT($have_opengl)
if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GL_LIBS="$SYS_GL_LIBS"
else
GL_LIBS=""
fi
AC_SUBST(GL_LIBS)
# Finally create all the generated files
AC_OUTPUT([Makefile])