1 AC_DEFUN(LINUX_NEED_RHCONFIG,[
2 if test "x$enable_redhat_buildsys" = "xyes"; then
6 AC_MSG_CHECKING(for redhat kernel configuration)
7 if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then
9 RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0 -U__SMP__"
10 RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1 -D__SMP__"
11 AC_MSG_RESULT($ac_linux_rhconfig)
12 if test ! -f "/boot/kernel.h"; then
13 AC_MSG_WARN([/boot/kernel.h does not exist. build may fail])
17 RHCONFIG_SP="-U__SMP__"
18 RHCONFIG_MP="-D__SMP__"
19 AC_MSG_RESULT($ac_linux_rhconfig)
26 AC_DEFUN(LINUX_WHICH_MODULES,[
27 if test "x$enable_redhat_buildsys" = "xyes"; then
30 save_CPPFLAGS="$CPPFLAGS"
31 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
32 AC_MSG_CHECKING(if kernel uses MODVERSIONS)
33 AC_CACHE_VAL(ac_cv_linux_config_modversions,[
35 [#include <linux/config.h>
37 [#ifndef CONFIG_MODVERSIONS
41 ac_cv_linux_config_modversions=yes,
42 ac_cv_linux_config_modversions=no)])
43 AC_MSG_RESULT($ac_cv_linux_config_modversions)
44 AC_MSG_CHECKING(which kernel modules to build)
45 if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
48 AC_CACHE_VAL(ac_cv_linux_config_smp, [
50 [#include <linux/config.h>
56 ac_cv_linux_config_smp=yes,
57 ac_cv_linux_config_smp=no)])
58 dnl AC_MSG_RESULT($ac_cv_linux_config_smp)
59 if test "x$ac_cv_linux_config_smp" = "xyes"; then
65 CPPFLAGS=$save_CPPFLAGS