Whamcloud - gitweb
Branch 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 new dev_set_rdonly])
288 LB_LINUX_TRY_COMPILE([
289         #include <linux/fs.h>
290 ],[
291         #ifndef HAVE_CLEAR_RDONLY_ON_PUT
292         #error needs to be patched by lustre kernel patches from Lustre version 1.4.3 or above.
293         #endif
294 ],[
295         AC_MSG_RESULT([yes])
296         AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel has new dev_set_rdonly])
297 ],[
298         AC_MSG_RESULT([no, Linux kernel source needs to be patches by lustre 
299 kernel patches from Lustre version 1.4.3 or above.])
300 ])
301 ])
302
303 #
304 # LC_CONFIG_BACKINGFS
305 #
306 # whether to use ldiskfs instead of ext3
307 #
308 AC_DEFUN([LC_CONFIG_BACKINGFS],
309 [
310 BACKINGFS='ext3'
311
312 # 2.6 gets ldiskfs
313 AC_MSG_CHECKING([whether to enable ldiskfs])
314 AC_ARG_ENABLE([ldiskfs],
315         AC_HELP_STRING([--enable-ldiskfs],
316                         [use ldiskfs for the Lustre backing FS]),
317         [],[enable_ldiskfs="$linux25"])
318 AC_MSG_RESULT([$enable_ldiskfs])
319
320 if test x$enable_ldiskfs = xyes ; then
321         BACKINGFS="ldiskfs"
322
323         AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
324         AC_ARG_ENABLE([quilt],
325                         AC_HELP_STRING([--disable-quilt],[disable use of quilt for ldiskfs]),
326                         [],[enable_quilt='yes'])
327         AC_MSG_RESULT([$enable_quilt])
328
329         AC_PATH_PROG(PATCH, patch, [no])
330
331         if test x$enable_quilt = xno ; then
332             QUILT="no"
333         else
334             AC_PATH_PROG(QUILT, quilt, [no])
335         fi
336
337         if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then
338                 AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module (for Linux 2.6)])
339         fi
340
341         AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
342         AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
343         AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [enable posix acls])
344         AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security])
345 fi
346
347 AC_MSG_CHECKING([which backing filesystem to use])
348 AC_MSG_RESULT([$BACKINGFS])
349 AC_SUBST(BACKINGFS)
350
351 case $BACKINGFS in
352         ext3)
353                 # --- Check that ext3 and ext3 xattr are enabled in the kernel
354                 LC_CONFIG_EXT3([],[
355                         AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel])
356                 ],[
357                         AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel])
358                         AC_MSG_WARN([This build may fail.])
359                 ])
360                 ;;
361         ldiskfs)
362                 AC_MSG_CHECKING([which ldiskfs series to use])
363                 case $LINUXRELEASE in
364                 2.6.5*) LDISKFS_SERIES="2.6-suse.series" ;;
365                 2.6.9*) LDISKFS_SERIES="2.6-rhel4.series" ;;
366                 2.6.10-ac*) LDISKFS_SERIES="2.6-fc3.series" ;;
367                 2.6.10*) LDISKFS_SERIES="2.6-rhel4.series" ;;
368                 2.6.12*) LDISKFS_SERIES="2.6.12-vanilla.series" ;;
369                 2.6.15*) LDISKFS_SERIES="2.6-fc5.series";;
370                 2.6.16*) LDISKFS_SERIES="2.6-sles10.series";;
371                 2.6.18*) LDISKFS_SERIES="2.6.18-vanilla.series";;
372                 *) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix lustre/autoconf/lustre-core.m4])
373                 esac
374                 AC_MSG_RESULT([$LDISKFS_SERIES])
375                 AC_SUBST(LDISKFS_SERIES)
376                 ;;
377 esac # $BACKINGFS
378 ])
379
380 #
381 # LC_CONFIG_PINGER
382 #
383 # the pinger is temporary, until we have the recovery node in place
384 #
385 AC_DEFUN([LC_CONFIG_PINGER],
386 [AC_MSG_CHECKING([whether to enable pinger support])
387 AC_ARG_ENABLE([pinger],
388         AC_HELP_STRING([--disable-pinger],
389                         [disable recovery pinger support]),
390         [],[enable_pinger='yes'])
391 AC_MSG_RESULT([$enable_pinger])
392 if test x$enable_pinger != xno ; then
393   AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
394 fi
395 ])
396
397 #
398 # LC_CONFIG_LIBLUSTRE_RECOVERY
399 #
400 AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY],
401 [AC_MSG_CHECKING([whether to enable liblustre recovery support])
402 AC_ARG_ENABLE([liblustre-recovery],
403         AC_HELP_STRING([--disable-liblustre-recovery],
404                         [disable liblustre recovery support]),
405         [],[enable_liblustre_recovery='yes'])
406 AC_MSG_RESULT([$enable_liblustre_recovery])
407 if test x$enable_liblustre_recovery != xno ; then
408   AC_DEFINE(ENABLE_LIBLUSTRE_RECOVERY, 1, Liblustre Can Recover)
409 fi
410 ])
411
412 #
413 # LC_CONFIG_OBD_BUFFER_SIZE
414 #
415 # the maximum buffer size of lctl ioctls
416 #
417 AC_DEFUN([LC_CONFIG_OBD_BUFFER_SIZE],
418 [AC_MSG_CHECKING([maximum OBD ioctl size])
419 AC_ARG_WITH([obd-buffer-size],
420         AC_HELP_STRING([--with-obd-buffer-size=[size]],
421                         [set lctl ioctl maximum bytes (default=8192)]),
422         [
423                 OBD_BUFFER_SIZE=$with_obd_buffer_size
424         ],[
425                 OBD_BUFFER_SIZE=8192
426         ])
427 AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
428 AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
429 ])
430
431 #
432 # LC_STRUCT_STATFS
433 #
434 # AIX does not have statfs.f_namelen
435 #
436 AC_DEFUN([LC_STRUCT_STATFS],
437 [AC_MSG_CHECKING([if struct statfs has a f_namelen field])
438 LB_LINUX_TRY_COMPILE([
439         #include <linux/vfs.h>
440 ],[
441         struct statfs sfs;
442         sfs.f_namelen = 1;
443 ],[
444         AC_MSG_RESULT([yes])
445         AC_DEFINE(HAVE_STATFS_NAMELEN, 1, [struct statfs has a namelen field])
446 ],[
447         AC_MSG_RESULT([no])
448 ])
449 ])
450
451 #
452 # LC_READLINK_SSIZE_T
453 #
454 AC_DEFUN([LC_READLINK_SSIZE_T],
455 [AC_MSG_CHECKING([if readlink returns ssize_t])
456 AC_TRY_COMPILE([
457         #include <unistd.h>
458 ],[
459         ssize_t readlink(const char *, char *, size_t);
460 ],[
461         AC_MSG_RESULT([yes])
462         AC_DEFINE(HAVE_POSIX_1003_READLINK, 1, [readlink returns ssize_t])
463 ],[
464         AC_MSG_RESULT([no])
465 ])
466 ])
467
468 AC_DEFUN([LC_FUNC_PAGE_MAPPED],
469 [AC_MSG_CHECKING([if kernel offers page_mapped])
470 LB_LINUX_TRY_COMPILE([
471         #include <linux/mm.h>
472 ],[
473         page_mapped(NULL);
474 ],[
475         AC_MSG_RESULT([yes])
476         AC_DEFINE(HAVE_PAGE_MAPPED, 1, [page_mapped found])
477 ],[
478         AC_MSG_RESULT([no])
479 ])
480 ])
481
482 AC_DEFUN([LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL],
483 [AC_MSG_CHECKING([if struct file_operations has an unlocked_ioctl field])
484 LB_LINUX_TRY_COMPILE([
485         #include <linux/fs.h>
486 ],[
487         struct file_operations fops;
488         &fops.unlocked_ioctl;
489 ],[
490         AC_MSG_RESULT([yes])
491         AC_DEFINE(HAVE_UNLOCKED_IOCTL, 1, [struct file_operations has an unlock ed_ioctl field])
492 ],[
493         AC_MSG_RESULT([no])
494 ])
495 ])
496
497 AC_DEFUN([LC_FILEMAP_POPULATE],
498 [AC_MSG_CHECKING([for exported filemap_populate])
499 LB_LINUX_TRY_COMPILE([
500         #include <asm/page.h>
501         #include <linux/mm.h>
502 ],[
503        filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0);
504 ],[
505         AC_MSG_RESULT([yes])
506         AC_DEFINE(HAVE_FILEMAP_POPULATE, 1, [Kernel exports filemap_populate])
507 ],[
508         AC_MSG_RESULT([no])
509 ])
510 ])
511
512 AC_DEFUN([LC_D_ADD_UNIQUE],
513 [AC_MSG_CHECKING([for d_add_unique])
514 LB_LINUX_TRY_COMPILE([
515         #include <linux/dcache.h>
516 ],[
517        d_add_unique(NULL, NULL);
518 ],[
519         AC_MSG_RESULT([yes])
520         AC_DEFINE(HAVE_D_ADD_UNIQUE, 1, [Kernel has d_add_unique])
521 ],[
522         AC_MSG_RESULT([no])
523 ])
524 ])
525
526 AC_DEFUN([LC_BIT_SPINLOCK_H],
527 [LB_CHECK_FILE([$LINUX/include/linux/bit_spinlock.h],[
528         AC_MSG_CHECKING([if bit_spinlock.h can be compiled])
529         LB_LINUX_TRY_COMPILE([
530                 #include <asm/processor.h>
531                 #include <linux/spinlock.h>
532                 #include <linux/bit_spinlock.h>
533         ],[],[
534                 AC_MSG_RESULT([yes])
535                 AC_DEFINE(HAVE_BIT_SPINLOCK_H, 1, [Kernel has bit_spinlock.h])
536         ],[
537                 AC_MSG_RESULT([no])
538         ])
539 ],
540 [])
541 ])
542
543 #
544 # LC_POSIX_ACL_XATTR
545 #
546 # If we have xattr_acl.h 
547 #
548 AC_DEFUN([LC_XATTR_ACL],
549 [LB_CHECK_FILE([$LINUX/include/linux/xattr_acl.h],[
550         AC_MSG_CHECKING([if xattr_acl.h can be compiled])
551         LB_LINUX_TRY_COMPILE([
552                 #include <linux/xattr_acl.h>
553         ],[],[
554                 AC_MSG_RESULT([yes])
555                 AC_DEFINE(HAVE_XATTR_ACL, 1, [Kernel has xattr_acl])
556         ],[
557                 AC_MSG_RESULT([no])
558         ])
559 ],
560 [])
561 ])
562
563 AC_DEFUN([LC_STRUCT_INTENT_FILE],
564 [AC_MSG_CHECKING([if struct open_intent has a file field])
565 LB_LINUX_TRY_COMPILE([
566         #include <linux/fs.h>
567         #include <linux/namei.h>
568 ],[
569         struct open_intent intent;
570         &intent.file;
571 ],[
572         AC_MSG_RESULT([yes])
573         AC_DEFINE(HAVE_FILE_IN_STRUCT_INTENT, 1, [struct open_intent has a file field])
574 ],[
575         AC_MSG_RESULT([no])
576 ])
577 ])
578
579
580 AC_DEFUN([LC_POSIX_ACL_XATTR_H],
581 [LB_CHECK_FILE([$LINUX/include/linux/posix_acl_xattr.h],[
582         AC_MSG_CHECKING([if linux/posix_acl_xattr.h can be compiled])
583         LB_LINUX_TRY_COMPILE([
584                 #include <linux/posix_acl_xattr.h>
585         ],[],[
586                 AC_MSG_RESULT([yes])
587                 AC_DEFINE(HAVE_LINUX_POSIX_ACL_XATTR_H, 1, [linux/posix_acl_xattr.h found])
588
589         ],[
590                 AC_MSG_RESULT([no])
591         ])
592 $1
593 ],[
594 AC_MSG_RESULT([no])
595 ])
596 ])
597
598 AC_DEFUN([LC_LUSTRE_VERSION_H],
599 [LB_CHECK_FILE([$LINUX/include/linux/lustre_version.h],[
600         rm -f "$LUSTRE/include/linux/lustre_version.h"
601 ],[
602         touch "$LUSTRE/include/linux/lustre_version.h"
603         if test x$enable_server = xyes ; then
604                 AC_MSG_WARN([Unpatched kernel detected.])
605                 AC_MSG_WARN([Lustre servers cannot be built with an unpatched kernel;])
606                 AC_MSG_WARN([disabling server build])
607                 enable_server='no'
608         fi
609 ])
610 ])
611
612 AC_DEFUN([LC_FUNC_SET_FS_PWD],
613 [AC_MSG_CHECKING([if kernel exports show_task])
614 have_show_task=0
615         if grep -q "EXPORT_SYMBOL(show_task)" \
616                  "$LINUX/fs/namespace.c" 2>/dev/null ; then
617                 AC_DEFINE(HAVE_SET_FS_PWD, 1, [set_fs_pwd is exported])
618                 AC_MSG_RESULT([yes])
619         else
620                 AC_MSG_RESULT([no])
621         fi
622 ])
623
624
625 #
626 # LC_FUNC_MS_FLOCK_LOCK
627 #
628 # SLES9 kernel has MS_FLOCK_LOCK sb flag
629 #
630 AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK],
631 [AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag])
632 LB_LINUX_TRY_COMPILE([
633         #include <linux/fs.h>
634 ],[
635         int flags = MS_FLOCK_LOCK;
636 ],[
637         AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1,
638                 [kernel has MS_FLOCK_LOCK flag])
639         AC_MSG_RESULT([yes])
640 ],[
641         AC_MSG_RESULT([no])
642 ])
643 ])
644
645 #
646 # LC_FUNC_HAVE_CAN_SLEEP_ARG
647 #
648 # SLES9 kernel has third arg can_sleep
649 # in fs/locks.c: flock_lock_file_wait()
650 #
651 AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG],
652 [AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
653 LB_LINUX_TRY_COMPILE([
654         #include <linux/fs.h>
655 ],[
656         int cansleep;
657         struct file *file;
658         struct file_lock *file_lock;
659         flock_lock_file_wait(file, file_lock, cansleep);
660 ],[
661         AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1,
662                 [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
663         AC_MSG_RESULT([yes])
664 ],[
665         AC_MSG_RESULT([no])
666 ])
667 ])
668
669 #
670 # LC_FUNC_F_OP_FLOCK
671 #
672 # rhel4.2 kernel has f_op->flock field
673 #
674 AC_DEFUN([LC_FUNC_F_OP_FLOCK],
675 [AC_MSG_CHECKING([if struct file_operations has flock field])
676 LB_LINUX_TRY_COMPILE([
677         #include <linux/fs.h>
678 ],[
679         struct file_operations ll_file_operations_flock;
680         ll_file_operations_flock.flock = NULL;
681 ],[
682         AC_DEFINE(HAVE_F_OP_FLOCK, 1,
683                 [struct file_operations has flock field])
684         AC_MSG_RESULT([yes])
685 ],[
686         AC_MSG_RESULT([no])
687 ])
688 ])
689
690 #
691 # LC_FUNC_MS_FLOCK_LOCK
692 #
693 # SLES9 kernel has MS_FLOCK_LOCK sb flag
694 #
695 AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK],
696 [AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag])
697 LB_LINUX_TRY_COMPILE([
698         #include <linux/fs.h>
699 ],[
700         int flags = MS_FLOCK_LOCK;
701 ],[
702         AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1,
703                 [kernel has MS_FLOCK_LOCK flag])
704         AC_MSG_RESULT([yes])
705 ],[
706         AC_MSG_RESULT([no])
707 ])
708 ])
709
710 #
711 # LC_FUNC_HAVE_CAN_SLEEP_ARG
712 #
713 # SLES9 kernel has third arg can_sleep
714 # in fs/locks.c: flock_lock_file_wait()
715 #
716 AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG],
717 [AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
718 LB_LINUX_TRY_COMPILE([
719         #include <linux/fs.h>
720 ],[
721         int cansleep;
722         struct file *file;
723         struct file_lock *file_lock;
724         flock_lock_file_wait(file, file_lock, cansleep);
725 ],[
726         AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1,
727                 [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
728         AC_MSG_RESULT([yes])
729 ],[
730         AC_MSG_RESULT([no])
731 ])
732 ])
733
734 #
735 # LC_TASK_PPTR
736 #
737 # task struct has p_pptr instead of parent
738 #
739 AC_DEFUN([LC_TASK_PPTR],
740 [AC_MSG_CHECKING([task p_pptr found])
741 LB_LINUX_TRY_COMPILE([
742         #include <linux/sched.h>
743 ],[
744         struct task_struct *p;
745         
746         p = p->p_pptr;
747 ],[
748         AC_MSG_RESULT([yes])
749         AC_DEFINE(HAVE_TASK_PPTR, 1, [task p_pptr found])
750 ],[
751         AC_MSG_RESULT([no])
752 ])
753 ])
754
755 #
756 # LC_FUNC_F_OP_FLOCK
757 #
758 # rhel4.2 kernel has f_op->flock field
759 #
760 AC_DEFUN([LC_FUNC_F_OP_FLOCK],
761 [AC_MSG_CHECKING([if struct file_operations has flock field])
762 LB_LINUX_TRY_COMPILE([
763         #include <linux/fs.h>
764 ],[
765         struct file_operations ll_file_operations_flock;
766         ll_file_operations_flock.flock = NULL;
767 ],[
768         AC_DEFINE(HAVE_F_OP_FLOCK, 1,
769                 [struct file_operations has flock field])
770         AC_MSG_RESULT([yes])
771 ],[
772         AC_MSG_RESULT([no])
773 ])
774 ])
775
776 # LC_INODE_I_MUTEX
777 # after 2.6.15 inode have i_mutex intead of i_sem
778 AC_DEFUN([LC_INODE_I_MUTEX],
779 [AC_MSG_CHECKING([use inode have i_mutex ])
780 LB_LINUX_TRY_COMPILE([
781         #include <linux/mutex.h>
782         #include <linux/fs.h>
783 ],[
784         struct inode i;
785
786         mutex_unlock(&i.i_mutex);
787 ],[
788         AC_MSG_RESULT(yes)
789         AC_DEFINE(HAVE_INODE_I_MUTEX, 1,
790                 [after 2.6.15 inode have i_mutex intead of i_sem])
791 ],[
792         AC_MSG_RESULT(NO)
793 ])
794 ])
795
796
797 # LC_DQUOTOFF_MUTEX
798 # after 2.6.17 dquote use mutex instead if semaphore
799 AC_DEFUN([LC_DQUOTOFF_MUTEX],
800 [AC_MSG_CHECKING([use dqonoff_mutex])
801 LB_LINUX_TRY_COMPILE([
802         #include <linux/mutex.h>
803         #include <linux/fs.h>
804         #include <linux/quota.h>
805 ],[
806         struct quota_info dq;
807
808         mutex_unlock(&dq.dqonoff_mutex);
809 ],[
810         AC_MSG_RESULT(yes)
811         AC_DEFINE(HAVE_DQUOTOFF_MUTEX, 1,
812                 [after 2.6.17 dquote use mutex instead if semaphore])
813 ],[
814         AC_MSG_RESULT(NO)
815 ])
816 ])
817
818 #
819 # LC_STATFS_DENTRY_PARAM
820 # starting from 2.6.18 linux kernel uses dentry instead of
821 # super_block for first vfs_statfs argument
822 #
823 AC_DEFUN([LC_STATFS_DENTRY_PARAM],
824 [AC_MSG_CHECKING([first vfs_statfs parameter is dentry])
825 LB_LINUX_TRY_COMPILE([
826         #include <linux/fs.h>
827 ],[
828         int vfs_statfs(struct dentry *, struct kstatfs *);
829 ],[
830         AC_DEFINE(HAVE_STATFS_DENTRY_PARAM, 1,
831                 [first parameter of vfs_statfs is dentry])
832         AC_MSG_RESULT([yes])
833 ],[
834         AC_MSG_RESULT([no])
835 ])
836 ])
837
838 #
839 # LC_VFS_KERN_MOUNT
840 # starting from 2.6.18 kernel don`t export do_kern_mount
841 # and want to use vfs_kern_mount instead.
842 #
843 AC_DEFUN([LC_VFS_KERN_MOUNT],
844 [AC_MSG_CHECKING([vfs_kern_mount exist in kernel])
845 LB_LINUX_TRY_COMPILE([
846         #include <linux/mount.h>
847 ],[
848         vfs_kern_mount(NULL, 0, NULL, NULL);
849 ],[
850         AC_DEFINE(HAVE_VFS_KERN_MOUNT, 1,
851                 [vfs_kern_mount exist in kernel])
852         AC_MSG_RESULT([yes])
853 ],[
854         AC_MSG_RESULT([no])
855 ])
856 ])
857
858
859 # LC_INVALIDATEPAGE_RETURN_INT
860 # more 2.6 api changes.  return type for the invalidatepage
861 # address_space_operation is 'void' in new kernels but 'int' in old
862 #
863 AC_DEFUN([LC_INVALIDATEPAGE_RETURN_INT],
864 [AC_MSG_CHECKING([invalidatepage has return int])
865 LB_LINUX_TRY_COMPILE([
866         #include <linux/buffer_head.h>
867 ],[
868         int rc = block_invalidatepage(NULL, 0);
869 ],[
870         AC_MSG_RESULT(yes)
871         AC_DEFINE(HAVE_INVALIDATEPAGE_RETURN_INT, 1,
872                 [Define if return type of invalidatepage should be int])
873 ],[
874         AC_MSG_RESULT(NO)
875 ])
876 ])
877
878 # LC_UMOUNTBEGIN_HAS_VFSMOUNT
879 # more 2.6 API changes. 2.6.18 umount_begin has different parameters
880 AC_DEFUN([LC_UMOUNTBEGIN_HAS_VFSMOUNT],
881 [AC_MSG_CHECKING([if umount_begin needs vfsmount parameter instead of super_block])
882 tmp_flags="$EXTRA_KCFLAGS"
883 EXTRA_KCFLAGS="-Werror"
884 LB_LINUX_TRY_COMPILE([
885         #include <linux/fs.h>
886
887         struct vfsmount;
888         static void cfg_umount_begin (struct vfsmount *v, int flags)
889         {
890                 ;
891         }
892
893         static struct super_operations cfg_super_operations = {
894                 .umount_begin   = cfg_umount_begin,
895         };
896 ],[
897         cfg_super_operations.umount_begin(NULL,0);
898 ],[
899         AC_MSG_RESULT(yes)
900         AC_DEFINE(HAVE_UMOUNTBEGIN_VFSMOUNT, 1,
901                 [Define umount_begin need second argument])
902 ],[
903         AC_MSG_RESULT(NO)
904 ])
905 EXTRA_KCFLAGS="$tmp_flags"
906 ])
907
908 # 2.6.19 API changes
909 # inode don`t have i_blksize field
910 AC_DEFUN([LC_INODE_BLKSIZE],
911 [AC_MSG_CHECKING([inode has i_blksize field])
912 LB_LINUX_TRY_COMPILE([
913 #include <linux/fs.h>
914 ],[
915         struct inode i;
916         i.i_blksize = 0; 
917 ],[
918         AC_MSG_RESULT(yes)
919         AC_DEFINE(HAVE_INODE_BLKSIZE, 1,
920                 [struct inode has i_blksize field])
921 ],[
922         AC_MSG_RESULT(NO)
923 ])
924 ])
925
926 # LC_VFS_READDIR_U64_INO
927 # 2.6.19 use u64 for inode number instead of inode_t
928 AC_DEFUN([LC_VFS_READDIR_U64_INO],
929 [AC_MSG_CHECKING([check vfs_readdir need 64bit inode number])
930 tmp_flags="$EXTRA_KCFLAGS"
931 EXTRA_KCFLAGS="-Werror"
932 LB_LINUX_TRY_COMPILE([
933 #include <linux/fs.h>
934         int fillonedir(void * __buf, const char * name, int namlen, loff_t offset,
935                       u64 ino, unsigned int d_type)
936         {
937                 return 0;
938         }
939 ],[
940         filldir_t filter;
941
942         filter = fillonedir;
943         return 1;
944 ],[
945         AC_MSG_RESULT(yes)
946         AC_DEFINE(HAVE_VFS_READDIR_U64_INO, 1,
947                 [if vfs_readdir need 64bit inode number])
948 ],[
949         AC_MSG_RESULT(NO)
950 ])
951 EXTRA_KCFLAGS="$tmp_flags"
952 ])
953
954 # LC_GENERIC_FILE_WRITE
955 # 2.6.19 introduce do_sync_write instead of
956 # generic_file_write
957 AC_DEFUN([LC_GENERIC_FILE_WRITE],
958 [AC_MSG_CHECKING([use generic_file_write])
959 LB_LINUX_TRY_COMPILE([
960         #include <linux/fs.h>
961 ],[
962         int result = generic_file_read(NULL, NULL, 0, 0);
963 ],[
964         AC_MSG_RESULT(yes)
965         AC_DEFINE(HAVE_GENERIC_FILE_WRITE, 1,
966                 [use generic_file_write])
967 ],[
968         AC_MSG_RESULT(NO)
969 ])
970 ])
971
972 # LC_GENERIC_FILE_READ
973 # 2.6.19 need to use do_sync_read instead of
974 # generic_file_read
975 AC_DEFUN([LC_GENERIC_FILE_READ],
976 [AC_MSG_CHECKING([use generic_file_read])
977 LB_LINUX_TRY_COMPILE([
978         #include <linux/fs.h>
979 ],[
980         int result = generic_file_read(NULL, NULL, 0, 0);
981 ],[
982         AC_MSG_RESULT(yes)
983         AC_DEFINE(HAVE_GENERIC_FILE_READ, 1,
984                 [use generic_file_read])
985 ],[
986         AC_MSG_RESULT(NO)
987 ])
988 ])
989
990 # LC_NR_PAGECACHE
991 # 2.6.18 don`t export nr_pagecahe
992 AC_DEFUN([LC_NR_PAGECACHE],
993 [AC_MSG_CHECKING([kernel export nr_pagecache])
994 LB_LINUX_TRY_COMPILE([
995         #include <linux/pagemap.h>
996 ],[
997         return atomic_read(&nr_pagecache);
998 ],[
999         AC_MSG_RESULT(yes)
1000         AC_DEFINE(HAVE_NR_PAGECACHE, 1,
1001                 [is kernel export nr_pagecache])
1002 ],[
1003         AC_MSG_RESULT(NO)
1004 ])
1005 ])
1006
1007
1008 #
1009 # LC_PROG_LINUX
1010 #
1011 # Lustre linux kernel checks
1012 #
1013 AC_DEFUN([LC_PROG_LINUX],
1014 [ LC_LUSTRE_VERSION_H
1015 if test x$enable_server = xyes ; then
1016         LC_CONFIG_BACKINGFS
1017 fi
1018 LC_CONFIG_PINGER
1019 LC_CONFIG_LIBLUSTRE_RECOVERY
1020 LC_CONFIG_QUOTA
1021
1022 LC_TASK_PPTR
1023
1024 LC_STRUCT_KIOBUF
1025 LC_FUNC_COND_RESCHED
1026 LC_FUNC_ZAP_PAGE_RANGE
1027 LC_FUNC_PDE
1028 LC_FUNC_DIRECT_IO
1029 LC_HEADER_MM_INLINE
1030 LC_STRUCT_INODE
1031 LC_FUNC_REGISTER_CACHE
1032 LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
1033 LC_FUNC_DEV_SET_RDONLY
1034 LC_FUNC_FILEMAP_FDATAWRITE
1035 LC_STRUCT_STATFS
1036 LC_FUNC_PAGE_MAPPED
1037 LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL
1038 LC_FILEMAP_POPULATE
1039 LC_D_ADD_UNIQUE
1040 LC_BIT_SPINLOCK_H
1041 LC_XATTR_ACL
1042 LC_STRUCT_INTENT_FILE
1043 LC_POSIX_ACL_XATTR_H
1044 LC_FUNC_SET_FS_PWD
1045 LC_FUNC_MS_FLOCK_LOCK
1046 LC_FUNC_HAVE_CAN_SLEEP_ARG
1047 LC_FUNC_F_OP_FLOCK
1048 LC_QUOTA_READ
1049 LC_COOKIE_FOLLOW_LINK
1050
1051 # 2.6.15
1052 LC_INODE_I_MUTEX
1053
1054 # 2.6.17
1055 LC_DQUOTOFF_MUTEX
1056
1057 # 2.6.18
1058 LC_NR_PAGECACHE
1059 LC_STATFS_DENTRY_PARAM
1060 LC_VFS_KERN_MOUNT
1061 LC_INVALIDATEPAGE_RETURN_INT
1062 LC_UMOUNTBEGIN_HAS_VFSMOUNT
1063
1064 # 2.6.19
1065 LC_INODE_BLKSIZE
1066 LC_VFS_READDIR_U64_INO
1067 LC_GENERIC_FILE_READ
1068 LC_GENERIC_FILE_WRITE
1069 ])
1070
1071 #
1072 # LC_CONFIG_CLIENT_SERVER
1073 #
1074 # Build client/server sides of Lustre
1075 #
1076 AC_DEFUN([LC_CONFIG_CLIENT_SERVER],
1077 [AC_MSG_CHECKING([whether to build Lustre server support])
1078 AC_ARG_ENABLE([server],
1079         AC_HELP_STRING([--disable-server],
1080                         [disable Lustre server support]),
1081         [],[enable_server='yes'])
1082 AC_MSG_RESULT([$enable_server])
1083
1084 AC_MSG_CHECKING([whether to build Lustre client support])
1085 AC_ARG_ENABLE([client],
1086         AC_HELP_STRING([--disable-client],
1087                         [disable Lustre client support]),
1088         [],[enable_client='yes'])
1089 AC_MSG_RESULT([$enable_client])])
1090
1091 #
1092 # LC_CONFIG_LIBLUSTRE
1093 #
1094 # whether to build liblustre
1095 #
1096 AC_DEFUN([LC_CONFIG_LIBLUSTRE],
1097 [AC_MSG_CHECKING([whether to build Lustre library])
1098 AC_ARG_ENABLE([liblustre],
1099         AC_HELP_STRING([--disable-liblustre],
1100                         [disable building of Lustre library]),
1101         [],[enable_liblustre=$with_sysio])
1102 AC_MSG_RESULT([$enable_liblustre])
1103 # only build sysio if liblustre is built
1104 with_sysio="$enable_liblustre"
1105
1106 AC_MSG_CHECKING([whether to build liblustre tests])
1107 AC_ARG_ENABLE([liblustre-tests],
1108         AC_HELP_STRING([--enable-liblustre-tests],
1109                         [enable liblustre tests, if --disable-tests is used]),
1110         [],[enable_liblustre_tests=$enable_tests])
1111 if test x$enable_liblustre != xyes ; then
1112    enable_liblustre_tests='no'
1113 fi
1114 AC_MSG_RESULT([$enable_liblustre_tests])
1115
1116 AC_MSG_CHECKING([whether to build mpitests])
1117 AC_ARG_ENABLE([mpitests],
1118         AC_HELP_STRING([--enable-mpitests],
1119                         [build liblustre mpi tests]),
1120         [],[enable_mpitests=no])
1121 AC_MSG_RESULT([$enable_mpitests])
1122
1123 AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])
1124 ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"
1125
1126 LC_CONFIG_PINGER
1127 LC_CONFIG_LIBLUSTRE_RECOVERY
1128 ])
1129
1130 #
1131 # LC_CONFIG_QUOTA
1132 #
1133 # whether to enable quota support
1134 #
1135 AC_DEFUN([LC_CONFIG_QUOTA],
1136 [AC_MSG_CHECKING([whether to enable quota support])
1137 AC_ARG_ENABLE([quota], 
1138         AC_HELP_STRING([--enable-quota],
1139                         [enable quota support]),
1140         [],[enable_quota='yes'])
1141 AC_MSG_RESULT([$enable_quota])
1142 if test x$linux25 != xyes; then
1143    enable_quota='no'
1144 fi
1145 if test x$enable_quota != xno; then
1146    AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support])
1147 fi
1148 ])
1149   
1150 AC_DEFUN([LC_QUOTA_READ],
1151 [AC_MSG_CHECKING([if kernel supports quota_read])
1152 LB_LINUX_TRY_COMPILE([
1153         #include <linux/fs.h>
1154 ],[
1155         struct super_operations sp;
1156         void *i = (void *)sp.quota_read;
1157 ],[
1158         AC_MSG_RESULT([yes])
1159         AC_DEFINE(KERNEL_SUPPORTS_QUOTA_READ, 1, [quota_read found])
1160 ],[
1161         AC_MSG_RESULT([no])
1162 ])
1163 ])
1164
1165 #
1166 # LC_COOKIE_FOLLOW_LINK
1167 #
1168 # kernel 2.6.13+ ->follow_link returns a cookie
1169 #
1170
1171 AC_DEFUN([LC_COOKIE_FOLLOW_LINK],
1172 [AC_MSG_CHECKING([if inode_operations->follow_link returns a cookie])
1173 LB_LINUX_TRY_COMPILE([
1174         #include <linux/fs.h>
1175         #include <linux/namei.h>
1176 ],[
1177         struct dentry dentry;
1178         struct nameidata nd;
1179
1180         dentry.d_inode->i_op->put_link(&dentry, &nd, NULL);
1181 ],[
1182         AC_DEFINE(HAVE_COOKIE_FOLLOW_LINK, 1, [inode_operations->follow_link returns a cookie])
1183         AC_MSG_RESULT([yes])
1184 ],[
1185         AC_MSG_RESULT([no])
1186 ])
1187 ])
1188
1189 #
1190 # LC_CONFIGURE
1191 #
1192 # other configure checks
1193 #
1194 AC_DEFUN([LC_CONFIGURE],
1195 [LC_CONFIG_OBD_BUFFER_SIZE
1196
1197 # include/liblustre.h
1198 AC_CHECK_HEADERS([asm/page.h sys/user.h sys/vfs.h stdint.h blkid/blkid.h])
1199
1200 # include/lustre/lustre_user.h
1201 # See note there re: __ASM_X86_64_PROCESSOR_H
1202 AC_CHECK_HEADERS([linux/quota.h])
1203
1204 # liblustre/llite_lib.h
1205 AC_CHECK_HEADERS([xtio.h file.h])
1206
1207 # liblustre/dir.c
1208 AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
1209
1210 # liblustre/lutil.c
1211 AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
1212 AC_CHECK_FUNCS([inet_ntoa])
1213
1214 # libsysio/src/readlink.c
1215 LC_READLINK_SSIZE_T
1216
1217 # utils/llverfs.c
1218 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
1219
1220 # Super safe df
1221 AC_ARG_ENABLE([mindf],
1222       AC_HELP_STRING([--enable-mindf],
1223                       [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
1224       [],[])
1225 if test "$enable_mindf" = "yes" ;  then
1226       AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])
1227 fi
1228
1229 ])
1230
1231 #
1232 # LC_CONDITIONALS
1233 #
1234 # AM_CONDITIONALS for lustre
1235 #
1236 AC_DEFUN([LC_CONDITIONALS],
1237 [AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
1238 AM_CONDITIONAL(LDISKFS, test x$enable_ldiskfs = xyes)
1239 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
1240 AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes)
1241 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
1242 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
1243 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
1244 AM_CONDITIONAL(QUOTA, test x$enable_quota = xyes)
1245 AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes)
1246 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
1247 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
1248 ])
1249
1250 #
1251 # LC_CONFIG_FILES
1252 #
1253 # files that should be generated with AC_OUTPUT
1254 #
1255 AC_DEFUN([LC_CONFIG_FILES],
1256 [AC_CONFIG_FILES([
1257 lustre/Makefile
1258 lustre/autoMakefile
1259 lustre/autoconf/Makefile
1260 lustre/contrib/Makefile
1261 lustre/doc/Makefile
1262 lustre/include/Makefile
1263 lustre/include/lustre_ver.h
1264 lustre/include/linux/Makefile
1265 lustre/include/lustre/Makefile
1266 lustre/kernel_patches/targets/2.6-suse.target
1267 lustre/kernel_patches/targets/2.6-vanilla.target
1268 lustre/kernel_patches/targets/2.6-rhel4.target
1269 lustre/kernel_patches/targets/2.6-fc5.target
1270 lustre/kernel_patches/targets/2.6-patchless.target
1271 lustre/kernel_patches/targets/2.6-sles10.target
1272 lustre/kernel_patches/targets/hp_pnnl-2.4.target
1273 lustre/kernel_patches/targets/rh-2.4.target
1274 lustre/kernel_patches/targets/rhel-2.4.target
1275 lustre/kernel_patches/targets/suse-2.4.21-2.target
1276 lustre/kernel_patches/targets/sles-2.4.target
1277 lustre/ldiskfs/Makefile
1278 lustre/ldiskfs/autoMakefile
1279 lustre/ldlm/Makefile
1280 lustre/liblustre/Makefile
1281 lustre/liblustre/tests/Makefile
1282 lustre/llite/Makefile
1283 lustre/llite/autoMakefile
1284 lustre/lov/Makefile
1285 lustre/lov/autoMakefile
1286 lustre/lvfs/Makefile
1287 lustre/lvfs/autoMakefile
1288 lustre/mdc/Makefile
1289 lustre/mdc/autoMakefile
1290 lustre/mds/Makefile
1291 lustre/mds/autoMakefile
1292 lustre/obdclass/Makefile
1293 lustre/obdclass/autoMakefile
1294 lustre/obdclass/linux/Makefile
1295 lustre/obdecho/Makefile
1296 lustre/obdecho/autoMakefile
1297 lustre/obdfilter/Makefile
1298 lustre/obdfilter/autoMakefile
1299 lustre/osc/Makefile
1300 lustre/osc/autoMakefile
1301 lustre/ost/Makefile
1302 lustre/ost/autoMakefile
1303 lustre/mgc/Makefile
1304 lustre/mgc/autoMakefile
1305 lustre/mgs/Makefile
1306 lustre/mgs/autoMakefile
1307 lustre/ptlrpc/Makefile
1308 lustre/ptlrpc/autoMakefile
1309 lustre/quota/Makefile
1310 lustre/quota/autoMakefile
1311 lustre/scripts/Makefile
1312 lustre/scripts/version_tag.pl
1313 lustre/tests/Makefile
1314 lustre/utils/Makefile
1315 ])
1316 case $lb_target_os in
1317         darwin)
1318                 AC_CONFIG_FILES([ lustre/obdclass/darwin/Makefile ])
1319                 ;;
1320 esac
1321
1322 ])