The situation is: by default, we get a "auto" value for kmod compiling
option, so if we found required kmod files, then we build it with kmod
enabled, otherwise, just build without kmod and do not complain to user.

However, currently, if kmod version < 15 available in machine, and build
with default option, say no explicitly with "--enable/disable-kmod",
then the configure will fail with

...
checking for KMOD... no
configure: error: *** kmod version >= 15 not found
...

This isn't quite correct because the user didn't ask build with kmod,
why it complain with it.

So the correct behavior is only complain to user if it was required but
not available.

Signed-off-by: Chengwei Yang <chengwei.y...@intel.com>
---
 configure.ac |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7140627..2f4fe2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -288,10 +288,10 @@ if test "x$enable_kmod" != "xno"; then
         if test "x$have_kmod" = "xyes"; then
                 PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
                         [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is 
available])],
-                        AC_MSG_ERROR([*** kmod version >= 15 not found]))
+                        have_kmod=no)
         fi
         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 kmod version >= 
15 not found])
         fi
 fi
 AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
-- 
1.7.9.5

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to