aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-27 13:45:17 +0100
committerMax Kellermann <max@duempel.org>2008-12-27 13:45:17 +0100
commit4c13a276c4340752fe955057cbb8cae82163292d (patch)
tree96f7d016f0b4e405d35cb7be173017a48484a81c /configure.ac
parent9220e0edfff2428fbbcec60460c5841cbd40eadd (diff)
downloadmpd-4c13a276c4340752fe955057cbb8cae82163292d.tar.gz
mpd-4c13a276c4340752fe955057cbb8cae82163292d.tar.xz
mpd-4c13a276c4340752fe955057cbb8cae82163292d.zip
configure.ac: moved archive library checks to options
Don't split configure options and their implementation. Check for the backend library before the AM_CONDITIONAL, otherwise Makefile.am will compile the plugin although the library may not be available.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 16 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index c8a2152ba..9bfccafaf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,48 +174,50 @@ dnl
dnl archive plugins
dnl
+dnl bzip2
AC_ARG_ENABLE(bz2,
AS_HELP_STRING([--enable-bz2],
[enable rar archive support (default: disabled)]),
enable_bz2=$enableval,
enable_bz2=no)
+AC_CHECK_LIB(bz2, BZ2_bzDecompressInit,[MPD_LIBS="-lbz2";],enable_bz2=no)
+
AM_CONDITIONAL(HAVE_BZ2, test x$enable_bz2 = xyes)
+if test x$enable_bz2 = xyes; then
+ AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
+fi
+dnl zip
AC_ARG_ENABLE(zip,
AS_HELP_STRING([--enable-zip],
[enable zip archive support (default: disabled)]),
enable_zip=$enableval,
enable_zip=no)
+AC_CHECK_LIB(zzip, zzip_dir_open,[MPD_LIBS="-lzzip";],enable_zip=no)
+
AM_CONDITIONAL(HAVE_ZIP, test x$enable_zip = xyes)
+if test x$enable_zip = xyes; then
+ AC_DEFINE(HAVE_ZIP, 1, [Define to have zip archive support])
+fi
+dnl iso9660
AC_ARG_ENABLE(iso9660,
AS_HELP_STRING([--enable-iso9660],
[enable iso9660 archive support (default: disabled)]),
enable_iso=$enableval,
enable_iso=no)
-AM_CONDITIONAL(HAVE_ISO, test x$enable_iso = xyes)
-
-# archive plugin libraries
-
-AC_CHECK_LIB(bz2, BZ2_bzDecompressInit,[MPD_LIBS="-lbz2";],enable_bz2=no)
-if test x$enable_bz2 = xyes; then
- AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
-fi
-
-AC_CHECK_LIB(zzip, zzip_dir_open,[MPD_LIBS="-lzzip";],enable_zip=no)
-if test x$enable_zip = xyes; then
- AC_DEFINE(HAVE_ZIP, 1, [Define to have zip archive support])
-fi
-
AC_CHECK_LIB(iso9660, iso9660_ifs_readdir ,,enable_iso=no)
+
+AM_CONDITIONAL(HAVE_ISO, test x$enable_iso = xyes)
if test x$enable_iso = xyes; then
MPD_LIBS="$MPD_LIBS -liso9660"
AC_DEFINE(HAVE_ISO, 1, [Define to have iso archive support])
fi
+
dnl
dnl decoder plugins
dnl