1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +02:00

Fix build error due to under-linking of libvorbis and libogg, which causes a build error if they have been built usining -Wl,--as-needed to avoid re-exporting library symbols

This commit is contained in:
richardash1981 2014-08-12 21:31:25 +00:00
parent 0b1819afd2
commit 5a01406d49
2 changed files with 14 additions and 9 deletions

16
configure vendored
View File

@ -22156,12 +22156,12 @@ if test -n "$LIBVORBIS_CFLAGS"; then
pkg_cv_LIBVORBIS_CFLAGS="$LIBVORBIS_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisenc vorbisfile\""; } >&5
($PKG_CONFIG --exists --print-errors "vorbisenc vorbisfile") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisenc vorbisfile vorbis ogg\""; } >&5
($PKG_CONFIG --exists --print-errors "vorbisenc vorbisfile vorbis ogg") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBVORBIS_CFLAGS=`$PKG_CONFIG --cflags "vorbisenc vorbisfile" 2>/dev/null`
pkg_cv_LIBVORBIS_CFLAGS=`$PKG_CONFIG --cflags "vorbisenc vorbisfile vorbis ogg" 2>/dev/null`
else
pkg_failed=yes
fi
@ -22172,12 +22172,12 @@ if test -n "$LIBVORBIS_LIBS"; then
pkg_cv_LIBVORBIS_LIBS="$LIBVORBIS_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisenc vorbisfile\""; } >&5
($PKG_CONFIG --exists --print-errors "vorbisenc vorbisfile") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisenc vorbisfile vorbis ogg\""; } >&5
($PKG_CONFIG --exists --print-errors "vorbisenc vorbisfile vorbis ogg") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_LIBVORBIS_LIBS=`$PKG_CONFIG --libs "vorbisenc vorbisfile" 2>/dev/null`
pkg_cv_LIBVORBIS_LIBS=`$PKG_CONFIG --libs "vorbisenc vorbisfile vorbis ogg" 2>/dev/null`
else
pkg_failed=yes
fi
@ -22195,9 +22195,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
LIBVORBIS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "vorbisenc vorbisfile" 2>&1`
LIBVORBIS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "vorbisenc vorbisfile vorbis ogg" 2>&1`
else
LIBVORBIS_PKG_ERRORS=`$PKG_CONFIG --print-errors "vorbisenc vorbisfile" 2>&1`
LIBVORBIS_PKG_ERRORS=`$PKG_CONFIG --print-errors "vorbisenc vorbisfile vorbis ogg" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBVORBIS_PKG_ERRORS" >&5

View File

@ -13,9 +13,14 @@ AC_DEFUN([AUDACITY_CHECKLIB_LIBVORBIS], [
dnl See if Vorbis is installed in the system
PKG_CHECK_MODULES(LIBVORBIS, vorbisenc vorbisfile,
PKG_CHECK_MODULES(LIBVORBIS, vorbisenc vorbisfile vorbis ogg,
LIBVORBIS_SYSTEM_AVAILABLE="yes",
LIBVORBIS_SYSTEM_AVAILABLE="no")
dnl Have to list the dependent libraries (vorbis and ogg) here because their
dnl symbols are used from Audacity directly, and (in a minimally linked system,
dnl e.g. with LDFLAGS including -Wl,--as-needed and with libtool patched to not
dnl break this) pulling in libraries that use libvorbis does not automagically
dnl cause the libvorbis symbols to be linkable.
if test "$LIBVORBIS_SYSTEM_AVAILABLE" = "yes"; then
AC_MSG_NOTICE([Vorbis libraries are available as system libraries])