Whamcloud - gitweb
LU-13225 utils: fix install path for bash-completion
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 09240cb..4c8bef4 100644 (file)
@@ -56,6 +56,16 @@ AC_CHECK_FUNCS([name_to_handle_at],
 ]) # LC_GLIBC_SUPPORT_FHANDLES
 
 #
+# LC_GLIBC_SUPPORT_COPY_FILE_RANGE
+#
+AC_DEFUN([LC_GLIBC_SUPPORT_COPY_FILE_RANGE], [
+AC_CHECK_FUNCS([copy_file_range],
+       [AC_DEFINE(HAVE_COPY_FILE_RANGE, 1,
+               [copy_file_range() is supported])],
+       [AC_MSG_WARN([copy_file_range() is not supported])])
+]) # LC_GLIBC_SUPPORT_COPY_FILE_RANGE
+
+#
 # LC_STACK_SIZE
 #
 # Ensure the stack size is at least 8k in Lustre server (all kernels)
@@ -102,7 +112,7 @@ AC_ARG_ENABLE([pinger],
        [], [enable_pinger="yes"])
 AC_MSG_RESULT([$enable_pinger])
 AS_IF([test "x$enable_pinger" != xno],
-       [AC_DEFINE(CONFIG_LUSTRE_PINGER, 1,[Use the Pinger])])
+       [AC_DEFINE(CONFIG_LUSTRE_FS_PINGER, 1,[Use the Pinger])])
 ]) # LC_CONFIG_PINGER
 
 #
@@ -285,6 +295,18 @@ AC_ARG_ENABLE([gss],
        [], [enable_gss="auto"])
 AC_MSG_RESULT([$enable_gss])
 
