diff options
author | Tom Gundersen <teg@jklm.no> | 2013-07-09 00:12:35 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2013-07-09 00:19:55 +0200 |
commit | c4955740969d7ba8ba43b024bca1a0a5b56eb8e8 (patch) | |
tree | 3f2298d522c98ab17eb102394fdbc75c195bf2d3 | |
parent | edeb68c53f1cdc452016b4c8512586a70b1262e3 (diff) |
configure: fail if out-of-date kmod found and kmod not disabled
Almost everyone wants kmod support, so don't fail silently if the libs are
out-of-date.
kmod can still be explicitly disabled and if it is not found at all, we still
default to disabling it.
-rw-r--r-- | configure.ac | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index be867079c2..7451ea4fd0 100644 --- a/configure.ac +++ b/configure.ac @@ -218,10 +218,14 @@ PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2]) 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 >= 14 ], - [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available]) have_kmod=yes], have_kmod=no) + PKG_CHECK_MODULES(KMOD, [ libkmod ], + [PKG_CHECK_MODULES(KMOD, [ libkmod >= 14 ], + [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available]) have_kmod=yes], + AC_MSG_ERROR([*** kmod out-of-date, try --disable-kmod])) + ], + 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]) + AC_MSG_ERROR([*** kmod support requested, but libraries not found]) fi fi AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"]) |