summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorErik Nolte <erik_nolte@acm.org>2011-10-06 14:31:37 -0600
committerRichard W.M. Jones <rjones@redhat.com>2011-10-14 10:57:46 +0100
commita98be5ba1deea4f0b46eb4273ea278e3e0eb87ea (patch)
tree17363a8abd6becd363e13e9663d09844e7122a90 /configure.ac
parent359718fa6c7ff177ef3413552f57a174d7205102 (diff)
downloadfebootstrap-a98be5ba1deea4f0b46eb4273ea278e3e0eb87ea.tar.gz
febootstrap-a98be5ba1deea4f0b46eb4273ea278e3e0eb87ea.tar.xz
febootstrap-a98be5ba1deea4f0b46eb4273ea278e3e0eb87ea.zip
helper/init: Handle compressed modules transparently.
Detect libz and, if present, define HAS_LIBZ and add -lz to Makefile's LIBS variable. Add entry on optional zlib package requirement. Detect both uncompressed and gzipped kernel modules. Some Linux distros (like ArchLinux) use gzipped kernel modules with filenames like ext2.ko.gz. This change modifies the filename pattern from (e.g.) "ext2.ko" to "ext2.ko*". When available, use libz to read the module. The init_module system call requires uncompressed kernel module bytes. On some systems (e.g. ArchLinux) the modules are gzipped on disk. Libz is used to read and uncompress gzipped disk files (*.ko.gz) or transparently read uncompressed modules (*.ko).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 23c876b..dca5032 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,9 @@ AC_SUBST([APT_CACHE_DEPENDS_RECURSE_BROKEN])
dnl For ArchLinux handler.
AC_CHECK_PROG(PACMAN,[pacman],[pacman],[no])
+dnl Support for gzipped kernel modules.
+AC_CHECK_LIB([z],[gzopen])
+
dnl Required programs, libraries.
AC_PATH_PROG([MKE2FS],[mke2fs],[no],
[$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR])