From 36f97969f39637042a54c0d45877a48cc9dfcac1 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sat, 19 Dec 2009 22:22:05 -0500 Subject: [PATCH] Linux: utsrelease.h is moving In kernel 2.6.33, utsrelease.h has moved to include/generated. Adapt the configure code to consider that location, and clean up that section's indentation. Change-Id: I5061043ff7f46875a39953b11c472693650c7485 Reviewed-on: http://gerrit.openafs.org/1009 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- acinclude.m4 | 56 ++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 02b22b06c..183e2be2d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -365,33 +365,37 @@ case $system in else LINUX_KERNEL_BUILD=$LINUX_KERNEL_PATH fi - if test -f "$LINUX_KERNEL_BUILD/include/linux/utsrelease.h"; then - linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` - LINUX_VERSION="$linux_kvers" - else - if test -f "$LINUX_KERNEL_BUILD/include/linux/version.h"; then - linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` - if test "x$linux_kvers" = "x"; then - if test -f "$LINUX_KERNEL_BUILD/include/linux/version-up.h"; then - linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` - if test "x$linux_kvers" = "x"; then - - AC_MSG_ERROR(Linux headers lack version definition [2]) - exit 1 - else - LINUX_VERSION="$linux_kvers" - fi - else - AC_MSG_ERROR(Linux headers lack version definition) - exit 1 - fi - else - LINUX_VERSION="$linux_kvers" - fi + if test -f "$LINUX_KERNEL_BUILD/include/generated/utsrelease.h"; then + linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/generated/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` + LINUX_VERSION="$linux_kvers" else - enable_kernel_module="no" - fi - fi + if test -f "$LINUX_KERNEL_BUILD/include/linux/utsrelease.h"; then + linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` + LINUX_VERSION="$linux_kvers" + else + if test -f "$LINUX_KERNEL_BUILD/include/linux/version.h"; then + linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` + if test "x$linux_kvers" = "x"; then + if test -f "$LINUX_KERNEL_BUILD/include/linux/version-up.h"; then + linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1` + if test "x$linux_kvers" = "x"; then + AC_MSG_ERROR(Linux headers lack version definition [2]) + exit 1 + else + LINUX_VERSION="$linux_kvers" + fi + else + AC_MSG_ERROR(Linux headers lack version definition) + exit 1 + fi + else + LINUX_VERSION="$linux_kvers" + fi + else + enable_kernel_module="no" + fi + fi + fi if test ! -f "$LINUX_KERNEL_BUILD/include/linux/autoconf.h"; then enable_kernel_module="no" fi -- 2.39.5