Linux: utsrelease.h is moving
authorMarc Dionne <marc.c.dionne@gmail.com>
Sun, 20 Dec 2009 03:22:05 +0000 (22:22 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Sun, 20 Dec 2009 18:05:21 +0000 (10:05 -0800)
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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

acinclude.m4

index 02b22b0..183e2be 100644 (file)
@@ -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