aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac218
1 files changed, 180 insertions, 38 deletions
diff --git a/configure.ac b/configure.ac
index 5f07ddd7c..6522060e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
AC_PREREQ(2.60)
-AC_INIT(mpd, 0.15.4, 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
@@ -118,6 +118,9 @@ AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",)
AC_CHECK_HEADERS(locale.h)
AC_CHECK_HEADERS(valgrind/memcheck.h)
+AC_CHECK_FUNCS(inotify_init)
+AM_CONDITIONAL(HAVE_INOTIFY, test x$ac_cv_func_inotify_init = xyes)
+
dnl
dnl mandatory libraries
@@ -280,9 +283,9 @@ AC_ARG_ENABLE(curl,
MPD_AUTO_PKG(curl, CURL, [libcurl],
[libcurl HTTP streaming], [libcurl not found])
if test x$enable_curl = xyes; then
- AC_DEFINE(HAVE_CURL, 1, [Define when libcurl is used for HTTP streaming])
+ AC_DEFINE(ENABLE_CURL, 1, [Define when libcurl is used for HTTP streaming])
fi
-AM_CONDITIONAL(HAVE_CURL, test x$enable_curl = xyes)
+AM_CONDITIONAL(ENABLE_CURL, test x$enable_curl = xyes)
AC_ARG_ENABLE(lastfm,
AS_HELP_STRING([--enable-lastfm],
@@ -389,13 +392,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 +430,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 +490,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 ###
@@ -516,12 +557,17 @@ if test x$enable_sidplay != xno; then
# library name triggers an autoconf bug
AC_CHECK_LIB(resid-builder, main,
[found_sidplay=yes], [found_sidplay=no])
+
+ if test x$found_sidplay = xyes; then
+ AC_HAVE_LIBRARY(sidutils,, [found_sidplay=no])
+ fi
+
MPD_AUTO_RESULT(sidplay, [sidplay decoder plugin],
- [libresid-builder not found])
+ [libresid-builder or libsidutils not found])
fi
if test x$enable_sidplay = xyes; then
- AC_SUBST(SIDPLAY_LIBS,"-lsidplay2 -lresid-builder")
+ AC_SUBST(SIDPLAY_LIBS,"-lsidplay2 -lresid-builder -lsidutils")
AC_SUBST(SIDPLAY_CFLAGS,)
AC_DEFINE(ENABLE_SIDPLAY, 1, [Define for libsidplay2 support])
@@ -540,9 +586,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 +638,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
@@ -656,6 +714,11 @@ AC_ARG_ENABLE(oss,
[disable OSS support (default: enable)]),,
enable_oss=yes)
+AC_ARG_ENABLE(openal,
+ AS_HELP_STRING([--enable-openal],
+ [enable OpenAL support (default: disable)]),,
+ enable_openal=no)
+
AC_ARG_ENABLE(pulse,
AS_HELP_STRING([--enable-pulse],
[enable support for the PulseAudio sound server]),,
@@ -670,6 +733,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]),,
@@ -719,6 +787,29 @@ fi
AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes)
+if test x$enable_openal = xyes; then
+ if test x$enable_osx = xyes; then
+ AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h], [], [enable_openal=no])
+ if test x$enable_openal = xyes; then
+ OPENAL_LIBS="-framework OpenAL"
+ AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support])
+ else
+ AC_MSG_WARN(OpenAL headers not found -- disabling OpenAL support)
+ fi
+ else
+ PKG_CHECK_MODULES([OPENAL], [openal],
+ AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support]),
+ enable_openal=no)
+ fi
+fi
+
+if test x$enable_openal = xyes; then
+ MPD_CFLAGS="$MPD_CFLAGS $OPENAL_CFLAGS"
+ MPD_LIBS="$MPD_LIBS $OPENAL_LIBS"
+fi
+
+AM_CONDITIONAL(HAVE_OPENAL, test x$enable_openal = xyes)
+
if test x$enable_fifo = xyes; then
AC_CHECK_FUNC([mkfifo],
[enable_fifo=yes;AC_DEFINE([HAVE_FIFO], 1,
@@ -805,18 +896,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 +984,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 +1045,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 +1061,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 +1076,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 +1105,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 +1132,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 +1156,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 +1298,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
@@ -1220,6 +1328,12 @@ else
echo " OSS support ...................disabled"
fi
+if test x$enable_openal = xyes; then
+ echo " OpenAL support ................enabled"
+else
+ echo " OpenAL support ................disabled"
+fi
+
if test x$enable_osx = xyes; then
echo " OS X support ..................enabled"
else
@@ -1261,7 +1375,9 @@ echo ""
if
test x$enable_ao = xno &&
test x$enable_oss = xno &&
+ test x$enable_openal = 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 +1392,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 +1406,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 +1466,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 +1507,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 +1535,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 +1626,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 ""