69473275391b95a089300894b26b7961f790d36c
[openafs.git] / src / cf / linux-test4.m4
1 AC_DEFUN(LINUX_EXPORTS_TASKLIST_LOCK, [
2 AC_MSG_CHECKING(for exported tasklist_lock)
3 save_CPPFLAGS="$CPPFLAGS"
4 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
5 AC_CACHE_VAL(ac_cv_linux_exports_tasklist_lock,
6 [
7 AC_TRY_COMPILE(
8 [#include <linux/modversions.h>],
9 [#ifndef __ver_tasklist_lock
10 #error tasklist_lock not exported
11 #endif],
12 ac_cv_linux_exports_tasklist_lock=yes,
13 ac_cv_linux_exports_tasklist_lock=no)])
14 AC_MSG_RESULT($ac_cv_linux_exports_tasklist_lock)
15 CPPFLAGS="$save_CPPFLAGS"])
16
17 AC_DEFUN(LINUX_COMPLETION_H_EXISTS, [
18 AC_MSG_CHECKING(for linux/completion.h existance)
19 save_CPPFLAGS="$CPPFLAGS"
20 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
21 AC_CACHE_VAL(ac_cv_linux_completion_h_exists,
22 [
23 AC_TRY_COMPILE(
24 [#include <linux/completion.h>],
25 [struct completion _c;],
26 ac_cv_linux_completion_h_exists=yes,
27 ac_cv_linux_completion_h_exists=no)])
28 AC_MSG_RESULT($ac_cv_linux_completion_h_exists)
29 CPPFLAGS="$save_CPPFLAGS"])
30
31 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_MMAP_SHARED, [
32 AC_MSG_CHECKING(for i_mmap_shared in struct inode)
33 save_CPPFLAGS="$CPPFLAGS"
34 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
35 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mmap_shared,
36 [
37 AC_TRY_COMPILE(
38 [#include <linux/fs.h>],
39 [struct inode _inode;
40 printf("%d\n", _inode.i_mmap_shared);],
41 ac_cv_linux_fs_struct_inode_has_i_mmap_shared=yes,
42 ac_cv_linux_fs_struct_inode_has_i_mmap_shared=no)])
43 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mmap_shared)
44 CPPFLAGS="$save_CPPFLAGS"])
45
46 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, [
47 AC_MSG_CHECKING(for i_dirty_data_buffers in struct inode)
48 save_CPPFLAGS="$CPPFLAGS"
49 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
50 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers, 
51 [
52 AC_TRY_COMPILE(
53 [#include <linux/fs.h>],
54 [struct inode _inode;
55 printf("%d\n", _inode.i_dirty_data_buffers);], 
56 ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes,
57 ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no)])
58 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers)
59 CPPFLAGS="$save_CPPFLAGS"])
60
61 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD, [
62 AC_MSG_CHECKING(for i_mapping_overload in struct inode)
63 save_CPPFLAGS="$CPPFLAGS"
64 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
65 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mapping_overload, 
66 [
67 AC_TRY_COMPILE(
68 [#include <linux/fs.h>],
69 [struct inode _inode;
70 printf("%d\n", _inode.i_mapping_overload);], 
71 ac_cv_linux_fs_struct_inode_has_i_mapping_overload=yes,
72 ac_cv_linux_fs_struct_inode_has_i_mapping_overload=no)])
73 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mapping_overload)
74 CPPFLAGS="$save_CPPFLAGS"])
75
76 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_CDEV, [
77 AC_MSG_CHECKING(for i_cdev in struct inode)
78 save_CPPFLAGS="$CPPFLAGS"
79 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
80 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
81 [
82 AC_TRY_COMPILE(
83 [#include <linux/fs.h>],
84 [struct inode _inode;
85 printf("%d\n", _inode.i_cdev);], 
86 ac_cv_linux_fs_struct_inode_has_i_cdev=yes,
87 ac_cv_linux_fs_struct_inode_has_i_cdev=no)])
88 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_cdev)
89 CPPFLAGS="$save_CPPFLAGS"])
90
91 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_DEVICES, [
92 AC_MSG_CHECKING(for i_devices in struct inode)
93 save_CPPFLAGS="$CPPFLAGS"
94 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
95 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
96 [
97 AC_TRY_COMPILE(
98 [#include <linux/fs.h>],
99 [struct inode _inode;
100 printf("%d\n", _inode.i_devices);], 
101 ac_cv_linux_fs_struct_inode_has_i_devices=yes,
102 ac_cv_linux_fs_struct_inode_has_i_devices=no)])
103 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_devices)
104 CPPFLAGS="$save_CPPFLAGS"])
105