summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGabriele Giacone <1o5g4r8o@gmail.com>2014-03-20 10:44:20 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-03-20 10:44:20 +0100
commit7b054153eccbf0843fbbfb131855f56ea5c695e0 (patch)
tree42980519516696dd3d38d6bb0948403117581d86 /configure.ac
parent2294f2fdffcf724cc28653976b8029351e41fd77 (diff)
Make bz2 and gz support optional
* config.make.in (HAVE_LIBBZ2, HAVE_LIBZ): New variables. * configure.ac (--without-libbz2, --without-libz): New options. * ext2fs/Makefile (OTHERLIBS): Make -lbz2 and -lz optional. * fatfs/Makefile (OTHERLIBS): Likewise. * isofs/Makefile (OTHERLIBS): Likewise. * libstore/Makefile (maybe_part): Remove variable. (store-types): Add part, bunzip2 and gunzip support conditionnally. (LDLIBS): Make -lbz2 and -lz optional. (OBJS): Add GUNZIP_OBJS and BUNZIP2_OBJS optional.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 19 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index b6f777e2..ecabfdfd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,13 +211,31 @@ AS_IF([test "x$with_parted" != xno], [
])
AC_SUBST([PARTED_LIBS])
+AC_ARG_WITH([libbz2],
+ [AS_HELP_STRING([--without-libbz2], [disable libbz2])], , [with_libbz2=yes])
+
+AS_IF([test "x$with_libbz2" != xno], [
+ AC_CHECK_LIB(bz2, BZ2_bzCompress, [HAVE_LIBBZ2=1], [true])
+])
+AC_SUBST([HAVE_LIBBZ2])
+
+AC_ARG_WITH([libz],
+ [AS_HELP_STRING([--without-libz], [disable libz])], , [with_libz=yes])
+
+AS_IF([test "x$with_libz" != xno], [
+ AC_CHECK_LIB(z, deflate, [HAVE_LIBZ=1], [true])
+])
+AC_SUBST([HAVE_LIBZ])
+
AC_ARG_ENABLE(boot-store-types,
[ --enable-boot-store-types=TYPES...
list of store types included in statically
linked filesystems used for booting])dnl
if test -z "$enable_boot_store_types"; then
- boot_store_types='device remap gunzip bunzip2'
+ boot_store_types='device remap'
test -z "$PARTED_LIBS" || boot_store_types="$boot_store_types part"
+ test -z "$HAVE_LIBBZ2" || boot_store_types="$boot_store_types bunzip2"
+ test -z "$HAVE_LIBZ" || boot_store_types="$boot_store_types gunzip"
elif test "x$enable_boot_store_types" = xno; then
AC_MSG_WARN([you probably wanted --disable-static-progs])
else
@@ -315,9 +333,6 @@ PKG_CHECK_MODULES([libblkid], [blkid],
AC_SUBST([libblkid_LIBS])
AC_SUBST([libblkid_CFLAGS])
-AC_CHECK_LIB(bz2, BZ2_bzCompress, , AC_MSG_ERROR([libbz2 is required.]))
-AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([libz is required.]))
-
AC_CONFIG_FILES([config.make ${makefiles}])
AC_OUTPUT