]) # LC_BIO_ENDIO_USES_ONE_ARG
#
+# LC_ACCOUNT_PAGE_DIRTIED_3ARGS
+#
+# 4.2 [to 4.5] kernel page dirtied takes 3 arguments
+#
+AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED_3ARGS], [
+LB_CHECK_COMPILE([if 'account_page_dirtied' with 3 args exists],
+account_page_dirtied, [
+ #include <linux/mm.h>
+],[
+ account_page_dirtied(NULL, NULL, NULL);
+],[
+ AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED_3ARGS, 1,
+ [account_page_dirtied takes three arguments])
+])
+]) # LC_ACCOUNT_PAGE_DIRTIED_3ARGS
+
+#
# LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
#
# 4.3 replace interval with interval_exp in 'struct blk_integrity'
]) # LC_D_IN_LOOKUP
#
+# LC_LOCK_PAGE_MEMCG
+#
+# Kernel version 4.6 adds lock_page_memcg
+#
+AC_DEFUN([LC_LOCK_PAGE_MEMCG], [
+LB_CHECK_COMPILE([if 'lock_page_memcg' is defined],
+lock_page_memcg, [
+ #include <linux/memcontrol.h>
+],[
+ lock_page_memcg(NULL);
+],[
+ AC_DEFINE(HAVE_LOCK_PAGE_MEMCG, 1,
+ [lock_page_memcg is defined])
+])
+]) # LC_LOCK_PAGE_MEMCG
+
+#
# LC_DIRECTIO_2ARGS
#
# Kernel version 4.7 commit c8b8e32d700fe943a935e435ae251364d016c497
#
# LC_FOP_ITERATE_SHARED
#
-# Kernel version 4.7 adds iterate_shared method to file_operations
+# Kernel v4.6-rc3-29-g6192269 adds iterate_shared method to file_operations
#
AC_DEFUN([LC_FOP_ITERATE_SHARED], [
LB_CHECK_COMPILE([if 'file_operations' has 'iterate_shared'],
]) # LC_FOP_ITERATE_SHARED
#
-# LC_FOPS_ITERATE_SHARED
-#
-# 4.7 commit ae05327a00fd47c34dfe25294b359a3f3fef96e8
-# ext4: switch to ->iterate_shared()
-# this replaces ext4_dir_operations iterate with iterate_shared.
-# dir_relaxed_shared() was also added in this commit, so we can
-# use that function to verify that the ext4_dir_operations is using
-# iterate_shared.
-#
-AC_DEFUN([LC_FOPS_ITERATE_SHARED], [
-LB_CHECK_COMPILE([if ext4_dir_operations uses iterate_shared],
-iterate_shared, [
- #include <linux/fs.h>
-],[
- ((struct file_operations *)0)->iterate_shared(NULL, NULL);
- dir_relax_shared(NULL);
-],[
- AC_DEFINE(HAVE_ITERATE_SHARED, 1,
- ['iterate_shared' is available])
-])
-]) # LC_FOPS_ITERATE_SHARED
-
-#
# LC_HAVE_POSIX_ACL_VALID_USER_NS
#
# 4.8 posix_acl_valid takes struct user_namespace
]) # LC_BI_STATUS
#
-# LC_UAPI_LINUX_MOUNT_H
-#
-# kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
-# vfs: Suppress MS_* flag defs within the kernel ...
-#
-AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_CHECK_COMPILE([if MS_RDONLY was moved to uapi/linux/mount.h],
-uapi_linux_mount, [
- #include <uapi/linux/mount.h>
-],[
- int x = MS_RDONLY;
- (void)x;
-],[
- AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
- [if MS_RDONLY was moved to uapi/linux/mount.h])
-])
-EXTRA_KCFLAGS="$tmp_flags"
-]) # LC_UAPI_LINUX_MOUNT_H
-
-#
-# LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
-#
-# kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
-# SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
-#
-# Now that the reader functions are all RCU protected, use a regular
-# spinlock rather than a reader/writer lock.
-#
-AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_CHECK_COMPILE([if cache_detail->hash_lock is a spinlock],
-hash_lock_isa_spinlock_t, [
- #include <linux/sunrpc/cache.h>
-],[
- spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
- spin_lock(lock);
-],[
- AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
- [if cache_detail->hash_lock is a spinlock])
-])
-EXTRA_KCFLAGS="$tmp_flags"
-]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
-
-#
# LC_BIO_INTEGRITY_ENABLED
#
# 4.13 removed bio_integrity_enabled
inode_timespec64, [
#include <linux/fs.h>
],[
- struct inode inode = {};
+ struct inode *inode = NULL;
struct timespec64 ts = {};
- inode.i_atime = timespec64_trunc(ts, 1);
+ inode->i_atime = timespec64_trunc(ts, 1);
(void)inode;
],[
AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
]) # LC_INODE_TIMESPEC64
#
+# LC___XA_SET_MARK
+#
+# kernel 4.20 commit v4.19-rc5-248-g9b89a0355144
+# xarray: Add XArray marks
+#
+AC_DEFUN([LC___XA_SET_MARK], [
+LB_CHECK_COMPILE([if '__xa_set_mark' exists],
+__xa_set_mark, [
+ #include <linux/xarray.h>
+ #include <linux/fs.h>
+],[
+ struct xarray *xa = NULL;
+
+ __xa_set_mark(xa, 0, PAGECACHE_TAG_DIRTY);
+],[
+ AC_DEFINE(HAVE___XA_SET_MARK, 1,
+ [__xa_set_mark exists])
+])
+]) # LC___XA_SET_MARK
+
+#
+# LC_UAPI_LINUX_MOUNT_H
+#
+# kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
+# vfs: Suppress MS_* flag defs within the kernel ...
+#
+AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_CHECK_COMPILE([if MS_RDONLY was moved to uapi/linux/mount.h],
+uapi_linux_mount, [
+ #include <uapi/linux/mount.h>
+],[
+ int x = MS_RDONLY;
+ (void)x;
+],[
+ AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
+ [if MS_RDONLY was moved to uapi/linux/mount.h])
+])
+EXTRA_KCFLAGS="$tmp_flags"
+]) # LC_UAPI_LINUX_MOUNT_H
+
+#
+# LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
+#
+# kernel 4.20 commit 1863d77f15da0addcd293a1719fa5d3ef8cde3ca
+# SUNRPC: Replace the cache_detail->hash_lock with a regular spinlock
+#
+# Now that the reader functions are all RCU protected, use a regular
+# spinlock rather than a reader/writer lock.
+#
+AC_DEFUN([LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_CHECK_COMPILE([if cache_detail->hash_lock is a spinlock],
+hash_lock_isa_spinlock_t, [
+ #include <linux/sunrpc/cache.h>
+],[
+ spinlock_t *lock = &(((struct cache_detail *)0)->hash_lock);
+ spin_lock(lock);
+],[
+ AC_DEFINE(HAVE_CACHE_HASH_SPINLOCK, 1,
+ [if cache_detail->hash_lock is a spinlock])
+])
+EXTRA_KCFLAGS="$tmp_flags"
+]) # LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
+
+#
# LC_HAS_LINUX_SELINUX_ENABLED
#
# kernel 5.1 commit 3d252529480c68bfd6a6774652df7c8968b28e41
]) # LC_HAS_LINUX_SELINUX_ENABLED
#
+# LC_ACCOUNT_PAGE_DIRTIED
+#
+# After 5.2 kernel page dirtied is not exported
+#
+AC_DEFUN([LC_ACCOUNT_PAGE_DIRTIED], [
+LB_CHECK_COMPILE([if 'account_page_dirtied' is exported],
+account_page_dirtied, [
+ #include <linux/mm.h>
+],[
+ account_page_dirtied(NULL, NULL);
+],[
+ AC_DEFINE(HAVE_ACCOUNT_PAGE_DIRTIED, 1,
+ [account_page_dirtied is available])
+])
+]) # LC_ACCOUNT_PAGE_DIRTIED
+
+#
# LC_BIO_BI_PHYS_SEGMENTS
#
# kernel 5.3-rc1 commit 14ccb66b3f585b2bc21e7256c96090abed5a512c
# 4.2
LC_BIO_ENDIO_USES_ONE_ARG
LC_SYMLINK_OPS_USE_NAMEIDATA
+ LC_ACCOUNT_PAGE_DIRTIED_3ARGS
# 4.3
LC_HAVE_INTERVAL_EXP_BLK_INTEGRITY
# 4.6
LC_HAVE_IN_COMPAT_SYSCALL
LC_HAVE_XATTR_HANDLER_INODE_PARAM
+ LC_LOCK_PAGE_MEMCG
# 4.7
LC_D_IN_LOOKUP
LC_DIRECTIO_2ARGS
LC_GENERIC_WRITE_SYNC_2ARGS
- LC_FOPS_ITERATE_SHARED
+ LC_FOP_ITERATE_SHARED
# 4.8
LC_HAVE_POSIX_ACL_VALID_USER_NS
LC_INODE_TIMESPEC64
# 4.20
- LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
-
- # 5.0
+ LC___XA_SET_MARK
LC_UAPI_LINUX_MOUNT_H
+ LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
# 5.1
LC_HAS_LINUX_SELINUX_ENABLED
+ # 5.2
+ LC_ACCOUNT_PAGE_DIRTIED
+
# 5.3
LC_BIO_BI_PHYS_SEGMENTS
LC_LM_COMPARE_OWNER_EXISTS
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
AC_MSG_RESULT([$with_systemdsystemunitdir])
+
+AC_MSG_CHECKING([bash-completion directory])
+AC_ARG_WITH([bash-completion-dir],
+ AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
+ [Install the bash auto-completion script in this directory.]),
+ [],
+ [with_bash_completion_dir=yes])
+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="$with_bash_completion_dir"
+])
+AC_SUBST([BASH_COMPLETION_DIR])
+AC_MSG_RESULT([$BASH_COMPLETION_DIR])
]) # LC_CONFIGURE
#
AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
+AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test "x$with_bash_completion_dir" != "xno")
AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes)