aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-04-01 21:58:38 +0200
committerMax Kellermann <max@duempel.org>2009-04-01 21:58:38 +0200
commitd6d244c5a123f48ebf5a73692e8d926a563dac8e (patch)
tree2ad3a9d2501446faa594eb26a8f1425f7238b84d /configure.ac
parentd20a8258b4913f6bfd6eb7a8ef03faa9b9e53bbb (diff)
downloadmpd-d6d244c5a123f48ebf5a73692e8d926a563dac8e.tar.gz
mpd-d6d244c5a123f48ebf5a73692e8d926a563dac8e.tar.xz
mpd-d6d244c5a123f48ebf5a73692e8d926a563dac8e.zip
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".
Diffstat (limited to '')
-rw-r--r--configure.ac24
1 files changed, 18 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 89baacaef..f750aa90f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -628,13 +628,14 @@ AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
AC_ARG_ENABLE(shout,
AS_HELP_STRING([--enable-shout],
- [enables the shoutcast streaming output (default: disable)]),,
- [enable_shout=no])
+ [enables the shoutcast streaming output]),,
+ [enable_shout=auto])
-if test x$enable_shout = xyes; then
- PKG_CHECK_MODULES([SHOUT], [shout],
- AC_DEFINE(HAVE_SHOUT, 1, [Define to enable libshout support]),
- enable_shout=no)
+enable_shout2="$enable_shout"
+MPD_AUTO_PKG(shout, SHOUT, [shout],
+ [shout output plugin], [libshout not found])
+if test x$enable_shout = xyes && test x$enable_shout2 = xauto; then
+ enable_shout=auto
fi
case "$host_os" in
@@ -968,6 +969,17 @@ else
enable_encoder=no
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(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)