1 AC_DEFUN(LINUX_KERNEL_LINUX_SYSCALL_H,[
2 AC_MSG_CHECKING(for linux/syscall.h in kernel)
3 if test -f "${LINUX_KERNEL_PATH}/include/linux/syscall.h"; then
5 AC_MSG_RESULT($ac_linux_syscall)
8 AC_MSG_RESULT($ac_linux_syscall)
12 AC_DEFUN(LINUX_NEED_RHCONFIG,[
15 if test "x$enable_redhat_buildsys" = "xyes"; then
16 AC_MSG_WARN(Configured to build from a Red Hat SPEC file)
18 AC_MSG_CHECKING(for redhat kernel configuration)
19 if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then
21 RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0"
22 RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
23 AC_MSG_RESULT($ac_linux_rhconfig)
24 if test ! -f "/boot/kernel.h"; then
25 AC_MSG_WARN([/boot/kernel.h does not exist. build may fail])
29 AC_MSG_RESULT($ac_linux_rhconfig)
36 AC_DEFUN(LINUX_WHICH_MODULES,[
37 if test "x$enable_redhat_buildsys" = "xyes"; then
40 save_CPPFLAGS="$CPPFLAGS"
41 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
42 AC_MSG_CHECKING(if kernel uses MODVERSIONS)
43 AC_CACHE_VAL(ac_cv_linux_config_modversions,[
45 [#include <linux/version.h>
46 #include <linux/config.h>
48 [#if !defined(CONFIG_MODVERSIONS) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
52 ac_cv_linux_config_modversions=yes,
53 ac_cv_linux_config_modversions=no)])
54 AC_MSG_RESULT($ac_cv_linux_config_modversions)
55 AC_MSG_CHECKING(which kernel modules to build)
56 if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
59 AC_CACHE_VAL(ac_cv_linux_config_smp, [
61 [#include <linux/config.h>
67 ac_cv_linux_config_smp=yes,
68 ac_cv_linux_config_smp=no)])
69 dnl AC_MSG_RESULT($ac_cv_linux_config_smp)
70 if test "x$ac_cv_linux_config_smp" = "xyes"; then
76 CPPFLAGS=$save_CPPFLAGS