aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-17 16:57:48 +0100
committerMax Kellermann <max@duempel.org>2008-12-17 16:57:48 +0100
commitcaf601199b9404807ad52a38ce55c08dba8a8ba6 (patch)
tree7fbafc6f2935e090dddaecf09b100f41f924ed4b /configure.ac
parent213c021eac8a4970e357a7569c898f6afcdd24aa (diff)
downloadmpd-caf601199b9404807ad52a38ce55c08dba8a8ba6.tar.gz
mpd-caf601199b9404807ad52a38ce55c08dba8a8ba6.tar.xz
mpd-caf601199b9404807ad52a38ce55c08dba8a8ba6.zip
configure.ac: disable shout when no encoder is found
First check if an ecoder plugin is available, then determine whether to enable the shout output plugin.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 10 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index f06988ec6..5e21bae29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,10 +335,9 @@ fi
AM_CONDITIONAL(HAVE_CURL, test x$enable_curl = xyes)
if test x$enable_shout_ogg = xyes || test x$enable_shout_mp3 = xyes; then
- enable_shout=yes
- PKG_CHECK_MODULES([SHOUT], [shout],
- AC_DEFINE(HAVE_SHOUT, 1, [Define to enable libshout support]),
- enable_shout=no)
+ PKG_CHECK_MODULES([SHOUT], [shout],,
+ [enable_shout_ogg=no; enable_shout_mp3=no;
+ AC_MSG_WARN([disabling shout streaming support because libshout is not available])])
fi
if test x$enable_shout_ogg = xyes; then
@@ -350,10 +349,6 @@ if test x$enable_shout_ogg = xyes; then
AC_MSG_WARN([disabling ogg shout streaming support because tremor does not support vorbis encoding])
enable_shout_ogg=no
fi
- if test x$enable_shout = xno; then
- AC_MSG_WARN([disabling ogg shout streaming support because libshout is not found])
- enable_shout_ogg=no
- fi
if test x$enable_shout_ogg = xyes; then
PKG_CHECK_MODULES(VORBISENC, [vorbisenc],
AC_DEFINE(HAVE_SHOUT_OGG, 1, [Define to enable ogg streaming support]),
@@ -366,15 +361,18 @@ if test x$enable_shout_mp3 = xyes; then
AC_MSG_WARN([disabling mp3 shout streaming support because lame is not enabled])
enable_shout_mp3=no
fi
- if test x$enable_shout = xno; then
- AC_MSG_WARN([disabling mp3 shout streaming support because libshout is not found])
- enable_shout_mp3=no
- fi
if test x$enable_shout_mp3 = xyes; then
AC_DEFINE(HAVE_SHOUT_MP3, 1, [Define to enable mp3 streaming support])
fi
fi
+if test x$enable_shout_ogg = xyes || test x$enable_shout_mp3 = xyes; then
+ enable_shout=yes
+ AC_DEFINE(HAVE_SHOUT, 1, [Define to enable libshout support])
+else
+ enable_shout=no
+fi
+
AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
AM_CONDITIONAL(HAVE_SHOUT_OGG, test x$enable_shout_ogg = xyes)
AM_CONDITIONAL(HAVE_SHOUT_MP3, test x$enable_shout_mp3 = xyes)