From d20a8258b4913f6bfd6eb7a8ef03faa9b9e53bbb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 1 Apr 2009 21:54:38 +0200 Subject: [PATCH] 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. --- configure.ac | 14 ++++++++++---- 1 file 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