Skip to content

Commit

Permalink
Check kernel source directory for SPL
Browse files Browse the repository at this point in the history
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 openzfs#896
  • Loading branch information
ryao authored and behlendorf committed Aug 26, 2012
1 parent 9e11c7e commit 074e729
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/kernel.m4
Expand Up @@ -302,6 +302,13 @@ AC_DEFUN([ZFS_AC_SPL], [
sourcelink=../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], [ AS_IF([test -e $sourcelink/spl_config.h], [
splsrc=`readlink -f ${sourcelink}` splsrc=`readlink -f ${sourcelink}`
], [ ], [
Expand Down
14 changes: 14 additions & 0 deletions configure
Expand Up @@ -12306,6 +12306,13 @@ fi
fi fi




if test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h; then

sourcelink="$LINUX"

fi


if test -e $sourcelink/spl_config.h; then if test -e $sourcelink/spl_config.h; then


splsrc=`readlink -f ${sourcelink}` splsrc=`readlink -f ${sourcelink}`
Expand Down Expand Up @@ -19915,6 +19922,13 @@ fi
fi fi




if test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h; then

sourcelink="$LINUX"

fi


if test -e $sourcelink/spl_config.h; then if test -e $sourcelink/spl_config.h; then


splsrc=`readlink -f ${sourcelink}` splsrc=`readlink -f ${sourcelink}`
Expand Down

0 comments on commit 074e729

Please sign in to comment.