1 | dnl aclocal.m4 generated automatically by aclocal 1.4-p5 |
---|
2 | |
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
---|
4 | dnl This file is free software; the Free Software Foundation |
---|
5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
6 | dnl with or without modifications, as long as this notice is preserved. |
---|
7 | |
---|
8 | dnl This program is distributed in the hope that it will be useful, |
---|
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
11 | dnl PARTICULAR PURPOSE. |
---|
12 | |
---|
13 | dnl This file contains the common configuration code which would |
---|
14 | dnl otherwise be duplicated between configure and configure-libafs. |
---|
15 | dnl |
---|
16 | dnl NB: Because this code is a macro, references to positional shell |
---|
17 | dnl parameters must be done like $[]1 instead of $1 |
---|
18 | |
---|
19 | AC_DEFUN(OPENAFS_CONFIGURE_COMMON,[ |
---|
20 | |
---|
21 | AC_CANONICAL_HOST |
---|
22 | SRCDIR_PARENT=`pwd` |
---|
23 | |
---|
24 | #BOZO_SAVE_CORES BOS_RESTRICTED_MODE BOS_NEW_CONFIG pam sia |
---|
25 | AC_ARG_WITH(afs-sysname, |
---|
26 | [ --with-afs-sysname=sys use sys for the afs sysname] |
---|
27 | ) |
---|
28 | AC_ARG_ENABLE( obsolete, |
---|
29 | [ --enable-obsolete enable obsolete portions of AFS (mpp, ntp and package)],, enable_obsolete="no") |
---|
30 | AC_ARG_ENABLE( insecure, |
---|
31 | [ --enable-insecure enable insecure portions of AFS (ftpd, inetd, rcp, rlogind and rsh)],, enable_insecure="no") |
---|
32 | AC_ARG_ENABLE( afsdb, |
---|
33 | [ --disable-afsdb disable AFSDB RR support],, enable_afsdb="yes") |
---|
34 | AC_ARG_ENABLE( bos-restricted-mode, |
---|
35 | [ --enable-bos-restricted-mode enable bosserver restricted mode which disables certain bosserver functionality],, enable_bos_restricted_mode="no") |
---|
36 | AC_ARG_ENABLE( namei-fileserver, |
---|
37 | [ --enable-namei-fileserver force compilation of namei fileserver in preference to inode fileserver],, enable_namei_fileserver="no") |
---|
38 | AC_ARG_ENABLE( fast-restart, |
---|
39 | [ --enable-fast-restart enable fast startup of file server without salvaging],, enable_fast_restart="no") |
---|
40 | AC_ARG_ENABLE( bitmap-later, |
---|
41 | [ --enable-bitmap-later enable fast startup of file server by not reading bitmap till needed],, enable_bitmap_later="no") |
---|
42 | AC_ARG_ENABLE( full-vos-listvol-switch, |
---|
43 | [ --enable-full-vos-listvol-switch enable vos full listvol switch for formatted output],, enable_full_vos_listvol_switch="no") |
---|
44 | AC_ARG_WITH(dux-kernel-headers, |
---|
45 | [ --with-dux-kernel-headers=path use the kernel headers found at path(optional, defaults to first match in /usr/sys)] |
---|
46 | ) |
---|
47 | AC_ARG_WITH(linux-kernel-headers, |
---|
48 | [ --with-linux-kernel-headers=path use the kernel headers found at path(optional, defaults to /usr/src/linux)] |
---|
49 | ) |
---|
50 | AC_ARG_ENABLE(kernel-module, |
---|
51 | [ --disable-kernel-module disable compilation of the kernel module (defaults to enabled)],, enable_kernel_module="yes" |
---|
52 | ) |
---|
53 | AC_ARG_ENABLE(redhat-buildsys, |
---|
54 | [ --enable-redhat-buildsys enable compilation of the redhat build system kernel (defaults to disabled)],, enable_redhat_buildsys="no" |
---|
55 | ) |
---|
56 | AC_ARG_ENABLE(transarc-paths, |
---|
57 | [ --enable-transarc-paths Use Transarc style paths like /usr/afs and /usr/vice],, enable_transarc_paths="no" |
---|
58 | ) |
---|
59 | AC_ARG_ENABLE(tivoli-tsm, |
---|
60 | [ --enable-tivoli-tsm Enable use of the Tivoli TSM API libraries for butc support],, enable_tivoli_tsm="no" |
---|
61 | ) |
---|
62 | AC_ARG_ENABLE(debug-kernel, |
---|
63 | [ --enable-debug-kernel enable compilation of the kernel module with debugging information (defaults to disabled)],, enable_debug_kernel="no" |
---|
64 | ) |
---|
65 | |
---|
66 | dnl weird ass systems |
---|
67 | AC_AIX |
---|
68 | AC_ISC_POSIX |
---|
69 | AC_MINIX |
---|
70 | |
---|
71 | dnl Various compiler setup. |
---|
72 | AC_TYPE_PID_T |
---|
73 | AC_TYPE_SIZE_T |
---|
74 | AC_TYPE_SIGNAL |
---|
75 | |
---|
76 | dnl Checks for programs. |
---|
77 | AC_PROG_INSTALL |
---|
78 | AC_PROG_LN_S |
---|
79 | AC_PROG_RANLIB |
---|
80 | AC_PROG_YACC |
---|
81 | AM_PROG_LEX |
---|
82 | |
---|
83 | OPENAFS_CHECK_BIGENDIAN |
---|
84 | |
---|
85 | KERN_DEBUG_OPT= |
---|
86 | if test "x$enable_debug_kernel" = "xyes"; then |
---|
87 | KERN_DEBUG_OPT=-g |
---|
88 | fi |
---|
89 | |
---|
90 | AC_MSG_CHECKING(your OS) |
---|
91 | system=$host |
---|
92 | case $system in |
---|
93 | *-linux*) |
---|
94 | MKAFS_OSTYPE=LINUX |
---|
95 | if test "x$enable_redhat_buildsys" = "xyes"; then |
---|
96 | AC_DEFINE(ENABLE_REDHAT_BUILDSYS, 1, [define if you have redhat buildsystem]) |
---|
97 | fi |
---|
98 | if test "x$enable_kernel_module" = "xyes"; then |
---|
99 | if test "x$with_linux_kernel_headers" != "x"; then |
---|
100 | LINUX_KERNEL_PATH="$with_linux_kernel_headers" |
---|
101 | else |
---|
102 | LINUX_KERNEL_PATH="/usr/src/linux" |
---|
103 | fi |
---|
104 | if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then |
---|
105 | linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -1` |
---|
106 | if test "x$linux_kvers" = "x"; then |
---|
107 | if test -f "$LINUX_KERNEL_PATH/include/linux/version-up.h"; then |
---|
108 | linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -1` |
---|
109 | if test "x$linux_kvers" = "x"; then |
---|
110 | |
---|
111 | AC_MSG_ERROR(Linux headers lack version definition [2]) |
---|
112 | exit 1 |
---|
113 | else |
---|
114 | LINUX_VERSION="$linux_kvers" |
---|
115 | fi |
---|
116 | else |
---|
117 | AC_MSG_ERROR(Linux headers lack version definition) |
---|
118 | exit 1 |
---|
119 | fi |
---|
120 | else |
---|
121 | LINUX_VERSION="$linux_kvers" |
---|
122 | fi |
---|
123 | else |
---|
124 | enable_kernel_module="no" |
---|
125 | fi |
---|
126 | if test ! -f "$LINUX_KERNEL_PATH/include/linux/autoconf.h"; then |
---|
127 | enable_kernel_module="no" |
---|
128 | fi |
---|
129 | if test "x$enable_kernel_module" = "xno"; then |
---|
130 | if test "x$with_linux_kernel_headers" != "x"; then |
---|
131 | AC_MSG_ERROR(No usable linux headers found at $LINUX_KERNEL_PATH) |
---|
132 | exit 1 |
---|
133 | else |
---|
134 | AC_MSG_WARN(No usable linux headers found at $LINUX_KERNEL_PATH so disabling kernel module) |
---|
135 | fi |
---|
136 | fi |
---|
137 | fi |
---|
138 | AC_MSG_RESULT(linux) |
---|
139 | if test "x$enable_kernel_module" = "xyes"; then |
---|
140 | OMIT_FRAME_POINTER= |
---|
141 | if test "x$enable_debug_kernel" = "xno"; then |
---|
142 | OMIT_FRAME_POINTER=-fomit-frame-pointer |
---|
143 | fi |
---|
144 | AC_SUBST(OMIT_FRAME_POINTER) |
---|
145 | OPENAFS_GCC_SUPPORTS_MARCH |
---|
146 | AC_SUBST(P5PLUS_KOPTS) |
---|
147 | OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE |
---|
148 | OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING |
---|
149 | OPENAFS_GCC_SUPPORTS_NO_COMMON |
---|
150 | AC_SUBST(LINUX_GCC_KOPTS) |
---|
151 | ifdef([OPENAFS_CONFIGURE_LIBAFS], |
---|
152 | [LINUX_BUILD_VNODE_FROM_INODE(config,afs)], |
---|
153 | [LINUX_BUILD_VNODE_FROM_INODE(src/config,src/afs/LINUX)] |
---|
154 | ) |
---|
155 | LINUX_COMPLETION_H_EXISTS |
---|
156 | LINUX_DEFINES_FOR_EACH_PROCESS |
---|
157 | LINUX_DEFINES_PREV_TASK |
---|
158 | LINUX_EXPORTS_TASKLIST_LOCK |
---|
159 | LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK |
---|
160 | LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK |
---|
161 | LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM |
---|
162 | LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS |
---|
163 | LINUX_FS_STRUCT_INODE_HAS_I_DEVICES |
---|
164 | LINUX_INODE_SETATTR_RETURN_TYPE |
---|
165 | LINUX_NEED_RHCONFIG |
---|
166 | LINUX_RECALC_SIGPENDING_ARG_TYPE |
---|
167 | LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT |
---|
168 | LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT |
---|
169 | LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK |
---|
170 | LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG |
---|
171 | LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND |
---|
172 | LINUX_WHICH_MODULES |
---|
173 | if test "x$ac_cv_linux_config_modversions" = "xno"; then |
---|
174 | AC_MSG_WARN([Cannot determine sys_call_table status. assuming it's exported]) |
---|
175 | ac_cv_linux_exports_sys_call_table=yes |
---|
176 | else |
---|
177 | LINUX_EXPORTS_INIT_MM |
---|
178 | LINUX_EXPORTS_KALLSYMS_ADDRESS |
---|
179 | LINUX_EXPORTS_KALLSYMS_SYMBOL |
---|
180 | LINUX_EXPORTS_SYS_CALL_TABLE |
---|
181 | LINUX_EXPORTS_SYS_CHDIR |
---|
182 | LINUX_EXPORTS_SYS_CLOSE |
---|
183 | if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then |
---|
184 | linux_syscall_method=none |
---|
185 | if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then |
---|
186 | linux_syscall_method=scan |
---|
187 | if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then |
---|
188 | linux_syscall_method=scan_with_kallsyms_address |
---|
189 | fi |
---|
190 | fi |
---|
191 | if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then |
---|
192 | linux_syscall_method=kallsyms_symbol |
---|
193 | fi |
---|
194 | if test "x$linux_syscall_method" = "xnone"; then |
---|
195 | AC_MSG_ERROR([no available sys_call_table access method]) |
---|
196 | fi |
---|
197 | if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then |
---|
198 | AC_DEFINE(EXPORTED_SYS_CHDIR, 1, [define if your linux kernel exports sys_chdir]) |
---|
199 | fi |
---|
200 | if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then |
---|
201 | AC_DEFINE(EXPORTED_SYS_CLOSE, 1, [define if your linux kernel exports sys_close]) |
---|
202 | fi |
---|
203 | fi |
---|
204 | fi |
---|
205 | if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then |
---|
206 | AC_DEFINE(EXPORTED_TASKLIST_LOCK, 1, [define if your linux kernel exports tasklist_lock]) |
---|
207 | fi |
---|
208 | if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then |
---|
209 | AC_DEFINE(EXPORTED_SYS_CALL_TABLE) |
---|
210 | fi |
---|
211 | if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then |
---|
212 | AC_DEFINE(EXPORTED_KALLSYMS_SYMBOL) |
---|
213 | fi |
---|
214 | if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then |
---|
215 | AC_DEFINE(EXPORTED_KALLSYMS_ADDRESS) |
---|
216 | fi |
---|
217 | if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then |
---|
218 | AC_DEFINE(COMPLETION_H_EXISTS, 1, [define if completion_h exists]) |
---|
219 | fi |
---|
220 | if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then |
---|
221 | AC_DEFINE(DEFINED_FOR_EACH_PROCESS, 1, [define if for_each_process defined]) |
---|
222 | fi |
---|
223 | if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then |
---|
224 | AC_DEFINE(DEFINED_PREV_TASK, 1, [define if prev_task defined]) |
---|
225 | fi |
---|
226 | if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then |
---|
227 | AC_DEFINE(INODE_SETATTR_NOT_VOID, 1, [define if your setattr return return non-void]) |
---|
228 | fi |
---|
229 | if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then |
---|
230 | AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, 1, [define if your struct address_space has page_lock]) |
---|
231 | fi |
---|
232 | if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then |
---|
233 | AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_GFP_MASK, 1, [define if your struct address_space has gfp_mask]) |
---|
234 | fi |
---|
235 | if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then |
---|
236 | AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM, 1, [define if your struct inode has truncate_sem]) |
---|
237 | fi |
---|
238 | if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then |
---|
239 | AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES, 1, [define if you struct inode has i_devices]) |
---|
240 | fi |
---|
241 | if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then |
---|
242 | AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, 1, [define if your struct inode has data_buffers]) |
---|
243 | fi |
---|
244 | if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then |
---|
245 | AC_DEFINE(RECALC_SIGPENDING_TAKES_VOID, 1, [define if your recalc_sigpending takes void]) |
---|
246 | fi |
---|
247 | if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then |
---|
248 | AC_DEFINE(STRUCT_TASK_STRUCT_HAS_PARENT, 1, [define if your struct task_struct has parent]) |
---|
249 | fi |
---|
250 | if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then |
---|
251 | AC_DEFINE(STRUCT_TASK_STRUCT_HAS_REAL_PARENT, 1, [define if your struct task_struct has real_parent]) |
---|
252 | fi |
---|
253 | if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then |
---|
254 | AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK, 1, [define if your struct task_struct has sigmask_lock]) |
---|
255 | fi |
---|
256 | if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then |
---|
257 | AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIG, 1, [define if your struct task_struct has sig]) |
---|
258 | fi |
---|
259 | if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then |
---|
260 | AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGHAND, 1, [define if your struct task_struct has sighand]) |
---|
261 | fi |
---|
262 | : |
---|
263 | fi |
---|
264 | ;; |
---|
265 | *-solaris*) |
---|
266 | MKAFS_OSTYPE=SOLARIS |
---|
267 | AC_MSG_RESULT(sun4) |
---|
268 | SOLARIS_UFSVFS_HAS_DQRWLOCK |
---|
269 | SOLARIS_PROC_HAS_P_COREFILE |
---|
270 | ;; |
---|
271 | *-sunos*) |
---|
272 | MKAFS_OSTYPE=SUNOS |
---|
273 | enable_kernel_module=no |
---|
274 | AC_MSG_RESULT(sun4) |
---|
275 | ;; |
---|
276 | *-hpux*) |
---|
277 | MKAFS_OSTYPE=HPUX |
---|
278 | AC_MSG_RESULT(hp_ux) |
---|
279 | ;; |
---|
280 | *-irix*) |
---|
281 | if test -d /usr/include/sys/SN/SN1; then |
---|
282 | IRIX_BUILD_IP35="IP35" |
---|
283 | fi |
---|
284 | MKAFS_OSTYPE=IRIX |
---|
285 | AC_MSG_RESULT(sgi) |
---|
286 | ;; |
---|
287 | *-aix*) |
---|
288 | MKAFS_OSTYPE=AIX |
---|
289 | AC_MSG_RESULT(rs_aix) |
---|
290 | ;; |
---|
291 | *-osf*) |
---|
292 | MKAFS_OSTYPE=DUX |
---|
293 | AC_MSG_RESULT(alpha_dux) |
---|
294 | if test "x$enable_kernel_module" = "xyes"; then |
---|
295 | if test "x$with_dux_kernel_headers" != "x"; then |
---|
296 | HEADER_RT=`ls ${with_dux_kernel_headers}/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'` |
---|
297 | else |
---|
298 | HEADER_RT=`ls /usr/sys/*/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'` |
---|
299 | fi |
---|
300 | fi |
---|
301 | if test "$HEADER_RT" = "*" ; then |
---|
302 | AC_MSG_ERROR([Need a configured kernel directory]) |
---|
303 | fi |
---|
304 | AC_SUBST([HEADER_RT]) |
---|
305 | ;; |
---|
306 | *-darwin*) |
---|
307 | MKAFS_OSTYPE=DARWIN |
---|
308 | AC_MSG_RESULT(ppc_darwin) |
---|
309 | ;; |
---|
310 | *-freebsd*) |
---|
311 | MKAFS_OSTYPE=FBSD |
---|
312 | AC_MSG_RESULT(i386_fbsd) |
---|
313 | ;; |
---|
314 | *-openbsd*) |
---|
315 | MKAFS_OSTYPE=OBSD |
---|
316 | AC_MSG_RESULT(i386_obsd) |
---|
317 | ;; |
---|
318 | *) |
---|
319 | AC_MSG_RESULT($system) |
---|
320 | ;; |
---|
321 | esac |
---|
322 | AC_SUBST(KERN_DEBUG_OPT) |
---|
323 | |
---|
324 | if test "x$with_afs_sysname" != "x"; then |
---|
325 | AFS_SYSNAME="$with_afs_sysname" |
---|
326 | else |
---|
327 | AC_MSG_CHECKING(your AFS sysname) |
---|
328 | case $host in |
---|
329 | i?86-*-freebsd4.2*) |
---|
330 | AFS_SYSNAME="i386_fbsd_42" |
---|
331 | ;; |
---|
332 | i?86-*-freebsd4.3*) |
---|
333 | AFS_SYSNAME="i386_fbsd_43" |
---|
334 | ;; |
---|
335 | i?86-*-freebsd4.4*) |
---|
336 | AFS_SYSNAME="i386_fbsd_44" |
---|
337 | ;; |
---|
338 | i?86-*-freebsd4.5*) |
---|
339 | AFS_SYSNAME="i386_fbsd_45" |
---|
340 | ;; |
---|
341 | i?86-*-freebsd4.6*) |
---|
342 | AFS_SYSNAME="i386_fbsd_46" |
---|
343 | ;; |
---|
344 | hppa*-hp-hpux11*) |
---|
345 | AFS_SYSNAME="hp_ux110" |
---|
346 | ;; |
---|
347 | hppa*-hp-hpux10*) |
---|
348 | AFS_SYSNAME="hp_ux102" |
---|
349 | ;; |
---|
350 | powerpc-apple-darwin1.2*) |
---|
351 | AFS_SYSNAME="ppc_darwin_12" |
---|
352 | ;; |
---|
353 | powerpc-apple-darwin1.3*) |
---|
354 | AFS_SYSNAME="ppc_darwin_13" |
---|
355 | ;; |
---|
356 | powerpc-apple-darwin1.4*) |
---|
357 | AFS_SYSNAME="ppc_darwin_14" |
---|
358 | ;; |
---|
359 | powerpc-apple-darwin5.1*) |
---|
360 | AFS_SYSNAME="ppc_darwin_14" |
---|
361 | ;; |
---|
362 | powerpc-apple-darwin5.2*) |
---|
363 | AFS_SYSNAME="ppc_darwin_14" |
---|
364 | ;; |
---|
365 | powerpc-apple-darwin5.3*) |
---|
366 | AFS_SYSNAME="ppc_darwin_14" |
---|
367 | ;; |
---|
368 | powerpc-apple-darwin5.4*) |
---|
369 | AFS_SYSNAME="ppc_darwin_14" |
---|
370 | ;; |
---|
371 | powerpc-apple-darwin5.5*) |
---|
372 | AFS_SYSNAME="ppc_darwin_14" |
---|
373 | ;; |
---|
374 | powerpc-apple-darwin6.0*) |
---|
375 | AFS_SYSNAME="ppc_darwin_60" |
---|
376 | ;; |
---|
377 | powerpc-apple-darwin6.1*) |
---|
378 | AFS_SYSNAME="ppc_darwin_60" |
---|
379 | ;; |
---|
380 | powerpc-apple-darwin6.2*) |
---|
381 | AFS_SYSNAME="ppc_darwin_60" |
---|
382 | ;; |
---|
383 | sparc-sun-solaris2.5*) |
---|
384 | AFS_SYSNAME="sun4x_55" |
---|
385 | ;; |
---|
386 | sparc-sun-solaris2.6) |
---|
387 | AFS_SYSNAME="sun4x_56" |
---|
388 | ;; |
---|
389 | sparc-sun-solaris2.7) |
---|
390 | AFS_SYSNAME="sun4x_57" |
---|
391 | ;; |
---|
392 | sparc-sun-solaris2.8) |
---|
393 | AFS_SYSNAME="sun4x_58" |
---|
394 | ;; |
---|
395 | sparc-sun-solaris2.9) |
---|
396 | AFS_SYSNAME="sun4x_59" |
---|
397 | ;; |
---|
398 | sparc-sun-sunos4*) |
---|
399 | AFS_SYSNAME="sun4_413" |
---|
400 | ;; |
---|
401 | i386-pc-solaris2.7) |
---|
402 | AFS_SYSNAME="sunx86_57" |
---|
403 | ;; |
---|
404 | i386-pc-solaris2.8) |
---|
405 | AFS_SYSNAME="sunx86_58" |
---|
406 | ;; |
---|
407 | i386-pc-solaris2.9) |
---|
408 | AFS_SYSNAME="sunx86_59" |
---|
409 | ;; |
---|
410 | alpha*-dec-osf4.0*) |
---|
411 | AFS_SYSNAME="alpha_dux40" |
---|
412 | ;; |
---|
413 | alpha*-dec-osf5.0*) |
---|
414 | AFS_SYSNAME="alpha_dux50" |
---|
415 | ;; |
---|
416 | mips-sgi-irix6.5) |
---|
417 | AFS_SYSNAME="sgi_65" |
---|
418 | ;; |
---|
419 | ia64-*-linux*) |
---|
420 | AFS_SYSNAME="ia64_linuxXX" |
---|
421 | ;; |
---|
422 | powerpc-*-linux*) |
---|
423 | AFS_SYSNAME="ppc_linuxXX" |
---|
424 | ;; |
---|
425 | alpha*-linux*) |
---|
426 | AFS_SYSNAME="alpha_linux_XX" |
---|
427 | ;; |
---|
428 | s390-*-linux*) |
---|
429 | AFS_SYSNAME="s390_linuxXX" |
---|
430 | ;; |
---|
431 | sparc-*-linux*) |
---|
432 | AFS_SYSNAME="sparc_linuxXX" |
---|
433 | ;; |
---|
434 | sparc64-*-linux*) |
---|
435 | AFS_SYSNAME="sparc64_linuxXX" |
---|
436 | ;; |
---|
437 | i?86-*-linux*) |
---|
438 | AFS_SYSNAME="i386_linuxXX" |
---|
439 | ;; |
---|
440 | parisc-*-linux-gnu) |
---|
441 | AFS_SYSNAME="parisc_linuxXX" |
---|
442 | ;; |
---|
443 | power*-ibm-aix4.2*) |
---|
444 | AFS_SYSNAME="rs_aix42" |
---|
445 | ;; |
---|
446 | power*-ibm-aix4.3*) |
---|
447 | AFS_SYSNAME="rs_aix42" |
---|
448 | ;; |
---|
449 | *) |
---|
450 | AC_MSG_ERROR(An AFS sysname is required) |
---|
451 | exit 1 |
---|
452 | ;; |
---|
453 | esac |
---|
454 | case $AFS_SYSNAME in |
---|
455 | *_linux*) |
---|
456 | AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'` |
---|
457 | if test "x${AFS_SYSKVERS}" = "x"; then |
---|
458 | AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.) |
---|
459 | fi |
---|
460 | _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/` |
---|
461 | AFS_SYSNAME="$_AFS_SYSNAME" |
---|
462 | ;; |
---|
463 | esac |
---|
464 | AC_MSG_RESULT($AFS_SYSNAME) |
---|
465 | fi |
---|
466 | |
---|
467 | case $AFS_SYSNAME in |
---|
468 | *_darwin*) |
---|
469 | DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist |
---|
470 | DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist |
---|
471 | ;; |
---|
472 | esac |
---|
473 | AC_CACHE_VAL(ac_cv_sockaddr_len, |
---|
474 | [ |
---|
475 | AC_MSG_CHECKING([if struct sockaddr has sa_len field]) |
---|
476 | AC_TRY_COMPILE( [#include <sys/types.h> |
---|
477 | #include <sys/socket.h>], |
---|
478 | [struct sockaddr *a; |
---|
479 | a->sa_len=0;], ac_cv_sockaddr_len=yes, ac_cv_sockaddr_len=no) |
---|
480 | AC_MSG_RESULT($ac_cv_sockaddr_len)]) |
---|
481 | if test "$ac_cv_sockaddr_len" = "yes"; then |
---|
482 | AC_DEFINE(STRUCT_SOCKADDR_HAS_SA_LEN, 1, [define if you struct sockaddr sa_len]) |
---|
483 | fi |
---|
484 | if test "x${MKAFS_OSTYPE}" = "xIRIX"; then |
---|
485 | echo Skipping library tests because they confuse Irix. |
---|
486 | else |
---|
487 | AC_CHECK_FUNCS(socket) |
---|
488 | |
---|
489 | if test "$ac_cv_func_socket" = no; then |
---|
490 | for lib in socket inet; do |
---|
491 | if test "$HAVE_SOCKET" != 1; then |
---|
492 | AC_CHECK_LIB(${lib}, socket,LIBS="$LIBS -l$lib";HAVE_SOCKET=1;AC_DEFINE(HAVE_SOCKET, 1, [define if you have socket])) |
---|
493 | fi |
---|
494 | done |
---|
495 | fi |
---|
496 | |
---|
497 | AC_CHECK_FUNCS(connect) |
---|
498 | |
---|
499 | if test "$ac_cv_func_connect" = no; then |
---|
500 | for lib in nsl; do |
---|
501 | if test "$HAVE_CONNECT" != 1; then |
---|
502 | AC_CHECK_LIB(${lib}, connect,LIBS="$LIBS -l$lib";HAVE_CONNECT=1;AC_DEFINE(HAVE_CONNECT, 1, [define if you have connect])) |
---|
503 | fi |
---|
504 | done |
---|
505 | fi |
---|
506 | |
---|
507 | AC_CHECK_FUNCS(gethostbyname) |
---|
508 | if test "$ac_cv_func_gethostbyname" = no; then |
---|
509 | for lib in dns nsl resolv; do |
---|
510 | if test "$HAVE_GETHOSTBYNAME" != 1; then |
---|
511 | AC_CHECK_LIB(${lib}, gethostbyname, LIBS="$LIBS -l$lib";HAVE_GETHOSTBYNAME=1;AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [define if you have gethostbyname])) |
---|
512 | fi |
---|
513 | done |
---|
514 | fi |
---|
515 | |
---|
516 | AC_CHECK_FUNCS(res_search) |
---|
517 | if test "$ac_cv_func_res_search" = no; then |
---|
518 | for lib in dns nsl resolv; do |
---|
519 | if test "$HAVE_RES_SEARCH" != 1; then |
---|
520 | AC_CHECK_LIB(${lib}, res_search, LIBS="$LIBS -l$lib";HAVE_RES_SEARCH=1;AC_DEFINE(HAVE_RES_SEARCH, 1, [define if you have res_search])) |
---|
521 | fi |
---|
522 | done |
---|
523 | if test "$HAVE_RES_SEARCH" = 1; then |
---|
524 | LIB_res_search="-l$lib" |
---|
525 | fi |
---|
526 | fi |
---|
527 | fi |
---|
528 | |
---|
529 | PTHREAD_LIBS=error |
---|
530 | AC_CHECK_LIB(pthread, pthread_attr_init, |
---|
531 | PTHREAD_LIBS="-lpthread") |
---|
532 | if test "x$PTHREAD_LIBS" = xerror; then |
---|
533 | AC_CHECK_LIB(pthreads, pthread_attr_init, |
---|
534 | PTHREAD_LIBS="-lpthreads") |
---|
535 | fi |
---|
536 | if test "x$PTHREAD_LIBS" = xerror; then |
---|
537 | AC_CHECK_LIB(c_r, pthread_attr_init, |
---|
538 | PTHREAD_LIBS="-lc_r") |
---|
539 | fi |
---|
540 | if test "x$PTHREAD_LIBS" = xerror; then |
---|
541 | AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="") |
---|
542 | fi |
---|
543 | if test "x$PTHREAD_LIBS" = xerror; then |
---|
544 | AC_MSG_WARN(*** Unable to locate working posix thread library ***) |
---|
545 | fi |
---|
546 | AC_SUBST(PTHREAD_LIBS) |
---|
547 | |
---|
548 | WITH_OBSOLETE=NO |
---|
549 | if test "$enable_obsolete" = "yes"; then |
---|
550 | WITH_OBSOLETE=YES |
---|
551 | fi |
---|
552 | |
---|
553 | WITH_INSECURE=NO |
---|
554 | if test "$enable_insecure" = "yes"; then |
---|
555 | WITH_INSECURE=YES |
---|
556 | fi |
---|
557 | |
---|
558 | # Fast restart |
---|
559 | if test "$enable_fast_restart" = "yes"; then |
---|
560 | AC_DEFINE(FAST_RESTART, 1, [define if you want to have fast restart]) |
---|
561 | fi |
---|
562 | |
---|
563 | if test "$enable_bitmap_later" = "yes"; then |
---|
564 | AC_DEFINE(BITMAP_LATER, 1, [define if you want to salvager to check bitmasks later]) |
---|
565 | fi |
---|
566 | |
---|
567 | if test "$enable_full_vos_listvol_switch" = "yes"; then |
---|
568 | AC_DEFINE(FULL_LISTVOL_SWITCH, 1, [define if you want to want listvol switch]) |
---|
569 | fi |
---|
570 | |
---|
571 | if test "$enable_bos_restricted_mode" = "yes"; then |
---|
572 | AC_DEFINE(BOS_RESTRICTED_MODE, 1, [define if you want to want bos restricted mode]) |
---|
573 | fi |
---|
574 | |
---|
575 | if test "$enable_namei_fileserver" = "yes"; then |
---|
576 | AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver]) |
---|
577 | fi |
---|
578 | |
---|
579 | if test "$enable_afsdb" = "yes"; then |
---|
580 | LIB_AFSDB="$LIB_res_search" |
---|
581 | AC_DEFINE(AFS_AFSDB_ENV, 1, [define if you want to want search afsdb rr]) |
---|
582 | fi |
---|
583 | |
---|
584 | dnl check for tivoli |
---|
585 | AC_MSG_CHECKING(for tivoli tsm butc support) |
---|
586 | XBSA_CFLAGS="" |
---|
587 | if test "$enable_tivoli_tsm" = "yes"; then |
---|
588 | XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen |
---|
589 | XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen |
---|
590 | |
---|
591 | if test -e "$XBSADIR1/xbsa.h"; then |
---|
592 | XBSA_CFLAGS="-Dxbsa -I$XBSADIR1" |
---|
593 | AC_MSG_RESULT([yes, $XBSA_CFLAGS]) |
---|
594 | elif test -e "$XBSADIR2/xbsa.h"; then |
---|
595 | XBSA_CFLAGS="-Dxbsa -I$XBSADIR2" |
---|
596 | AC_MSG_RESULT([yes, $XBSA_CFLAGS]) |
---|
597 | else |
---|
598 | AC_MSG_RESULT([no, missing xbsa.h header file]) |
---|
599 | fi |
---|
600 | else |
---|
601 | AC_MSG_RESULT([no]) |
---|
602 | fi |
---|
603 | AC_SUBST(XBSA_CFLAGS) |
---|
604 | |
---|
605 | dnl checks for header files. |
---|
606 | AC_HEADER_STDC |
---|
607 | AC_HEADER_SYS_WAIT |
---|
608 | AC_HEADER_DIRENT |
---|
609 | AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h) |
---|
610 | AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h) |
---|
611 | AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h) |
---|
612 | AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h) |
---|
613 | AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h) |
---|
614 | AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h) |
---|
615 | |
---|
616 | AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec) |
---|
617 | AC_CHECK_FUNCS(setprogname getprogname sigaction) |
---|
618 | AC_CHECK_TYPE(ssize_t, int) |
---|
619 | |
---|
620 | AC_CHECK_FUNCS(timegm) |
---|
621 | |
---|
622 | dnl Directory PATH handling |
---|
623 | if test "x$enable_transarc_paths" = "xyes" ; then |
---|
624 | afsconfdir=${afsconfdir=/usr/afs/etc} |
---|
625 | viceetcdir=${viceetcdir=/usr/vice/etc} |
---|
626 | afskerneldir=${afskerneldir=${viceetcdir}} |
---|
627 | afssrvbindir=${afssrvbindir=/usr/afs/bin} |
---|
628 | afssrvsbindir=${afssrvsbindir=/usr/afs/bin} |
---|
629 | afssrvlibexecdir=${afssrvlibexecdir=/usr/afs/bin} |
---|
630 | afsdbdir=${afsdbdir=/usr/afs/db} |
---|
631 | afslogsdir=${afslogsdir=/usr/afs/logs} |
---|
632 | afslocaldir=${afslocaldir=/usr/afs/local} |
---|
633 | afsbackupdir=${afsbackupdir=/usr/afs/backup} |
---|
634 | afsbosconfigdir=${afsbosconfigdir=/usr/afs/local} |
---|
635 | else |
---|
636 | afsconfdir=${afsconfdir='${sysconfdir}/openafs/server'} |
---|
637 | viceetcdir=${viceetcdir='${sysconfdir}/openafs'} |
---|
638 | afskerneldir=${afskerneldir='${libdir}/openafs'} |
---|
639 | afssrvbindir=${afssrvbindir='${bindir}'} |
---|
640 | afssrvsbindir=${afssrvsbindir='${sbindir}'} |
---|
641 | afssrvlibexecdir=${afssrvlibexecdir='${libexecdir}/openafs'} |
---|
642 | afsdbdir=${afsdbdir='${localstatedir}/openafs/db'} |
---|
643 | afslogsdir=${afslogsdir='${localstatedir}/openafs/logs'} |
---|
644 | afslocaldir=${afslocaldir='${localstatedir}/openafs'} |
---|
645 | afsbackupdir=${afsbackupdir='${localstatedir}/openafs/backup'} |
---|
646 | afsbosconfigdir=${afsbosconfigdir='${sysconfdir}/openafs'} |
---|
647 | fi |
---|
648 | AC_SUBST(afsconfdir) |
---|
649 | AC_SUBST(viceetcdir) |
---|
650 | AC_SUBST(afskerneldir) |
---|
651 | AC_SUBST(afssrvbindir) |
---|
652 | AC_SUBST(afssrvsbindir) |
---|
653 | AC_SUBST(afssrvlibexecdir) |
---|
654 | AC_SUBST(afsdbdir) |
---|
655 | AC_SUBST(afslogsdir) |
---|
656 | AC_SUBST(afslocaldir) |
---|
657 | AC_SUBST(afsbackupdir) |
---|
658 | AC_SUBST(afsbosconfigdir) |
---|
659 | |
---|
660 | if test "x$enable_kernel_module" = "xyes"; then |
---|
661 | ENABLE_KERNEL_MODULE=libafs |
---|
662 | fi |
---|
663 | |
---|
664 | AC_SUBST(AFS_SYSNAME) |
---|
665 | AC_SUBST(ENABLE_KERNEL_MODULE) |
---|
666 | AC_SUBST(LIB_AFSDB) |
---|
667 | AC_SUBST(LINUX_KERNEL_PATH) |
---|
668 | AC_SUBST(LINUX_VERSION) |
---|
669 | AC_SUBST(MKAFS_OSTYPE) |
---|
670 | AC_SUBST(TOP_SRCDIR) |
---|
671 | AC_SUBST(TOP_INCDIR) |
---|
672 | AC_SUBST(TOP_LIBDIR) |
---|
673 | AC_SUBST(DEST) |
---|
674 | AC_SUBST(WITH_OBSOLETE) |
---|
675 | AC_SUBST(WITH_INSECURE) |
---|
676 | AC_SUBST(DARWIN_INFOFILE) |
---|
677 | AC_SUBST(IRIX_BUILD_IP35) |
---|
678 | |
---|
679 | ]) |
---|
680 | |
---|
681 | # isc-posix.m4 serial 1 (gettext-0.10.40) |
---|
682 | dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. |
---|
683 | dnl This file is free software, distributed under the terms of the GNU |
---|
684 | dnl General Public License. As a special exception to the GNU General |
---|
685 | dnl Public License, this file may be distributed as part of a program |
---|
686 | dnl that contains a configuration script generated by Autoconf, under |
---|
687 | dnl the same distribution terms as the rest of that program. |
---|
688 | |
---|
689 | # This test replaces the one in autoconf. |
---|
690 | # Currently this macro should have the same name as the autoconf macro |
---|
691 | # because gettext's gettext.m4 (distributed in the automake package) |
---|
692 | # still uses it. Otherwise, the use in gettext.m4 makes autoheader |
---|
693 | # give these diagnostics: |
---|
694 | # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX |
---|
695 | # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX |
---|
696 | |
---|
697 | undefine([AC_ISC_POSIX]) |
---|
698 | |
---|
699 | AC_DEFUN([AC_ISC_POSIX], |
---|
700 | [ |
---|
701 | dnl This test replaces the obsolescent AC_ISC_POSIX kludge. |
---|
702 | AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) |
---|
703 | ] |
---|
704 | ) |
---|
705 | |
---|
706 | |
---|
707 | dnl AM_PROG_LEX |
---|
708 | dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT |
---|
709 | AC_DEFUN([AM_PROG_LEX], |
---|
710 | [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) |
---|
711 | AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") |
---|
712 | AC_PROG_LEX |
---|
713 | AC_DECL_YYTEXT]) |
---|
714 | |
---|
715 | dnl |
---|
716 | dnl $Id: aclocal.m4,v 1.4 2003-03-20 00:09:30 zacheiss Exp $ |
---|
717 | dnl |
---|
718 | |
---|
719 | dnl check if this computer is little or big-endian |
---|
720 | dnl if we can figure it out at compile-time then don't define the cpp symbol |
---|
721 | dnl otherwise test for it and define it. also allow options for overriding |
---|
722 | dnl it when cross-compiling |
---|
723 | |
---|
724 | AC_DEFUN(OPENAFS_CHECK_BIGENDIAN, [ |
---|
725 | AC_ARG_ENABLE(bigendian, |
---|
726 | [ --enable-bigendian the target is big endian], |
---|
727 | openafs_cv_c_bigendian=yes) |
---|
728 | AC_ARG_ENABLE(littleendian, |
---|
729 | [ --enable-littleendian the target is little endian], |
---|
730 | openafs_cv_c_bigendian=no) |
---|
731 | AC_CACHE_CHECK(whether byte order is known at compile time, |
---|
732 | openafs_cv_c_bigendian_compile, |
---|
733 | [AC_TRY_COMPILE([ |
---|
734 | #include <sys/types.h> |
---|
735 | #include <sys/param.h>],[ |
---|
736 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
---|
737 | bogus endian macros |
---|
738 | #endif], openafs_cv_c_bigendian_compile=yes, openafs_cv_c_bigendian_compile=no)]) |
---|
739 | AC_CACHE_CHECK(whether byte ordering is bigendian, openafs_cv_c_bigendian,[ |
---|
740 | if test "$openafs_cv_c_bigendian_compile" = "yes"; then |
---|
741 | AC_TRY_COMPILE([ |
---|
742 | #include <sys/types.h> |
---|
743 | #include <sys/param.h>],[ |
---|
744 | #if BYTE_ORDER != BIG_ENDIAN |
---|
745 | not big endian |
---|
746 | #endif], openafs_cv_c_bigendian=yes, openafs_cv_c_bigendian=no) |
---|
747 | else |
---|
748 | AC_TRY_RUN([main () { |
---|
749 | /* Are we little or big endian? From Harbison&Steele. */ |
---|
750 | union |
---|
751 | { |
---|
752 | long l; |
---|
753 | char c[sizeof (long)]; |
---|
754 | } u; |
---|
755 | u.l = 1; |
---|
756 | exit (u.c[sizeof (long) - 1] == 1); |
---|
757 | }], openafs_cv_c_bigendian=no, openafs_cv_c_bigendian=yes, |
---|
758 | AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian])) |
---|
759 | fi |
---|
760 | ]) |
---|
761 | if test "$openafs_cv_c_bigendian" = "yes"; then |
---|
762 | AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl |
---|
763 | fi |
---|
764 | if test "$openafs_cv_c_bigendian_compile" = "yes"; then |
---|
765 | AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl |
---|
766 | fi |
---|
767 | ]) |
---|
768 | |
---|
769 | |
---|
770 | AC_DEFUN(OPENAFS_GCC_SUPPORTS_MARCH, [ |
---|
771 | AC_MSG_CHECKING(if $CC accepts -march=pentium) |
---|
772 | save_CFLAGS="$CFLAGS" |
---|
773 | CFLAGS="-MARCH=pentium" |
---|
774 | AC_CACHE_VAL(openafs_gcc_supports_march,[ |
---|
775 | AC_TRY_COMPILE( |
---|
776 | [], |
---|
777 | [int x;], |
---|
778 | openafs_gcc_supports_march=yes, |
---|
779 | openafs_gcc_supports_march=no)]) |
---|
780 | AC_MSG_RESULT($openafs_gcc_supports_march) |
---|
781 | if test x$openafs_gcc_supports_march = xyes; then |
---|
782 | P5PLUS_KOPTS="-march=pentium" |
---|
783 | else |
---|
784 | P5PLUS_KOPTS="-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2" |
---|
785 | fi |
---|
786 | CFLAGS="$save_CFLAGS" |
---|
787 | ]) |
---|
788 | |
---|
789 | AC_DEFUN(OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING, [ |
---|
790 | AC_MSG_CHECKING(if $CC needs -fno-strict-aliasing) |
---|
791 | save_CFLAGS="$CFLAGS" |
---|
792 | CFLAGS="-fno-strict-aliasing" |
---|
793 | AC_CACHE_VAL(openafs_gcc_needs_no_strict_aliasing,[ |
---|
794 | AC_TRY_COMPILE( |
---|
795 | [], |
---|
796 | [int x;], |
---|
797 | openafs_gcc_needs_no_strict_aliasing=yes, |
---|
798 | openafs_gcc_needs_no_strict_aliasing=no)]) |
---|
799 | AC_MSG_RESULT($openafs_gcc_needs_no_strict_aliasing) |
---|
800 | if test x$openafs_gcc_needs_no_strict_aliasing = xyes; then |
---|
801 | LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strict-aliasing" |
---|
802 | fi |
---|
803 | CFLAGS="$save_CFLAGS" |
---|
804 | ]) |
---|
805 | |
---|
806 | AC_DEFUN(OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE, [ |
---|
807 | AC_MSG_CHECKING(if $CC needs -fno-strength-reduce) |
---|
808 | save_CFLAGS="$CFLAGS" |
---|
809 | CFLAGS="-fno-strength-reduce" |
---|
810 | AC_CACHE_VAL(openafs_gcc_needs_no_strength_reduce,[ |
---|
811 | AC_TRY_COMPILE( |
---|
812 | [], |
---|
813 | [int x;], |
---|
814 | openafs_gcc_needs_no_strength_reduce=yes, |
---|
815 | openafs_gcc_needs_no_strength_reduce=no)]) |
---|
816 | AC_MSG_RESULT($openafs_gcc_needs_no_strength_reduce) |
---|
817 | if test x$openafs_gcc_needs_no_strength_reduce = xyes; then |
---|
818 | LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce" |
---|
819 | fi |
---|
820 | CFLAGS="$save_CFLAGS" |
---|
821 | ]) |
---|
822 | |
---|
823 | AC_DEFUN(OPENAFS_GCC_SUPPORTS_NO_COMMON, [ |
---|
824 | AC_MSG_CHECKING(if $CC supports -fno-common) |
---|
825 | save_CFLAGS="$CFLAGS" |
---|
826 | CFLAGS="-fno-common" |
---|
827 | AC_CACHE_VAL(openafs_gcc_supports_no_common,[ |
---|
828 | AC_TRY_COMPILE( |
---|
829 | [], |
---|
830 | [int x;], |
---|
831 | openafs_gcc_supports_no_common=yes, |
---|
832 | openafs_gcc_supports_no_common=no)]) |
---|
833 | AC_MSG_RESULT($openafs_gcc_supports_no_common) |
---|
834 | if test x$openafs_gcc_supports_no_common = xyes; then |
---|
835 | LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-common" |
---|
836 | fi |
---|
837 | CFLAGS="$save_CFLAGS" |
---|
838 | ]) |
---|
839 | |
---|
840 | |
---|
841 | AC_DEFUN(LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK, [ |
---|
842 | AC_MSG_CHECKING(for gfp_mask in struct address_space) |
---|
843 | save_CPPFLAGS="$CPPFLAGS" |
---|
844 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
845 | AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_gfp_mask, |
---|
846 | [ |
---|
847 | AC_TRY_COMPILE( |
---|
848 | [#include <linux/fs.h>], |
---|
849 | [struct address_space _a; |
---|
850 | printf("%d\n", _a.gfp_mask);], |
---|
851 | ac_cv_linux_fs_struct_address_space_has_gfp_mask=yes, |
---|
852 | ac_cv_linux_fs_struct_address_space_has_gfp_mask=no)]) |
---|
853 | AC_MSG_RESULT($ac_cv_linux_fs_struct_address_space_has_gfp_mask) |
---|
854 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
855 | |
---|
856 | AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_BYTES, [ |
---|
857 | AC_MSG_CHECKING(for i_bytes in struct inode) |
---|
858 | save_CPPFLAGS="$CPPFLAGS" |
---|
859 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
860 | AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_bytes, |
---|
861 | [ |
---|
862 | AC_TRY_COMPILE( |
---|
863 | [#include <linux/fs.h>], |
---|
864 | [struct inode _inode; |
---|
865 | printf("%d\n", _inode.i_bytes);], |
---|
866 | ac_cv_linux_fs_struct_inode_has_i_bytes=yes, |
---|
867 | ac_cv_linux_fs_struct_inode_has_i_bytes=no)]) |
---|
868 | AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_bytes) |
---|
869 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
870 | |
---|
871 | AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM, [ |
---|
872 | AC_MSG_CHECKING(for i_truncate_sem in struct inode) |
---|
873 | save_CPPFLAGS="$CPPFLAGS" |
---|
874 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
875 | AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_truncate_sem, |
---|
876 | [ |
---|
877 | AC_TRY_COMPILE( |
---|
878 | [#include <linux/fs.h>], |
---|
879 | [struct inode _i; |
---|
880 | printf("%x\n", _i.i_truncate_sem);], |
---|
881 | ac_cv_linux_fs_struct_inode_has_i_truncate_sem=yes, |
---|
882 | ac_cv_linux_fs_struct_inode_has_i_truncate_sem=no)]) |
---|
883 | AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_truncate_sem) |
---|
884 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
885 | |
---|
886 | AC_DEFUN(LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, [ |
---|
887 | AC_MSG_CHECKING(for page_lock in struct address_space) |
---|
888 | save_CPPFLAGS="$CPPFLAGS" |
---|
889 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
890 | AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_page_lock, |
---|
891 | [ |
---|
892 | AC_TRY_COMPILE( |
---|
893 | [#include <linux/fs.h>], |
---|
894 | [struct address_space _a_s; |
---|
895 | printf("%x\n", _a_s.page_lock);], |
---|
896 | ac_cv_linux_fs_struct_address_space_has_page_lock=yes, |
---|
897 | ac_cv_linux_fs_struct_address_space_has_page_lock=no)]) |
---|
898 | AC_MSG_RESULT($ac_cv_linux_fs_struct_address_space_has_page_lock) |
---|
899 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
900 | |
---|
901 | |
---|
902 | dnl LINUX_BUILD_VNODE_FROM_INODE (configdir, outputdir) |
---|
903 | dnl defaults: (src/config, src/afs/LINUX) |
---|
904 | |
---|
905 | AC_DEFUN(LINUX_BUILD_VNODE_FROM_INODE, [ |
---|
906 | AC_MSG_CHECKING(whether to build osi_vfs.h) |
---|
907 | configdir=ifelse([$1], ,src/config,$1) |
---|
908 | outputdir=ifelse([$2], ,src/afs/LINUX,$2) |
---|
909 | chmod +x $configdir/make_vnode.pl |
---|
910 | $configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -o $outputdir |
---|
911 | ]) |
---|
912 | |
---|
913 | AC_DEFUN(LINUX_COMPLETION_H_EXISTS, [ |
---|
914 | AC_MSG_CHECKING(for linux/completion.h existance) |
---|
915 | save_CPPFLAGS="$CPPFLAGS" |
---|
916 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
917 | AC_CACHE_VAL(ac_cv_linux_completion_h_exists, |
---|
918 | [ |
---|
919 | AC_TRY_COMPILE( |
---|
920 | [#include <linux/completion.h> |
---|
921 | #include <linux/version.h>], |
---|
922 | [struct completion _c; |
---|
923 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,8) |
---|
924 | lose |
---|
925 | #endif |
---|
926 | ], |
---|
927 | ac_cv_linux_completion_h_exists=yes, |
---|
928 | ac_cv_linux_completion_h_exists=no)]) |
---|
929 | AC_MSG_RESULT($ac_cv_linux_completion_h_exists) |
---|
930 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
931 | |
---|
932 | |
---|
933 | AC_DEFUN(LINUX_DEFINES_FOR_EACH_PROCESS, [ |
---|
934 | AC_MSG_CHECKING(for defined for_each_process) |
---|
935 | save_CPPFLAGS="$CPPFLAGS" |
---|
936 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
937 | AC_CACHE_VAL(ac_cv_linux_defines_for_each_process, |
---|
938 | [ |
---|
939 | AC_TRY_COMPILE( |
---|
940 | [#include <linux/sched.h>], |
---|
941 | [#ifndef for_each_process(p) |
---|
942 | #error for_each_process not defined |
---|
943 | #endif], |
---|
944 | ac_cv_linux_defines_for_each_process=yes, |
---|
945 | ac_cv_linux_defines_for_each_process=no)]) |
---|
946 | AC_MSG_RESULT($ac_cv_linux_defines_for_each_process) |
---|
947 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
948 | |
---|
949 | |
---|
950 | AC_DEFUN(LINUX_DEFINES_PREV_TASK, [ |
---|
951 | AC_MSG_CHECKING(for defined prev_task) |
---|
952 | save_CPPFLAGS="$CPPFLAGS" |
---|
953 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
954 | AC_CACHE_VAL(ac_cv_linux_defines_prev_task, |
---|
955 | [ |
---|
956 | AC_TRY_COMPILE( |
---|
957 | [#include <linux/sched.h>], |
---|
958 | [#ifndef prev_task(p) |
---|
959 | #error prev_task not defined |
---|
960 | #endif], |
---|
961 | ac_cv_linux_defines_prev_task=yes, |
---|
962 | ac_cv_linux_defines_prev_task=no)]) |
---|
963 | AC_MSG_RESULT($ac_cv_linux_defines_prev_task) |
---|
964 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
965 | |
---|
966 | |
---|
967 | AC_DEFUN(LINUX_EXPORTS_INIT_MM, [ |
---|
968 | AC_MSG_CHECKING(for exported init_mm) |
---|
969 | save_CPPFLAGS="$CPPFLAGS" |
---|
970 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
971 | AC_CACHE_VAL(ac_cv_linux_exports_init_mm, |
---|
972 | [ |
---|
973 | AC_TRY_COMPILE( |
---|
974 | [#include <linux/modversions.h>], |
---|
975 | [#ifndef __ver_init_mm |
---|
976 | #error init_mm not exported |
---|
977 | #endif], |
---|
978 | ac_cv_linux_exports_init_mm=yes, |
---|
979 | ac_cv_linux_exports_init_mm=no)]) |
---|
980 | AC_MSG_RESULT($ac_cv_linux_exports_init_mm) |
---|
981 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
982 | |
---|
983 | |
---|
984 | AC_DEFUN(LINUX_EXPORTS_KALLSYMS_ADDRESS, [ |
---|
985 | AC_MSG_CHECKING(for exported kallsyms_address_to_symbol) |
---|
986 | save_CPPFLAGS="$CPPFLAGS" |
---|
987 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
988 | AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_address, |
---|
989 | [ |
---|
990 | AC_TRY_COMPILE( |
---|
991 | [#include <linux/modversions.h>], |
---|
992 | [#ifndef __ver_kallsyms_address_to_symbol |
---|
993 | #error kallsyms_address_to_symbol not exported |
---|
994 | #endif], |
---|
995 | ac_cv_linux_exports_kallsyms_address=yes, |
---|
996 | ac_cv_linux_exports_kallsyms_address=no)]) |
---|
997 | AC_MSG_RESULT($ac_cv_linux_exports_kallsyms_address) |
---|
998 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
999 | |
---|
1000 | |
---|
1001 | AC_DEFUN(LINUX_EXPORTS_KALLSYMS_SYMBOL, [ |
---|
1002 | AC_MSG_CHECKING(for exported kallsyms_symbol_to_address) |
---|
1003 | save_CPPFLAGS="$CPPFLAGS" |
---|
1004 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1005 | AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_symbol, |
---|
1006 | [ |
---|
1007 | AC_TRY_COMPILE( |
---|
1008 | [#include <linux/modversions.h>], |
---|
1009 | [#ifndef __ver_kallsyms_symbol_to_address |
---|
1010 | #error kallsyms_symbol_to_address not exported |
---|
1011 | #endif], |
---|
1012 | ac_cv_linux_exports_kallsyms_symbol=yes, |
---|
1013 | ac_cv_linux_exports_kallsyms_symbol=no)]) |
---|
1014 | AC_MSG_RESULT($ac_cv_linux_exports_kallsyms_symbol) |
---|
1015 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1016 | |
---|
1017 | |
---|
1018 | AC_DEFUN(LINUX_EXPORTS_SYS_CALL_TABLE, [ |
---|
1019 | AC_MSG_CHECKING(for exported sys_call_table) |
---|
1020 | save_CPPFLAGS="$CPPFLAGS" |
---|
1021 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1022 | AC_CACHE_VAL(ac_cv_linux_exports_sys_call_table, |
---|
1023 | [ |
---|
1024 | AC_TRY_COMPILE( |
---|
1025 | [#include <linux/modversions.h>], |
---|
1026 | [#ifndef __ver_sys_call_table |
---|
1027 | #error sys_call_table not exported |
---|
1028 | #endif], |
---|
1029 | ac_cv_linux_exports_sys_call_table=yes, |
---|
1030 | ac_cv_linux_exports_sys_call_table=no)]) |
---|
1031 | AC_MSG_RESULT($ac_cv_linux_exports_sys_call_table) |
---|
1032 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1033 | |
---|
1034 | |
---|
1035 | AC_DEFUN(LINUX_EXPORTS_SYS_CHDIR, [ |
---|
1036 | AC_MSG_CHECKING(for exported sys_chdir) |
---|
1037 | save_CPPFLAGS="$CPPFLAGS" |
---|
1038 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1039 | AC_CACHE_VAL(ac_cv_linux_exports_sys_chdir, |
---|
1040 | [ |
---|
1041 | AC_TRY_COMPILE( |
---|
1042 | [#include <linux/modversions.h>], |
---|
1043 | [#ifndef __ver_sys_chdir |
---|
1044 | #error sys_chdir not exported |
---|
1045 | #endif], |
---|
1046 | ac_cv_linux_exports_sys_chdir=yes, |
---|
1047 | ac_cv_linux_exports_sys_chdir=no)]) |
---|
1048 | AC_MSG_RESULT($ac_cv_linux_exports_sys_chdir) |
---|
1049 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1050 | |
---|
1051 | |
---|
1052 | AC_DEFUN(LINUX_EXPORTS_SYS_CLOSE, [ |
---|
1053 | AC_MSG_CHECKING(for exported sys_close) |
---|
1054 | save_CPPFLAGS="$CPPFLAGS" |
---|
1055 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1056 | AC_CACHE_VAL(ac_cv_linux_exports_sys_close, |
---|
1057 | [ |
---|
1058 | AC_TRY_COMPILE( |
---|
1059 | [#include <linux/modversions.h>], |
---|
1060 | [#ifndef __ver_sys_close |
---|
1061 | #error sys_close not exported |
---|
1062 | #endif], |
---|
1063 | ac_cv_linux_exports_sys_close=yes, |
---|
1064 | ac_cv_linux_exports_sys_close=no)]) |
---|
1065 | AC_MSG_RESULT($ac_cv_linux_exports_sys_close) |
---|
1066 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1067 | |
---|
1068 | |
---|
1069 | AC_DEFUN(LINUX_EXPORTS_TASKLIST_LOCK, [ |
---|
1070 | AC_MSG_CHECKING(for exported tasklist_lock) |
---|
1071 | save_CPPFLAGS="$CPPFLAGS" |
---|
1072 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1073 | AC_CACHE_VAL(ac_cv_linux_exports_tasklist_lock, |
---|
1074 | [ |
---|
1075 | AC_TRY_COMPILE( |
---|
1076 | [#include <linux/modversions.h>], |
---|
1077 | [#ifndef __ver_tasklist_lock |
---|
1078 | #error tasklist_lock not exported |
---|
1079 | #endif], |
---|
1080 | ac_cv_linux_exports_tasklist_lock=yes, |
---|
1081 | ac_cv_linux_exports_tasklist_lock=no)]) |
---|
1082 | AC_MSG_RESULT($ac_cv_linux_exports_tasklist_lock) |
---|
1083 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1084 | |
---|
1085 | |
---|
1086 | AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_CDEV, [ |
---|
1087 | AC_MSG_CHECKING(for i_cdev in struct inode) |
---|
1088 | save_CPPFLAGS="$CPPFLAGS" |
---|
1089 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1090 | AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, |
---|
1091 | [ |
---|
1092 | AC_TRY_COMPILE( |
---|
1093 | [#include <linux/fs.h>], |
---|
1094 | [struct inode _inode; |
---|
1095 | printf("%d\n", _inode.i_cdev);], |
---|
1096 | ac_cv_linux_fs_struct_inode_has_i_cdev=yes, |
---|
1097 | ac_cv_linux_fs_struct_inode_has_i_cdev=no)]) |
---|
1098 | AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_cdev) |
---|
1099 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1100 | |
---|
1101 | |
---|
1102 | AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_DEVICES, [ |
---|
1103 | AC_MSG_CHECKING(for i_devices in struct inode) |
---|
1104 | save_CPPFLAGS="$CPPFLAGS" |
---|
1105 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1106 | AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, |
---|
1107 | [ |
---|
1108 | AC_TRY_COMPILE( |
---|
1109 | [#include <linux/fs.h>], |
---|
1110 | [struct inode _inode; |
---|
1111 | printf("%d\n", _inode.i_devices);], |
---|
1112 | ac_cv_linux_fs_struct_inode_has_i_devices=yes, |
---|
1113 | ac_cv_linux_fs_struct_inode_has_i_devices=no)]) |
---|
1114 | AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_devices) |
---|
1115 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1116 | |
---|
1117 | |
---|
1118 | AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, [ |
---|
1119 | AC_MSG_CHECKING(for i_dirty_data_buffers in struct inode) |
---|
1120 | save_CPPFLAGS="$CPPFLAGS" |
---|
1121 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1122 | AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers, |
---|
1123 | [ |
---|
1124 | AC_TRY_COMPILE( |
---|
1125 | [#include <linux/fs.h>], |
---|
1126 | [struct inode _inode; |
---|
1127 | printf("%d\n", _inode.i_dirty_data_buffers);], |
---|
1128 | ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes, |
---|
1129 | ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no)]) |
---|
1130 | AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers) |
---|
1131 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1132 | |
---|
1133 | |
---|
1134 | AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD, [ |
---|
1135 | AC_MSG_CHECKING(for i_mapping_overload in struct inode) |
---|
1136 | save_CPPFLAGS="$CPPFLAGS" |
---|
1137 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1138 | AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mapping_overload, |
---|
1139 | [ |
---|
1140 | AC_TRY_COMPILE( |
---|
1141 | [#include <linux/fs.h>], |
---|
1142 | [struct inode _inode; |
---|
1143 | printf("%d\n", _inode.i_mapping_overload);], |
---|
1144 | ac_cv_linux_fs_struct_inode_has_i_mapping_overload=yes, |
---|
1145 | ac_cv_linux_fs_struct_inode_has_i_mapping_overload=no)]) |
---|
1146 | AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mapping_overload) |
---|
1147 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1148 | |
---|
1149 | |
---|
1150 | AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_MMAP_SHARED, [ |
---|
1151 | AC_MSG_CHECKING(for i_mmap_shared in struct inode) |
---|
1152 | save_CPPFLAGS="$CPPFLAGS" |
---|
1153 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1154 | AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mmap_shared, |
---|
1155 | [ |
---|
1156 | AC_TRY_COMPILE( |
---|
1157 | [#include <linux/fs.h>], |
---|
1158 | [struct inode _inode; |
---|
1159 | printf("%d\n", _inode.i_mmap_shared);], |
---|
1160 | ac_cv_linux_fs_struct_inode_has_i_mmap_shared=yes, |
---|
1161 | ac_cv_linux_fs_struct_inode_has_i_mmap_shared=no)]) |
---|
1162 | AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mmap_shared) |
---|
1163 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1164 | |
---|
1165 | |
---|
1166 | AC_DEFUN(LINUX_RECALC_SIGPENDING_ARG_TYPE,[ |
---|
1167 | AC_MSG_CHECKING(for recalc_sigpending arg type) |
---|
1168 | save_CPPFLAGS="$CPPFLAGS" |
---|
1169 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1170 | AC_CACHE_VAL(ac_cv_linux_func_recalc_sigpending_takes_void, |
---|
1171 | [ |
---|
1172 | AC_TRY_COMPILE( |
---|
1173 | [#include <linux/sched.h>], |
---|
1174 | [recalc_sigpending();], |
---|
1175 | ac_cv_linux_func_recalc_sigpending_takes_void=yes, |
---|
1176 | ac_cv_linux_func_recalc_sigpending_takes_void=no)]) |
---|
1177 | AC_MSG_RESULT($ac_cv_linux_func_recalc_sigpending_takes_void) |
---|
1178 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1179 | |
---|
1180 | |
---|
1181 | AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT, [ |
---|
1182 | AC_MSG_CHECKING(for parent in struct task_struct) |
---|
1183 | save_CPPFLAGS="$CPPFLAGS" |
---|
1184 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1185 | AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_parent, |
---|
1186 | [ |
---|
1187 | AC_TRY_COMPILE( |
---|
1188 | [#include <linux/sched.h>], |
---|
1189 | [struct task_struct _tsk; |
---|
1190 | printf("%d\n", _tsk.parent);], |
---|
1191 | ac_cv_linux_sched_struct_task_struct_has_parent=yes, |
---|
1192 | ac_cv_linux_sched_struct_task_struct_has_parent=no)]) |
---|
1193 | AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_parent) |
---|
1194 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1195 | |
---|
1196 | |
---|
1197 | AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT, [ |
---|
1198 | AC_MSG_CHECKING(for real_parent in struct task_struct) |
---|
1199 | save_CPPFLAGS="$CPPFLAGS" |
---|
1200 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1201 | AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_real_parent, |
---|
1202 | [ |
---|
1203 | AC_TRY_COMPILE( |
---|
1204 | [#include <linux/sched.h>], |
---|
1205 | [struct task_struct _tsk; |
---|
1206 | printf("%d\n", _tsk.real_parent);], |
---|
1207 | ac_cv_linux_sched_struct_task_struct_has_real_parent=yes, |
---|
1208 | ac_cv_linux_sched_struct_task_struct_has_real_parent=no)]) |
---|
1209 | AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_real_parent) |
---|
1210 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1211 | |
---|
1212 | |
---|
1213 | AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK, [ |
---|
1214 | AC_MSG_CHECKING(for sigmask_lock in struct task_struct) |
---|
1215 | save_CPPFLAGS="$CPPFLAGS" |
---|
1216 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1217 | AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sigmask_lock, |
---|
1218 | [ |
---|
1219 | AC_TRY_COMPILE( |
---|
1220 | [#include <linux/sched.h>], |
---|
1221 | [struct task_struct _tsk; |
---|
1222 | printf("%d\n", _tsk.sigmask_lock);], |
---|
1223 | ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=yes, |
---|
1224 | ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=no)]) |
---|
1225 | AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sigmask_lock) |
---|
1226 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1227 | |
---|
1228 | AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG, [ |
---|
1229 | AC_MSG_CHECKING(for sig in struct task_struct) |
---|
1230 | save_CPPFLAGS="$CPPFLAGS" |
---|
1231 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1232 | AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sig, |
---|
1233 | [ |
---|
1234 | AC_TRY_COMPILE( |
---|
1235 | [#include <linux/sched.h>], |
---|
1236 | [struct task_struct _tsk; |
---|
1237 | printf("%d\n", _tsk.sig);], |
---|
1238 | ac_cv_linux_sched_struct_task_struct_has_sig=yes, |
---|
1239 | ac_cv_linux_sched_struct_task_struct_has_sig=no)]) |
---|
1240 | AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sig) |
---|
1241 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1242 | |
---|
1243 | AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND, [ |
---|
1244 | AC_MSG_CHECKING(for sighand in struct task_struct) |
---|
1245 | save_CPPFLAGS="$CPPFLAGS" |
---|
1246 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1247 | AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sighand, |
---|
1248 | [ |
---|
1249 | AC_TRY_COMPILE( |
---|
1250 | [#include <linux/sched.h>], |
---|
1251 | [struct task_struct _tsk; |
---|
1252 | printf("%d\n", _tsk.sighand);], |
---|
1253 | ac_cv_linux_sched_struct_task_struct_has_sighand=yes, |
---|
1254 | ac_cv_linux_sched_struct_task_struct_has_sighand=no)]) |
---|
1255 | AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sighand) |
---|
1256 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1257 | |
---|
1258 | |
---|
1259 | AC_DEFUN(LINUX_INODE_SETATTR_RETURN_TYPE,[ |
---|
1260 | AC_MSG_CHECKING(for inode_setattr return type) |
---|
1261 | save_CPPFLAGS="$CPPFLAGS" |
---|
1262 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" |
---|
1263 | AC_CACHE_VAL(ac_cv_linux_func_inode_setattr_returns_int, |
---|
1264 | [ |
---|
1265 | AC_TRY_COMPILE( |
---|
1266 | [#include <linux/fs.h>], |
---|
1267 | [struct inode _inode; |
---|
1268 | struct iattr _iattr; |
---|
1269 | int i; |
---|
1270 | i = inode_setattr(&_inode, &_iattr);], |
---|
1271 | ac_cv_linux_func_inode_setattr_returns_int=yes, |
---|
1272 | ac_cv_linux_func_inode_setattr_returns_int=no)]) |
---|
1273 | AC_MSG_RESULT($ac_cv_linux_func_inode_setattr_returns_int) |
---|
1274 | CPPFLAGS="$save_CPPFLAGS"]) |
---|
1275 | |
---|
1276 | AC_DEFUN(LINUX_NEED_RHCONFIG,[ |
---|
1277 | RHCONFIG_SP="" |
---|
1278 | RHCONFIG_MP="" |
---|
1279 | if test "x$enable_redhat_buildsys" = "xyes"; then |
---|
1280 | AC_MSG_WARN(Configured to build from a Red Hat SPEC file) |
---|
1281 | else |
---|
1282 | AC_MSG_CHECKING(for redhat kernel configuration) |
---|
1283 | if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then |
---|
1284 | ac_linux_rhconfig=yes |
---|
1285 | RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0" |
---|
1286 | RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1" |
---|
1287 | AC_MSG_RESULT($ac_linux_rhconfig) |
---|
1288 | if test ! -f "/boot/kernel.h"; then |
---|
1289 | AC_MSG_WARN([/boot/kernel.h does not exist. build may fail]) |
---|
1290 | fi |
---|
1291 | else |
---|
1292 | ac_linux_rhconfig=no |
---|
1293 | AC_MSG_RESULT($ac_linux_rhconfig) |
---|
1294 | fi |
---|
1295 | fi |
---|
1296 | AC_SUBST(RHCONFIG_SP) |
---|
1297 | AC_SUBST(RHCONFIG_MP) |
---|
1298 | ]) |
---|
1299 | |
---|
1300 | AC_DEFUN(LINUX_WHICH_MODULES,[ |
---|
1301 | if test "x$enable_redhat_buildsys" = "xyes"; then |
---|
1302 | MPS=Default |
---|
1303 | else |
---|
1304 | save_CPPFLAGS="$CPPFLAGS" |
---|
1305 | CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS" |
---|
1306 | AC_MSG_CHECKING(if kernel uses MODVERSIONS) |
---|
1307 | AC_CACHE_VAL(ac_cv_linux_config_modversions,[ |
---|
1308 | AC_TRY_COMPILE( |
---|
1309 | [#include <linux/config.h> |
---|
1310 | ], |
---|
1311 | [#ifndef CONFIG_MODVERSIONS |
---|
1312 | lose; |
---|
1313 | #endif |
---|
1314 | ], |
---|
1315 | ac_cv_linux_config_modversions=yes, |
---|
1316 | ac_cv_linux_config_modversions=no)]) |
---|
1317 | AC_MSG_RESULT($ac_cv_linux_config_modversions) |
---|
1318 | AC_MSG_CHECKING(which kernel modules to build) |
---|
1319 | if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then |
---|
1320 | MPS="MP SP" |
---|
1321 | else |
---|
1322 | AC_CACHE_VAL(ac_cv_linux_config_smp, [ |
---|
1323 | AC_TRY_COMPILE( |
---|
1324 | [#include <linux/config.h> |
---|
1325 | ], |
---|
1326 | [#ifndef CONFIG_SMP |
---|
1327 | lose; |
---|
1328 | #endif |
---|
1329 | ], |
---|
1330 | ac_cv_linux_config_smp=yes, |
---|
1331 | ac_cv_linux_config_smp=no)]) |
---|
1332 | dnl AC_MSG_RESULT($ac_cv_linux_config_smp) |
---|
1333 | if test "x$ac_cv_linux_config_smp" = "xyes"; then |
---|
1334 | MPS=MP |
---|
1335 | else |
---|
1336 | MPS=SP |
---|
1337 | fi |
---|
1338 | fi |
---|
1339 | CPPFLAGS=$save_CPPFLAGS |
---|
1340 | AC_MSG_RESULT($MPS) |
---|
1341 | fi |
---|
1342 | AC_SUBST(MPS) |
---|
1343 | ]) |
---|
1344 | |
---|
1345 | |
---|
1346 | AC_DEFUN(SOLARIS_UFSVFS_HAS_DQRWLOCK, [ |
---|
1347 | AC_MSG_CHECKING(for vfs_dqrwlock in struct ufsvfs) |
---|
1348 | AC_CACHE_VAL(ac_cv_solaris_ufsvfs_has_dqrwlock, |
---|
1349 | [ |
---|
1350 | AC_TRY_COMPILE( |
---|
1351 | [#define _KERNEL |
---|
1352 | #include <sys/fs/ufs_inode.h>], |
---|
1353 | [struct ufsvfs _ufsvfs; |
---|
1354 | (void) _ufsvfs.vfs_dqrwlock;], |
---|
1355 | ac_cv_solaris_ufsvfs_has_dqrwlock=yes, |
---|
1356 | ac_cv_solaris_ufsvfs_has_dqrwlock=no)]) |
---|
1357 | AC_MSG_RESULT($ac_cv_solaris_ufsvfs_has_dqrwlock) |
---|
1358 | if test "$ac_cv_solaris_ufsvfs_has_dqrwlock" = "yes"; then |
---|
1359 | AC_DEFINE(HAVE_VFS_DQRWLOCK, 1, [define if struct ufsvfs has vfs_dqrwlock]) |
---|
1360 | fi |
---|
1361 | ]) |
---|
1362 | |
---|
1363 | |
---|
1364 | AC_DEFUN(SOLARIS_PROC_HAS_P_COREFILE, [ |
---|
1365 | AC_MSG_CHECKING(for p_corefile in struct proc) |
---|
1366 | AC_CACHE_VAL(ac_cv_solaris_proc_has_p_corefile, |
---|
1367 | [ |
---|
1368 | AC_TRY_COMPILE( |
---|
1369 | [#define _KERNEL |
---|
1370 | #include <sys/proc.h>], |
---|
1371 | [struct proc _proc; |
---|
1372 | (void) _proc.p_corefile;], |
---|
1373 | ac_cv_solaris_proc_has_p_corefile=yes, |
---|
1374 | ac_cv_solaris_proc_has_p_corefile=no)]) |
---|
1375 | AC_MSG_RESULT($ac_cv_solaris_proc_has_p_corefile) |
---|
1376 | if test "$ac_cv_solaris_proc_has_p_corefile" = "yes"; then |
---|
1377 | AC_DEFINE(HAVE_P_COREFILE, 1, [define if struct proc has p_corefile]) |
---|
1378 | fi |
---|
1379 | ]) |
---|
1380 | |
---|
1381 | |
---|
1382 | # Do all the work for Automake. This macro actually does too much -- |
---|
1383 | # some checks are only needed if your package does certain things. |
---|
1384 | # But this isn't really a big deal. |
---|
1385 | |
---|
1386 | # serial 1 |
---|
1387 | |
---|
1388 | dnl Usage: |
---|
1389 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
1390 | |
---|
1391 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
1392 | [AC_REQUIRE([AC_PROG_INSTALL]) |
---|
1393 | PACKAGE=[$1] |
---|
1394 | AC_SUBST(PACKAGE) |
---|
1395 | VERSION=[$2] |
---|
1396 | AC_SUBST(VERSION) |
---|
1397 | dnl test to see if srcdir already configured |
---|
1398 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
1399 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
1400 | fi |
---|
1401 | ifelse([$3],, |
---|
1402 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
1403 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
1404 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
1405 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
1406 | dnl FIXME This is truly gross. |
---|
1407 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
1408 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
---|
1409 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
1410 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
---|
1411 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
1412 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
1413 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
1414 | |
---|
1415 | # |
---|
1416 | # Check to make sure that the build environment is sane. |
---|
1417 | # |
---|
1418 | |
---|
1419 | AC_DEFUN([AM_SANITY_CHECK], |
---|
1420 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
1421 | # Just in case |
---|
1422 | sleep 1 |
---|
1423 | echo timestamp > conftestfile |
---|
1424 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
1425 | # arguments. Must try -L first in case configure is actually a |
---|
1426 | # symlink; some systems play weird games with the mod time of symlinks |
---|
1427 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
1428 | # directory). |
---|
1429 | if ( |
---|
1430 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
1431 | if test "[$]*" = "X"; then |
---|
1432 | # -L didn't work. |
---|
1433 | set X `ls -t $srcdir/configure conftestfile` |
---|
1434 | fi |
---|
1435 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
1436 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
1437 | |
---|
1438 | # If neither matched, then we have a broken ls. This can happen |
---|
1439 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
1440 | # broken ls alias from the environment. This has actually |
---|
1441 | # happened. Such a system could not be considered "sane". |
---|
1442 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
1443 | alias in your environment]) |
---|
1444 | fi |
---|
1445 | |
---|
1446 | test "[$]2" = conftestfile |
---|
1447 | ) |
---|
1448 | then |
---|
1449 | # Ok. |
---|
1450 | : |
---|
1451 | else |
---|
1452 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
1453 | Check your system clock]) |
---|
1454 | fi |
---|
1455 | rm -f conftest* |
---|
1456 | AC_MSG_RESULT(yes)]) |
---|
1457 | |
---|
1458 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
1459 | dnl The program must properly implement --version. |
---|
1460 | AC_DEFUN([AM_MISSING_PROG], |
---|
1461 | [AC_MSG_CHECKING(for working $2) |
---|
1462 | # Run test in a subshell; some versions of sh will print an error if |
---|
1463 | # an executable is not found, even if stderr is redirected. |
---|
1464 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
1465 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
1466 | $1=$2 |
---|
1467 | AC_MSG_RESULT(found) |
---|
1468 | else |
---|
1469 | $1="$3/missing $2" |
---|
1470 | AC_MSG_RESULT(missing) |
---|
1471 | fi |
---|
1472 | AC_SUBST($1)]) |
---|
1473 | |
---|