summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-07-11 10:33:48 -0400
committerDave Reisner <dreisner@archlinux.org>2013-07-11 10:33:48 -0400
commite2ca86cf78f911a8be51f0224796e24883019139 (patch)
tree2841a994face6533c1138badbdf93c6c9c7349b2 /configure.ac
parent852752fca2f73323e3c25b33348b3c92458665ae (diff)
configure: split checks for libkmod >= 14
PKG_CHECK_EXISTS won't created a cached variable that later messes with our PKG_CHECK_MODULES check for an explicit version. Unfortunately, nesting these checks as the code existed lead to an odd error. Rather, split the checks apart. This also improves to the error message when the requisite version isn't found, and supplies the literal version systemd needs.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 7451ea4fd0..1e196f7307 100644
--- a/configure.ac
+++ b/configure.ac
@@ -218,12 +218,12 @@ 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 ],
- [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)
+ PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
+ if test "x$have_kmod" = "xyes"; then
+ PKG_CHECK_MODULES(KMOD, [ libkmod >= 14 ],
+ [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
+ AC_MSG_ERROR([*** kmod version >= 14 not found]))
+ fi
if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
AC_MSG_ERROR([*** kmod support requested, but libraries not found])
fi