configure.ac: fail if Vorbis was enabled explicitly, but not found
.. and a minor tweak for libFLAC+libogg detection.
This commit is contained in:
parent
446f9973cc
commit
2556449b36
43
configure.ac
43
configure.ac
@ -353,9 +353,9 @@ AC_ARG_ENABLE(un,
|
|||||||
[enable_un=yes])
|
[enable_un=yes])
|
||||||
|
|
||||||
AC_ARG_ENABLE(vorbis,
|
AC_ARG_ENABLE(vorbis,
|
||||||
AS_HELP_STRING([--disable-vorbis],
|
AS_HELP_STRING([--enable-vorbis],
|
||||||
[disable Ogg Vorbis support (default: enable)]),,
|
[enable Ogg Vorbis decoder]),,
|
||||||
enable_vorbis=yes)
|
enable_vorbis=auto)
|
||||||
|
|
||||||
AC_ARG_ENABLE(vorbis-encoder,
|
AC_ARG_ENABLE(vorbis-encoder,
|
||||||
AS_HELP_STRING([--enable-vorbis-encoder],
|
AS_HELP_STRING([--enable-vorbis-encoder],
|
||||||
@ -631,11 +631,6 @@ if test x$enable_lastfm = xyes; then
|
|||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(ENABLE_LASTFM, test x$enable_lastfm = xyes)
|
AM_CONDITIONAL(ENABLE_LASTFM, test x$enable_lastfm = xyes)
|
||||||
|
|
||||||
dnl ---------------------------------- libogg ---------------------------------
|
|
||||||
if test x$with_tremor = xno || test -z $with_tremor; then
|
|
||||||
PKG_CHECK_MODULES(OGG, [ogg], enable_ogg=yes, enable_ogg=no)
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl ---------------------------------- libmms ---------------------------------
|
dnl ---------------------------------- libmms ---------------------------------
|
||||||
MPD_AUTO_PKG(mms, MMS, [libmms >= 0.4],
|
MPD_AUTO_PKG(mms, MMS, [libmms >= 0.4],
|
||||||
[libmms mms:// protocol support], [libmms not found])
|
[libmms mms:// protocol support], [libmms not found])
|
||||||
@ -770,12 +765,10 @@ if test x$enable_flac = xyes; then
|
|||||||
LIBS="$oldlibs"
|
LIBS="$oldlibs"
|
||||||
|
|
||||||
if test x$enable_oggflac = xflac; then
|
if test x$enable_oggflac = xflac; then
|
||||||
if test x$enable_ogg = xyes; then
|
PKG_CHECK_MODULES(OGG, [ogg],
|
||||||
FLAC_LIBS="${FLAC_LIBS} -logg"
|
[FLAC_LIBS="${FLAC_LIBS} ${OGG_LIBS}" FLAC_CFLAGS="${FLAC_CFLAGS} ${OGG_CFLAGS}"],
|
||||||
else
|
[enable_oggflac=yes;
|
||||||
enable_oggflac=yes
|
AC_MSG_WARN("FLAC has the ogg API built in, but couldn't find ogg. Disabling oggflac.")])
|
||||||
AC_MSG_WARN("FLAC has the ogg API built in, but couldn't find ogg. Disabling oggflac.")
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -943,7 +936,7 @@ fi
|
|||||||
if test x$enable_tremor = xyes; then
|
if test x$enable_tremor = xyes; then
|
||||||
AC_DEFINE(HAVE_TREMOR,1,
|
AC_DEFINE(HAVE_TREMOR,1,
|
||||||
[Define to use tremor (libvorbisidec) for ogg support])
|
[Define to use tremor (libvorbisidec) for ogg support])
|
||||||
AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]),
|
AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
|
||||||
else
|
else
|
||||||
TREMOR_CFLAGS=
|
TREMOR_CFLAGS=
|
||||||
TREMOR_LIBS=
|
TREMOR_LIBS=
|
||||||
@ -972,18 +965,18 @@ fi
|
|||||||
AM_CONDITIONAL(HAVE_OGGFLAC, test x$enable_oggflac = xyes)
|
AM_CONDITIONAL(HAVE_OGGFLAC, test x$enable_oggflac = xyes)
|
||||||
|
|
||||||
dnl -------------------------------- Ogg Vorbis -------------------------------
|
dnl -------------------------------- Ogg Vorbis -------------------------------
|
||||||
if test x$enable_vorbis = xyes; then
|
|
||||||
if test x$enable_tremor = xyes; then
|
if test x$enable_tremor = xyes; then
|
||||||
|
if test x$enable_vorbis = xyes; then
|
||||||
AC_MSG_WARN(["OggTremor detected, could not enable Vorbis."])
|
AC_MSG_WARN(["OggTremor detected, could not enable Vorbis."])
|
||||||
enable_vorbis=no
|
|
||||||
elif test x$enable_ogg = xyes; then
|
|
||||||
PKG_CHECK_MODULES(VORBIS, [vorbis vorbisfile],
|
|
||||||
AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]),
|
|
||||||
enable_vorbis=no)
|
|
||||||
else
|
|
||||||
AC_MSG_WARN(["Ogg not detected, could not enable Vorbis."])
|
|
||||||
enable_vorbis=no
|
|
||||||
fi
|
fi
|
||||||
|
enable_vorbis=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
MPD_AUTO_PKG(vorbis, VORBIS, [vorbis vorbisfile ogg],
|
||||||
|
[Ogg Vorbis decoder], [libvorbis not found])
|
||||||
|
if test x$enable_vorbis = xyes; then
|
||||||
|
AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes || test x$enable_tremor = xyes)
|
AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes || test x$enable_tremor = xyes)
|
||||||
|
Loading…
Reference in New Issue
Block a user