Skip to content

Commit

Permalink
Search /usr/local/src for SPL Object Directory
Browse files Browse the repository at this point in the history
Since we changed the default location for the kernel headers to respect
--prefix in the SPL, we must search that location to prevent user builds
from breaking.

Signed-off-by: Richard Yao <[email protected]>
  • Loading branch information
ryao committed Aug 29, 2014
1 parent 4df5a79 commit 16f7f4b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions config/kernel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,12 @@ AC_DEFUN([ZFS_AC_SPL], [
dnl # source directory. In order of preference:
dnl #
splsrc0="/var/lib/dkms/spl/${VERSION}/build"
splsrc1="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
splsrc2="/usr/src/spl-${VERSION}"
splsrc3="../spl/"
splsrc4="$LINUX"
splsrc1="/usr/local/src/spl-${VERSION}/${LINUX_VERSION}"
splsrc2="/usr/local/src/spl-${VERSION}"
splsrc3="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
splsrc4="/usr/src/spl-${VERSION}"
splsrc5="../spl/"

This comment has been minimized.

Copy link
@FransUrbo

FransUrbo Aug 29, 2014

Is there no better way to find spl, than hard coding it like this?! My spl is in /usr/src/spl (granted, splsrc5 would catch my setup, but still).

This comment has been minimized.

Copy link
@behlendorf

behlendorf Aug 29, 2014

I can't think of a cleaner way short of pulling it in to the zfs tree or forcing people to always specify --with-spl. At least /usr/local/src/ is a standard location.

@FransUrbo this will somehow need to be reconciled with your VPATH support. @ryao perhaps you could look that over, openzfs#2378, while your in this bit of the code.

This comment has been minimized.

Copy link
@FransUrbo

FransUrbo via email Aug 29, 2014

This comment has been minimized.

Copy link
@ryao

ryao Sep 2, 2014

Author Owner

@behlendorf I think it would be best to have separate commits. The patch not merged first could be rebased on top of the patch merged first.

splsrc6="$LINUX"
AC_MSG_CHECKING([spl source directory])
AS_IF([test -z "${splsrc}"], [
Expand All @@ -290,6 +292,10 @@ AC_DEFUN([ZFS_AC_SPL], [
splsrc=$(readlink -f "${splsrc3}")
], [ test -e "${splsrc4}/spl.release.in" ], [
splsrc=${splsrc4}
], [ test -e "${splsrc5}/spl.release.in"], [
splsrc=$(readlink -f "${splsrc5}")
], [ test -e "${splsrc6}/spl.release.in" ], [
splsrc=${splsrc6}
], [
splsrc="[Not found]"
])
Expand Down

0 comments on commit 16f7f4b

Please sign in to comment.