diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 167 |
1 files changed, 133 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac index 665f19b31..681feae6c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ AC_PREREQ(2.60) -AC_INIT(mpd, 0.15.3, musicpd-dev-team@lists.sourceforge.net) +AC_INIT(mpd, 0.16~git, musicpd-dev-team@lists.sourceforge.net) AC_CONFIG_SRCDIR([src/main.c]) -AM_INIT_AUTOMAKE([foreign 1.9 dist-bzip2]) +AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2]) AM_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) -AC_DEFINE(PROTOCOL_VERSION, "0.15.0", [The mpd protocol version]) +AC_DEFINE(PROTOCOL_VERSION, "0.16.0", [The MPD protocol version]) dnl @@ -100,7 +100,7 @@ dnl dnl libc features dnl -AC_CHECK_FUNCS(syslog) +AC_CHECK_FUNCS(daemon fork syslog) if test $ac_cv_func_syslog = no; then # syslog is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do @@ -389,13 +389,18 @@ dnl dnl decoder plugins dnl - - AC_ARG_ENABLE(audiofile, - AS_HELP_STRING([--disable-audiofile], - [disable audiofile support, disables wave support (default: enable)]),, + AS_HELP_STRING([--enable-audiofile], + [enable audiofile support, disables wave support]),, enable_audiofile=yes) +MPD_AUTO_PKG(audiofile, AUDIOFILE, [audiofile >= 0.1.7], + [audiofile decoder plugin], [libaudiofile not found]) +AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes) +if test x$enable_audiofile = xyes; then + AC_DEFINE(HAVE_AUDIOFILE, 1, [Define for audiofile support]) +fi + AC_ARG_ENABLE(ffmpeg, AS_HELP_STRING([--enable-ffmpeg], [enable FFMPEG support]),, @@ -422,6 +427,18 @@ if test x$enable_mad = xyes; then fi AM_CONDITIONAL(HAVE_MAD, test x$enable_mad = xyes) +AC_ARG_ENABLE(mpg123, + AS_HELP_STRING([--enable-mpg123], + [enable libmpg123 decoder plugin]),, + enable_mpg123=auto) + +MPD_AUTO_PKG(mpg123, MPG123, [libmpg123], + [libmpg123 decoder plugin], [libmpg123 not found]) +if test x$enable_mpg123 = xyes; then + AC_DEFINE(HAVE_MPG123, 1, [Define to use libmpg123]) +fi +AM_CONDITIONAL(HAVE_MPG123, test x$enable_mpg123 = xyes) + AC_ARG_ENABLE(mikmod, AS_HELP_STRING([--enable-mikmod], [enable the mikmod decoder (default: disable)]),, @@ -470,6 +487,27 @@ AC_ARG_ENABLE(vorbis, [disable Ogg Vorbis support (default: enable)]),, enable_vorbis=yes) +AC_ARG_ENABLE(sndfile, + AS_HELP_STRING([--enable-sndfile], + [enable sndfile support]),, + enable_sndfile=auto) + +if test x$enable_sndfile = xauto && test x$enable_modplug = xyes; then + dnl If modplug is enabled, enable sndfile only if explicitly + dnl requested - modplug's modplug/sndfile.h is known to + dnl conflict with libsndfile's sndfile.h. + AC_MSG_NOTICE([disabling libsndfile auto-detection, because the modplug decoder is enabled]) + enable_sndfile=no +fi + +MPD_AUTO_PKG(sndfile, SNDFILE, [sndfile], + [libsndfile decoder plugin], [libsndfile not found]) +AM_CONDITIONAL(ENABLE_SNDFILE, test x$enable_sndfile = xyes) +if test x$enable_sndfile = xyes; then + AC_DEFINE(ENABLE_SNDFILE, 1, [Define to enable the sndfile decoder plugin]) +fi + + dnl ### dnl Ogg Tremor dnl ### @@ -540,9 +578,16 @@ AC_ARG_ENABLE(wildmidi, enable_wildmidi=no) AC_ARG_ENABLE(wavpack, - AS_HELP_STRING([--disable-wavpack], - [disable WavPack support (default: enable)]),, - enable_wavpack=yes) + AS_HELP_STRING([--enable-wavpack], + [enable WavPack support]),, + enable_wavpack=auto) + +MPD_AUTO_PKG(wavpack, WAVPACK, [wavpack], + [WavPack decoder plugin], [libwavpack not found]) +AM_CONDITIONAL(HAVE_WAVPACK, test x$enable_wavpack = xyes) +if test x$enable_wavpack = xyes; then + AC_DEFINE([HAVE_WAVPACK], 1, [Define to enable WavPack support]) +fi dnl @@ -585,6 +630,11 @@ AC_ARG_ENABLE(lame-encoder, [enable the LAME mp3 encoder]),, enable_lame_encoder=auto) +AC_ARG_ENABLE(twolame-encoder, + AS_HELP_STRING([--enable-twolame-encoder], + [enable the TwoLAME mp2 encoder]),, + enable_twolame_encoder=auto) + dnl dnl audio output plugins @@ -670,6 +720,11 @@ fi AM_CONDITIONAL(HAVE_PULSE, test x$enable_pulse = xyes) +AC_ARG_ENABLE(recorder-output, + AS_HELP_STRING([--enable-recorder-output], + [enables the HTTP server output]),, + [enable_recorder_output=auto]) + AC_ARG_ENABLE(httpd-output, AS_HELP_STRING([--enable-httpd-output], [enables the HTTP server output]),, @@ -805,18 +860,6 @@ fi AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes) -if test x$enable_wavpack = xyes; then - PKG_CHECK_MODULES([WAVPACK], [wavpack], - [enable_wavpack=yes; - AC_DEFINE([HAVE_WAVPACK], 1, - [Define to enable WavPack support])] - MPD_LIBS="$MPD_LIBS $WAVPACK_LIBS" - MPD_CFLAGS="$MPD_CFLAGS $WAVPACK_CFLAGS", - enable_wavpack=no) -fi - -AM_CONDITIONAL(HAVE_WAVPACK, test x$enable_wavpack = xyes) - AM_PATH_FAAD() AM_CONDITIONAL(HAVE_FAAD, test x$enable_aac = xyes) @@ -905,14 +948,6 @@ AM_CONDITIONAL(HAVE_FLAC_COMMON, AM_CONDITIONAL(HAVE_OGG_COMMON, test x$enable_vorbis = xyes || test x$enable_oggflac = xyes || test x$enable_flac = xyes) -if test x$enable_audiofile = xyes; then - PKG_CHECK_MODULES(AUDIOFILE, [audiofile >= 0.1.7], - AC_DEFINE(HAVE_AUDIOFILE, 1, [Define for audiofile support]), - enable_audiofile=no) -fi - -AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes) - MPD_AUTO_PKG(ffmpeg, FFMPEG, [libavformat libavcodec libavutil], [ffmpeg decoder library], [libavformat+libavcodec+libavutil not found]) @@ -974,10 +1009,14 @@ dnl dnl Encoder API and shout/httpd output plugin dnl -if test x$enable_shout = xyes || test x$enable_httpd_output = xyes; then +if test x$enable_shout = xyes || \ + test x$enable_recorder_output = xyes || \ + test x$enable_httpd_output = xyes; then # at least one output using encoders is explicitly enabled need_encoder=yes -elif test x$enable_shout = xauto || test x$enable_httpd_output = xauto; then +elif test x$enable_shout = xauto || \ + test x$enable_recorder_output = xauto || \ + test x$enable_httpd_output = xauto; then need_encoder=auto else # all outputs using encoders are disabled @@ -986,6 +1025,7 @@ else # don't bother to check for encoder plugins enable_vorbis_encoder=no enable_lame_encoder=no + enable_twolame_encoder=no fi MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc], @@ -1000,8 +1040,12 @@ fi AC_SUBST(LAME_CFLAGS) AC_SUBST(LAME_LIBS) +MPD_AUTO_PKG(twolame_encoder, TWOLAME, [twolame], + [TwoLAME encoder], [libtwolame not found]) + if test x$enable_vorbis_encoder != xno || - test x$enable_lame_encoder != xno; then + test x$enable_lame_encoder != xno || + test x$enable_twolame_encoder != xno; then # at least one encoder plugin is enabled enable_encoder=yes else @@ -1025,6 +1069,17 @@ if test x$enable_shout = xauto; then fi fi +if test x$enable_recorder_output = xauto; then + # handle recorder auto-detection: disable if no encoder is + # available + if test x$enable_encoder = xyes; then + enable_recorder_output=yes + else + AC_MSG_WARN([No encoder plugin -- disabling the recorder output plugin]) + enable_recorder_output=no + fi +fi + if test x$enable_httpd_output = xauto; then # handle HTTPD auto-detection: disable if no encoder is # available @@ -1041,6 +1096,11 @@ if test x$enable_shout = xyes; then AC_DEFINE(HAVE_SHOUT, 1, [Define to enable the shoutcast output]) fi +AM_CONDITIONAL(ENABLE_RECORDER_OUTPUT, test x$enable_recorder_output = xyes) +if test x$enable_recorder_output = xyes; then + AC_DEFINE(ENABLE_RECORDER_OUTPUT, 1, [Define to enable the recorder output]) +fi + AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes) if test x$enable_httpd_output = xyes; then AC_DEFINE(ENABLE_HTTPD_OUTPUT, 1, [Define to enable the HTTP server output]) @@ -1060,6 +1120,12 @@ if test x$enable_lame_encoder = xyes; then [Define to enable the lame encoder plugin]) fi +AM_CONDITIONAL(ENABLE_TWOLAME_ENCODER, test x$enable_twolame_encoder = xyes) +if test x$enable_twolame_encoder = xyes; then + AC_DEFINE(ENABLE_TWOLAME_ENCODER, 1, + [Define to enable the TwoLAME encoder plugin]) +fi + dnl dnl Documentation @@ -1196,6 +1262,12 @@ else echo " FIFO support ..................disabled" fi +if test x$enable_recorder_output = xyes; then + echo " recorder support ..............enabled" +else + echo " recorder support ..............disabled" +fi + if test x$enable_httpd_output = xyes; then echo " HTTP daemon support ...........enabled" else @@ -1262,6 +1334,7 @@ if test x$enable_ao = xno && test x$enable_oss = xno && test x$enable_shout = xno && + test x$enable_recorder_output = xno && test x$enable_httpd_output = xno && test x$enable_solaris_output = xno && test x$enable_alsa = xno && @@ -1276,6 +1349,7 @@ fi if test x$enable_shout = xyes || + test x$enable_recorder = xyes || test x$enable_httpd_output = xyes; then echo " Streaming Encoder Support:" if test x$enable_lame_encoder = xyes; then @@ -1289,6 +1363,13 @@ if else echo " Ogg Vorbis encoder ............disabled" fi + + if test x$enable_twolame_encoder = xyes; then + echo " TwoLAME mp3 encoder ...........enabled" + else + echo " TwoLAME mp3 encoder ...........disabled" + fi + echo "" fi @@ -1342,6 +1423,12 @@ else echo " MAD mp3 decoder support .......disabled" fi +if test x$enable_mpg123 = xyes; then + echo " libmpg123 decoder support .....enabled" +else + echo " libmpg123 decoder support .....disabled" +fi + if test x$enable_mp4 = xyes; then echo " MP4 support ...................enabled" else @@ -1377,6 +1464,12 @@ else echo " Ogg Vorbis support ............disabled" fi +if test x$enable_sndfile = xyes; then + echo " libsndfile ....................enabled" +else + echo " libsndfile ....................disabled" +fi + if test x$enable_audiofile = xyes; then echo " Wave file support .............enabled" else @@ -1399,6 +1492,7 @@ fi if test x$enable_mad = xno && + test x$enable_mpg123 = xno && test x$enable_vorbis = xno && test x$enable_flac = xno && test x$enable_oggflac = xno && @@ -1489,6 +1583,11 @@ echo "" echo "##########################################" echo "" +if test x$enable_sndfile = xyes && test x$enable_modplug = xyes; then + AC_MSG_WARN([compilation may fail, because libmodplug conflicts with libsndfile]) + AC_MSG_WARN([libmodplug ships modplug/sndfile.h, which hides libsndfile's sndfile.h]) +fi + echo "Generating needed files for compilation" echo "" |