~ubuntu-branches/ubuntu/karmic/sdl-image1.2/karmic

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2006-06-09 07:21:47 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060609072147-31buc05gjjhttun0
Tags: 1.2.5-1
* New upstream release
* Updated Build-Depends and Depends to SDL 1.2.10
* Updated minimum shlibs version to 1.2.5
* Updated Standards-Version to 3.7.2
* Simplified watch file
* Fixed address of FSF in debian/copyright

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
MAJOR_VERSION=1
15
15
MINOR_VERSION=2
16
 
MICRO_VERSION=4
17
 
INTERFACE_AGE=3
18
 
BINARY_AGE=4
 
16
MICRO_VERSION=5
 
17
INTERFACE_AGE=4
 
18
BINARY_AGE=5
19
19
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
20
20
 
21
21
AC_SUBST(MAJOR_VERSION)
36
36
AC_SUBST(LT_REVISION)
37
37
AC_SUBST(LT_AGE)
38
38
 
39
 
dnl Detect the canonical host and target build environment
 
39
dnl Detect the canonical build and host environments
40
40
AC_CANONICAL_HOST
41
 
AC_CANONICAL_TARGET
42
41
 
43
42
dnl Setup for automake
44
43
AM_INIT_AUTOMAKE(SDL_image, $VERSION)
45
 
AM_MAINTAINER_MODE
46
44
 
47
45
dnl Check for tools
48
46
 
54
52
AC_PROG_INSTALL
55
53
 
56
54
dnl The alpha architecture needs special flags for binary portability
57
 
case "$target" in
 
55
case "$host" in
58
56
    alpha*-*-linux*)
59
57
        CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
60
58
        ;;
62
60
        ac_default_prefix=/boot/develop/tools/gnupro
63
61
        ;;
64
62
    *-*-cygwin* | *-*-mingw32*)
65
 
        if test "$build" != "$target"; then # cross-compiling
 
63
        if test "$build" != "$host"; then # cross-compiling
66
64
            # Default cross-compile location
67
65
            ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
68
66
        else
69
67
            # Look for the location of the tools and install there
70
 
            if [ "$BUILD_PREFIX" != "" ]; then
 
68
            if test "$BUILD_PREFIX" != ""; then
71
69
                ac_default_prefix=$BUILD_PREFIX
72
70
            fi
73
71
        fi
75
73
esac
76
74
 
77
75
dnl Check for SDL
78
 
SDL_VERSION=1.2.4
 
76
SDL_VERSION=1.2.10
79
77
AM_PATH_SDL($SDL_VERSION,
80
78
            :,
81
 
            AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
 
79
           AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
82
80
)
83
81
CFLAGS="$CFLAGS $SDL_CFLAGS"
84
82
LIBS="$LIBS $SDL_LIBS"
 
83
saved_LIBS="$LIBS"
85
84
 
86
85
dnl Check command-line options
87
 
AC_ARG_ENABLE(bmp,
88
 
[  --enable-bmp            support loading BMP images [default=yes]],
89
 
              , enable_bmp=yes)
 
86
AC_ARG_ENABLE([bmp], [AC_HELP_STRING([--enable-bmp], [support loading BMP images [default=yes]])],
 
87
 [], [enable_bmp=yes])
 
88
AC_ARG_ENABLE([gif], [AC_HELP_STRING([--enable-gif], [support loading GIF images [default=yes]])],
 
89
 [], [enable_gif=yes])
 
90
AC_ARG_ENABLE([jpg], [AC_HELP_STRING([--enable-jpg], [support loading JPG images [default=yes]])],
 
91
 [], [enable_jpg=yes])
 
92
AC_ARG_ENABLE([jpg-shared], AC_HELP_STRING([--enable-jpg-shared], [dynamically load JPG support [[default=yes]]]),
 
93
 [], [enable_jpg_shared=yes])
 
94
AC_ARG_ENABLE([lbm], [AC_HELP_STRING([--enable-lbm], [support loading LBM images [default=yes]])],
 
95
 [], [enable_lbm=yes])
 
96
AC_ARG_ENABLE([pcx], [AC_HELP_STRING([--enable-pcx], [support loading PCX images [default=yes]])],
 
97
 [], [enable_pcx=yes])
 
98
AC_ARG_ENABLE([png], [AC_HELP_STRING([--enable-png], [support loading PNG images [default=yes]])],
 
99
 [], [enable_png=yes])
 
