Skip to content
Permalink
Browse files

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)
  • Loading branch information
slouken committed Sep 27, 2012
1 parent 93d8f88 commit 3d0f31584190392297d2f1f85b2d08e83a216c27
Showing with 7 additions and 7 deletions.
  1. +4 −4 configure
  2. +3 −3 configure.in
@@ -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
@@ -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/)])

0 comments on commit 3d0f315

Please sign in to comment.