From f32f9810b188878e1e79b004873f91c1c538d40e Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Wed, 1 Dec 2004 22:46:22 +0000 Subject: [PATCH] linux26-set-mps-correctly-200412102 FIXES 15645 set MPS correctly when compiling on 2.6 --- acinclude.m4 | 7 +++++-- src/cf/linux-test3.m4 | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 9d58e95c4..3881a99b5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 diff --git a/src/cf/linux-test3.m4 b/src/cf/linux-test3.m4 index d72f8e79c..177471e0b 100644 --- a/src/cf/linux-test3.m4 +++ b/src/cf/linux-test3.m4 @@ -45,7 +45,7 @@ else [#include #include ], -[#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, [ -- 2.39.5