1 AC_DEFUN(LINUX_NEED_RHCONFIG,[
2 AC_MSG_CHECKING(for redhat kernel configuration)
3 if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then
5 RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0"
6 RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
7 AC_MSG_RESULT($ac_linux_rhconfig)
8 if test ! -f "/boot/kernel.h"; then
9 AC_MSG_WARN([/boot/kernel.h does not exist. build may fail])
15 AC_MSG_RESULT($ac_linux_rhconfig)
21 AC_DEFUN(LINUX_WHICH_MODULES,[
22 save_CPPFLAGS="$CPPFLAGS"
23 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
24 AC_MSG_CHECKING(if kernel uses MODVERSIONS)
25 AC_CACHE_VAL(ac_cv_linux_config_modversions,[
27 [#include <linux/config.h>
29 [#ifndef CONFIG_MODVERSIONS
33 ac_cv_linux_config_modversions=yes,
34 ac_cv_linux_config_modversions=no)])
35 AC_MSG_RESULT($ac_cv_linux_config_modversions)
36 AC_MSG_CHECKING(which kernel modules to build)
37 if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
40 AC_CACHE_VAL(ac_cv_linux_config_smp, [
42 [#include <linux/config.h>
48 ac_cv_linux_config_smp=yes,
49 ac_cv_linux_config_smp=no)])
50 dnl AC_MSG_RESULT($ac_cv_linux_config_smp)
51 if test "x$ac_cv_linux_config_smp" = "xyes"; then
59 CPPFLAGS=$save_CPPFLAGS])