aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-01 18:37:40 +0200
committerMax Kellermann <max@duempel.org>2011-09-01 19:02:22 +0200
commit446f9973cc020490b649c3b40feae2fa9ca98c0d (patch)
tree07c6bbe3fefb265983d2ef84d79961d6ff5b1a07 /configure.ac
parent596f36bb78425c8bd6aa4e9a81c796cb78b011c0 (diff)
downloadmpd-446f9973cc020490b649c3b40feae2fa9ca98c0d.tar.gz
mpd-446f9973cc020490b649c3b40feae2fa9ca98c0d.tar.xz
mpd-446f9973cc020490b649c3b40feae2fa9ca98c0d.zip
configure.ac: fail if FLAC was enabled explicitly, but not found
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 8 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 4d855a70b..508775c09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,9 +171,9 @@ AC_ARG_ENABLE(fifo,
enable_fifo=yes)
AC_ARG_ENABLE(flac,
- AS_HELP_STRING([--disable-flac],
- [disable flac support (default: enable)]),,
- enable_flac=yes)
+ AS_HELP_STRING([--enable-flac],
+ [enable FLAC decoder]),,
+ enable_flac=auto)
AC_ARG_ENABLE(fluidsynth,
AS_HELP_STRING([--enable-fluidsynth],
@@ -750,10 +750,12 @@ fi
AM_CONDITIONAL(HAVE_FFMPEG, test x$enable_ffmpeg = xyes)
dnl ----------------------------------- FLAC ----------------------------------
+
+MPD_AUTO_PKG(flac, FLAC, [flac >= 1.1],
+ [FLAC decoder], [libFLAC not found])
+
if test x$enable_flac = xyes; then
- PKG_CHECK_MODULES(FLAC, [flac >= 1.1],
- AC_DEFINE(HAVE_FLAC, 1, [Define for FLAC support]),
- enable_flac=no)
+ AC_DEFINE(HAVE_FLAC, 1, [Define for FLAC support])
oldcflags="$CFLAGS"
oldlibs="$LIBS"