aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-01 09:18:16 +0200
committerMax Kellermann <max@duempel.org>2011-09-01 10:58:36 +0200
commita1b880642244b9f732d327e1d93162652838bb06 (patch)
treeb12e5ad1e83091cbf2605ba5468ec61a5ffade83 /configure.ac
parente635d479129fe3a6ea4cff13b682be6cc97db81c (diff)
downloadmpd-a1b880642244b9f732d327e1d93162652838bb06.tar.gz
mpd-a1b880642244b9f732d327e1d93162652838bb06.tar.xz
mpd-a1b880642244b9f732d327e1d93162652838bb06.zip
configure.ac: fail if libid3tag was enabled explicitly, but not found
Add M4 function MPD_AUTO_PKG_LIB for pkg-config with AC_CHECK_LIB fallback.
Diffstat (limited to '')
-rw-r--r--configure.ac15
1 files changed, 5 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 4de63dac9..74aef61de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,9 +196,9 @@ AC_ARG_ENABLE(httpd-output,
[enable_httpd_output=auto])
AC_ARG_ENABLE(id3,
- AS_HELP_STRING([--disable-id3],
- [disable id3 support (default: enable)]),,
- enable_id3=yes)
+ AS_HELP_STRING([--enable-id3],
+ [disable id3 support]),,
+ enable_id3=auto)
AC_ARG_ENABLE(inotify,
AS_HELP_STRING([--disable-inotify],
@@ -510,13 +510,8 @@ fi
AM_CONDITIONAL(HAVE_CUE, test x$enable_cue = xyes)
dnl -------------------------------- libid3tag --------------------------------
-if test x$enable_id3 = xyes; then
- PKG_CHECK_MODULES([ID3TAG], [id3tag],,
- AC_CHECK_LIB(id3tag, id3_file_open,
- [ID3TAG_LIBS="-lid3tag -lz" ID3TAG_CFLAGS=""],
- enable_id3=no))
-fi
-
+MPD_AUTO_PKG_LIB(id3, ID3TAG, id3tag, id3tag, id3_file_open, [-lid3tag -lz], [],
+ [id3tag], [libid3tag not found])
if test x$enable_id3 = xyes; then
AC_DEFINE(HAVE_ID3TAG, 1, [Define to use id3tag])
fi