configure: Try to extract kernel source directory from build Makefile.
authorBen Pfaff <blp@nicira.com>
Thu, 16 Feb 2012 18:34:55 +0000 (10:34 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 17 Feb 2012 00:43:40 +0000 (16:43 -0800)
commitc81a588c44f46e9f2eb6b4fe2f27338747c924cd
treedc6df9ea0161c5eecc1ed8502a420f52a376d82a
parent34988a47f3bcd7f75a1dc632a8872b5ae1211bc1
configure: Try to extract kernel source directory from build Makefile.

OVS needs to inspect the headers in the kernel source directory at build
time.  Debian keeps moving the source directory relative to the build
directory and doesn't provide an obvious way to find the source directory,
so in the past we've used some name-based heuristics to essentially guess
where it is.

This commit introduces a new heuristic that I hope will be more reliable:
extracting the source directory from the Makefile in the build directory.
In Debian's case, it looks like the Makefile generally contains a line of
the form "MAKEARGS := -C <srcdir> O=<outdir>".  This commit extracts the
source directory from that line.

To avoid regressions this commit retains the older heuristics as fallbacks.

CC: 659685@bugs.debian.org
Reported-by: Thomas Goirand <zigo@debian.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
acinclude.m4