64032f9cfe18f36cfcf0948bb248253408f87d21
[openafs.git] / src / cf / linux-test4.m4
1 AC_DEFUN([LINUX_COMPLETION_H_EXISTS], [
2 AC_MSG_CHECKING(for linux/completion.h existance)
3 save_CPPFLAGS="$CPPFLAGS"
4 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
5 AC_CACHE_VAL(ac_cv_linux_completion_h_exists,
6 [
7 AC_TRY_COMPILE(
8 [#include <linux/completion.h>
9 #include <linux/version.h>],
10 [struct completion _c;
11 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,8)
12 lose
13 #endif
14 ],
15 ac_cv_linux_completion_h_exists=yes,
16 ac_cv_linux_completion_h_exists=no)])
17 AC_MSG_RESULT($ac_cv_linux_completion_h_exists)
18 CPPFLAGS="$save_CPPFLAGS"])
19
20
21 AC_DEFUN([LINUX_DEFINES_FOR_EACH_PROCESS], [
22 AC_MSG_CHECKING(for defined for_each_process)
23 save_CPPFLAGS="$CPPFLAGS"
24 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
25 AC_CACHE_VAL(ac_cv_linux_defines_for_each_process,
26 [
27 AC_TRY_COMPILE(
28 [#include <linux/sched.h>],
29 [#ifndef for_each_process(p)
30 #error for_each_process not defined
31 #endif],
32 ac_cv_linux_defines_for_each_process=yes,
33 ac_cv_linux_defines_for_each_process=no)])
34 AC_MSG_RESULT($ac_cv_linux_defines_for_each_process)
35 CPPFLAGS="$save_CPPFLAGS"])
36
37
38 AC_DEFUN([LINUX_DEFINES_PREV_TASK], [
39 AC_MSG_CHECKING(for defined prev_task)
40 save_CPPFLAGS="$CPPFLAGS"
41 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
42 AC_CACHE_VAL(ac_cv_linux_defines_prev_task,
43 [
44 AC_TRY_COMPILE(
45 [#include <linux/sched.h>],
46 [#ifndef prev_task(p)
47 #error prev_task not defined
48 #endif],
49 ac_cv_linux_defines_prev_task=yes,
50 ac_cv_linux_defines_prev_task=no)])
51 AC_MSG_RESULT($ac_cv_linux_defines_prev_task)
52 CPPFLAGS="$save_CPPFLAGS"])
53
54
55 AC_DEFUN([LINUX_EXPORTS_INIT_MM], [
56 AC_MSG_CHECKING(for exported init_mm)
57 save_CPPFLAGS="$CPPFLAGS"
58 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
59 AC_CACHE_VAL(ac_cv_linux_exports_init_mm,
60 [
61 AC_TRY_COMPILE(
62 [#include <linux/modversions.h>],
63 [#ifndef __ver_init_mm
64 #error init_mm not exported
65 #endif],
66 ac_cv_linux_exports_init_mm=yes,
67 ac_cv_linux_exports_init_mm=no)])
68 AC_MSG_RESULT($ac_cv_linux_exports_init_mm)
69 CPPFLAGS="$save_CPPFLAGS"])
70
71
72 AC_DEFUN([LINUX_EXPORTS_KALLSYMS_ADDRESS], [
73 AC_MSG_CHECKING(for exported kallsyms_address_to_symbol)
74 save_CPPFLAGS="$CPPFLAGS"
75 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
76 AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_address,
77 [
78 AC_TRY_COMPILE(
79 [#include <linux/modversions.h>],
80 [#ifndef __ver_kallsyms_address_to_symbol
81 #error kallsyms_address_to_symbol not exported
82 #endif],
83 ac_cv_linux_exports_kallsyms_address=yes,
84 ac_cv_linux_exports_kallsyms_address=no)])
85 AC_MSG_RESULT($ac_cv_linux_exports_kallsyms_address)
86 CPPFLAGS="$save_CPPFLAGS"])
87
88
89 AC_DEFUN([LINUX_EXPORTS_KALLSYMS_SYMBOL], [
90 AC_MSG_CHECKING(for exported kallsyms_symbol_to_address)
91 save_CPPFLAGS="$CPPFLAGS"
92 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
93 AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_symbol,
94 [
95 AC_TRY_COMPILE(
96 [#include <linux/modversions.h>],
97 [#ifndef __ver_kallsyms_symbol_to_address
98 #error kallsyms_symbol_to_address not exported
99 #endif],
100 ac_cv_linux_exports_kallsyms_symbol=yes,
101 ac_cv_linux_exports_kallsyms_symbol=no)])
102 AC_MSG_RESULT($ac_cv_linux_exports_kallsyms_symbol)
103 CPPFLAGS="$save_CPPFLAGS"])
104
105
106 AC_DEFUN([LINUX_EXPORTS_SYS_CALL_TABLE], [
107 AC_MSG_CHECKING(for exported sys_call_table)
108 save_CPPFLAGS="$CPPFLAGS"
109 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
110 AC_CACHE_VAL(ac_cv_linux_exports_sys_call_table,
111 [
112 AC_TRY_COMPILE(
113 [#include <linux/modversions.h>],
114 [#ifndef __ver_sys_call_table
115 #error sys_call_table not exported
116 #endif],
117 ac_cv_linux_exports_sys_call_table=yes,
118 ac_cv_linux_exports_sys_call_table=no)])
119 AC_MSG_RESULT($ac_cv_linux_exports_sys_call_table)
120 CPPFLAGS="$save_CPPFLAGS"])
121
122
123 AC_DEFUN([LINUX_EXPORTS_IA32_SYS_CALL_TABLE], [
124 AC_MSG_CHECKING(for exported ia32_sys_call_table)
125 save_CPPFLAGS="$CPPFLAGS"
126 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
127 AC_CACHE_VAL(ac_cv_linux_exports_ia32_sys_call_table,
128 [
129 AC_TRY_COMPILE(
130 [#include <linux/modversions.h>],
131 [#ifndef __ver_ia32_sys_call_table
132 #error ia32_sys_call_table not exported
133 #endif],
134 ac_cv_linux_exports_ia32_sys_call_table=yes,
135 ac_cv_linux_exports_ia32_sys_call_table=no)])
136 AC_MSG_RESULT($ac_cv_linux_exports_ia32_sys_call_table)
137 CPPFLAGS="$save_CPPFLAGS"])
138
139
140 AC_DEFUN([LINUX_EXPORTS_SYS_CHDIR], [
141 AC_MSG_CHECKING(for exported sys_chdir)
142 save_CPPFLAGS="$CPPFLAGS"
143 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
144 AC_CACHE_VAL(ac_cv_linux_exports_sys_chdir,
145 [
146 AC_TRY_COMPILE(
147 [#include <linux/modversions.h>],
148 [#ifndef __ver_sys_chdir
149 #error sys_chdir not exported
150 #endif],
151 ac_cv_linux_exports_sys_chdir=yes,
152 ac_cv_linux_exports_sys_chdir=no)])
153 AC_MSG_RESULT($ac_cv_linux_exports_sys_chdir)
154 CPPFLAGS="$save_CPPFLAGS"])
155
156
157 AC_DEFUN([LINUX_EXPORTS_SYS_CLOSE], [
158 AC_MSG_CHECKING(for exported sys_close)
159 save_CPPFLAGS="$CPPFLAGS"
160 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
161 AC_CACHE_VAL(ac_cv_linux_exports_sys_close,
162 [
163 AC_TRY_COMPILE(
164 [#include <linux/modversions.h>],
165 [#ifndef __ver_sys_close
166 #error sys_close not exported
167 #endif],
168 ac_cv_linux_exports_sys_close=yes,
169 ac_cv_linux_exports_sys_close=no)])
170 AC_MSG_RESULT($ac_cv_linux_exports_sys_close)
171 CPPFLAGS="$save_CPPFLAGS"])
172
173
174 AC_DEFUN([LINUX_EXPORTS_SYS_WAIT4], [
175 AC_MSG_CHECKING(for exported sys_wait4)
176 save_CPPFLAGS="$CPPFLAGS"
177 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
178 AC_CACHE_VAL(ac_cv_linux_exports_sys_wait4,
179 [
180 AC_TRY_COMPILE(
181 [#include <linux/modversions.h>],
182 [#ifndef __ver_sys_wait4
183 #error sys_wait4 not exported
184 #endif],
185 ac_cv_linux_exports_sys_wait4=yes,
186 ac_cv_linux_exports_sys_wait4=no)])
187 AC_MSG_RESULT($ac_cv_linux_exports_sys_wait4)
188 CPPFLAGS="$save_CPPFLAGS"])
189
190
191 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_CDEV], [
192 AC_MSG_CHECKING(for i_cdev in struct inode)
193 save_CPPFLAGS="$CPPFLAGS"
194 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
195 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
196 [
197 AC_TRY_COMPILE(
198 [#include <linux/fs.h>],
199 [struct inode _inode;
200 printf("%d\n", _inode.i_cdev);], 
201 ac_cv_linux_fs_struct_inode_has_i_cdev=yes,
202 ac_cv_linux_fs_struct_inode_has_i_cdev=no)])
203 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_cdev)
204 CPPFLAGS="$save_CPPFLAGS"])
205
206
207 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DEVICES], [
208 AC_MSG_CHECKING(for i_devices in struct inode)
209 save_CPPFLAGS="$CPPFLAGS"
210 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
211 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
212 [
213 AC_TRY_COMPILE(
214 [#include <linux/fs.h>],
215 [struct inode _inode;
216 printf("%d\n", _inode.i_devices);], 
217 ac_cv_linux_fs_struct_inode_has_i_devices=yes,
218 ac_cv_linux_fs_struct_inode_has_i_devices=no)])
219 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_devices)
220 CPPFLAGS="$save_CPPFLAGS"])
221
222
223 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS], [
224 AC_MSG_CHECKING(for i_dirty_data_buffers in struct inode)
225 save_CPPFLAGS="$CPPFLAGS"
226 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
227 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers, 
228 [
229 AC_TRY_COMPILE(
230 [#include <linux/fs.h>],
231 [struct inode _inode;
232 printf("%d\n", _inode.i_dirty_data_buffers);], 
233 ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes,
234 ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no)])
235 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers)
236 CPPFLAGS="$save_CPPFLAGS"])
237
238
239 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK], [
240 AC_MSG_CHECKING(for inotify_lock in struct inode)
241 save_CPPFLAGS="$CPPFLAGS"
242 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
243 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_lock, 
244 [
245 AC_TRY_COMPILE(
246 [#include <linux/fs.h>],
247 [struct inode _inode;
248 printf("%d\n", _inode.inotify_lock);], 
249 ac_cv_linux_fs_struct_inode_has_inotify_lock=yes,
250 ac_cv_linux_fs_struct_inode_has_inotify_lock=no)])
251 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_lock)
252 CPPFLAGS="$save_CPPFLAGS"])
253
254 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM], [
255 AC_MSG_CHECKING(for inotify_sem in struct inode)
256 save_CPPFLAGS="$CPPFLAGS"
257 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
258 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_sem, 
259 [
260 AC_TRY_COMPILE(
261 [#include <linux/fs.h>],
262 [struct inode _inode;
263 printf("%x\n", _inode.inotify_sem);], 
264 ac_cv_linux_fs_struct_inode_has_inotify_sem=yes,
265 ac_cv_linux_fs_struct_inode_has_inotify_sem=no)])
266 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_sem)
267 CPPFLAGS="$save_CPPFLAGS"])
268
269
270 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [
271 AC_MSG_CHECKING(for i_mapping_overload in struct inode)
272 save_CPPFLAGS="$CPPFLAGS"
273 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
274 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mapping_overload, 
275 [
276 AC_TRY_COMPILE(
277 [#include <linux/fs.h>],
278 [struct inode _inode;
279 printf("%d\n", _inode.i_mapping_overload);], 
280 ac_cv_linux_fs_struct_inode_has_i_mapping_overload=yes,
281 ac_cv_linux_fs_struct_inode_has_i_mapping_overload=no)])
282 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mapping_overload)
283 CPPFLAGS="$save_CPPFLAGS"])
284
285
286 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MMAP_SHARED], [
287 AC_MSG_CHECKING(for i_mmap_shared in struct inode)
288 save_CPPFLAGS="$CPPFLAGS"
289 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
290 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mmap_shared,
291 [
292 AC_TRY_COMPILE(
293 [#include <linux/fs.h>],
294 [struct inode _inode;
295 printf("%d\n", _inode.i_mmap_shared);],
296 ac_cv_linux_fs_struct_inode_has_i_mmap_shared=yes,
297 ac_cv_linux_fs_struct_inode_has_i_mmap_shared=no)])
298 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mmap_shared)
299 CPPFLAGS="$save_CPPFLAGS"])
300
301
302 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SECURITY], [
303 AC_MSG_CHECKING(for i_security in struct inode)
304 save_CPPFLAGS="$CPPFLAGS"
305 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
306 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_security, 
307 [
308 AC_TRY_COMPILE(
309 [#include <linux/fs.h>],
310 [struct inode _inode;
311 printf("%d\n", _inode.i_security);], 
312 ac_cv_linux_fs_struct_inode_has_i_security=yes,
313 ac_cv_linux_fs_struct_inode_has_i_security=no)])
314 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_security)
315 CPPFLAGS="$save_CPPFLAGS"])
316
317
318 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST], [
319 AC_MSG_CHECKING(for i_sb_list in struct inode)
320 save_CPPFLAGS="$CPPFLAGS"
321 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
322 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_sb_list, 
323 [
324 AC_TRY_COMPILE(
325 [#include <linux/fs.h>],
326 [struct inode _inode;
327 printf("%d\n", _inode.i_sb_list);], 
328 ac_cv_linux_fs_struct_inode_has_i_sb_list=yes,
329 ac_cv_linux_fs_struct_inode_has_i_sb_list=no)])
330 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_sb_list)
331 CPPFLAGS="$save_CPPFLAGS"])
332
333
334 AC_DEFUN([LINUX_RECALC_SIGPENDING_ARG_TYPE],[
335 AC_MSG_CHECKING(for recalc_sigpending arg type)
336 save_CPPFLAGS="$CPPFLAGS"
337 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
338 AC_CACHE_VAL(ac_cv_linux_func_recalc_sigpending_takes_void,
339 [
340 AC_TRY_COMPILE(
341 [#include <linux/sched.h>],
342 [recalc_sigpending();],
343 ac_cv_linux_func_recalc_sigpending_takes_void=yes,
344 ac_cv_linux_func_recalc_sigpending_takes_void=no)])
345 AC_MSG_RESULT($ac_cv_linux_func_recalc_sigpending_takes_void)
346 CPPFLAGS="$save_CPPFLAGS"])
347
348
349 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT], [
350 AC_MSG_CHECKING(for parent in struct task_struct)
351 save_CPPFLAGS="$CPPFLAGS"
352 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
353 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_parent,
354 [
355 AC_TRY_COMPILE(
356 [#include <linux/sched.h>],
357 [struct task_struct _tsk;
358 printf("%d\n", _tsk.parent);],
359 ac_cv_linux_sched_struct_task_struct_has_parent=yes,
360 ac_cv_linux_sched_struct_task_struct_has_parent=no)])
361 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_parent)
362 CPPFLAGS="$save_CPPFLAGS"])
363
364
365 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT], [
366 AC_MSG_CHECKING(for real_parent in struct task_struct)
367 save_CPPFLAGS="$CPPFLAGS"
368 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
369 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_real_parent,
370 [
371 AC_TRY_COMPILE(
372 [#include <linux/sched.h>],
373 [struct task_struct _tsk;
374 printf("%d\n", _tsk.real_parent);],
375 ac_cv_linux_sched_struct_task_struct_has_real_parent=yes,
376 ac_cv_linux_sched_struct_task_struct_has_real_parent=no)])
377 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_real_parent)
378 CPPFLAGS="$save_CPPFLAGS"])
379
380
381 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG], [
382 AC_MSG_CHECKING(for sig in struct task_struct)
383 save_CPPFLAGS="$CPPFLAGS"
384 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
385 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sig,
386 [
387 AC_TRY_COMPILE(
388 [#include <linux/sched.h>],
389 [struct task_struct _tsk;
390 printf("%d\n", _tsk.sig);],
391 ac_cv_linux_sched_struct_task_struct_has_sig=yes,
392 ac_cv_linux_sched_struct_task_struct_has_sig=no)])
393 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sig)
394 CPPFLAGS="$save_CPPFLAGS"])
395
396 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK], [
397 AC_MSG_CHECKING(for sigmask_lock in struct task_struct)
398 save_CPPFLAGS="$CPPFLAGS"
399 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
400 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sigmask_lock,
401 [
402 AC_TRY_COMPILE(
403 [#include <linux/sched.h>],
404 [struct task_struct _tsk;
405 printf("%d\n", _tsk.sigmask_lock);],
406 ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=yes,
407 ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=no)])
408 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sigmask_lock)
409 CPPFLAGS="$save_CPPFLAGS"])
410
411 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND], [
412 AC_MSG_CHECKING(for sighand in struct task_struct)
413 save_CPPFLAGS="$CPPFLAGS"
414 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
415 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sighand,
416 [
417 AC_TRY_COMPILE(
418 [#include <linux/sched.h>],
419 [struct task_struct _tsk;
420 printf("%d\n", _tsk.sighand);],
421 ac_cv_linux_sched_struct_task_struct_has_sighand=yes,
422 ac_cv_linux_sched_struct_task_struct_has_sighand=no)])
423 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sighand)
424 CPPFLAGS="$save_CPPFLAGS"])
425
426 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM], [
427 AC_MSG_CHECKING(for rlim in struct task_struct)
428 save_CPPFLAGS="$CPPFLAGS"
429 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
430 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_rlim,
431 [
432 AC_TRY_COMPILE(
433 [#include <linux/sched.h>],
434 [struct task_struct _tsk;
435 printf("%d\n", _tsk.rlim);],
436 ac_cv_linux_sched_struct_task_struct_has_rlim=yes,
437 ac_cv_linux_sched_struct_task_struct_has_rlim=no)])
438 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_rlim)
439 CPPFLAGS="$save_CPPFLAGS"])
440
441 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM], [
442 AC_MSG_CHECKING(for signal->rlim in struct task_struct)
443 save_CPPFLAGS="$CPPFLAGS"
444 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
445 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_signal_rlim,
446 [
447 AC_TRY_COMPILE(
448 [#include <linux/sched.h>],
449 [struct task_struct _tsk;
450 printf("%d\n", _tsk.signal->rlim);],
451 ac_cv_linux_sched_struct_task_struct_has_signal_rlim=yes,
452 ac_cv_linux_sched_struct_task_struct_has_signal_rlim=no)])
453 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_signal_rlim)
454 CPPFLAGS="$save_CPPFLAGS"])
455
456 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE], [
457 AC_MSG_CHECKING(for exit_state in struct task_struct)
458 save_CPPFLAGS="$CPPFLAGS"
459 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
460 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_exit_state,
461 [
462 AC_TRY_COMPILE(
463 [#include <linux/sched.h>],
464 [struct task_struct _tsk;
465 printf("%d\n", _tsk.exit_state);],
466 ac_cv_linux_sched_struct_task_struct_has_exit_state=yes,
467 ac_cv_linux_sched_struct_task_struct_has_exit_state=no)])
468 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_exit_state)
469 CPPFLAGS="$save_CPPFLAGS"])
470
471 AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
472 AC_MSG_CHECKING(for alloc_inode in struct super_operations)
473 save_CPPFLAGS="$CPPFLAGS"
474 CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
475 AC_CACHE_VAL(ac_cv_linux_fs_struct_super_has_alloc_inode, 
476 [
477 AC_TRY_COMPILE(
478 [#include <linux/fs.h>],
479 [struct super_operations _super;
480 printf("%p\n", _super.alloc_inode);], 
481 ac_cv_linux_fs_struct_super_has_alloc_inode=yes,
482 ac_cv_linux_fs_struct_super_has_alloc_inode=no)])
483 AC_MSG_RESULT($ac_cv_linux_fs_struct_super_has_alloc_inode)
484 CPPFLAGS="$save_CPPFLAGS"])