diff options
author | Tom Gundersen <teg@jklm.no> | 2012-11-20 01:24:32 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2012-11-20 19:35:27 +0100 |
commit | e30431623a7d871da123cc37055ac49abf2c20ea (patch) | |
tree | b07f9dcec833b65964e3b07b2907a73ebbd03184 /configure.ac | |
parent | 1d0b59f932d96c108ad5e921213723a48e6b47b8 (diff) |
build-sys: make loadable module support optional
kmod is unecessary if loadable module support is disabled in the kernel,
so make the dependency optional.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 13 insertions, 1 deletions
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 <sys/ m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) PKG_CHECK_MODULES(DBUS, [dbus-1 >= 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} |