diff options
author | Brian Behlendorf <[email protected]> | 2012-11-29 19:26:19 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-11-29 15:05:54 -0800 |
commit | 251677e98fd41170a885095626a9247d609661b0 (patch) | |
tree | 2751bb7176b696405c0c2a73c35f18eff17f5b3a /config | |
parent | 043f9b57247eafb8e28e7b9465470ece87090228 (diff) |
Verify --with-linux source directory exists
Previously this check was only performed when ./configure was
attempting to autodetect your kernel source directory. But we
should also handle the case where --with-linux was provided
and is obviously wrong. This way we catch the error before
invoking make and compiling the source with an incorrect
autoconf results.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #162
Diffstat (limited to 'config')
-rw-r--r-- | config/spl-build.m4 | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 957d46c48..e8ecbc654 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -141,11 +141,7 @@ AC_DEFUN([SPL_AC_KERNEL], [ if test -n "$sourcelink" && test -e ${sourcelink}; then kernelsrc=`readlink -f ${sourcelink}` else - AC_MSG_RESULT([Not found]) - AC_MSG_ERROR([ - *** Please make sure the kernel devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the kernel source with the '--with-linux=PATH' option.]) + kernelsrc="[Not found]" fi else if test "$kernelsrc" = "NONE"; then @@ -154,6 +150,13 @@ AC_DEFUN([SPL_AC_KERNEL], [ fi AC_MSG_RESULT([$kernelsrc]) + if test ! -d "$kernelsrc"; then + AC_MSG_ERROR([ + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option.]) + fi + AC_MSG_CHECKING([kernel build directory]) if test -z "$kernelbuild"; then if test -e "/lib/modules/$(uname -r)/build"; then |