diff options
Diffstat (limited to 'config/spl-build.m4')
-rw-r--r-- | config/spl-build.m4 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c18db70df..d8eadb7e9 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -105,8 +105,11 @@ AC_DEFUN([SPL_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/* \ @@ -132,7 +135,9 @@ AC_DEFUN([SPL_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 |