]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-linux-find-kernel-build-link-path-to-kernel-headers-20050320
authorJeffrey Hutzelman <jhutz@cmu.edu>
Sun, 20 Mar 2005 15:08:18 +0000 (15:08 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 20 Mar 2005 15:08:18 +0000 (15:08 +0000)
look in /lib/modules for a path to the kernel build instead of just in /usr/src

(cherry picked from commit 2cfd611e919524ec39403a1eef3970a41f2e348f)

acinclude.m4

index a5fb5935d0182d9085622e69907339fca266aa99..2d041795c3a81a77b86e17e0582c678b89bede89 100644 (file)
@@ -115,7 +115,10 @@ case $system in
                 if test "x$with_linux_kernel_headers" != "x"; then
                   LINUX_KERNEL_PATH="$with_linux_kernel_headers"
                 else
-                  LINUX_KERNEL_PATH="/usr/src/linux-2.4"
+                  LINUX_KERNEL_PATH="/lib/modules/`uname -r`/build"
+                  if test ! -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
+                    LINUX_KERNEL_PATH="/usr/src/linux-2.4"
+                  fi
                   if test ! -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
                     LINUX_KERNEL_PATH="/usr/src/linux"
                   fi