-# Check kmod library
-AC_ARG_WITH(kmod-prefix,
- AS_HELP_STRING([--with-kmod-prefix=PATH],
- [Specify the installation prefix of the kmod library.
- Headers must be in PATH/include; libraries in PATH/lib.]),
- [
- AM_CPPFLAGS="$AM_CPPFLAGS -I${withval}/include"
- LDFLAGS="$LDFLAGS -L${withval}/lib64 -L${withval}/lib"
- ])
-
-AC_ARG_ENABLE(kmod,
- AS_HELP_STRING([--disable-kmod],[build without kmod support]),
- kmod_support=$enableval, kmod_support=yes)
+# Check for libkmod, it will be auto-neabled if found but won't fail if it's not,
+# it can be explicitly disabled with --without-kmod
+AH_TEMPLATE([HAVE_KMOD], [Define if you have kmod support])
+AC_ARG_WITH([kmod],
+ [AS_HELP_STRING([--with-kmod], [build with lkmod support @<:@default=check@:>@])],
+ [],
+ [with_kmod=check]
+)