Make Missing Modules.symvers Fatal

Detect early on in configure if the Modules.symvers file is missing.
Without this file there will be build failures later and it's best
to catch this early and provide a useful error.  In this case the
most likely problem is the kernel-devel packages are not installed.
It may also be possible that they are using an unbuilt custom kernel
in which case they must build the kernel first.
This commit is contained in:
Brian Behlendorf 2011-03-07 12:59:30 -08:00
parent 7731d46b69
commit 912fd84d13
2 changed files with 36 additions and 0 deletions

View File

@ -87,6 +87,14 @@ AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
else
LINUX_SYMBOLS=Module.symvers
fi
if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
AC_MSG_ERROR([
*** Please make sure the kernel devel package for your distribution
*** is installed. If your building with a custom kernel make sure the
*** kernel is configured, built, and the '--with-linux=PATH' configure
*** option refers to the location of the kernel source.])
fi
else
LINUX_SYMBOLS=NONE
fi

28
configure vendored
View File

@ -11784,6 +11784,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; }
else
LINUX_SYMBOLS=Module.symvers
fi
if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
{ { $as_echo "$as_me:$LINENO: error:
*** Please make sure the kernel devel package for your distribution
*** is installed. If your building with a custom kernel make sure the
*** kernel is configured, built, and the '--with-linux=PATH' configure
*** option refers to the location of the kernel source." >&5
$as_echo "$as_me: error:
*** Please make sure the kernel devel package for your distribution
*** is installed. If your building with a custom kernel make sure the
*** kernel is configured, built, and the '--with-linux=PATH' configure
*** option refers to the location of the kernel source." >&2;}
{ (exit 1); exit 1; }; }
fi
else
LINUX_SYMBOLS=NONE
fi
@ -15592,6 +15606,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; }
else
LINUX_SYMBOLS=Module.symvers
fi
if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
{ { $as_echo "$as_me:$LINENO: error:
*** Please make sure the kernel devel package for your distribution
*** is installed. If your building with a custom kernel make sure the
*** kernel is configured, built, and the '--with-linux=PATH' configure
*** option refers to the location of the kernel source." >&5
$as_echo "$as_me: error:
*** Please make sure the kernel devel package for your distribution
*** is installed. If your building with a custom kernel make sure the
*** kernel is configured, built, and the '--with-linux=PATH' configure
*** option refers to the location of the kernel source." >&2;}
{ (exit 1); exit 1; }; }
fi
else
LINUX_SYMBOLS=NONE
fi