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 <ryao@cs.stonybrook.edu>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closed #896
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}`
], [
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}`
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}`