summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/kernel.m411
-rwxr-xr-xconfigure22
2 files changed, 24 insertions, 9 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4
index c2fc5a098..2c83dc590 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -78,8 +78,11 @@ AC_DEFUN([ZFS_AC_KERNEL], [
AC_MSG_CHECKING([kernel source directory])
if test -z "$kernelsrc"; then
- headersdir="/lib/modules/$(uname -r)/build"
- if test -e "$headersdir"; then
+ if test -e "/lib/modules/$(uname -r)/source"; then
+ headersdir="/lib/modules/$(uname -r)/source"
+ sourcelink=$(readlink -f "$headersdir")
+ elif test -e "/lib/modules/$(uname -r)/build"; then
+ headersdir="/lib/modules/$(uname -r)/build"
sourcelink=$(readlink -f "$headersdir")
else
sourcelink=$(ls -1d /usr/src/kernels/* \
@@ -105,7 +108,9 @@ AC_DEFUN([ZFS_AC_KERNEL], [
AC_MSG_RESULT([$kernelsrc])
AC_MSG_CHECKING([kernel build directory])
if test -z "$kernelbuild"; then
- if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
+ if test -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}
elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
kernelbuild=${kernelsrc}-obj/${target_cpu}/default
diff --git a/configure b/configure
index e76d64ddf..716a73fee 100755
--- a/configure
+++ b/configure
@@ -11856,8 +11856,11 @@ fi
{ $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
$as_echo_n "checking kernel source directory... " >&6; }
if test -z "$kernelsrc"; then
- headersdir="/lib/modules/$(uname -r)/build"
- if test -e "$headersdir"; then
+ if test -e "/lib/modules/$(uname -r)/source"; then
+ headersdir="/lib/modules/$(uname -r)/source"
+ sourcelink=$(readlink -f "$headersdir")
+ elif test -e "/lib/modules/$(uname -r)/build"; then
+ headersdir="/lib/modules/$(uname -r)/build"
sourcelink=$(readlink -f "$headersdir")
else
sourcelink=$(ls -1d /usr/src/kernels/* \
@@ -11891,7 +11894,9 @@ $as_echo "$kernelsrc" >&6; }
{ $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
$as_echo_n "checking kernel build directory... " >&6; }
if test -z "$kernelbuild"; then
- if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
+ if test -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}
elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
kernelbuild=${kernelsrc}-obj/${target_cpu}/default
@@ -15378,8 +15383,11 @@ fi
{ $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
$as_echo_n "checking kernel source directory... " >&6; }
if test -z "$kernelsrc"; then
- headersdir="/lib/modules/$(uname -r)/build"
- if test -e "$headersdir"; then
+ if test -e "/lib/modules/$(uname -r)/source"; then
+ headersdir="/lib/modules/$(uname -r)/source"
+ sourcelink=$(readlink -f "$headersdir")
+ elif test -e "/lib/modules/$(uname -r)/build"; then
+ headersdir="/lib/modules/$(uname -r)/build"
sourcelink=$(readlink -f "$headersdir")
else
sourcelink=$(ls -1d /usr/src/kernels/* \
@@ -15413,7 +15421,9 @@ $as_echo "$kernelsrc" >&6; }
{ $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
$as_echo_n "checking kernel build directory... " >&6; }
if test -z "$kernelbuild"; then
- if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
+ if test -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}
elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
kernelbuild=${kernelsrc}-obj/${target_cpu}/default