From 2718feb9ed6a65c7e279e3fbdf8fe0c3575d0890 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 2 Dec 2012 19:10:21 -0500 Subject: 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 --- configure.ac | 15 +++++++-------- 1 file 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]) # ------------------------------------------------------------------------------ -- cgit v1.2.3-54-g00ecf