Mercurial > SDL_sound_CoreAudio
diff configure.in @ 516:46d5f399cb35
Patch from stable-1.0 branch r528:529.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 28 Oct 2006 00:57:10 +0000 |
parents | 7558f9d03d6f |
children | a0bb7a9c05b1 |
line wrap: on
line diff
--- a/configure.in Fri Jul 28 06:29:19 2006 +0000 +++ b/configure.in Sat Oct 28 00:57:10 2006 +0000 @@ -151,28 +151,6 @@ AC_DEFINE(SOUND_SUPPORTS_MIDI, 1, [Define if MIDI support is desired.]) fi - -dnl Note that we intentionally look for a symbol in FLAC 1.0.4, since the -dnl FLAC developers tend to break their API with every release, so we're -dnl checking for the latest-and-greatest here so we don't have to support -dnl obsolete versions. - -dnl Hooray for shitty autoconf bugs! -x="C__seekable_stream_decoder_process_single" -flcsym="FLA$x" -dnl Check for libFLAC -AC_ARG_ENABLE(flac, -[ --enable-flac enable FLAC decoding via libFLAC [default=yes]], - , enable_flac=yes) -if test x$enable_flac = xyes; then - AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes) - AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes) - if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then - LIBS="$LIBS -lFLAC" - AC_DEFINE(SOUND_SUPPORTS_FLAC, 1, [Define if FLAC support is desired.]) - fi -fi - dnl Check for SMPEG AC_ARG_ENABLE(smpeg, [ --enable-smpeg enable MP3 decoding via smpeg [default=yes]], @@ -230,20 +208,25 @@ fi fi -dnl Check for ogg +AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes) +AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes) +have_ogg=no +if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then + have_ogg=yes +fi + +dnl !!! FIXME: should be --enable-vorbis. +dnl Check for Ogg Vorbis AC_ARG_ENABLE(ogg, [ --enable-ogg enable OGG decoding via libvorbis [default=yes]], , enable_ogg=yes) if test x$enable_ogg = xyes; then - AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes) - AC_CHECK_LIB(ogg, ogg_sync_init, have_ogg_lib=yes) AC_CHECK_HEADER(vorbis/codec.h, have_vorbis_hdr=yes) AC_CHECK_LIB(vorbis, vorbis_info_init, have_vorbis_lib=yes) AC_CHECK_HEADER(vorbis/vorbisfile.h, have_vorbisfile_hdr=yes) AC_CHECK_LIB(vorbisfile, ov_open_callbacks, have_vorbisfile_lib=yes) - have_vorbis=no - if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then + if test x$have_ogg = xyes; then if test x$have_vorbis_hdr = xyes -a x$have_vorbis_lib = xyes; then if test x$have_vorbisfile_hdr = xyes -a x$have_vorbisfile_lib = xyes; then have_vorbis=yes @@ -258,6 +241,34 @@ fi fi + +dnl Note that we intentionally look for a symbol in FLAC 1.0.4, since the +dnl FLAC developers tend to break their API with every release, so we're +dnl checking for the latest-and-greatest here so we don't have to support +dnl obsolete versions. +dnl Starting with FLAC 1.1.3: +dnl libFLAC supports Ogg FLAC (no more libOggFLAC) so we also need -logg +dnl the libFLAC .so version is also #defined in FLAC/export.h + +dnl Hooray for shitty autoconf bugs! +x="C__stream_decoder_process_single" +flcsym="FLA$x" +dnl Check for libFLAC +AC_ARG_ENABLE(flac, +[ --enable-flac enable FLAC decoding via libFLAC [default=yes]], + , enable_flac=yes) +if test x$enable_flac = xyes; then + AC_CHECK_HEADER(FLAC/stream_decoder.h, have_flac_hdr=yes) + AC_CHECK_LIB(FLAC, $flcsym, have_flac_lib=yes) + if test x$have_ogg = xyes; then + if test x$have_flac_hdr = xyes -a x$have_flac_lib = xyes; then + LIBS="$LIBS -lFLAC -logg" + AC_DEFINE(SOUND_SUPPORTS_FLAC, 1, [Define if FLAC support is desired.]) + fi + fi +fi + + dnl Check for speex AC_ARG_ENABLE(speex, [ --enable-speex enable SPX decoding via libspeex [default=yes]],