100
AC_ARG_ENABLE([png-shared], AC_HELP_STRING([--enable-png-shared], [dynamically load PNG support [[default=yes]]]),
 
101
 [], [enable_png_shared=yes])
 
102
AC_ARG_ENABLE([pnm], [AC_HELP_STRING([--enable-pnm], [support loading PNM images [default=yes]])],
 
103
 [], [enable_pnm=yes])
 
104
AC_ARG_ENABLE([tga], [AC_HELP_STRING([--enable-tga], [support loading TGA images [default=yes]])],
 
105
 [], [enable_tga=yes])
 
106
AC_ARG_ENABLE([tif], [AC_HELP_STRING([--enable-tif], [support loading TIFF images [default=yes]])],
 
107
 [], [enable_tif=yes])
 
108
AC_ARG_ENABLE([tif-shared], AC_HELP_STRING([--enable-tif-shared], [dynamically load TIFF support [[default=yes]]]),
 
109
 [], [enable_tif_shared=yes])
 
110
AC_ARG_ENABLE([xcf], [AC_HELP_STRING([--enable-xcf], [support loading XCF images [default=yes]])],
 
111
 [], [enable_xcf=yes])
 
112
AC_ARG_ENABLE([xpm], [AC_HELP_STRING([--enable-xpm], [support loading XPM images [default=yes]])],
 
113
 [], [enable_xpm=yes])
 
114
AC_ARG_ENABLE([xv], [AC_HELP_STRING([--enable-xv], [support loading XV images [default=yes]])],
 
115
 [], [enable_xv=yes])
 
116
 
 
117
if test x$enable_png = xyes || test x$enable_tif = xyes; then
 
118
    AC_CHECK_LIB([z], [uncompress], [
 
119
        LIBS="-lz $LIBS"
 
120
    ])
 
121
fi
 
122
 
 
123
if test x$enable_jpg = xyes || test x$enable_tif = xyes; then
 
124
    AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], [have_libjpeg=yes])
 
125
    if test x$have_libjpeg = xyes; then
 
126
        if test x$enable_jpg = xyes; then
 
127
            AC_DEFINE(LOAD_JPG)
 
128
        fi
 
129
        LIBS="-ljpeg $LIBS"
 
130
 
 
131
        case "$host" in
 
132
            *-*-darwin*) # FIXME when Mac OS X ships with libjpeg
 
133
                jpg_lib=''
 
134
                ;;
 
135
            *-*-cygwin* | *-*-mingw32*)
 
136
                jpg_lib='jpeg.dll'
 
137
                ;;
 
138
            *)
 
139
                for path in /usr/lib /usr/local/lib; do
 
140
                    if test x$jpg_lib = x; then
 
