AC_DEFUN([LC_CONFIG_SUNRPC],
[LB_LINUX_CONFIG_IM([SUNRPC],[],
- [AC_MSG_ERROR([kernel SUNRPC support is required by using GSS.])])
+ [if test x$sunrpc_required == xyes; then
+ AC_MSG_ERROR([kernel SUNRPC support is required by using GSS.])
+ fi])
])
#
[AC_MSG_CHECKING([whether to enable gss/krb5 support])
AC_ARG_ENABLE([gss],
[AC_HELP_STRING([--enable-gss], [enable gss/krb5 support])],
- [],[enable_gss='no'])
+ [],[enable_gss='auto'])
AC_MSG_RESULT([$enable_gss])
- if test x$enable_gss == xyes; then
+ if test x$enable_gss != xno; then
LC_CONFIG_GSS_KEYRING
+ sunrpc_required=$enable_gss
LC_CONFIG_SUNRPC
+ sunrpc_required=no
AC_DEFINE([HAVE_GSS], [1], [Define this if you enable gss])
LB_LINUX_CONFIG_IM([CRYPTO_SHA512],[],
[AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
- AC_CHECK_LIB([gssapi], [gss_export_lucid_sec_context],
- [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi"],
- [AC_CHECK_LIB([gssglue], [gss_export_lucid_sec_context],
- [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssglue"],
- [AC_MSG_ERROR([libgssapi or libgssglue is not found, which is required by GSS.])])],)
-
- AC_SUBST(GSSAPI_LIBS)
-
+ require_krb5=$enable_gss
AC_KERBEROS_V5
+ require_krb5=no
+
+ if test x$KRBDIR != x; then
+ AC_CHECK_LIB([gssapi], [gss_export_lucid_sec_context],
+ [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi"],
+ [AC_CHECK_LIB([gssglue], [gss_export_lucid_sec_context],
+ [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssglue"],
+ [if test x$enable_gss == xyes; then
+ AC_MSG_ERROR([libgssapi or libgssglue is not found, which is required by GSS.])
+ fi])],)
+ AC_SUBST(GSSAPI_LIBS)
+ fi
fi
])
-# 2.6.12
-
-# ~2.6.12 merge patch from oracle to convert tree_lock from spinlock to rwlock
-# yet tree_lock is converted from rwlock to spin_lock since v2.6.26
-AC_DEFUN([LC_RW_TREE_LOCK],
-[AC_MSG_CHECKING([if kernel has tree_lock as rwlock])
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- struct address_space a;
-
- write_lock(&a.tree_lock);
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_RW_TREE_LOCK, 1, [kernel has tree_lock as rw_lock])
-],[
- AC_MSG_RESULT([no])
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-
#2.6.18 + RHEL5 (fc6)
# raid5-zerocopy patch
])
])
-# 2.6.22
-
-#
-# 2.6.19 check for FS_RENAME_DOES_D_MOVE flag
-#
-AC_DEFUN([LC_FS_RENAME_DOES_D_MOVE],
-[AC_MSG_CHECKING([if kernel has FS_RENAME_DOES_D_MOVE flag])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- int v __attribute__ ((unused));
- v = FS_RENAME_DOES_D_MOVE;
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_FS_RENAME_DOES_D_MOVE, 1, [kernel has FS_RENAME_DOES_D_MOVE flag])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
# 2.6.24
# 2.6.24 has bio_endio with 2 args
# 2.6.27
#
-# LC_SECURITY_PLUG # for SLES10 SP2 (2.6.27)
-# check security plug in sles10 sp2 kernel
-AC_DEFUN([LC_SECURITY_PLUG],
-[AC_MSG_CHECKING([If kernel has security plug support])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
- #include <linux/stddef.h>
-],[
- notify_change(NULL, NULL, NULL);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_SECURITY_PLUG, 1,
- [SLES10 SP2 use extra parameter in vfs])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
+# up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
+# v2.6.27->v2.6.37 had a 2 arg version (inode, mask)
+# v2.6.37->v3.0 had a 3 arg version (inode, mask, nameidata)
+# v3.1 onward have a 2 arg version (inode, mask)
AC_DEFUN([LC_INODE_PERMISION_2ARGS],
[AC_MSG_CHECKING([inode_operations->permission has two args])
LB_LINUX_TRY_COMPILE([
LC_CONFIG_RMTCLIENT
LC_CONFIG_GSS
- # 2.6.12
- LC_RW_TREE_LOCK
-
# raid5-zerocopy patch
LC_PAGE_CONSTANT
- # 2.6.22
- LC_FS_RENAME_DOES_D_MOVE
-
# 2.6.24
LC_BIO_ENDIO_2ARG
LC_PROCFS_DELETED
# 2.6.27
- LC_SECURITY_PLUG # for SLES10 SP2
- LC_INODE_PERMISION_2ARGS
LC_QUOTA_ON_5ARGS
LC_QUOTA_OFF_3ARGS
LC_INODE_DIO_WAIT
LC_IOP_GET_ACL
LC_FILE_LLSEEK_SIZE
+ LC_INODE_PERMISION_2ARGS
# 3.1.1
LC_BLOCKS_FOR_TRUNCATE