diff options
author | Max Kellermann <max@duempel.org> | 2009-04-13 20:46:31 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-04-13 20:46:31 +0200 |
commit | e216e01ab3db0d9bea179b043276401d38bfd957 (patch) | |
tree | f22ad6116f910e2737d48a7de7c50878372b0742 | |
parent | c824013e94743feb05c45fa82c3e81cceda120fa (diff) | |
download | mpd-e216e01ab3db0d9bea179b043276401d38bfd957.tar.gz mpd-e216e01ab3db0d9bea179b043276401d38bfd957.tar.xz mpd-e216e01ab3db0d9bea179b043276401d38bfd957.zip |
configure.ac: detect libzzip with pkg-config
Fail if the zzip plugin is enabled but not found.
-rw-r--r-- | Makefile.am | 14 | ||||
-rw-r--r-- | configure.ac | 7 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am index f552a820a..4f460b2bb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,6 +9,7 @@ src_mpd_CFLAGS = $(AM_CFLAGS) $(MPD_CFLAGS) src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \ $(SQLITE_CFLAGS) \ $(ID3TAG_CFLAGS) \ + $(ARCHIVE_CFLAGS) \ $(INPUT_CFLAGS) \ $(DECODER_CFLAGS) \ $(ENCODER_CFLAGS) \ @@ -17,6 +18,7 @@ src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \ src_mpd_LDADD = $(MPD_LIBS) \ $(SQLITE_LIBS) \ $(ID3TAG_LIBS) \ + $(ARCHIVE_LIBS) \ $(INPUT_LIBS) \ $(DECODER_LIBS) \ $(ENCODER_LIBS) \ @@ -267,6 +269,12 @@ endif # archive plugins +ARCHIVE_CFLAGS = \ + $(ZZIP_CFLAGS) + +ARCHIVE_LIBS = \ + $(ZZIP_LIBS) + ARCHIVE_SRC = if HAVE_BZ2 @@ -594,8 +602,10 @@ test_read_conf_SOURCES = test/read_conf.c \ src/conf.c src/buffer2array.c src/utils.c test_run_input_CPPFLAGS = $(AM_CPPFLAGS) \ + $(ARCHIVE_CFLAGS) \ $(INPUT_CFLAGS) test_run_input_LDADD = $(MPD_LIBS) \ + $(ARCHIVE_LIBS) \ $(INPUT_LIBS) \ $(GLIB_LIBS) test_run_input_SOURCES = test/run_input.c \ @@ -606,9 +616,11 @@ test_run_input_SOURCES = test/run_input.c \ test_run_decoder_CPPFLAGS = $(AM_CPPFLAGS) \ $(ID3TAG_CFLAGS) \ + $(ARCHIVE_CFLAGS) \ $(INPUT_CFLAGS) $(DECODER_CFLAGS) test_run_decoder_LDADD = $(MPD_LIBS) \ $(ID3TAG_LIBS) \ + $(ARCHIVE_LIBS) \ $(INPUT_LIBS) $(DECODER_LIBS) \ $(GLIB_LIBS) test_run_decoder_SOURCES = test/run_decoder.c \ @@ -622,9 +634,11 @@ test_run_decoder_SOURCES = test/run_decoder.c \ test_read_tags_CPPFLAGS = $(AM_CPPFLAGS) \ $(ID3TAG_CFLAGS) \ + $(ARCHIVE_CFLAGS) \ $(INPUT_CFLAGS) $(DECODER_CFLAGS) test_read_tags_LDADD = $(MPD_LIBS) \ $(ID3TAG_LIBS) \ + $(ARCHIVE_LIBS) \ $(INPUT_LIBS) $(DECODER_LIBS) \ $(GLIB_LIBS) test_read_tags_SOURCES = test/read_tags.c \ diff --git a/configure.ac b/configure.ac index 67945b51b..f7edd8145 100644 --- a/configure.ac +++ b/configure.ac @@ -324,11 +324,8 @@ AC_ARG_ENABLE(zip, [enable zip archive support (default: disabled)]),, enable_zip=no) -if test x$enable_zip = xyes; then - AC_CHECK_LIB(zzip, zzip_dir_open, - [MPD_LIBS="$MPD_LIBS -lzzip"], - enable_zip=no) -fi +MPD_AUTO_PKG(zip, ZZIP, [zziplib], + [libzzip archive library], [libzzip not found]) AM_CONDITIONAL(HAVE_ZIP, test x$enable_zip = xyes) if test x$enable_zip = xyes; then |