Whamcloud - gitweb
LU-3953 build: configure output improvments
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index e6207c9..e8802dc 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"
@@ -1021,25 +1041,6 @@ LB_LINUX_TRY_COMPILE([
 ])
 
 #
-# 3.4 switchs touch_atime to struct path
-# see kernel commit 68ac1234fb949b66941d94dce4157742799fc581
-#
-AC_DEFUN([LC_TOUCH_ATIME_1ARG],
-[AC_MSG_CHECKING([if touch_atime use one argument])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/fs.h>
-],[
-       touch_atime((struct path *)NULL);
-],[
-       AC_DEFINE(HAVE_TOUCH_ATIME_1ARG, 1,
-                 [touch_atime use one argument])
-       AC_MSG_RESULT([yes])
-],[
-       AC_MSG_RESULT([no])
-])
-])
-
-#
 # 3.4 converts d_alloc_root to d_make_root
 # see kernel commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b
 #
@@ -1291,28 +1292,6 @@ LB_LINUX_TRY_COMPILE([
 ])
 
 #
-# 3.9 killed f_vfsmnt by
-# 182be684784334598eee1d90274e7f7aa0063616
-# replacement is f_path.mnt
-#
-AC_DEFUN([LC_HAVE_F_PATH_MNT],
-[AC_MSG_CHECKING([if struct file has f_path.mnt])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/fs.h>
-],[
-       struct file *fp = NULL;
-       struct path  path;
-
-       path.mnt = fp->f_path.mnt;
-],[
-       AC_DEFINE(HAVE_F_PATH_MNT,1,[yes])
-       AC_MSG_RESULT([yes])
-],[
-       AC_MSG_RESULT([no])
-])
-])
-
-#
 # 3.10+ only supports procfs seq_files handling
 #
 AC_DEFUN([LC_HAVE_ONLY_PROCFS_SEQ],
@@ -1349,6 +1328,44 @@ LB_LINUX_TRY_COMPILE([
 ])
 
 #
+# 3.11 invalidatepage requires the length of the range to invalidate
+#
+AC_DEFUN([LC_INVALIDATE_RANGE],
+[AC_MSG_CHECKING([if address_space_operations.invalidatepage requires 3 arguments])
+LB_LINUX_TRY_COMPILE([
+       #include <linux/fs.h>
+],[
+       struct address_space_operations a_ops;
+
+       a_ops.invalidatepage(NULL,0,0);
+],[
+       AC_DEFINE(HAVE_INVALIDATE_RANGE, 1, [address_space_operations.invalidatepage needs 3 arguments])
+       AC_MSG_RESULT([yes])
+],[
+       AC_MSG_RESULT([no])
+])
+])
+
+#
+# 3.11 readdir now takes the new struct dir_context
+#
+AC_DEFUN([LC_HAVE_DIR_CONTEXT],
+[AC_MSG_CHECKING([if dir_context exist])
+LB_LINUX_TRY_COMPILE([
+       #include <linux/fs.h>
+],[
+       struct dir_context ctx;
+
+       ctx.pos = 0;
+],[
+       AC_DEFINE(HAVE_DIR_CONTEXT, 1, [dir_context exist])
+       AC_MSG_RESULT([yes])
+],[
+       AC_MSG_RESULT([no])
+])
+])
+
+#
 # 3.11 dentry_operations.d_compare() taken 5 arguments.
 #
 AC_DEFUN([LC_D_COMPARE_5ARGS],
@@ -1493,7 +1510,6 @@ AC_DEFUN([LC_PROG_LINUX],
         LC_HAVE_CACHE_REGISTER
 
         # 3.4
-        LC_TOUCH_ATIME_1ARG
         LC_HAVE_D_MAKE_ROOT
         LC_KMAP_ATOMIC_HAS_1ARG
 
@@ -1516,13 +1532,14 @@ AC_DEFUN([LC_PROG_LINUX],
 
         # 3.9
         LC_HAVE_HLIST_FOR_EACH_3ARG
-        LC_HAVE_F_PATH_MNT
 
         # 3.10
         LC_HAVE_ONLY_PROCFS_SEQ
         LC_BLKDEV_RELEASE_RETURN_INT
 
         # 3.11
+        LC_INVALIDATE_RANGE
+        LC_HAVE_DIR_CONTEXT
         LC_D_COMPARE_5ARGS
         LC_HAVE_DCOUNT
 
@@ -1810,9 +1827,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)
 
@@ -1823,11 +1845,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)