diff options
author | Max Horn | 2004-02-22 14:11:16 +0000 |
---|---|---|
committer | Max Horn | 2004-02-22 14:11:16 +0000 |
commit | aa6ec62e9db78db12912d0e48025241c5d7ef4f7 (patch) | |
tree | 0afae2b795f07b9bd1c00dc75af3dca3864dac5f /configure | |
parent | 6db3a8819e7ef847f6aefac8e40f542cad006481 (diff) | |
download | scummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.tar.gz scummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.tar.bz2 scummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.zip |
Patch #885904 (Flac Support) with some tweaks by me
svn-id: r12984
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -26,6 +26,7 @@ CXXFLAGS="$CXXFLAGS $CPPFLAGS" # default lib behaviour yes/no/auto _vorbis=auto +_flac=auto _mad=auto _alsa=auto _zlib=auto @@ -207,6 +208,9 @@ Optional Libraries: --with-mad-prefix=PFX Prefix where libmad is installed (optional) --disable-mad disable libmad (MP3) support [autodetect] + + --with-flac-prefix=PFX Prefix where libFLAC is installed (optional) + --disable-flac disable FLAC support [autodetect] --with-zlib-prefix=PFX Prefix where zlib is installed (optional) --disable-zlib disable zlib (compression) support [autodetect] @@ -243,6 +247,8 @@ for ac_option in $@; do --disable-alsa) _alsa=no ;; --enable-vorbis) _vorbis=yes ;; --disable-vorbis) _vorbis=no ;; + --enable-flac) _flac=yes ;; + --disable-flac) _flac=no ;; --enable-mad) _mad=yes ;; --disable-mad) _mad=no ;; --enable-zlib) _zlib=yes ;; @@ -269,6 +275,11 @@ for ac_option in $@; do VORBIS_CFLAGS="-I$_prefix/include" VORBIS_LIBS="-L$_prefix/lib" ;; + --with-flac-prefix=*) + _prefix=`echo $ac_option | cut -d '=' -f 2` + FLAC_CFLAGS="-I$_prefix/include" + FLAC_LIBS="-L$_prefix/lib" + ;; --with-mad-prefix=*) _prefix=`echo $ac_option | cut -d '=' -f 2` MAD_CFLAGS="-I$_prefix/include" @@ -622,6 +633,25 @@ else fi echo "$_vorbis" +echocheck "FLAC" +if test "$_flac" = auto ; then + _flac=no + cat > $TMPC << EOF +#include <FLAC/seekable_stream_decoder.h> +int main(void) { FLAC__seekable_stream_decoder_init( 0 ); return 0; } +EOF + cc_check $LDFLAGS $CXXFLAGS $FLAC_CFLAGS $FLAY_LIBS \ + -lFLAC -lm && _flac=yes +fi +if test "$_flac" = yes ; then + _def_flac='#define USE_FLAC' + LIBS="$LIBS $FLAC_LIBS -lFLAC" + INCLUDES="$INCLUDES $FLAC_CFLAGS" +else + _def_flac='#undef USE_FLAC' +fi +echo "$_flac" + # # Check for MAD (MP3 library) # @@ -809,6 +839,7 @@ typedef signed $type_4_byte int32; /* Libs */ $_def_vorbis +$_def_flac $_def_mad $_def_alsa $_def_zlib |