Ticket #8315: configure-flac2.diff

File configure-flac2.diff, 2.2 KB (added by SF/nolange, 20 years ago)
  • configure

    RCS file: /cvsroot/scummvm/scummvm/configure,v
    retrieving revision 1.70
    diff -u -r1.70 configure
     
    2626
    2727# default lib behaviour yes/no/auto
    2828_vorbis=auto
     29_flac=auto
    2930_mad=auto
    3031_alsa=auto
    3132_zlib=auto
     
    207208
    208209  --with-mad-prefix=PFX    Prefix where libmad is installed (optional)
    209210  --disable-mad            disable libmad (MP3) support [autodetect]
     211 
     212  --with-flac-prefix=PFX   Prefix where libFLAC is installed (optional)
     213  --disable-flac           disable FLAC support [autodetect]
    210214
    211215  --with-zlib-prefix=PFX   Prefix where zlib is installed (optional)
    212216  --disable-zlib           disable zlib (compression) support [autodetect]
     
    243247      --disable-alsa)           _alsa=no        ;;
    244248      --enable-vorbis)          _vorbis=yes     ;;
    245249      --disable-vorbis)         _vorbis=no      ;;
     250      --enable-flac)            _flac=yes       ;;
     251      --disable-flac)           _flac=no        ;;
    246252      --enable-mad)             _mad=yes        ;;
    247253      --disable-mad)            _mad=no         ;;
    248254      --enable-zlib)            _zlib=yes       ;;
     
    269275        VORBIS_CFLAGS="-I$_prefix/include"
    270276        VORBIS_LIBS="-L$_prefix/lib"
    271277        ;;
     278      --with-flac-prefix=*)
     279        _prefix=`echo $ac_option | cut -d '=' -f 2`
     280        FLAC_CFLAGS="-I$_prefix/include"
     281        FLAC_LIBS="-L$_prefix/lib"
     282        ;;
    272283      --with-mad-prefix=*)
    273284        _prefix=`echo $ac_option | cut -d '=' -f 2`
    274285        MAD_CFLAGS="-I$_prefix/include"
     
    622633fi
    623634echo "$_vorbis"
    624635
     636echocheck "FLAC"
     637if test "$_flac" = auto ; then
     638  _flac=no
     639  cat > $TMPC << EOF
     640#include <FLAC/seekable_stream_decoder.h>
     641int main(void) { FLAC__seekable_stream_decoder_init( 0 ); return 0; }
     642EOF
     643  cc_check $LDFLAGS $CXXFLAGS $FLAC_CFLAGS $FLAY_LIBS \
     644  -lFLAC -lm && _flac=yes
     645fi
     646if test "$_flac" = yes ; then
     647  _def_flac='#define USE_FLAC'
     648  LIBS="$LIBS $FLAC_LIBS -lFLAC"
     649  INCLUDES="$INCLUDES $FLAC_CFLAGS"
     650else
     651  _def_flac='#undef USE_FLAC'
     652fi
     653echo "$_flac"
     654
    625655#
    626656# Check for MAD (MP3 library)
    627657#
     
    809839
    810840/* Libs */
    811841$_def_vorbis
     842$_def_flac
    812843$_def_mad
    813844$_def_alsa
    814845$_def_zlib