Skip to content

Latest commit

 

History

History
200 lines (186 loc) · 5.51 KB

configure.in

File metadata and controls

200 lines (186 loc) · 5.51 KB
 
Aug 10, 2000
Aug 10, 2000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
dnl Process this file with autoconf to produce a configure script.
AC_INIT(README)
dnl Set various version strings - taken gratefully from the GTk sources
# Making releases:
# MICRO_VERSION += 1;
# INTERFACE_AGE += 1;
# BINARY_AGE += 1;
# if any functions have been added, set INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set BINARY_AGE and INTERFACE_AGE to 0.
MAJOR_VERSION=1
Apr 4, 2001
Apr 4, 2001
15
MINOR_VERSION=2
Dec 24, 2004
Dec 24, 2004
16
17
18
MICRO_VERSION=5
INTERFACE_AGE=4
BINARY_AGE=5
Aug 10, 2000
Aug 10, 2000
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(MICRO_VERSION)
AC_SUBST(INTERFACE_AGE)
AC_SUBST(BINARY_AGE)
AC_SUBST(VERSION)
# libtool versioning
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
LT_REVISION=$INTERFACE_AGE
LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
Aug 10, 2000
Aug 10, 2000
39
dnl Detect the canonical host and target build environment
Dec 2, 2005
Dec 2, 2005
40
AC_CANONICAL_SYSTEM
Aug 10, 2000
Aug 10, 2000
41
Jul 24, 2001
Jul 24, 2001
42
43
dnl Setup for automake
AM_INIT_AUTOMAKE(SDL_image, $VERSION)
Sep 5, 2002
Sep 5, 2002
44
AM_MAINTAINER_MODE
Jul 24, 2001
Jul 24, 2001
45
Aug 10, 2000
Aug 10, 2000
46
47
dnl Check for tools
Aug 10, 2000
Aug 10, 2000
48
49
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
Aug 10, 2000
Aug 10, 2000
50
51
AC_PROG_MAKE_SET
AC_PROG_CC
Mar 2, 2001
Mar 2, 2001
52
AC_C_INLINE
Aug 10, 2000
Aug 10, 2000
53
54
55
56
57
58
59
AC_PROG_INSTALL
dnl The alpha architecture needs special flags for binary portability
case "$target" in
alpha*-*-linux*)
CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
;;
Apr 5, 2001
Apr 5, 2001
60
61
62
*-*-beos*)
ac_default_prefix=/boot/develop/tools/gnupro
;;
Aug 10, 2000
Aug 10, 2000
63
64
*-*-cygwin* | *-*-mingw32*)
if test "$build" != "$target"; then # cross-compiling
Aug 20, 2001
Aug 20, 2001
65
# Default cross-compile location
Aug 10, 2000
Aug 10, 2000
66
ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
Aug 20, 2001
Aug 20, 2001
67
68
else
# Look for the location of the tools and install there
Jan 24, 2006
Jan 24, 2006
69
if test "$BUILD_PREFIX" != ""; then
Aug 20, 2001
Aug 20, 2001
70
71
ac_default_prefix=$BUILD_PREFIX
fi
Aug 10, 2000
Aug 10, 2000
72
73
fi
;;
Aug 10, 2000
Aug 10, 2000
74
75
76
esac
dnl Check for SDL
Apr 13, 2002
Apr 13, 2002
77
SDL_VERSION=1.2.4
Aug 10, 2000
Aug 10, 2000
78
79
80
81
82
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CFLAGS="$CFLAGS $SDL_CFLAGS"
Jan 26, 2003
Jan 26, 2003
83
LIBS="$LIBS $SDL_LIBS"
Aug 10, 2000
Aug 10, 2000
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
dnl Check command-line options
AC_ARG_ENABLE(bmp,
[ --enable-bmp support loading BMP images [default=yes]],
, enable_bmp=yes)
if test x$enable_bmp = xyes; then
CFLAGS="$CFLAGS -DLOAD_BMP"
fi
AC_ARG_ENABLE(gif,
[ --enable-gif support loading GIF images [default=yes]],
, enable_gif=yes)
if test x$enable_gif = xyes; then
CFLAGS="$CFLAGS -DLOAD_GIF"
fi
AC_ARG_ENABLE(jpg,
[ --enable-jpg support loading JPG images [default=yes]],
, enable_jpg=yes)
if test x$enable_jpg = xyes; then
AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, have_libjpeg=yes)
if test x$have_libjpeg = xyes; then
CFLAGS="$CFLAGS -DLOAD_JPG"
IMG_LIBS="$IMG_LIBS -ljpeg"
else
Jul 24, 2001
Jul 24, 2001
107
AC_MSG_WARN([
Aug 10, 2000
Aug 10, 2000
108
109
110
111
112
*** Unable to find JPEG library (http://www.ijg.org/)
])
AC_MSG_WARN([JPG image loading disabled])
fi
fi
Sep 23, 2001
Sep 23, 2001
113
114
115
116
117
118
AC_ARG_ENABLE(lbm,
[ --enable-lbm support loading LBM images [default=yes]],
, enable_lbm=yes)
if test x$enable_lbm = xyes; then
CFLAGS="$CFLAGS -DLOAD_LBM"
fi
Aug 10, 2000
Aug 10, 2000
119
120
121
122
123
124
125
126
127
128
129
130
131
AC_ARG_ENABLE(pcx,
[ --enable-pcx support loading PCX images [default=yes]],
, enable_pcx=yes)
if test x$enable_pcx = xyes; then
CFLAGS="$CFLAGS -DLOAD_PCX"
fi
AC_ARG_ENABLE(png,
[ --enable-png support loading PNG images [default=yes]],
, enable_png=yes)
if test x$enable_png = xyes; then
AC_CHECK_LIB(png, png_create_read_struct, have_libpng=yes, , -lz)
if test x$have_libpng != xyes; then
AC_MSG_WARN([
Aug 19, 2001
Aug 19, 2001
132
*** Unable to find PNG library (http://www.libpng.org/pub/png/libpng.html)
Aug 10, 2000
Aug 10, 2000
133
134
135
136
137
])
fi
AC_CHECK_LIB(z, uncompress, have_libz=yes)
if test x$have_libz != xyes; then
AC_MSG_WARN([
Dec 6, 2001
Dec 6, 2001
138
*** Unable to find Zlib library (http://www.gzip.org/zlib/)
Aug 10, 2000
Aug 10, 2000
139
140
141
142
143
144
145
146
147
])
fi
if test x$have_libpng = xyes -a x$have_libz = xyes; then
CFLAGS="$CFLAGS -DLOAD_PNG"
IMG_LIBS="$IMG_LIBS -lpng -lz"
else
AC_MSG_WARN([PNG image loading disabled])
fi
fi
Mar 7, 2001
Mar 7, 2001
148
149
150
151
152
AC_ARG_ENABLE(pnm,
[ --enable-pnm support loading PNM images [default=yes]],
, enable_pnm=yes)
if test x$enable_pnm = xyes; then
CFLAGS="$CFLAGS -DLOAD_PNM"
Aug 10, 2000
Aug 10, 2000
153
154
155
156
157
158
159
160
fi
AC_ARG_ENABLE(tga,
[ --enable-tga support loading TGA images [default=yes]],
, enable_tga=yes)
if test x$enable_tga = xyes; then
CFLAGS="$CFLAGS -DLOAD_TGA"
fi
AC_ARG_ENABLE(tif,
Sep 18, 2000
Sep 18, 2000
161
162
[ --enable-tif support loading TIFF images [default=no]],
, enable_tif=no)
Aug 10, 2000
Aug 10, 2000
163
164
165
166
167
168
if test x$enable_tif = xyes; then
AC_CHECK_LIB(tiff, TIFFClientOpen, have_libtiff=yes)
if test x$have_libtiff = xyes; then
CFLAGS="$CFLAGS -DLOAD_TIF"
IMG_LIBS="$IMG_LIBS -ltiff"
else
Jul 24, 2001
Jul 24, 2001
169
AC_MSG_WARN([
Aug 10, 2000
Aug 10, 2000
170
171
172
173
174
*** Unable to find Tiff library (ftp://ftp.sgi.com/graphics/tiff/)
])
AC_MSG_WARN([TIF image loading disabled])
fi
fi
Mar 7, 2001
Mar 7, 2001
175
AC_ARG_ENABLE(xcf,
Feb 4, 2006
Feb 4, 2006
176
177
[ --enable-xcf support loading XCF images [default=yes]],
, enable_xcf=yes)
Mar 7, 2001
Mar 7, 2001
178
179
180
if test x$enable_xcf = xyes; then
CFLAGS="$CFLAGS -DLOAD_XCF"
fi
Nov 29, 2000
Nov 29, 2000
181
182
183
184
185
186
AC_ARG_ENABLE(xpm,
[ --enable-xpm support loading XPM images [default=yes]],
, enable_xpm=yes)
if test x$enable_xpm = xyes; then
CFLAGS="$CFLAGS -DLOAD_XPM"
fi
Feb 4, 2006
Feb 4, 2006
187
188
189
190
191
192
AC_ARG_ENABLE(xv,
[ --enable-xv support loading XV thumbnail images [default=yes]],
, enable_xv=yes)
if test x$enable_xv = xyes; then
CFLAGS="$CFLAGS -DLOAD_XV"
fi
Aug 10, 2000
Aug 10, 2000
193
194
195
196
197
198
AC_SUBST(IMG_LIBS)
# Finally create all the generated files
AC_OUTPUT([
Makefile
SDL_image.spec
Aug 23, 2003
Aug 23, 2003
199
SDL_image.qpg
Aug 10, 2000
Aug 10, 2000
200
])