From: Richard Yao Date: Sat, 25 Aug 2012 22:32:54 +0000 (-0400) Subject: Check kernel source directory for SPL X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=commitdiff_plain;h=074e72953cb3229e270e384f4dabd6d05c836060;p=zfs.git Check kernel source directory for SPL ZFS fails to build when SPL is built into the kernel on unless --with-spl=/path/to/kernel/sources is specified. We fallback to the kernel sources directory when SPL is not found elsewhere to resolve that. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closed #896 --- diff --git a/config/kernel.m4 b/config/kernel.m4 index c08b6a2..efb408c 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -302,6 +302,13 @@ AC_DEFUN([ZFS_AC_SPL], [ sourcelink=../spl ]) + 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}` ], [ diff --git a/configure b/configure index 83fc2a8..714aaad 100755 --- a/configure +++ b/configure @@ -12306,6 +12306,13 @@ fi fi + if test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h; then + + sourcelink="$LINUX" + +fi + + if test -e $sourcelink/spl_config.h; then splsrc=`readlink -f ${sourcelink}` @@ -19915,6 +19922,13 @@ fi fi + if test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h; then + + sourcelink="$LINUX" + +fi + + if test -e $sourcelink/spl_config.h; then splsrc=`readlink -f ${sourcelink}`