--- audiere-1.9.4.orig/configure.in 2006-02-13 22:57:01.000000000 -0600 +++ audiere-1.9.4/configure.in 2006-06-18 22:23:40.015298634 -0500 @@ -66,39 +66,66 @@ AC_MSG_ERROR(could not find pthread library)) dnl Look for FLAC -AC_CHECK_LIB(FLAC, FLAC__seekable_stream_decoder_process_single, - LIBS="-lFLAC -lm $LIBS" - EXTRA_LIBS="-lFLAC -lm $EXTRA_LIBS" - HAVE_FLAC=true - , - AC_MSG_WARN([libFLAC not found. Install FLAC from http://flac.sourceforge.net/]) - AC_MSG_WARN([Disabling FLAC support.]) +AC_ARG_ENABLE(flac, + [ --disable-flac Disable flac support], + enable_flac=$enableval, + enable_flac=yes) +if test "$enable_flac" = "yes"; then + AC_CHECK_LIB(FLAC, FLAC__seekable_stream_decoder_process_single, + LIBS="-lFLAC -lm $LIBS" + EXTRA_LIBS="-lFLAC -lm $EXTRA_LIBS" + HAVE_FLAC=true + , + AC_MSG_WARN([libFLAC not found. Install FLAC from http://flac.sourceforge.net/]) + AC_MSG_WARN([Disabling FLAC support.]) + AC_DEFINE(NO_FLAC) + , + -lm) +else AC_DEFINE(NO_FLAC) - , - -lm) + AC_MSG_WARN([Disabling FLAC support.]) +fi AM_CONDITIONAL(HAVE_FLAC, test "x$HAVE_FLAC" = "xtrue") dnl Look for DUMB -AC_CHECK_LIB(dumb, duh_start_renderer, - LIBS="-ldumb $LIBS" - EXTRA_LIBS="-ldumb $EXTRA_LIBS" - HAVE_DUMB=true - , - AC_MSG_WARN([libdumb not found. Install DUMB from http://dumb.sourceforge.net/]) +AC_ARG_ENABLE(dumb, + [ --disable-dumb Disable dumb support], + enable_dumb=$enableval, + enable_dumb=yes) +if test "$enable_dumb" = "yes"; then + AC_CHECK_LIB(dumb, duh_start_renderer, + LIBS="-ldumb $LIBS" + EXTRA_LIBS="-ldumb $EXTRA_LIBS" + HAVE_DUMB=true + , + AC_MSG_WARN([libdumb not found. Install DUMB from http://dumb.sourceforge.net/]) + AC_MSG_WARN([Disabling DUMB support.]) + AC_DEFINE(NO_DUMB)) +else AC_MSG_WARN([Disabling DUMB support.]) - AC_DEFINE(NO_DUMB)) + AC_DEFINE(NO_DUMB) +fi AM_CONDITIONAL(HAVE_DUMB, test "x$HAVE_DUMB" = "xtrue") dnl Look for libcdaudio -AC_CHECK_LIB(cdaudio, cd_init_device, - LIBS="-lcdaudio $LIBS" - EXTRA_LIBS="-lcdaudio $EXTRA_LIBS" - HAVE_LIBCDAUDIO=true - , - AC_MSG_WARN([libcdaudio not found. Install it from http://libcdaudio.sf.net/]) - AC_MSG_WARN([CD audio support might still be possible through another means such as winmm.])) +AC_ARG_ENABLE(cdaudio, + [ --disable-cdaudio Disable libcdaudio support], + enable_cdaudio=$enableval, + enable_cdaudio=yes) +if test "$enable_cdaudio" = "yes"; then + AC_CHECK_LIB(cdaudio, cd_init_device, + LIBS="-lcdaudio $LIBS" + EXTRA_LIBS="-lcdaudio $EXTRA_LIBS" + HAVE_LIBCDAUDIO=true + , + AC_MSG_WARN([libcdaudio not found. Install it from http://libcdaudio.sf.net/]) + AC_MSG_WARN([CD audio support might still be possible through another means such as winmm.])) +else + AC_MSG_WARN([Disabling libcdaudio support.]) +fi AM_CONDITIONAL(HAVE_LIBCDAUDIO, test "x$HAVE_LIBCDAUDIO" = "xtrue") + dnl Look for the POSIX realtime clock AC_SEARCH_LIBS(clock_gettime, rt, AC_DEFINE(HAVE_CLOCK_GETTIME)) @@ -112,46 +139,53 @@ AM_CONDITIONAL(HAVE_AL, test "x$HAVE_AL" = "xtrue") dnl Look for wxWindows -AC_PATH_PROG(WX_CONFIG, wx-config, no, $PATH:/usr/local/bin) -if [[ "$WX_CONFIG" = "no" ]] ; then - AC_MSG_WARN([wxWindows not found, not building wxPlayer. - See http://www.wxwindows.org/]) -else - old_CXXFLAGS="$CXXFLAGS" - old_LIBS="$LIBS" - WXFLAGS=`$WX_CONFIG --cxxflags` - WXLIBS=`$WX_CONFIG --libs` - CXXFLAGS="$WXFLAGS $CXXFLAGS" - LIBS="$WXLIBS $LIBS" - - AC_MSG_CHECKING(if small wxWindows application links) - AC_LINK_IFELSE(AC_LANG_SOURCE([ - #include - class App : public wxApp { - public: - bool OnInit() { - return false; - } - }; - IMPLEMENT_APP(App) - ]) - , - AC_MSG_RESULT(yes) - HAVE_WXWINDOWS=true - AC_DEFINE(HAVE_WXWINDOWS) - WX_LIBS=`$WX_CONFIG --libs` - WX_CPPFLAGS=`$WX_CONFIG --cxxflags` - AC_SUBST(WX_LIBS) - AC_SUBST(WX_CPPFLAGS) - , - AC_MSG_RESULT(no) - AC_MSG_WARN([wx-config found but linking with wxWindows failed. -Maybe wxWindows was compiled with another compiler?])) - - CXXFLAGS="$old_CXXFLAGS" - LIBS="$old_LIBS" +AC_ARG_ENABLE(wxwindows, + [ --disable-player Disable building the wxwindows-based player.], + [ENABLE_WX=$enableval], + [ENABLE_WX="yes"]) +if test "$ENABLE_WX" = "yes"; then + AC_PATH_PROG(WX_CONFIG, wx-config, no, $PATH:/usr/local/bin) + if test "$WX_CONFIG" = "no"; then + AC_MSG_WARN([wxWindows not found, not building wxPlayer. + See http://www.wxwindows.org/]) + else + old_CXXFLAGS="$CXXFLAGS" + old_LIBS="$LIBS" + WXFLAGS=`$WX_CONFIG --cxxflags` + WXLIBS=`$WX_CONFIG --libs` + CXXFLAGS="$WXFLAGS $CXXFLAGS" + LIBS="$WXLIBS $LIBS" + + AC_MSG_CHECKING(if small wxWindows application links) + AC_LINK_IFELSE(AC_LANG_SOURCE([ + #include + class App : public wxApp { + public: + bool OnInit() { + return false; + } + }; + IMPLEMENT_APP(App) + ]) + , + AC_MSG_RESULT(yes) + HAVE_WXWINDOWS=true + AC_DEFINE(HAVE_WXWINDOWS) + WX_LIBS=`$WX_CONFIG --libs` + WX_CPPFLAGS=`$WX_CONFIG --cxxflags` + AC_SUBST(WX_LIBS) + AC_SUBST(WX_CPPFLAGS) + , + AC_MSG_RESULT(no) + AC_MSG_WARN([wx-config found but linking with wxWindows failed. + Maybe wxWindows was compiled with another compiler?])) + + CXXFLAGS="$old_CXXFLAGS" + LIBS="$old_LIBS" + fi +else + AC_MSG_WARN([wxWindows support disabled - Not building wxPlayer.]) fi - AM_CONDITIONAL(HAVE_WXWINDOWS, test "x$HAVE_WXWINDOWS" = "xtrue") dnl Checks for header files. @@ -163,26 +197,44 @@ AC_DEFINE(HAVE_OSS)) AM_CONDITIONAL(HAVE_OSS, test "x$HAVE_OSS" = "xtrue") -AC_CHECK_HEADER(vorbis/vorbisfile.h, - HAVE_OGG=true - LIBS="-lvorbisfile -lvorbis -logg $LIBS" - EXTRA_LIBS="-lvorbisfile -lvorbis -logg $EXTRA_LIBS" - , - AC_MSG_WARN([Could not find vorbisfile header. You do not appear to have libvorbis installed. +AC_ARG_WITH(vorbis, + [ --without-vorbis Disable oggvorbis support], + with_vorbis=$withval, + with_vorbis=yes) +if test "$with_vorbis" = "yes"; then + AC_CHECK_HEADER(vorbis/vorbisfile.h, + HAVE_OGG=true + LIBS="-lvorbisfile -lvorbis -logg $LIBS" + EXTRA_LIBS="-lvorbisfile -lvorbis -logg $EXTRA_LIBS" + , + AC_MSG_WARN([Could not find vorbisfile header. You do not appear to have libvorbis installed. Get libvorbis from http://www.vorbis.com/]) + AC_MSG_WARN([Disabling Ogg Vorbis support.]) + AC_DEFINE(NO_OGG)) +else AC_MSG_WARN([Disabling Ogg Vorbis support.]) - AC_DEFINE(NO_OGG)) + AC_DEFINE(NO_OGG) +fi AM_CONDITIONAL(HAVE_OGG, test "x$HAVE_OGG" = "xtrue") -AC_CHECK_HEADER(speex.h, - HAVE_SPEEX=true - LIBS="-lspeex $LIBS" - EXTRA_LIBS="-lspeex $EXTRA_LIBS" - , - AC_MSG_WARN([Could not find speex header. You do not appear to have libspeex installed. +AC_ARG_WITH(speex, + [ --without-speex Disable speex support], + with_speex=$withval, + with_speex=yes) +if test "$with_speex" = "yes"; then + AC_CHECK_HEADER(speex/speex.h, + HAVE_SPEEX=true + LIBS="-lspeex $LIBS" + EXTRA_LIBS="-lspeex $EXTRA_LIBS" + , + AC_MSG_WARN([Could not find speex header. You do not appear to have libspeex installed. Get libspeex from http://www.speex.org/]) + AC_MSG_WARN([Disabling speex support.]) + AC_DEFINE(NO_SPEEX)) +else AC_MSG_WARN([Disabling speex support.]) - AC_DEFINE(NO_SPEEX)) + AC_DEFINE(NO_SPEEX) +fi AM_CONDITIONAL(HAVE_SPEEX, test "x$HAVE_SPEEX" = "xtrue") AC_CHECK_HEADER(dsound.h,