From 263681060e43b4af74025b69bef9137b37e21639 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 12 Jul 2012 23:50:04 -0500 Subject: [PATCH] Added missing file from OrangeFS-2.8.6 -These files are not related to OSD -They were only in present in the latest version of OrangeFS (2.8.6) --- aclocal.m4 | 2303 --------------------------------------------------- config.save | 26 +- 2 files changed, 13 insertions(+), 2316 deletions(-) delete mode 100644 aclocal.m4 diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 5af196f..0000000 --- a/aclocal.m4 +++ /dev/null @@ -1,2303 +0,0 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -AC_DEFUN([AX_OPENSSL], -[ - opensslpath=ifelse([$1], ,,$1) - - if test "x$1" != "xno"; then - - AC_MSG_CHECKING([for openssl library]) - - if test "x${opensslpath}" != "x"; then - CFLAGS="${CFLAGS} -I${opensslpath}/include" - LDFLAGS="$LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" - SERVER_LDFLAGS="$SERVER_LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" - fi - LIBS="$LIBS -lcrypto -lssl" - - AC_COMPILE_IFELSE( - [#include "openssl/bio.h"], - [], - [AC_MSG_ERROR(Invalid openssl path specified. No openssl/bio.h found.)]) - - AC_TRY_LINK( - [#include "openssl/bio.h"], - [BIO * b;], - [AC_MSG_RESULT(yes)], - [AC_MSG_ERROR(could not find openssl libs)]) - - AC_DEFINE(WITH_OPENSSL, 1, [Define if openssl exists]) - - AC_CHECK_HEADERS(openssl/evp.h) - AC_CHECK_HEADERS(openssl/crypto.h) - fi -]) - -AC_DEFUN([AX_OPENSSL_OPTIONAL], -[ - AC_MSG_CHECKING([for openssl library]) - TMPLIBS=${LIBS} - LIBS="$LIBS -lcrypto -lssl" - - AC_COMPILE_IFELSE( - [#include "openssl/bio.h"], - [], - [AC_MSG_WARN(No openssl headers found.)]) - - AC_TRY_LINK( - [#include "openssl/bio.h"], - [BIO * b;], - [AC_MSG_RESULT(yes) - AC_DEFINE(WITH_OPENSSL, 1, [Define if openssl exists]) - ], - [ - AC_MSG_WARN(No openssl headers found.) - LIBS=${TMPLIBS} - ]) - - AC_CHECK_HEADERS(openssl/evp.h) - AC_CHECK_HEADERS(openssl/crypto.h) - -]) - - -AC_DEFUN([AX_KERNEL_FEATURES], -[ - dnl - dnl kernel feature tests. Set CFLAGS once here and use it for all - dnl kernel features. reset to the old value at the end. - dnl - dnl on some systems, there is a /usr/include/linux/xattr_acl.h , so the - dnl check for xattr_acl.h down below will always pass, even if it - dnl should fail. this hack (-nostdinc -isystem ...) will bring in just - dnl enough system headers dnl for kernel compilation - - dnl -Werror can be overkill, but for these kernel feature tests - dnl 'implicit function declaration' usually ends up in an undefined - dnl symbol somewhere. - - NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`" - - CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty) -DKBUILD_MODNAME=KBUILD_STR(empty)" - - dnl kernels > 2.6.32 now use generated/autoconf.h - if test -f $lk_src/include/generated/autoconf.h ; then - CFLAGS="$CFLAGS -imacros $lk_src/include/generated/autoconf.h" - else - CFLAGS="$CFLAGS -imacros $lk_src/include/linux/autoconf.h" - fi - - dnl we probably need additional includes if this build is intended - dnl for a different architecture - if test -n "${ARCH}" ; then - CFLAGS="$CFLAGS -I$lk_src/arch/${ARCH}/include -I$lk_src/arch/${ARCH}/include/asm/mach-default" - else - SUBARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ - -e s/s390x/s390/ -e s/parisc64/parisc/ \ - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ - -e s/sh.*/sh/` - if test "x$SUBARCH" = "xi386"; then - ARCH=x86 - elif test "x$SUBARCH" = "xx86_64"; then - ARCH=x86 - elif test "x$SUBARCH" = "xsparc64"; then - ARCH=sparc - else - ARCH=$SUBARCH - fi - - CFLAGS="$CFLAGS -I$lk_src/arch/${ARCH}/include -I$lk_src/arch/${ARCH}/include/asm/mach-default" - fi - - AC_MSG_CHECKING(for i_size_write in kernel) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel already defined it - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - void i_size_write(struct inode *inode, - loff_t i_size) - { - return; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_I_SIZE_WRITE, 1, Define if kernel has i_size_write), - ) - - AC_MSG_CHECKING(for i_size_read in kernel) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel already defined it - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - loff_t i_size_read(struct inode *inode) - { - return 0; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_I_SIZE_READ, 1, Define if kernel has i_size_read), - ) - - AC_MSG_CHECKING(for iget_locked function in kernel) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel already defined it - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - loff_t iget_locked(struct inode *inode) - { - return 0; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IGET_LOCKED, 1, Define if kernel has iget_locked), - ) - - AC_MSG_CHECKING(for iget4_locked function in kernel) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel already defined it - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - loff_t iget4_locked(struct inode *inode) - { - return 0; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IGET4_LOCKED, 1, Define if kernel has iget4_locked), - ) - - AC_MSG_CHECKING(for iget5_locked function in kernel) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel already defined it - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - loff_t iget5_locked(struct inode *inode) - { - return 0; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IGET5_LOCKED, 1, Define if kernel has iget5_locked), - ) - - dnl Check if the kernel defines the xtvec structure. - dnl This is part of a POSIX extension. - AC_MSG_CHECKING(for struct xtvec in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct xtvec xv = { 0, 0 }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRUCT_XTVEC, 1, Define if struct xtvec is defined in the kernel), - AC_MSG_RESULT(no) - ) - - dnl 2.6.20 deprecated kmem_cache_t; some old ones do not have struct - dnl kmem_cache, but may have kmem_cache_s. It's a mess. Just look - dnl for this, and assume _t if not found. - dnl This test relies on gcc complaining about declaring a struct - dnl in a parameter list. Fragile, but nothing better is available - dnl to check for the existence of a struct. We cannot see the - dnl definition of the struct in the kernel, it's private to the - dnl slab implementation. And C lets you declare structs freely as - dnl long as you don't try to deal with their contents. - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for struct kmem_cache in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - - int foo(struct kmem_cache *s) - { - return (s == NULL) ? 3 : 4; - } - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRUCT_KMEM_CACHE, 1, Define if struct kmem_cache is defined in kernel), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - dnl 2.6.20 removed SLAB_KERNEL. Need to use GFP_KERNEL instead - AC_MSG_CHECKING(for SLAB_KERNEL flag in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static int flags = SLAB_KERNEL; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SLAB_KERNEL, 1, Define if SLAB_KERNEL is defined in kernel), - AC_MSG_RESULT(no) - ) - - dnl The name of this field changed from memory_backed to capabilities - dnl in 2.6.12. - AC_MSG_CHECKING(for memory_backed in struct backing_dev_info in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - static struct backing_dev_info bdi = { - .memory_backed = 0 - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BDI_MEMORY_BACKED, 1, Define if struct backing_dev_info in kernel has memory_backed), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a sendfile callback - if test "x$enable_kernel_sendfile" = "xyes"; then - AC_MSG_CHECKING(for sendfile callback in struct file_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct file_operations fop = { - .sendfile = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SENDFILE_VFS_SUPPORT, 1, Define if struct file_operations in kernel has sendfile callback), - AC_MSG_RESULT(no) - ) - fi - - dnl checking if we have a readv callback in super_operations - AC_MSG_CHECKING(for readv callback in struct file_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct file_operations fop = { - .readv = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_READV_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has readv callback), - AC_MSG_RESULT(no) - ) - dnl checking if we have a writev callback in super_operations - AC_MSG_CHECKING(for writev callback in struct file_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct file_operations fop = { - .writev = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WRITEV_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has writev callback), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a find_inode_handle callback in super_operations - AC_MSG_CHECKING(for find_inode_handle callback in struct super_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct super_operations sop = { - .find_inode_handle = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FIND_INODE_HANDLE_SUPER_OPERATIONS, 1, Define if struct super_operations in kernel has find_inode_handle callback), - AC_MSG_RESULT(no) - ) - - dnl 2.6.18.1 removed this member - AC_MSG_CHECKING(for i_blksize in struct inode) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct inode i = { - .i_blksize = 0, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_I_BLKSIZE_IN_STRUCT_INODE, 1, Define if struct inode in kernel has i_blksize member), - AC_MSG_RESULT(no) - ) - - dnl 2.6.16 removed this member - AC_MSG_CHECKING(for i_sem in struct inode) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct inode i = { - .i_sem = {0}, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_I_SEM_IN_STRUCT_INODE, 1, Define if struct inode in kernel has i_sem member), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a statfs_lite callback in super_operations - AC_MSG_CHECKING(for statfs_lite callback in struct super_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct super_operations sop = { - .statfs_lite = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STATFS_LITE_SUPER_OPERATIONS, 1, Define if struct super_operations in kernel has statfs_lite callback), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a fill_handle callback in inode_operations - AC_MSG_CHECKING(for fill_handle callback in struct inode_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct inode_operations iop = { - .fill_handle = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILL_HANDLE_INODE_OPERATIONS, 1, Define if struct inode_operations in kernel has fill_handle callback), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a getattr_lite callback in inode_operations - AC_MSG_CHECKING(for getattr_lite callback in struct inode_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct inode_operations iop = { - .getattr_lite = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETATTR_LITE_INODE_OPERATIONS, 1, Define if struct inode_operations in kernel has getattr_lite callback), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a get_fs_key callback in super_operations - AC_MSG_CHECKING(for get_fs_key callback in struct super_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct super_operations sop = { - .get_fs_key = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GET_FS_KEY_SUPER_OPERATIONS, 1, Define if struct super_operations in kernel has get_fs_key callback), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a readdirplus callback in file_operations - AC_MSG_CHECKING(for readdirplus member in file_operations structure) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct file_operations filop = { - .readdirplus = NULL - }; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_READDIRPLUS_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has readdirplus callback), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a readdirplus_lite callback in file_operations - AC_MSG_CHECKING(for readdirplus_lite member in file_operations structure) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct file_operations filop = { - .readdirplus_lite = NULL - }; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_READDIRPLUSLITE_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has readdirplus_lite callback), - AC_MSG_RESULT(no) - ) - - - dnl checking if we have a readx callback in file_operations - AC_MSG_CHECKING(for readx member in file_operations structure) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct file_operations filop = { - .readx = NULL - }; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_READX_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has readx callback), - AC_MSG_RESULT(no) - ) - - dnl checking if we have a writex callback in file_operations - AC_MSG_CHECKING(for writex member in file_operations structure) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct file_operations filop = { - .writex = NULL - }; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WRITEX_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has writex callback), - AC_MSG_RESULT(no) - ) - - AC_MSG_CHECKING(for aio support in kernel) - dnl if this test passes, the kernel has it - dnl if this test fails, the kernel does not have it - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - static struct kiocb iocb; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_AIO, 1, Define if kernel has aio support) - have_aio=yes, - AC_MSG_RESULT(no) - have_aio=no - ) - - if test "x$have_aio" = "xyes" -a "x$enable_kernel_aio" = "xyes"; then - AC_MSG_CHECKING(for ki_dtor in kiocb structure of kernel) - dnl if this test passes, the kernel does have it and we enable - dnl support for AIO. if this test fails, the kernel does not - dnl have this member and we disable support for AIO - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - static struct kiocb io_cb = { - .ki_dtor = NULL, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_AIO_VFS_SUPPORT, 1, Define if we are enabling VFS AIO support in kernel), - AC_MSG_RESULT(no) - ) - - tmp_cflags=$CFLAGS - dnl if this test passes, the signature of aio_read has changed to the new one - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for new prototype of aio_read callback of file_operations structure) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - extern ssize_t my_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); - static struct file_operations fop = { - .aio_read = my_aio_read, - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_AIO_NEW_AIO_SIGNATURE, 1, Define if VFS AIO support in kernel has a new prototype), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - fi - - AC_MSG_CHECKING(for dentry argument in kernel super_operations statfs) - dnl Rely on the fact that there is an external vfs_statfs that is - dnl of the same type as the .statfs in struct super_operations to - dnl verify the signature of that function pointer. There is a single - dnl commit in the git history where both changed at the same time - dnl from super_block to dentry. - dnl - dnl The alternative approach of trying to define a s_op.statfs is not - dnl as nice because that only throws a warning, requiring -Werror to - dnl catch it. This is a problem if the compiler happens to spit out - dnl other spurious warnings that have nothing to do with the test. - dnl - dnl If this test passes, the kernel uses a struct dentry argument. - dnl If this test fails, the kernel uses something else (old struct - dnl super_block perhaps). - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - int vfs_statfs(struct dentry *de, struct kstatfs *kfs) - { - return 0; - } - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DENTRY_STATFS_SOP, 1, Define if super_operations statfs has dentry argument), - AC_MSG_RESULT(no) - ) - - AC_MSG_CHECKING(for vfsmount argument in kernel file_system_type get_sb) - dnl Same trick as above. A single commit changed mayn things at once: - dnl type and signature of file_system_type.get_sb, and signature of - dnl get_sb_bdev. This test is a bit more tenuous, as get_sb_bdev - dnl isn't used directly in a file_system_type, but is a popular helper - dnl for many FSes. And it has not exactly the same signature. - dnl - dnl If this test passes, the kernel has the most modern known form, - dnl which includes a stfuct vfsmount argument. - dnl If this test fails, the kernel uses something else. - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - int get_sb_bdev(struct file_system_type *fs_type, int flags, - const char *dev_name, void *data, - int (*fill_super)(struct super_block *, void *, - int), - struct vfsmount *vfsm) - { - return 0; - } - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_VFSMOUNT_GETSB, 1, Define if file_system_type get_sb has vfsmount argument), - AC_MSG_RESULT(no) - ) - - AC_MSG_CHECKING(for xattr support in kernel) - dnl if this test passes, the kernel has it - dnl if this test fails, the kernel does not have it - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct inode_operations in_op = { - .getxattr = NULL - }; - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_XATTR, 1, Define if kernel has xattr support) - have_xattr=yes, - AC_MSG_RESULT(no) - have_xattr=no - ) - - if test "x$have_xattr" = "xyes"; then - dnl Test to check if setxattr function has a const void * argument - AC_MSG_CHECKING(for const argument to setxattr function) - dnl if this test passes, there is a const void* argument - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], - [ - struct inode_operations inode_ops; - int ret; - struct dentry * dent = NULL; - const char * name = NULL; - const void * val = NULL; - size_t size = 0; - int flags = 0; - - ret = inode_ops.setxattr(dent, name, val, size, flags); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SETXATTR_CONST_ARG, 1, Define if kernel setxattr has const void* argument), - AC_MSG_RESULT(no) - ) - fi - - dnl the proc handler functions have changed over the years. - dnl pre-2.6.8: proc_handler(ctl_table *ctl, - dnl int write, - dnl struct file *filp, - dnl void *buffer, - dnl size_t *lenp) - dnl - dnl 2.6.8-2.6.31: proc_handler(ctl_table *ctl, - dnl int write, - dnl struct file *filp, - dnl void *buffer, - dnl size_t *lenp, - dnl loff_t *ppos) - dnl > 2.6.31: proc_handler(ctl_table *ctl, - dnl int write, - dnl void *buffer, - dnl size_t *lenp, - dnl loff_t *ppos) - - dnl Test to see if sysctl proc handlers have a file argument - AC_MSG_CHECKING(for file argument to sysctl proc handlers) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - ], [ - struct ctl_table * ctl = NULL; - int write = 0; - struct file * filp = NULL; - void __user * buffer = NULL; - size_t * lenp = NULL; - loff_t * ppos = NULL; - - proc_dointvec_minmax(ctl, write, filp, buffer, lenp, ppos); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PROC_HANDLER_FILE_ARG, 1, Define if sysctl proc handlers have 6th argument), - AC_MSG_RESULT(no) - ) - - AC_MSG_CHECKING(for ppos argument to sysctl proc handlers) - dnl if this test passes, there is a ppos argument - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - ], [ - struct ctl_table * ctl = NULL; - int write = 0; - void __user * buffer = NULL; - size_t * lenp = NULL; - loff_t * ppos = NULL; - - proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PROC_HANDLER_PPOS_ARG, 1, Define if sysctl proc handlers have ppos argument), - AC_MSG_RESULT(no) - ) - - AC_CHECK_HEADERS([linux/posix_acl.h], [], [], - [#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif - ] ) - - AC_CHECK_HEADERS([linux/posix_acl_xattr.h], [], [], - [#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif - ] ) - - dnl linux-2.6.11 had xattr_acl.h, but 2.6.12 did not! - AC_CHECK_HEADERS([linux/xattr_acl.h], [], [], - [#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif - ] ) - - AC_CHECK_HEADERS([linux/mount.h], [], [], - [#define __KERNEL__ - #include - ] ) - AC_CHECK_HEADERS([linux/ioctl32.h], [], [], - [#define __KERNEL__ - #include - ] ) - AC_CHECK_HEADERS([linux/compat.h], [], [], - [#define __KERNEL__ - #include - ] ) - AC_CHECK_HEADERS([linux/syscalls.h], [], [], - [#define __KERNEL__ - #include - ] ) - AC_CHECK_HEADERS([asm/ioctl32.h], [], [], - [#define __KERNEL__ - #include - ] ) - AC_CHECK_HEADERS([linux/exportfs.h], [],[], - [#define __KERNEL__ - #include - ]) - - AC_MSG_CHECKING(for generic_file_readv api in kernel) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel has it defined with a different - dnl signature! deliberately, the signature for this method has been - dnl changed for it to give a compiler error. - - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - int generic_file_readv(struct inode *inode) - { - return 0; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GENERIC_FILE_READV, 1, Define if kernel has generic_file_readv), - ) - - AC_MSG_CHECKING(for generic_permission api in kernel) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel has it defined with a different - dnl signature! deliberately, the signature for this method has been - dnl changed for it to give a compiler error. - - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - int generic_permission(struct inode *inode) - { - return 0; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GENERIC_PERMISSION, 1, Define if kernel has generic_permission), - ) - - AC_MSG_CHECKING(for generic_getxattr api in kernel) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel has it defined - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - int generic_getxattr(struct inode *inode) - { - return 0; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GENERIC_GETXATTR, 1, Define if kernel has generic_getxattr), - ) - - AC_MSG_CHECKING(for arg member in read_descriptor_t in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - read_descriptor_t x; - x.arg.data = NULL; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ARG_IN_READ_DESCRIPTOR_T, 1, Define if read_descriptor_t has an arg member), - AC_MSG_RESULT(no) - ) - - AC_MSG_CHECKING(for fh_to_dentry member in export_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct export_operations x; - x.fh_to_dentry = NULL; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FHTODENTRY_EXPORT_OPERATIONS, 1, Define if export_operations has an fh_to_dentry member), - AC_MSG_RESULT(no) - ) - - AC_MSG_CHECKING(for encode_fh member in export_operations in kernel) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct export_operations x; - x.encode_fh = NULL; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ENCODEFH_EXPORT_OPERATIONS, 1, Define if export_operations has an encode_fh member), - AC_MSG_RESULT(no) - ) - - dnl Using -Werror is not an option, because some arches throw lots of - dnl warnings that would trigger false negatives. We know that the - dnl change to the releasepage() function signature was accompanied by - dnl a similar change to the exported function try_to_release_page(), - dnl and that one we can check without using -Werror. The test fails - dnl unless the previous declaration was identical to the one we suggest - dnl below. New kernels use gfp_t, not int. - AC_MSG_CHECKING(for second arg type int in address_space_operations releasepage) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - extern int try_to_release_page(struct page *page, int gfp_mask); - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INT_ARG2_ADDRESS_SPACE_OPERATIONS_RELEASEPAGE, 1, Define if sceond argument to releasepage in address_space_operations is type int), - AC_MSG_RESULT(no) - ) - - dnl Similar logic for the follow_link member in inode_operations. New - dnl kernels return a void *, not int. - AC_MSG_CHECKING(for int return in inode_operations follow_link) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - extern int page_follow_link_light(struct dentry *, - struct nameidata *); - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INT_RETURN_INODE_OPERATIONS_FOLLOW_LINK, 1, Define if return value from follow_link in inode_operations is type int), - AC_MSG_RESULT(no) - ) - - dnl kmem_cache_destroy function may return int only on pre 2.6.19 kernels - dnl else it returns a void. - AC_MSG_CHECKING(for int return in kmem_cache_destroy) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - extern int kmem_cache_destroy(kmem_cache_t *); - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INT_RETURN_KMEM_CACHE_DESTROY, 1, Define if return value from kmem_cache_destroy is type int), - AC_MSG_RESULT(no) - ) - - dnl more 2.6 api changes. return type for the invalidatepage - dnl address_space_operation is 'void' in new kernels but 'int' in old - dnl I had to turn on -Werror for this test because i'm not sure how - dnl else to make dnl "initialization from incompatible pointer type" - dnl fail. - AC_MSG_CHECKING(for older int return in invalidatepage) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], - [ - struct address_space_operations aso; - - int ret; - struct page * page = NULL; - unsigned long offset; - - ret = aso.invalidatepage(page, offset); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_INT_RETURN_ADDRESS_SPACE_OPERATIONS_INVALIDATEPAGE, 1, Define if return type of invalidatepage should be int), - AC_MSG_RESULT(NO) - ) - - dnl In 2.6.18.1 and newer, including will throw off a - dnl warning - tmp_cflags=${CFLAGS} - CFLAGS="${CFLAGS} -Werror" - AC_MSG_CHECKING(for warnings when including linux/config.h) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [], - AC_MSG_RESULT(no) - AC_DEFINE(HAVE_NOWARNINGS_WHEN_INCLUDING_LINUX_CONFIG_H, 1, Define if including linux/config.h gives no warnings), - AC_MSG_RESULT(yes) - ) - CFLAGS=$tmp_cflags - - AC_MSG_CHECKING(for compat_ioctl member in file_operations structure) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct file_operations filop = { - .compat_ioctl = NULL - }; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_COMPAT_IOCTL_HANDLER, 1, Define if there exists a compat_ioctl member in file_operations), - AC_MSG_RESULT(no) - ) - - dnl Gives wrong answer if header is missing; don't try then. - if test x$ac_cv_header_linux_ioctl32_h = xyes ; then - AC_MSG_CHECKING(for register_ioctl32_conversion kernel exports) - dnl if this test passes, the kernel does not have it - dnl if this test fails, the kernel has it defined - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - int register_ioctl32_conversion(void) - { - return 0; - } - ], [], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_REGISTER_IOCTL32_CONVERSION, 1, Define if kernel has register_ioctl32_conversion), - ) - fi - - AC_MSG_CHECKING(for int return value of kmem_cache_destroy) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - int i = kmem_cache_destroy(NULL); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_DESTROY_INT_RETURN, 1, Define if kmem_cache_destroy returns int), - AC_MSG_RESULT(no) - ) - - dnl As of 2.6.19, combined readv/writev into aio_read and aio_write - dnl functions. Detect this by not finding a readv member. - AC_MSG_CHECKING(for combined file_operations readv and aio_read) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct file_operations filop = { - .readv = NULL - }; - ], - AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_COMBINED_AIO_AND_VECTOR, 1, Define if struct file_operations has combined aio_read and readv functions), - ) - - dnl Check for kzalloc - AC_MSG_CHECKING(for kzalloc) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - void * a; - a = kzalloc(1024, GFP_KERNEL); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KZALLOC, 1, Define if kzalloc exists), - AC_MSG_RESULT(no) - ) - - dnl Check for two arg register_sysctl_table() - AC_MSG_CHECKING(for two arguments to register_sysctl_table) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - ], [ - register_sysctl_table(NULL, 0); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE, 1, Define if register_sysctl_table takes two arguments), - AC_MSG_RESULT(no) - ) - - dnl FS_IOC_GETFLAGS and FS_IOC_SETFLAGS appeared - dnl somewhere around 2.6.20.1 as generic versions of fs-specific flags - AC_MSG_CHECKING(for generic FS_IOC ioctl flags) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - int flags = FS_IOC_GETFLAGS; - ], - AC_MSG_RESULT(yes), - AC_DEFINE(HAVE_NO_FS_IOC_FLAGS, 1, Define if FS_IOC flags missing from fs.h) - AC_MSG_RESULT(no) - ) - - dnl old linux kernels define struct page with a 'count' member, whereas - dnl other kernels (since at least 2.6.20) define struct page with a - dnl '_count' - AC_MSG_CHECKING(for obsolete struct page count without underscore) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct page *p; - int foo; - foo = atomic_read(&(p)->count); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_OBSOLETE_STRUCT_PAGE_COUNT_NO_UNDERSCORE, 1, Define if struct page defines a count member without leading underscore), - AC_MSG_RESULT(no) - ) - - dnl old linux kernels do not have class_create and related functions - dnl - dnl check for class_device_destroy() to weed out RHEL4 kernels that - dnl have some class functions but not others - AC_MSG_CHECKING(if kernel has device classes) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - class_device_destroy(NULL, "pvfs2") - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KERNEL_DEVICE_CLASSES, 1, Define if kernel has device classes), - AC_MSG_RESULT(no) - ) - - dnl 2.6.23 removed the destructor parameter from kmem_cache_create - AC_MSG_CHECKING(for destructor param to kmem_cache_create) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - kmem_cache_create("config-test", 0, 0, 0, NULL, NULL); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_CREATE_DESTRUCTOR_PARAM, 1, [Define if kernel kmem_cache_create has destructor param]), - AC_MSG_RESULT(no) - ) - - dnl 2.6.27 changed the constructor parameter signature of - dnl kmem_cache_create. Check for this newer one-param style - dnl If they don't match, gcc complains about - dnl passing argument ... from incompatible pointer type, hence the - dnl need for the -Werror. Note that the next configure test will - dnl determine if we have a two param constructor or not. - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for one-param kmem_cache_create constructor) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - void ctor(void *req) - { - } - ], [ - kmem_cache_create("config-test", 0, 0, 0, ctor); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_CREATE_CTOR_ONE_PARAM, 1, [Define if kernel kmem_cache_create constructor has newer-style one-parameter form]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - dnl 2.6.27 changed the parameter signature of - dnl inode_operations->permission. Check for this newer two-param style - dnl If they don't match, gcc complains about - dnl passing argument ... from incompatible pointer type, hence the - dnl need for the -Werror and -Wall. - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wall" - AC_MSG_CHECKING(for two param permission) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - #include - #include - int ctor(struct inode *i, int a) - { - return 0; - } - struct inode_operations iop = { - .permission = ctor, - }; - ], [ - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TWO_PARAM_PERMISSION, 1, [Define if kernel's inode_operations has two parameters permission function]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - - dnl 2.6.24 changed the constructor parameter signature of - dnl kmem_cache_create. Check for this newer two-param style and - dnl if not, assume it is old. Note we can get away with just - dnl struct kmem_cache (and not kmem_cache_t) as that change happened - dnl in older kernels. If they don't match, gcc complains about - dnl passing argument ... from incompatible pointer type, hence the - dnl need for the -Werror. - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for two-param kmem_cache_create constructor) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - void ctor(struct kmem_cache *cachep, void *req) - { - } - ], [ - kmem_cache_create("config-test", 0, 0, 0, ctor); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM, 1, [Define if kernel kmem_cache_create constructor has new-style two-parameter form]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field named page_lock) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct address_space as; - spin_lock(&as.page_lock); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock member named page_lock instead of rw_lock]), - AC_MSG_RESULT(no) - ) - - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(if kernel address_space struct has a rwlock_t field named tree_lock) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct address_space as; - read_lock(&as.tree_lock); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RW_LOCK_TREE_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a rw_lock_t member named tree_lock]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(if kernel address_space struct has a spinlock_t field named tree_lock) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct address_space as; - spin_lock(&as.tree_lock); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SPIN_LOCK_TREE_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock_t member named tree_lock]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - AC_MSG_CHECKING(if kernel address_space struct has a priv_lock field - from RT linux) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct address_space as; - spin_lock(&as.priv_lock); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock for private data instead of rw_lock -- used by RT linux]), - AC_MSG_RESULT(no) - ) - - AC_MSG_CHECKING(if kernel defines mapping_nrpages macro - from RT linux) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct address_space idata; - int i = mapping_nrpages(&idata); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MAPPING_NRPAGES_MACRO, 1, [Define if kernel defines mapping_nrpages macro -- defined by RT linux]), - AC_MSG_RESULT(no) - ) - - dnl Starting with 2.6.25-rc1, .read_inode goes away. - AC_MSG_CHECKING(if kernel super_operations contains read_inode field) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct super_operations sops; - sops.read_inode(NULL); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_READ_INODE, 1, [Define if kernel super_operations contains read_inode field]), - AC_MSG_RESULT(no) - ) - - dnl Starting with 2.6.26, drop_inode and put_inode go away - AC_MSG_CHECKING(if kernel super_operations contains drop_inode field) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct super_operations sops; - sops.drop_inode(NULL); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DROP_INODE, 1, [Define if kernel super_operations contains drop_inode field]), - AC_MSG_RESULT(no) - ) - - dnl Starting with 2.6.26, drop_inode and put_inode go away - AC_MSG_CHECKING(if kernel super_operations contains put_inode field) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct super_operations sops; - sops.put_inode(NULL); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PUT_INODE, 1, [Define if kernel super_operations contains put_inode field]), - AC_MSG_RESULT(no) - ) - - dnl older 2.6 kernels don't have MNT_NOATIME - AC_MSG_CHECKING(if mount.h defines MNT_NOATIME) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - int flag = MNT_NOATIME; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MNT_NOATIME, 1, [Define if mount.h contains - MNT_NOATIME flags]), - AC_MSG_RESULT(no) - ) - - dnl older 2.6 kernels don't have MNT_NODIRATIME - AC_MSG_CHECKING(if mount.h defines MNT_NODIRATIME) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - int flag = MNT_NODIRATIME; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MNT_NODIRATIME, 1, [Define if mount.h contains - MNT_NODIRATIME flags]), - AC_MSG_RESULT(no) - ) - - dnl newer 2.6 kernels (2.6.28) use d_obtain_alias instead of d_alloc_anon - AC_MSG_CHECKING(for d_alloc_anon) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct inode *i; - d_alloc_anon(i); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_D_ALLOC_ANON, 1, [Define if dcache.h contains - d_alloc_annon]), - AC_MSG_RESULT(no) - ) - - AC_MSG_CHECKING(for s_dirty in struct super_block) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - ], [ - struct super_block *s; - list_empty(&s->s_dirty); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SB_DIRTY_LIST, 1, [Define if struct super_block has s_dirty list]), - AC_MSG_RESULT(no) - ) - - dnl newer 2.6 kernels (2.6.29-ish) use current_fsuid() macro instead - dnl of accessing task struct fields directly - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for current_fsuid) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - ], [ - int uid = current_fsuid(); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CURRENT_FSUID, 1, [Define if cred.h contains current_fsuid]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - dnl 2.6.32 added a mandatory name field to the bdi structure - AC_MSG_CHECKING(if kernel backing_dev_info struct has a name field) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - ], [ - struct backing_dev_info foo = - { - .name = "foo" - }; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BACKING_DEV_INFO_NAME, 1, [Define if kernel backing_dev_info struct has a name field]), - AC_MSG_RESULT(no) - ) - - dnl some 2.6 kernels have functions to explicitly initialize bdi structs - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for bdi_init) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - ], [ - int ret = bdi_init(NULL); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BDI_INIT, 1, [Define if bdi_init function is present]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - - dnl 2.6.33 API change, - dnl Removed .ctl_name from struct ctl_table. - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING([whether struct ctl_table has ctl_name]) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct ctl_table c = { .ctl_name = 0, }; - ],[ ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CTL_NAME, 1, Define if struct ctl_table has ctl_name member), - AC_MSG_RESULT(no) - ) - - dnl Removed .strategy from struct ctl_table. - AC_MSG_CHECKING([whether struct ctl_table has strategy]) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct ctl_table c = { .strategy = 0, }; - ], [ ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STRATEGY_NAME, 1, Define if struct ctl_table has strategy member), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - dnl 2.6.33 changed the parameter signature of xattr_handler get - dnl member functions to have a fifth argument and changed the first - dnl parameter from struct inode to struct dentry. if the test fails - dnl assume the old 4 param with struct inode - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for five-param xattr_handler.get) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - static struct xattr_handler x; - static int get_xattr_h( struct dentry *d, const char *n, - void *b, size_t s, int h) - { return 0; } - ], - [ - x.get = get_xattr_h; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_XATTR_HANDLER_GET_FIVE_PARAM, 1, [Define if kernel xattr_handle get function has dentry as first parameter and a fifth parameter]), - AC_MSG_RESULT(no) - ) - - dnl 2.6.33 changed the parameter signature of xattr_handler set - dnl member functions to have a sixth argument and changed the first - dnl parameter from struct inode to struct dentry. if the test fails - dnl assume the old 5 param with struct inode - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for six-param xattr_handler.set) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - static struct xattr_handler x; - static int set_xattr_h( struct dentry *d, const char *n, - const void *b, size_t s, int f, int h) - { return 0; } - ], - [ - x.set = set_xattr_h; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_XATTR_HANDLER_SET_SIX_PARAM, 1, [Define if kernel xattr_handle set function has dentry as first parameter and a sixth parameter]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - dnl xattr_handler is also a const - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for const s_xattr member in super_block struct) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - #include - struct super_block sb; - const struct xattr_handler *x[] = { NULL }; - ], - [ - sb.s_xattr = x; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CONST_S_XATTR_IN_SUPERBLOCK, 1, [Define if s_xattr member of super_block struct is const]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - dnl early 2.6 kernels do not contain true/false enum in stddef.h - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(stddef.h true/false enum) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - int f = true; - ], - [ ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TRUE_FALSE_ENUM, 1, [Define if kernel stddef has true/false enum]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - - dnl fsync no longer has a dentry second parameter - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - AC_MSG_CHECKING(for dentry argument in fsync) - AC_TRY_COMPILE([ - #define __KERNEL__ - #include - static struct file_operations f; - static int local_fsync(struct file *f, struct dentry *d, int i) - { return 0; } - ], - [ - f.fsync = local_fsync; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FSYNC_DENTRY_PARAM, 1, [Define if fsync function in file_operations struct wants a dentry pointer as the second parameter]), - AC_MSG_RESULT(no) - ) - CFLAGS=$tmp_cflags - - CFLAGS=$oldcflags - -]) - - -AC_DEFUN([AX_BERKELEY_DB], -[ - dbpath=ifelse([$1], ,,$1) - - DB_LDFLAGS= - dnl - dnl if the db is specified, try to link with -ldb - dnl otherwise try -ldb4, then -ldb3, then -ldb - dnl $lib set to notfound on link failure - dnl - AC_MSG_CHECKING([for db library]) - oldlibs=$LIBS - lib=notfound - - if test "x$dbpath" != "x" ; then - oldcflags=$CFLAGS - for dbheader in db4 db3 notfound; do - AC_COMPILE_IFELSE( - [#include "$dbpath/include/$dbheader/db.h"], - [DB_CFLAGS="-I$dbpath/include/$dbheader/" - break]) - done - - if test "x$dbheader" = "xnotfound"; then - AC_COMPILE_IFELSE( - [#include "$dbpath/include/db.h"], - [DB_CFLAGS="-I$dbpath/include/"], - [AC_MSG_FAILURE( - Invalid libdb path specified. No db.h found.)]) - fi - - DB_LDFLAGS="-L${dbpath}/lib" - LDFLAGS="$DB_LDFLAGS ${LDFLAGS}" - - LIBS="${oldlibs} -ldb -lpthread" - DB_LIB="-ldb" - CFLAGS="$DB_CFLAGS $oldcflags" - AC_TRY_LINK( - [#include ], - [DB *dbp; db_create(&dbp, NULL, 0);], - lib=db) - CFLAGS=$oldcflags - - else - for lib in db4 db3 db notfound; do - LIBS="${oldlibs} -l$lib -lpthread" - DB_LIB="-l$lib" - AC_TRY_LINK( - [#include ], - [DB *dbp; db_create(&dbp, NULL, 0);], - [break]) - done - fi - - dnl reset LIBS value and just report through DB_LIB - LIBS=$oldlibs - if test "x$lib" = "xnotfound" ; then - AC_MSG_ERROR(could not find DB libraries) - else - AC_MSG_RESULT($lib) - fi - AC_SUBST(DB_CFLAGS) - AC_SUBST(DB_LIB) - - dnl See if we have a new enough version of Berkeley DB; needed for - dnl compilation of trove-dbpf component - dnl AC_MSG_CHECKING(whether version of Berkeley DB is new enough) - dnl AC_TRY_COMPILE([ - dnl #include - dnl ], [ - dnl #if DB_VERSION_MAJOR < 4 - dnl #error "DB_VERSION_MAJOR < 4; need newer Berkeley DB implementation" - dnl #endif - dnl ], AC_MSG_RESULT(yes), - dnl AC_MSG_RESULT(no) - dnl AC_MSG_ERROR(Need newer (4.x.x or later) version of Berkeley DB. - dnl try: http://www.sleepycat.com/download/index.shtml - dnl or: /parl/pcarns/rpms/db4-4.0.14-1mdk.src.rpm (to build rpm)) - dnl ) - - dnl Test to check for DB_ENV variable to error callback fn. Then - dnl test to see if third parameter must be const (related but not - dnl exactly the same). - AC_MSG_CHECKING(for dbenv parameter to DB error callback function) - oldcflags=$CFLAGS - CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - AC_TRY_COMPILE([ - #include - - void error_callback_fn(const DB_ENV *dbenv, - const char *prefix, - const char *message) - { - return; - } - ], [ - DB *db; - - db->set_errcall(db, error_callback_fn); - ], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK, 1, - Define if DB error callback function takes dbenv parameter) - have_dbenv_parameter_to_db_error_callback=yes, - AC_MSG_RESULT(no) - have_dbenv_parameter_to_db_error_callback=no) - - if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - dnl Test if compilation succeeds without const; we expect that it will - dnl not. - dnl NOTE: still using -Werror! - AC_MSG_CHECKING(if third parameter to error callback function is const) - AC_TRY_COMPILE([ - #include - - void error_callback_fn(const DB_ENV *dbenv, - const char *prefix, - char *message) - { - return; - } - ], [ - DB *db; - - db->set_errcall(db, error_callback_fn); - ], AC_MSG_RESULT(no), - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK, 1, - Define if third param (message) to DB error callback function is const)) - fi - - CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - dnl Test to check for unknown third param to DB stat (four params - dnl total). The unknown parameter is a function ptr so that the - dnl the user can pass in a replcaement for malloc. - dnl Note: this is a holdover from relatively old DB implementations, - dnl while the txnid parameter is new. So we don't test for the old - dnl unknown parameter if we found the new one. - AC_MSG_CHECKING(for DB stat with malloc function ptr) - AC_TRY_COMPILE([ - #include - #include - ], [ - int ret = 0; - DB *db = db; - int dummy = 0; - u_int32_t flags = 0; - - ret = db->stat(db, &dummy, malloc, flags); - ], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_UNKNOWN_PARAMETER_TO_DB_STAT, 1, - Define if DB stat function takes malloc function ptr) - have_db_stat_malloc=yes, - AC_MSG_RESULT(no) - have_db_stat_malloc=no) - - dnl Test to check for txnid parameter to DB stat (DB 4.3.xx+) - if test "x$have_db_stat_malloc" = "xno" ; then - - AC_MSG_CHECKING(for txnid parameter to DB stat function) - AC_TRY_COMPILE([ - #include - ], [ - int ret = 0; - DB *db = db; - DB_TXN *txnid = txnid; - u_int32_t flags = 0; - - ret = db->stat(db, txnid, NULL, flags); - ], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TXNID_PARAMETER_TO_DB_STAT, 1, - Define if DB stat function takes txnid parameter) - have_txnid_param_to_stat=yes, - AC_MSG_RESULT(no) - have_txnid_param_to_stat=no) - - fi - - dnl Test to check for txnid parameter to DB open (DB4.1+) - AC_MSG_CHECKING(for txnid parameter to DB open function) - AC_TRY_COMPILE([ - #include - ], [ - int ret = 0; - DB *db = NULL; - DB_TXN *txnid = NULL; - char *file = NULL; - char *database = NULL; - DBTYPE type = 0; - u_int32_t flags = 0; - int mode = 0; - - ret = db->open(db, txnid, file, database, type, flags, mode); - ], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TXNID_PARAMETER_TO_DB_OPEN, 1, - Define if DB open function takes a txnid parameter), - AC_MSG_RESULT(no)) - - dnl check for DB_DIRTY_READ (it is not in db-3.2.9, for example) - AC_MSG_CHECKING(for DB_DIRTY_READ flag) - AC_TRY_COMPILE([ - #include - ], [ - u_int32_t flags = DB_DIRTY_READ; - ], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DB_DIRTY_READ, 1, [Define if db library has DB_DIRTY_READ flag]), - AC_MSG_RESULT(no)) - - dnl check for DB_BUFFER_SMALL (it is returned by dbp->get in db-4.4 and up) - AC_MSG_CHECKING(for DB_BUFFER_SMALL error) - AC_TRY_COMPILE([ - #include - ], [ - int res = DB_BUFFER_SMALL; - res++; - ], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DB_BUFFER_SMALL, 1, [Define if db library has DB_BUFFER_SMALL error]), - AC_MSG_RESULT(no)) - - dnl Test to check for db->get_pagesize - AC_MSG_CHECKING(for berkeley db get_pagesize function) - AC_TRY_COMPILE([ - #include - ], [ - int ret = 0; - DB *db = NULL; - int pagesize; - - ret = db->get_pagesize(db, &pagesize); - ], AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_DB_GET_PAGESIZE, 1, [Define if DB has get_pagesize function]), - AC_MSG_RESULT(no)) - - CFLAGS="$oldcflags" -]) - - -AC_DEFUN([AX_CHECK_NEEDS_LIBRT], -[ - -AC_MSG_CHECKING([if server lib needs -lrt]) -AC_TRY_LINK( - [#include - #include - #include ], - [lio_listio(LIO_NOWAIT, NULL, 0, NULL);], - [AC_MSG_RESULT(no)], - [ - oldlibs=$LIBS - LIBS="$LIBS -lrt" - AC_TRY_LINK( - [#include - #include - #include ], - [lio_listio(LIO_NOWAIT, NULL, 0, NULL);], - [NEEDS_LIBRT=1 - AC_SUBST(NEEDS_LIBRT) - AC_MSG_RESULT(yes)], - [AC_MSG_ERROR(failed attempting to link lio_listio)]) - LIBS=$oldlibs - ]) -]) - -# -# Configure rules for GM -# -# Copyright (C) 2008 Pete Wyckoff -# -# See COPYING in top-level directory. -# -AC_DEFUN([AX_GM], -[ - dnl Configure options for GM install path. - dnl --with-gm= is shorthand for - dnl --with-gm-includes=/include - dnl --with-gm-libs=/lib (or lib64 if that exists) - gm_home= - AC_ARG_WITH(gm, -[ --with-gm= Location of the GM install (default no GM)], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-gm requires the path to your GM tree.]) - elif test "$withval" != no ; then - gm_home="$withval" - fi - ) - AC_ARG_WITH(gm-includes, -[ --with-gm-includes= - Location of the GM includes], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-gm-includes requires path to GM headers.]) - elif test "$withval" != no ; then - GM_INCDIR="$withval" - fi - ) - AC_ARG_WITH(gm-libs, -[ --with-gm-libs= Location of the GM libraries], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-gm-libs requires path to GM libraries.]) - elif test "$withval" != no ; then - GM_LIBDIR="$withval" - fi - ) - dnl If supplied the incls and libs explicitly, use them, else populate them - dnl using guesses from the --with-gm dir. - if test -n "$gm_home" ; then - if test -z "$GM_INCDIR"; then - GM_INCDIR=$gm_home/include - fi - if test -z "$GM_LIBDIR"; then - GM_LIBDIR=$gm_home/lib64 - if test ! -d "$GM_LIBDIR" ; then - GM_LIBDIR=$gm_home/lib - fi - fi - fi - dnl If anything GM-ish was set, go look for header. - if test -n "$GM_INCDIR$GM_LIBDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$GM_INCDIR -I$GM_INCDIR/gm" - AC_CHECK_HEADER(gm.h,, AC_MSG_ERROR([Header gm.h not found.])) - dnl Run test is not possible on a machine that does not have a GM NIC. - dnl Link test would work, but just check for existence. - if test ! -f $GM_LIBDIR/libgm.so ; then - if test ! -f $GM_LIBDIR/libgm.a ; then - AC_MSG_ERROR([Neither GM library libgm.so or libgm.a found.]) - fi - fi - BUILD_GM=1 - CPPFLAGS="$save_cppflags" - fi - AC_SUBST(BUILD_GM) - AC_SUBST(GM_INCDIR) - AC_SUBST(GM_LIBDIR) -]) - -dnl vim: set ft=config : - -# -# Configure rules for MX -# -# Copyright (C) 2008 Pete Wyckoff -# -# See COPYING in top-level directory. -# -AC_DEFUN([AX_MX], -[ - dnl Configure options for MX install path. - dnl --with-mx= is shorthand for - dnl --with-mx-includes=/include - dnl --with-mx-libs=/lib (or lib64 if that exists) - mx_home= - AC_ARG_WITH(mx, -[ --with-mx= Location of the MX install (default no MX)], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-mx requires the path to your MX tree.]) - elif test "$withval" != no ; then - mx_home="$withval" - fi - ) - AC_ARG_WITH(mx-includes, -[ --with-mx-includes= - Location of the MX includes], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-mx-includes requires path to MX headers.]) - elif test "$withval" != no ; then - MX_INCDIR="$withval" - fi - ) - AC_ARG_WITH(mx-libs, -[ --with-mx-libs= Location of the MX libraries], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-mx-libs requires path to MX libraries.]) - elif test "$withval" != no ; then - MX_LIBDIR="$withval" - fi - ) - dnl If supplied the incls and libs explicitly, use them, else populate them - dnl using guesses from the --with-mx dir. - if test -n "$mx_home" ; then - if test -z "$MX_INCDIR"; then - MX_INCDIR=$mx_home/include - fi - if test -z "$MX_LIBDIR"; then - MX_LIBDIR=$mx_home/lib64 - if test ! -d "$MX_LIBDIR" ; then - MX_LIBDIR=$mx_home/lib - fi - fi - fi - dnl If anything MX-ish was set, go look for header. - if test -n "$MX_INCDIR$MX_LIBDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$MX_INCDIR -I$MX_INCDIR/mx" - AC_CHECK_HEADER(myriexpress.h,, - AC_MSG_ERROR([Header myriexpress.h not found.])) - dnl Run test is not possible on a machine that does not have a MX NIC. - dnl Link test would work, but just check for existence. - if test ! -f $MX_LIBDIR/libmyriexpress.so ; then - if test ! -f $MX_LIBDIR/libmyriexpress.a ; then - AC_MSG_ERROR([Neither MX library libmyriexpress.so or libmyriexpress.a found.]) - fi - fi - BUILD_MX=1 - CPPFLAGS="$save_cppflags" - fi - AC_SUBST(BUILD_MX) - AC_SUBST(MX_INCDIR) - AC_SUBST(MX_LIBDIR) - - if test -n "$BUILD_MX" ; then - dnl Check for existence of mx_decompose_endpoint_addr2 - save_ldflags="$LDFLAGS" - LDFLAGS="-L$MX_LIBDIR $LDFLAGS" - save_libs="$LIBS" - LIBS="-lmyriexpress -lpthread $LIBS" - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$MX_INCDIR" - - AC_MSG_CHECKING(for mx_decompose_endpoint_addr2) - AC_TRY_LINK([ - #include "mx_extensions.h" - #include - ], [ - mx_endpoint_addr_t epa; - mx_decompose_endpoint_addr2(epa, NULL, NULL, NULL); - ], - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - AC_MSG_ERROR([Function mx_decompose_endpoint_addr2() not found.]) - ) - - LDFLAGS="$save_ldflags" - CPPFLAGS="$save_cppflags" - LIBS="$save_libs" - fi -]) - -dnl vim: set ft=config : - -AC_DEFUN([AX_IB], -[ - dnl Configure options for IB install path. - dnl --with-ib= is shorthand for - dnl --with-ib-includes=/include - dnl --with-ib-libs=/lib (or lib64 if that exists) - ib_home= - AC_ARG_WITH(ib, - [ --with-ib= Location of the IB installation (default no IB)], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-ib requires the path to your IB tree.]) - elif test "$withval" != no ; then - ib_home="$withval" - fi - ) - AC_ARG_WITH(ib-includes, -[ --with-ib-includes= - Location of the IB includes], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-ib-includes requires path to IB headers.]) - elif test "$withval" != no ; then - IB_INCDIR="$withval" - fi - ) - AC_ARG_WITH(ib-libs, -[ --with-ib-libs= Location of the IB libraries], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-ib-libs requires path to IB libraries.]) - elif test "$withval" != no ; then - IB_LIBDIR="$withval" - fi - ) - dnl If supplied the incls and libs explicitly, use them, else populate them - dnl using guesses from the --with-ib dir. - if test -n "$ib_home" ; then - if test -z "$IB_INCDIR"; then - IB_INCDIR=$ib_home/include - fi - if test -z "$IB_LIBDIR"; then - IB_LIBDIR=$ib_home/lib64 - if test ! -d "$IB_LIBDIR" ; then - IB_LIBDIR=$ib_home/lib - fi - fi - fi - dnl If anything IB-ish was set, go look for header. - if test -n "$IB_INCDIR$IB_LIBDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$IB_INCDIR" - AC_CHECK_HEADER(vapi.h,, AC_MSG_ERROR([Header vapi.h not found.])) - dnl Run test is not possible on a machine that does not have an IB NIC, - dnl and link test is hard because we need so many little libraries. Bail - dnl and just check for existence; full library list is in Makefile.in. - if test ! -f $IB_LIBDIR/libvapi.so ; then - if test ! -f $IB_LIBDIR/libvapi.a ; then - AC_MSG_ERROR([Infiniband library libvapi.so not found.]) - fi - fi - BUILD_IB=1 - AC_CHECK_HEADER(wrap_common.h, - AC_DEFINE(HAVE_IB_WRAP_COMMON_H, 1, Define if IB wrap_common.h exists.), - , - [#include ]) - CPPFLAGS="$save_cppflags" - fi - AC_SUBST(BUILD_IB) - AC_SUBST(IB_INCDIR) - AC_SUBST(IB_LIBDIR) - - dnl Configure options for OpenIB install path. - dnl --with-openib= is shorthand for - dnl --with-openib-includes=/include - dnl --with-openib-libs=/lib (or lib64 if that exists) - openib_home= - AC_ARG_WITH(openib, - [ --with-openib= Location of the OpenIB install (default no OpenIB)], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-openib requires the path to your OpenIB tree.]) - elif test "$withval" != no ; then - openib_home="$withval" - fi - ) - AC_ARG_WITH(openib-includes, -[ --with-openib-includes= - Location of the OpenIB includes], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-openib-includes requires path to OpenIB headers.]) - elif test "$withval" != no ; then - OPENIB_INCDIR="$withval" - fi - ) - AC_ARG_WITH(openib-libs, -[ --with-openib-libs= - Location of the OpenIB libraries], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-openib-libs requires path to OpenIB libraries.]) - elif test "$withval" != no ; then - OPENIB_LIBDIR="$withval" - fi - ) - dnl If supplied the incls and libs explicitly, use them, else populate them - dnl using guesses from the --with-openib dir. - if test -n "$openib_home" ; then - if test -z "$OPENIB_INCDIR"; then - OPENIB_INCDIR=$openib_home/include - fi - if test -z "$OPENIB_LIBDIR"; then - OPENIB_LIBDIR=$openib_home/lib64 - if test ! -d "$OPENIB_LIBDIR" ; then - OPENIB_LIBDIR=$openib_home/lib - fi - fi - fi - dnl If anything OpenIB-ish was set, go look for header. - if test -n "$OPENIB_INCDIR$OPENIB_LIBDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR" - AC_CHECK_HEADER(infiniband/verbs.h,, - AC_MSG_ERROR([Header infiniband/verbs.h not found.])) - dnl Run test is not possible on a machine that does not have an IB NIC. - dnl Link test would work, but just check for existence. - if test ! -f $OPENIB_LIBDIR/libibverbs.so ; then - if test ! -f $OPENIB_LIBDIR/libibverbs.a ; then - AC_MSG_ERROR([OpenIB library libibverbs.so not found.]) - fi - fi - BUILD_OPENIB=1 - CPPFLAGS="$save_cppflags" - fi - AC_SUBST(BUILD_OPENIB) - AC_SUBST(OPENIB_INCDIR) - AC_SUBST(OPENIB_LIBDIR) - - if test -n "$BUILD_OPENIB" ; then - dnl Check for which version of the ibverbs library; device opening is - dnl different. This format is the older one, newer is - dnl ibv_get_device_list. - save_ldflags="$LDFLAGS" - LDFLAGS="-L$OPENIB_LIBDIR -libverbs" - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR" - - AC_MSG_CHECKING(for ibv_get_devices) - AC_TRY_LINK([], [ - ibv_get_devices(); - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IBV_GET_DEVICES, 1, - Define if libibverbs has ibv_get_devices), - AC_MSG_RESULT(no) - ) - - dnl Check for existence of reregister event; it's somewhat new. - AC_MSG_CHECKING(for IBV_EVENT_CLIENT_REREGISTER) - AC_TRY_COMPILE([ - #include "infiniband/verbs.h" - ], [ - enum ibv_event_type x = IBV_EVENT_CLIENT_REREGISTER; - ], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IBV_EVENT_CLIENT_REREGISTER, 1, - Define if libibverbs has reregister event), - AC_MSG_RESULT(no) - ) - - LDFLAGS="$save_ldflags" - CPPFLAGS="$save_cppflags" - fi -]) - -dnl vim: set ft=config : - -AC_DEFUN([AX_PORTALS], -[ - dnl - dnl Configure to build Portals BMI method, if requested and available. - dnl Use - dnl --with-portals To find include files and libraries in standard - dnl system paths. - dnl --with-portals= To specify a location that has include and lib - dnl (or lib64) subdirectories with the goods. - dnl - dnl Or specify the -I an -L and -l flags exactly using, e.g.: - dnl - dnl --with-portals-includes="-I" - dnl --with-portals-libs="-L -l" - dnl - dnl The C file uses #include , so choose your include - dnl path accordingly. If it did not do this, portals/errno.h would sit in - dnl front of the system version. - dnl - use_portals= - home= - incs= - libs= - AC_ARG_WITH(portals, - [ --with-portals[=] Location of the Portals install (default no Portals)], - if test -z "$withval" -o "$withval" = yes ; then - use_portals=yes - elif test "$withval" != no ; then - home="$withval" - fi - ) - AC_ARG_WITH(portals-includes, -[ --with-portals-includes= - Extra CFLAGS to specify Portals includes], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-portals-includes requires an argument.]) - elif test "$withval" != no ; then - incs="$withval" - fi - ) - AC_ARG_WITH(portals-libs, -[ --with-portals-libs= - Extra LIBS to link Portals libraries], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-portals-libs requires an argument.]) - elif test "$withval" != no ; then - libs="$withval" - fi - ) - dnl If supplied the incls and libs explicitly, use them, else populate them - dnl using guesses from the --with-portals dir. - if test -n "$home" ; then - if test -z "$incs"; then - incs=-I$home/include - fi - if test -z "$libs"; then - libs=-L$home/lib64 - if test ! -d "$home/lib64" ; then - libs=-L$home/lib - fi - fi - fi - - dnl - dnl Look for headers and libs. - dnl - BUILD_PORTALS= - PORTALS_INCS= - PORTALS_LIBS= - if test "X$use_portals$home$incs$libs" != X ; then - # Save stuff - save_cppflags="$CPPFLAGS" - save_libs="$LIBS" - - PORTALS_INCS="$incs" - CPPFLAGS="$CPPFLAGS $PORTALS_INCS" - - PORTALS_LIBS="$libs" - LIBS="$save_libs $PORTALS_LIBS" - - AC_MSG_CHECKING([for portals3.h header]) - ok=no - AC_TRY_COMPILE( - [#include ], - [int m, n; m = PtlInit(&n);], - [ok=yes]) - - if test "$ok" = yes ; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([Header portals/portals3.h not found.]) - fi - - dnl try without first, for Cray, then try TCP version - dnl Run test is not always possible, esp when cross-compiling or on - dnl a box that does not have the hardware. - AC_MSG_CHECKING([for portals libraries]) - ok=no - AC_TRY_LINK( - [#include ], - [int m, n; m = PtlInit(&n);], - [ok=yes]) - - if test "$ok" = no ; then - PORTALS_LIBS="$libs -lportals" - LIBS="$save_libs $PORTALS_LIBS" - AC_TRY_LINK( - [#include ], - [int m, n; m = PtlInit(&n);], - [ok=yes]) - fi - - if test "$ok" = no ; then - PORTALS_LIBS="$libs -lp3api -lp3lib -lp3utcp -lp3rt -lpthread" - LIBS="$save_libs $PORTALS_LIBS" - AC_TRY_LINK( - [#include ], - [int m, n; m = PtlInit(&n);], - [ok=yes]) - fi - - if test "$ok" = yes ; then - AC_MSG_RESULT([yes]) - BUILD_PORTALS=1 - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([Could not link Portals library.]) - fi - - # - # Check for API variations. - # - AC_CHECK_FUNCS(PtlErrorStr) - AC_CHECK_FUNCS(PtlEventKindStr) - - AC_TRY_COMPILE( - [#include ], - [int m; ptl_process_id_t any_pid; - m = PtlACEntry(0, 0, any_pid, (ptl_uid_t) -1, (ptl_jid_t) -1, 0);], - AC_DEFINE(HAVE_PTLACENTRY_JID, 1, - [Define if have PtlACEntry with jid argument.])) - - # Reset - CPPFLAGS="$save_cppflags" - LIBS="$save_libs" - fi - AC_SUBST(BUILD_PORTALS) - AC_SUBST(PORTALS_INCS) - AC_SUBST(PORTALS_LIBS) -]) - -dnl vim: set ft=config : - -# -# Configure rules for ZOID -# -# See COPYING in top-level directory. -# -AC_DEFUN([AX_ZOID], -[ - dnl Configure options for ZOID install path. - dnl --with-zoid= - AC_ARG_WITH(zoid, -[ --with-zoid= Location of the ZOID tree (default no ZOID)], - if test -z "$withval" -o "$withval" = yes ; then - AC_MSG_ERROR([Option --with-zoid requires the path to your ZOID source tree.]) - elif test "$withval" != no ; then - ZOID_SRCDIR="$withval" - fi - ) - if test -n "$ZOID_SRCDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -Isrc/io/bmi -I$ZOID_SRCDIR/include -I$ZOID_SRCDIR/zbmi -I$ZOID_SRCDIR/zbmi/implementation" - AC_CHECK_HEADER(zbmi.h,, AC_MSG_ERROR([Header zbmi.h not found.])) - AC_CHECK_HEADER(zoid_api.h,, AC_MSG_ERROR([Header zoid_api.h not found.])) - AC_CHECK_HEADER(zbmi_protocol.h,, AC_MSG_ERROR([Header zbmi_protocol.h not found.])) - CPPFLAGS="$save_cppflags" - BUILD_ZOID=1 - fi - AC_SUBST(BUILD_ZOID) - AC_SUBST(ZOID_SRCDIR) -]) - -dnl vim: set ft=config : - diff --git a/config.save b/config.save index be895d8..c8eb321 100755 --- a/config.save +++ b/config.save @@ -525,17 +525,17 @@ s,@ECHO_C@,,;t t s,@ECHO_N@,-n,;t t s,@ECHO_T@,,;t t s,@LIBS@, -lcrypto -lssl -ldl,;t t -s,@PVFS2_VERSION@,2.8.6-orangefs-2012-07-03-162939,;t t +s,@PVFS2_VERSION@,2.8.6-orangefs-2012-07-13-043849,;t t s,@PVFS2_VERSION_MAJOR@,2,;t t s,@PVFS2_VERSION_MINOR@,8,;t t s,@PVFS2_VERSION_SUB@,6,;t t -s,@build@,x86_64-unknown-linux-gnu,;t t -s,@build_cpu@,x86_64,;t t -s,@build_vendor@,unknown,;t t +s,@build@,i686-pc-linux-gnu,;t t +s,@build_cpu@,i686,;t t +s,@build_vendor@,pc,;t t s,@build_os@,linux-gnu,;t t -s,@host@,x86_64-unknown-linux-gnu,;t t -s,@host_cpu@,x86_64,;t t -s,@host_vendor@,unknown,;t t +s,@host@,i686-pc-linux-gnu,;t t +s,@host_cpu@,i686,;t t +s,@host_vendor@,pc,;t t s,@host_os@,linux-gnu,;t t s,@CC@,gcc,;t t s,@CFLAGS@, -g -O2,;t t @@ -579,9 +579,9 @@ s,@THREADED_KMOD_HELPER@,,;t t s,@LINUX_KERNEL_SRC@,,;t t s,@LINUX24_KERNEL_SRC@,,;t t s,@LINUX24_KERNEL_MINOR_VER@,,;t t -s,@BUILD_ABSOLUTE_TOP@,/usr/src/orangefsosd-2.8.6,;t t +s,@BUILD_ABSOLUTE_TOP@,/usr/src/pvfs2-osd,;t t s,@SRC_RELATIVE_TOP@,./,;t t -s,@SRC_ABSOLUTE_TOP@,/usr/src/orangefsosd-2.8.6,;t t +s,@SRC_ABSOLUTE_TOP@,/usr/src/pvfs2-osd,;t t s,@FUSE_LDFLAGS@,,;t t s,@FUSE_CFLAGS@,,;t t s,@BUILD_FUSE@,,;t t @@ -983,14 +983,14 @@ CEOF t clr : clr ${ac_dA}HAVE_ARPA_INET_H${ac_dB}HAVE_ARPA_INET_H${ac_dC}1${ac_dD} -${ac_dA}SIZEOF_LONG_INT${ac_dB}SIZEOF_LONG_INT${ac_dC}8${ac_dD} +${ac_dA}SIZEOF_LONG_INT${ac_dB}SIZEOF_LONG_INT${ac_dC}4${ac_dD} ${ac_dA}WITH_OPENSSL${ac_dB}WITH_OPENSSL${ac_dC}1${ac_dD} ${ac_dA}HAVE_OPENSSL_EVP_H${ac_dB}HAVE_OPENSSL_EVP_H${ac_dC}1${ac_dD} ${ac_dA}HAVE_OPENSSL_CRYPTO_H${ac_dB}HAVE_OPENSSL_CRYPTO_H${ac_dC}1${ac_dD} ${ac_dA}HAVE_OPENSSL_SHA_H${ac_dB}HAVE_OPENSSL_SHA_H${ac_dC}1${ac_dD} ${ac_dA}HAVE_AIOCB_ERROR_CODE${ac_dB}HAVE_AIOCB_ERROR_CODE${ac_dC}1${ac_dD} ${ac_dA}HAVE_AIOCB_RETURN_VALUE${ac_dB}HAVE_AIOCB_RETURN_VALUE${ac_dC}1${ac_dD} -${ac_dA}SIZEOF_VOID_P${ac_dB}SIZEOF_VOID_P${ac_dC}8${ac_dD} +${ac_dA}SIZEOF_VOID_P${ac_dB}SIZEOF_VOID_P${ac_dC}4${ac_dD} ${ac_dA}HAVE_SYS_EPOLL_H${ac_dB}HAVE_SYS_EPOLL_H${ac_dC}1${ac_dD} ${ac_dA}PVFS_USRINT_BUILD${ac_dB}PVFS_USRINT_BUILD${ac_dC}1${ac_dD} ${ac_dA}PVFS_USRINT_KMOUNT${ac_dB}PVFS_USRINT_KMOUNT${ac_dC}0${ac_dD} @@ -1075,14 +1075,14 @@ CEOF t clr : clr ${ac_uA}HAVE_ARPA_INET_H${ac_uB}HAVE_ARPA_INET_H${ac_uC}1${ac_uD} -${ac_uA}SIZEOF_LONG_INT${ac_uB}SIZEOF_LONG_INT${ac_uC}8${ac_uD} +${ac_uA}SIZEOF_LONG_INT${ac_uB}SIZEOF_LONG_INT${ac_uC}4${ac_uD} ${ac_uA}WITH_OPENSSL${ac_uB}WITH_OPENSSL${ac_uC}1${ac_uD} ${ac_uA}HAVE_OPENSSL_EVP_H${ac_uB}HAVE_OPENSSL_EVP_H${ac_uC}1${ac_uD} ${ac_uA}HAVE_OPENSSL_CRYPTO_H${ac_uB}HAVE_OPENSSL_CRYPTO_H${ac_uC}1${ac_uD} ${ac_uA}HAVE_OPENSSL_SHA_H${ac_uB}HAVE_OPENSSL_SHA_H${ac_uC}1${ac_uD} ${ac_uA}HAVE_AIOCB_ERROR_CODE${ac_uB}HAVE_AIOCB_ERROR_CODE${ac_uC}1${ac_uD} ${ac_uA}HAVE_AIOCB_RETURN_VALUE${ac_uB}HAVE_AIOCB_RETURN_VALUE${ac_uC}1${ac_uD} -${ac_uA}SIZEOF_VOID_P${ac_uB}SIZEOF_VOID_P${ac_uC}8${ac_uD} +${ac_uA}SIZEOF_VOID_P${ac_uB}SIZEOF_VOID_P${ac_uC}4${ac_uD} ${ac_uA}HAVE_SYS_EPOLL_H${ac_uB}HAVE_SYS_EPOLL_H${ac_uC}1${ac_uD} ${ac_uA}PVFS_USRINT_BUILD${ac_uB}PVFS_USRINT_BUILD${ac_uC}1${ac_uD} ${ac_uA}PVFS_USRINT_KMOUNT${ac_uB}PVFS_USRINT_KMOUNT${ac_uC}0${ac_uD}