diff options
author | Chunwei Chen <[email protected]> | 2017-05-24 16:02:04 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-05-25 10:14:13 -0700 |
commit | 1d8da991714dd78ea2540005ca57792832152c9c (patch) | |
tree | e478ab40b15343a3c6d3159c36a8da443f9b7ee0 /config/kernel.m4 | |
parent | 952e490b1b243c1203fe94f4614ab1e46a52237d (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]>
Requires-spl: refs/pull/617/head
Diffstat (limited to 'config/kernel.m4')
-rw-r--r-- | config/kernel.m4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4 index c96c8b17f..324ab816f 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -202,6 +202,7 @@ AC_DEFUN([ZFS_AC_KERNEL], [ AS_IF([test "$kernelsrc" = "NONE"], [ kernsrcver=NONE ]) + withlinux=yes ]) AC_MSG_RESULT([$kernelsrc]) @@ -214,7 +215,7 @@ AC_DEFUN([ZFS_AC_KERNEL], [ AC_MSG_CHECKING([kernel build directory]) AS_IF([test -z "$kernelbuild"], [ - AS_IF([test -e "/lib/modules/$(uname -r)/build"], [ + AS_IF([test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"], [ kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` ], [test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}], [ kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} |