1 AC_DEFUN(LINUX_NEED_RHCONFIG,[
4 if test "x$enable_redhat_buildsys" = "xyes"; then
5 AC_MSG_WARN(Configured to build from a Red Hat SPEC file)
7 AC_MSG_CHECKING(for redhat kernel configuration)
8 if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then
10 RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0"
11 RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
12 AC_MSG_RESULT($ac_linux_rhconfig)
13 if test ! -f "/boot/kernel.h"; then
14 AC_MSG_WARN([/boot/kernel.h does not exist. build may fail])
18 AC_MSG_RESULT($ac_linux_rhconfig)
25 AC_DEFUN(LINUX_WHICH_MODULES,[
26 if test "x$enable_redhat_buildsys" = "xyes"; then
29 save_CPPFLAGS="$CPPFLAGS"
30 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
31 AC_MSG_CHECKING(if kernel uses MODVERSIONS)
32 AC_CACHE_VAL(ac_cv_linux_config_modversions,[
34 [#include <linux/config.h>
36 [#ifndef CONFIG_MODVERSIONS
40 ac_cv_linux_config_modversions=yes,
41 ac_cv_linux_config_modversions=no)])
42 AC_MSG_RESULT($ac_cv_linux_config_modversions)
43 AC_MSG_CHECKING(which kernel modules to build)
44 if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
47 AC_CACHE_VAL(ac_cv_linux_config_smp, [
49 [#include <linux/config.h>
55 ac_cv_linux_config_smp=yes,
56 ac_cv_linux_config_smp=no)])
57 dnl AC_MSG_RESULT($ac_cv_linux_config_smp)
58 if test "x$ac_cv_linux_config_smp" = "xyes"; then
64 CPPFLAGS=$save_CPPFLAGS