-AC_DEFUN([LC_EXPORT_D_REHASH_COND],
-[LB_CHECK_SYMBOL_EXPORT([d_rehash_cond],
-[fs/dcache.c],[
-AC_DEFINE(HAVE_D_REHASH_COND, 1,
- [d_rehash_cond is exported by the kernel])
-],[
-])
-])
-
-AC_DEFUN([LC_EXPORT___D_REHASH],
-[LB_CHECK_SYMBOL_EXPORT([__d_rehash],
-[fs/dcache.c],[
-AC_DEFINE(HAVE___D_REHASH, 1,
- [__d_rehash is exported by the kernel])
-],[
-])
-])
-
-# The actual symbol exported varies among architectures, so we need
-# to check many symbols (but only in the current architecture.) No
-# matter what symbol is exported, the kernel #defines node_to_cpumask
-# to the appropriate function and that's what we use.
-AC_DEFUN([LC_EXPORT_NODE_TO_CPUMASK],
- [LB_CHECK_SYMBOL_EXPORT([node_to_cpumask],
- [arch/$LINUX_ARCH/mm/numa.c],
- [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
- [node_to_cpumask is exported by
- the kernel])]) # x86_64
- LB_CHECK_SYMBOL_EXPORT([node_to_cpu_mask],
- [arch/$LINUX_ARCH/kernel/smpboot.c],
- [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
- [node_to_cpumask is exported by
- the kernel])]) # ia64
- LB_CHECK_SYMBOL_EXPORT([node_2_cpu_mask],
- [arch/$LINUX_ARCH/kernel/smpboot.c],
- [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
- [node_to_cpumask is exported by
- the kernel])]) # i386
- ])
-
-#
-#
-# between 2.6.5 - 2.6.22 filemap_populate is exported in some kernels
-#
-AC_DEFUN([LC_FILEMAP_POPULATE],
-[AC_MSG_CHECKING([for exported filemap_populate])
-LB_LINUX_TRY_COMPILE([
- #include <asm/page.h>
- #include <linux/mm.h>
-],[
- filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0);
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_FILEMAP_POPULATE, 1, [Kernel exports filemap_populate])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# added in 2.6.17
-#
-AC_DEFUN([LC_BIT_SPINLOCK_H],
-[LB_CHECK_FILE([$LINUX/include/linux/bit_spinlock.h],[
- AC_MSG_CHECKING([if bit_spinlock.h can be compiled])
- LB_LINUX_TRY_COMPILE([
- #include <asm/processor.h>
- #include <linux/spinlock.h>
- #include <linux/bit_spinlock.h>
- ],[],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_BIT_SPINLOCK_H, 1, [Kernel has bit_spinlock.h])
- ],[
- AC_MSG_RESULT([no])
- ])
-],
-[])
-])
-
-#
-# LC_CONST_ACL_SIZE
-#
-AC_DEFUN([LC_CONST_ACL_SIZE],
-[AC_MSG_CHECKING([calc acl size])
-tmp_flags="$CFLAGS"
-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"
-AC_TRY_RUN([
- #define __KERNEL__
- #include <linux/types.h>
- #undef __KERNEL__
- // block include
- #define __LINUX_POSIX_ACL_H
-
- #ifdef CONFIG_FS_POSIX_ACL
- # include <linux/posix_acl_xattr.h>
- #endif
-
- #include <stdio.h>
-
- int main(void)
- {
- /* LUSTRE_POSIX_ACL_MAX_ENTRIES = 32 */
- int size = posix_acl_xattr_size(32);
- FILE *f = fopen("acl.size","w+");
- fprintf(f,"%d", size);
- fclose(f);
-
- return 0;
- }
-],[
- acl_size=`cat acl.size`
- AC_MSG_RESULT([ACL size $acl_size])
- AC_DEFINE_UNQUOTED(XATTR_ACL_SIZE, AS_TR_SH([$acl_size]), [size of xattr acl])
-],[
- AC_ERROR([ACL size can't be computed])
-],[
- AC_MSG_RESULT([can't check ACL size, make it 260])
- AC_DEFINE_UNQUOTED(XATTR_ACL_SIZE,260)
-])
-CFLAGS="$tmp_flags"
-])
-