From e30431623a7d871da123cc37055ac49abf2c20ea Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 20 Nov 2012 01:24:32 +0100 Subject: build-sys: make loadable module support optional kmod is unecessary if loadable module support is disabled in the kernel, so make the dependency optional. --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 437ca6025c..ea4f44cef9 100644 --- a/configure.ac +++ b/configure.ac @@ -193,7 +193,18 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include = 1.3.2]) -PKG_CHECK_MODULES(KMOD, [libkmod >= 5]) + +# ------------------------------------------------------------------------------ +have_kmod=no +AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support])) +if test "x$enable_kmod" != "xno"; then + PKG_CHECK_MODULES(KMOD, [ libkmod >= 5 ], + [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available]) have_kmod=yes], have_kmod=no) + if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then + AC_MSG_ERROR([*** kmod support requested but libraries not found]) + fi +fi +AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"]) # ------------------------------------------------------------------------------ have_blkid=no @@ -860,6 +871,7 @@ AC_MSG_RESULT([ timedated: ${have_timedated} localed: ${have_localed} coredump: ${have_coredump} + kmod: ${have_kmod} blkid: ${have_blkid} firmware path: ${FIRMWARE_PATH} gudev: ${enable_gudev} -- cgit v1.2.3-54-g00ecf