]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-linux26-set-mps-correctly-200412102
authorJeffrey Hutzelman <jhutz@cmu.edu>
Tue, 7 Dec 2004 06:05:41 +0000 (06:05 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 7 Dec 2004 06:05:41 +0000 (06:05 +0000)
FIXES 15645

set MPS correctly when compiling on 2.6

(cherry picked from commit f32f9810b188878e1e79b004873f91c1c538d40e)

acinclude.m4
src/cf/linux-test3.m4

index 9d58e95c4d740c475dfa245e7cb03323255bf254..3881a99b58f70c7232b4fe06d117a88088077203 100644 (file)
@@ -157,6 +157,10 @@ case $system in
                fi
                AC_MSG_RESULT(linux)
                if test "x$enable_kernel_module" = "xyes"; then
+                AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
+                if test "x${AFS_SYSKVERS}" = "x"; then
+                       AC_MSG_ERROR(Couldn't guess your Linux version [2])
+                fi
                 if test "x$enable_debug_kernel" = "xno"; then
                        LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
                 fi
@@ -194,7 +198,7 @@ case $system in
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
                 LINUX_WHICH_MODULES
-                 if test "x$ac_cv_linux_config_modversions" = "xno"; then
+                 if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
                    AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
                    ac_cv_linux_exports_sys_call_table=no
                   if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
@@ -653,7 +657,6 @@ else
        esac
        case $AFS_SYSNAME in
                *_linux*)
-                       AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
                        if test "x${AFS_SYSKVERS}" = "x"; then
                         AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
                        fi
index d72f8e79cab43210dc61de5c7fd53c492372f22b..177471e0b721c6ae108808184b3d7d17476d5d6b 100644 (file)
@@ -45,7 +45,7 @@ else
 [#include <linux/version.h>
 #include <linux/config.h>
 ],
-[#if !defined(CONFIG_MODVERSIONS) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+[#if !defined(CONFIG_MODVERSIONS)
 lose;
 #endif
 ],
@@ -53,7 +53,9 @@ lose;
   ac_cv_linux_config_modversions=no)])
   AC_MSG_RESULT($ac_cv_linux_config_modversions)
   AC_MSG_CHECKING(which kernel modules to build)
-  if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
+  if test "x$ac_linux_rhconfig" = "xyes"; then
+      MPS="MP SP"
+  elif test "x$ac_cv_linux_config_modversions" = "xno" -a "$AFS_SYSKVERS" -lt 26; then
       MPS="MP SP"
   else
   AC_CACHE_VAL(ac_cv_linux_config_smp, [