configure-updates-for-linux-kernel-detection-20010705
authorGarry Zacheiss <zacheiss@mit.edu>
Thu, 5 Jul 2001 16:30:12 +0000 (16:30 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 5 Jul 2001 16:30:12 +0000 (16:30 +0000)
report useful error if no kernel headers found. use last version string found
in version.h

configure.in

index 70efdec..5aa45be 100644 (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)