[LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)]
)
+ LINUX_CONFIG_H_EXISTS
LINUX_COMPLETION_H_EXISTS
LINUX_DEFINES_FOR_EACH_PROCESS
LINUX_DEFINES_PREV_TASK
#include "afsincludes.h"
#endif
#include <linux/version.h>
+#ifdef CONFIG_H_EXISTS
#include <linux/config.h>
+#endif
#include <linux/linkage.h>
#include <linux/init.h>
#include <linux/unistd.h>
#include "afs/afs_stats.h" /* afs statistics */
#include <linux/sysctl.h>
+#ifdef CONFIG_H_EXISTS
#include <linux/config.h>
+#endif
/* From afs_util.c */
extern afs_int32 afs_new_inum;
AC_SUBST(RHCONFIG_MP)
])
+
+dnl This depends on LINUX_CONFIG_H_EXISTS running first!
+
AC_DEFUN([LINUX_WHICH_MODULES],[
if test "x$enable_redhat_buildsys" = "xyes"; then
MPS=Default
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
AC_MSG_CHECKING(which kernel modules to build)
+ if test "x$ac_cv_linux_config_h_exists" = "xyes"; then
+ CPPFLAGS="-DCONFIG_H_EXISTS $CPPFLAGS"
+ fi
if test "x$ac_linux_rhconfig" = "xyes"; then
MPS="MP SP"
else
AC_CACHE_VAL(ac_cv_linux_config_smp, [
- AC_TRY_COMPILE(
-[#include <linux/config.h>
+ AC_TRY_KBUILD(
+[#ifdef CONFIG_H_EXISTS
+#include <linux/config.h>
+#endif
],
[#ifndef CONFIG_SMP
lose;
+AC_DEFUN([LINUX_CONFIG_H_EXISTS], [
+ AC_MSG_CHECKING([for linux/config.h existance])
+ AC_CACHE_VAL([ac_cv_linux_config_h_exists], [
+ AC_TRY_KBUILD(
+[#include <linux/config.h>],
+[return;],
+ ac_cv_linux_config_h_exists=yes,
+ ac_cv_linux_config_h_exists=no)])
+ AC_MSG_RESULT($ac_cv_linux_config_h_exists)
+ if test "x$ac_cv_linux_config_h_exists" = "xyes"; then
+ AC_DEFINE([CONFIG_H_EXISTS], 1, [define if linux/config.h exists])
+ fi])
+
+
AC_DEFUN([LINUX_COMPLETION_H_EXISTS], [
AC_MSG_CHECKING([for linux/completion.h existance])
AC_CACHE_VAL([ac_cv_linux_completion_h_exists], [
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#endif
#endif /* KERNEL */
-#define USE_UCONTEXT /* should be in afsconfig.h */
#endif /* _PARAM_AMD64_LINUX20_H_ */
#define CMSERVERPREF
#endif
-#define USE_UCONTEXT /* should be in afsconfig.h */
#endif /* AFS_PARAM_H */
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_64BIT_CLIENT 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_64BIT_CLIENT 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_64BIT_CLIENT 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#endif
#endif /* KERNEL */
-#define USE_UCONTEXT /* should be in afsconfig.h */
#endif /* _PARAM_IA64_LINUX20_H_ */
#define CMSERVERPREF
#endif
-#define USE_UCONTEXT /* should be in afsconfig.h */
#endif /* AFS_PARAM_H */
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#endif
#endif /* KERNEL */
-#define USE_UCONTEXT /* should be in afsconfig.h */
#endif /* _PARAM_IA64_LINUX20_H_ */
#define CMSERVERPREF
#endif
-#define USE_UCONTEXT /* should be in afsconfig.h */
#endif /* AFS_PARAM_H */
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#include <linux/modversions.h>
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#ifndef AFS_SMP
#define AFS_SMP 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
-#include <linux/threads.h>
-#include <linux/config.h>
#ifdef CONFIG_SMP
#undef CONFIG_SMP
#endif