From 3d0f31584190392297d2f1f85b2d08e83a216c27 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 26 Sep 2012 20:34:50 -0700 Subject: [PATCH] Fixed bug 1604 - Ogg support detection in static mode Gabriel Jacobo 2012-09-20 16:01:32 PDT When --disable-music-ogg-shared the OGG tests fail when they should pass. Attached is a crude patch that gets them working (though the changes done to configure.in, inside AC_CHECK_LIB, will produce ugly status string such as "checking for ov_open_callbacks in -lvorbisidec -logg", which is mostly a aesthetic concern) --- configure | 8 ++++---- configure.in | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 3b4e0b3e..2b21b66d 100755 --- a/configure +++ b/configure @@ -13339,7 +13339,7 @@ if test "${ac_cv_lib_vorbisidec_ov_open_callbacks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lvorbisidec $LIBS" +LIBS="-lvorbisidec -logg $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13425,7 +13425,7 @@ fi echo "-- dynamic libvorbisidec -> $ogg_lib" EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\"" else - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec -lvorbis" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisidec -lvorbis -logg" fi else { echo "$as_me:$LINENO: WARNING: *** Unable to find Ogg Vorbis Tremor library (http://www.xiph.org/)" >&5 @@ -13570,7 +13570,7 @@ if test "${ac_cv_lib_vorbisfile_ov_open_callbacks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lvorbisfile $LIBS" +LIBS="-lvorbisfile -lvorbis -logg -lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13650,7 +13650,7 @@ fi echo "-- dynamic libvorbisfile -> $ogg_lib" EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\"" else - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis -logg -lm" fi else { echo "$as_me:$LINENO: WARNING: *** Unable to find Ogg Vorbis library (http://www.xiph.org/)" >&5 diff --git a/configure.in b/configure.in index 23f6c987..b71850b5 100644 --- a/configure.in +++ b/configure.in @@ -429,7 +429,7 @@ AC_HELP_STRING([--enable-music-ogg-shared], [dynamically load Ogg Vorbis support if test x$enable_music_ogg = xyes; then if test x$enable_music_ogg_tremor = xyes; then AC_CHECK_HEADER([tremor/ivorbisfile.h], [have_tremor_hdr=yes]) - AC_CHECK_LIB([vorbisidec], [ov_open_callbacks], [have_tremor_lib=yes]) + AC_CHECK_LIB([vorbisidec -logg], [ov_open_callbacks], [have_tremor_lib=yes]) if test x$have_tremor_hdr = xyes -a x$have_tremor_lib = xyes; then case "$host" in *-*-darwin*) @@ -465,7 +465,7 @@ if test x$enable_music_ogg = xyes; then fi else AC_CHECK_HEADER([vorbis/vorbisfile.h], [have_ogg_hdr=yes]) - AC_CHECK_LIB([vorbisfile], [ov_open_callbacks], [have_ogg_lib=yes]) + AC_CHECK_LIB([vorbisfile -lvorbis -logg -lm], [ov_open_callbacks], [have_ogg_lib=yes]) if test x$have_ogg_hdr = xyes -a x$have_ogg_lib = xyes; then case "$host" in *-*-darwin*) @@ -487,7 +487,7 @@ if test x$enable_music_ogg = xyes; then echo "-- dynamic libvorbisfile -> $ogg_lib" EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\"" else - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis -logg -lm" fi else AC_MSG_WARN([*** Unable to find Ogg Vorbis library (http://www.xiph.org/)])