aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-14 21:38:49 +0200
committerMax Kellermann <max@duempel.org>2009-07-14 21:38:49 +0200
commitb1afa40fc12088818a01c810d8cf6617a3afe627 (patch)
tree3382b376a322fdcd2cb8b536b98f71519981b157
parenta620e936cc92440c4cf0a0fada700fe801b6c1a1 (diff)
downloadmpd-b1afa40fc12088818a01c810d8cf6617a3afe627.tar.gz
mpd-b1afa40fc12088818a01c810d8cf6617a3afe627.tar.xz
mpd-b1afa40fc12088818a01c810d8cf6617a3afe627.zip
configure.ac: use more MPD_AUTO_PKG()
Fail when a feature is enabled, but the library is not found.
Diffstat (limited to '')
-rw-r--r--configure.ac43
1 files changed, 19 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac
index 81ff2f257..27251e427 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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([--disable-ffmpeg],
[enable FFMPEG support (default: enable)]),,
@@ -561,9 +566,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
@@ -827,15 +839,6 @@ fi
AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes)
-if test x$enable_wavpack = xyes; then
- PKG_CHECK_MODULES([WAVPACK], [wavpack],
- [AC_DEFINE([HAVE_WAVPACK], 1,
- [Define to enable WavPack support])],
- 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)
@@ -924,14 +927,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)
-
if test x$enable_ffmpeg = xyes; then
PKG_CHECK_MODULES(FFMPEG, [libavformat libavcodec libavutil],,
enable_ffmpeg=no)