+AC_ARG_VAR([TEST_JOBS],
+    [simultaneous jobs during configure (defaults to $(nproc))])
+if test "x$ac_cv_env_TEST_JOBS_set" != "xset"; then
+       TEST_JOBS=${TEST_JOBS:-$(nproc)}
+fi
+AC_SUBST(TEST_JOBS)
+
+AC_ARG_VAR([TEST_DIR],
+    [location of temporary parallel configure tests (defaults to $PWD/lb2)])
+       TEST_DIR=${TEST_DIR:-$PWD/_lpb}
+AC_SUBST(TEST_DIR)
+
 AS_IF([test "x$enable_gss" != xno], [
        LC_CONFIG_GSS_KEYRING
        LC_KEY_TYPE_INSTANTIATE_2ARGS
@@ -428,6 +450,23 @@ dir_context, [
 ]) # LC_HAVE_DIR_CONTEXT
 
 #
+# LC_D_COMPARE_5ARGS
+#
+# 3.11 dentry_operations.d_compare() taken 5 arguments.
+#
+AC_DEFUN([LC_D_COMPARE_5ARGS], [
+LB_CHECK_COMPILE([if 'd_compare' taken 5 arguments],
+d_compare_5args, [
+       #include <linux/dcache.h>
+],[
+       ((struct dentry_operations*)0)->d_compare(NULL,NULL,0,NULL,NULL);
+],[
+       AC_DEFINE(HAVE_D_COMPARE_5ARGS, 1,
+               [d_compare need 5 arguments])
+])
+]) # LC_D_COMPARE_5ARGS
+
+#
 # LC_HAVE_DCOUNT
 #
 # 3.11 need to access d_count to get dentry reference count
@@ -1519,6 +1558,24 @@ posix_acl_valid, [
 ]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
 
 #
+# LC_D_COMPARE_4ARGS
+#
+# Kernel version 4.8 commit 6fa67e707559303e086303aeecc9e8b91ef497d5
+# get rid of 'parent' argument of ->d_compare()
+#
+AC_DEFUN([LC_D_COMPARE_4ARGS], [
+LB_CHECK_COMPILE([if 'd_compare' taken 4 arguments],
+d_compare_4args, [
+       #include <linux/dcache.h>
+],[
+       ((struct dentry_operations*)0)->d_compare(NULL,0,NULL,NULL);
+],[
+       AC_DEFINE(HAVE_D_COMPARE_4ARGS, 1,
+               [d_compare need 4 arguments])
+])
+]) # LC_D_COMPARE_4ARGS
+
+#
 # LC_FULL_NAME_HASH_3ARGS
 #
 # Kernel version 4.8 commit 8387ff2577eb9ed245df9a39947f66976c6bcd02
@@ -1947,6 +2004,9 @@ vm_fault_t, [
 # When inode times are timespec64 stop using the deprecated
 # time interfaces.
 #
+# kernel v5.5-rc1-6-gba70609d5ec6 ba70609d5ec664a8f36ba1c857fcd97a478adf79
+# fs: Delete timespec64_trunc()
+#
 AC_DEFUN([LC_INODE_TIMESPEC64], [
 tmp_flags="$EXTRA_KCFLAGS"
 EXTRA_KCFLAGS="-Werror"
@@ -1955,9 +2015,9 @@ inode_timespec64, [
        #include <linux/fs.h>
 ],[
        struct inode *inode = NULL;
-       struct timespec64 ts = {};
+       struct timespec64 ts = {0, 1};
 
-       inode->i_atime = timespec64_trunc(ts, 1);
+       inode->i_atime = ts;
        (void)inode;
 ],[
        AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
@@ -2154,6 +2214,9 @@ lock_manager_ops_lm_compare_owner, [
 EXTRA_KCFLAGS="$tmp_flags"
 ]) # LC_LM_COMPARE_OWNER_EXISTS
 
+AC_DEFUN([LC_PROG_LINUX_SRC], [])
+AC_DEFUN([LC_PROG_LINUX_RESULTS], [])
+
 #
 # LC_FSCRYPT_SUPPORT
 #
@@ -2189,6 +2252,7 @@ AC_DEFUN([LC_PROG_LINUX], [
        LC_CONFIG_GSS
 
        LC_GLIBC_SUPPORT_FHANDLES
+       LC_GLIBC_SUPPORT_COPY_FILE_RANGE
        LC_OPENSSL_SSK
        LC_OPENSSL_GETSEPOL
 
@@ -2198,6 +2262,7 @@ AC_DEFUN([LC_PROG_LINUX], [
        # 3.11
        LC_INVALIDATE_RANGE
        LC_HAVE_DIR_CONTEXT
+       LC_D_COMPARE_5ARGS
        LC_HAVE_DCOUNT
        LC_HAVE_DENTRY_D_U_D_ALIAS
        LC_HAVE_DENTRY_D_CHILD
@@ -2289,6 +2354,7 @@ AC_DEFUN([LC_PROG_LINUX], [
 
        # 4.8
        LC_HAVE_POSIX_ACL_VALID_USER_NS
+       LC_D_COMPARE_4ARGS
        LC_FULL_NAME_HASH_3ARGS
        LC_STRUCT_POSIX_ACL_XATTR
        LC_IOP_XATTR
@@ -2559,6 +2625,9 @@ ext2fs.h not found. Please install e2fsprogs development package.
        ])
 ])
 
+# lustre/tests/statx_test.c
+AC_CHECK_FUNCS([statx])
+
 # lustre/utils/lfs.c
 AS_IF([test "$enable_dist" = "no"], [
                AC_CHECK_LIB([z], [crc32], [
@@ -2589,6 +2658,8 @@ No selinux package found, unable to build selinux enabled tools
 ])
 AC_SUBST(SELINUX)
 
+AC_CHECK_LIB([keyutils], [add_key])
+
 # Super safe df
 AC_MSG_CHECKING([whether to report minimum OST free space])
 AC_ARG_ENABLE([mindf],
@@ -2665,7 +2736,7 @@ AC_ARG_WITH([bash-completion-dir],
 AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
        BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
        AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
-               [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"]
+               [BASH_COMPLETION_DIR="/usr/share/bash-completion/completions"]
        ])
 ], [
        BASH_COMPLETION_DIR="$with_bash_completion_dir"
@@ -2715,6 +2786,7 @@ lustre/doc/Makefile
 lustre/include/Makefile
 lustre/include/lustre/Makefile
 lustre/include/uapi/linux/lustre/Makefile
+lustre/kernel_patches/targets/4.18-rhel8.2.target
 lustre/kernel_patches/targets/4.18-rhel8.1.target
 lustre/kernel_patches/targets/4.18-rhel8.target
 lustre/kernel_patches/targets/3.10-rhel7.8.target
@@ -2723,13 +2795,8 @@ lustre/kernel_patches/targets/3.10-rhel7.6.target
 lustre/kernel_patches/targets/3.10-rhel7.5.target
 lustre/kernel_patches/targets/4.14-rhel7.5.target
 lustre/kernel_patches/targets/4.14-rhel7.6.target
-lustre/kernel_patches/targets/3.0-sles11.target
-lustre/kernel_patches/targets/3.0-sles11sp3.target
-lustre/kernel_patches/targets/3.0-sles11sp4.target
-lustre/kernel_patches/targets/3.12-sles12.target
-lustre/kernel_patches/targets/4.4-sles12.target
-lustre/kernel_patches/targets/4.4-sles12sp3.target
 lustre/kernel_patches/targets/4.12-sles12sp4.target
+lustre/kernel_patches/targets/4.12-sles12sp5.target
 lustre/kernel_patches/targets/4.12-sles15sp1.target
 lustre/kernel_patches/targets/3.x-fc18.target
 lustre/ldlm/Makefile