X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=config%2Fkernel.m4;h=efb408c40e56dcc0adb19588389720b6684698e0;hb=ca8b5af89d2c5826af7385bf18f3b377b0efde11;hp=7d8a5f4d5339abc32ea3e6b360131ec87185e60f;hpb=5085d55817f67e2333366e517c6cc7a6fdda50f7;p=zfs.git diff --git a/config/kernel.m4 b/config/kernel.m4 index 7d8a5f4..efb408c 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -281,14 +281,35 @@ AC_DEFUN([ZFS_AC_SPL], [ AC_MSG_CHECKING([spl source directory]) AS_IF([test -z "$splsrc"], [ + dnl # + dnl # Look in the standard development package location + dnl # sourcelink=`ls -1d /usr/src/spl-*/${LINUX_VERSION} \ 2>/dev/null | tail -1` - AS_IF([test -z "$sourcelink" || test ! -e $sourcelink], [ + dnl # + dnl # Look in the DKMS source location + dnl # + AS_IF([test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h], [ + sourcelink=`ls -1d /var/lib/dkms/spl/*/build \ + 2>/dev/null | tail -1` + ]) + + dnl # + dnl # Look in the parent directory + dnl # + AS_IF([test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h], [ sourcelink=../spl ]) - AS_IF([test -e $sourcelink], [ + dnl # + dnl # Look in the kernel directory + dnl # + AS_IF([test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h], [ + sourcelink="$LINUX" + ]) + + AS_IF([test -e $sourcelink/spl_config.h], [ splsrc=`readlink -f ${sourcelink}` ], [ AC_MSG_RESULT([Not found])