Skip to content

Commit

Permalink
Make configure error clearer when failing to find SPL
Browse files Browse the repository at this point in the history
Signed-off-by: Olaf Faaland <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #4251
  • Loading branch information
ofaaland authored and behlendorf committed Feb 17, 2016
1 parent 093911f commit c7e7ec1
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions config/kernel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ AC_DEFUN([ZFS_AC_SPL], [
AC_ARG_WITH([spl],
AS_HELP_STRING([--with-spl=PATH],
[Path to spl source]),
[splsrc="$withval"])
AS_IF([test "$withval" = "yes"],
AC_MSG_ERROR([--with-spl=PATH requires a PATH]),
[splsrc="$withval"]))
AC_ARG_WITH([spl-obj],
AS_HELP_STRING([--with-spl-obj=PATH],
Expand All @@ -278,6 +280,14 @@ AC_DEFUN([ZFS_AC_SPL], [
AC_MSG_CHECKING([spl source directory])
AS_IF([test -z "${splsrc}"], [
[all_spl_sources="
${splsrc0}
${splsrc1}
${splsrc2}
${splsrc3}
${splsrc4}
${splsrc5}
${splsrc6}"],
AS_IF([ test -e "${splsrc0}/spl.release.in"], [
splsrc=${splsrc0}
], [ test -e "${splsrc1}/spl.release.in"], [
Expand All @@ -296,6 +306,7 @@ AC_DEFUN([ZFS_AC_SPL], [
splsrc="[Not found]"
])
], [
[all_spl_sources="$withval"],
AS_IF([test "$splsrc" = "NONE"], [
splbuild=NONE
splsrcver=NONE
Expand All @@ -307,7 +318,10 @@ AC_DEFUN([ZFS_AC_SPL], [
AC_MSG_ERROR([
*** Please make sure the kmod spl devel package for your distribution
*** is installed then try again. If that fails you can specify the
*** location of the spl source with the '--with-spl=PATH' option.])
*** location of the spl source with the '--with-spl=PATH' option.
*** The spl version must match the version of ZFS you are building,
*** ${VERSION}. Failed to find spl.release.in in the following:
$all_spl_sources])
])
dnl #
Expand All @@ -323,6 +337,10 @@ AC_DEFUN([ZFS_AC_SPL], [
dnl # SPL package.
dnl #
AC_MSG_CHECKING([spl build directory])
all_spl_config_locs="${splsrc}/${LINUX_VERSION}
${splsrc}"
while true; do
AS_IF([test -z "$splbuild"], [
AS_IF([ test -e "${splsrc}/${LINUX_VERSION}/spl_config.h" ], [
Expand All @@ -349,7 +367,9 @@ AC_DEFUN([ZFS_AC_SPL], [
*** Please make sure the kmod spl devel <kernel> package for your
*** distribution is installed then try again. If that fails you
*** can specify the location of the spl objects with the
*** '--with-spl-obj=PATH' option.])
*** '--with-spl-obj=PATH' option. Failed to find spl_config.h in
*** any of the following:
$all_spl_config_locs])
])
AC_MSG_CHECKING([spl source version])
Expand Down

0 comments on commit c7e7ec1

Please sign in to comment.