Mercurial > SDL_sound_CoreAudio
comparison configure.in @ 515:c5f184b4b2cd stable-1.0
Updated to libFLAC 1.1.3 API.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 28 Oct 2006 00:53:45 +0000 |
parents | 6ab5fcc53667 |
children | a8492d97dd5a |
comparison
equal
deleted
inserted
replaced
512:ef0d98d55865 | 515:c5f184b4b2cd |
---|---|
147 AC_ARG_ENABLE(midi, | 147 AC_ARG_ENABLE(midi, |
148 [ --enable-midi enable software MIDI music [default=yes]], | 148 [ --enable-midi enable software MIDI music [default=yes]], |
149 , enable_midi=yes) | 149 , enable_midi=yes) |
150 if test x$enable_midi = xyes; then | 150 if test x$enable_midi = xyes; then |
151 AC_DEFINE(SOUND_SUPPORTS_MIDI, 1, [Define if MIDI support is desired.]) | 151 AC_DEFINE(SOUND_SUPPORTS_MIDI, 1, [Define if MIDI support is desired.]) |
152 fi | |
153 | |
154 | |
155 dnl Note that we intentionally look for a symbol in FLAC 1.0.4, since the | |
156 dnl FLAC developers tend to break their API with every release, so we're | |
157 dnl checking for the latest-and-greatest here so we don't have to support | |
158 dnl obsolete versions. | |
159 | |
160 dnl Hooray for shitty autoconf bugs! | |
161 x="C__seekable_stream_decoder_process_single" | |
162 flcsym="FLA$x" | |
163 dnl Check for libFLAC | |
164 AC_ARG_ENABLE(flac, | |
165 [ --enable-flac enable FLAC decoding via libFLAC [default=yes]], | |
166 , enable_flac=yes) | |
167 if test x$enable_flac = xyes; then | |
168 AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes) | |
169 AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes) | |
170 if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then | |
171 LIBS="$LIBS -lFLAC" | |
172 AC_DEFINE(SOUND_SUPPORTS_FLAC, 1, [Define if FLAC support is desired.]) | |
173 fi | |
174 fi | 152 fi |
175 | 153 |
176 dnl Check for SMPEG | 154 dnl Check for SMPEG |
177 AC_ARG_ENABLE(smpeg, | 155 AC_ARG_ENABLE(smpeg, |
178 [ --enable-smpeg enable MP3 decoding via smpeg [default=yes]], | 156 [ --enable-smpeg enable MP3 decoding via smpeg [default=yes]], |
228 LIBS="$LIBS -lmodplug" | 206 LIBS="$LIBS -lmodplug" |
229 AC_DEFINE(SOUND_SUPPORTS_MODPLUG, 1, [Define if MODPLUG support is desired.]) | 207 AC_DEFINE(SOUND_SUPPORTS_MODPLUG, 1, [Define if MODPLUG support is desired.]) |
230 fi | 208 fi |
231 fi | 209 fi |
232 | 210 |
233 dnl Check for ogg | 211 AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes) |
212 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes) | |
213 have_ogg=no | |
214 if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then | |
215 have_ogg=yes | |
216 fi | |
217 | |
218 dnl !!! FIXME: should be --enable-vorbis. | |
219 dnl Check for Ogg Vorbis | |
234 AC_ARG_ENABLE(ogg, | 220 AC_ARG_ENABLE(ogg, |
235 [ --enable-ogg enable OGG decoding via libvorbis [default=yes]], | 221 [ --enable-ogg enable OGG decoding via libvorbis [default=yes]], |
236 , enable_ogg=yes) | 222 , enable_ogg=yes) |
237 if test x$enable_ogg = xyes; then | 223 if test x$enable_ogg = xyes; then |
238 AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes) | |
239 AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes) | |
240 AC_CHECK_HEADER(vorbis/codec.h, have_vorbis_hdr=yes) | 224 AC_CHECK_HEADER(vorbis/codec.h, have_vorbis_hdr=yes) |
241 AC_CHECK_LIB(vorbis, vorbis_info_init, have_vorbis_lib=yes) | 225 AC_CHECK_LIB(vorbis, vorbis_info_init, have_vorbis_lib=yes) |
242 AC_CHECK_HEADER(vorbis/vorbisfile.h, have_vorbisfile_hdr=yes) | 226 AC_CHECK_HEADER(vorbis/vorbisfile.h, have_vorbisfile_hdr=yes) |
243 AC_CHECK_LIB(vorbisfile, ov_open_callbacks, have_vorbisfile_lib=yes) | 227 AC_CHECK_LIB(vorbisfile, ov_open_callbacks, have_vorbisfile_lib=yes) |
244 | |
245 have_vorbis=no | 228 have_vorbis=no |
246 if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then | 229 if test x$have_ogg = xyes; then |
247 if test x$have_vorbis_hdr = xyes -a x$have_vorbis_lib = xyes; then | 230 if test x$have_vorbis_hdr = xyes -a x$have_vorbis_lib = xyes; then |
248 if test x$have_vorbisfile_hdr = xyes -a x$have_vorbisfile_lib = xyes; then | 231 if test x$have_vorbisfile_hdr = xyes -a x$have_vorbisfile_lib = xyes; then |
249 have_vorbis=yes | 232 have_vorbis=yes |
250 fi | 233 fi |
251 fi | 234 fi |
255 CFLAGS="$CFLAGS" | 238 CFLAGS="$CFLAGS" |
256 LIBS="$LIBS -logg -lvorbis -lvorbisfile" | 239 LIBS="$LIBS -logg -lvorbis -lvorbisfile" |
257 AC_DEFINE(SOUND_SUPPORTS_OGG, 1, [Define if OGG support is desired.]) | 240 AC_DEFINE(SOUND_SUPPORTS_OGG, 1, [Define if OGG support is desired.]) |
258 fi | 241 fi |
259 fi | 242 fi |
243 | |
244 | |
245 dnl Note that we intentionally look for a symbol in FLAC 1.0.4, since the | |
246 dnl FLAC developers tend to break their API with every release, so we're | |
247 dnl checking for the latest-and-greatest here so we don't have to support | |
248 dnl obsolete versions. | |
249 dnl Starting with FLAC 1.1.3: | |
250 dnl libFLAC supports Ogg FLAC (no more libOggFLAC) so we also need -logg | |
251 dnl the libFLAC .so version is also #defined in FLAC/export.h | |
252 | |
253 dnl Hooray for shitty autoconf bugs! | |
254 x="C__stream_decoder_process_single" | |
255 flcsym="FLA$x" | |
256 dnl Check for libFLAC | |
257 AC_ARG_ENABLE(flac, | |
258 [ --enable-flac enable FLAC decoding via libFLAC [default=yes]], | |
259 , enable_flac=yes) | |
260 if test x$enable_flac = xyes; then | |
261 AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes) | |
262 AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes) | |
263 if test x$have_ogg = xyes; then | |
264 if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then | |
265 LIBS="$LIBS -lFLAC -logg" | |
266 AC_DEFINE(SOUND_SUPPORTS_FLAC, 1, [Define if FLAC support is desired.]) | |
267 fi | |
268 fi | |
269 fi | |
270 | |
260 | 271 |
261 dnl Check for speex | 272 dnl Check for speex |
262 AC_ARG_ENABLE(speex, | 273 AC_ARG_ENABLE(speex, |
263 [ --enable-speex enable SPX decoding via libspeex [default=yes]], | 274 [ --enable-speex enable SPX decoding via libspeex [default=yes]], |
264 , enable_speex=yes) | 275 , enable_speex=yes) |