diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-10-25 22:44:31 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-10-25 22:44:31 +0200 |
commit | 0bd46e82f1457c3a55b635ced540e59c912bf330 (patch) | |
tree | 639bac5fe2fe3f9a22812aed521a451df2a2becd /configure.ac | |
parent | a68e0f336a746d6f23f6af1d2ce632069c671d17 (diff) |
Build and source kernel directoriesv5.0-pre9
Fall back to the build directory if the source directory is not specified.
Check that it looks like as a source directory.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0bff332..38164cf 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_ARG_WITH([kbuild], [KBUILDDIR="$withval";]) AC_ARG_WITH([ksource], AS_HELP_STRING([--with-ksource=PATH], - [Path to kernel source directory]), + [Path to kernel source directory, if not the same as the kernel build directory]), [KSOURCEDIR="$withval";]) AM_CONDITIONAL(WITH_KBUILDDIR, test "$KBUILDDIR" != "") AC_SUBST(KBUILDDIR) @@ -34,9 +34,15 @@ fi if test -n "$KSOURCEDIR"; then ksourcedir="$KSOURCEDIR" +elif test -e "$kbuilddir/include/linux/netfilter/nfnetlink.h"; then + ksourcedir="$kbuilddir" else ksourcedir="/lib/modules/$(uname -r)/source" fi +if test ! -e "$ksourcedir/include/linux/netfilter/nfnetlink.h" +then + AC_MSG_ERROR([Invalid kernel source directory $ksourcedir]) +fi if test ! -e "$kbuilddir/.config" then |