Whamcloud - gitweb
LU-4726 ptlrpc: vfs_rename api changed
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 9a347d9..a42b479 100644 (file)
@@ -83,14 +83,11 @@ AC_TRY_COMPILE([
 ])
 
 AC_DEFUN([LC_GLIBC_SUPPORT_FHANDLES],
-[AC_MSG_CHECKING([if file handle and related syscalls are supported by glibc])
-AC_CHECK_FUNCS([name_to_handle_at
-],[
-       AC_MSG_RESULT([yes])
+[AC_CHECK_FUNCS([name_to_handle_at],[
        AC_DEFINE(HAVE_FHANDLE_GLIBC_SUPPORT, 1,
                [file handle and related syscalls are supported])
 ],[
-       AC_MSG_RESULT([no])
+       AC_MSG_WARN([file handle and related syscalls are not supported])
 ])
 ])
 
@@ -269,7 +266,10 @@ dnl the AES symbol usually tied with arch, e.g. CRYPTO_AES_586
 dnl FIXME
 AC_DEFUN([LC_CONFIG_RMTCLIENT],
 [LB_LINUX_CONFIG_IM([CRYPTO_AES],[],[
-        AC_MSG_WARN([Lustre remote client require that CONFIG_CRYPTO_AES is enabled in your kernel.])
+        AC_MSG_WARN([
+
+Lustre remote client require that CONFIG_CRYPTO_AES is enabled in your kernel.
+])
 ])
 ])
 
@@ -287,20 +287,32 @@ AC_DEFUN([LC_CONFIG_GSS_KEYRING],
  if test x$enable_gss_keyring != xno; then
        LB_LINUX_CONFIG_IM([KEYS],[],
                           [gss_keyring_conf_test='fail';
-                           AC_MSG_WARN([GSS keyring backend require that CONFIG_KEYS be enabled in your kernel.])])
+                           AC_MSG_WARN([
+
+GSS keyring backend require that CONFIG_KEYS be enabled in your kernel.
+])])
 
        AC_CHECK_LIB([keyutils], [keyctl_search], [],
                     [gss_keyring_conf_test='fail';
-                     AC_MSG_WARN([libkeyutils is not found, which is required by gss keyring backend])],)
+                     AC_MSG_WARN([
+
+libkeyutils is not found, which is required by gss keyring backend
+])],)
 
        if test x$gss_keyring_conf_test != xfail; then
                AC_DEFINE([HAVE_GSS_KEYRING], [1], [Define this if you enable gss keyring backend])
                enable_gss_keyring='yes'
        else
                if test x$enable_gss_keyring == xyes; then
-                       AC_MSG_ERROR([Cannot enable gss_keyring. See above for details.])
+                       AC_MSG_ERROR([
+
+Cannot enable gss_keyring. See above for details.
+])
                else
-                       AC_MSG_WARN([Cannot enable gss keyring.  See above for details.])
+                       AC_MSG_WARN([
+
+Cannot enable gss keyring.  See above for details.
+])
                fi
        fi
  fi
@@ -309,7 +321,10 @@ AC_DEFUN([LC_CONFIG_GSS_KEYRING],
 AC_DEFUN([LC_CONFIG_SUNRPC],
 [LB_LINUX_CONFIG_IM([SUNRPC],[],
                     [if test x$sunrpc_required == xyes; then
-                         AC_MSG_ERROR([kernel SUNRPC support is required by using GSS.])
+                         AC_MSG_ERROR([
+
+kernel SUNRPC support is required by using GSS.
+])
                      fi])
 ])
 
@@ -353,9 +368,15 @@ AC_DEFUN([LC_CONFIG_GSS],
                                           [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssglue";
                                            gss_conf_test='success'],
                                           [if test x$enable_gss == xyes; then
-                                               AC_MSG_ERROR([libgssapi or libgssglue is not found, which is required by GSS.])
+                                               AC_MSG_ERROR([
+
+libgssapi or libgssglue is not found, which is required by GSS.
+])
                                            else
-                                               AC_MSG_WARN([libgssapi or libgssglue is not found, which is required by GSS.])
+                                               AC_MSG_WARN([
+
+libgssapi or libgssglue is not found, which is required by GSS.
+])
                                            fi])],)
                AC_SUBST(GSSAPI_LIBS)
        fi
