1 #* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 #* vim:expandtab:shiftwidth=8:tabstop=8:
6 # Wrapper for AC_CONFIG_SUBDIR
8 AC_DEFUN([LC_CONFIG_SRCDIR],
9 [AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c])
15 # lustre specific paths
17 AC_DEFUN([LC_PATH_DEFAULTS],
18 [# ptlrpc kernel build requires this
26 demodir='$(docdir)/demo'
29 pkgexampledir='${pkgdatadir}/examples'
30 AC_SUBST(pkgexampledir)
36 # is the target os supported?
38 AC_DEFUN([LC_TARGET_SUPPORTED],
52 # that ext3 is enabled in the kernel
54 AC_DEFUN([LC_CONFIG_EXT3],
55 [LB_LINUX_CONFIG([EXT3_FS],[],[
56 LB_LINUX_CONFIG([EXT3_FS_MODULE],[],[$2])
58 LB_LINUX_CONFIG([EXT3_FS_XATTR],[$1],[$3])
64 # If we have (and can build) fshooks.h
66 AC_DEFUN([LC_FSHOOKS],
67 [LB_CHECK_FILE([$LINUX/include/linux/fshooks.h],[
68 AC_MSG_CHECKING([if fshooks.h can be compiled])
69 LB_LINUX_TRY_COMPILE([
70 #include <linux/fshooks.h>
75 AC_MSG_WARN([You might have better luck with gcc 3.3.x.])
76 AC_MSG_WARN([You can set CC=gcc33 before running configure.])
77 AC_MSG_ERROR([Your compiler cannot build fshooks.h.])
88 # LC_FUNC_RELEASEPAGE_WITH_GFP
90 # if ->releasepage() takes a gfp_t arg in 2.6.9
91 # This kernel defines gfp_t (HAS_GFP_T) but doesn't use it for this function,
92 # while others either don't have gfp_t or pass gfp_t as the parameter.
94 AC_DEFUN([LC_FUNC_RELEASEPAGE_WITH_GFP],
95 [AC_MSG_CHECKING([if releasepage has a gfp_t parameter])
96 RELEASEPAGE_WITH_GFP="`grep -c 'releasepage.*gfp_t' $LINUX/include/linux/fs.h`"
97 if test "$RELEASEPAGE_WITH_GFP" != 0 ; then
98 AC_DEFINE(HAVE_RELEASEPAGE_WITH_GFP, 1,
99 [releasepage with gfp_t parameter])
106 # LC_FUNC_FILEMAP_FDATASYNC
108 # if filemap_fdatasync() exists
110 AC_DEFUN([LC_FUNC_FILEMAP_FDATAWRITE],
111 [AC_MSG_CHECKING([whether filemap_fdatawrite() is defined])
112 LB_LINUX_TRY_COMPILE([
113 #include <linux/fs.h>
115 int (*foo)(struct address_space *)= filemap_fdatawrite;
118 AC_DEFINE(HAVE_FILEMAP_FDATAWRITE, 1, [filemap_fdatawrite() found])
125 # LC_HEADER_MM_INLINE
127 # RHEL kernels define page_count in mm_inline.h
129 AC_DEFUN([LC_HEADER_MM_INLINE],
130 [AC_MSG_CHECKING([if kernel has mm_inline.h header])
131 LB_LINUX_TRY_COMPILE([
132 #include <linux/mm_inline.h>
135 #error mm_inline.h does not define page_count
139 AC_DEFINE(HAVE_MM_INLINE, 1, [mm_inline found])
148 # if inode->i_alloc_sem exists
150 AC_DEFUN([LC_STRUCT_INODE],
151 [AC_MSG_CHECKING([if struct inode has i_alloc_sem])
152 LB_LINUX_TRY_COMPILE([
153 #include <linux/fs.h>
154 #include <linux/version.h>
157 return (char *)&i.i_alloc_sem - (char *)&i;
160 AC_DEFINE(HAVE_I_ALLOC_SEM, 1, [struct inode has i_alloc_sem])
167 # LC_FUNC_REGISTER_CACHE
169 # if register_cache() is defined by kernel
171 # There are two ways to shrink one customized cache in linux kernels. For the
172 # kernels are prior than 2.6.5(?), register_cache() is used, and for latest
173 # kernels, set_shrinker() is used instead.
175 AC_DEFUN([LC_FUNC_REGISTER_CACHE],
176 [AC_MSG_CHECKING([if kernel defines cache pressure hook])
177 LB_LINUX_TRY_COMPILE([
178 #include <linux/mm.h>
182 set_shrinker(1, shrinker);
184 AC_MSG_RESULT([set_shrinker])
185 AC_DEFINE(HAVE_SHRINKER_CACHE, 1, [shrinker_cache found])
186 AC_DEFINE(HAVE_CACHE_RETURN_INT, 1, [shrinkers should return int])
188 LB_LINUX_TRY_COMPILE([
189 #include <linux/list.h>
190 #include <linux/cache_def.h>
192 struct cache_definition cache;
194 AC_MSG_RESULT([register_cache])
195 AC_DEFINE(HAVE_REGISTER_CACHE, 1, [register_cache found])
196 AC_MSG_CHECKING([if kernel expects return from cache shrink ])
197 tmp_flags="$EXTRA_KCFLAGS"
198 EXTRA_KCFLAGS="-Werror"
199 LB_LINUX_TRY_COMPILE([
200 #include <linux/list.h>
201 #include <linux/cache_def.h>
203 struct cache_definition c;
204 c.shrinker = (int (*)(int, unsigned int))1;
206 AC_DEFINE(HAVE_CACHE_RETURN_INT, 1,
207 [kernel expects return from shrink_cache])
212 EXTRA_KCFLAGS="$tmp_flags"
220 # LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
222 # check for our patched grab_cache_page_nowait_gfp() function
224 AC_DEFUN([LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP],
225 [AC_MSG_CHECKING([if kernel defines grab_cache_page_nowait_gfp()])
226 HAVE_GCPN_GFP="`grep -c 'grab_cache_page_nowait_gfp' $LINUX/include/linux/pagemap.h`"
227 if test "$HAVE_GCPN_GFP" != 0 ; then
228 AC_DEFINE(HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP, 1,
229 [kernel has grab_cache_page_nowait_gfp()])
237 # LC_FUNC_DEV_SET_RDONLY
239 # check for the old-style dev_set_rdonly which took an extra "devno" param
240 # and can only set a single device to discard writes at one time
242 AC_DEFUN([LC_FUNC_DEV_SET_RDONLY],
243 [AC_MSG_CHECKING([if kernel has new dev_set_rdonly])
244 LB_LINUX_TRY_COMPILE([
245 #include <linux/fs.h>
247 #ifndef HAVE_CLEAR_RDONLY_ON_PUT
248 #error needs to be patched by lustre kernel patches from Lustre version 1.4.3 or above.
252 AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel has new dev_set_rdonly])
254 AC_MSG_RESULT([no, Linux kernel source needs to be patches by lustre
255 kernel patches from Lustre version 1.4.3 or above.])
260 # LC_CONFIG_BACKINGFS
262 # setup, check the backing filesystem
264 AC_DEFUN([LC_CONFIG_BACKINGFS],
268 if test x$with_ldiskfs = xno ; then
271 if test x$enable_server = xyes ; then
272 AC_MSG_ERROR([ldiskfs is required for 2.6-based servers.])
275 # --- Check that ext3 and ext3 xattr are enabled in the kernel
277 AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel])
279 AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel])
280 AC_MSG_WARN([This build may fail.])
284 LB_DEFINE_LDISKFS_OPTIONS
287 AC_MSG_CHECKING([which backing filesystem to use])
288 AC_MSG_RESULT([$BACKINGFS])
295 # the pinger is temporary, until we have the recovery node in place
297 AC_DEFUN([LC_CONFIG_PINGER],
298 [AC_MSG_CHECKING([whether to enable pinger support])
299 AC_ARG_ENABLE([pinger],
300 AC_HELP_STRING([--disable-pinger],
301 [disable recovery pinger support]),
302 [],[enable_pinger='yes'])
303 AC_MSG_RESULT([$enable_pinger])
304 if test x$enable_pinger != xno ; then
305 AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
312 # do checksum of bulk data between client and OST
314 AC_DEFUN([LC_CONFIG_CHECKSUM],
315 [AC_MSG_CHECKING([whether to enable data checksum support])
316 AC_ARG_ENABLE([checksum],
317 AC_HELP_STRING([--disable-checksum],
318 [disable data checksum support]),
319 [],[enable_checksum='yes'])
320 AC_MSG_RESULT([$enable_checksum])
321 if test x$enable_checksum != xno ; then
322 AC_DEFINE(ENABLE_CHECKSUM, 1, do data checksums)
327 # LC_CONFIG_HEALTH_CHECK_WRITE
329 # Turn on the actual write to the disk
331 AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE],
332 [AC_MSG_CHECKING([whether to enable a write with the health check])
333 AC_ARG_ENABLE([health-write],
334 AC_HELP_STRING([--enable-health-write],
335 [enable disk writes when doing health check]),
336 [],[enable_health_write='no'])
337 AC_MSG_RESULT([$enable_health_write])
338 if test x$enable_health_write == xyes ; then
339 AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, Write when Checking Health)
344 # LC_CONFIG_LIBLUSTRE_RECOVERY
346 AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY],
347 [AC_MSG_CHECKING([whether to enable liblustre recovery support])
348 AC_ARG_ENABLE([liblustre-recovery],
349 AC_HELP_STRING([--disable-liblustre-recovery],
350 [disable liblustre recovery support]),
351 [],[enable_liblustre_recovery='yes'])
352 AC_MSG_RESULT([$enable_liblustre_recovery])
353 if test x$enable_liblustre_recovery != xno ; then
354 AC_DEFINE(ENABLE_LIBLUSTRE_RECOVERY, 1, Liblustre Can Recover)
359 # LC_CONFIG_OBD_BUFFER_SIZE
361 # the maximum buffer size of lctl ioctls
363 AC_DEFUN([LC_CONFIG_OBD_BUFFER_SIZE],
364 [AC_MSG_CHECKING([maximum OBD ioctl size])
365 AC_ARG_WITH([obd-buffer-size],
366 AC_HELP_STRING([--with-obd-buffer-size=[size]],
367 [set lctl ioctl maximum bytes (default=8192)]),
369 OBD_BUFFER_SIZE=$with_obd_buffer_size
373 AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
374 AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
380 # AIX does not have statfs.f_namelen
382 AC_DEFUN([LC_STRUCT_STATFS],
383 [AC_MSG_CHECKING([if struct statfs has a f_namelen field])
384 LB_LINUX_TRY_COMPILE([
385 #include <linux/vfs.h>
391 AC_DEFINE(HAVE_STATFS_NAMELEN, 1, [struct statfs has a namelen field])
398 # LC_READLINK_SSIZE_T
400 AC_DEFUN([LC_READLINK_SSIZE_T],
401 [AC_MSG_CHECKING([if readlink returns ssize_t])
405 ssize_t readlink(const char *, char *, size_t);
408 AC_DEFINE(HAVE_POSIX_1003_READLINK, 1, [readlink returns ssize_t])
414 AC_DEFUN([LC_FUNC_PAGE_MAPPED],
415 [AC_MSG_CHECKING([if kernel offers page_mapped])
416 LB_LINUX_TRY_COMPILE([
417 #include <linux/mm.h>
422 AC_DEFINE(HAVE_PAGE_MAPPED, 1, [page_mapped found])
428 AC_DEFUN([LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL],
429 [AC_MSG_CHECKING([if struct file_operations has an unlocked_ioctl field])
430 LB_LINUX_TRY_COMPILE([
431 #include <linux/fs.h>
433 struct file_operations fops;
434 &fops.unlocked_ioctl;
437 AC_DEFINE(HAVE_UNLOCKED_IOCTL, 1, [struct file_operations has an unlock ed_ioctl field])
443 AC_DEFUN([LC_FILEMAP_POPULATE],
444 [AC_MSG_CHECKING([for exported filemap_populate])
445 LB_LINUX_TRY_COMPILE([
446 #include <asm/page.h>
447 #include <linux/mm.h>
449 filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0);
452 AC_DEFINE(HAVE_FILEMAP_POPULATE, 1, [Kernel exports filemap_populate])
458 AC_DEFUN([LC_D_ADD_UNIQUE],
459 [AC_MSG_CHECKING([for d_add_unique])
460 LB_LINUX_TRY_COMPILE([
461 #include <linux/dcache.h>
463 d_add_unique(NULL, NULL);
466 AC_DEFINE(HAVE_D_ADD_UNIQUE, 1, [Kernel has d_add_unique])
472 AC_DEFUN([LC_BIT_SPINLOCK_H],
473 [LB_CHECK_FILE([$LINUX/include/linux/bit_spinlock.h],[
474 AC_MSG_CHECKING([if bit_spinlock.h can be compiled])
475 LB_LINUX_TRY_COMPILE([
476 #include <asm/processor.h>
477 #include <linux/spinlock.h>
478 #include <linux/bit_spinlock.h>
481 AC_DEFINE(HAVE_BIT_SPINLOCK_H, 1, [Kernel has bit_spinlock.h])
492 # If we have xattr_acl.h
494 AC_DEFUN([LC_XATTR_ACL],
495 [LB_CHECK_FILE([$LINUX/include/linux/xattr_acl.h],[
496 AC_MSG_CHECKING([if xattr_acl.h can be compiled])
497 LB_LINUX_TRY_COMPILE([
498 #include <linux/xattr_acl.h>
501 AC_DEFINE(HAVE_XATTR_ACL, 1, [Kernel has xattr_acl])
512 # If we have fiemap.h
513 # after 2.6.27 use fiemap.h in include/linux
515 AC_DEFUN([LC_LINUX_FIEMAP_H],
516 [LB_CHECK_FILE([$LINUX/include/linux/fiemap.h],[
517 AC_MSG_CHECKING([if fiemap.h can be compiled])
518 LB_LINUX_TRY_COMPILE([
519 #include <linux/fiemap.h>
522 AC_DEFINE(HAVE_LINUX_FIEMAP_H, 1, [Kernel has fiemap.h])
531 AC_DEFUN([LC_STRUCT_INTENT_FILE],
532 [AC_MSG_CHECKING([if struct open_intent has a file field])
533 LB_LINUX_TRY_COMPILE([
534 #include <linux/fs.h>
535 #include <linux/namei.h>
537 struct open_intent intent;
541 AC_DEFINE(HAVE_FILE_IN_STRUCT_INTENT, 1, [struct open_intent has a file field])
548 AC_DEFUN([LC_POSIX_ACL_XATTR_H],
549 [LB_CHECK_FILE([$LINUX/include/linux/posix_acl_xattr.h],[
550 AC_MSG_CHECKING([if linux/posix_acl_xattr.h can be compiled])
551 LB_LINUX_TRY_COMPILE([
552 #include <linux/posix_acl_xattr.h>
555 AC_DEFINE(HAVE_LINUX_POSIX_ACL_XATTR_H, 1, [linux/posix_acl_xattr.h found])
568 # starting from 2.6.19 linux kernel exports __iget()
570 AC_DEFUN([LC_EXPORT___IGET],
571 [LB_CHECK_SYMBOL_EXPORT([__iget],
573 AC_DEFINE(HAVE_EXPORT___IGET, 1, [kernel exports __iget])
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"
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])
594 # check for FS_RENAME_DOES_D_MOVE flag
596 AC_DEFUN([LC_FS_RENAME_DOES_D_MOVE],
597 [AC_MSG_CHECKING([if kernel has FS_RENAME_DOES_D_MOVE flag])
598 LB_LINUX_TRY_COMPILE([
599 #include <linux/fs.h>
601 int v = FS_RENAME_DOES_D_MOVE;
604 AC_DEFINE(HAVE_FS_RENAME_DOES_D_MOVE, 1, [kernel has FS_RENAME_DOES_D_MOVE flag])
611 # LC_FUNC_MS_FLOCK_LOCK
613 # SLES9 kernel has MS_FLOCK_LOCK sb flag
615 AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK],
616 [AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag])
617 LB_LINUX_TRY_COMPILE([
618 #include <linux/fs.h>
620 int flags = MS_FLOCK_LOCK;
622 AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1,
623 [kernel has MS_FLOCK_LOCK flag])
631 # LC_FUNC_HAVE_CAN_SLEEP_ARG
633 # SLES9 kernel has third arg can_sleep
634 # in fs/locks.c: flock_lock_file_wait()
636 AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG],
637 [AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
638 LB_LINUX_TRY_COMPILE([
639 #include <linux/fs.h>
643 struct file_lock *file_lock;
644 flock_lock_file_wait(file, file_lock, cansleep);
646 AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1,
647 [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
657 # rhel4.2 kernel has f_op->flock field
659 AC_DEFUN([LC_FUNC_F_OP_FLOCK],
660 [AC_MSG_CHECKING([if struct file_operations has flock field])
661 LB_LINUX_TRY_COMPILE([
662 #include <linux/fs.h>
664 struct file_operations ll_file_operations_flock;
665 ll_file_operations_flock.flock = NULL;
667 AC_DEFINE(HAVE_F_OP_FLOCK, 1,
668 [struct file_operations has flock field])
676 # LC_FUNC_MS_FLOCK_LOCK
678 # SLES9 kernel has MS_FLOCK_LOCK sb flag
680 AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK],
681 [AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag])
682 LB_LINUX_TRY_COMPILE([
683 #include <linux/fs.h>
685 int flags = MS_FLOCK_LOCK;
687 AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1,
688 [kernel has MS_FLOCK_LOCK flag])
696 # LC_FUNC_HAVE_CAN_SLEEP_ARG
698 # SLES9 kernel has third arg can_sleep
699 # in fs/locks.c: flock_lock_file_wait()
701 AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG],
702 [AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
703 LB_LINUX_TRY_COMPILE([
704 #include <linux/fs.h>
708 struct file_lock *file_lock;
709 flock_lock_file_wait(file, file_lock, cansleep);
711 AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1,
712 [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
722 # task struct has p_pptr instead of parent
724 AC_DEFUN([LC_TASK_PPTR],
725 [AC_MSG_CHECKING([task p_pptr found])
726 LB_LINUX_TRY_COMPILE([
727 #include <linux/sched.h>
729 struct task_struct *p;
734 AC_DEFINE(HAVE_TASK_PPTR, 1, [task p_pptr found])
743 # rhel4.2 kernel has f_op->flock field
745 AC_DEFUN([LC_FUNC_F_OP_FLOCK],
746 [AC_MSG_CHECKING([if struct file_operations has flock field])
747 LB_LINUX_TRY_COMPILE([
748 #include <linux/fs.h>
750 struct file_operations ll_file_operations_flock;
751 ll_file_operations_flock.flock = NULL;
753 AC_DEFINE(HAVE_F_OP_FLOCK, 1,
754 [struct file_operations has flock field])
761 # LC_EXPORT_SYNCHRONIZE_RCU
762 # after 2.6.12 synchronize_rcu is preferred over synchronize_kernel
763 AC_DEFUN([LC_EXPORT_SYNCHRONIZE_RCU],
764 [LB_CHECK_SYMBOL_EXPORT([synchronize_rcu],
765 [kernel/rcupdate.c],[
766 AC_DEFINE(HAVE_SYNCHRONIZE_RCU, 1,
767 [in 2.6.12 synchronize_rcu preferred over synchronize_kernel])
773 # after 2.6.15 inode have i_mutex intead of i_sem
774 AC_DEFUN([LC_INODE_I_MUTEX],
775 [AC_MSG_CHECKING([if inode has i_mutex ])
776 LB_LINUX_TRY_COMPILE([
777 #include <linux/mutex.h>
778 #include <linux/fs.h>
783 mutex_unlock(&i.i_mutex);
786 AC_DEFINE(HAVE_INODE_I_MUTEX, 1,
787 [after 2.6.15 inode have i_mutex intead of i_sem])
794 # after 2.6.17 dquote use mutex instead if semaphore
795 AC_DEFUN([LC_DQUOTOFF_MUTEX],
796 [AC_MSG_CHECKING([use dqonoff_mutex])
797 LB_LINUX_TRY_COMPILE([
798 #include <linux/mutex.h>
799 #include <linux/fs.h>
800 #include <linux/quota.h>
802 struct quota_info dq;
804 mutex_unlock(&dq.dqonoff_mutex);
807 AC_DEFINE(HAVE_DQUOTOFF_MUTEX, 1,
808 [after 2.6.17 dquote use mutex instead if semaphore])
815 # LC_STATFS_DENTRY_PARAM
816 # starting from 2.6.18 linux kernel uses dentry instead of
817 # super_block for first vfs_statfs argument
819 AC_DEFUN([LC_STATFS_DENTRY_PARAM],
820 [AC_MSG_CHECKING([first vfs_statfs parameter is dentry])
821 LB_LINUX_TRY_COMPILE([
822 #include <linux/fs.h>
824 int vfs_statfs(struct dentry *, struct kstatfs *);
826 AC_DEFINE(HAVE_STATFS_DENTRY_PARAM, 1,
827 [first parameter of vfs_statfs is dentry])
836 # starting from 2.6.18 kernel don't export do_kern_mount
837 # and want to use vfs_kern_mount instead.
839 AC_DEFUN([LC_VFS_KERN_MOUNT],
840 [AC_MSG_CHECKING([vfs_kern_mount exist in kernel])
841 LB_LINUX_TRY_COMPILE([
842 #include <linux/mount.h>
844 vfs_kern_mount(NULL, 0, NULL, NULL);
846 AC_DEFINE(HAVE_VFS_KERN_MOUNT, 1,
847 [vfs_kern_mount exist in kernel])
855 # LC_INVALIDATEPAGE_RETURN_INT
856 # more 2.6 api changes. return type for the invalidatepage
857 # address_space_operation is 'void' in new kernels but 'int' in old
859 AC_DEFUN([LC_INVALIDATEPAGE_RETURN_INT],
860 [AC_MSG_CHECKING([invalidatepage has return int])
861 LB_LINUX_TRY_COMPILE([
862 #include <linux/buffer_head.h>
864 int rc = block_invalidatepage(NULL, 0);
867 AC_DEFINE(HAVE_INVALIDATEPAGE_RETURN_INT, 1,
868 [Define if return type of invalidatepage should be int])
874 # LC_UMOUNTBEGIN_HAS_VFSMOUNT
875 # more 2.6 API changes. 2.6.18 umount_begin has different parameters
876 AC_DEFUN([LC_UMOUNTBEGIN_HAS_VFSMOUNT],
877 [AC_MSG_CHECKING([if umount_begin needs vfsmount parameter instead of super_block])
878 tmp_flags="$EXTRA_KCFLAGS"
879 EXTRA_KCFLAGS="-Werror"
880 LB_LINUX_TRY_COMPILE([
881 #include <linux/fs.h>
884 static void cfg_umount_begin (struct vfsmount *v, int flags)
889 static struct super_operations cfg_super_operations = {
890 .umount_begin = cfg_umount_begin,
893 cfg_super_operations.umount_begin(NULL,0);
896 AC_DEFINE(HAVE_UMOUNTBEGIN_VFSMOUNT, 1,
897 [Define umount_begin need second argument])
901 EXTRA_KCFLAGS="$tmp_flags"
904 # inode have i_private field since 2.6.17
905 AC_DEFUN([LC_INODE_IPRIVATE],
906 [AC_MSG_CHECKING([if inode has a i_private field])
907 LB_LINUX_TRY_COMPILE([
908 #include <linux/fs.h>
914 AC_DEFINE(HAVE_INODE_IPRIVATE, 1,
915 [struct inode has i_private field])
922 # inode don't have i_blksize field
923 AC_DEFUN([LC_INODE_BLKSIZE],
924 [AC_MSG_CHECKING([inode has i_blksize field])
925 LB_LINUX_TRY_COMPILE([
926 #include <linux/fs.h>
932 AC_DEFINE(HAVE_INODE_BLKSIZE, 1,
933 [struct inode has i_blksize field])
939 # LC_VFS_READDIR_U64_INO
940 # 2.6.19 use u64 for inode number instead of inode_t
941 AC_DEFUN([LC_VFS_READDIR_U64_INO],
942 [AC_MSG_CHECKING([check vfs_readdir need 64bit inode number])
943 tmp_flags="$EXTRA_KCFLAGS"
944 EXTRA_KCFLAGS="-Werror"
945 LB_LINUX_TRY_COMPILE([
946 #include <linux/fs.h>
947 int fillonedir(void * __buf, const char * name, int namlen, loff_t offset,
948 u64 ino, unsigned int d_type)
959 AC_DEFINE(HAVE_VFS_READDIR_U64_INO, 1,
960 [if vfs_readdir need 64bit inode number])
964 EXTRA_KCFLAGS="$tmp_flags"
968 # 2.6.19 replaced writev with aio_write
969 AC_DEFUN([LC_FILE_WRITEV],
970 [AC_MSG_CHECKING([writev in fops])
971 LB_LINUX_TRY_COMPILE([
972 #include <linux/fs.h>
974 struct file_operations *fops = NULL;
978 AC_DEFINE(HAVE_FILE_WRITEV, 1,
985 # LC_GENERIC_FILE_READ
986 # 2.6.19 replaced readv with aio_read
987 AC_DEFUN([LC_FILE_READV],
988 [AC_MSG_CHECKING([readv in fops])
989 LB_LINUX_TRY_COMPILE([
990 #include <linux/fs.h>
992 struct file_operations *fops = NULL;
996 AC_DEFINE(HAVE_FILE_READV, 1,
1004 # 2.6.18 don't export nr_pagecahe
1005 AC_DEFUN([LC_NR_PAGECACHE],
1006 [AC_MSG_CHECKING([kernel export nr_pagecache])
1007 LB_LINUX_TRY_COMPILE([
1008 #include <linux/pagemap.h>
1010 return atomic_read(&nr_pagecache);
1013 AC_DEFINE(HAVE_NR_PAGECACHE, 1,
1014 [is kernel export nr_pagecache])
1020 # LC_CANCEL_DIRTY_PAGE
1021 # 2.6.20 introduse cancel_dirty_page instead of
1023 AC_DEFUN([LC_CANCEL_DIRTY_PAGE],
1024 [AC_MSG_CHECKING([kernel has cancel_dirty_page])
1025 LB_LINUX_TRY_COMPILE([
1026 #include <linux/mm.h>
1027 #include <linux/page-flags.h>
1029 /* tmp workaround for broken OFED 1.4.1 at SLES10 */
1030 #if defined(CONFIG_SLE_VERSION) && CONFIG_SLE_VERSION == 10 && defined(_BACKPORT_LINUX_MM_H_)
1031 #error badly implementation of cancel_dirty_pages
1033 cancel_dirty_page(NULL, 0);
1036 AC_DEFINE(HAVE_CANCEL_DIRTY_PAGE, 1,
1037 [kernel has cancel_dirty_page instead of clear_page_dirty])
1046 # In order to support raid5 zerocopy patch, we have to patch the kernel to make
1047 # it support constant page, which means the page won't be modified during the
1050 AC_DEFUN([LC_PAGE_CONSTANT],
1051 [AC_MSG_CHECKING([if kernel have PageConstant defined])
1052 LB_LINUX_TRY_COMPILE([
1053 #include <linux/mm.h>
1054 #include <linux/page-flags.h>
1057 #error "Have no raid5 zcopy patch"
1061 AC_DEFINE(HAVE_PAGE_CONSTANT, 1, [kernel have PageConstant supported])
1067 # RHEL5 in FS-cache patch rename PG_checked flag
1069 AC_DEFUN([LC_PG_FS_MISC],
1070 [AC_MSG_CHECKING([kernel has PG_fs_misc])
1071 LB_LINUX_TRY_COMPILE([
1072 #include <linux/mm.h>
1073 #include <linux/page-flags.h>
1076 #error PG_fs_misc not defined in kernel
1080 AC_DEFINE(HAVE_PG_FS_MISC, 1,
1081 [is kernel have PG_fs_misc])
1087 # RHEL5 PageChecked and SetPageChecked defined
1088 AC_DEFUN([LC_PAGE_CHECKED],
1089 [AC_MSG_CHECKING([kernel has PageChecked and SetPageChecked])
1090 LB_LINUX_TRY_COMPILE([
1091 #include <linux/autoconf.h>
1092 #ifdef HAVE_LINUX_MMTYPES_H
1093 #include <linux/mm_types.h>
1095 #include <linux/page-flags.h>
1099 /* before 2.6.26 this define*/
1101 /* 2.6.26 use function instead of define for it */
1107 AC_DEFINE(HAVE_PAGE_CHECKED, 1,
1108 [does kernel have PageChecked and SetPageChecked])
1114 AC_DEFUN([LC_EXPORT_TRUNCATE_COMPLETE_PAGE],
1115 [LB_CHECK_SYMBOL_EXPORT([truncate_complete_page],
1117 AC_DEFINE(HAVE_TRUNCATE_COMPLETE_PAGE, 1,
1118 [kernel export truncate_complete_page])
1123 AC_DEFUN([LC_EXPORT_TRUNCATE_RANGE],
1124 [LB_CHECK_SYMBOL_EXPORT([truncate_inode_pages_range],
1126 AC_DEFINE(HAVE_TRUNCATE_RANGE, 1,
1127 [kernel export truncate_inode_pages_range])
1132 AC_DEFUN([LC_EXPORT_D_REHASH_COND],
1133 [LB_CHECK_SYMBOL_EXPORT([d_rehash_cond],
1135 AC_DEFINE(HAVE_D_REHASH_COND, 1,
1136 [d_rehash_cond is exported by the kernel])
1141 AC_DEFUN([LC_EXPORT___D_REHASH],
1142 [LB_CHECK_SYMBOL_EXPORT([__d_rehash],
1144 AC_DEFINE(HAVE___D_REHASH, 1,
1145 [__d_rehash is exported by the kernel])
1150 AC_DEFUN([LC_EXPORT_D_MOVE_LOCKED],
1151 [LB_CHECK_SYMBOL_EXPORT([d_move_locked],
1153 AC_DEFINE(HAVE_D_MOVE_LOCKED, 1,
1154 [d_move_locked is exported by the kernel])
1159 AC_DEFUN([LC_EXPORT___D_MOVE],
1160 [LB_CHECK_SYMBOL_EXPORT([__d_move],
1162 AC_DEFINE(HAVE___D_MOVE, 1,
1163 [__d_move is exported by the kernel])
1169 # LC_EXPORT_INVALIDATE_MAPPING_PAGES
1171 # SLES9, RHEL4, RHEL5, vanilla 2.6.24 export invalidate_mapping_pages() but
1172 # SLES10 2.6.16 does not, for some reason. For filter cache invalidation.
1174 AC_DEFUN([LC_EXPORT_INVALIDATE_MAPPING_PAGES],
1175 [LB_CHECK_SYMBOL_EXPORT([invalidate_mapping_pages], [mm/truncate.c], [
1176 AC_DEFINE(HAVE_INVALIDATE_MAPPING_PAGES, 1,
1177 [exported invalidate_mapping_pages])],
1178 [LB_CHECK_SYMBOL_EXPORT([invalidate_inode_pages], [mm/truncate.c], [
1179 AC_DEFINE(HAVE_INVALIDATE_INODE_PAGES, 1,
1180 [exported invalidate_inode_pages])], [
1181 AC_MSG_ERROR([no way to invalidate pages])
1187 # LC_EXPORT_FILEMAP_FDATASYNC_RANGE
1189 # No standard kernels export this
1191 AC_DEFUN([LC_EXPORT_FILEMAP_FDATAWRITE_RANGE],
1192 [LB_CHECK_SYMBOL_EXPORT([filemap_fdatawrite_range],
1194 AC_DEFINE(HAVE_FILEMAP_FDATAWRITE_RANGE, 1,
1195 [filemap_fdatawrite_range is exported by the kernel])
1200 # The actual symbol exported varies among architectures, so we need
1201 # to check many symbols (but only in the current architecture.) No
1202 # matter what symbol is exported, the kernel #defines node_to_cpumask
1203 # to the appropriate function and that's what we use.
1204 AC_DEFUN([LC_EXPORT_NODE_TO_CPUMASK],
1205 [LB_CHECK_SYMBOL_EXPORT([node_to_cpumask],
1206 [arch/$LINUX_ARCH/mm/numa.c],
1207 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
1208 [node_to_cpumask is exported by
1209 the kernel])]) # x86_64
1210 LB_CHECK_SYMBOL_EXPORT([node_to_cpu_mask],
1211 [arch/$LINUX_ARCH/kernel/smpboot.c],
1212 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
1213 [node_to_cpumask is exported by
1214 the kernel])]) # ia64
1215 LB_CHECK_SYMBOL_EXPORT([node_2_cpu_mask],
1216 [arch/$LINUX_ARCH/kernel/smpboot.c],
1217 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
1218 [node_to_cpumask is exported by
1219 the kernel])]) # i386
1223 # LC_VFS_INTENT_PATCHES
1225 # check if the kernel has the VFS intent patches
1226 AC_DEFUN([LC_VFS_INTENT_PATCHES],
1227 [AC_MSG_CHECKING([if the kernel has the VFS intent patches])
1228 LB_LINUX_TRY_COMPILE([
1229 #include <linux/fs.h>
1230 #include <linux/namei.h>
1232 struct nameidata nd;
1233 struct lookup_intent *it;
1236 intent_init(it, IT_OPEN);
1237 it->d.lustre.it_disposition = 0;
1238 it->d.lustre.it_data = NULL;
1240 AC_MSG_RESULT([yes])
1241 AC_DEFINE(HAVE_VFS_INTENT_PATCHES, 1, [VFS intent patches are applied])
1247 # 2.6.22 lost second parameter for invalidate_bdev
1248 AC_DEFUN([LC_INVALIDATE_BDEV_2ARG],
1249 [AC_MSG_CHECKING([if invalidate_bdev has second argument])
1250 LB_LINUX_TRY_COMPILE([
1251 #include <linux/buffer_head.h>
1253 invalidate_bdev(NULL,0);
1255 AC_MSG_RESULT([yes])
1256 AC_DEFINE(HAVE_INVALIDATE_BDEV_2ARG, 1,
1257 [invalidate_bdev has second argument])
1263 # 2.6.12 merge patch from oracle to convert tree_lock from spinlock to rwlock
1264 AC_DEFUN([LC_RW_TREE_LOCK],
1265 [AC_MSG_CHECKING([if kernel has tree_lock as rwlock])
1266 tmp_flags="$EXTRA_KCFLAGS"
1267 EXTRA_KCFLAGS="-Werror"
1268 LB_LINUX_TRY_COMPILE([
1269 #include <linux/fs.h>
1271 struct address_space a;
1273 write_lock(&a.tree_lock);
1275 AC_MSG_RESULT([yes])
1276 AC_DEFINE(HAVE_RW_TREE_LOCK, 1, [kernel has tree_lock as rw_lock])
1280 EXTRA_KCFLAGS="$tmp_flags"
1286 # 2.6.23 have return type 'void' for unregister_blkdev
1287 AC_DEFUN([LC_UNREGISTER_BLKDEV_RETURN_INT],
1288 [AC_MSG_CHECKING([if unregister_blkdev return int])
1289 LB_LINUX_TRY_COMPILE([
1290 #include <linux/fs.h>
1292 int i = unregister_blkdev(0,NULL);
1294 AC_MSG_RESULT([yes])
1295 AC_DEFINE(HAVE_UNREGISTER_BLKDEV_RETURN_INT, 1,
1296 [unregister_blkdev return int])
1302 # 2.6.23 change .sendfile to .splice_read
1303 # RHEL4 (-92 kernel) have both sendfile and .splice_read API
1304 AC_DEFUN([LC_KERNEL_SENDFILE],
1305 [AC_MSG_CHECKING([if kernel has .sendfile])
1306 LB_LINUX_TRY_COMPILE([
1307 #include <linux/fs.h>
1309 struct file_operations file;
1311 file.sendfile = NULL;
1313 AC_MSG_RESULT([yes])
1314 AC_DEFINE(HAVE_KERNEL_SENDFILE, 1,
1315 [kernel has .sendfile])
1321 # 2.6.23 change .sendfile to .splice_read
1322 AC_DEFUN([LC_KERNEL_SPLICE_READ],
1323 [AC_MSG_CHECKING([if kernel has .splice_read])
1324 LB_LINUX_TRY_COMPILE([
1325 #include <linux/fs.h>
1327 struct file_operations file;
1329 file.splice_read = NULL;
1331 AC_MSG_RESULT([yes])
1332 AC_DEFINE(HAVE_KERNEL_SPLICE_READ, 1,
1333 [kernel has .slice_read])
1339 # 2.6.23 extract nfs export related data into exportfs.h
1340 AC_DEFUN([LC_HAVE_EXPORTFS_H],
1341 [LB_CHECK_FILE([$LINUX/include/linux/exportfs.h], [
1342 AC_DEFINE(HAVE_LINUX_EXPORTFS_H, 1,
1343 [kernel has include/exportfs.h])
1349 # 2.6.23 have new page fault handling API
1350 AC_DEFUN([LC_VM_OP_FAULT],
1351 [AC_MSG_CHECKING([if kernel has .fault in vm_operation_struct])
1352 LB_LINUX_TRY_COMPILE([
1353 #include <linux/mm.h>
1355 struct vm_operations_struct op;
1359 AC_MSG_RESULT([yes])
1360 AC_DEFINE(HAVE_VM_OP_FAULT, 1,
1361 [if kernel has .fault in vm_operation_struct])
1367 #2.6.23 has new shrinker API
1368 AC_DEFUN([LC_REGISTER_SHRINKER],
1369 [AC_MSG_CHECKING([if kernel has register_shrinker])
1370 LB_LINUX_TRY_COMPILE([
1371 #include <linux/mm.h>
1373 register_shrinker(NULL);
1375 AC_MSG_RESULT([yes])
1376 AC_DEFINE(HAVE_REGISTER_SHRINKER, 1,
1377 [if kernel has register_shrinker])
1383 # 2.6.23 add code to wait other users to complete before removing procfs entry
1384 AC_DEFUN([LC_PROCFS_USERS],
1385 [AC_MSG_CHECKING([if kernel has pde_users member in procfs entry struct])
1386 LB_LINUX_TRY_COMPILE([
1387 #include <linux/proc_fs.h>
1389 struct proc_dir_entry pde;
1393 AC_MSG_RESULT([yes])
1394 AC_DEFINE(HAVE_PROCFS_USERS, 1,
1395 [kernel has pde_users member in procfs entry struct])
1401 # 2.6.24 has bio_endio with 2 args
1402 AC_DEFUN([LC_BIO_ENDIO_2ARG],
1403 [AC_MSG_CHECKING([if kernel has bio_endio with 2 args])
1404 LB_LINUX_TRY_COMPILE([
1405 #include <linux/bio.h>
1409 AC_MSG_RESULT([yes])
1410 AC_DEFINE(HAVE_BIO_ENDIO_2ARG, 1,
1411 [if kernel has bio_endio with 2 args])
1417 # 2.6.24 has new members in exports struct.
1418 AC_DEFUN([LC_FH_TO_DENTRY],
1419 [AC_MSG_CHECKING([if kernel has .fh_to_dentry member in export_operations struct])
1420 LB_LINUX_TRY_COMPILE([
1421 #ifdef HAVE_LINUX_EXPORTFS_H
1422 #include <linux/exportfs.h>
1424 #include <linux/fs.h>
1427 struct export_operations exp;
1429 exp.fh_to_dentry = NULL;
1431 AC_MSG_RESULT([yes])
1432 AC_DEFINE(HAVE_FH_TO_DENTRY, 1,
1433 [kernel has .fh_to_dentry member in export_operations struct])
1439 # 2.6.24 need linux/mm_types.h included
1440 AC_DEFUN([LC_HAVE_MMTYPES_H],
1441 [LB_CHECK_FILE([$LINUX/include/linux/mm_types.h], [
1442 AC_DEFINE(HAVE_LINUX_MMTYPES_H, 1,
1443 [kernel has include/mm_types.h])
1449 # 2.6.24 remove long aged procfs entry -> deleted member
1450 AC_DEFUN([LC_PROCFS_DELETED],
1451 [AC_MSG_CHECKING([if kernel has deleted member in procfs entry struct])
1452 LB_LINUX_TRY_COMPILE([
1453 #include <linux/proc_fs.h>
1455 struct proc_dir_entry pde;
1459 AC_MSG_RESULT([yes])
1460 AC_DEFINE(HAVE_PROCFS_DELETED, 1,
1461 [kernel has deleted member in procfs entry struct])
1467 # 2.6.25 change define to inline
1468 AC_DEFUN([LC_MAPPING_CAP_WRITEBACK_DIRTY],
1469 [AC_MSG_CHECKING([if kernel have mapping_cap_writeback_dirty])
1470 LB_LINUX_TRY_COMPILE([
1471 #include <linux/backing-dev.h>
1473 #ifndef mapping_cap_writeback_dirty
1474 mapping_cap_writeback_dirty(NULL);
1477 AC_MSG_RESULT([yes])
1478 AC_DEFINE(HAVE_MAPPING_CAP_WRITEBACK_DIRTY, 1,
1479 [kernel have mapping_cap_writeback_dirty])
1487 # 2.6.26 isn't export set_fs_pwd and change paramter in fs struct
1488 AC_DEFUN([LC_FS_STRUCT_USE_PATH],
1489 [AC_MSG_CHECKING([fs_struct use path structure])
1490 LB_LINUX_TRY_COMPILE([
1491 #include <asm/atomic.h>
1492 #include <linux/spinlock.h>
1493 #include <linux/fs_struct.h>
1496 struct fs_struct fs;
1500 AC_MSG_RESULT([yes])
1501 AC_DEFINE(HAVE_FS_STRUCT_USE_PATH, 1,
1502 [fs_struct use path structure])
1509 AC_DEFUN([LC_INODE_PERMISION_2ARGS],
1510 [AC_MSG_CHECKING([inode_operations->permission have two args])
1511 LB_LINUX_TRY_COMPILE([
1512 #include <linux/fs.h>
1514 struct inode *inode;
1516 inode->i_op->permission(NULL,0);
1518 AC_DEFINE(HAVE_INODE_PERMISION_2ARGS, 1,
1519 [inode_operations->permission have two args])
1520 AC_MSG_RESULT([yes])
1526 # 2.6.27 have file_remove_suid instead of remove_suid
1527 AC_DEFUN([LC_FILE_REMOVE_SUID],
1528 [AC_MSG_CHECKING([kernel have file_remove_suid])
1529 LB_LINUX_TRY_COMPILE([
1530 #include <linux/fs.h>
1532 file_remove_suid(NULL);
1534 AC_DEFINE(HAVE_FILE_REMOVE_SUID, 1,
1535 [kernel have file_remove_suid])
1536 AC_MSG_RESULT([yes])
1542 # 2.6.27 have new page locking API
1543 AC_DEFUN([LC_TRYLOCKPAGE],
1544 [AC_MSG_CHECKING([kernel use trylock_page for page lock])
1545 LB_LINUX_TRY_COMPILE([
1546 #include <linux/pagemap.h>
1550 AC_DEFINE(HAVE_TRYLOCK_PAGE, 1,
1551 [kernel use trylock_page for page lock])
1552 AC_MSG_RESULT([yes])
1558 # 2.6.27 and some older have mapping->tree_lock as spin_lock
1559 AC_DEFUN([LC_RW_TREE_LOCK],
1560 [AC_MSG_CHECKING([mapping->tree_lock is rw_lock])
1561 tmp_flags="$EXTRA_KCFLAGS"
1562 EXTRA_KCFLAGS="-Werror"
1563 LB_LINUX_TRY_COMPILE([
1564 #include <linux/fs.h>
1566 struct address_space *map = NULL;
1568 write_lock_irq(&map->tree_lock);
1571 AC_DEFINE(HAVE_RW_TREE_LOCK, 1,
1572 [mapping->tree_lock is rw_lock])
1576 EXTRA_KCFLAGS="$tmp_flags"
1579 # 2.6.5 sles9 hasn't define sysctl_vfs_cache_pressure
1580 AC_DEFUN([LC_HAVE_SYSCTL_VFS_CACHE_PRESSURE],
1581 [LB_CHECK_SYMBOL_EXPORT([sysctl_vfs_cache_pressure],
1583 AC_DEFINE(HAVE_SYSCTL_VFS_CACHE_PRESSURE, 1, [kernel exports sysctl_vfs_cache_pressure])
1588 # vfs_symlink seems to have started out with 3 args until 2.6.7 where a
1589 # "mode" argument was added, but then again, in some later version it was
1591 AC_DEFUN([LC_4ARGS_VFS_SYMLINK],
1592 [AC_MSG_CHECKING([if vfs_symlink wants 4 args])
1593 LB_LINUX_TRY_COMPILE([
1594 #include <linux/fs.h>
1597 struct dentry *dentry;
1598 const char *oldname = NULL;
1601 vfs_symlink(dir, dentry, oldname, mode);
1604 AC_DEFINE(HAVE_4ARGS_VFS_SYMLINK, 1,
1605 [vfs_symlink wants 4 args])
1611 # 2.6.27 sles11 remove the bi_hw_segments
1612 AC_DEFUN([LC_BI_HW_SEGMENTS],
1613 [AC_MSG_CHECKING([struct bio has a bi_hw_segments field])
1614 LB_LINUX_TRY_COMPILE([
1615 #include <linux/bio.h>
1618 io.bi_hw_segments = 0;
1620 AC_DEFINE(HAVE_BI_HW_SEGMENTS, 1,
1621 [struct bio has a bi_hw_segments field])
1622 AC_MSG_RESULT([yes])
1628 # 2.6.27 sles11 move the quotaio_v1.h to fs
1629 AC_DEFUN([LC_HAVE_QUOTAIO_V1_H],
1630 [LB_CHECK_FILE([$LINUX/include/linux/quotaio_v1.h],[
1631 AC_DEFINE(HAVE_QUOTAIO_V1_H, 1,
1632 [kernel has include/linux/quotaio_v1.h])
1638 # sles10 sp2 need 5 parameter for vfs_symlink
1639 AC_DEFUN([LC_VFS_SYMLINK_5ARGS],
1640 [AC_MSG_CHECKING([vfs_symlink need 5 parameter])
1641 LB_LINUX_TRY_COMPILE([
1642 #include <linux/fs.h>
1644 struct inode *dir = NULL;
1645 struct dentry *dentry = NULL;
1646 struct vfsmount *mnt = NULL;
1647 const char * path = NULL;
1648 vfs_symlink(dir, dentry, mnt, path, 0);
1650 AC_DEFINE(HAVE_VFS_SYMLINK_5ARGS, 1,
1651 [vfs_symlink need 5 parameteres])
1652 AC_MSG_RESULT([yes])
1658 # 2.6.27 removed the read_inode from super_operations.
1659 AC_DEFUN([LC_READ_INODE_IN_SBOPS],
1660 [AC_MSG_CHECKING([super_operations has a read_inode field])
1661 LB_LINUX_TRY_COMPILE([
1662 #include <linux/fs.h>
1664 struct super_operations *sop;
1665 sop->read_inode(NULL);
1667 AC_DEFINE(HAVE_READ_INODE_IN_SBOPS, 1,
1668 [super_operations has a read_inode])
1669 AC_MSG_RESULT([yes])
1675 # 2.6.27 sles11 has sb_any_quota_active
1676 AC_DEFUN([LC_SB_ANY_QUOTA_ACTIVE],
1677 [AC_MSG_CHECKING([Kernel has sb_any_quota_active])
1678 LB_LINUX_TRY_COMPILE([
1679 #include <linux/quotaops.h>
1681 sb_any_quota_active(NULL);
1683 AC_DEFINE(HAVE_SB_ANY_QUOTA_ACTIVE, 1,
1684 [Kernel has a sb_any_quota_active])
1685 AC_MSG_RESULT([yes])
1691 # 2.6.27 sles11 has sb_has_quota_active
1692 AC_DEFUN([LC_SB_HAS_QUOTA_ACTIVE],
1693 [AC_MSG_CHECKING([Kernel has sb_has_quota_active])
1694 LB_LINUX_TRY_COMPILE([
1695 #include <linux/quotaops.h>
1697 sb_has_quota_active(NULL, 0);
1699 AC_DEFINE(HAVE_SB_HAS_QUOTA_ACTIVE, 1,
1700 [Kernel has a sb_has_quota_active])
1701 AC_MSG_RESULT([yes])
1707 # 2.6.27 has inode_permission instead of permisson
1708 AC_DEFUN([LC_EXPORT_INODE_PERMISSION],
1709 [LB_CHECK_SYMBOL_EXPORT([inode_permission],
1711 AC_DEFINE(HAVE_EXPORT_INODE_PERMISSION, 1,
1712 [inode_permission is exported by the kernel])
1717 # 2.6.27 use 5th parameter in quota_on for remount.
1718 AC_DEFUN([LC_QUOTA_ON_5ARGS],
1719 [AC_MSG_CHECKING([quota_on needs 5 parameters])
1720 LB_LINUX_TRY_COMPILE([
1721 #include <linux/quota.h>
1723 struct quotactl_ops *qop;
1724 qop->quota_on(NULL, 0, 0, NULL, 0);
1726 AC_DEFINE(HAVE_QUOTA_ON_5ARGS, 1,
1727 [quota_on needs 5 paramters])
1728 AC_MSG_RESULT([yes])
1734 # 2.6.27 use 3th parameter in quota_off for remount.
1735 AC_DEFUN([LC_QUOTA_OFF_3ARGS],
1736 [AC_MSG_CHECKING([quota_off needs 3 parameters])
1737 LB_LINUX_TRY_COMPILE([
1738 #include <linux/quota.h>
1740 struct quotactl_ops *qop;
1741 qop->quota_off(NULL, 0, 0);
1743 AC_DEFINE(HAVE_QUOTA_OFF_3ARGS, 1,
1744 [quota_off needs 3 paramters])
1745 AC_MSG_RESULT([yes])
1751 # 2.6.27 has vfs_dq_off inline function.
1752 AC_DEFUN([LC_VFS_DQ_OFF],
1753 [AC_MSG_CHECKING([vfs_dq_off is defined])
1754 LB_LINUX_TRY_COMPILE([
1755 #include <linux/quotaops.h>
1757 vfs_dq_off(NULL, 0);
1759 AC_DEFINE(HAVE_VFS_DQ_OFF, 1, [vfs_dq_off is defined])
1760 AC_MSG_RESULT([yes])
1767 # Ensure stack size big than 8k in Lustre server
1768 AC_DEFUN([LC_STACK_SIZE],
1769 [AC_MSG_CHECKING([stack size big than 8k])
1770 LB_LINUX_TRY_COMPILE([
1771 #include <linux/thread_info.h>
1773 #if THREAD_SIZE < 8192
1774 #error "stack size < 8192"
1779 AC_MSG_ERROR([Lustre requires that Linux is configured with at least a 8KB stack.])
1786 # Lustre linux kernel checks
1788 AC_DEFUN([LC_PROG_LINUX],
1789 [LC_LUSTRE_VERSION_H
1790 if test x$enable_server = xyes ; then
1796 LC_CONFIG_LIBLUSTRE_RECOVERY
1797 LC_CONFIG_HEALTH_CHECK_WRITE
1798 LC_CONFIG_LRU_RESIZE
1799 LC_CONFIG_ADAPTIVE_TIMEOUTS
1800 LC_CONFIG_DELAYED_RECOVERY
1805 LC_EXPORT_TRUNCATE_COMPLETE_PAGE
1806 LC_EXPORT_TRUNCATE_RANGE
1807 LC_EXPORT_D_REHASH_COND
1808 LC_EXPORT___D_REHASH
1809 LC_EXPORT_D_MOVE_LOCKED
1811 LC_EXPORT_NODE_TO_CPUMASK
1813 LC_FUNC_RELEASEPAGE_WITH_GFP
1816 LC_FUNC_REGISTER_CACHE
1817 LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
1818 LC_FUNC_DEV_SET_RDONLY
1819 LC_FUNC_FILEMAP_FDATAWRITE
1822 LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL
1827 LC_STRUCT_INTENT_FILE
1828 LC_POSIX_ACL_XATTR_H
1830 LC_FUNC_MS_FLOCK_LOCK
1831 LC_FUNC_HAVE_CAN_SLEEP_ARG
1834 LC_COOKIE_FOLLOW_LINK
1838 LC_4ARGS_VFS_SYMLINK
1840 # does the kernel have VFS intent patches?
1841 LC_VFS_INTENT_PATCHES
1844 LC_HAVE_SYSCTL_VFS_CACHE_PRESSURE
1848 LC_EXPORT_SYNCHRONIZE_RCU
1854 LC_SECURITY_PLUG # for SLES10 SP2
1861 LC_STATFS_DENTRY_PARAM
1863 LC_INVALIDATEPAGE_RETURN_INT
1864 LC_UMOUNTBEGIN_HAS_VFSMOUNT
1866 LC_EXPORT_FILEMAP_FDATAWRITE_RANGE
1867 if test x$enable_server = xyes ; then
1868 LC_EXPORT_INVALIDATE_MAPPING_PAGES
1871 #2.6.18 + RHEL5 (fc6)
1877 LC_VFS_READDIR_U64_INO
1882 LC_CANCEL_DIRTY_PAGE
1884 # raid5-zerocopy patch
1888 LC_INVALIDATE_BDEV_2ARG
1889 LC_FS_RENAME_DOES_D_MOVE
1891 LC_UNREGISTER_BLKDEV_RETURN_INT
1893 LC_KERNEL_SPLICE_READ
1896 LC_REGISTER_SHRINKER
1900 LC_MAPPING_CAP_WRITEBACK_DIRTY
1909 LC_FS_STRUCT_USE_PATH
1913 LC_INODE_PERMISION_2ARGS
1917 LC_READ_INODE_IN_SBOPS
1918 LC_EXPORT_INODE_PERMISSION
1923 # 2.6.27.15-2 sles11
1925 LC_HAVE_QUOTAIO_V1_H
1926 LC_VFS_SYMLINK_5ARGS
1927 LC_SB_ANY_QUOTA_ACTIVE
1928 LC_SB_HAS_QUOTA_ACTIVE
1932 # LC_CONFIG_CLIENT_SERVER
1934 # Build client/server sides of Lustre
1936 AC_DEFUN([LC_CONFIG_CLIENT_SERVER],
1937 [AC_MSG_CHECKING([whether to build Lustre server support])
1938 AC_ARG_ENABLE([server],
1939 AC_HELP_STRING([--disable-server],
1940 [disable Lustre server support]),
1941 [],[enable_server='yes'])
1942 AC_MSG_RESULT([$enable_server])
1944 AC_MSG_CHECKING([whether to build Lustre client support])
1945 AC_ARG_ENABLE([client],
1946 AC_HELP_STRING([--disable-client],
1947 [disable Lustre client support]),
1948 [],[enable_client='yes'])
1949 AC_MSG_RESULT([$enable_client])])
1952 # LC_CONFIG_LIBLUSTRE
1954 # whether to build liblustre
1956 AC_DEFUN([LC_CONFIG_LIBLUSTRE],
1957 [AC_MSG_CHECKING([whether to build Lustre library])
1958 AC_ARG_ENABLE([liblustre],
1959 AC_HELP_STRING([--disable-liblustre],
1960 [disable building of Lustre library]),
1961 [],[enable_liblustre=$with_sysio])
1962 AC_MSG_RESULT([$enable_liblustre])
1963 # only build sysio if liblustre is built
1964 with_sysio="$enable_liblustre"
1966 AC_MSG_CHECKING([whether to build liblustre tests])
1967 AC_ARG_ENABLE([liblustre-tests],
1968 AC_HELP_STRING([--enable-liblustre-tests],
1969 [enable liblustre tests, if --disable-tests is used]),
1970 [],[enable_liblustre_tests=$enable_tests])
1971 if test x$enable_liblustre != xyes ; then
1972 enable_liblustre_tests='no'
1974 AC_MSG_RESULT([$enable_liblustre_tests])
1976 AC_MSG_CHECKING([whether to enable liblustre acl])
1977 AC_ARG_ENABLE([liblustre-acl],
1978 AC_HELP_STRING([--disable-liblustre-acl],
1979 [disable ACL support for liblustre]),
1980 [],[enable_liblustre_acl=yes])
1981 AC_MSG_RESULT([$enable_liblustre_acl])
1982 if test x$enable_liblustre_acl = xyes ; then
1983 AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS)
1989 AC_ARG_ENABLE(mpitests,
1990 AC_HELP_STRING([--enable-mpitests=yes|no|mpicc wrapper],
1991 [include mpi tests]),
2002 MPICC_WRAPPER=$enableval
2012 if test x$enable_mpitests != xno; then
2013 AC_MSG_CHECKING([whether mpitests can be built])
2021 MPI_Initialized(&flag);
2024 AC_MSG_RESULT([yes])
2031 AC_SUBST(MPICC_WRAPPER)
2033 AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])
2034 ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"
2037 LC_CONFIG_LIBLUSTRE_RECOVERY
2040 AC_DEFUN([LC_CONFIG_LRU_RESIZE],
2041 [AC_MSG_CHECKING([whether to enable lru self-adjusting])
2042 AC_ARG_ENABLE([lru_resize],
2043 AC_HELP_STRING([--enable-lru-resize],
2044 [enable lru resize support]),
2045 [],[enable_lru_resize='yes'])
2046 AC_MSG_RESULT([$enable_lru_resize])
2047 if test x$enable_lru_resize != xno; then
2048 AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])
2052 AC_DEFUN([LC_CONFIG_ADAPTIVE_TIMEOUTS],
2053 [AC_MSG_CHECKING([whether to enable ptlrpc adaptive timeouts support])
2054 AC_ARG_ENABLE([adaptive_timeouts],
2055 AC_HELP_STRING([--disable-adaptive-timeouts],
2056 [disable ptlrpc adaptive timeouts support]),
2057 [],[enable_adaptive_timeouts='yes'])
2058 AC_MSG_RESULT([$enable_adaptive_timeouts])
2059 if test x$enable_adaptive_timeouts == xyes; then
2060 AC_DEFINE(HAVE_AT_SUPPORT, 1, [Enable adaptive timeouts support])
2064 # config delayed recovery
2065 AC_DEFUN([LC_CONFIG_DELAYED_RECOVERY],
2066 [AC_MSG_CHECKING([whether to enable delayed recovery support])
2067 AC_ARG_ENABLE([delayed-recovery],
2068 AC_HELP_STRING([--enable-delayed-recovery],
2069 [enable late recovery after main one]),
2070 [],[enable_delayed_recovery='no'])
2071 AC_MSG_RESULT([$enable_delayed_recovery])
2072 if test x$enable_delayed_recovery == xyes; then
2073 AC_DEFINE(HAVE_DELAYED_RECOVERY, 1, [Enable delayed recovery support])
2080 # whether to enable quota support global control
2082 AC_DEFUN([LC_CONFIG_QUOTA],
2083 [AC_ARG_ENABLE([quota],
2084 AC_HELP_STRING([--enable-quota],
2085 [enable quota support]),
2086 [],[enable_quota='yes'])
2089 # whether to enable quota support(kernel modules)
2090 AC_DEFUN([LC_QUOTA_MODULE],
2091 [if test x$enable_quota != xno; then
2092 LB_LINUX_CONFIG([QUOTA],[
2093 enable_quota_module='yes'
2094 AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support])
2096 enable_quota_module='no'
2097 AC_MSG_WARN([quota is not enabled because the kernel - lacks quota support])
2102 AC_DEFUN([LC_QUOTA],
2106 AC_CHECK_HEADER(sys/quota.h,
2107 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1, [Define to 1 if you have <sys/quota.h>.])],
2108 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
2111 AC_DEFUN([LC_QUOTA_READ],
2112 [AC_MSG_CHECKING([if kernel supports quota_read])
2113 LB_LINUX_TRY_COMPILE([
2114 #include <linux/fs.h>
2116 struct super_operations sp;
2117 void *i = (void *)sp.quota_read;
2119 AC_MSG_RESULT([yes])
2120 AC_DEFINE(KERNEL_SUPPORTS_QUOTA_READ, 1, [quota_read found])
2127 # LC_COOKIE_FOLLOW_LINK
2129 # kernel 2.6.13+ ->follow_link returns a cookie
2132 AC_DEFUN([LC_COOKIE_FOLLOW_LINK],
2133 [AC_MSG_CHECKING([if inode_operations->follow_link returns a cookie])
2134 LB_LINUX_TRY_COMPILE([
2135 #include <linux/fs.h>
2136 #include <linux/namei.h>
2138 struct dentry dentry;
2139 struct nameidata nd;
2141 dentry.d_inode->i_op->put_link(&dentry, &nd, NULL);
2143 AC_DEFINE(HAVE_COOKIE_FOLLOW_LINK, 1, [inode_operations->follow_link returns a cookie])
2144 AC_MSG_RESULT([yes])
2153 # kernels prior than 2.6.0(?) have no RCU supported; in kernel 2.6.5(SUSE),
2154 # call_rcu takes three parameters.
2156 AC_DEFUN([LC_FUNC_RCU],
2157 [AC_MSG_CHECKING([if kernel have RCU supported])
2158 LB_LINUX_TRY_COMPILE([
2159 #include <linux/rcupdate.h>
2161 AC_DEFINE(HAVE_RCU, 1, [have RCU defined])
2162 AC_MSG_RESULT([yes])
2164 AC_MSG_CHECKING([if call_rcu takes three parameters])
2165 LB_LINUX_TRY_COMPILE([
2166 #include <linux/rcupdate.h>
2169 call_rcu(&rh, (void (*)(struct rcu_head *))1, NULL);
2171 AC_DEFINE(HAVE_CALL_RCU_PARAM, 1, [call_rcu takes three parameters])
2172 AC_MSG_RESULT([yes])
2184 # linux kernel may have 64-bit limits support
2186 AC_DEFUN([LC_QUOTA64],
2187 if test x$enable_server = xyes ; then
2188 [AC_MSG_CHECKING([if kernel has 64-bit quota limits support])
2189 LB_LINUX_TRY_COMPILE([
2190 #include <linux/kernel.h>
2191 #include <linux/fs.h>
2192 #include <linux/quotaio_v2.h>
2193 int versions[] = V2_INITQVERSIONS_R1;
2194 struct v2_disk_dqblk_r1 dqblk_r1;
2196 AC_DEFINE(HAVE_QUOTA64, 1, [have quota64])
2197 AC_MSG_RESULT([yes])
2199 tmp_flags="$EXTRA_KCFLAGS"
2200 EXTRA_KCFLAGS="-I $LINUX/fs"
2201 LB_LINUX_TRY_COMPILE([
2202 #include <linux/kernel.h>
2203 #include <linux/fs.h>
2204 #include <quotaio_v2.h>
2205 struct v2r1_disk_dqblk dqblk_r1;
2207 AC_DEFINE(HAVE_QUOTA64, 1, [have quota64])
2208 AC_MSG_RESULT([yes])
2211 AC_MSG_WARN([4 TB (or larger) block quota limits can only be used with OSTs not larger than 4 TB.])
2212 AC_MSG_WARN([Continuing with limited quota support.])
2213 AC_MSG_WARN([quotacheck is needed for filesystems with recent quota versions.])
2215 EXTRA_KCFLAGS=$tmp_flags
2220 # LC_SECURITY_PLUG # for SLES10 SP2
2221 # check security plug in sles10 sp2 kernel
2222 AC_DEFUN([LC_SECURITY_PLUG],
2223 [AC_MSG_CHECKING([If kernel has security plug support])
2224 LB_LINUX_TRY_COMPILE([
2225 #include <linux/fs.h>
2227 struct dentry *dentry;
2228 struct vfsmount *mnt;
2229 struct iattr *iattr;
2231 notify_change(dentry, mnt, iattr);
2234 AC_DEFINE(HAVE_SECURITY_PLUG, 1,
2235 [SLES10 SP2 use extra parameter in vfs])
2241 AC_DEFUN([LC_PERCPU_COUNTER],
2242 [AC_MSG_CHECKING([if have struct percpu_counter defined])
2243 LB_LINUX_TRY_COMPILE([
2244 #include <linux/percpu_counter.h>
2246 AC_DEFINE(HAVE_PERCPU_COUNTER, 1, [percpu_counter found])
2247 AC_MSG_RESULT([yes])
2249 AC_MSG_CHECKING([if percpu_counter_inc takes the 2nd argument])
2250 LB_LINUX_TRY_COMPILE([
2251 #include <linux/percpu_counter.h>
2253 struct percpu_counter c;
2254 percpu_counter_init(&c, 0);
2256 AC_DEFINE(HAVE_PERCPU_2ND_ARG, 1, [percpu_counter_init has two
2258 AC_MSG_RESULT([yes])
2270 # other configure checks
2272 AC_DEFUN([LC_CONFIGURE],
2273 [LC_CONFIG_OBD_BUFFER_SIZE
2275 # include/liblustre.h
2276 AC_CHECK_HEADERS([asm/page.h sys/user.h sys/vfs.h stdint.h blkid/blkid.h])
2278 # liblustre/llite_lib.h
2279 AC_CHECK_HEADERS([xtio.h file.h])
2282 AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
2285 AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
2286 AC_CHECK_FUNCS([inet_ntoa])
2288 # libsysio/src/readlink.c
2291 # lvfs/prng.c - depends on linux/types.h from liblustre/dir.c
2292 AC_CHECK_HEADERS([linux/random.h], [], [],
2293 [#ifdef HAVE_LINUX_TYPES_H
2294 # include <linux/types.h>
2299 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
2301 # check for -lz support
2305 [AC_CHECK_HEADERS([zlib.h],
2307 AC_DEFINE([HAVE_ADLER], 1,
2308 [support alder32 checksum type])],
2309 [AC_MSG_WARN([No zlib-devel package found,
2310 unable to use adler32 checksum])])],
2311 [AC_MSG_WARN([No zlib package found, unable to use adler32 checksum])]
2316 AC_ARG_ENABLE([mindf],
2317 AC_HELP_STRING([--enable-mindf],
2318 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
2320 if test "$enable_mindf" = "yes" ; then
2321 AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])
2324 AC_ARG_ENABLE([fail_alloc],
2325 AC_HELP_STRING([--disable-fail-alloc],
2326 [disable randomly alloc failure]),
2327 [],[enable_fail_alloc=yes])
2328 AC_MSG_CHECKING([whether to randomly failing memory alloc])
2329 AC_MSG_RESULT([$enable_fail_alloc])
2330 if test x$enable_fail_alloc != xno ; then
2331 AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure])
2339 # AM_CONDITIONALS for lustre
2341 AC_DEFUN([LC_CONDITIONALS],
2342 [AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
2343 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
2344 AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes)
2345 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
2346 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
2347 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
2348 AM_CONDITIONAL(QUOTA, test x$enable_quota_module = xyes)
2349 AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes)
2350 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
2351 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
2357 # files that should be generated with AC_OUTPUT
2359 AC_DEFUN([LC_CONFIG_FILES],
2363 lustre/autoconf/Makefile
2364 lustre/contrib/Makefile
2366 lustre/include/Makefile
2367 lustre/include/lustre_ver.h
2368 lustre/include/linux/Makefile
2369 lustre/include/lustre/Makefile
2370 lustre/kernel_patches/targets/2.6-suse.target
2371 lustre/kernel_patches/targets/2.6-vanilla.target
2372 lustre/kernel_patches/targets/2.6-rhel4.target
2373 lustre/kernel_patches/targets/2.6-rhel5.target
2374 lustre/kernel_patches/targets/2.6-fc5.target
2375 lustre/kernel_patches/targets/2.6-patchless.target
2376 lustre/kernel_patches/targets/2.6-sles10.target
2377 lustre/kernel_patches/targets/2.6-sles11.target
2378 lustre/kernel_patches/targets/hp_pnnl-2.4.target
2379 lustre/kernel_patches/targets/rh-2.4.target
2380 lustre/kernel_patches/targets/rhel-2.4.target
2381 lustre/kernel_patches/targets/suse-2.4.21-2.target
2382 lustre/kernel_patches/targets/sles-2.4.target
2383 lustre/ldlm/Makefile
2384 lustre/liblustre/Makefile
2385 lustre/liblustre/tests/Makefile
2386 lustre/liblustre/tests/mpi/Makefile
2387 lustre/llite/Makefile
2388 lustre/llite/autoMakefile
2390 lustre/lov/autoMakefile
2391 lustre/lvfs/Makefile
2392 lustre/lvfs/autoMakefile
2394 lustre/mdc/autoMakefile
2396 lustre/mds/autoMakefile
2397 lustre/obdclass/Makefile
2398 lustre/obdclass/autoMakefile
2399 lustre/obdclass/linux/Makefile
2400 lustre/obdecho/Makefile
2401 lustre/obdecho/autoMakefile
2402 lustre/obdfilter/Makefile
2403 lustre/obdfilter/autoMakefile
2405 lustre/osc/autoMakefile
2407 lustre/ost/autoMakefile
2409 lustre/mgc/autoMakefile
2411 lustre/mgs/autoMakefile
2412 lustre/ptlrpc/Makefile
2413 lustre/ptlrpc/autoMakefile
2414 lustre/quota/Makefile
2415 lustre/quota/autoMakefile
2416 lustre/scripts/Makefile
2417 lustre/tests/Makefile
2418 lustre/tests/mpi/Makefile
2419 lustre/utils/Makefile
2421 case $lb_target_os in
2423 AC_CONFIG_FILES([ lustre/obdclass/darwin/Makefile ])