aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-04-01 21:54:38 +0200
committerMax Kellermann <max@duempel.org>2009-04-01 21:54:38 +0200
commitd20a8258b4913f6bfd6eb7a8ef03faa9b9e53bbb (patch)
treee9d0794eb9c741c28859e02a75a1ba358ee6bd95 /configure.ac
parent67e0a71ab37d40c6cb2146be94f9999aa838ea91 (diff)
downloadmpd-d20a8258b4913f6bfd6eb7a8ef03faa9b9e53bbb.tar.gz
mpd-d20a8258b4913f6bfd6eb7a8ef03faa9b9e53bbb.tar.xz
mpd-d20a8258b4913f6bfd6eb7a8ef03faa9b9e53bbb.zip
configure.ac: added variable $enable_encoder
$enable_encoder specifies whether one or more encoder plugins are enabled. This simplifies several checks, and allows easier integration of more encoder plugins.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 04ff51db6..89baacaef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -960,6 +960,14 @@ if test x$enable_lame = xyes; then
AC_MSG_WARN(You need lame -- disabling lame support)])
fi
+if test x$enable_oggvorbis_encoder != xno || test x$enable_lame != xno; then
+ # at least one encoder plugin is enabled
+ enable_encoder=yes
+else
+ # no encoder plugin is enabled: disable the whole encoder API
+ enable_encoder=no
+fi
+
AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)
@@ -967,7 +975,7 @@ if test x$enable_httpd_output = xyes; then
AC_DEFINE(ENABLE_HTTPD_OUTPUT, 1, [Define to enable the HTTP server output])
fi
-AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_shout = xyes || test x$enable_httpd_output = xyes)
+AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes)
AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_oggvorbis_encoder = xyes)
if test x$enable_oggvorbis_encoder = xyes; then
@@ -1212,9 +1220,7 @@ if
fi
echo ""
- if
- test x$enable_oggvorbis_encoder = xno &&
- test x$enable_lame = xno; then
+ if test x$enable_encoder = xno; then
AC_MSG_ERROR([Cannot enable a streaming output without an encoder.])
fi
fi