autoconf: refactor linux-checks.m4
[openafs.git] / src / cf / linux-kernel-assorted.m4
1 AC_DEFUN([OPENAFS_LINUX_KERNEL_ASSORTED_CHECKS],[
2 dnl Assorted more complex tests
3 LINUX_AIO_NONVECTOR
4 LINUX_EXPORTS_PROC_ROOT_FS
5 LINUX_KMEM_CACHE_INIT
6 LINUX_HAVE_KMEM_CACHE_T
7 LINUX_KMEM_CACHE_CREATE_TAKES_DTOR
8 LINUX_KMEM_CACHE_CREATE_CTOR_TAKES_VOID
9 LINUX_D_PATH_TAKES_STRUCT_PATH
10 LINUX_NEW_EXPORT_OPS
11 LINUX_INODE_SETATTR_RETURN_TYPE
12 LINUX_IOP_I_CREATE_TAKES_NAMEIDATA
13 LINUX_IOP_I_LOOKUP_TAKES_NAMEIDATA
14 LINUX_IOP_I_PERMISSION_TAKES_FLAGS
15 LINUX_IOP_I_PERMISSION_TAKES_NAMEIDATA
16 LINUX_IOP_I_PUT_LINK_TAKES_COOKIE
17 LINUX_DOP_D_DELETE_TAKES_CONST
18 LINUX_DOP_D_REVALIDATE_TAKES_NAMEIDATA
19 LINUX_FOP_F_FLUSH_TAKES_FL_OWNER_T
20 LINUX_FOP_F_FSYNC_TAKES_DENTRY
21 LINUX_FOP_F_FSYNC_TAKES_RANGE
22 LINUX_AOP_WRITEBACK_CONTROL
23 LINUX_FS_STRUCT_FOP_HAS_SPLICE
24 LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG
25 LINUX_KERNEL_PAGEVEC_INIT_COLD_ARG
26 LINUX_POSIX_TEST_LOCK_RETURNS_CONFLICT
27 LINUX_POSIX_TEST_LOCK_CONFLICT_ARG
28 LINUX_KERNEL_SOCK_CREATE
29 LINUX_EXPORTS_KEY_TYPE_KEYRING
30 LINUX_NEED_RHCONFIG
31 LINUX_RECALC_SIGPENDING_ARG_TYPE
32 LINUX_EXPORTS_TASKLIST_LOCK
33 LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
34 LINUX_STATFS_TAKES_DENTRY
35 LINUX_REFRIGERATOR
36 LINUX_HAVE_TRY_TO_FREEZE
37 LINUX_LINUX_KEYRING_SUPPORT
38 LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK
39 LINUX_KEY_ALLOC_NEEDS_CRED
40 LINUX_INIT_WORK_HAS_DATA
41 LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
42 LINUX_HAVE_DCACHE_LOCK
43 LINUX_D_COUNT_IS_INT
44 LINUX_IOP_GETATTR_TAKES_PATH_STRUCT
45 LINUX_IOP_MKDIR_TAKES_UMODE_T
46 LINUX_IOP_CREATE_TAKES_UMODE_T
47 LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES
48 LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE
49 LINUX_DENTRY_OPEN_TAKES_PATH
50 LINUX_D_ALIAS_IS_HLIST
51 LINUX_HLIST_ITERATOR_NO_NODE
52 LINUX_IOP_I_CREATE_TAKES_BOOL
53 LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED
54 LINUX_IOP_LOOKUP_TAKES_UNSIGNED
55 LINUX_D_INVALIDATE_IS_VOID
56 LINUX_KERNEL_READ_OFFSET_IS_LAST
57 ])
58
59
60 AC_DEFUN([OPENAFS_LINUX_KERNEL_MORE_ASSORTED_CHECKS],[
61 if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
62     AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
63 fi
64 if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
65     AC_DEFINE(HAVE_MM_INLINE_H, 1, [define if you have mm_inline.h header file])
66 fi
67 if test "x$ac_cv_linux_func_page_get_link" = "xyes" -o "x$ac_cv_linux_func_i_put_link_takes_cookie" = "xyes"; then
68     AC_DEFINE(USABLE_KERNEL_PAGE_SYMLINK_CACHE, 1, [define if your kernel has a usable symlink cache API])
69 else
70     AC_MSG_WARN([your kernel does not have a usable symlink cache API])
71 fi
72 if test "x$ac_cv_linux_func_page_get_link" != "xyes" -a "x$ac_cv_linux_struct_inode_operations_has_get_link" = "xyes"; then
73     AC_MSG_ERROR([Your kernel does not use follow_link - not supported without symlink cache API])
74     exit 1
75 fi
76 : dnl remnant no-op
77 ])