4 # Wrapper for AC_CONFIG_SUBDIR
6 AC_DEFUN([LC_CONFIG_SRCDIR],
7 [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],
50 # LC_CONFIG_OBD_BUFFER_SIZE
52 # the maximum buffer size of lctl ioctls
54 AC_DEFUN([LC_CONFIG_OBD_BUFFER_SIZE],
55 [AC_MSG_CHECKING([maximum OBD ioctl size])
56 AC_ARG_WITH([obd-buffer-size],
57 AC_HELP_STRING([--with-obd-buffer-size=[size]],
58 [set lctl ioctl maximum bytes (default=8192)]),
60 OBD_BUFFER_SIZE=$with_obd_buffer_size
64 AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
65 AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
71 AC_DEFUN([LC_READLINK_SSIZE_T],
72 [AC_MSG_CHECKING([if readlink returns ssize_t])
76 ssize_t readlink(const char *, char *, size_t);
79 AC_DEFINE(HAVE_POSIX_1003_READLINK, 1, [readlink returns ssize_t])
86 # LC_FUNC_DEV_SET_RDONLY
88 # check whether dev_set_rdonly is exported. This is needed until we
89 # have another mechanism to fence IO from the underlying device.
91 AC_DEFUN([LC_FUNC_DEV_SET_RDONLY],
92 [LB_CHECK_SYMBOL_EXPORT([dev_set_rdonly],
93 [block/ll_rw_block.c,block/blk-core.c],[
94 AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel exports dev_set_rdonly])
96 AC_MSG_WARN([kernel missing dev_set_rdonly patch for testing])
101 # Ensure stack size big than 8k in Lustre server (all kernels)
103 AC_DEFUN([LC_STACK_SIZE],
104 [AC_MSG_CHECKING([stack size big than 8k])
105 LB_LINUX_TRY_COMPILE([
106 #include <linux/thread_info.h>
108 #if THREAD_SIZE < 8192
109 #error "stack size < 8192"
114 AC_MSG_ERROR([Lustre requires that Linux is configured with at least a 8KB stack.])
119 # Allow the user to set the MDS thread upper limit
121 AC_DEFUN([LC_MDS_MAX_THREADS],
123 AC_ARG_WITH([mds_max_threads],
124 AC_HELP_STRING([--with-mds-max-threads=size],
125 [define the maximum number of threads available on the MDS: (default=512)]),
127 MDS_THREAD_COUNT=$with_mds_max_threads
128 AC_DEFINE_UNQUOTED(MDT_MAX_THREADS, $MDS_THREAD_COUNT, [maximum number of mdt threads])
135 # the pinger is temporary, until we have the recovery node in place
137 AC_DEFUN([LC_CONFIG_PINGER],
138 [AC_MSG_CHECKING([whether to enable pinger support])
139 AC_ARG_ENABLE([pinger],
140 AC_HELP_STRING([--disable-pinger],
141 [disable recovery pinger support]),
142 [],[enable_pinger='yes'])
143 AC_MSG_RESULT([$enable_pinger])
144 if test x$enable_pinger != xno ; then
145 AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
152 # do checksum of bulk data between client and OST
154 AC_DEFUN([LC_CONFIG_CHECKSUM],
155 [AC_MSG_CHECKING([whether to enable data checksum support])
156 AC_ARG_ENABLE([checksum],
157 AC_HELP_STRING([--disable-checksum],
158 [disable data checksum support]),
159 [],[enable_checksum='yes'])
160 AC_MSG_RESULT([$enable_checksum])
161 if test x$enable_checksum != xno ; then
162 AC_DEFINE(ENABLE_CHECKSUM, 1, do data checksums)
167 # LC_CONFIG_LIBLUSTRE_RECOVERY
169 AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY],
170 [AC_MSG_CHECKING([whether to enable liblustre recovery support])
171 AC_ARG_ENABLE([liblustre-recovery],
172 AC_HELP_STRING([--disable-liblustre-recovery],
173 [disable liblustre recovery support]),
174 [],[enable_liblustre_recovery='yes'])
175 AC_MSG_RESULT([$enable_liblustre_recovery])
176 if test x$enable_liblustre_recovery != xno ; then
177 AC_DEFINE(ENABLE_LIBLUSTRE_RECOVERY, 1, Liblustre Can Recover)
182 # LC_CONFIG_HEALTH_CHECK_WRITE
184 # Turn off the actual write to the disk
186 AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE],
187 [AC_MSG_CHECKING([whether to enable a write with the health check])
188 AC_ARG_ENABLE([health_write],
189 AC_HELP_STRING([--enable-health_write],
190 [enable disk writes when doing health check]),
191 [],[enable_health_write='no'])
192 AC_MSG_RESULT([$enable_health_write])
193 if test x$enable_health_write != xno ; then
194 AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, Write when Checking Health)
198 AC_DEFUN([LC_CONFIG_LRU_RESIZE],
199 [AC_MSG_CHECKING([whether to enable lru self-adjusting])
200 AC_ARG_ENABLE([lru_resize],
201 AC_HELP_STRING([--enable-lru-resize],
202 [enable lru resize support]),
203 [],[enable_lru_resize='yes'])
204 AC_MSG_RESULT([$enable_lru_resize])
205 if test x$enable_lru_resize != xno; then
206 AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])
211 # Quota support. The kernel must support CONFIG_QUOTA.
213 AC_DEFUN([LC_QUOTA_CONFIG],
214 [LB_LINUX_CONFIG_IM([QUOTA],[AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [support quota])],[
215 AC_MSG_ERROR([Lustre quota requires that CONFIG_QUOTA is enabled in your kernel.])
219 # truncate_complete_page() was exported from RHEL5/SLES10, but not in SLES11 SP0 (2.6.27)
220 # remove_from_page_cache() was exported between 2.6.35 and 2.6.38
221 # delete_from_page_cache() is exported from 2.6.39
222 AC_DEFUN([LC_EXPORT_TRUNCATE_COMPLETE],
223 [LB_CHECK_SYMBOL_EXPORT([truncate_complete_page],
225 [AC_DEFINE(HAVE_TRUNCATE_COMPLETE_PAGE, 1,
226 [kernel export truncate_complete_page])])
227 LB_CHECK_SYMBOL_EXPORT([remove_from_page_cache],
229 [AC_DEFINE(HAVE_REMOVE_FROM_PAGE_CACHE, 1,
230 [kernel export remove_from_page_cache])])
231 LB_CHECK_SYMBOL_EXPORT([delete_from_page_cache],
233 [AC_DEFINE(HAVE_DELETE_FROM_PAGE_CACHE, 1,
234 [kernel export delete_from_page_cache])])
237 AC_DEFUN([LC_EXPORT_D_REHASH_COND],
238 [LB_CHECK_SYMBOL_EXPORT([d_rehash_cond],
240 AC_DEFINE(HAVE_D_REHASH_COND, 1,
241 [d_rehash_cond is exported by the kernel])
246 AC_DEFUN([LC_EXPORT___D_REHASH],
247 [LB_CHECK_SYMBOL_EXPORT([__d_rehash],
249 AC_DEFINE(HAVE___D_REHASH, 1,
250 [__d_rehash is exported by the kernel])
255 # The actual symbol exported varies among architectures, so we need
256 # to check many symbols (but only in the current architecture.) No
257 # matter what symbol is exported, the kernel #defines node_to_cpumask
258 # to the appropriate function and that's what we use.
259 AC_DEFUN([LC_EXPORT_NODE_TO_CPUMASK],
260 [LB_CHECK_SYMBOL_EXPORT([node_to_cpumask],
261 [arch/$LINUX_ARCH/mm/numa.c],
262 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
263 [node_to_cpumask is exported by
264 the kernel])]) # x86_64
265 LB_CHECK_SYMBOL_EXPORT([node_to_cpu_mask],
266 [arch/$LINUX_ARCH/kernel/smpboot.c],
267 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
268 [node_to_cpumask is exported by
269 the kernel])]) # ia64
270 LB_CHECK_SYMBOL_EXPORT([node_2_cpu_mask],
271 [arch/$LINUX_ARCH/kernel/smpboot.c],
272 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
273 [node_to_cpumask is exported by
274 the kernel])]) # i386
279 # between 2.6.5 - 2.6.22 filemap_populate is exported in some kernels
281 AC_DEFUN([LC_FILEMAP_POPULATE],
282 [AC_MSG_CHECKING([for exported filemap_populate])
283 LB_LINUX_TRY_COMPILE([
284 #include <asm/page.h>
285 #include <linux/mm.h>
287 filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0);
290 AC_DEFINE(HAVE_FILEMAP_POPULATE, 1, [Kernel exports filemap_populate])
299 AC_DEFUN([LC_BIT_SPINLOCK_H],
300 [LB_CHECK_FILE([$LINUX/include/linux/bit_spinlock.h],[
301 AC_MSG_CHECKING([if bit_spinlock.h can be compiled])
302 LB_LINUX_TRY_COMPILE([
303 #include <asm/processor.h>
304 #include <linux/spinlock.h>
305 #include <linux/bit_spinlock.h>
308 AC_DEFINE(HAVE_BIT_SPINLOCK_H, 1, [Kernel has bit_spinlock.h])
319 AC_DEFUN([LC_CONST_ACL_SIZE],
320 [AC_MSG_CHECKING([calc acl size])
322 CFLAGS="$CFLAGS -I$LINUX/include -I$LINUX_OBJ/include -I$LINUX_OBJ/include2 -I$LINUX/arch/`uname -m|sed -e 's/ppc.*/powerpc/' -e 's/x86_64/x86/' -e 's/i.86/x86/'`/include -include $AUTOCONF_HDIR/autoconf.h $EXTRA_KCFLAGS"
325 #include <linux/types.h>
328 #define __LINUX_POSIX_ACL_H
330 #ifdef CONFIG_FS_POSIX_ACL
331 # include <linux/posix_acl_xattr.h>
338 /* LUSTRE_POSIX_ACL_MAX_ENTRIES = 32 */
339 int size = posix_acl_xattr_size(32);
340 FILE *f = fopen("acl.size","w+");
341 fprintf(f,"%d", size);
347 acl_size=`cat acl.size`
348 AC_MSG_RESULT([ACL size $acl_size])
349 AC_DEFINE_UNQUOTED(XATTR_ACL_SIZE, AS_TR_SH([$acl_size]), [size of xattr acl])
351 AC_ERROR([ACL size can't be computed])
353 AC_MSG_RESULT([can't check ACL size, make it 260])
354 AC_DEFINE_UNQUOTED(XATTR_ACL_SIZE,260)
362 AC_DEFUN([LC_CAPA_CRYPTO],
363 [LB_LINUX_CONFIG_IM([CRYPTO],[],[
364 AC_MSG_ERROR([Lustre capability require that CONFIG_CRYPTO is enabled in your kernel.])
366 LB_LINUX_CONFIG_IM([CRYPTO_HMAC],[],[
367 AC_MSG_ERROR([Lustre capability require that CONFIG_CRYPTO_HMAC is enabled in your kernel.])
369 LB_LINUX_CONFIG_IM([CRYPTO_SHA1],[],[
370 AC_MSG_ERROR([Lustre capability require that CONFIG_CRYPTO_SHA1 is enabled in your kernel.])
375 # LC_CONFIG_RMTCLIENT
378 dnl the AES symbol usually tied with arch, e.g. CRYPTO_AES_586
380 AC_DEFUN([LC_CONFIG_RMTCLIENT],
381 [LB_LINUX_CONFIG_IM([CRYPTO_AES],[],[
382 AC_MSG_WARN([Lustre remote client require that CONFIG_CRYPTO_AES is enabled in your kernel.])
387 # LC_CONFIG_GSS_KEYRING (default enabled, if gss is enabled)
389 AC_DEFUN([LC_CONFIG_GSS_KEYRING],
390 [AC_MSG_CHECKING([whether to enable gss keyring backend])
391 AC_ARG_ENABLE([gss_keyring],
392 [AC_HELP_STRING([--disable-gss-keyring],
393 [disable gss keyring backend])],
394 [],[enable_gss_keyring='yes'])
395 AC_MSG_RESULT([$enable_gss_keyring])
397 if test x$enable_gss_keyring != xno; then
398 LB_LINUX_CONFIG_IM([KEYS],[],
399 [AC_MSG_ERROR([GSS keyring backend require that CONFIG_KEYS be enabled in your kernel.])])
401 AC_CHECK_LIB([keyutils], [keyctl_search], [],
402 [AC_MSG_ERROR([libkeyutils is not found, which is required by gss keyring backend])],)
404 AC_DEFINE([HAVE_GSS_KEYRING], [1],
405 [Define this if you enable gss keyring backend])
409 AC_DEFUN([LC_CONFIG_SUNRPC],
410 [LB_LINUX_CONFIG_IM([SUNRPC],[],
411 [AC_MSG_ERROR([kernel SUNRPC support is required by using GSS.])])
415 # LC_CONFIG_GSS (default disabled)
417 # Build gss and related tools of Lustre. Currently both kernel and user space
418 # parts are depend on linux platform.
420 AC_DEFUN([LC_CONFIG_GSS],
421 [AC_MSG_CHECKING([whether to enable gss/krb5 support])
423 [AC_HELP_STRING([--enable-gss], [enable gss/krb5 support])],
424 [],[enable_gss='no'])
425 AC_MSG_RESULT([$enable_gss])
427 if test x$enable_gss == xyes; then
428 LC_CONFIG_GSS_KEYRING
431 AC_DEFINE([HAVE_GSS], [1], [Define this if you enable gss])
433 LB_LINUX_CONFIG_IM([CRYPTO_MD5],[],
434 [AC_MSG_WARN([kernel MD5 support is recommended by using GSS.])])
435 LB_LINUX_CONFIG_IM([CRYPTO_SHA1],[],
436 [AC_MSG_WARN([kernel SHA1 support is recommended by using GSS.])])
437 LB_LINUX_CONFIG_IM([CRYPTO_SHA256],[],
438 [AC_MSG_WARN([kernel SHA256 support is recommended by using GSS.])])
439 LB_LINUX_CONFIG_IM([CRYPTO_SHA512],[],
440 [AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
442 AC_CHECK_LIB([gssapi], [gss_init_sec_context],
443 [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi"],
444 [AC_CHECK_LIB([gssglue], [gss_init_sec_context],
445 [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssglue"],
446 [AC_MSG_ERROR([libgssapi or libgssglue is not found, which is required by GSS.])])],)
448 AC_SUBST(GSSAPI_LIBS)
454 AC_DEFUN([LC_TASK_CLENV_STORE],
456 AC_MSG_CHECKING([if we can store cl_env in task_struct])
457 if test x$have_task_clenv_store != xyes ; then
458 LC_TASK_CLENV_TUX_INFO
464 # ~2.6.12 merge patch from oracle to convert tree_lock from spinlock to rwlock
465 # yet tree_lock is converted from rwlock to spin_lock since v2.6.26
466 AC_DEFUN([LC_RW_TREE_LOCK],
467 [AC_MSG_CHECKING([if kernel has tree_lock as rwlock])
468 tmp_flags="$EXTRA_KCFLAGS"
469 EXTRA_KCFLAGS="-Werror"
470 LB_LINUX_TRY_COMPILE([
471 #include <linux/fs.h>
473 struct address_space a;
475 write_lock(&a.tree_lock);
478 AC_DEFINE(HAVE_RW_TREE_LOCK, 1, [kernel has tree_lock as rw_lock])
482 EXTRA_KCFLAGS="$tmp_flags"
487 # LC_UMOUNTBEGIN_HAS_VFSMOUNT
488 # 2.6.18~2.6.25 umount_begin has different parameters
489 AC_DEFUN([LC_UMOUNTBEGIN_HAS_VFSMOUNT],
490 [AC_MSG_CHECKING([if umount_begin needs vfsmount parameter instead of super_block])
491 tmp_flags="$EXTRA_KCFLAGS"
492 EXTRA_KCFLAGS="-Werror"
493 LB_LINUX_TRY_COMPILE([
494 #include <linux/fs.h>
497 static void cfg_umount_begin (struct vfsmount *v, int flags)
502 static struct super_operations cfg_super_operations = {
503 .umount_begin = cfg_umount_begin,
506 cfg_super_operations.umount_begin(NULL,0);
509 AC_DEFINE(HAVE_UMOUNTBEGIN_VFSMOUNT, 1,
510 [Define umount_begin need second argument])
514 EXTRA_KCFLAGS="$tmp_flags"
517 #2.6.18 + RHEL5 (fc6)
519 # RHEL5 in FS-cache patch rename PG_checked flag into PG_fs_misc
520 AC_DEFUN([LC_PG_FS_MISC],
521 [AC_MSG_CHECKING([kernel has PG_fs_misc])
522 LB_LINUX_TRY_COMPILE([
523 #include <linux/mm.h>
524 #include <linux/page-flags.h>
527 #error PG_fs_misc not defined in kernel
531 AC_DEFINE(HAVE_PG_FS_MISC, 1,
532 [is kernel have PG_fs_misc])
538 # RHEL5 PageChecked and SetPageChecked defined
539 AC_DEFUN([LC_PAGE_CHECKED],
540 [AC_MSG_CHECKING([kernel has PageChecked and SetPageChecked])
541 LB_LINUX_TRY_COMPILE([
542 #include <linux/mm.h>
543 #ifdef HAVE_LINUX_MMTYPES_H
544 #include <linux/mm_types.h>
546 #include <linux/page-flags.h>
548 struct page *p = NULL;
550 /* before 2.6.26 this define*/
552 /* 2.6.26 use function instead of define for it */
558 AC_DEFINE(HAVE_PAGE_CHECKED, 1,
559 [does kernel have PageChecked and SetPageChecked])
568 # If we have fiemap.h
569 # after 2.6.27 use fiemap.h in include/linux
571 AC_DEFUN([LC_LINUX_FIEMAP_H],
572 [LB_CHECK_FILE([$LINUX/include/linux/fiemap.h],[
573 AC_MSG_CHECKING([if fiemap.h can be compiled])
574 LB_LINUX_TRY_COMPILE([
575 #include <linux/types.h>
576 #include <linux/fiemap.h>
579 AC_DEFINE(HAVE_LINUX_FIEMAP_H, 1, [Kernel has fiemap.h])
590 # inode don't have i_blksize field
591 AC_DEFUN([LC_INODE_BLKSIZE],
592 [AC_MSG_CHECKING([inode has i_blksize field])
593 LB_LINUX_TRY_COMPILE([
594 #include <linux/fs.h>
600 AC_DEFINE(HAVE_INODE_BLKSIZE, 1,
601 [struct inode has i_blksize field])
608 # 2.6.19 replaced writev with aio_write
609 AC_DEFUN([LC_FILE_WRITEV],
610 [AC_MSG_CHECKING([writev in fops])
611 LB_LINUX_TRY_COMPILE([
612 #include <linux/fs.h>
614 struct file_operations *fops = NULL;
618 AC_DEFINE(HAVE_FILE_WRITEV, 1,
626 # 2.6.19 replaced readv with aio_read
627 AC_DEFUN([LC_FILE_READV],
628 [AC_MSG_CHECKING([readv in fops])
629 LB_LINUX_TRY_COMPILE([
630 #include <linux/fs.h>
632 struct file_operations *fops = NULL;
636 AC_DEFINE(HAVE_FILE_READV, 1,
645 # LC_CANCEL_DIRTY_PAGE
646 # 2.6.20 introduced cancel_dirty_page instead of clear_page_dirty.
647 AC_DEFUN([LC_CANCEL_DIRTY_PAGE],
648 [AC_MSG_CHECKING([kernel has cancel_dirty_page])
649 # the implementation of cancel_dirty_page in OFED 1.4.1's SLES10 SP2
650 # backport is broken, so ignore it
651 if test -f $OFED_BACKPORT_PATH/linux/mm.h &&
652 test "$(sed -ne '/^static inline void cancel_dirty_page(struct page \*page, unsigned int account_size)$/,/^}$/p' $OFED_BACKPORT_PATH/linux/mm.h | md5sum)" = "c518cb32d6394760c5bca14cb7538d3e -"; then
655 LB_LINUX_TRY_COMPILE([
656 #include <linux/mm.h>
657 #include <linux/page-flags.h>
659 cancel_dirty_page(NULL, 0);
662 AC_DEFINE(HAVE_CANCEL_DIRTY_PAGE, 1,
663 [kernel has cancel_dirty_page instead of clear_page_dirty])
670 # raid5-zerocopy patch
675 # In order to support raid5 zerocopy patch, we have to patch the kernel to make
676 # it support constant page, which means the page won't be modified during the
679 AC_DEFUN([LC_PAGE_CONSTANT],
680 [AC_MSG_CHECKING([if kernel have PageConstant defined])
681 LB_LINUX_TRY_COMPILE([
682 #include <linux/mm.h>
683 #include <linux/page-flags.h>
686 #error "Have no raid5 zcopy patch"
690 AC_DEFINE(HAVE_PAGE_CONSTANT, 1, [kernel have PageConstant supported])
698 # 2.6.22 lost second parameter for invalidate_bdev
699 AC_DEFUN([LC_INVALIDATE_BDEV_2ARG],
700 [AC_MSG_CHECKING([if invalidate_bdev has second argument])
701 LB_LINUX_TRY_COMPILE([
702 #include <linux/buffer_head.h>
704 invalidate_bdev(NULL,0);
707 AC_DEFINE(HAVE_INVALIDATE_BDEV_2ARG, 1,
708 [invalidate_bdev has second argument])
715 # check for crypto API
717 AC_DEFUN([LC_ASYNC_BLOCK_CIPHER],
718 [AC_MSG_CHECKING([if kernel has block cipher support])
719 LB_LINUX_TRY_COMPILE([
720 #include <linux/err.h>
721 #include <linux/crypto.h>
723 struct crypto_blkcipher *tfm;
724 tfm = crypto_alloc_blkcipher("aes", 0, sizeof(tfm) );
727 AC_DEFINE(HAVE_ASYNC_BLOCK_CIPHER, 1, [kernel has block cipher support])
734 # check for struct hash_desc
736 AC_DEFUN([LC_STRUCT_HASH_DESC],
737 [AC_MSG_CHECKING([if kernel has struct hash_desc])
738 LB_LINUX_TRY_COMPILE([
739 #include <linux/err.h>
740 #include <linux/crypto.h>
742 struct hash_desc foo __attribute__ ((unused));
745 AC_DEFINE(HAVE_STRUCT_HASH_DESC, 1, [kernel has struct hash_desc])
752 # check for struct blkcipher_desc
754 AC_DEFUN([LC_STRUCT_BLKCIPHER_DESC],
755 [AC_MSG_CHECKING([if kernel has struct blkcipher_desc])
756 LB_LINUX_TRY_COMPILE([
757 #include <linux/err.h>
758 #include <linux/crypto.h>
760 struct blkcipher_desc foo __attribute__ ((unused));
763 AC_DEFINE(HAVE_STRUCT_BLKCIPHER_DESC, 1, [kernel has struct blkcipher_desc])
770 # 2.6.19 check for FS_RENAME_DOES_D_MOVE flag
772 AC_DEFUN([LC_FS_RENAME_DOES_D_MOVE],
773 [AC_MSG_CHECKING([if kernel has FS_RENAME_DOES_D_MOVE flag])
774 LB_LINUX_TRY_COMPILE([
775 #include <linux/fs.h>
777 int v __attribute__ ((unused));
778 v = FS_RENAME_DOES_D_MOVE;
781 AC_DEFINE(HAVE_FS_RENAME_DOES_D_MOVE, 1, [kernel has FS_RENAME_DOES_D_MOVE flag])
789 # 2.6.23 have return type 'void' for unregister_blkdev
790 AC_DEFUN([LC_UNREGISTER_BLKDEV_RETURN_INT],
791 [AC_MSG_CHECKING([if unregister_blkdev return int])
792 LB_LINUX_TRY_COMPILE([
793 #include <linux/fs.h>
795 int i __attribute__ ((unused));
796 i = unregister_blkdev(0,NULL);
799 AC_DEFINE(HAVE_UNREGISTER_BLKDEV_RETURN_INT, 1,
800 [unregister_blkdev return int])
806 # 2.6.23 change .sendfile to .splice_read
807 AC_DEFUN([LC_KERNEL_SPLICE_READ],
808 [AC_MSG_CHECKING([if kernel has .splice_read])
809 LB_LINUX_TRY_COMPILE([
810 #include <linux/fs.h>
812 struct file_operations file;
814 file.splice_read = NULL;
817 AC_DEFINE(HAVE_KERNEL_SPLICE_READ, 1,
818 [kernel has .slice_read])
824 # 2.6.23 change .sendfile to .splice_read
825 # RHEL4 (-92 kernel) have both sendfile and .splice_read API
826 AC_DEFUN([LC_KERNEL_SENDFILE],
827 [AC_MSG_CHECKING([if kernel has .sendfile])
828 LB_LINUX_TRY_COMPILE([
829 #include <linux/fs.h>
831 struct file_operations file;
833 file.sendfile = NULL;
836 AC_DEFINE(HAVE_KERNEL_SENDFILE, 1,
837 [kernel has .sendfile])
843 # 2.6.23 extract nfs export related data into exportfs.h
844 AC_DEFUN([LC_HAVE_EXPORTFS_H],
845 [LB_CHECK_FILE([$LINUX/include/linux/exportfs.h], [
846 AC_DEFINE(HAVE_LINUX_EXPORTFS_H, 1,
847 [kernel has include/exportfs.h])
853 # 2.6.23 has new page fault handling API
854 AC_DEFUN([LC_VM_OP_FAULT],
855 [AC_MSG_CHECKING([kernel has .fault in vm_operation_struct])
856 LB_LINUX_TRY_COMPILE([
857 #include <linux/mm.h>
859 struct vm_operations_struct op;
864 AC_DEFINE(HAVE_VM_OP_FAULT, 1,
865 [kernel has .fault in vm_operation_struct])
871 # 2.6.23 add code to wait other users to complete before removing procfs entry
872 AC_DEFUN([LC_PROCFS_USERS],
873 [AC_MSG_CHECKING([if kernel has pde_users member in procfs entry struct])
874 LB_LINUX_TRY_COMPILE([
875 #include <linux/proc_fs.h>
877 struct proc_dir_entry pde;
882 AC_DEFINE(HAVE_PROCFS_USERS, 1,
883 [kernel has pde_users member in procfs entry struct])
885 LB_LINUX_TRY_COMPILE([
886 #include "$LINUX/fs/proc/internal.h"
888 struct proc_dir_entry_aux pde_aux;
890 pde_aux.pde_users = 0;
893 AC_DEFINE(HAVE_PROCFS_USERS, 1,
894 [kernel has pde_users member in proc_dir_entry_aux])
901 # 2.6.23 exports exportfs_decode_fh
902 AC_DEFUN([LC_EXPORTFS_DECODE_FH],
903 [LB_CHECK_SYMBOL_EXPORT([exportfs_decode_fh],
904 [fs/exportfs/expfs.c],[
905 AC_DEFINE(HAVE_EXPORTFS_DECODE_FH, 1,
906 [exportfs_decode_fh has been export])
913 # 2.6.24 need linux/mm_types.h included
914 AC_DEFUN([LC_HAVE_MMTYPES_H],
915 [LB_CHECK_FILE([$LINUX/include/linux/mm_types.h], [
916 AC_DEFINE(HAVE_LINUX_MMTYPES_H, 1,
917 [kernel has include/mm_types.h])
923 # 2.6.24 has bio_endio with 2 args
924 AC_DEFUN([LC_BIO_ENDIO_2ARG],
925 [AC_MSG_CHECKING([if kernel has bio_endio with 2 args])
926 LB_LINUX_TRY_COMPILE([
927 #include <linux/bio.h>
932 AC_DEFINE(HAVE_BIO_ENDIO_2ARG, 1,
933 [kernel has bio_endio with 2 args])
939 # 2.6.24 has new members in exports struct.
940 AC_DEFUN([LC_FH_TO_DENTRY],
941 [AC_MSG_CHECKING([if kernel has .fh_to_dentry member in export_operations struct])
942 LB_LINUX_TRY_COMPILE([
943 #include <linux/fs.h>
944 #ifdef HAVE_LINUX_EXPORTFS_H
945 #include <linux/exportfs.h>
948 do{ }while(sizeof(((struct export_operations *)0)->fh_to_dentry));
951 AC_DEFINE(HAVE_FH_TO_DENTRY, 1,
952 [kernel has .fh_to_dentry member in export_operations struct])
958 # 2.6.24 removes long aged procfs entry -> deleted member
959 AC_DEFUN([LC_PROCFS_DELETED],
960 [AC_MSG_CHECKING([if kernel has deleted member in procfs entry struct])
961 LB_LINUX_TRY_COMPILE([
962 #include <linux/proc_fs.h>
964 struct proc_dir_entry pde;
966 pde.deleted = sizeof(pde);
969 AC_DEFINE(HAVE_PROCFS_DELETED, 1,
970 [kernel has deleted member in procfs entry struct])
976 # 2.6.24 has bdi_init()/bdi_destroy() functions.
977 AC_DEFUN([LC_EXPORT_BDI_INIT],
978 [LB_CHECK_SYMBOL_EXPORT([bdi_init],
980 AC_DEFINE(HAVE_BDI_INIT, 1,
981 [bdi_init/bdi_destroy functions are present])
988 # 2.6.26 isn't export set_fs_pwd and change paramter in fs struct
989 AC_DEFUN([LC_FS_STRUCT_USE_PATH],
990 [AC_MSG_CHECKING([fs_struct use path structure])
991 LB_LINUX_TRY_COMPILE([
992 #include <asm/atomic.h>
993 #include <linux/spinlock.h>
994 #include <linux/fs_struct.h>
998 fs.pwd = *((struct path *)sizeof(fs));
1000 AC_MSG_RESULT([yes])
1001 AC_DEFINE(HAVE_FS_STRUCT_USE_PATH, 1,
1002 [fs_struct use path structure])
1013 # LC_SECURITY_PLUG # for SLES10 SP2 (2.6.27)
1014 # check security plug in sles10 sp2 kernel
1015 AC_DEFUN([LC_SECURITY_PLUG],
1016 [AC_MSG_CHECKING([If kernel has security plug support])
1017 LB_LINUX_TRY_COMPILE([
1018 #include <linux/fs.h>
1019 #include <linux/stddef.h>
1021 notify_change(NULL, NULL, NULL);
1024 AC_DEFINE(HAVE_SECURITY_PLUG, 1,
1025 [SLES10 SP2 use extra parameter in vfs])
1031 AC_DEFUN([LC_PGMKWRITE_USE_VMFAULT],
1032 [AC_MSG_CHECKING([kernel .page_mkwrite uses struct vm_fault *])
1033 tmp_flags="$EXTRA_KCFLAGS"
1034 EXTRA_KCFLAGS="-Werror"
1035 LB_LINUX_TRY_COMPILE([
1036 #include <linux/mm.h>
1038 ((struct vm_operations_struct *)0)->page_mkwrite((struct vm_area_struct *)0, (struct vm_fault *)0);
1040 AC_MSG_RESULT([yes])
1041 AC_DEFINE(HAVE_PGMKWRITE_USE_VMFAULT, 1,
1042 [kernel vm_operation_struct.page_mkwrite uses struct vm_fault * as second parameter])
1046 EXTRA_KCFLAGS="$tmp_flags"
1049 AC_DEFUN([LC_INODE_PERMISION_2ARGS],
1050 [AC_MSG_CHECKING([inode_operations->permission has two args])
1051 LB_LINUX_TRY_COMPILE([
1052 #include <linux/fs.h>
1054 struct inode *inode __attribute__ ((unused));
1057 inode->i_op->permission(NULL, 0);
1059 AC_DEFINE(HAVE_INODE_PERMISION_2ARGS, 1,
1060 [inode_operations->permission has two args])
1061 AC_MSG_RESULT([yes])
1067 # 2.6.27 has file_remove_suid instead of remove_suid
1068 AC_DEFUN([LC_FILE_REMOVE_SUID],
1069 [AC_MSG_CHECKING([kernel has file_remove_suid])
1070 LB_LINUX_TRY_COMPILE([
1071 #include <linux/fs.h>
1073 file_remove_suid(NULL);
1075 AC_DEFINE(HAVE_FILE_REMOVE_SUID, 1,
1076 [kernel have file_remove_suid])
1077 AC_MSG_RESULT([yes])
1083 # 2.6.27 have new page locking API
1084 AC_DEFUN([LC_TRYLOCKPAGE],
1085 [AC_MSG_CHECKING([kernel uses trylock_page for page lock])
1086 LB_LINUX_TRY_COMPILE([
1087 #include <linux/pagemap.h>
1091 AC_DEFINE(HAVE_TRYLOCK_PAGE, 1,
1092 [kernel uses trylock_page for page lock])
1093 AC_MSG_RESULT([yes])
1099 # 2.6.27 removed the read_inode from super_operations.
1100 AC_DEFUN([LC_READ_INODE_IN_SBOPS],
1101 [AC_MSG_CHECKING([super_operations has a read_inode field])
1102 LB_LINUX_TRY_COMPILE([
1103 #include <linux/fs.h>
1105 struct super_operations *sop;
1106 sop->read_inode(NULL);
1108 AC_DEFINE(HAVE_READ_INODE_IN_SBOPS, 1,
1109 [super_operations has a read_inode])
1110 AC_MSG_RESULT([yes])
1116 # 2.6.27 has inode_permission instead of permisson
1117 AC_DEFUN([LC_EXPORT_INODE_PERMISSION],
1118 [LB_CHECK_SYMBOL_EXPORT([inode_permission],
1120 AC_DEFINE(HAVE_EXPORT_INODE_PERMISSION, 1,
1121 [inode_permission is exported by the kernel])
1126 # 2.6.27 use 5th parameter in quota_on for remount.
1127 AC_DEFUN([LC_QUOTA_ON_5ARGS],
1128 [AC_MSG_CHECKING([quota_on needs 5 parameters])
1129 LB_LINUX_TRY_COMPILE([
1130 #include <linux/fs.h>
1131 #include <linux/quota.h>
1133 struct quotactl_ops *qop = NULL;
1134 qop->quota_on(NULL, 0, 0, NULL, 0);
1136 AC_DEFINE(HAVE_QUOTA_ON_5ARGS, 1,
1137 [quota_on needs 5 paramters])
1138 AC_MSG_RESULT([yes])
1144 # 2.6.27 use 3th parameter in quota_off for remount.
1145 AC_DEFUN([LC_QUOTA_OFF_3ARGS],
1146 [AC_MSG_CHECKING([quota_off needs 3 parameters])
1147 LB_LINUX_TRY_COMPILE([
1148 #include <linux/fs.h>
1149 #include <linux/quota.h>
1151 struct quotactl_ops *qop = NULL;
1152 qop->quota_off(NULL, 0, 0);
1154 AC_DEFINE(HAVE_QUOTA_OFF_3ARGS, 1,
1155 [quota_off needs 3 paramters])
1156 AC_MSG_RESULT([yes])
1162 # 2.6.27 has vfs_dq_off inline function.
1163 AC_DEFUN([LC_VFS_DQ_OFF],
1164 [AC_MSG_CHECKING([vfs_dq_off is defined])
1165 LB_LINUX_TRY_COMPILE([
1166 #include <linux/quotaops.h>
1168 vfs_dq_off(NULL, 0);
1170 AC_DEFINE(HAVE_VFS_DQ_OFF, 1, [vfs_dq_off is defined])
1171 AC_MSG_RESULT([yes])
1177 # LC_LOCK_MAP_ACQUIRE
1178 # after 2.6.27 lock_map_acquire replaces lock_acquire
1179 AC_DEFUN([LC_LOCK_MAP_ACQUIRE],
1180 [AC_MSG_CHECKING([if lock_map_acquire is defined])
1181 LB_LINUX_TRY_COMPILE([
1182 #include <linux/lockdep.h>
1184 lock_map_acquire(NULL);
1187 AC_DEFINE(HAVE_LOCK_MAP_ACQUIRE, 1,
1188 [lock_map_acquire is defined])
1194 # 2.6.27.15-2 sles11
1196 # 2.6.27 sles11 remove the bi_hw_segments
1197 AC_DEFUN([LC_BI_HW_SEGMENTS],
1198 [AC_MSG_CHECKING([struct bio has a bi_hw_segments field])
1199 LB_LINUX_TRY_COMPILE([
1200 #include <linux/bio.h>
1203 io.bi_hw_segments = sizeof(io);
1205 AC_DEFINE(HAVE_BI_HW_SEGMENTS, 1,
1206 [struct bio has a bi_hw_segments field])
1207 AC_MSG_RESULT([yes])
1214 # 2.6.27 sles11 move the quotaio_v1{2}.h from include/linux to fs
1215 # 2.6.32 move the quotaio_v1{2}.h from fs to fs/quota
1216 AC_DEFUN([LC_HAVE_QUOTAIO_H],
1217 [LB_CHECK_FILE([$LINUX/include/linux/quotaio_v2.h],[
1218 AC_DEFINE(HAVE_QUOTAIO_H, 1,
1219 [kernel has include/linux/quotaio_v2.h])
1220 ],[LB_CHECK_FILE([$LINUX/fs/quotaio_v2.h],[
1221 AC_DEFINE(HAVE_FS_QUOTAIO_H, 1,
1222 [kernel has fs/quotaio_v1.h])
1223 ],[LB_CHECK_FILE([$LINUX/fs/quota/quotaio_v2.h],[
1224 AC_DEFINE(HAVE_FS_QUOTA_QUOTAIO_H, 1,
1225 [kernel has fs/quota/quotaio_v2.h])
1233 # 2.6.27 sles11 has sb_any_quota_active
1234 AC_DEFUN([LC_SB_ANY_QUOTA_ACTIVE],
1235 [AC_MSG_CHECKING([Kernel has sb_any_quota_active])
1236 LB_LINUX_TRY_COMPILE([
1237 #include <linux/quotaops.h>
1239 sb_any_quota_active(NULL);
1241 AC_DEFINE(HAVE_SB_ANY_QUOTA_ACTIVE, 1,
1242 [Kernel has a sb_any_quota_active])
1243 AC_MSG_RESULT([yes])
1249 # 2.6.27 sles11 has sb_has_quota_active
1250 AC_DEFUN([LC_SB_HAS_QUOTA_ACTIVE],
1251 [AC_MSG_CHECKING([Kernel has sb_has_quota_active])
1252 LB_LINUX_TRY_COMPILE([
1253 #include <linux/quotaops.h>
1255 sb_has_quota_active(NULL, 0);
1257 AC_DEFINE(HAVE_SB_HAS_QUOTA_ACTIVE, 1,
1258 [Kernel has a sb_has_quota_active])
1259 AC_MSG_RESULT([yes])
1265 # 2.6.27 exported add_to_page_cache_lru.
1266 AC_DEFUN([LC_EXPORT_ADD_TO_PAGE_CACHE_LRU],
1267 [LB_CHECK_SYMBOL_EXPORT([add_to_page_cache_lru],
1269 AC_DEFINE(HAVE_ADD_TO_PAGE_CACHE_LRU, 1,
1270 [add_to_page_cache_lru functions are present])
1276 # 2.6.29 introduce sb_any_quota_loaded.
1278 AC_DEFUN([LC_SB_ANY_QUOTA_LOADED],
1279 [AC_MSG_CHECKING([Kernel has sb_any_quota_loaded])
1280 LB_LINUX_TRY_COMPILE([
1281 #include <linux/quotaops.h>
1283 sb_any_quota_loaded(NULL);
1285 AC_DEFINE(HAVE_SB_ANY_QUOTA_LOADED, 1,
1286 [Kernel has a sb_any_quota_loaded])
1287 AC_MSG_RESULT([yes])
1293 # 2.6.30 x86 node_to_cpumask has been removed. must use cpumask_of_node
1294 AC_DEFUN([LC_EXPORT_CPUMASK_OF_NODE],
1295 [LB_CHECK_SYMBOL_EXPORT([node_to_cpumask_map],
1296 [arch/$LINUX_ARCH/mm/numa.c],
1297 [AC_DEFINE(HAVE_CPUMASK_OF_NODE, 1,
1298 [node_to_cpumask_map is exported by
1299 the kernel])]) # x86_64
1302 # 2.6.31 replaces blk_queue_hardsect_size by blk_queue_logical_block_size function
1303 AC_DEFUN([LC_BLK_QUEUE_LOG_BLK_SIZE],
1304 [AC_MSG_CHECKING([if blk_queue_logical_block_size is defined])
1305 LB_LINUX_TRY_COMPILE([
1306 #include <linux/blkdev.h>
1308 blk_queue_logical_block_size(NULL, 0);
1311 AC_DEFINE(HAVE_BLK_QUEUE_LOG_BLK_SIZE, 1,
1312 [blk_queue_logical_block_size is defined])
1320 # 2.6.32 changes cache_detail's member cache_request to cache_upcall
1321 # in kernel commit bc74b4f5e63a09fb78e245794a0de1e5a2716bbe
1322 AC_DEFUN([LC_CACHE_UPCALL],
1323 [AC_MSG_CHECKING([if cache_detail has cache_upcall field])
1324 LB_LINUX_TRY_COMPILE([
1325 #include <linux/sunrpc/cache.h>
1327 struct cache_detail cd;
1328 cd.cache_upcall = NULL;
1331 AC_DEFINE(HAVE_CACHE_UPCALL, 1,
1332 [cache_detail has cache_upcall field])
1338 # 2.6.32 add a limits member in struct request_queue.
1339 AC_DEFUN([LC_REQUEST_QUEUE_LIMITS],
1340 [AC_MSG_CHECKING([if request_queue has a limits field])
1341 LB_LINUX_TRY_COMPILE([
1342 #include <linux/blkdev.h>
1344 struct request_queue rq;
1345 rq.limits.io_min = 0;
1348 AC_DEFINE(HAVE_REQUEST_QUEUE_LIMITS, 1,
1349 [request_queue has a limits field])
1355 # 2.6.32 has bdi_register() functions.
1356 AC_DEFUN([LC_EXPORT_BDI_REGISTER],
1357 [LB_CHECK_SYMBOL_EXPORT([bdi_register],
1358 [mm/backing-dev.c],[
1359 AC_DEFINE(HAVE_BDI_REGISTER, 1,
1360 [bdi_register function is present])
1365 # 2.6.32 add s_bdi for super block
1366 AC_DEFUN([LC_SB_BDI],
1367 [AC_MSG_CHECKING([if super_block has s_bdi field])
1368 LB_LINUX_TRY_COMPILE([
1369 #include <linux/fs.h>
1371 struct super_block sb;
1375 AC_DEFINE(HAVE_SB_BDI, 1,
1376 [super_block has s_bdi field])
1382 # 2.6.27.15-2 SuSE 11 sp0 kernels lack the name field for BDI
1383 AC_DEFUN([LC_BDI_NAME],
1384 [AC_MSG_CHECKING([if backing_device_info has name field])
1385 LB_LINUX_TRY_COMPILE([
1386 #include <linux/blkkdev.h>
1388 struct backing_dev_info bdi;
1392 AC_DEFINE(HAVE_BDI_NAME, 1,
1393 [backing_device_info has name field])
1399 # 2.6.32 removes blk_queue_max_sectors and add blk_queue_max_hw_sectors
1400 # check blk_queue_max_sectors and use it until disappear.
1401 AC_DEFUN([LC_BLK_QUEUE_MAX_SECTORS],
1402 [AC_MSG_CHECKING([if blk_queue_max_sectors is defined])
1403 LB_LINUX_TRY_COMPILE([
1404 #include <linux/blkdev.h>
1406 blk_queue_max_sectors(NULL, 0);
1409 AC_DEFINE(HAVE_BLK_QUEUE_MAX_SECTORS, 1,
1410 [blk_queue_max_sectors is defined])
1416 # 2.6.32 replaces 2 functions blk_queue_max_phys_segments and blk_queue_max_hw_segments by blk_queue_max_segments
1417 AC_DEFUN([LC_BLK_QUEUE_MAX_SEGMENTS],
1418 [AC_MSG_CHECKING([if blk_queue_max_segments is defined])
1419 LB_LINUX_TRY_COMPILE([
1420 #include <linux/blkdev.h>
1422 blk_queue_max_segments(NULL, 0);
1425 AC_DEFINE(HAVE_BLK_QUEUE_MAX_SEGMENTS, 1,
1426 [blk_queue_max_segments is defined])
1435 # Check if kernel has been patched for 64-bit quota limits support.
1436 # The upstream version of this patch in RHEL6 2.6.32 kernels introduces
1437 # the constant QFMT_VFS_V1 in include/linux/quota.h, so we can check for
1438 # that in the absence of quotaio_v1.h in the kernel headers.
1440 AC_DEFUN([LC_QUOTA64],[
1441 AC_MSG_CHECKING([if kernel has 64-bit quota limits support])
1442 tmp_flags="$EXTRA_KCFLAGS"
1443 EXTRA_KCFLAGS="-I$LINUX/fs"
1444 LB_LINUX_TRY_COMPILE([
1445 #include <linux/kernel.h>
1446 #include <linux/fs.h>
1447 #ifdef HAVE_QUOTAIO_H
1448 # include <linux/quotaio_v2.h>
1449 int versions[] = V2_INITQVERSIONS_R1;
1450 struct v2_disk_dqblk_r1 dqblk_r1;
1451 #elif defined(HAVE_FS_QUOTA_QUOTAIO_H)
1452 # include <quota/quotaio_v2.h>
1453 struct v2r1_disk_dqblk dqblk_r1;
1454 #elif defined(HAVE_FS_QUOTAIO_H)
1455 # include <quotaio_v2.h>
1456 struct v2r1_disk_dqblk dqblk_r1;
1458 #include <linux/quota.h>
1459 int ver = QFMT_VFS_V1;
1462 AC_DEFINE(HAVE_QUOTA64, 1, [have quota64])
1463 AC_MSG_RESULT([yes])
1465 LB_CHECK_FILE([$LINUX/include/linux/lustre_version.h],[
1466 AC_MSG_ERROR([You have got no 64-bit kernel quota support.])
1470 EXTRA_KCFLAGS=$tmp_flags
1473 # 2.6.32 set_cpus_allowed is no more defined if CONFIG_CPUMASK_OFFSTACK=yes
1474 AC_DEFUN([LC_SET_CPUS_ALLOWED],
1475 [AC_MSG_CHECKING([if kernel defines set_cpus_allowed])
1476 LB_LINUX_TRY_COMPILE(
1477 [#include <linux/sched.h>],
1478 [struct task_struct *p = NULL;
1479 cpumask_t mask = { { 0 } };
1480 (void) set_cpus_allowed(p, mask);],
1481 [AC_MSG_RESULT([yes])
1482 AC_DEFINE(HAVE_SET_CPUS_ALLOWED, 1,
1483 [set_cpus_allowed is exported by the kernel])],
1484 [AC_MSG_RESULT([no])] )])
1486 # 2.6.32 introduces selinux_is_enabled()
1487 AC_DEFUN([LC_SELINUX_IS_ENABLED],
1488 [AC_MSG_CHECKING([if selinux_is_enabled is available])
1489 LB_LINUX_TRY_COMPILE([
1490 #include <linux/selinux.h>
1492 selinux_is_enabled();
1494 AC_MSG_RESULT([yes])
1495 AC_DEFINE(HAVE_SELINUX_IS_ENABLED, 1,
1496 [selinux_is_enabled is defined])
1504 # starting from 2.6.28 kernel replaces d_alloc_anon() with
1505 # d_obtain_alias() for getting anonymous dentries
1506 # RHEL5(2.6.18) has d_obtain_alias but SLES11SP0(2.6.27) not
1508 AC_DEFUN([LC_D_OBTAIN_ALIAS],
1509 [AC_MSG_CHECKING([d_obtain_alias exist in kernel])
1510 LB_LINUX_TRY_COMPILE([
1511 #include <linux/dcache.h>
1513 d_obtain_alias(NULL);
1515 AC_DEFINE(HAVE_D_OBTAIN_ALIAS, 1,
1516 [d_obtain_alias exist in kernel])
1517 AC_MSG_RESULT([yes])
1524 # LC_EXPORT_GENERIC_ERROR_REMOVE_PAGE
1526 AC_DEFUN([LC_EXPORT_GENERIC_ERROR_REMOVE_PAGE],
1527 [LB_CHECK_SYMBOL_EXPORT(
1528 [generic_error_remove_page],
1530 [AC_DEFINE(HAS_GENERIC_ERROR_REMOVE_PAGE, 1,
1531 [kernel export generic_error_remove_page])],
1536 # 2.6.32 if kernel export access_process_vm().
1537 AC_DEFUN([LC_EXPORT_ACCESS_PROCESS_VM],
1538 [LB_CHECK_SYMBOL_EXPORT([access_process_vm],
1540 [AC_DEFINE(HAVE_ACCESS_PROCESS_VM, 1,
1541 [access_process_vm function is present])],
1547 # 2.6.36 fs_struct.lock use spinlock instead of rwlock.
1549 AC_DEFUN([LC_FS_STRUCT_RWLOCK],
1550 [AC_MSG_CHECKING([if fs_struct.lock use rwlock])
1551 LB_LINUX_TRY_COMPILE([
1552 #include <asm/atomic.h>
1553 #include <linux/spinlock.h>
1554 #include <linux/fs_struct.h>
1556 ((struct fs_struct *)0)->lock = (rwlock_t){ 0 };
1558 AC_DEFINE(HAVE_FS_STRUCT_RWLOCK, 1,
1559 [fs_struct.lock use rwlock])
1560 AC_MSG_RESULT([yes])
1567 # 2.6.36 super_operations add evict_inode method. it hybird of
1568 # delete_inode & clear_inode.
1570 AC_DEFUN([LC_SBOPS_EVICT_INODE],
1571 [AC_MSG_CHECKING([if super_operations.evict_inode exist])
1572 LB_LINUX_TRY_COMPILE([
1573 #include <linux/fs.h>
1575 ((struct super_operations *)0)->evict_inode(NULL);
1577 AC_DEFINE(HAVE_SBOPS_EVICT_INODE, 1,
1578 [super_operations.evict_inode() is exist in kernel])
1579 AC_MSG_RESULT([yes])
1586 # 2.6.35 file_operations.fsync taken 2 arguments.
1587 # 3.0.0 file_operations.fsync takes 4 arguments.
1589 AC_DEFUN([LC_FILE_FSYNC],
1590 [AC_MSG_CHECKING([if file_operations.fsync takes 4 or 2 arguments])
1591 LB_LINUX_TRY_COMPILE([
1592 #include <linux/fs.h>
1594 ((struct file_operations *)0)->fsync(NULL, 0, 0, 0);
1596 AC_DEFINE(HAVE_FILE_FSYNC_4ARGS, 1,
1597 [file_operations.fsync takes 4 arguments])
1598 AC_MSG_RESULT([yes, 4 args])
1600 LB_LINUX_TRY_COMPILE([
1601 #include <linux/fs.h>
1603 ((struct file_operations *)0)->fsync(NULL, 0);
1605 AC_DEFINE(HAVE_FILE_FSYNC_2ARGS, 1,
1606 [file_operations.fsync takes 2 arguments])
1607 AC_MSG_RESULT([yes, 2 args])
1615 # 2.6.37 remove kernel_locked
1617 AC_DEFUN([LC_KERNEL_LOCKED],
1618 [AC_MSG_CHECKING([if kernel_locked is defined])
1619 LB_LINUX_TRY_COMPILE([
1620 #include <linux/smp_lock.h>
1624 AC_MSG_RESULT([yes])
1625 AC_DEFINE(HAVE_KERNEL_LOCKED, 1,
1626 [kernel_locked is defined])
1633 # 2.6.38 dentry_operations.d_compare() taken 7 arguments.
1635 AC_DEFUN([LC_D_COMPARE_7ARGS],
1636 [AC_MSG_CHECKING([if d_compare taken 7 arguments])
1637 LB_LINUX_TRY_COMPILE([
1638 #include <linux/dcache.h>
1640 ((struct dentry_operations*)0)->d_compare(NULL,NULL,NULL,NULL,0,NULL,NULL);
1642 AC_DEFINE(HAVE_D_COMPARE_7ARGS, 1,
1643 [d_compare need 7 arguments])
1644 AC_MSG_RESULT([yes])
1651 # 2.6.38 dentry_operations.d_delete() defined 'const' for 1st parameter.
1653 AC_DEFUN([LC_D_DELETE_CONST],
1654 [AC_MSG_CHECKING([if d_delete has const declare on first parameter])
1655 tmp_flags="$EXTRA_KCFLAGS"
1656 EXTRA_KCFLAGS="-Werror"
1657 LB_LINUX_TRY_COMPILE([
1658 #include <linux/dcache.h>
1660 const struct dentry *d = NULL;
1661 ((struct dentry_operations*)0)->d_delete(d);
1663 AC_DEFINE(HAVE_D_DELETE_CONST, const,
1664 [d_delete first parameter declared const])
1665 AC_MSG_RESULT([yes])
1667 AC_DEFINE(HAVE_D_DELETE_CONST, , [])
1670 EXTRA_KCFLAGS="$tmp_flags"
1674 # 2.6.38 dcache_lock removed. rcu-walk commited.
1676 AC_DEFUN([LC_DCACHE_LOCK],
1677 [AC_MSG_CHECKING([if dcache_lock is exist])
1678 LB_LINUX_TRY_COMPILE([
1679 #include <linux/dcache.h>
1681 spin_lock(&dcache_lock);
1683 AC_DEFINE(HAVE_DCACHE_LOCK, 1,
1684 [dcache_lock is exist])
1685 AC_MSG_RESULT([yes])
1692 # 2.6.38 export blkdev_get_by_dev
1694 AC_DEFUN([LC_BLKDEV_GET_BY_DEV],
1695 [LB_CHECK_SYMBOL_EXPORT([blkdev_get_by_dev],
1697 AC_DEFINE(HAVE_BLKDEV_GET_BY_DEV, 1,
1698 [blkdev_get_by_dev is exported by the kernel])
1704 # 2.6.38 vfsmount.mnt_count doesn't use atomic_t
1706 # 3.3 starts hiding vfsmount guts series (move from include/linux/mount.h to
1707 # fs/mount.h, see kernel commit 7d6fec45a5131918b51dcd76da52f2ec86a85be6)
1709 AC_DEFUN([LC_ATOMIC_MNT_COUNT],
1710 [AC_MSG_CHECKING([if vfsmount guts is hidden, or vfsmount.mnt_count is atomic_t.])
1711 LB_LINUX_TRY_COMPILE([
1712 #include <linux/fs.h>
1713 #include <../fs/mount.h>
1715 struct mount *mnt = real_mount((struct vfsmount *)0);
1717 AC_DEFINE(HAVE_HIDE_VFSMOUNT_GUTS, 1,
1718 [hide vfsmount guts in fs/mount.h])
1719 AC_MSG_RESULT([yes, hide vfsmount guts in fs/mount.h])
1721 LB_LINUX_TRY_COMPILE([
1722 #include <asm/atomic.h>
1723 #include <linux/fs.h>
1724 #include <linux/mount.h>
1726 ((struct vfsmount *)0)->mnt_count = ((atomic_t) { 0 });
1728 AC_DEFINE(HAVE_ATOMIC_MNT_COUNT, 1,
1729 [vfsmount.mnt_count is atomic_t])
1730 AC_MSG_RESULT([yes, vfsmount.mnt_count is atomic_t])
1738 # 2.6.38 use path as 4th parameter in quota_on.
1740 AC_DEFUN([LC_QUOTA_ON_USE_PATH],
1741 [AC_MSG_CHECKING([quota_on use path as parameter])
1742 tmp_flags="$EXTRA_KCFLAGS"
1743 EXTRA_KCFLAGS="-Werror"
1744 LB_LINUX_TRY_COMPILE([
1745 #include <linux/fs.h>
1746 #include <linux/quota.h>
1748 ((struct quotactl_ops *)0)->quota_on(NULL, 0, 0, ((struct path*)0));
1750 AC_DEFINE(HAVE_QUOTA_ON_USE_PATH, 1,
1751 [quota_on use path as 4th paramter])
1752 AC_MSG_RESULT([yes])
1756 EXTRA_KCFLAGS="$tmp_flags"
1760 # 2.6.39 remove unplug_fn from request_queue.
1762 AC_DEFUN([LC_REQUEST_QUEUE_UNPLUG_FN],
1763 [AC_MSG_CHECKING([if request_queue has unplug_fn field])
1764 LB_LINUX_TRY_COMPILE([
1765 #include <linux/blkdev.h>
1767 do{ }while(sizeof(((struct request_queue *)0)->unplug_fn));
1769 AC_DEFINE(HAVE_REQUEST_QUEUE_UNPLUG_FN, 1,
1770 [request_queue has unplug_fn field])
1771 AC_MSG_RESULT([yes])
1778 # 2.6.38 generic_permission taken 4 paremater.
1779 # in fact, it means rcu-walk aware permission bring.
1781 AC_DEFUN([LC_GENERIC_PERMISSION],
1782 [AC_MSG_CHECKING([if generic_permission take 4 arguments])
1783 LB_LINUX_TRY_COMPILE([
1784 #include <linux/fs.h>
1786 generic_permission(NULL, 0, 0, NULL);
1788 AC_DEFINE(HAVE_GENERIC_PERMISSION_4ARGS, 1,
1789 [generic_permission taken 4 arguments])
1790 AC_MSG_RESULT([yes])
1797 # 2.6.38 export simple_setattr
1799 AC_DEFUN([LC_EXPORT_SIMPLE_SETATTR],
1800 [LB_CHECK_SYMBOL_EXPORT([simple_setattr],
1802 AC_DEFINE(HAVE_SIMPLE_SETATTR, 1,
1803 [simple_setattr is exported by the kernel])
1811 # Lustre linux kernel checks
1813 AC_DEFUN([LC_PROG_LINUX],
1817 LC_CONFIG_LIBLUSTRE_RECOVERY
1818 LC_CONFIG_HEALTH_CHECK_WRITE
1819 LC_CONFIG_LRU_RESIZE
1820 LC_LLITE_LLOOP_MODULE
1823 LC_EXPORT_TRUNCATE_COMPLETE
1824 LC_EXPORT_D_REHASH_COND
1825 LC_EXPORT___D_REHASH
1826 LC_EXPORT_NODE_TO_CPUMASK
1842 LC_UMOUNTBEGIN_HAS_VFSMOUNT
1844 #2.6.18 + RHEL5 (fc6)
1855 LC_CANCEL_DIRTY_PAGE
1857 # raid5-zerocopy patch
1861 LC_INVALIDATE_BDEV_2ARG
1862 LC_ASYNC_BLOCK_CIPHER
1864 LC_STRUCT_BLKCIPHER_DESC
1865 LC_FS_RENAME_DOES_D_MOVE
1868 LC_UNREGISTER_BLKDEV_RETURN_INT
1869 LC_KERNEL_SPLICE_READ
1874 LC_EXPORTFS_DECODE_FH
1884 LC_FS_STRUCT_USE_PATH
1887 LC_SECURITY_PLUG # for SLES10 SP2
1888 LC_PGMKWRITE_USE_VMFAULT
1889 LC_INODE_PERMISION_2ARGS
1892 LC_READ_INODE_IN_SBOPS
1893 LC_EXPORT_INODE_PERMISSION
1899 # 2.6.27.15-2 sles11
1903 LC_SB_ANY_QUOTA_ACTIVE
1904 LC_SB_HAS_QUOTA_ACTIVE
1905 LC_EXPORT_ADD_TO_PAGE_CACHE_LRU
1908 LC_SB_ANY_QUOTA_LOADED
1911 LC_EXPORT_CPUMASK_OF_NODE
1914 LC_BLK_QUEUE_LOG_BLK_SIZE
1917 LC_REQUEST_QUEUE_LIMITS
1918 LC_EXPORT_BDI_REGISTER
1920 LC_BLK_QUEUE_MAX_SECTORS
1921 LC_BLK_QUEUE_MAX_SEGMENTS
1924 LC_EXPORT_GENERIC_ERROR_REMOVE_PAGE
1925 LC_SELINUX_IS_ENABLED
1926 LC_EXPORT_ACCESS_PROCESS_VM
1930 LC_EXPORT_SIMPLE_SETATTR
1934 LC_SBOPS_EVICT_INODE
1941 LC_BLKDEV_GET_BY_DEV
1942 LC_GENERIC_PERMISSION
1943 LC_QUOTA_ON_USE_PATH
1949 LC_REQUEST_QUEUE_UNPLUG_FN
1952 if test x$enable_server = xyes ; then
1953 AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server])
1954 LC_FUNC_DEV_SET_RDONLY
1962 # LC_CONFIG_CLIENT_SERVER
1964 # Build client/server sides of Lustre
1966 AC_DEFUN([LC_CONFIG_CLIENT_SERVER],
1967 [AC_MSG_CHECKING([whether to build Lustre server support])
1968 AC_ARG_ENABLE([server],
1969 AC_HELP_STRING([--disable-server],
1970 [disable Lustre server support]),
1971 [],[enable_server='yes'])
1972 AC_MSG_RESULT([$enable_server])
1974 AC_MSG_CHECKING([whether to build Lustre client support])
1975 AC_ARG_ENABLE([client],
1976 AC_HELP_STRING([--disable-client],
1977 [disable Lustre client support]),
1978 [],[enable_client='yes'])
1979 AC_MSG_RESULT([$enable_client])])
1982 # LC_CONFIG_LIBLUSTRE
1984 # whether to build liblustre
1986 AC_DEFUN([LC_CONFIG_LIBLUSTRE],
1987 [AC_MSG_CHECKING([whether to build Lustre library])
1988 AC_ARG_ENABLE([liblustre],
1989 AC_HELP_STRING([--disable-liblustre],
1990 [disable building of Lustre library]),
1991 [],[enable_liblustre=$with_sysio])
1992 AC_MSG_RESULT([$enable_liblustre])
1993 # only build sysio if liblustre is built
1994 with_sysio="$enable_liblustre"
1996 AC_MSG_CHECKING([whether to build liblustre tests])
1997 AC_ARG_ENABLE([liblustre-tests],
1998 AC_HELP_STRING([--enable-liblustre-tests],
1999 [enable liblustre tests, if --disable-tests is used]),
2000 [],[enable_liblustre_tests=$enable_tests])
2001 if test x$enable_liblustre != xyes ; then
2002 enable_liblustre_tests='no'
2004 AC_MSG_RESULT([$enable_liblustre_tests])
2006 AC_MSG_CHECKING([whether to enable liblustre acl])
2007 AC_ARG_ENABLE([liblustre-acl],
2008 AC_HELP_STRING([--disable-liblustre-acl],
2009 [disable ACL support for liblustre]),
2010 [],[enable_liblustre_acl=yes])
2011 AC_MSG_RESULT([$enable_liblustre_acl])
2012 if test x$enable_liblustre_acl = xyes ; then
2013 AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS)
2016 # 2.6.29 change prepare/commit_write to write_begin/end
2017 AC_DEFUN([LC_WRITE_BEGIN_END],
2018 [AC_MSG_CHECKING([if kernel has .write_begin/end])
2019 LB_LINUX_TRY_COMPILE([
2020 #include <linux/fs.h>
2021 #include <linux/pagemap.h>
2022 #ifdef HAVE_LINUX_MMTYPES_H
2023 #include <linux/mm_types.h>
2026 struct address_space_operations aops;
2029 aops.write_begin = NULL;
2030 aops.write_end = NULL;
2031 page = grab_cache_page_write_begin(NULL, 0, 0);
2033 AC_MSG_RESULT([yes])
2034 AC_DEFINE(HAVE_KERNEL_WRITE_BEGIN_END, 1,
2035 [kernel has .write_begin/end])
2041 # 2.6.29 blkdev_put has 2 arguments
2042 AC_DEFUN([LC_BLKDEV_PUT_2ARGS],
2043 [AC_MSG_CHECKING([blkdev_put needs 2 parameters])
2044 LB_LINUX_TRY_COMPILE([
2045 #include <linux/fs.h>
2047 blkdev_put(NULL, 0);
2049 AC_DEFINE(HAVE_BLKDEV_PUT_2ARGS, 1,
2050 [blkdev_put needs 2 paramters])
2051 AC_MSG_RESULT([yes])
2057 # 2.6.29 dentry_open has 4 arguments
2058 AC_DEFUN([LC_DENTRY_OPEN_4ARGS],
2059 [AC_MSG_CHECKING([dentry_open needs 4 parameters])
2060 LB_LINUX_TRY_COMPILE([
2061 #include <linux/fs.h>
2063 dentry_open(NULL, NULL, 0, NULL);
2065 AC_DEFINE(HAVE_DENTRY_OPEN_4ARGS, 1,
2066 [dentry_open needs 4 paramters])
2067 AC_MSG_RESULT([yes])
2073 # 2.6.29 split file and anonymous page queues
2074 AC_DEFUN([LC_PAGEVEC_LRU_ADD_FILE],
2075 [AC_MSG_CHECKING([if kernel has .pagevec_lru_add_file])
2076 LB_LINUX_TRY_COMPILE([
2077 #include <linux/mm.h>
2078 #include <linux/pagevec.h>
2080 struct pagevec lru_pagevec;
2082 pagevec_init(&lru_pagevec, 0);
2083 pagevec_lru_add_file(&lru_pagevec);
2085 AC_MSG_RESULT([yes])
2086 AC_DEFINE(HAVE_PAGEVEC_LRU_ADD_FILE, 1,
2087 [kernel has .pagevec_lru_add_file])
2096 AC_ARG_ENABLE(mpitests,
2097 AC_HELP_STRING([--enable-mpitests=yes|no|mpicc wrapper],
2098 [include mpi tests]),
2109 MPICC_WRAPPER=$enableval
2119 if test x$enable_mpitests != xno; then
2120 AC_MSG_CHECKING([whether mpitests can be built])
2128 MPI_Initialized(&flag);
2131 AC_MSG_RESULT([yes])
2138 AC_SUBST(MPICC_WRAPPER)
2140 AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])
2141 ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"
2144 LC_CONFIG_LIBLUSTRE_RECOVERY
2150 # whether to enable quota support global control
2152 AC_DEFUN([LC_CONFIG_QUOTA],
2153 [AC_ARG_ENABLE([quota],
2154 AC_HELP_STRING([--enable-quota],
2155 [enable quota support]),
2156 [],[enable_quota='yes'])
2159 AC_DEFUN([LC_QUOTA],
2163 AC_CHECK_HEADER(sys/quota.h,
2164 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1, [Define to 1 if you have <sys/quota.h>.])],
2165 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
2171 # whether to enable split support
2173 AC_DEFUN([LC_CONFIG_SPLIT],
2174 [AC_MSG_CHECKING([whether to enable split support])
2175 AC_ARG_ENABLE([split],
2176 AC_HELP_STRING([--enable-split],
2177 [enable split support]),
2178 [],[enable_split='no'])
2179 AC_MSG_RESULT([$enable_split])
2180 if test x$enable_split != xno; then
2181 AC_DEFINE(HAVE_SPLIT_SUPPORT, 1, [enable split support])
2185 # RHEL5(2.6.18) has tux_info
2186 AC_DEFUN([LC_TASK_CLENV_TUX_INFO],
2187 [AC_MSG_CHECKING([tux_info])
2188 LB_LINUX_TRY_COMPILE([
2189 #include <linux/sched.h>
2191 struct task_struct task;
2194 AC_MSG_RESULT([yes])
2195 AC_DEFINE(LL_TASK_CL_ENV, tux_info, [have tux_info])
2196 have_task_clenv_store='yes'
2203 # LC_LLITE_LLOOP_MODULE
2204 # lloop_llite.ko does not currently work with page sizes
2207 AC_DEFUN([LC_LLITE_LLOOP_MODULE],
2208 [AC_MSG_CHECKING([whether to enable llite_lloop module])
2209 LB_LINUX_TRY_COMPILE([
2210 #include <asm/page.h>
2212 #if PAGE_SIZE >= 65536
2213 #error "PAGE_SIZE >= 65536"
2216 enable_llite_lloop_module='yes'
2217 AC_MSG_RESULT([yes])
2219 enable_llite_lloop_module='no'
2227 # other configure checks
2229 AC_DEFUN([LC_CONFIGURE],
2230 [LC_CONFIG_OBD_BUFFER_SIZE
2232 if test $target_cpu == "i686" -o $target_cpu == "x86_64"; then
2233 CFLAGS="$CFLAGS -Werror"
2236 # maximum MDS thread count
2239 # include/liblustre.h
2240 AC_CHECK_HEADERS([sys/user.h sys/vfs.h stdint.h blkid/blkid.h])
2242 # liblustre/llite_lib.h
2243 AC_CHECK_HEADERS([xtio.h file.h])
2246 AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
2249 AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
2250 AC_CHECK_FUNCS([inet_ntoa])
2252 # libsysio/src/readlink.c
2255 # lvfs/prng.c - depends on linux/types.h from liblustre/dir.c
2256 AC_CHECK_HEADERS([linux/random.h], [], [],
2257 [#ifdef HAVE_LINUX_TYPES_H
2258 # include <linux/types.h>
2263 AC_CHECK_HEADERS([ext2fs/ext2fs.h])
2265 # check for -lz support
2269 [AC_CHECK_HEADERS([zlib.h],
2271 AC_DEFINE([HAVE_ADLER], 1,
2272 [support alder32 checksum type])],
2273 [AC_MSG_WARN([No zlib-devel package found,
2274 unable to use adler32 checksum])])],
2275 [AC_MSG_WARN([No zlib package found, unable to use adler32 checksum])]
2280 AC_ARG_ENABLE([mindf],
2281 AC_HELP_STRING([--enable-mindf],
2282 [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
2284 if test "$enable_mindf" = "yes" ; then
2285 AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])
2288 AC_ARG_ENABLE([fail_alloc],
2289 AC_HELP_STRING([--disable-fail-alloc],
2290 [disable randomly alloc failure]),
2291 [],[enable_fail_alloc=yes])
2292 AC_MSG_CHECKING([whether to randomly failing memory alloc])
2293 AC_MSG_RESULT([$enable_fail_alloc])
2294 if test x$enable_fail_alloc != xno ; then
2295 AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure])
2298 AC_ARG_ENABLE([invariants],
2299 AC_HELP_STRING([--enable-invariants],
2300 [enable invariant checking (cpu intensive)]),
2302 AC_MSG_CHECKING([whether to check invariants (expensive cpu-wise)])
2303 AC_MSG_RESULT([$enable_invariants])
2304 if test x$enable_invariants = xyes ; then
2305 AC_DEFINE([INVARIANT_CHECK], 1, [enable invariant checking])
2308 AC_ARG_ENABLE([lu_ref],
2309 AC_HELP_STRING([--enable-lu_ref],
2310 [enable lu_ref reference tracking code]),
2312 AC_MSG_CHECKING([whether to track references with lu_ref])
2313 AC_MSG_RESULT([$enable_lu_ref])
2314 if test x$enable_lu_ref = xyes ; then
2315 AC_DEFINE([USE_LU_REF], 1, [enable lu_ref reference tracking code])
2318 AC_ARG_ENABLE([pgstate-track],
2319 AC_HELP_STRING([--enable-pgstate-track],
2320 [enable page state tracking]),
2321 [enable_pgstat_track='yes'],[])
2322 AC_MSG_CHECKING([whether to enable page state tracking])
2323 AC_MSG_RESULT([$enable_pgstat_track])
2324 if test x$enable_pgstat_track = xyes ; then
2325 AC_DEFINE([LUSTRE_PAGESTATE_TRACKING], 1,
2326 [enable page state tracking code])
2333 LC_DENTRY_OPEN_4ARGS
2334 LC_PAGEVEC_LRU_ADD_FILE
2341 # AM_CONDITIONALS for lustre
2343 AC_DEFUN([LC_CONDITIONALS],
2344 [AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
2345 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
2346 AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes)
2347 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
2348 AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
2349 AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
2350 AM_CONDITIONAL(SPLIT, test x$enable_split = xyes)
2351 AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes)
2352 AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
2353 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
2354 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
2355 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
2356 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
2357 AM_CONDITIONAL(LLITE_LLOOP, test x$enable_llite_lloop_module = xyes)
2363 # files that should be generated with AC_OUTPUT
2365 AC_DEFUN([LC_CONFIG_FILES],
2369 lustre/autoconf/Makefile
2370 lustre/conf/Makefile
2371 lustre/contrib/Makefile
2373 lustre/include/Makefile
2374 lustre/include/lustre_ver.h
2375 lustre/include/linux/Makefile
2376 lustre/include/darwin/Makefile
2377 lustre/include/lustre/Makefile
2378 lustre/kernel_patches/targets/2.6-rhel6.target
2379 lustre/kernel_patches/targets/2.6-rhel5.target
2380 lustre/kernel_patches/targets/2.6-sles10.target
2381 lustre/kernel_patches/targets/2.6-sles11.target
2382 lustre/kernel_patches/targets/2.6-oel5.target
2383 lustre/kernel_patches/targets/2.6-fc11.target
2384 lustre/kernel_patches/targets/2.6-fc12.target
2385 lustre/ldlm/Makefile
2387 lustre/fid/autoMakefile
2388 lustre/liblustre/Makefile
2389 lustre/liblustre/tests/Makefile
2390 lustre/liblustre/tests/mpi/Makefile
2391 lustre/llite/Makefile
2392 lustre/llite/autoMakefile
2393 lustre/lclient/Makefile
2395 lustre/lov/autoMakefile
2396 lustre/lvfs/Makefile
2397 lustre/lvfs/autoMakefile
2399 lustre/mdc/autoMakefile
2401 lustre/lmv/autoMakefile
2403 lustre/mds/autoMakefile
2405 lustre/mdt/autoMakefile
2407 lustre/cmm/autoMakefile
2409 lustre/mdd/autoMakefile
2411 lustre/fld/autoMakefile
2412 lustre/obdclass/Makefile
2413 lustre/obdclass/autoMakefile
2414 lustre/obdclass/linux/Makefile
2415 lustre/obdecho/Makefile
2416 lustre/obdecho/autoMakefile
2417 lustre/obdfilter/Makefile
2418 lustre/obdfilter/autoMakefile
2420 lustre/ofd/autoMakefile
2422 lustre/osc/autoMakefile
2424 lustre/ost/autoMakefile
2425 lustre/osd-ldiskfs/Makefile
2426 lustre/osd-ldiskfs/autoMakefile
2427 lustre/osd-zfs/Makefile
2428 lustre/osd-zfs/autoMakefile
2430 lustre/mgc/autoMakefile
2432 lustre/mgs/autoMakefile
2433 lustre/ptlrpc/Makefile
2434 lustre/ptlrpc/autoMakefile
2435 lustre/ptlrpc/gss/Makefile
2436 lustre/ptlrpc/gss/autoMakefile
2437 lustre/quota/Makefile
2438 lustre/quota/autoMakefile
2439 lustre/scripts/Makefile
2440 lustre/scripts/lustre
2441 lustre/tests/Makefile
2442 lustre/tests/mpi/Makefile
2443 lustre/utils/Makefile
2444 lustre/utils/gss/Makefile
2445 lustre/obdclass/darwin/Makefile