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)
37 dnl This depends on LINUX_CONFIG_H_EXISTS running first!
39 AC_DEFUN([LINUX_WHICH_MODULES],[
40 if test "x$enable_redhat_buildsys" = "xyes"; then
43 save_CPPFLAGS="$CPPFLAGS"
44 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
45 AC_MSG_CHECKING(which kernel modules to build)
46 if test "x$ac_cv_linux_config_h_exists" = "xyes"; then
47 CPPFLAGS="-DCONFIG_H_EXISTS $CPPFLAGS"
49 if test "x$ac_linux_rhconfig" = "xyes"; then
52 AC_CACHE_VAL(ac_cv_linux_config_smp, [
54 [#ifdef CONFIG_H_EXISTS
55 #include <linux/config.h>
62 ac_cv_linux_config_smp=yes,
63 ac_cv_linux_config_smp=no)])
64 dnl AC_MSG_RESULT($ac_cv_linux_config_smp)
65 if test "x$ac_cv_linux_config_smp" = "xyes"; then
71 CPPFLAGS=$save_CPPFLAGS
77 AC_DEFUN([LINUX_KERNEL_SELINUX],[
78 AC_MSG_CHECKING(for SELinux kernel)
79 save_CPPFLAGS="$CPPFLAGS"
80 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS"
81 AC_CACHE_VAL(ac_cv_linux_kernel_is_selinux,
84 [#include <linux/autoconf.h>],
85 [#ifndef CONFIG_SECURITY_SELINUX
88 ac_cv_linux_kernel_is_selinux=yes,
89 ac_cv_linux_kernel_is_selinux=no)])
90 AC_MSG_RESULT($ac_cv_linux_kernel_is_selinux)
91 CPPFLAGS="$save_CPPFLAGS"])
93 AC_DEFUN([LINUX_KERNEL_LINUX_SEQ_FILE_H],[
94 AC_MSG_CHECKING(for linux/seq_file.h in kernel)
95 if test -f "${LINUX_KERNEL_PATH}/include/linux/seq_file.h"; then
97 AC_MSG_RESULT($ac_linux_seq_file)
100 AC_MSG_RESULT($ac_linux_seq_file)