summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2017-05-24 15:42:34 -0700
committerBrian Behlendorf <[email protected]>2017-05-25 10:12:50 -0700
commitac48361c0c16f36407643f931f92162145618865 (patch)
tree9f1b5a105944ae76fbbb55307aed2c1783130885 /config
parent3bda331ba8a609cd72be8f67946e12ffe1fcf4f2 (diff)
config: allow --with-linux without --with-linux-obj
Don't use `uname -r` to determine kernel build directory when the user specified kernel source with --with-linux. Otherwise, the user is forced to use --with-linux-obj even if they are the same directory, which is very counterintuitive. Signed-off-by: Chunwei Chen <[email protected]>
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index b5aa7adac..7569988da 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -113,6 +113,7 @@ AC_DEFUN([SPL_AC_KERNEL], [
if test "$kernelsrc" = "NONE"; then
kernsrcver=NONE
fi
+ withlinux=yes
fi
AC_MSG_RESULT([$kernelsrc])
@@ -125,7 +126,7 @@ AC_DEFUN([SPL_AC_KERNEL], [
AC_MSG_CHECKING([kernel build directory])
if test -z "$kernelbuild"; then
- if test -e "/lib/modules/$(uname -r)/build"; then
+ if test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"; then
kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}