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 AC_TRY_KBUILD([#include <linux/rhconfig.h>], [],
9 [ac_linux_rhconfig=yes], [ac_linux_rhconfig=no])
10 AC_MSG_RESULT($ac_linux_rhconfig)
11 if test x"$ac_linux_rhconfig" = xyes; then
12 RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0"
13 RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
14 AC_MSG_RESULT($ac_linux_rhconfig)
15 if test ! -f "/boot/kernel.h"; then
16 AC_MSG_WARN([/boot/kernel.h does not exist. build may fail])
25 dnl This depends on LINUX_CONFIG_H_EXISTS running first!
27 AC_DEFUN([LINUX_WHICH_MODULES],[
28 if test "x$enable_redhat_buildsys" = "xyes"; then
31 save_CPPFLAGS="$CPPFLAGS"
32 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
33 AC_MSG_CHECKING(which kernel modules to build)
34 if test "x$ac_cv_linux_header_config_h" = "xyes"; then
35 CPPFLAGS="-DCONFIG_H_EXISTS $CPPFLAGS"
37 if test "x$ac_linux_rhconfig" = "xyes"; then
40 AC_CACHE_VAL(ac_cv_linux_config_smp, [
42 [#ifdef CONFIG_H_EXISTS
43 #include <linux/config.h>
50 ac_cv_linux_config_smp=yes,
51 ac_cv_linux_config_smp=no)])
52 dnl AC_MSG_RESULT($ac_cv_linux_config_smp)
53 if test "x$ac_cv_linux_config_smp" = "xyes"; then
59 CPPFLAGS=$save_CPPFLAGS