configure-updates-for-linux-kernel-detection-20010705

report useful error if no kernel headers found. use last version string found
in version.h
This commit is contained in:
Garry Zacheiss 2001-07-05 16:30:12 +00:00 committed by Derrick Brashear
parent e7ec0d4213
commit 151b8b5e60

View File

@ -59,7 +59,7 @@ case $system in
LINUX_KERNEL_PATH="/usr/src/linux"
fi
if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $2 }'`
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $2 }'|tail -1`
if test "x$linux_kvers" = "x"; then
AC_MSG_ERROR(Linux headers lack version definition)
exit 1
@ -67,7 +67,7 @@ case $system in
LINUX_VERSION="$linux_kvers"
fi
else
AC_MSG_ERROR(No linux headers found at $with_linux_kernel_headers)
AC_MSG_ERROR(No linux headers found at $LINUX_KERNEL_PATH)
exit 1
fi
AC_MSG_RESULT(linux)