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