summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2012-12-02 19:10:21 -0500
committerRichard Yao <ryao@cs.stonybrook.edu>2012-12-02 19:45:55 -0500
commit2718feb9ed6a65c7e279e3fbdf8fe0c3575d0890 (patch)
treea6fea8d640460ff66f48784bfe6f3f881ee027bc /configure.ac
parentbfbd4ee14e2f7c2f7521472deb0d107606b2250f (diff)
Fix autotools module checks
Module loading support was unconditionally disabled in the initial autotools tests. I had missed this in my testing because I still had the 80-drivers.rules file from udev 171 on my system, which masked this issue by invoking modprobe explicitly. This patch corrects the issue. Signed-off-by: Richard Yao <ryao@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 7 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index cf30b1bd78..ff9dacf218 100644
--- a/configure.ac
+++ b/configure.ac
@@ -251,15 +251,14 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
# ------------------------------------------------------------------------------
-LIBKMOD=
-AC_ARG_ENABLE([modules], [AS_HELP_STRING([--disable-modules], [Disable loadable module support @<:@default=enabled@:>@])], [have_modules=no], [have_modules=yes])
-AC_ARG_ENABLE([libkmod], [AS_HELP_STRING([--enable-libkmod], [Enable module loading through kmod @<:@default=disabled@:>@])], [have_libkmod=yes], [have_libkmod=no])
+AC_ARG_ENABLE(modules, [AS_HELP_STRING([--disable-modules], [Disable loadable module support @<:@default=enabled@:>@])])
+AC_ARG_ENABLE(libkmod, [AS_HELP_STRING([--enable-libkmod], [Enable module loading through kmod @<:@default=disabled@:>@])], [], [enable_libkmod=no])
-if test "x$have_modules" == "xyes"; then
+if test "x${enable_modules}" = xyes; then
AC_DEFINE([HAVE_MODULES], [1], [Define if we support loading modules])
- AS_IF([test "x$have_libkmod" != xno],
+ AS_IF([test "x${enable_libkmod}" = xyes],
[AC_CHECK_LIB([kmod], [main],
[PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
AC_SUBST([LIBKMOD], ["-lkmod"])
@@ -267,13 +266,13 @@ if test "x$have_modules" == "xyes"; then
[Define if you have libkmod])
],
[AC_MSG_FAILURE(
- [--with-libkmod was given, but test for kmod failed])],
+ [--enable-libkmod was given, but test for kmod failed])],
[-lkmod])])
fi
-AM_CONDITIONAL([HAVE_MODULES], [test "x$have_modules" == "xyes"])
-AM_CONDITIONAL([HAVE_LIBKMOD], [test "x$have_libkmod" == "xyes"])
+AM_CONDITIONAL([HAVE_MODULES], [test "x${enable_modules}" = xyes])
+AM_CONDITIONAL([HAVE_LIBKMOD], [test "x${enable_libkmod}" = xyes])
# ------------------------------------------------------------------------------