configure.ac: detect libzzip with pkg-config

Fail if the zzip plugin is enabled but not found.
This commit is contained in:
Max Kellermann 2009-04-13 20:46:31 +02:00
parent c824013e94
commit e216e01ab3
2 changed files with 16 additions and 5 deletions

View File

@ -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 \

View File

@ -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