@@ -433,7 +454,6 @@ LB_LINUX_TRY_COMPILE([
                AC_MSG_RESULT([yes])
        ],[
                AC_MSG_RESULT([no])
-               AC_MSG_CHECKING([if quotactl_ops.set_dqblk takes struct kqid&fs_disk_quota])
        ])
 ])
 EXTRA_KCFLAGS="$tmp_flags"
@@ -745,6 +765,24 @@ AC_DEFUN([LC_HAVE_FHANDLE_SYSCALLS],
 ])
 
 #
+# 2.6.39 renames is_owner_or_cap to inode_owner_or_capable
+#
+AC_DEFUN([LC_HAVE_INODE_OWNER_OR_CAPABLE],
+[AC_MSG_CHECKING([if inode_owner_or_capable exist])
+LB_LINUX_TRY_COMPILE([
+       #include <linux/fs.h>
+],[
+       inode_owner_or_capable(NULL);
+],[
+       AC_DEFINE(HAVE_INODE_OWNER_OR_CAPABLE, 1,
+               [inode_owner_or_capable exist])
+       AC_MSG_RESULT([yes])
+],[
+       AC_MSG_RESULT([no])
+])
+])
+
+#
 # 3.0 dirty_inode() has a flag parameter
 # see kernel commit aa38572954ade525817fe88c54faebf85e5a61c0
 #
@@ -1416,6 +1454,22 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
+# 3.13 has vfs_renane with 5 args
+AC_DEFUN([LC_VFS_RENAME_5ARGS],
+[AC_MSG_CHECKING([if kernel has vfs_rename with 5 args])
+LB_LINUX_TRY_COMPILE([
+       #include <linux/fs.h>
+],[
+       vfs_rename(NULL, NULL, NULL, NULL, NULL);
+], [
+       AC_MSG_RESULT([yes])
+       AC_DEFINE(HAVE_VFS_RENAME_5ARGS, 1,
+               [kernel has vfs_rename with 5 args])
+],[
+       AC_MSG_RESULT([no])
+])
+])
+
 #
 # LC_PROG_LINUX
 #
@@ -1467,6 +1521,7 @@ AC_DEFUN([LC_PROG_LINUX],
         LC_HAVE_FHANDLE_SYSCALLS
         LC_HAVE_FSTYPE_MOUNT
         LC_IOP_TRUNCATE
+        LC_HAVE_INODE_OWNER_OR_CAPABLE
 
         # 3.0
         LC_DIRTY_INODE_WITH_FLAG
@@ -1527,6 +1582,9 @@ AC_DEFUN([LC_PROG_LINUX],
         LC_OLDSIZE_TRUNCATE_PAGECACHE
         LC_KIOCB_KI_LEFT
 
+        # 3.13
+        LC_VFS_RENAME_5ARGS
+
         #
         if test x$enable_server != xno ; then
                LC_FUNC_DEV_SET_RDONLY
@@ -1807,9 +1865,14 @@ AC_CHECK_LIB([z],
                                [ZLIB="-lz"
                                 AC_DEFINE([HAVE_ADLER], 1,
                                           [support alder32 checksum type])],
-                               [AC_MSG_WARN([No zlib-devel package found,
-                                             unable to use adler32 checksum])])],
-             [AC_MSG_WARN([No zlib package found, unable to use adler32 checksum])]
+                               [AC_MSG_WARN([
+
+No zlib-devel package found, unable to use adler32 checksum
+])])],
+             [AC_MSG_WARN([
+
+No zlib package found, unable to use adler32 checksum
+])]
 )
 AC_SUBST(ZLIB)
 
@@ -1820,11 +1883,14 @@ AC_CHECK_LIB([selinux],
                                [SELINUX="-lselinux"
                                AC_DEFINE([HAVE_SELINUX], 1,
                                                [support for selinux ])],
-                               [AC_MSG_WARN([No selinux-devel package found,
-                                               unable to build selinux enabled
-                                               tools])])],
-               [AC_MSG_WARN([No selinux package found, unable to build selinux
-                               enabled tools])]
+                               [AC_MSG_WARN([
+
+No selinux-devel package found, unable to build selinux enabled tools
+])])],
+               [AC_MSG_WARN([
+
+No selinux package found, unable to build selinux enabled tools
+])]
 )
 AC_SUBST(SELINUX)