Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
1 #* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 #
3 # LC_CONFIG_SRCDIR
4 #
5 # Wrapper for AC_CONFIG_SUBDIR
6 #
7 AC_DEFUN([LC_CONFIG_SRCDIR],
8 [AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c])
9 ])
10
11 #
12 # LC_PATH_DEFAULTS
13 #
14 # lustre specific paths
15 #
16 AC_DEFUN([LC_PATH_DEFAULTS],
17 [# ptlrpc kernel build requires this
18 LUSTRE="$PWD/lustre"
19 AC_SUBST(LUSTRE)
20
21 # mount.lustre
22 rootsbindir='/sbin'
23 AC_SUBST(rootsbindir)
24
25 demodir='$(docdir)/demo'
26 AC_SUBST(demodir)
27
28 pkgexampledir='${pkgdatadir}/examples'
29 AC_SUBST(pkgexampledir)
30 ])
31
32 #
33 # LC_TARGET_SUPPORTED
34 #
35 # is the target os supported?
36 #
37 AC_DEFUN([LC_TARGET_SUPPORTED],
38 [case $target_os in
39         linux* | darwin*)
40 $1
41                 ;;
42         *)
43 $2
44                 ;;
45 esac
46 ])
47
48 #
49 # LC_CONFIG_EXT3
50 #
51 # that ext3 is enabled in the kernel
52 #
53 AC_DEFUN([LC_CONFIG_EXT3],
54 [LB_LINUX_CONFIG([EXT3_FS],[],[
55         LB_LINUX_CONFIG([EXT3_FS_MODULE],[],[$2])
56 ])
57 LB_LINUX_CONFIG([EXT3_FS_XATTR],[$1],[$3])
58 ])
59
60 #
61 # LC_FSHOOKS
62 #
63 # If we have (and can build) fshooks.h
64 #
65 AC_DEFUN([LC_FSHOOKS],
66 [LB_CHECK_FILE([$LINUX/include/linux/fshooks.h],[
67         AC_MSG_CHECKING([if fshooks.h can be compiled])
68         LB_LINUX_TRY_COMPILE([
69                 #include <linux/fshooks.h>
70         ],[],[
71                 AC_MSG_RESULT([yes])
72         ],[
73                 AC_MSG_RESULT([no])
74                 AC_MSG_WARN([You might have better luck with gcc 3.3.x.])
75                 AC_MSG_WARN([You can set CC=gcc33 before running configure.])
76                 AC_MSG_ERROR([Your compiler cannot build fshooks.h.])
77         ])
78 $1
79 ],[
80 $2
81 ])
82 ])
83
84 #
85 # LC_STRUCT_KIOBUF
86 #
87 # rh 2.4.18 has iobuf->dovary, but other kernels do not
88 #
89 AC_DEFUN([LC_STRUCT_KIOBUF],
90 [AC_MSG_CHECKING([if struct kiobuf has a dovary field])
91 LB_LINUX_TRY_COMPILE([
92         #include <linux/iobuf.h>
93 ],[
94         struct kiobuf iobuf;
95         iobuf.dovary = 1;
96 ],[
97         AC_MSG_RESULT([yes])
98         AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field])
99 ],[
100         AC_MSG_RESULT([no])
101 ])
102 ])
103
104 #
105 # LC_FUNC_COND_RESCHED
106 #
107 # cond_resched() was introduced in 2.4.20
108 #
109 AC_DEFUN([LC_FUNC_COND_RESCHED],
110 [AC_MSG_CHECKING([if kernel offers cond_resched])
111 LB_LINUX_TRY_COMPILE([
112         #include <linux/sched.h>
113 ],[
114         cond_resched();
115 ],[
116         AC_MSG_RESULT([yes])
117         AC_DEFINE(HAVE_COND_RESCHED, 1, [cond_resched found])
118 ],[
119         AC_MSG_RESULT([no])
120 ])
121 ])
122
123 #
124 # LC_FUNC_ZAP_PAGE_RANGE
125 #
126 # if zap_page_range() takes a vma arg
127 #
128 AC_DEFUN([LC_FUNC_ZAP_PAGE_RANGE],
129 [AC_MSG_CHECKING([if zap_page_range with vma parameter])
130 ZAP_PAGE_RANGE_VMA="`grep -c 'zap_page_range.*struct vm_area_struct' $LINUX/include/linux/mm.h`"
131 if test "$ZAP_PAGE_RANGE_VMA" != 0 ; then
132         AC_DEFINE(ZAP_PAGE_RANGE_VMA, 1, [zap_page_range with vma parameter])
133         AC_MSG_RESULT([yes])
134 else
135         AC_MSG_RESULT([no])
136 fi
137 ])
138
139 #
140 # LC_FUNC_PDE
141 #
142 # if proc_fs.h defines PDE()
143 #
144 AC_DEFUN([LC_FUNC_PDE],
145 [AC_MSG_CHECKING([if kernel defines PDE])
146 HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`"
147 if test "$HAVE_PDE" != 0 ; then
148         AC_DEFINE(HAVE_PDE, 1, [the kernel defines PDE])
149         AC_MSG_RESULT([yes])
150 else
151         AC_MSG_RESULT([no])
152 fi
153 ])
154
155 #
156 # LC_FUNC_FILEMAP_FDATASYNC
157 #
158 # if filemap_fdatasync() exists
159 #
160 AC_DEFUN([LC_FUNC_FILEMAP_FDATAWRITE],
161 [AC_MSG_CHECKING([whether filemap_fdatawrite() is defined])
162 LB_LINUX_TRY_COMPILE([
163         #include <linux/fs.h>
164 ],[
165         int (*foo)(struct address_space *)= filemap_fdatawrite;
166 ],[
167         AC_MSG_RESULT([yes])
168         AC_DEFINE(HAVE_FILEMAP_FDATAWRITE, 1, [filemap_fdatawrite() found])
169 ],[
170         AC_MSG_RESULT([no])
171 ])
172 ])
173
174 #
175 # LC_FUNC_DIRECT_IO
176 #
177 # if direct_IO takes a struct file argument
178 #
179 AC_DEFUN([LC_FUNC_DIRECT_IO],
180 [AC_MSG_CHECKING([if kernel passes struct file to direct_IO])
181 HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`"
182 if test "$HAVE_DIO_FILE" != 0 ; then
183         AC_DEFINE(HAVE_DIO_FILE, 1, [the kernel passes struct file to direct_IO])
184         AC_MSG_RESULT(yes)
185 else
186         AC_MSG_RESULT(no)
187 fi
188 ])
189
190 #
191 # LC_HEADER_MM_INLINE
192 #
193 # RHEL kernels define page_count in mm_inline.h
194 #
195 AC_DEFUN([LC_HEADER_MM_INLINE],
196 [AC_MSG_CHECKING([if kernel has mm_inline.h header])
197 LB_LINUX_TRY_COMPILE([
198         #include <linux/mm_inline.h>
199 ],[
200         #ifndef page_count
201         #error mm_inline.h does not define page_count
202         #endif
203 ],[
204         AC_MSG_RESULT([yes])
205         AC_DEFINE(HAVE_MM_INLINE, 1, [mm_inline found])
206 ],[
207         AC_MSG_RESULT([no])
208 ])
209 ])
210
211 #
212 # LC_STRUCT_INODE
213 #
214 # if inode->i_alloc_sem exists
215 #
216 AC_DEFUN([LC_STRUCT_INODE],
217 [AC_MSG_CHECKING([if struct inode has i_alloc_sem])
218 LB_LINUX_TRY_COMPILE([
219         #include <linux/fs.h>
220         #include <linux/version.h>
221 ],[
222         #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,24))
223         #error "down_read_trylock broken before 2.4.24"
224         #endif
225         struct inode i;
226         return (char *)&i.i_alloc_sem - (char *)&i;
227 ],[
228         AC_MSG_RESULT([yes])
229         AC_DEFINE(HAVE_I_ALLOC_SEM, 1, [struct inode has i_alloc_sem])
230 ],[
231         AC_MSG_RESULT([no])
232 ])
233 ])
234
235 #
236 # LC_FUNC_REGISTER_CACHE
237 #
238 # if register_cache() is defined by kernel
239 #
240 AC_DEFUN([LC_FUNC_REGISTER_CACHE],
241 [AC_MSG_CHECKING([if kernel defines register_cache()])
242 LB_LINUX_TRY_COMPILE([
243         #include <linux/list.h>
244         #include <linux/cache_def.h>
245 ],[
246         struct cache_definition cache;
247 ],[
248         AC_MSG_RESULT([yes])
249         AC_DEFINE(HAVE_REGISTER_CACHE, 1, [register_cache found])
250         AC_MSG_CHECKING([if kernel expects return from cache shrink function])
251         HAVE_CACHE_RETURN_INT="`grep -c 'int.*shrink' $LINUX/include/linux/cache_def.h`"
252         if test "$HAVE_CACHE_RETURN_INT" != 0 ; then
253                 AC_DEFINE(HAVE_CACHE_RETURN_INT, 1, [kernel expects return from shrink_cache])
254                 AC_MSG_RESULT(yes)
255         else
256                 AC_MSG_RESULT(no)
257         fi
258 ],[
259         AC_MSG_RESULT([no])
260 ])
261 ])
262
263 #
264 # LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
265 #
266 # check for our patched grab_cache_page_nowait_gfp() function
267 #
268 AC_DEFUN([LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP],
269 [AC_MSG_CHECKING([if kernel defines grab_cache_page_nowait_gfp()])
270 HAVE_GCPN_GFP="`grep -c 'grab_cache_page_nowait_gfp' $LINUX/include/linux/pagemap.h`"
271 if test "$HAVE_GCPN_GFP" != 0 ; then
272         AC_DEFINE(HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP, 1,
273                 [kernel has grab_cache_page_nowait_gfp()])
274         AC_MSG_RESULT(yes)
275 else
276         AC_MSG_RESULT(no)
277 fi
278 ])
279
280 #
281 # LC_FUNC_DEV_SET_RDONLY
282 #
283 # check for the old-style dev_set_rdonly which took an extra "devno" param
284 # and can only set a single device to discard writes at one time
285 #
286 AC_DEFUN([LC_FUNC_DEV_SET_RDONLY],
287 [AC_MSG_CHECKING([if kernel has old single-device dev_set_rdonly])
288 HAVE_OLD_DSR="`grep -c -s 'dev_set_rdonly.*no_write' $LINUX/drivers/block/ll_rw_blk.c`"
289 if test x$HAVE_OLD_DSR != "x1" ; then
290         HAVE_OLD_DSR="`grep -c -s 'dev_set_rdonly.*no_write' $LINUX/drivers/block/blkpg.c`"
291 fi
292 if test x$HAVE_OLD_DSR = "x1" ; then
293         AC_DEFINE(HAVE_OLD_DEV_SET_RDONLY, 1,
294                 [kernel has old single-device dev_set_rdonly])
295         AC_MSG_RESULT(yes)
296 else
297         AC_MSG_RESULT(no)
298 fi
299 ])
300
301 #
302 # LC_CONFIG_BACKINGFS
303 #
304 # whether to use ldiskfs instead of ext3
305 #
306 AC_DEFUN([LC_CONFIG_BACKINGFS],
307 [
308 BACKINGFS='ext3'
309
310 # 2.6 gets ldiskfs
311 AC_MSG_CHECKING([whether to enable ldiskfs])
312 AC_ARG_ENABLE([ldiskfs],
313         AC_HELP_STRING([--enable-ldiskfs],
314                         [use ldiskfs for the Lustre backing FS]),
315         [],[enable_ldiskfs="$linux25"])
316 AC_MSG_RESULT([$enable_ldiskfs])
317
318 if test x$enable_ldiskfs = xyes ; then
319         BACKINGFS="ldiskfs"
320
321         AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
322         AC_ARG_ENABLE([quilt],
323                         AC_HELP_STRING([--disable-quilt],[disable use of quilt for ldiskfs]),
324                         [],[enable_quilt='yes'])
325         AC_MSG_RESULT([$enable_quilt])
326
327         AC_PATH_PROG(PATCH, patch, [no])
328
329         if test x$enable_quilt = xno ; then
330             QUILT="no"
331         else
332             AC_PATH_PROG(QUILT, quilt, [no])
333         fi
334
335         if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then
336                 AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module (for Linux 2.6)])
337         fi
338
339         AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
340         AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
341         AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls])
342         AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security])
343 fi
344
345 AC_MSG_CHECKING([which backing filesystem to use])
346 AC_MSG_RESULT([$BACKINGFS])
347 AC_SUBST(BACKINGFS)
348
349 case $BACKINGFS in
350         ext3)
351                 # --- Check that ext3 and ext3 xattr are enabled in the kernel
352                 LC_CONFIG_EXT3([],[
353                         AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel])
354                 ],[
355                         AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel])
356                         AC_MSG_WARN([This build may fail.])
357                 ])
358                 ;;
359         ldiskfs)
360                 AC_MSG_CHECKING([which ldiskfs series to use])
361                 case $LINUXRELEASE in
362                 2.6.5*) LDISKFS_SERIES="2.6-suse.series" ;;
363                 2.6.9*) LDISKFS_SERIES="2.6-rhel4.series" ;;
364                 2.6.10-ac*) LDISKFS_SERIES="2.6-fc3.series" ;;
365                 2.6.10*) LDISKFS_SERIES="2.6-rhel4.series" ;;
366                 2.6.12*) LDISKFS_SERIES="2.6.12-vanilla.series" ;;
367                 2.6.15*) LDISKFS_SERIES="2.6-fc5.series";;
368                 2.6.16*) LDISKFS_SERIES="2.6-sles10.series";;
369                 2.6.18*) LDISKFS_SERIES="2.6.18-vanilla.series";;
370                 *) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix lustre/autoconf/lustre-core.m4])
371                 esac
372                 AC_MSG_RESULT([$LDISKFS_SERIES])
373                 AC_SUBST(LDISKFS_SERIES)
374                 ;;
375 esac # $BACKINGFS
376 ])
377
378 #
379 # LC_CONFIG_PINGER
380 #
381 # the pinger is temporary, until we have the recovery node in place
382 #
383 AC_DEFUN([LC_CONFIG_PINGER],
384 [AC_MSG_CHECKING([whether to enable pinger support])
385 AC_ARG_ENABLE([pinger],
386         AC_HELP_STRING([--disable-pinger],
387                         [disable recovery pinger support]),
388         [],[enable_pinger='yes'])
389 AC_MSG_RESULT([$enable_pinger])
390 if test x$enable_pinger != xno ; then
391   AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
392 fi
393 ])
394
395 #
396 # LC_CONFIG_LIBLUSTRE_RECOVERY
397 #
398 AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY],
399 [AC_MSG_CHECKING([whether to enable liblustre recovery support])
400 AC_ARG_ENABLE([liblustre-recovery],
401         AC_HELP_STRING([--disable-liblustre-recovery],
402                         [disable liblustre recovery support]),
403         [],[enable_liblustre_recovery='yes'])
404 AC_MSG_RESULT([$enable_liblustre_recovery])
405 if test x$enable_liblustre_recovery != xno ; then
406   AC_DEFINE(ENABLE_LIBLUSTRE_RECOVERY, 1, Liblustre Can Recover)
407 fi
408 ])
409
410 #
411 # LC_CONFIG_OBD_BUFFER_SIZE
412 #
413 # the maximum buffer size of lctl ioctls
414 #
415 AC_DEFUN([LC_CONFIG_OBD_BUFFER_SIZE],
416 [AC_MSG_CHECKING([maximum OBD ioctl size])
417 AC_ARG_WITH([obd-buffer-size],
418         AC_HELP_STRING([--with-obd-buffer-size=[size]],
419                         [set lctl ioctl maximum bytes (default=8192)]),
420         [
421                 OBD_BUFFER_SIZE=$with_obd_buffer_size
422         ],[
423                 OBD_BUFFER_SIZE=8192
424         ])
425 AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
426 AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
427 ])
428
429 #
430 # LC_STRUCT_STATFS
431 #
432 # AIX does not have statfs.f_namelen
433 #
434 AC_DEFUN([LC_STRUCT_STATFS],
435 [AC_MSG_CHECKING([if struct statfs has a f_namelen field])
436 LB_LINUX_TRY_COMPILE([
437         #include <linux/vfs.h>
438 ],[
439         struct statfs sfs;
440         sfs.f_namelen = 1;
441 ],[
442         AC_MSG_RESULT([yes])
443         AC_DEFINE(HAVE_STATFS_NAMELEN, 1, [struct statfs has a namelen field])
444 ],[
445         AC_MSG_RESULT([no])
446 ])
447 ])
448
449 AC_DEFUN([LC_FUNC_PAGE_MAPPED],
450 [AC_MSG_CHECKING([if kernel offers page_mapped])
451 LB_LINUX_TRY_COMPILE([
452         #include <linux/mm.h>
453 ],[
454         page_mapped(NULL);
455 ],[
456         AC_MSG_RESULT([yes])
457         AC_DEFINE(HAVE_PAGE_MAPPED, 1, [page_mapped found])
458 ],[
459         AC_MSG_RESULT([no])
460 ])
461 ])
462
463 AC_DEFUN([LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL],
464 [AC_MSG_CHECKING([if struct file_operations has an unlocked_ioctl field])
465 LB_LINUX_TRY_COMPILE([
466         #include <linux/fs.h>
467 ],[
468         struct file_operations fops;
469         &fops.unlocked_ioctl;
470 ],[
471         AC_MSG_RESULT([yes])
472         AC_DEFINE(HAVE_UNLOCKED_IOCTL, 1, [struct file_operations has an unlock ed_ioctl field])
473 ],[
474         AC_MSG_RESULT([no])
475 ])
476 ])
477
478 AC_DEFUN([LC_FILEMAP_POPULATE],
479 [AC_MSG_CHECKING([for exported filemap_populate])
480 LB_LINUX_TRY_COMPILE([
481         #include <asm/page.h>
482         #include <linux/mm.h>
483 ],[
484        filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0);
485 ],[
486         AC_MSG_RESULT([yes])
487         AC_DEFINE(HAVE_FILEMAP_POPULATE, 1, [Kernel exports filemap_populate])
488 ],[
489         AC_MSG_RESULT([no])
490 ])
491 ])
492
493 AC_DEFUN([LC_D_ADD_UNIQUE],
494 [AC_MSG_CHECKING([for d_add_unique])
495 LB_LINUX_TRY_COMPILE([
496         #include <linux/dcache.h>
497 ],[
498        d_add_unique(NULL, NULL);
499 ],[
500         AC_MSG_RESULT([yes])
501         AC_DEFINE(HAVE_D_ADD_UNIQUE, 1, [Kernel has d_add_unique])
502 ],[
503         AC_MSG_RESULT([no])
504 ])
505 ])
506
507 AC_DEFUN([LC_BIT_SPINLOCK_H],
508 [LB_CHECK_FILE([$LINUX/include/linux/bit_spinlock.h],[
509         AC_MSG_CHECKING([if bit_spinlock.h can be compiled])
510         LB_LINUX_TRY_COMPILE([
511                 #include <asm/processor.h>
512                 #include <linux/spinlock.h>
513                 #include <linux/bit_spinlock.h>
514         ],[],[
515                 AC_MSG_RESULT([yes])
516                 AC_DEFINE(HAVE_BIT_SPINLOCK_H, 1, [Kernel has bit_spinlock.h])
517         ],[
518                 AC_MSG_RESULT([no])
519         ])
520 ],
521 [])
522 ])
523
524 #
525 # LC_POSIX_ACL_XATTR
526 #
527 # If we have xattr_acl.h 
528 #
529 AC_DEFUN([LC_XATTR_ACL],
530 [LB_CHECK_FILE([$LINUX/include/linux/xattr_acl.h],[
531         AC_MSG_CHECKING([if xattr_acl.h can be compiled])
532         LB_LINUX_TRY_COMPILE([
533                 #include <linux/xattr_acl.h>
534         ],[],[
535                 AC_MSG_RESULT([yes])
536                 AC_DEFINE(HAVE_XATTR_ACL, 1, [Kernel has xattr_acl])
537         ],[
538                 AC_MSG_RESULT([no])
539         ])
540 ],
541 [])
542 ])
543
544 AC_DEFUN([LC_STRUCT_INTENT_FILE],
545 [AC_MSG_CHECKING([if struct open_intent has a file field])
546 LB_LINUX_TRY_COMPILE([
547         #include <linux/fs.h>
548         #include <linux/namei.h>
549 ],[
550         struct open_intent intent;
551         &intent.file;
552 ],[
553         AC_MSG_RESULT([yes])
554         AC_DEFINE(HAVE_FILE_IN_STRUCT_INTENT, 1, [struct open_intent has a file field])
555 ],[
556         AC_MSG_RESULT([no])
557 ])
558 ])
559
560
561 AC_DEFUN([LC_POSIX_ACL_XATTR_H],
562 [LB_CHECK_FILE([$LINUX/include/linux/posix_acl_xattr.h],[
563         AC_MSG_CHECKING([if linux/posix_acl_xattr.h can be compiled])
564         LB_LINUX_TRY_COMPILE([
565                 #include <linux/posix_acl_xattr.h>
566         ],[],[
567                 AC_MSG_RESULT([yes])
568                 AC_DEFINE(HAVE_LINUX_POSIX_ACL_XATTR_H, 1, [linux/posix_acl_xattr.h found])
569
570         ],[
571                 AC_MSG_RESULT([no])
572         ])
573 $1
574 ],[
575 AC_MSG_RESULT([no])
576 ])
577 ])
578
579 AC_DEFUN([LC_LUSTRE_VERSION_H],
580 [LB_CHECK_FILE([$LINUX/include/linux/lustre_version.h],[
581         rm -f "$LUSTRE/include/linux/lustre_version.h"
582 ],[
583         touch "$LUSTRE/include/linux/lustre_version.h"
584         if test x$enable_server = xyes ; then
585                 AC_MSG_WARN([Unpatched kernel detected.])
586                 AC_MSG_WARN([Lustre servers cannot be built with an unpatched kernel;])
587                 AC_MSG_WARN([disabling server build])
588                 enable_server='no'
589         fi
590 ])
591 ])
592
593 AC_DEFUN([LC_FUNC_SET_FS_PWD],
594 [AC_MSG_CHECKING([if kernel exports show_task])
595 have_show_task=0
596         if grep -q "EXPORT_SYMBOL(show_task)" \
597                  "$LINUX/fs/namespace.c" 2>/dev/null ; then
598                 AC_DEFINE(HAVE_SET_FS_PWD, 1, [set_fs_pwd is exported])
599                 AC_MSG_RESULT([yes])
600         else
601                 AC_MSG_RESULT([no])
602         fi
603 ])
604
605
606 #
607 # LC_FUNC_MS_FLOCK_LOCK
608 #
609 # SLES9 kernel has MS_FLOCK_LOCK sb flag
610 #
611 AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK],
612 [AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag])
613 LB_LINUX_TRY_COMPILE([
614         #include <linux/fs.h>
615 ],[
616         int flags = MS_FLOCK_LOCK;
617 ],[
618         AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1,
619                 [kernel has MS_FLOCK_LOCK flag])
620         AC_MSG_RESULT([yes])
621 ],[
622         AC_MSG_RESULT([no])
623 ])
624 ])
625
626 #
627 # LC_FUNC_HAVE_CAN_SLEEP_ARG
628 #
629 # SLES9 kernel has third arg can_sleep
630 # in fs/locks.c: flock_lock_file_wait()
631 #
632 AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG],
633 [AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
634 LB_LINUX_TRY_COMPILE([
635         #include <linux/fs.h>
636 ],[
637         int cansleep;
638         struct file *file;
639         struct file_lock *file_lock;
640         flock_lock_file_wait(file, file_lock, cansleep);
641 ],[
642         AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1,
643                 [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
644         AC_MSG_RESULT([yes])
645 ],[
646         AC_MSG_RESULT([no])
647 ])
648 ])
649
650 #
651 # LC_FUNC_F_OP_FLOCK
652 #
653 # rhel4.2 kernel has f_op->flock field
654 #
655 AC_DEFUN([LC_FUNC_F_OP_FLOCK],
656 [AC_MSG_CHECKING([if struct file_operations has flock field])
657 LB_LINUX_TRY_COMPILE([
658         #include <linux/fs.h>
659 ],[
660         struct file_operations ll_file_operations_flock;
661         ll_file_operations_flock.flock = NULL;
662 ],[
663         AC_DEFINE(HAVE_F_OP_FLOCK, 1,
664                 [struct file_operations has flock field])
665         AC_MSG_RESULT([yes])
666 ],[
667         AC_MSG_RESULT([no])
668 ])
669 ])
670
671 #
672 # LC_FUNC_MS_FLOCK_LOCK
673 #
674 # SLES9 kernel has MS_FLOCK_LOCK sb flag
675 #
676 AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK],
677 [AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag])
678 LB_LINUX_TRY_COMPILE([
679         #include <linux/fs.h>
680 ],[
681         int flags = MS_FLOCK_LOCK;
682 ],[
683         AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1,
684                 [kernel has MS_FLOCK_LOCK flag])
685         AC_MSG_RESULT([yes])
686 ],[
687         AC_MSG_RESULT([no])
688 ])
689 ])
690
691 #
692 # LC_FUNC_HAVE_CAN_SLEEP_ARG
693 #
694 # SLES9 kernel has third arg can_sleep
695 # in fs/locks.c: flock_lock_file_wait()
696 #
697 AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG],
698 [AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
699 LB_LINUX_TRY_COMPILE([
700         #include <linux/fs.h>
701 ],[
702         int cansleep;
703         struct file *file;
704         struct file_lock *file_lock;
705         flock_lock_file_wait(file, file_lock, cansleep);
706 ],[
707         AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1,
708                 [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
709         AC_MSG_RESULT([yes])
710 ],[
711         AC_MSG_RESULT([no])
712 ])
713 ])
714
715 #
716 # LC_TASK_PPTR
717 #
718 # task struct has p_pptr instead of parent
719 #
720 AC_DEFUN([LC_TASK_PPTR],
721 [AC_MSG_CHECKING([task p_pptr found])
722 LB_LINUX_TRY_COMPILE([
723         #include <linux/sched.h>
724 ],[
725         struct task_struct *p;
726         
727         p = p->p_pptr;
728 ],[
729         AC_MSG_RESULT([yes])
730         AC_DEFINE(HAVE_TASK_PPTR, 1, [task p_pptr found])
731 ],[
732         AC_MSG_RESULT([no])
733 ])
734 ])
735
736 #
737 # LC_FUNC_F_OP_FLOCK
738 #
739 # rhel4.2 kernel has f_op->flock field
740 #
741 AC_DEFUN([LC_FUNC_F_OP_FLOCK],
742 [AC_MSG_CHECKING([if struct file_operations has flock field])
743 LB_LINUX_TRY_COMPILE([
744         #include <linux/fs.h>
745 ],[
746         struct file_operations ll_file_operations_flock;
747         ll_file_operations_flock.flock = NULL;
748 ],[
749         AC_DEFINE(HAVE_F_OP_FLOCK, 1,
750                 [struct file_operations has flock field])
751         AC_MSG_RESULT([yes])
752 ],[
753         AC_MSG_RESULT([no])
754 ])
755 ])
756
757 # LC_INODE_I_MUTEX
758 # after 2.6.15 inode have i_mutex intead of i_sem
759 AC_DEFUN([LC_INODE_I_MUTEX],
760 [AC_MSG_CHECKING([use inode have i_mutex ])
761 LB_LINUX_TRY_COMPILE([
762         #include <linux/mutex.h>
763         #include <linux/fs.h>
764 ],[
765         struct inode i;
766
767         mutex_unlock(&i.i_mutex);
768 ],[
769         AC_MSG_RESULT(yes)
770         AC_DEFINE(HAVE_INODE_I_MUTEX, 1,
771                 [after 2.6.15 inode have i_mutex intead of i_sem])
772 ],[
773         AC_MSG_RESULT(NO)
774 ])
775 ])
776
777
778 # LC_DQUOTOFF_MUTEX
779 # after 2.6.17 dquote use mutex instead if semaphore
780 AC_DEFUN([LC_DQUOTOFF_MUTEX],
781 [AC_MSG_CHECKING([use dqonoff_mutex])
782 LB_LINUX_TRY_COMPILE([
783         #include <linux/mutex.h>
784         #include <linux/fs.h>
785         #include <linux/quota.h>
786 ],[
787         struct quota_info dq;
788
789         mutex_unlock(&dq.dqonoff_mutex);
790 ],[
791         AC_MSG_RESULT(yes)
792         AC_DEFINE(HAVE_DQUOTOFF_MUTEX, 1,
793                 [after 2.6.17 dquote use mutex instead if semaphore])
794 ],[
795         AC_MSG_RESULT(NO)
796 ])
797 ])
798
799 #
800 # LC_STATFS_DENTRY_PARAM
801 # starting from 2.6.18 linux kernel uses dentry instead of
802 # super_block for first vfs_statfs argument
803 #
804 AC_DEFUN([LC_STATFS_DENTRY_PARAM],
805 [AC_MSG_CHECKING([first vfs_statfs parameter is dentry])
806 LB_LINUX_TRY_COMPILE([
807         #include <linux/fs.h>
808 ],[
809         int vfs_statfs(struct dentry *, struct kstatfs *);
810 ],[
811         AC_DEFINE(HAVE_STATFS_DENTRY_PARAM, 1,
812                 [first parameter of vfs_statfs is dentry])
813         AC_MSG_RESULT([yes])
814 ],[
815         AC_MSG_RESULT([no])
816 ])
817 ])
818
819 #
820 # LC_VFS_KERN_MOUNT
821 # starting from 2.6.18 kernel don`t export do_kern_mount
822 # and want to use vfs_kern_mount instead.
823 #
824 AC_DEFUN([LC_VFS_KERN_MOUNT],
825 [AC_MSG_CHECKING([vfs_kern_mount exist in kernel])
826 LB_LINUX_TRY_COMPILE([
827         #include <linux/mount.h>
828 ],[
829         vfs_kern_mount(NULL, 0, NULL, NULL);
830 ],[
831         AC_DEFINE(HAVE_VFS_KERN_MOUNT, 1,
832                 [vfs_kern_mount exist in kernel])
833         AC_MSG_RESULT([yes])
834 ],[
835         AC_MSG_RESULT([no])
836 ])
837 ])
838
839
840 # LC_INVALIDATEPAGE_RETURN_INT
841 # more 2.6 api changes.  return type for the invalidatepage
842 # address_space_operation is 'void' in new kernels but 'int' in old
843 #
844 AC_DEFUN([LC_INVALIDATEPAGE_RETURN_INT],
845 [AC_MSG_CHECKING([invalidatepage has return int])
846 LB_LINUX_TRY_COMPILE([
847         #include <linux/buffer_head.h>
848 ],[
849         int rc = block_invalidatepage(NULL, 0);
850 ],[
851         AC_MSG_RESULT(yes)
852         AC_DEFINE(HAVE_INVALIDATEPAGE_RETURN_INT, 1,
853                 [Define if return type of invalidatepage should be int])
854 ],[
855         AC_MSG_RESULT(NO)
856 ])
857 ])
858
859 # LC_UMOUNTBEGIN_HAS_VFSMOUNT
860 # more 2.6 API changes. 2.6.18 umount_begin has different parameters
861 AC_DEFUN([LC_UMOUNTBEGIN_HAS_VFSMOUNT],
862 [AC_MSG_CHECKING([if umount_begin needs vfsmount parameter instead of super_block])
863 tmp_flags="$EXTRA_KCFLAGS"
864 EXTRA_KCFLAGS="-Werror"
865 LB_LINUX_TRY_COMPILE([
866         #include <linux/fs.h>
867
868         struct vfsmount;
869         static void cfg_umount_begin (struct vfsmount *v, int flags)
870         {
871                 ;
872         }
873
874         static struct super_operations cfg_super_operations = {
875                 .umount_begin   = cfg_umount_begin,
876         };
877 ],[
878         cfg_super_operations.umount_begin(NULL,0);
879 ],[
880         AC_MSG_RESULT(yes)
881         AC_DEFINE(HAVE_UMOUNTBEGIN_VFSMOUNT, 1,
882                 [Define umount_begin need second argument])
883 ],[
884         AC_MSG_RESULT(NO)
885 ])
886 EXTRA_KCFLAGS="$tmp_flags"
887 ])
888
889 # 2.6.19 API changes
890 # inode don`t have i_blksize field
891 AC_DEFUN([LC_INODE_BLKSIZE],
892 [AC_MSG_CHECKING([inode has i_blksize field])
893 LB_LINUX_TRY_COMPILE([
894 #include <linux/fs.h>
895 ],[
896         struct inode i;
897         i.i_blksize = 0; 
898 ],[
899         AC_MSG_RESULT(yes)
900         AC_DEFINE(HAVE_INODE_BLKSIZE, 1,
901                 [struct inode has i_blksize field])
902 ],[
903         AC_MSG_RESULT(NO)
904 ])
905 ])
906
907 # LC_VFS_READDIR_U64_INO
908 # 2.6.19 use u64 for inode number instead of inode_t
909 AC_DEFUN([LC_VFS_READDIR_U64_INO],
910 [AC_MSG_CHECKING([check vfs_readdir need 64bit inode number])
911 tmp_flags="$EXTRA_KCFLAGS"
912 EXTRA_KCFLAGS="-Werror"
913 LB_LINUX_TRY_COMPILE([
914 #include <linux/fs.h>
915         int fillonedir(void * __buf, const char * name, int namlen, loff_t offset,
916                       u64 ino, unsigned int d_type)
917         {
918                 return 0;
919         }
920 ],[
921         filldir_t filter;
922
923         filter = fillonedir;
924         return 1;
925 ],[
926         AC_MSG_RESULT(yes)
927         AC_DEFINE(HAVE_VFS_READDIR_U64_INO, 1,
928                 [if vfs_readdir need 64bit inode number])
929 ],[
930         AC_MSG_RESULT(NO)
931 ])
932 EXTRA_KCFLAGS="$tmp_flags"
933 ])
934
935 # LC_GENERIC_FILE_WRITE
936 # 2.6.19 introduce do_sync_write instead of
937 # generic_file_write
938 AC_DEFUN([LC_GENERIC_FILE_WRITE],
939 [AC_MSG_CHECKING([use generic_file_write])
940 LB_LINUX_TRY_COMPILE([
941         #include <linux/fs.h>
942 ],[
943         int result = generic_file_read(NULL, NULL, 0, 0);
944 ],[
945         AC_MSG_RESULT(yes)
946         AC_DEFINE(HAVE_GENERIC_FILE_WRITE, 1,
947                 [use generic_file_write])
948 ],[
949         AC_MSG_RESULT(NO)
950 ])
951 ])
952
953 # LC_GENERIC_FILE_READ
954 # 2.6.19 need to use do_sync_read instead of
955 # generic_file_read
956 AC_DEFUN([LC_GENERIC_FILE_READ],
957 [AC_MSG_CHECKING([use generic_file_read])
958 LB_LINUX_TRY_COMPILE([
959         #include <linux/fs.h>
960 ],[
961         int result = generic_file_read(NULL, NULL, 0, 0);
962 ],[
963         AC_MSG_RESULT(yes)
964         AC_DEFINE(HAVE_GENERIC_FILE_READ, 1,
965                 [use generic_file_read])
966 ],[
967         AC_MSG_RESULT(NO)
968 ])
969 ])
970
971 # LC_NR_PAGECACHE
972 # 2.6.18 don`t export nr_pagecahe
973 AC_DEFUN([LC_NR_PAGECACHE],
974 [AC_MSG_CHECKING([kernel export nr_pagecache])
975 LB_LINUX_TRY_COMPILE([
976         #include <linux/pagemap.h>
977 ],[
978         return atomic_read(&nr_pagecache);
979 ],[
980         AC_MSG_RESULT(yes)
981         AC_DEFINE(HAVE_NR_PAGECACHE, 1,
982                 [is kernel export nr_pagecache])
983 ],[
984         AC_MSG_RESULT(NO)
985 ])
986 ])
987
988
989 #
990 # LC_PROG_LINUX
991 #
992 # Lustre linux kernel checks
993 #
994 AC_DEFUN([LC_PROG_LINUX],
995 [ LC_LUSTRE_VERSION_H
996 if test x$enable_server = xyes ; then
997         LC_CONFIG_BACKINGFS
998 fi
999 LC_CONFIG_PINGER
1000 LC_CONFIG_LIBLUSTRE_RECOVERY
1001 LC_CONFIG_QUOTA
1002
1003 LC_TASK_PPTR
1004
1005 LC_STRUCT_KIOBUF
1006 LC_FUNC_COND_RESCHED
1007 LC_FUNC_ZAP_PAGE_RANGE
1008 LC_FUNC_PDE
1009 LC_FUNC_DIRECT_IO
1010 LC_HEADER_MM_INLINE
1011 LC_STRUCT_INODE
1012 LC_FUNC_REGISTER_CACHE
1013 LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
1014 LC_FUNC_DEV_SET_RDONLY
1015 LC_FUNC_FILEMAP_FDATAWRITE
1016 LC_STRUCT_STATFS
1017 LC_FUNC_PAGE_MAPPED
1018 LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL
1019 LC_FILEMAP_POPULATE
1020 LC_D_ADD_UNIQUE
1021 LC_BIT_SPINLOCK_H
1022 LC_XATTR_ACL
1023 LC_STRUCT_INTENT_FILE
1024 LC_POSIX_ACL_XATTR_H
1025 LC_FUNC_SET_FS_PWD
1026 LC_FUNC_MS_FLOCK_LOCK
1027 LC_FUNC_HAVE_CAN_SLEEP_ARG
1028 LC_FUNC_F_OP_FLOCK
1029 LC_QUOTA_READ
1030 LC_COOKIE_FOLLOW_LINK
1031
1032 # 2.6.15
1033 LC_INODE_I_MUTEX
1034
1035 # 2.6.17
1036 LC_DQUOTOFF_MUTEX
1037
1038 # 2.6.18
1039 LC_NR_PAGECACHE
1040 LC_STATFS_DENTRY_PARAM
1041 LC_VFS_KERN_MOUNT
1042 LC_INVALIDATEPAGE_RETURN_INT
1043 LC_UMOUNTBEGIN_HAS_VFSMOUNT
1044
1045 # 2.6.19
1046 LC_INODE_BLKSIZE
1047 LC_VFS_READDIR_U64_INO
1048 LC_GENERIC_FILE_READ
1049 LC_GENERIC_FILE_WRITE
1050 ])
1051
1052 #
1053 # LC_CONFIG_CLIENT_SERVER
1054 #
1055 # Build client/server sides of Lustre
1056 #
1057 AC_DEFUN([LC_CONFIG_CLIENT_SERVER],
1058 [AC_MSG_CHECKING([whether to build Lustre server support])
1059 AC_ARG_ENABLE([server],
1060         AC_HELP_STRING([--disable-server],
1061                         [disable Lustre server support]),
1062         [],[enable_server='yes'])
1063 AC_MSG_RESULT([$enable_server])
1064
1065 AC_MSG_CHECKING([whether to build Lustre client support])
1066 AC_ARG_ENABLE([client],
1067         AC_HELP_STRING([--disable-client],
1068                         [disable Lustre client support]),
1069         [],[enable_client='yes'])
1070 AC_MSG_RESULT([$enable_client])])
1071
1072 #
1073 # LC_CONFIG_LIBLUSTRE
1074 #
1075 # whether to build liblustre
1076 #
1077 AC_DEFUN([LC_CONFIG_LIBLUSTRE],
1078 [AC_MSG_CHECKING([whether to build Lustre library])
1079 AC_ARG_ENABLE([liblustre],
1080         AC_HELP_STRING([--disable-liblustre],
1081                         [disable building of Lustre library]),
1082         [],[enable_liblustre=$with_sysio])
1083 AC_MSG_RESULT([$enable_liblustre])
1084 # only build sysio if liblustre is built
1085 with_sysio="$enable_liblustre"
1086
1087 AC_MSG_CHECKING([whether to build liblustre tests])
1088 AC_ARG_ENABLE([liblustre-tests],
1089         AC_HELP_STRING([--enable-liblustre-tests],
1090                         [enable liblustre tests, if --disable-tests is used]),
1091         [],[enable_liblustre_tests=$enable_tests])
1092 if test x$enable_liblustre != xyes ; then
1093    enable_liblustre_tests='no'
1094 fi
1095 AC_MSG_RESULT([$enable_liblustre_tests])
1096
1097 AC_MSG_CHECKING([whether to build mpitests])
1098 AC_ARG_ENABLE([mpitests],
1099         AC_HELP_STRING([--enable-mpitests],
1100                         [build liblustre mpi tests]),
1101         [],[enable_mpitests=no])
1102 AC_MSG_RESULT([$enable_mpitests])
1103
1104 AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])
1105 ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"
1106
1107 LC_CONFIG_PINGER
1108 LC_CONFIG_LIBLUSTRE_RECOVERY
1109 ])
1110
1111 #
1112 # LC_CONFIG_QUOTA
1113 #
1114 # whether to enable quota support
1115 #
1116 AC_DEFUN([LC_CONFIG_QUOTA],
1117 [AC_MSG_CHECKING([whether to enable quota support])
1118 AC_ARG_ENABLE([quota], 
1119         AC_HELP_STRING([--enable-quota],
1120                         [enable quota support]),
1121         [],[enable_quota='yes'])
1122 AC_MSG_RESULT([$enable_quota])
1123 if test x$linux25 != xyes; then
1124    enable_quota='no'
1125 fi
1126 if test x$enable_quota != xno; then
1127    AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support])
1128 fi
1129 ])
1130   
1131 AC_DEFUN([LC_QUOTA_READ],
1132 [AC_MSG_CHECKING([if kernel supports quota_read])
1133 LB_LINUX_TRY_COMPILE([
1134         #include <linux/fs.h>
1135 ],[
1136         struct super_operations sp;
1137         void *i = (void *)sp.quota_read;
1138 ],[
1139         AC_MSG_RESULT([yes])
1140         AC_DEFINE(KERNEL_SUPPORTS_QUOTA_READ, 1, [quota_read found])
1141 ],[
1142         AC_MSG_RESULT([no])
1143 ])
1144 ])
1145
1146 #
1147 # LC_COOKIE_FOLLOW_LINK
1148 #
1149 # kernel 2.6.13+ ->follow_link returns a cookie
1150 #
1151
1152 AC_DEFUN([LC_COOKIE_FOLLOW_LINK],
1153 [AC_MSG_CHECKING([if inode_operations->follow_link returns a cookie])
1154 LB_LINUX_TRY_COMPILE([
1155         #include <linux/namei.h>
1156         #include <linux/fs.h>
1157
1158 ],[
1159         struct dentry dentry;
1160         struct nameidata nd;
1161
1162         dentry.d_inode->i_op->put_link(&dentry, &nd, NULL);
1163 ],[
1164         AC_DEFINE(HAVE_COOKIE_FOLLOW_LINK, 1, [inode_operations->follow_link returns a cookie])
1165         AC_MSG_RESULT([yes])
1166 ],[
1167         AC_MSG_RESULT([no])
1168 ])
1169 ])
1170
1171 #
1172 # LC_CONFIGURE
1173 #
1174 # other configure checks
1175 #
1176 AC_DEFUN([LC_CONFIGURE],
1177 [LC_CONFIG_OBD_BUFFER_SIZE
1178
1179 # include/liblustre.h
1180 AC_CHECK_HEADERS([asm/page.h sys/user.h sys/vfs.h stdint.h blkid/blkid.h])
1181
1182 # include/lustre/lustre_user.h
1183 # See note there re: __ASM_X86_64_PROCESSOR_H
1184 AC_CHECK_HEADERS([linux/quota.h])
1185
1186 # liblustre/llite_lib.h
1187 AC_CHECK_HEADERS([xtio.h file.h])
1188
1189 # liblustre/dir.c
1190 AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
1191
1192 # liblustre/lutil.c
1193 AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
1194 AC_CHECK_FUNCS([inet_ntoa])
1195
1196 # utils/llverfs.c
1197 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
1198
1199 # Super safe df
1200 AC_ARG_ENABLE([mindf],
1201       AC_HELP_STRING([--enable-mindf],
1202                       [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
1203       [],[])
1204 if test "$enable_mindf" = "yes" ;  then
1205       AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])
1206 fi
1207
1208 ])
1209
1210 #
1211 # LC_CONDITIONALS
1212 #
1213 # AM_CONDITIONALS for lustre
1214 #
1215 AC_DEFUN([LC_CONDITIONALS],
1216 [AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
1217 AM_CONDITIONAL(LDISKFS, test x$enable_ldiskfs = xyes)
1218 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
1219 AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes)
1220 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
1221 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
1222 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
1223 AM_CONDITIONAL(QUOTA, test x$enable_quota = xyes)
1224 AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes)
1225 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
1226 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
1227 ])
1228
1229 #
1230 # LC_CONFIG_FILES
1231 #
1232 # files that should be generated with AC_OUTPUT
1233 #
1234 AC_DEFUN([LC_CONFIG_FILES],
1235 [AC_CONFIG_FILES([
1236 lustre/Makefile
1237 lustre/autoMakefile
1238 lustre/autoconf/Makefile
1239 lustre/contrib/Makefile
1240 lustre/doc/Makefile
1241 lustre/include/Makefile
1242 lustre/include/lustre_ver.h
1243 lustre/include/linux/Makefile
1244 lustre/include/lustre/Makefile
1245 lustre/kernel_patches/targets/2.6-suse.target
1246 lustre/kernel_patches/targets/2.6-vanilla.target
1247 lustre/kernel_patches/targets/2.6-rhel4.target
1248 lustre/kernel_patches/targets/2.6-fc5.target
1249 lustre/kernel_patches/targets/2.6-patchless.target
1250 lustre/kernel_patches/targets/hp_pnnl-2.4.target
1251 lustre/kernel_patches/targets/rh-2.4.target
1252 lustre/kernel_patches/targets/rhel-2.4.target
1253 lustre/kernel_patches/targets/suse-2.4.21-2.target
1254 lustre/kernel_patches/targets/sles-2.4.target
1255 lustre/ldiskfs/Makefile
1256 lustre/ldiskfs/autoMakefile
1257 lustre/ldlm/Makefile
1258 lustre/liblustre/Makefile
1259 lustre/liblustre/tests/Makefile
1260 lustre/llite/Makefile
1261 lustre/llite/autoMakefile
1262 lustre/lov/Makefile
1263 lustre/lov/autoMakefile
1264 lustre/lvfs/Makefile
1265 lustre/lvfs/autoMakefile
1266 lustre/mdc/Makefile
1267 lustre/mdc/autoMakefile
1268 lustre/mds/Makefile
1269 lustre/mds/autoMakefile
1270 lustre/obdclass/Makefile
1271 lustre/obdclass/autoMakefile
1272 lustre/obdclass/linux/Makefile
1273 lustre/obdecho/Makefile
1274 lustre/obdecho/autoMakefile
1275 lustre/obdfilter/Makefile
1276 lustre/obdfilter/autoMakefile
1277 lustre/osc/Makefile
1278 lustre/osc/autoMakefile
1279 lustre/ost/Makefile
1280 lustre/ost/autoMakefile
1281 lustre/mgc/Makefile
1282 lustre/mgc/autoMakefile
1283 lustre/mgs/Makefile
1284 lustre/mgs/autoMakefile
1285 lustre/ptlrpc/Makefile
1286 lustre/ptlrpc/autoMakefile
1287 lustre/quota/Makefile
1288 lustre/quota/autoMakefile
1289 lustre/scripts/Makefile
1290 lustre/scripts/version_tag.pl
1291 lustre/tests/Makefile
1292 lustre/utils/Makefile
1293 ])
1294 case $lb_target_os in
1295         darwin)
1296                 AC_CONFIG_FILES([ lustre/obdclass/darwin/Makefile ])
1297                 ;;
1298 esac
1299
1300 ])