141
                        jpg_lib=[`ls -- $path/libjpeg.so.[0-9][0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
 
142
                    fi
 
143
                done
 
144
                ;;
 
145
        esac
 
146
    elif test x$enable_jpg = xyes; then
 
147
        AC_MSG_WARN([*** Unable to find JPEG library (http://www.ijg.org/)])
 
148
        AC_MSG_WARN([JPG image loading disabled])
 
149
    fi
 
150
fi
 
151
 
 
152
if test x$enable_png = xyes; then
 
153
    AC_CHECK_LIB([png], [png_create_read_struct], [have_libpng=yes])
 
154
    if test x$have_libpng = xyes; then
 
155
        AC_DEFINE([LOAD_PNG])
 
156
 
 
157
        case "$host" in
 
158
            *-*-darwin*) # FIXME when Mac OS X ships with libpng
 
159
                png_lib=''
 
160
                ;;
 
161
            *-*-cygwin* | *-*-mingw32*)
 
162
                png_lib='libpng13.dll'
 
163
                ;;
 
164
            *)
 
165
                for path in /usr/lib /usr/local/lib; do
 
166
                    if test x$png_lib = x; then
 
167
                        png_lib=[`ls -- $path/libpng.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
 
168
                    fi
 
169
                done
 
170
                ;;
 
171
        esac
 
172
    else
 
173
        AC_MSG_WARN([*** Unable to find PNG library (http://www.libpng.org/pub/png/libpng.html)])
 
174
        AC_MSG_WARN([PNG image loading disabled])
 
175
    fi
 
176
fi
 
177
 
 
178
if test x$enable_tif = xyes; then
 
179
    AC_CHECK_LIB([tiff], [TIFFClientOpen], [have_libtiff=yes])
 
180
    if test x$have_libtiff = xyes; then
 
181
        AC_DEFINE([LOAD_TIF])
 
182
 
 
183
        case "$host" in
 
184
            *-*-darwin*) # FIXME when Mac OS X ships with libtiff
 
185
                tif_lib=''
 
186
                ;;
 
187
            *-*-cygwin* | *-*-mingw32*)
 
188
                tif_lib='libtiff.dll'
 
189
                ;;
 
190
            *)
 
191
                for path in /usr/lib /usr/local/lib; do
 
192
                    if test x$tif_lib = x; then
 
193
                        tif_lib=[`ls -- $path/libtiff.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
 
194
                    fi
 
195
                done
 
196
                ;;
 
197
        esac
 
198
    else
 
199
        AC_MSG_WARN([*** Unable to find Tiff library (http://www.remotesensing.org/libtiff/)])
 
200
        AC_MSG_WARN([TIF image loading disabled])
 
201
    fi
 
202
fi
 
203
 
90
204
if test x$enable_bmp = xyes; then
91
 
    CFLAGS="$CFLAGS -DLOAD_BMP"
 
205
    AC_DEFINE([LOAD_BMP])
92
206
fi
93
 
AC_ARG_ENABLE(gif,
94
 
[  --enable-gif            support loading GIF images [default=yes]],
95
 
              , enable_gif=yes)
 
207
 
96
208
if test x$enable_gif = xyes; then
97
 
    CFLAGS="$CFLAGS -DLOAD_GIF"
98
 
fi
99
 
AC_ARG_ENABLE(jpg,
100
 
[  --enable-jpg            support loading JPG images [default=yes]],
101
 
              , enable_jpg=yes)
102
 
if test x$enable_jpg = xyes; then
103
 
    AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, have_libjpeg=yes)
104
 
    if test x$have_libjpeg = xyes; then
105
 
        CFLAGS="$CFLAGS -DLOAD_JPG"
106
 
        IMG_LIBS="$IMG_LIBS -ljpeg"
107
 
    else
108
 
        AC_MSG_WARN([
109
 
*** Unable to find JPEG library (http://www.ijg.org/)
110
 
])
111
 
        AC_MSG_WARN([JPG image loading disabled])
112
 
    fi
113
 
fi
114
 
AC_ARG_ENABLE(lbm,
115
 
[  --enable-lbm            support loading LBM images [default=yes]],
116
 
              , enable_lbm=yes)
 
209
    AC_DEFINE([LOAD_GIF])
 
210
fi
 
211
 
117
212
if test x$enable_lbm = xyes; then
118
 
    CFLAGS="$CFLAGS -DLOAD_LBM"
 
213
    AC_DEFINE([LOAD_LBM])
119
214
fi
120
 
AC_ARG_ENABLE(pcx,
121
 
[  --enable-pcx            support loading PCX images [default=yes]],
122
 
              , enable_pcx=yes)
 
215
 
123
216
if test x$enable_pcx = xyes; then
124
 
    CFLAGS="$CFLAGS -DLOAD_PCX"
125
 
fi
126
 
AC_ARG_ENABLE(png,
127
 
[  --enable-png            support loading PNG images [default=yes]],
128
 
              , enable_png=yes)
129
 
if test x$enable_png = xyes; then
130
 
    AC_CHECK_LIB(png, png_create_read_struct, have_libpng=yes, , -lz)
131
 
    if test x$have_libpng != xyes; then
132
 
        AC_MSG_WARN([
133
 
*** Unable to find PNG library (http://www.libpng.org/pub/png/libpng.html)
134
 
])
135
 
    fi
136
 
    AC_CHECK_LIB(z, uncompress, have_libz=yes)
137
 
    if test x$have_libz != xyes; then
138
 
        AC_MSG_WARN([
139
 
*** Unable to find Zlib library (http://www.gzip.org/zlib/)
140
 
])
141
 
    fi
142
 
    if test x$have_libpng = xyes -a x$have_libz = xyes; then
143
 
        CFLAGS="$CFLAGS -DLOAD_PNG"
144
 
        IMG_LIBS="$IMG_LIBS -lpng -lz"
145
 
    else
146
 
        AC_MSG_WARN([PNG image loading disabled])
147
 
    fi
148
 
fi
149
 
AC_ARG_ENABLE(pnm,
150
 
[  --enable-pnm            support loading PNM images [default=yes]],
151
 
              , enable_pnm=yes)
 
217
    AC_DEFINE([LOAD_PCX])
 
218
fi
 
219
 
152
220
if test x$enable_pnm = xyes; then
153
 
    CFLAGS="$CFLAGS -DLOAD_PNM"
 
221
    AC_DEFINE([LOAD_PNM])
154
222
fi
155
 
AC_ARG_ENABLE(tga,
156
 
[  --enable-tga            support loading TGA images [default=yes]],
157
 
              , enable_tga=yes)
 
223
 
158
224
if test x$enable_tga = xyes; then
159
 
    CFLAGS="$CFLAGS -DLOAD_TGA"
160
 
fi
161
 
AC_ARG_ENABLE(tif,
162
 
[  --enable-tif            support loading TIFF images [default=no]],
163
 
              , enable_tif=no)
164
 
if test x$enable_tif = xyes; then
165
 
    AC_CHECK_LIB(tiff, TIFFClientOpen, have_libtiff=yes)
166
 
    if test x$have_libtiff = xyes; then
167
 
        CFLAGS="$CFLAGS -DLOAD_TIF"
168
 
        IMG_LIBS="$IMG_LIBS -ltiff"
169
 
    else
170
 
        AC_MSG_WARN([
171
 
*** Unable to find Tiff library (ftp://ftp.sgi.com/graphics/tiff/)
172
 
])
173
 
        AC_MSG_WARN([TIF image loading disabled])
174
 
    fi
175
 
fi
176
 
AC_ARG_ENABLE(xcf,
177
 
[  --enable-xcf            support loading XCF images [default=no]],
178
 
              , enable_xcf=no)
 
225
    AC_DEFINE([LOAD_TGA])
 
226
fi
 
227
 
179
228
if test x$enable_xcf = xyes; then
180
 
    CFLAGS="$CFLAGS -DLOAD_XCF"
 
229
    AC_DEFINE([LOAD_XCF])
181
230
fi
182
 
AC_ARG_ENABLE(xpm,
183
 
[  --enable-xpm            support loading XPM images [default=yes]],
184
 
              , enable_xpm=yes)
 
231
 
185
232
if test x$enable_xpm = xyes; then
186
 
    CFLAGS="$CFLAGS -DLOAD_XPM"
187
 
fi
188
 
AC_SUBST(IMG_LIBS)
 
233
    AC_DEFINE([LOAD_XPM])
 
234
fi
 
235
 
 
236
if test x$enable_xv = xyes; then
 
237
    AC_DEFINE([LOAD_XV])
 
238
fi
 
239
 
 
240
if test x$enable_tif = xyes; then
 
241
    if test x$enable_tif_shared = xyes && test x$tif_lib != x; then
 
242
        echo "-- dynamic libtiff -> $tif_lib"
 
243
        AC_DEFINE_UNQUOTED(LOAD_TIF_DYNAMIC, "$tif_lib")
 
244
    else
 
245
        if test x$have_libjpeg = xyes; then
 
246
            # Disable dynamic jpeg since we're linking it explicitly
 
247
            jpg_lib=''
 
248
            IMG_LIBS="-ljpeg $IMG_LIBS"
 
249
        fi
 
250
        IMG_LIBS="-ltiff -lz"
 
251
    fi
 
252
fi
 
253
if test x$enable_jpg = xyes; then
 
254
    if test x$enable_jpg_shared = xyes && test x$jpg_lib != x; then
 
255
        echo "-- dynamic libjpeg -> $jpg_lib"
 
256
        AC_DEFINE_UNQUOTED(LOAD_JPG_DYNAMIC, "$jpg_lib")
 
257
    else
 
258
        IMG_LIBS="-ljpeg $IMG_LIBS"
 
259
    fi
 
260
fi
 
261
if test x$enable_png = xyes; then
 
262
    if test x$enable_png_shared = xyes && test x$png_lib != x; then
 
263
        echo "-- dynamic libpng -> $png_lib"
 
264
        AC_DEFINE_UNQUOTED(LOAD_PNG_DYNAMIC, "$png_lib")
 
265
    else
 
266
        IMG_LIBS="-lpng -lz $IMG_LIBS"
 
267
    fi
 
268
fi
 
269
 
 
270
LIBS="$saved_LIBS"
 
271
 
 
272
AC_SUBST([IMG_LIBS])
189
273
 
190
274
# Finally create all the generated files
191
275
AC_OUTPUT([