mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
configure.ac : Fail more gracefully if pkg-config is missing.
This commit is contained in:
parent
f66e21e0b1
commit
36c6fe71c1
@ -1,3 +1,9 @@
|
||||
2011-03-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac
|
||||
Fail more gracefully if pkg-config is missing. Suggestion from Brian
|
||||
Willoughby.
|
||||
|
||||
2011-02-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.c
|
||||
|
25
configure.ac
25
configure.ac
@ -300,6 +300,7 @@ EXTERNAL_LIBS=""
|
||||
# Check for pkg-config outside the if statement.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
if test -n "$ac_cv_path_PKG_CONFIG" ; then
|
||||
if test x$enable_external_libs = xno ; then
|
||||
AC_MSG_WARN([[*** External libs (FLAC, Ogg, Vorbis) disabled. ***]])
|
||||
else
|
||||
@ -321,17 +322,17 @@ if test x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc = "xyesyesyesyes" ;
|
||||
EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBISENC_CFLAGS"
|
||||
EXTERNAL_LIBS="$FLAC_LIBS $VORBISENC_LIBS"
|
||||
else
|
||||
AC_MSG_WARN([[
|
||||
|
||||
*** One or more of the external libraries (ie libflac, libogg and
|
||||
*** libvorbis) is either missing (possibly only the development
|
||||
*** headers) or is of an unsupported version.
|
||||
***
|
||||
*** Unfortunately, for ease of maintenance, the external libs
|
||||
*** are an all or nothing affair.
|
||||
]])
|
||||
echo
|
||||
AC_MSG_WARN([[*** One or more of the external libraries (ie libflac, libogg and]])
|
||||
AC_MSG_WARN([[*** libvorbis) is either missing (possibly only the development]])
|
||||
AC_MSG_WARN([[*** headers) or is of an unsupported version.]])
|
||||
AC_MSG_WARN([[***]])
|
||||
AC_MSG_WARN([[*** Unfortunately, for ease of maintenance, the external libs]])
|
||||
AC_MSG_WARN([[*** are an all or nothing affair.]])
|
||||
echo
|
||||
enable_external_libs=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_LIBS], $HAVE_EXTERNAL_LIBS, [Will be set to 1 if flac, ogg and vorbis are available.])
|
||||
|
||||
@ -641,11 +642,11 @@ AC_MSG_RESULT([
|
||||
])
|
||||
|
||||
if test -z "$PKG_CONFIG" ; then
|
||||
echo " ***************************************************************"
|
||||
echo " *****************************************************************"
|
||||
echo " *** The pkg-config program is missing. ***"
|
||||
echo " *** External FLAC/Ogg/Vorbis libs will not work without it. ***"
|
||||
echo " *** External FLAC/Ogg/Vorbis libs cannot be found without it. ***"
|
||||
echo " *** http://pkg-config.freedesktop.org/wiki/ ***"
|
||||
echo " ***************************************************************"
|
||||
echo " *****************************************************************"
|
||||
echo
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user