Commit d6d244c5 authored by Max Kellermann's avatar Max Kellermann

configure.ac: fail when shout is enabled but no libshout available

This patch makes the shout checks use MPD_AUTO_PKG() instead of manually invoking PKG_CHECK_MODULES(). It sets the default value to "auto" instead of "no".
parent d20a8258
...@@ -628,13 +628,14 @@ AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes) ...@@ -628,13 +628,14 @@ AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
AC_ARG_ENABLE(shout, AC_ARG_ENABLE(shout,
AS_HELP_STRING([--enable-shout], AS_HELP_STRING([--enable-shout],
[enables the shoutcast streaming output (default: disable)]),, [enables the shoutcast streaming output]),,
[enable_shout=no]) [enable_shout=auto])
if test x$enable_shout = xyes; then enable_shout2="$enable_shout"
PKG_CHECK_MODULES([SHOUT], [shout], MPD_AUTO_PKG(shout, SHOUT, [shout],
AC_DEFINE(HAVE_SHOUT, 1, [Define to enable libshout support]), [shout output plugin], [libshout not found])
enable_shout=no) if test x$enable_shout = xyes && test x$enable_shout2 = xauto; then
enable_shout=auto
fi fi
case "$host_os" in case "$host_os" in
...@@ -968,6 +969,17 @@ else ...@@ -968,6 +969,17 @@ else
enable_encoder=no enable_encoder=no
fi fi
if test x$enable_shout = xauto; then
# handle shout auto-detection: disable if no encoder is
# available
if test x$enable_encoder = xyes; then
enable_shout=yes
else
AC_MSG_WARN([No encoder plugin -- disabling the shout output plugin])
enable_shout=no
fi
fi
AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes) AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes) AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment