configure.ac: detect libzzip with pkg-config
Fail if the zzip plugin is enabled but not found.
This commit is contained in:
parent
c824013e94
commit
e216e01ab3
14
Makefile.am
14
Makefile.am
@ -9,6 +9,7 @@ src_mpd_CFLAGS = $(AM_CFLAGS) $(MPD_CFLAGS)
|
|||||||
src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \
|
src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
$(SQLITE_CFLAGS) \
|
$(SQLITE_CFLAGS) \
|
||||||
$(ID3TAG_CFLAGS) \
|
$(ID3TAG_CFLAGS) \
|
||||||
|
$(ARCHIVE_CFLAGS) \
|
||||||
$(INPUT_CFLAGS) \
|
$(INPUT_CFLAGS) \
|
||||||
$(DECODER_CFLAGS) \
|
$(DECODER_CFLAGS) \
|
||||||
$(ENCODER_CFLAGS) \
|
$(ENCODER_CFLAGS) \
|
||||||
@ -17,6 +18,7 @@ src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \
|
|||||||
src_mpd_LDADD = $(MPD_LIBS) \
|
src_mpd_LDADD = $(MPD_LIBS) \
|
||||||
$(SQLITE_LIBS) \
|
$(SQLITE_LIBS) \
|
||||||
$(ID3TAG_LIBS) \
|
$(ID3TAG_LIBS) \
|
||||||
|
$(ARCHIVE_LIBS) \
|
||||||
$(INPUT_LIBS) \
|
$(INPUT_LIBS) \
|
||||||
$(DECODER_LIBS) \
|
$(DECODER_LIBS) \
|
||||||
$(ENCODER_LIBS) \
|
$(ENCODER_LIBS) \
|
||||||
@ -267,6 +269,12 @@ endif
|
|||||||
|
|
||||||
# archive plugins
|
# archive plugins
|
||||||
|
|
||||||
|
ARCHIVE_CFLAGS = \
|
||||||
|
$(ZZIP_CFLAGS)
|
||||||
|
|
||||||
|
ARCHIVE_LIBS = \
|
||||||
|
$(ZZIP_LIBS)
|
||||||
|
|
||||||
ARCHIVE_SRC =
|
ARCHIVE_SRC =
|
||||||
|
|
||||||
if HAVE_BZ2
|
if HAVE_BZ2
|
||||||
@ -594,8 +602,10 @@ test_read_conf_SOURCES = test/read_conf.c \
|
|||||||
src/conf.c src/buffer2array.c src/utils.c
|
src/conf.c src/buffer2array.c src/utils.c
|
||||||
|
|
||||||
test_run_input_CPPFLAGS = $(AM_CPPFLAGS) \
|
test_run_input_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
|
$(ARCHIVE_CFLAGS) \
|
||||||
$(INPUT_CFLAGS)
|
$(INPUT_CFLAGS)
|
||||||
test_run_input_LDADD = $(MPD_LIBS) \
|
test_run_input_LDADD = $(MPD_LIBS) \
|
||||||
|
$(ARCHIVE_LIBS) \
|
||||||
$(INPUT_LIBS) \
|
$(INPUT_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_run_input_SOURCES = test/run_input.c \
|
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) \
|
test_run_decoder_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
$(ID3TAG_CFLAGS) \
|
$(ID3TAG_CFLAGS) \
|
||||||
|
$(ARCHIVE_CFLAGS) \
|
||||||
$(INPUT_CFLAGS) $(DECODER_CFLAGS)
|
$(INPUT_CFLAGS) $(DECODER_CFLAGS)
|
||||||
test_run_decoder_LDADD = $(MPD_LIBS) \
|
test_run_decoder_LDADD = $(MPD_LIBS) \
|
||||||
$(ID3TAG_LIBS) \
|
$(ID3TAG_LIBS) \
|
||||||
|
$(ARCHIVE_LIBS) \
|
||||||
$(INPUT_LIBS) $(DECODER_LIBS) \
|
$(INPUT_LIBS) $(DECODER_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_run_decoder_SOURCES = test/run_decoder.c \
|
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) \
|
test_read_tags_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
$(ID3TAG_CFLAGS) \
|
$(ID3TAG_CFLAGS) \
|
||||||
|
$(ARCHIVE_CFLAGS) \
|
||||||
$(INPUT_CFLAGS) $(DECODER_CFLAGS)
|
$(INPUT_CFLAGS) $(DECODER_CFLAGS)
|
||||||
test_read_tags_LDADD = $(MPD_LIBS) \
|
test_read_tags_LDADD = $(MPD_LIBS) \
|
||||||
$(ID3TAG_LIBS) \
|
$(ID3TAG_LIBS) \
|
||||||
|
$(ARCHIVE_LIBS) \
|
||||||
$(INPUT_LIBS) $(DECODER_LIBS) \
|
$(INPUT_LIBS) $(DECODER_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_read_tags_SOURCES = test/read_tags.c \
|
test_read_tags_SOURCES = test/read_tags.c \
|
||||||
|
@ -324,11 +324,8 @@ AC_ARG_ENABLE(zip,
|
|||||||
[enable zip archive support (default: disabled)]),,
|
[enable zip archive support (default: disabled)]),,
|
||||||
enable_zip=no)
|
enable_zip=no)
|
||||||
|
|
||||||
if test x$enable_zip = xyes; then
|
MPD_AUTO_PKG(zip, ZZIP, [zziplib],
|
||||||
AC_CHECK_LIB(zzip, zzip_dir_open,
|
[libzzip archive library], [libzzip not found])
|
||||||
[MPD_LIBS="$MPD_LIBS -lzzip"],
|
|
||||||
enable_zip=no)
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_ZIP, test x$enable_zip = xyes)
|
AM_CONDITIONAL(HAVE_ZIP, test x$enable_zip = xyes)
|
||||||
if test x$enable_zip = xyes; then
|
if test x$enable_zip = xyes; then
|
||||||
|
Loading…
Reference in New Issue
Block a user