]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - configure
Merge branch 'add_breaks_replaces_zfs_initramfs' into 'master'
[mirror_zfs-debian.git] / configure
index 23c90c2e30eb0deccc39133659a619b9342c6e7e..8b1281d994d6bf3104ef766025486db1f761e100 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63.
+# Generated by GNU Autoconf 2.63 for zfs 0.7.11.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -741,11 +741,11 @@ MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
+PACKAGE_NAME='zfs'
+PACKAGE_TARNAME='zfs'
+PACKAGE_VERSION='0.7.11'
+PACKAGE_STRING='zfs 0.7.11'
+PACKAGE_BUGREPORT=''
 
 # Factoring default headers for most tests.
 ac_includes_default="\
@@ -787,23 +787,47 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
-DEBUG_DMU_TX
+DEBUG_CFLAGS
 DEBUG_ZFS
 DEBUG_STACKFLAGS
-DEBUG_CFLAGS
+WANT_MMAP_LIBAIO_FALSE
+WANT_MMAP_LIBAIO_TRUE
+WANT_DEVNAME2DEVID_FALSE
+WANT_DEVNAME2DEVID_TRUE
+CONFIG_QAT_FALSE
+CONFIG_QAT_TRUE
 CONFIG_KERNEL_FALSE
 CONFIG_KERNEL_TRUE
 CONFIG_USER_FALSE
 CONFIG_USER_TRUE
+RM
+ZONENAME
+NO_FORMAT_TRUNCATION
+runstatedir
+LIBAIO
 FRAME_LARGER_THAN
-LIBSELINUX
+LIBUDEV
 LIBBLKID
+LIBTIRPC_CFLAGS
+LIBTIRPC
 LIBUUID
 ZLIB
+dracutdir
+ZFS_INIT_SYSV
+modulesloaddir
+systemdpresetdir
+systemdunitdir
+DEFINE_SYSTEMD
+ZFS_MODULE_LOAD
+ZFS_INIT_SYSTEMD
 udevruledir
 udevdir
+mounthelperdir
 KERNELCPPFLAGS
 KERNELMAKE_PARAMS
+QAT_SYMBOLS
+QAT_OBJ
+QAT_SRC
 SPL_SYMBOLS
 SPL_VERSION
 SPL_OBJ
@@ -812,15 +836,16 @@ LINUX_SYMBOLS
 LINUX_VERSION
 LINUX_OBJ
 LINUX
+TARGET_ASM_GENERIC_FALSE
+TARGET_ASM_GENERIC_TRUE
+TARGET_ASM_I386_FALSE
+TARGET_ASM_I386_TRUE
+TARGET_ASM_X86_64_FALSE
+TARGET_ASM_X86_64_TRUE
+TARGET_ASM_DIR
+NO_BOOL_COMPARE
 NO_UNUSED_BUT_SET_VARIABLE
 ZFS_CONFIG
-TARGET_ASM_DIR
-MAKEPKG_VERSION
-MAKEPKG
-HAVE_MAKEPKG
-PACMAN_VERSION
-PACMAN
-HAVE_PACMAN
 ALIEN_VERSION
 ALIEN
 HAVE_ALIEN
@@ -830,16 +855,40 @@ HAVE_DPKGBUILD
 DPKG_VERSION
 DPKG
 HAVE_DPKG
+SRPM_DEFINE_COMMON
+SRPM_DEFINE_DKMS
+SRPM_DEFINE_KMOD
+SRPM_DEFINE_UTIL
+RPM_DEFINE_COMMON
+RPM_DEFINE_DKMS
+RPM_DEFINE_KMOD
+RPM_DEFINE_UTIL
+RPM_SPEC_DIR
 RPMBUILD_VERSION
 RPMBUILD
 HAVE_RPMBUILD
 RPM_VERSION
 RPM
 HAVE_RPM
+MULTIARCH_LIBDIR
+DEFINE_INITRAMFS
+DEFAULT_INITCONF_DIR
 DEFAULT_INIT_SCRIPT
 DEFAULT_INIT_DIR
 DEFAULT_PACKAGE
 VENDOR
+CODE_COVERAGE_RULES
+CODE_COVERAGE_LDFLAGS
+CODE_COVERAGE_LIBS
+CODE_COVERAGE_CXXFLAGS
+CODE_COVERAGE_CFLAGS
+CODE_COVERAGE_CPPFLAGS
+GENHTML
+LCOV
+GCOV
+CODE_COVERAGE_ENABLED
+CODE_COVERAGE_ENABLED_FALSE
+CODE_COVERAGE_ENABLED_TRUE
 am__fastdepCCAS_FALSE
 am__fastdepCCAS_TRUE
 CCASDEPMODE
@@ -886,7 +935,6 @@ am__tar
 AMTAR
 am__leading_dot
 SET_MAKE
-AWK
 mkdir_p
 MKDIR_P
 INSTALL_STRIP_PROGRAM
@@ -928,9 +976,11 @@ ZFS_META_AUTHOR
 ZFS_META_DATA
 ZFS_META_ALIAS
 ZFS_META_LICENSE
+RELEASE
 ZFS_META_RELEASE
 ZFS_META_VERSION
 ZFS_META_NAME
+AWK
 target_alias
 host_alias
 build_alias
@@ -980,6 +1030,9 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+with_gcov
+enable_code_coverage
+with_spec
 with_config
 enable_linux_builtin
 with_linux
@@ -987,12 +1040,20 @@ with_linux_obj
 with_spl
 with_spl_obj
 with_spl_timeout
+with_qat
+with_qat_obj
+with_mounthelperdir
 with_udevdir
 with_udevruledir
-with_blkid
-with_selinux
+enable_systemd
+with_systemdunitdir
+with_systemdpresetdir
+with_systemdmodulesloaddir
+enable_sysvinit
+with_dracutdir
+with_tirpc
 enable_debug
-enable_debug_dmu_tx
+enable_debuginfo
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1045,7 +1106,7 @@ sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
 infodir='${datarootdir}/info'
 htmldir='${docdir}'
 dvidir='${docdir}'
@@ -1557,7 +1618,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures zfs 0.7.11 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1605,7 +1666,7 @@ Fine tuning of the installation directories:
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/zfs]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1627,7 +1688,9 @@ _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
-
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of zfs 0.7.11:";;
+   esac
   cat <<\_ACEOF
 
 Optional Features:
@@ -1645,10 +1708,14 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-code-coverage  Whether to enable code coverage support
   --enable-linux-builtin  Configure for builtin in-tree kernel modules
                           [default=no]
-  --enable-debug          Enable generic debug support [default=no]
-  --enable-debug-dmu-tx   Enable dmu tx validation [default=no]
+  --enable-systemd        install systemd unit/preset files
+                          [default:], [yes]
+  --enable-sysvinit       install SysV init scripts default:, yes
+  --enable-debug          Enable assertion support [default=no]
+  --enable-debuginfo      Force generation of debuginfo [default=no]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1656,16 +1723,31 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gcov=GCOV        use given GCOV for coverage (GCOV=gcov).
+  --with-spec=SPEC        Spec files 'generic|redhat'
   --with-config=CONFIG    Config file 'kernel|user|all|srpm'
   --with-linux=PATH       Path to kernel source
   --with-linux-obj=PATH   Path to kernel build objects
   --with-spl=PATH         Path to spl source
   --with-spl-obj=PATH     Path to spl build objects
-  --with-spl-timeout=SECS Wait SECS for symvers file to appear [default=0]
-  --with-udevdir=DIR      install udev helpers [EPREFIX/lib/udev]
+  --with-spl-timeout=SECS Wait SECS for SPL header and symver file [default=0]
+  --with-qat=PATH         Path to qat source
+  --with-qat-obj=PATH     Path to qat build objects
+  --with-mounthelperdir=DIR
+                          install mount.zfs in dir [/sbin]
+  --with-udevdir=DIR      install udev helpers [default=check]
   --with-udevruledir=DIR  install udev rules [UDEVDIR/rules.d]
-  --with-blkid            support blkid caching [default=check]
-  --with-selinux          support selinux [default=check]
+  --with-systemdunitdir=DIR
+                          install systemd unit files in dir
+                          [/usr/lib/systemd/system]
+  --with-systemdpresetdir=DIR
+                          install systemd preset files in dir
+                          [/usr/lib/systemd/system-preset]
+  --with-systemdmodulesloaddir=DIR
+                          install systemd module load files into dir
+                          [/usr/lib/modules-load.d]
+  --with-dracutdir=DIR    install dracut helpers [default=check]
+  --with-tirpc            use tirpc for xdr encoding [default=check]
 
 Some influential environment variables:
   CC          C compiler command
@@ -1744,7 +1826,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-configure
+zfs configure 0.7.11
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1758,7 +1840,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by $as_me, which was
+It was created by zfs $as_me 0.7.11, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2106,6 +2188,14 @@ fi
 
 
 
+
+
+
+
+
+
+
+
 
 
 
@@ -2129,24 +2219,57 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+       for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
        { $as_echo "$as_me:$LINENO: checking metadata" >&5
 $as_echo_n "checking metadata... " >&6; }
 
        META="$srcdir/META"
-       _zfs_ac_meta_got_file=no
+       _zfs_ac_meta_type="none"
        if test -f "$META"; then
-               _zfs_ac_meta_got_file=yes
-
-               ZFS_META_NAME=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               '(?:NAME|PROJECT|PACKAGE)' $META`;
+               _zfs_ac_meta_type="META file"
+
+               ZFS_META_NAME=`$AWK -F ':[ \t]+' '$1 ~ /^ *(Name|Project|Package)$/ { print $2; exit }' $META`;
                if test -n "$ZFS_META_NAME"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2156,16 +2279,7 @@ _ACEOF
 
                fi
 
-               ZFS_META_VERSION=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               'VERSION' $META`;
+               ZFS_META_VERSION=`$AWK -F ':[ \t]+' '$1 ~ /^ *Version$/ { print $2; exit }' $META`;
                if test -n "$ZFS_META_VERSION"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2175,16 +2289,25 @@ _ACEOF
 
                fi
 
-               ZFS_META_RELEASE=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               'RELEASE' $META`;
+               ZFS_META_RELEASE=`$AWK -F ':[ \t]+' '$1 ~ /^ *Release$/ { print $2; exit }' $META`;
+               if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then
+                       _match="${ZFS_META_NAME}-${ZFS_META_VERSION}"
+                       _alias=$(git describe --match=${_match} 2>/dev/null)
+                       _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
+                       if test -n "${_release}"; then
+                               ZFS_META_RELEASE=${_release}
+                               _zfs_ac_meta_type="git describe"
+                       else
+                               _match="${ZFS_META_NAME}-${ZFS_META_VERSION}-${ZFS_META_RELEASE}"
+                               _alias=$(git describe --match=${_match} 2>/dev/null)
+                               _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
+                               if test -n "${_release}"; then
+                                       ZFS_META_RELEASE=${_release}
+                                       _zfs_ac_meta_type="git describe"
+                               fi
+                       fi
+               fi
+
                if test -n "$ZFS_META_RELEASE"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2192,18 +2315,12 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+
+                       RELEASE="$ZFS_META_RELEASE"
+
                fi
 
-               ZFS_META_LICENSE=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               'LICENSE' $META`;
+               ZFS_META_LICENSE=`$AWK -F ':[ \t]+' '$1 ~ /^ *License$/ { print $2; exit }' $META`;
                if test -n "$ZFS_META_LICENSE"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2225,16 +2342,7 @@ _ACEOF
 
                fi
 
-               ZFS_META_DATA=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               'DATE' $META`;
+               ZFS_META_DATA=`$AWK -F ':[ \t]+' '$1 ~ /^ *Date$/ { print $2; exit }' $META`;
                if test -n "$ZFS_META_DATA"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2244,16 +2352,7 @@ _ACEOF
 
                fi
 
-               ZFS_META_AUTHOR=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               'AUTHOR' $META`;
+               ZFS_META_AUTHOR=`$AWK -F ':[ \t]+' '$1 ~ /^ *Author$/ { print $2; exit }' $META`;
                if test -n "$ZFS_META_AUTHOR"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2264,36 +2363,9 @@ _ACEOF
                fi
 
 
-               ZFS_META_LT_CURRENT=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               'LT_CURRENT' $META`;
-               ZFS_META_LT_REVISION=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               'LT_REVISION' $META`;
-               ZFS_META_LT_AGE=`perl -n\
-               -e "BEGIN { \\$key=shift @ARGV; }"\
-               -e "next unless s/^\s*\\$key[:=]//i;"\
-               -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\
-               -e "s/^\s+//;"\
-               -e "s/\s+$//;"\
-               -e "s/^(['\"])(.*)\1/\\$2/;"\
-               -e "\\$val=\\$_;"\
-               -e "END { print \\$val if defined \\$val; }"\
-               'LT_AGE' $META`;
+               ZFS_META_LT_CURRENT=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Current$/ { print $2; exit }' $META`;
+               ZFS_META_LT_REVISION=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Revision$/ { print $2; exit }' $META`;
+               ZFS_META_LT_AGE=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Age$/ { print $2; exit }' $META`;
                if test -n "$ZFS_META_LT_CURRENT" \
                                 -o -n "$ZFS_META_LT_REVISION" \
                                 -o -n "$ZFS_META_LT_AGE"; then
@@ -2321,8 +2393,8 @@ _ACEOF
                fi
        fi
 
-       { $as_echo "$as_me:$LINENO: result: $_zfs_ac_meta_got_file" >&5
-$as_echo "$_zfs_ac_meta_got_file" >&6; }
+       { $as_echo "$as_me:$LINENO: result: $_zfs_ac_meta_type" >&5
+$as_echo "$_zfs_ac_meta_type" >&6; }
 
 
 ac_aux_dir=
@@ -2356,6 +2428,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
+
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
@@ -2513,7 +2586,7 @@ fi
 case $enable_silent_rules in
 yes) AM_DEFAULT_VERBOSITY=0;;
 no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
 esac
 AM_BACKSLASH='\'
 
@@ -2861,48 +2934,6 @@ case $mkdir_p in
   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 esac
 
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
@@ -2966,8 +2997,8 @@ fi
 
 
 # Define the identity of the package.
- PACKAGE=$ZFS_META_NAME
- VERSION=$ZFS_META_VERSION
+ PACKAGE='zfs'
+ VERSION='0.7.11'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4844,13 +4875,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4847: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4878: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4850: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4881: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4853: output\"" >&5)
+  (eval echo "\"\$as_me:4884: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -6056,7 +6087,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6059 "configure"' > conftest.$ac_ext
+  echo '#line 6090 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7884,6 +7915,10 @@ _lt_linker_boilerplate=`cat conftest.err`
 $RM -r conftest*
 
 
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
 if test -n "$compiler"; then
 
 lt_prog_compiler_no_builtin_flag=
@@ -7909,11 +7944,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7912: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7947: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7916: \$? = $ac_status" >&5
+   echo "$as_me:7951: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8248,11 +8283,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8251: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8286: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8255: \$? = $ac_status" >&5
+   echo "$as_me:8290: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8353,11 +8388,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8356: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8391: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8360: \$? = $ac_status" >&5
+   echo "$as_me:8395: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8408,11 +8443,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8411: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8446: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8415: \$? = $ac_status" >&5
+   echo "$as_me:8450: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -11211,7 +11246,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11214 "configure"
+#line 11249 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11307,7 +11342,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11310 "configure"
+#line 11345 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11666,6 +11701,521 @@ else
 fi
 
 
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+   test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+      then
+       # cc works too.
+       :
+      else
+       # cc exists but doesn't like -o.
+       eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+
+
+
+       # allow to override gcov location
+
+# Check whether --with-gcov was given.
+if test "${with_gcov+set}" = set; then
+  withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov
+else
+  _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether to build with code coverage support" >&5
+$as_echo_n "checking whether to build with code coverage support... " >&6; }
+       # Check whether --enable-code-coverage was given.
+if test "${enable_code_coverage+set}" = set; then
+  enableval=$enable_code_coverage;
+else
+  enable_code_coverage=no
+fi
+
+
+        if test x$enable_code_coverage = xyes; then
+  CODE_COVERAGE_ENABLED_TRUE=
+  CODE_COVERAGE_ENABLED_FALSE='#'
+else
+  CODE_COVERAGE_ENABLED_TRUE='#'
+  CODE_COVERAGE_ENABLED_FALSE=
+fi
+
+       CODE_COVERAGE_ENABLED=$enable_code_coverage
+
+       { $as_echo "$as_me:$LINENO: result: $enable_code_coverage" >&5
+$as_echo "$enable_code_coverage" >&6; }
+
+       if  test "$enable_code_coverage" = "yes" ; then
+
+               # check for gcov
+               if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_GCOV+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$GCOV"; then
+  ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+GCOV=$ac_cv_prog_GCOV
+if test -n "$GCOV"; then
+  { $as_echo "$as_me:$LINENO: result: $GCOV" >&5
+$as_echo "$GCOV" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_GCOV"; then
+  ac_ct_GCOV=$GCOV
+  # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args.
+set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_GCOV+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_GCOV"; then
+  ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV
+if test -n "$ac_ct_GCOV"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_GCOV" >&5
+$as_echo "$ac_ct_GCOV" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_GCOV" = x; then
+    GCOV=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    GCOV=$ac_ct_GCOV
+  fi
+else
+  GCOV="$ac_cv_prog_GCOV"
+fi
+
+               if test "X$GCOV" = "X:"; then
+  { { $as_echo "$as_me:$LINENO: error: gcov is needed to do coverage" >&5
+$as_echo "$as_me: error: gcov is needed to do coverage" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+                               if  test "$GCC" = "no" ; then
+
+                       { { $as_echo "$as_me:$LINENO: error: not compiling with gcc, which is required for gcov code coverage" >&5
+$as_echo "$as_me: error: not compiling with gcc, which is required for gcov code coverage" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+               # Extract the first word of "lcov", so it can be a program name with args.
+set dummy lcov; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LCOV+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LCOV"; then
+  ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LCOV="lcov"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+LCOV=$ac_cv_prog_LCOV
+if test -n "$LCOV"; then
+  { $as_echo "$as_me:$LINENO: result: $LCOV" >&5
+$as_echo "$LCOV" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+               # Extract the first word of "genhtml", so it can be a program name with args.
+set dummy genhtml; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_GENHTML+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$GENHTML"; then
+  ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_GENHTML="genhtml"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+GENHTML=$ac_cv_prog_GENHTML
+if test -n "$GENHTML"; then
+  { $as_echo "$as_me:$LINENO: result: $GENHTML" >&5
+$as_echo "$GENHTML" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+               if  test -z "$LCOV" ; then
+
+                       { { $as_echo "$as_me:$LINENO: error: To enable code coverage reporting you must have lcov installed" >&5
+$as_echo "$as_me: error: To enable code coverage reporting you must have lcov installed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+               if  test -z "$GENHTML" ; then
+
+                       { { $as_echo "$as_me:$LINENO: error: Could not find genhtml from the lcov package" >&5
+$as_echo "$as_me: error: Could not find genhtml from the lcov package" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+                                               CODE_COVERAGE_CPPFLAGS=""
+               CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
+               CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
+               CODE_COVERAGE_LIBS="-lgcov"
+               CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS"
+
+
+
+
+
+
+
+               CODE_COVERAGE_RULES_CHECK='
+       -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
+       $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
+'
+               CODE_COVERAGE_RULES_CAPTURE='
+       $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)
+       $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS)
+       -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
+       $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
+       @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
+'
+               CODE_COVERAGE_RULES_CLEAN='
+clean: code-coverage-clean
+distclean: code-coverage-clean
+code-coverage-clean:
+       -$(LCOV) --directory $(top_builddir) -z
+       -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
+       -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete
+'
+
+else
+
+               CODE_COVERAGE_RULES_CHECK='
+       @echo "Need to reconfigure with --enable-code-coverage"
+'
+               CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK"
+               CODE_COVERAGE_RULES_CLEAN=''
+
+fi
+
+
+CODE_COVERAGE_RULES='
+# Code coverage
+#
+# Optional:
+#  - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
+#    Multiple directories may be specified, separated by whitespace.
+#    (Default: $(top_builddir))
+#  - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
+#    by lcov for code coverage. (Default:
+#    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
+#  - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
+#    reports to be created. (Default:
+#    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
+#  - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,
+#    set to 0 to disable it and leave empty to stay with the default.
+#    (Default: empty)
+#  - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov
+#    instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
+#  - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov
+#    instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
+#  - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
+#  - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the
+#    collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
+#  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov
+#    instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
+#  - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering
+#    lcov instance. (Default: empty)
+#  - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov
+#    instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
+#  - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the
+#    genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)
+#  - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
+#    instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
+#  - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
+#
+# The generated report will be titled using the $(PACKAGE_NAME) and
+# $(PACKAGE_VERSION). In order to add the current git hash to the title,
+# use the git-version-gen script, available online.
+
+# Optional variables
+CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
+CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
+CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
+CODE_COVERAGE_BRANCH_COVERAGE ?=
+CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
+--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
+CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)
+CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
+CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
+CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
+CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=
+CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
+CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
+$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
+--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
+CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
+CODE_COVERAGE_IGNORE_PATTERN ?=
+
+GITIGNOREFILES ?=
+GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
+
+code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
+code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_lcov_cap_0 = @echo "  LCOV   --capture"\
+ $(CODE_COVERAGE_OUTPUT_FILE);
+code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))
+code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_lcov_ign_0 = @echo "  LCOV   --remove /tmp/*"\
+ $(CODE_COVERAGE_IGNORE_PATTERN);
+code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))
+code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))
+code_coverage_v_genhtml_0 = @echo "  GEN   " $(CODE_COVERAGE_OUTPUT_DIRECTORY);
+code_coverage_quiet = $(code_coverage_quiet_$(V))
+code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
+code_coverage_quiet_0 = --quiet
+
+# sanitizes the test-name: replaces with underscores: dashes and dots
+code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))
+
+# Use recursive makes in order to ignore errors during check
+check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"'
+
+# Capture code coverage data
+code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"'
+
+# Hook rule executed before code-coverage-capture, overridable by the user
+code-coverage-capture-hook:
+
+'"$CODE_COVERAGE_RULES_CLEAN"'
+
+A''M_DISTCHECK_CONFIGURE_FLAGS ?=
+A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
+
+.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
+'
+
+
+
+
 
 
        { $as_echo "$as_me:$LINENO: checking zfs author" >&5
@@ -11702,6 +12252,8 @@ $as_echo_n "checking linux distribution... " >&6; }
                VENDOR=ubuntu ;
        elif test -f /etc/debian_version ; then
                VENDOR=debian ;
+       elif test -f /etc/alpine-release ; then
+               VENDOR=alpine ;
        else
                VENDOR= ;
        fi
@@ -11716,7 +12268,8 @@ $as_echo_n "checking default package type... " >&6; }
                redhat)     DEFAULT_PACKAGE=rpm  ;;
                fedora)     DEFAULT_PACKAGE=rpm  ;;
                gentoo)     DEFAULT_PACKAGE=tgz  ;;
-               arch)       DEFAULT_PACKAGE=arch ;;
+               alpine)     DEFAULT_PACKAGE=tgz  ;;
+               arch)       DEFAULT_PACKAGE=tgz  ;;
                sles)       DEFAULT_PACKAGE=rpm  ;;
                slackware)  DEFAULT_PACKAGE=tgz  ;;
                lunar)      DEFAULT_PACKAGE=tgz  ;;
@@ -11724,18 +12277,13 @@ $as_echo_n "checking default package type... " >&6; }
                debian)     DEFAULT_PACKAGE=deb  ;;
                *)          DEFAULT_PACKAGE=rpm  ;;
        esac
-
        { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5
 $as_echo "$DEFAULT_PACKAGE" >&6; }
 
 
+       DEFAULT_INIT_DIR=$sysconfdir/init.d
        { $as_echo "$as_me:$LINENO: checking default init directory" >&5
 $as_echo_n "checking default init directory... " >&6; }
-       case "$VENDOR" in
-               arch)       DEFAULT_INIT_DIR=$sysconfdir/rc.d ;;
-               *)          DEFAULT_INIT_DIR=$sysconfdir/init.d ;;
-       esac
-
        { $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_DIR" >&5
 $as_echo "$DEFAULT_INIT_DIR" >&6; }
 
@@ -11746,8 +12294,9 @@ $as_echo_n "checking default init script type... " >&6; }
                toss)       DEFAULT_INIT_SCRIPT=redhat ;;
                redhat)     DEFAULT_INIT_SCRIPT=redhat ;;
                fedora)     DEFAULT_INIT_SCRIPT=fedora ;;
-               gentoo)     DEFAULT_INIT_SCRIPT=gentoo ;;
-               arch)       DEFAULT_INIT_SCRIPT=arch   ;;
+               gentoo)     DEFAULT_INIT_SCRIPT=openrc ;;
+               alpine)     DEFAULT_INIT_SCRIPT=openrc ;;
+               arch)       DEFAULT_INIT_SCRIPT=lsb    ;;
                sles)       DEFAULT_INIT_SCRIPT=lsb    ;;
                slackware)  DEFAULT_INIT_SCRIPT=lsb    ;;
                lunar)      DEFAULT_INIT_SCRIPT=lunar  ;;
@@ -11755,11 +12304,40 @@ $as_echo_n "checking default init script type... " >&6; }
                debian)     DEFAULT_INIT_SCRIPT=lsb    ;;
                *)          DEFAULT_INIT_SCRIPT=lsb    ;;
        esac
-
        { $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_SCRIPT" >&5
 $as_echo "$DEFAULT_INIT_SCRIPT" >&6; }
 
 
+       { $as_echo "$as_me:$LINENO: checking default init config direectory" >&5
+$as_echo_n "checking default init config direectory... " >&6; }
+       case "$VENDOR" in
+               alpine)     DEFAULT_INITCONF_DIR=/etc/conf.d    ;;
+               gentoo)     DEFAULT_INITCONF_DIR=/etc/conf.d    ;;
+               toss)       DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
+               redhat)     DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
+               fedora)     DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
+               sles)       DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
+               ubuntu)     DEFAULT_INITCONF_DIR=/etc/default   ;;
+               debian)     DEFAULT_INITCONF_DIR=/etc/default   ;;
+               *)          DEFAULT_INITCONF_DIR=/etc/default   ;;
+       esac
+       { $as_echo "$as_me:$LINENO: result: $DEFAULT_INITCONF_DIR" >&5
+$as_echo "$DEFAULT_INITCONF_DIR" >&6; }
+
+
+       { $as_echo "$as_me:$LINENO: checking whether initramfs-tools is available" >&5
+$as_echo_n "checking whether initramfs-tools is available... " >&6; }
+       if test -d /usr/share/initramfs-tools ; then
+               DEFINE_INITRAMFS='--define "_initramfs 1"'
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               DEFINE_INITRAMFS=''
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       fi
+
+
 
        RPM=rpm
        RPMBUILD=rpmbuild
@@ -11800,6 +12378,74 @@ $as_echo "$HAVE_RPMBUILD" >&6; }
 fi
 
 
+       RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1"'
+
+
+       RPM_DEFINE_UTIL=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
+
+                                                if test -n "$dracutdir" ; then
+
+                RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)"'
+
+fi
+
+        if test -n "$udevdir" ; then
+
+                RPM_DEFINE_UTIL+=' --define "_udevdir $(udevdir)"'
+
+fi
+
+        if test -n "$udevruledir" ; then
+
+                RPM_DEFINE_UTIL+=' --define "_udevdir $(udevruledir)"'
+
+fi
+
+        RPM_DEFINE_UTIL+=' $(DEFINE_INITRAMFS)'
+        RPM_DEFINE_UTIL+=' $(DEFINE_SYSTEMD)'
+
+       RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)" --define "require_spldir $(SPL)" --define "require_splobj $(SPL_OBJ)" --define "ksrc $(LINUX)" --define "kobj $(LINUX_OBJ)"'
+       RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"'
+
+       RPM_DEFINE_DKMS=
+
+                                                               if test "$DEFAULT_PACKAGE" = "deb"; then
+
+               MULTIARCH_LIBDIR="lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
+               RPM_DEFINE_UTIL+=' --define "_lib $(MULTIARCH_LIBDIR)"'
+
+
+fi
+
+
+       SRPM_DEFINE_COMMON='--define "build_src_rpm 1"'
+       SRPM_DEFINE_UTIL=
+       SRPM_DEFINE_KMOD=
+       SRPM_DEFINE_DKMS=
+
+       RPM_SPEC_DIR="rpm/generic"
+
+# Check whether --with-spec was given.
+if test "${with_spec+set}" = set; then
+  withval=$with_spec; RPM_SPEC_DIR="rpm/$withval"
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether spec files are available" >&5
+$as_echo_n "checking whether spec files are available... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: yes ($RPM_SPEC_DIR/*.spec.in)" >&5
+$as_echo "yes ($RPM_SPEC_DIR/*.spec.in)" >&6; }
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 
 
 
-       if test "$VENDOR" = "arch"; then
-
-       PACMAN=pacman
-       MAKEPKG=makepkg
-
-       { $as_echo "$as_me:$LINENO: checking whether $PACMAN is available" >&5
-$as_echo_n "checking whether $PACMAN is available... " >&6; }
-       tmp=$($PACMAN --version 2>/dev/null)
-       if test -n "$tmp"; then
-
-               PACMAN_VERSION=$(echo $tmp |
-                                $AWK '/Pacman/ { print $3 }' |
-                                $SED 's/^v//')
-               HAVE_PACMAN=yes
-               { $as_echo "$as_me:$LINENO: result: $HAVE_PACMAN ($PACMAN_VERSION)" >&5
-$as_echo "$HAVE_PACMAN ($PACMAN_VERSION)" >&6; }
-
-else
-
-               HAVE_PACMAN=no
-               { $as_echo "$as_me:$LINENO: result: $HAVE_PACMAN" >&5
-$as_echo "$HAVE_PACMAN" >&6; }
-
-fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether $MAKEPKG is available" >&5
-$as_echo_n "checking whether $MAKEPKG is available... " >&6; }
-       tmp=$($MAKEPKG --version 2>/dev/null)
-       if test -n "$tmp"; then
-
-               MAKEPKG_VERSION=$(echo $tmp | $AWK '/makepkg/ { print $3 }')
-               HAVE_MAKEPKG=yes
-               { $as_echo "$as_me:$LINENO: result: $HAVE_MAKEPKG ($MAKEPKG_VERSION)" >&5
-$as_echo "$HAVE_MAKEPKG ($MAKEPKG_VERSION)" >&6; }
-
-else
-
-               HAVE_MAKEPKG=no
-               { $as_echo "$as_me:$LINENO: result: $HAVE_MAKEPKG" >&5
-$as_echo "$HAVE_MAKEPKG" >&6; }
-
-fi
-
-
-
-
-
-
-
-
-
-
-fi
-
-
-
-       TARGET_ASM_DIR=asm-generic
-
 
        ZFS_CONFIG=all
 
@@ -11972,16 +12559,7 @@ $as_echo_n "checking for -Wno-unused-but-set-variable support... " >&6; }
        saved_flags="$CFLAGS"
        CFLAGS="$CFLAGS -Wunused-but-set-variable"
 
-       if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -11996,467 +12574,729 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
 
                NO_UNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
 
                NO_UNUSED_BUT_SET_VARIABLE=
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
        CFLAGS="$saved_flags"
 
 
 
+       { $as_echo "$as_me:$LINENO: checking for -Wno-bool-compare support" >&5
+$as_echo_n "checking for -Wno-bool-compare support... " >&6; }
 
-       case "$ZFS_CONFIG" in
-               kernel)
-
+       saved_flags="$CFLAGS"
+       CFLAGS="$CFLAGS -Wbool-compare"
 
-# Check whether --with-linux was given.
-if test "${with_linux+set}" = set; then
-  withval=$with_linux; kernelsrc="$withval"
-fi
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
 
-# Check whether --with-linux-obj was given.
-if test "${with_linux_obj+set}" = set; then
-  withval=$with_linux_obj; kernelbuild="$withval"
-fi
+               NO_BOOL_COMPARE=-Wno-bool-compare
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
-$as_echo_n "checking kernel source directory... " >&6; }
-       if test -z "$kernelsrc"; then
 
-               if test -e "/lib/modules/$(uname -r)/source"; then
+               NO_BOOL_COMPARE=
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-                       headersdir="/lib/modules/$(uname -r)/source"
-                       sourcelink=$(readlink -f "$headersdir")
+fi
 
-elif test -e "/lib/modules/$(uname -r)/build"; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-                       headersdir="/lib/modules/$(uname -r)/build"
-                       sourcelink=$(readlink -f "$headersdir")
+       CFLAGS="$saved_flags"
 
-else
 
-                       sourcelink=$(ls -1d /usr/src/kernels/* \
-                                    /usr/src/linux-* \
-                                    2>/dev/null | grep -v obj | tail -1)
 
-fi
+       case "$host_cpu" in
+               x86_64 | x86 | i686)
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports SSE" >&5
+$as_echo_n "checking whether host toolchain supports SSE... " >&6; }
 
-               if test -n "$sourcelink" && test -e ${sourcelink}; then
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-                       kernelsrc=`readlink -f ${sourcelink}`
+               void main()
+               {
+                       __asm__ __volatile__("xorps %xmm0, %xmm1");
+               }
 
-else
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
-                       { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the kernel source with the '--with-linux=PATH' option." >&5
-$as_echo "$as_me: error:
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the kernel source with the '--with-linux=PATH' option." >&2;}
-   { (exit 1); exit 1; }; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSE 1
+_ACEOF
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-               if test "$kernelsrc" = "NONE"; then
-
-                       kernsrcver=NONE
-
-fi
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-       { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5
-$as_echo "$kernelsrc" >&6; }
-       { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
-$as_echo_n "checking kernel build directory... " >&6; }
-       if test -z "$kernelbuild"; then
-
-               if test -e "/lib/modules/$(uname -r)/build"; then
 
-                       kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports SSE2" >&5
+$as_echo_n "checking whether host toolchain supports SSE2... " >&6; }
 
-elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
+               void main()
+               {
+                       __asm__ __volatile__("pxor %xmm0, %xmm1");
+               }
 
-elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
 
-elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSE2 1
+_ACEOF
 
-                       kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                       kernelbuild=${kernelsrc}
-
-fi
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
-       { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5
-$as_echo "$kernelbuild" >&6; }
-
-       { $as_echo "$as_me:$LINENO: checking kernel source version" >&5
-$as_echo_n "checking kernel source version... " >&6; }
-       utsrelease1=$kernelbuild/include/linux/version.h
-       utsrelease2=$kernelbuild/include/linux/utsrelease.h
-       utsrelease3=$kernelbuild/include/generated/utsrelease.h
-       if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-               utsrelease=linux/version.h
 
-elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports SSE3" >&5
+$as_echo_n "checking whether host toolchain supports SSE3... " >&6; }
 
-               utsrelease=linux/utsrelease.h
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then
+               void main()
+               {
+                       char v[16];
+                       __asm__ __volatile__("lddqu %0,%%xmm0" :: "m"(v[0]));
+               }
 
-               utsrelease=generated/utsrelease.h
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
-fi
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSE3 1
+_ACEOF
 
-       if test "$utsrelease"; then
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-               kernsrcver=`(echo "#include <$utsrelease>";
-                            echo "kernsrcver=UTS_RELEASE") |
-                            cpp -I $kernelbuild/include |
-                            grep "^kernsrcver=" | cut -d \" -f 2`
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-               if test -z "$kernsrcver"; then
 
-                       { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-                       { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5
-$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
-   { (exit 1); exit 1; }; }
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-else
-
-               { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-               if test "x$enable_linux_builtin" != xyes; then
-                       { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
-$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;}
-   { (exit 1); exit 1; }; }
-               else
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Cannot find UTS_RELEASE definition.
-       *** Please run 'make prepare' inside the kernel source tree." >&5
-$as_echo "$as_me: error:
-       *** Cannot find UTS_RELEASE definition.
-       *** Please run 'make prepare' inside the kernel source tree." >&2;}
-   { (exit 1); exit 1; }; }
-               fi
 
-fi
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports SSSE3" >&5
+$as_echo_n "checking whether host toolchain supports SSSE3... " >&6; }
 
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-       { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
-$as_echo "$kernsrcver" >&6; }
+               void main()
+               {
+                       __asm__ __volatile__("pshufb %xmm0,%xmm1");
+               }
 
-       LINUX=${kernelsrc}
-       LINUX_OBJ=${kernelbuild}
-       LINUX_VERSION=${kernsrcver}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSSE3 1
+_ACEOF
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
-       modpost=$LINUX/scripts/Makefile.modpost
-       { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5
-$as_echo_n "checking kernel file name for module symbols... " >&6; }
-       if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-               if grep -q Modules.symvers $modpost; then
+fi
 
-                       LINUX_SYMBOLS=Modules.symvers
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-else
 
-                       LINUX_SYMBOLS=Module.symvers
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports SSE4.1" >&5
+$as_echo_n "checking whether host toolchain supports SSE4.1... " >&6; }
 
-fi
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+               void main()
+               {
+                       __asm__ __volatile__("pmaxsb %xmm0,%xmm1");
+               }
 
-               if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed.  If your building with a custom kernel make sure the
-       *** kernel is configured, built, and the '--with-linux=PATH' configure
-       *** option refers to the location of the kernel source." >&5
-$as_echo "$as_me: error:
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed.  If your building with a custom kernel make sure the
-       *** kernel is configured, built, and the '--with-linux=PATH' configure
-       *** option refers to the location of the kernel source." >&2;}
-   { (exit 1); exit 1; }; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSE4_1 1
+_ACEOF
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-               LINUX_SYMBOLS=NONE
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
-       { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
-$as_echo "$LINUX_SYMBOLS" >&6; }
-
-
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
 
-# Check whether --with-spl was given.
-if test "${with_spl+set}" = set; then
-  withval=$with_spl; splsrc="$withval"
-fi
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports SSE4.2" >&5
+$as_echo_n "checking whether host toolchain supports SSE4.2... " >&6; }
 
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+               void main()
+               {
+                       __asm__ __volatile__("pcmpgtq %xmm0, %xmm1");
+               }
 
-# Check whether --with-spl-obj was given.
-if test "${with_spl_obj+set}" = set; then
-  withval=$with_spl_obj; splbuild="$withval"
-fi
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSE4_2 1
+_ACEOF
 
-       { $as_echo "$as_me:$LINENO: checking spl source directory" >&5
-$as_echo_n "checking spl source directory... " >&6; }
-       if test -z "$splsrc"; then
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-                                                               sourcelink=`ls -1d /usr/src/spl-*/${LINUX_VERSION} \
-                           2>/dev/null | tail -1`
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                                                               if test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h; then
 
-                       sourcelink=`ls -1d /var/lib/dkms/spl/*/build \
-                                   2>/dev/null | tail -1`
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-                                                               if test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h; then
-
-                       sourcelink=../spl
-
-fi
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX" >&5
+$as_echo_n "checking whether host toolchain supports AVX... " >&6; }
 
-               if test -e $sourcelink/spl_config.h; then
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-                       splsrc=`readlink -f ${sourcelink}`
+               void main()
+               {
+                       char v[32];
+                       __asm__ __volatile__("vmovdqa %0,%%ymm0" :: "m"(v[0]));
+               }
 
-else
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
-                       { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Please make sure the spl devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the spl source with the '--with-spl=PATH' option." >&5
-$as_echo "$as_me: error:
-       *** Please make sure the spl devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the spl source with the '--with-spl=PATH' option." >&2;}
-   { (exit 1); exit 1; }; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AVX 1
+_ACEOF
 
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-               if test "$splsrc" = "NONE"; then
 
-                       splbuild=NONE
-                       splsrcver=NONE
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
-
-fi
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
 
-       { $as_echo "$as_me:$LINENO: result: $splsrc" >&5
-$as_echo "$splsrc" >&6; }
-       { $as_echo "$as_me:$LINENO: checking spl build directory" >&5
-$as_echo_n "checking spl build directory... " >&6; }
-       if test -z "$splbuild"; then
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX2" >&5
+$as_echo_n "checking whether host toolchain supports AVX2... " >&6; }
 
-               splbuild=${splsrc}
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
 
-       { $as_echo "$as_me:$LINENO: result: $splbuild" >&5
-$as_echo "$splbuild" >&6; }
+               void main()
+               {
+                       __asm__ __volatile__("vpshufb %ymm0,%ymm1,%ymm2");
+               }
 
-       { $as_echo "$as_me:$LINENO: checking spl source version" >&5
-$as_echo_n "checking spl source version... " >&6; }
-       if test -r $splbuild/spl_config.h &&
-               fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-               splsrcver=`(echo "#include <spl_config.h>";
-                           echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
-                           cpp -I $splbuild |
-                           grep "^splsrcver=" | tr -d \" | cut -d= -f2`
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AVX2 1
+_ACEOF
 
-fi
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       if test -z "$splsrcver"; then
 
-               { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-               { { $as_echo "$as_me:$LINENO: error:
-       *** Cannot determine the version of the spl source.
-       *** Please prepare the spl source before running this script" >&5
-$as_echo "$as_me: error:
-       *** Cannot determine the version of the spl source.
-       *** Please prepare the spl source before running this script" >&2;}
-   { (exit 1); exit 1; }; }
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-       { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5
-$as_echo "$splsrcver" >&6; }
 
-       SPL=${splsrc}
-       SPL_OBJ=${splbuild}
-       SPL_VERSION=${splsrcver}
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512F" >&5
+$as_echo_n "checking whether host toolchain supports AVX512F... " >&6; }
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
+               void main()
+               {
+                       __asm__ __volatile__("vpandd %zmm0,%zmm1,%zmm2");
+               }
 
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AVX512F 1
+_ACEOF
 
 
-# Check whether --with-spl-timeout was given.
-if test "${with_spl_timeout+set}" = set; then
-  withval=$with_spl_timeout; timeout="$withval"
 else
-  timeout=0
-fi
-
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5
-$as_echo_n "checking spl file name for module symbols... " >&6; }
-       SPL_SYMBOLS=NONE
 
-       while true; do
-               if test -r $SPL_OBJ/Module.symvers; then
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-                       SPL_SYMBOLS=Module.symvers
+fi
 
-elif test -r $SPL_OBJ/Modules.symvers; then
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-                       SPL_SYMBOLS=Modules.symvers
 
-elif test -r $SPL_OBJ/module/Module.symvers; then
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512CD" >&5
+$as_echo_n "checking whether host toolchain supports AVX512CD... " >&6; }
 
-                       SPL_SYMBOLS=Module.symvers
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-elif test -r $SPL_OBJ/module/Modules.symvers; then
 
-                       SPL_SYMBOLS=Modules.symvers
+               void main()
+               {
+                       __asm__ __volatile__("vplzcntd %zmm0,%zmm1");
+               }
 
-fi
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-               if test $SPL_SYMBOLS != NONE -o $timeout -le 0; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AVX512CD 1
+_ACEOF
 
-                       break;
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                       sleep 1
-                       timeout=$((timeout-1))
-
-fi
-
-       done
-
-       if test "$SPL_SYMBOLS" = NONE; then
 
-               SPL_SYMBOLS=$LINUX_SYMBOLS
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-       { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5
-$as_echo "$SPL_SYMBOLS" >&6; }
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5
-$as_echo_n "checking whether modules can be built... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512DQ" >&5
+$as_echo_n "checking whether host toolchain supports AVX512DQ... " >&6; }
 
-cat confdefs.h - <<_ACEOF >conftest.c
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12464,84 +13304,123 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
+               void main()
+               {
+                       __asm__ __volatile__("vandpd %zmm0,%zmm1,%zmm2");
+               }
 
 _ACEOF
-
-
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AVX512DQ 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-               if test "x$enable_linux_builtin" != xyes; then
-                       { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5
-$as_echo "$as_me: error: *** Unable to build an empty module." >&2;}
-   { (exit 1); exit 1; }; }
-               else
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Unable to build an empty module.
-       *** Please run 'make scripts' inside the kernel source tree." >&5
-$as_echo "$as_me: error:
-       *** Unable to build an empty module.
-       *** Please run 'make scripts' inside the kernel source tree." >&2;}
-   { (exit 1); exit 1; }; }
-               fi
-
-
 
 fi
 
-       rm -Rf build
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512BW" >&5
+$as_echo_n "checking whether host toolchain supports AVX512BW... " >&6; }
 
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
+               void main()
+               {
+                       __asm__ __volatile__("vpshufb %zmm0,%zmm1,%zmm2");
+               }
 
-       if test "$ZFS_META_LICENSE" = GPL; then
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GPL_ONLY_SYMBOLS 1
+#define HAVE_AVX512BW 1
 _ACEOF
 
 
-fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-       { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5
-$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512IFMA" >&5
+$as_echo_n "checking whether host toolchain supports AVX512IFMA... " >&6; }
 
-cat confdefs.h - <<_ACEOF >conftest.c
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12549,73 +13428,61 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
-
-int
-main (void)
-{
-
-               #ifndef CONFIG_PREEMPT
-               #error CONFIG_PREEMPT not #defined
-               #endif
-
-  ;
-  return 0;
-}
+               void main()
+               {
+                       __asm__ __volatile__("vpmadd52luq %zmm0,%zmm1,%zmm2");
+               }
 
 _ACEOF
-
-
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-               { { $as_echo "$as_me:$LINENO: error:
-       *** Kernel built with CONFIG_PREEMPT which is not supported.
-       *** You must rebuild your kernel without this option." >&5
-$as_echo "$as_me: error:
-       *** Kernel built with CONFIG_PREEMPT which is not supported.
-       *** You must rebuild your kernel without this option." >&2;}
-   { (exit 1); exit 1; }; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AVX512IFMA 1
+_ACEOF
+
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-
-
-
 fi
 
-       rm -Rf build
-
-
-
-
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-       { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
-$as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512VBMI" >&5
+$as_echo_n "checking whether host toolchain supports AVX512VBMI... " >&6; }
 
-cat confdefs.h - <<_ACEOF >conftest.c
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12623,150 +13490,61 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
-
-int
-main (void)
-{
-
-               #ifndef CONFIG_DEBUG_LOCK_ALLOC
-               #error CONFIG_DEBUG_LOCK_ALLOC not #defined
-               #endif
-
-  ;
-  return 0;
-}
+               void main()
+               {
+                       __asm__ __volatile__("vpermb %zmm0,%zmm1,%zmm2");
+               }
 
 _ACEOF
-
-
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-               { $as_echo "$as_me:$LINENO: checking whether mutex_lock() is GPL-only" >&5
-$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; }
-               tmp_flags="$EXTRA_KCFLAGS"
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-                       #include <linux/module.h>
-                       #include <linux/mutex.h>
-
-                       MODULE_LICENSE("$ZFS_META_LICENSE");
-
-int
-main (void)
-{
-
-                       struct mutex lock;
-
-                       mutex_init(&lock);
-                       mutex_lock(&lock);
-                       mutex_unlock(&lock);
-
-  ;
-  return 0;
-}
-
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AVX512VBMI 1
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
-       *** with the CDDL license and will prevent the module linking stage
-       *** from succeeding.  You must rebuild your kernel without this
-       *** option enabled." >&5
-$as_echo "$as_me: error:
-       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
-       *** with the CDDL license and will prevent the module linking stage
-       *** from succeeding.  You must rebuild your kernel without this
-       *** option enabled." >&2;}
-   { (exit 1); exit 1; }; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-               EXTRA_KCFLAGS="$tmp_flags"
-
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-
-
-
 fi
 
-       rm -Rf build
-
-
-
-
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-       { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5
-$as_echo_n "checking block device operation prototypes... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512PF" >&5
+$as_echo_n "checking whether host toolchain supports AVX512PF... " >&6; }
 
-cat confdefs.h - <<_ACEOF >conftest.c
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12774,58 +13552,39 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
-
-int
-main (void)
-{
-
-               int (*blk_open) (struct block_device *, fmode_t) = NULL;
-               int (*blk_release) (struct gendisk *, fmode_t) = NULL;
-               int (*blk_ioctl) (struct block_device *, fmode_t,
-                                 unsigned, unsigned long) = NULL;
-               int (*blk_compat_ioctl) (struct block_device *, fmode_t,
-                                         unsigned, unsigned long) = NULL;
-               struct block_device_operations blk_ops = {
-                       .open           = blk_open,
-                       .release        = blk_release,
-                       .ioctl          = blk_ioctl,
-                       .compat_ioctl   = blk_compat_ioctl,
-               };
-
-               blk_ops.open(NULL, 0);
-               blk_ops.release(NULL, 0);
-               blk_ops.ioctl(NULL, 0, 0, 0);
-               blk_ops.compat_ioctl(NULL, 0, 0, 0);
-
-  ;
-  return 0;
-}
+               void main()
+               {
+                       __asm__ __volatile__("vgatherpf0dps (%rsi,%zmm0,4){%k1}");
+               }
 
 _ACEOF
-
-
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
-               { $as_echo "$as_me:$LINENO: result: struct block_device" >&5
-$as_echo "struct block_device" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1
+#define HAVE_AVX512PF 1
 _ACEOF
 
 
@@ -12833,23 +13592,21 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: struct inode" >&5
-$as_echo "struct inode" >&6; }
-
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5
-$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512ER" >&5
+$as_echo_n "checking whether host toolchain supports AVX512ER... " >&6; }
 
-cat confdefs.h - <<_ACEOF >conftest.c
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12857,42 +13614,39 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/types.h>
-
-int
-main (void)
-{
-
-               fmode_t *ptr __attribute__ ((unused));
-
-  ;
-  return 0;
-}
+               void main()
+               {
+                       __asm__ __volatile__("vexp2pd %zmm0,%zmm1");
+               }
 
 _ACEOF
-
-
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FMODE_T 1
+#define HAVE_AVX512ER 1
 _ACEOF
 
 
@@ -12900,23 +13654,21 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-
-
 fi
 
-       rm -Rf build
-
-
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5
-$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether host toolchain supports AVX512VL" >&5
+$as_echo_n "checking whether host toolchain supports AVX512VL... " >&6; }
 
-cat confdefs.h - <<_ACEOF >conftest.c
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12924,43 +13676,39 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/kobject.h>
-
-int
-main (void)
-{
-
-               int val __attribute__ ((unused));
-               val = KOBJ_NAME_LEN;
-
-  ;
-  return 0;
-}
+               void main()
+               {
+                       __asm__ __volatile__("vpabsq %zmm0,%zmm1");
+               }
 
 _ACEOF
-
-
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_KOBJ_NAME_LEN 1
+#define HAVE_AVX512VL 1
 _ACEOF
 
 
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
+                       ;;
+       esac
 
-fi
 
-       rm -Rf build
+       { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5
+$as_echo_n "checking for target asm dir... " >&6; }
+       TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
 
+       case $TARGET_ARCH in
+       i386|x86_64)
+               TARGET_ASM_DIR=asm-${TARGET_ARCH}
+               ;;
+       *)
+               TARGET_ASM_DIR=asm-generic
+               ;;
+       esac
 
 
+        if test $TARGET_ASM_DIR = asm-x86_64; then
+  TARGET_ASM_X86_64_TRUE=
+  TARGET_ASM_X86_64_FALSE='#'
+else
+  TARGET_ASM_X86_64_TRUE='#'
+  TARGET_ASM_X86_64_FALSE=
+fi
 
-       { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5
-$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
+        if test $TARGET_ASM_DIR = asm-i386; then
+  TARGET_ASM_I386_TRUE=
+  TARGET_ASM_I386_FALSE='#'
+else
+  TARGET_ASM_I386_TRUE='#'
+  TARGET_ASM_I386_FALSE=
+fi
 
+        if test $TARGET_ASM_DIR = asm-generic; then
+  TARGET_ASM_GENERIC_TRUE=
+  TARGET_ASM_GENERIC_FALSE='#'
+else
+  TARGET_ASM_GENERIC_TRUE='#'
+  TARGET_ASM_GENERIC_FALSE=
+fi
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5
+$as_echo "$TARGET_ASM_DIR" >&6; }
 
 
-               #include <linux/fs.h>
 
-int
-main (void)
-{
+       case "$ZFS_CONFIG" in
+               kernel)
 
-               struct block_device *bdev = NULL;
-               (void) blkdev_get(bdev, 0, NULL);
 
-  ;
-  return 0;
-}
+# Check whether --with-linux was given.
+if test "${with_linux+set}" = set; then
+  withval=$with_linux; kernelsrc="$withval"
+fi
 
-_ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+# Check whether --with-linux-obj was given.
+if test "${with_linux_obj+set}" = set; then
+  withval=$with_linux_obj; kernelbuild="$withval"
+fi
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_3ARG_BLKDEV_GET 1
-_ACEOF
+       { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
+$as_echo_n "checking kernel source directory... " >&6; }
+       if test -z "$kernelsrc"; then
 
+               if test -e "/lib/modules/$(uname -r)/source"; then
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+                       headersdir="/lib/modules/$(uname -r)/source"
+                       sourcelink=$(readlink -f "$headersdir")
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+elif test -e "/lib/modules/$(uname -r)/build"; then
 
+                       headersdir="/lib/modules/$(uname -r)/build"
+                       sourcelink=$(readlink -f "$headersdir")
+
+else
 
+                       sourcelink=$(ls -1d /usr/src/kernels/* \
+                                    /usr/src/linux-* \
+                                    2>/dev/null | grep -v obj | tail -1)
 
 fi
 
-       rm -Rf build
 
+               if test -n "$sourcelink" && test -e ${sourcelink}; then
 
+                       kernelsrc=`readlink -f ${sourcelink}`
 
-       { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5
-$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
+else
 
+                       kernelsrc="Not found"
 
+fi
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
+else
 
-               #include <linux/fs.h>
+               if test "$kernelsrc" = "NONE"; then
 
-int
-main (void)
-{
+                       kernsrcver=NONE
 
-               blkdev_get_by_path(NULL, 0, NULL);
+fi
 
-  ;
-  return 0;
-}
+               withlinux=yes
 
-_ACEOF
+fi
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
+       { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5
+$as_echo "$kernelsrc" >&6; }
+       if test ! -d "$kernelsrc"; then
 
+               { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed and then try again.  If that fails, you can specify the
+       *** location of the kernel source with the '--with-linux=PATH' option." >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed and then try again.  If that fails, you can specify the
+       *** location of the kernel source with the '--with-linux=PATH' option." >&2;}
+   { (exit 1); exit 1; }; }
 
 fi
 
-       rm -Rf build
 
+       { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
+$as_echo_n "checking kernel build directory... " >&6; }
+       if test -z "$kernelbuild"; then
 
-       if test $rc -ne 0; then :
+               if test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"; then
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                       kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
 
-       grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
 
-               fi
-               if test $rc -ne 0; then :
+elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
 
-               else :
+elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+                       kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLKDEV_GET_BY_PATH 1
-_ACEOF
+else
 
+                       kernelbuild=${kernelsrc}
 
-               fi
-       fi
+fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5
-$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
+fi
 
+       { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5
+$as_echo "$kernelbuild" >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking kernel source version" >&5
+$as_echo_n "checking kernel source version... " >&6; }
+       utsrelease1=$kernelbuild/include/linux/version.h
+       utsrelease2=$kernelbuild/include/linux/utsrelease.h
+       utsrelease3=$kernelbuild/include/generated/utsrelease.h
+       if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               utsrelease=linux/version.h
 
+elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then
 
-               #include <linux/fs.h>
+               utsrelease=linux/utsrelease.h
 
-int
-main (void)
-{
+elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then
 
-               open_bdev_exclusive(NULL, 0, NULL);
+               utsrelease=generated/utsrelease.h
 
-  ;
-  return 0;
-}
+fi
 
-_ACEOF
+
+       if test "$utsrelease"; then
+
+               kernsrcver=`(echo "#include <$utsrelease>";
+                            echo "kernsrcver=UTS_RELEASE") |
+                            cpp -I $kernelbuild/include |
+                            grep "^kernsrcver=" | cut -d \" -f 2`
+
+               if test -z "$kernsrcver"; then
+
+                       { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+                       { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5
+$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rc=0
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
 
+               { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+               if test "x$enable_linux_builtin" != xyes; then
+                       { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
+$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;}
+   { (exit 1); exit 1; }; }
+               else
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Cannot find UTS_RELEASE definition.
+       *** Please run 'make prepare' inside the kernel source tree." >&5
+$as_echo "$as_me: error:
+       *** Cannot find UTS_RELEASE definition.
+       *** Please run 'make prepare' inside the kernel source tree." >&2;}
+   { (exit 1); exit 1; }; }
+               fi
 
 fi
 
-       rm -Rf build
 
+       { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
+$as_echo "$kernsrcver" >&6; }
 
-       if test $rc -ne 0; then :
+       LINUX=${kernelsrc}
+       LINUX_OBJ=${kernelbuild}
+       LINUX_VERSION=${kernsrcver}
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
-               else :
+       modpost=$LINUX/scripts/Makefile.modpost
+       { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5
+$as_echo_n "checking kernel file name for module symbols... " >&6; }
+       if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+               if grep -q Modules.symvers $modpost; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPEN_BDEV_EXCLUSIVE 1
-_ACEOF
+                       LINUX_SYMBOLS=Modules.symvers
 
+else
 
-               fi
-       fi
+                       LINUX_SYMBOLS=Module.symvers
 
+fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5
-$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
+               if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
 
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If you are building with a custom kernel, make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If you are building with a custom kernel, make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." >&2;}
+   { (exit 1); exit 1; }; }
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+fi
 
 
-               #include <linux/buffer_head.h>
+else
 
-int
-main (void)
-{
+               LINUX_SYMBOLS=NONE
 
-               struct block_device *bdev = NULL;
-               invalidate_bdev(bdev);
+fi
 
-  ;
-  return 0;
-}
+       { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
+$as_echo "$LINUX_SYMBOLS" >&6; }
 
-_ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_1ARG_INVALIDATE_BDEV 1
-_ACEOF
+# Check whether --with-spl was given.
+if test "${with_spl+set}" = set; then
+  withval=$with_spl; if test "$withval" = "yes"; then
+  { { $as_echo "$as_me:$LINENO: error: --with-spl=PATH requires a PATH" >&5
+$as_echo "$as_me: error: --with-spl=PATH requires a PATH" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  splsrc="$withval"
+fi
+
+fi
+
+
+
+# Check whether --with-spl-obj was given.
+if test "${with_spl_obj+set}" = set; then
+  withval=$with_spl_obj; splbuild="$withval"
+fi
 
 
+
+# Check whether --with-spl-timeout was given.
+if test "${with_spl_timeout+set}" = set; then
+  withval=$with_spl_timeout; timeout="$withval"
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  timeout=0
+fi
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
+                                       splsrc0="/var/lib/dkms/spl/${VERSION}/build"
+       splsrc1="/usr/local/src/spl-${VERSION}/${LINUX_VERSION}"
+       splsrc2="/usr/local/src/spl-${VERSION}"
+       splsrc3="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
+       splsrc4="/usr/src/spl-${VERSION}"
+       splsrc5="../spl/"
+       splsrc6="$LINUX"
+
+       { $as_echo "$as_me:$LINENO: checking spl source directory" >&5
+$as_echo_n "checking spl source directory... " >&6; }
+       if test -z "${splsrc}"; then
+
+               all_spl_sources="
+               ${splsrc0}
+               ${splsrc1}
+               ${splsrc2}
+               ${splsrc3}
+               ${splsrc4}
+               ${splsrc5}
+               ${splsrc6}",
+               if  test -e "${splsrc0}/spl.release.in"; then
 
+                       splsrc=${splsrc0}
+
+elif  test -e "${splsrc1}/spl.release.in"; then
+
+                       splsrc=${splsrc1}
+
+elif  test -e "${splsrc2}/spl.release.in"; then
+
+                       splsrc=${splsrc2}
+
+elif  test -e "${splsrc3}/spl.release.in"; then
+
+                       splsrc=$(readlink -f "${splsrc3}")
+
+elif  test -e "${splsrc4}/spl.release.in" ; then
+
+                       splsrc=${splsrc4}
+
+elif  test -e "${splsrc5}/spl.release.in"; then
+
+                       splsrc=$(readlink -f "${splsrc5}")
+
+elif  test -e "${splsrc6}/spl.release.in" ; then
+
+                       splsrc=${splsrc6}
+
+else
+
+                       splsrc="Not found"
 
 fi
 
-       rm -Rf build
 
+else
 
+               all_spl_sources="$withval",
+               if test "$splsrc" = "NONE"; then
 
+                       splbuild=NONE
+                       splsrcver=NONE
 
-       { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5
-$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+fi
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+fi
 
 
-               #include <linux/blkdev.h>
+       { $as_echo "$as_me:$LINENO: result: $splsrc" >&5
+$as_echo "$splsrc" >&6; }
+       if  test ! -e "$splsrc/spl.release.in"; then
 
-int
-main (void)
-{
+               { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kmod spl devel package for your distribution
+       *** is installed then try again.  If that fails you can specify the
+       *** location of the spl source with the '--with-spl=PATH' option.
+       *** The spl version must match the version of ZFS you are building,
+       *** ${VERSION}.  Failed to find spl.release.in in the following:
+       $all_spl_sources" >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kmod spl devel package for your distribution
+       *** is installed then try again.  If that fails you can specify the
+       *** location of the spl source with the '--with-spl=PATH' option.
+       *** The spl version must match the version of ZFS you are building,
+       *** ${VERSION}.  Failed to find spl.release.in in the following:
+       $all_spl_sources" >&2;}
+   { (exit 1); exit 1; }; }
 
-               struct block_device *bdev = NULL;
-               bdev_logical_block_size(bdev);
+fi
 
-  ;
-  return 0;
-}
 
-_ACEOF
+                                                                                                       { $as_echo "$as_me:$LINENO: checking spl build directory" >&5
+$as_echo_n "checking spl build directory... " >&6; }
 
+       all_spl_config_locs="${splsrc}/${LINUX_VERSION}
+       ${splsrc}"
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+       while true; do
+               if test -z "$splbuild"; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+                       if  test -e "${splsrc}/${LINUX_VERSION}/spl_config.h" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1
-_ACEOF
+                               splbuild="${splsrc}/${LINUX_VERSION}"
+
+elif  test -e "${splsrc}/spl_config.h" ; then
+
+                               splbuild="${splsrc}"
 
+elif  find -L "${splsrc}" -name spl_config.h 2> /dev/null | grep -wq spl_config.h ; then
+
+                               splbuild=$(find -L "${splsrc}" -name spl_config.h | sed 's,/spl_config.h,,')
 
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                               splbuild="Not found"
 
+fi
 
 
 fi
 
-       rm -Rf build
+               if test -e "$splbuild/spl_config.h" -o $timeout -le 0; then
 
+                       break;
 
-       EXTRA_KCFLAGS="$tmp_flags"
+else
 
+                       sleep 1
+                       timeout=$((timeout-1))
 
-       { $as_echo "$as_me:$LINENO: checking whether bio_empty_barrier() is defined" >&5
-$as_echo_n "checking whether bio_empty_barrier() is defined... " >&6; }
-       EXTRA_KCFLAGS="-Werror"
+fi
 
+       done
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       { $as_echo "$as_me:$LINENO: result: $splbuild" >&5
+$as_echo "$splbuild" >&6; }
+       if  ! test -e "$splbuild/spl_config.h"; then
 
+               { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kmod spl devel <kernel> package for your
+       *** distribution is installed then try again.  If that fails you
+       *** can specify the location of the spl objects with the
+       *** '--with-spl-obj=PATH' option.  Failed to find spl_config.h in
+       *** any of the following:
+       $all_spl_config_locs" >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kmod spl devel <kernel> package for your
+       *** distribution is installed then try again.  If that fails you
+       *** can specify the location of the spl objects with the
+       *** '--with-spl-obj=PATH' option.  Failed to find spl_config.h in
+       *** any of the following:
+       $all_spl_config_locs" >&2;}
+   { (exit 1); exit 1; }; }
 
-               #include <linux/bio.h>
+fi
 
-int
-main (void)
-{
 
-               struct bio bio;
-               (void)bio_empty_barrier(&bio);
+       { $as_echo "$as_me:$LINENO: checking spl source version" >&5
+$as_echo_n "checking spl source version... " >&6; }
+       if test -r $splbuild/spl_config.h &&
+               fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then
+
+
+               splsrcver=`(echo "#include <spl_config.h>";
+                           echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
+                           cpp -I $splbuild |
+                           grep "^splsrcver=" | tr -d \" | cut -d= -f2`
+
+fi
+
+
+       if test -z "$splsrcver"; then
+
+               { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+               { { $as_echo "$as_me:$LINENO: error:
+       *** Cannot determine the version of the spl source.
+       *** Please prepare the spl source before running this script" >&5
+$as_echo "$as_me: error:
+       *** Cannot determine the version of the spl source.
+       *** Please prepare the spl source before running this script" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5
+$as_echo "$splsrcver" >&6; }
+
+       SPL=${splsrc}
+       SPL_OBJ=${splbuild}
+       SPL_VERSION=${splsrcver}
+
+
+
+
+
+                                                                                                               { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5
+$as_echo_n "checking spl file name for module symbols... " >&6; }
+       SPL_SYMBOLS=NONE
+
+       while true; do
+               if test -r $SPL_OBJ/Module.symvers; then
+
+                       SPL_SYMBOLS=Module.symvers
+
+elif test -r $SPL_OBJ/Modules.symvers; then
+
+                       SPL_SYMBOLS=Modules.symvers
+
+elif test -r $SPL_OBJ/module/Module.symvers; then
+
+                       SPL_SYMBOLS=Module.symvers
+
+elif test -r $SPL_OBJ/module/Modules.symvers; then
+
+                       SPL_SYMBOLS=Modules.symvers
+
+fi
+
+
+               if test $SPL_SYMBOLS != NONE -o $timeout -le 0; then
+
+                       break;
+
+else
+
+                       sleep 1
+                       timeout=$((timeout-1))
+
+fi
+
+       done
+
+       if test "$SPL_SYMBOLS" = NONE; then
+
+               SPL_SYMBOLS=$LINUX_SYMBOLS
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5
+$as_echo "$SPL_SYMBOLS" >&6; }
+
+
+
+
+# Check whether --with-qat was given.
+if test "${with_qat+set}" = set; then
+  withval=$with_qat; if test "$withval" = "yes"; then
+  { { $as_echo "$as_me:$LINENO: error: --with-qat=PATH requires a PATH" >&5
+$as_echo "$as_me: error: --with-qat=PATH requires a PATH" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  qatsrc="$withval"
+fi
+
+fi
+
+
+
+# Check whether --with-qat-obj was given.
+if test "${with_qat_obj+set}" = set; then
+  withval=$with_qat_obj; qatbuild="$withval"
+fi
+
+
+       if test ! -z "${qatsrc}"; then
+
+               { $as_echo "$as_me:$LINENO: checking qat source directory" >&5
+$as_echo_n "checking qat source directory... " >&6; }
+               { $as_echo "$as_me:$LINENO: result: $qatsrc" >&5
+$as_echo "$qatsrc" >&6; }
+               QAT_SRC="${qatsrc}/quickassist"
+               if  test ! -e "$QAT_SRC/include/cpa.h"; then
+
+                       { { $as_echo "$as_me:$LINENO: error:
+               *** Please make sure the qat driver package is installed
+               *** and specify the location of the qat source with the
+               *** '--with-qat=PATH' option then try again. Failed to
+               *** find cpa.h in:
+               ${QAT_SRC}/include" >&5
+$as_echo "$as_me: error:
+               *** Please make sure the qat driver package is installed
+               *** and specify the location of the qat source with the
+               *** '--with-qat=PATH' option then try again. Failed to
+               *** find cpa.h in:
+               ${QAT_SRC}/include" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
+
+       if test ! -z "${qatsrc}"; then
+
+               { $as_echo "$as_me:$LINENO: checking qat build directory" >&5
+$as_echo_n "checking qat build directory... " >&6; }
+               if test -z "$qatbuild"; then
+
+                       qatbuild="${qatsrc}/build"
+
+fi
+
+
+               { $as_echo "$as_me:$LINENO: result: $qatbuild" >&5
+$as_echo "$qatbuild" >&6; }
+               QAT_OBJ=${qatbuild}
+               if  ! test -e "$QAT_OBJ/icp_qa_al.ko" && ! test -e "$QAT_OBJ/qat_api.ko"; then
+
+                       { { $as_echo "$as_me:$LINENO: error:
+               *** Please make sure the qat driver is installed then try again.
+               *** Failed to find icp_qa_al.ko or qat_api.ko in:
+               $QAT_OBJ" >&5
+$as_echo "$as_me: error:
+               *** Please make sure the qat driver is installed then try again.
+               *** Failed to find icp_qa_al.ko or qat_api.ko in:
+               $QAT_OBJ" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
 
-  ;
-  return 0;
-}
 
-_ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_EMPTY_BARRIER 1
+#define HAVE_QAT 1
 _ACEOF
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
+                               if test ! -z "${qatsrc}"; then
+
+               { $as_echo "$as_me:$LINENO: checking qat file for module symbols" >&5
+$as_echo_n "checking qat file for module symbols... " >&6; }
+               QAT_SYMBOLS=$QAT_SRC/lookaside/access_layer/src/Module.symvers
+
+               if test -r $QAT_SYMBOLS; then
+
+                       { $as_echo "$as_me:$LINENO: result: $QAT_SYMBOLS" >&5
+$as_echo "$QAT_SYMBOLS" >&6; }
 
 
+else
+
+                       { { $as_echo "$as_me:$LINENO: error:
+                       *** Please make sure the qat driver is installed then try again.
+                       *** Failed to find Module.symvers in:
+                       $QAT_SYMBOLS" >&5
+$as_echo "$as_me: error:
+                       *** Please make sure the qat driver is installed then try again.
+                       *** Failed to find Module.symvers in:
+                       $QAT_SYMBOLS" >&2;}
+   { (exit 1); exit 1; }; }
+
 fi
 
-       rm -Rf build
 
+fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5
-$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5
+$as_echo_n "checking whether modules can be built... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13480,15 +14413,10 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
-
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = (1 << BIO_RW_FAILFAST);
-
   ;
   return 0;
 }
@@ -13496,11 +14424,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13515,17 +14449,25 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_FAILFAST 1
-_ACEOF
-
-
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
+               if test "x$enable_linux_builtin" != xyes; then
+                       { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5
+$as_echo "$as_me: error: *** Unable to build an empty module." >&2;}
+   { (exit 1); exit 1; }; }
+               else
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Unable to build an empty module.
+       *** Please run 'make scripts' inside the kernel source tree." >&5
+$as_echo "$as_me: error:
+       *** Unable to build an empty module.
+       *** Please run 'make scripts' inside the kernel source tree." >&2;}
+   { (exit 1); exit 1; }; }
+               fi
 
 
 
@@ -13536,8 +14478,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
-$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking for compile-time stack validation (objtool)" >&5
+$as_echo_n "checking for compile-time stack validation (objtool)... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13548,16 +14490,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #undef __ASSEMBLY__
+               #include <asm/frame.h>
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = ((1 << BIO_RW_FAILFAST_DEV) |
-                        (1 << BIO_RW_FAILFAST_TRANSPORT) |
-                        (1 << BIO_RW_FAILFAST_DRIVER));
+               #if !defined(FRAME_BEGIN)
+               CTASSERT(1);
+               #endif
 
   ;
   return 0;
@@ -13566,11 +14508,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13586,7 +14534,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_FAILFAST_DTD 1
+#define HAVE_KERNEL_OBJTOOL 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5
-$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
+       if test "x$cross_compiling" != xyes; then
 
+               if test "$cross_compiling" = yes; then
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
+                       /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-
-               #include <linux/bio.h>
+                               #include "$LINUX/include/linux/license.h"
 
 int
-main (void)
+main ()
 {
 
-               int flags __attribute__ ((unused));
-               flags = REQ_FAILFAST_MASK;
+                               return !license_is_gpl_compatible("$ZFS_META_LICENSE");
 
   ;
   return 0;
 }
 
 _ACEOF
-
-
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_REQ_FAILFAST_MASK 1
+#define ZFS_IS_GPL_COMPATIBLE 1
 _ACEOF
 
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+( exit $ac_status )
 
 
 fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
-       rm -Rf build
 
 
+fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5
-$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+
+       { $as_echo "$as_me:$LINENO: checking whether kernel was built with 16K or larger stacks" >&5
+$as_echo_n "checking whether kernel was built with 16K or larger stacks... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13688,16 +14646,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/module.h>
 
 int
 main (void)
 {
 
-               void (*wanted_end_io)(struct bio *, int) = NULL;
-               bio_end_io_t *local_end_io __attribute__ ((unused));
-
-               local_end_io = wanted_end_io;
+               #if (THREAD_SIZE < 16384)
+               #error "THREAD_SIZE is less than 16K"
+               #endif
 
   ;
   return 0;
@@ -13706,11 +14663,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13726,7 +14689,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_BIO_END_IO_T 1
+#define HAVE_LARGE_STACKS 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNC is defined" >&5
-$as_echo_n "checking whether BIO_RW_SYNC is defined... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether kernel was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
+$as_echo_n "checking whether kernel was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13759,14 +14722,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/module.h>
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = BIO_RW_SYNC;
+               #ifndef CONFIG_DEBUG_LOCK_ALLOC
+               #error CONFIG_DEBUG_LOCK_ALLOC not #defined
+               #endif
 
   ;
   return 0;
@@ -13775,11 +14739,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13794,29 +14764,9 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_SYNC 1
-_ACEOF
-
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5
-$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether mutex_lock() is GPL-only" >&5
+$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; }
+               tmp_flags="$EXTRA_KCFLAGS"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13827,14 +14777,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+                       #include <linux/module.h>
+                       #include <linux/mutex.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = BIO_RW_SYNCIO;
+                       struct mutex lock;
+
+                       mutex_init(&lock);
+                       mutex_lock(&lock);
+                       mutex_unlock(&lock);
 
   ;
   return 0;
@@ -13843,11 +14799,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13859,12 +14821,35 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
+       *** with the CDDL license and will prevent the module linking stage
+       *** from succeeding.  You must rebuild your kernel without this
+       *** option enabled." >&5
+$as_echo "$as_me: error:
+       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
+       *** with the CDDL license and will prevent the module linking stage
+       *** from succeeding.  You must rebuild your kernel without this
+       *** option enabled." >&2;}
+   { (exit 1); exit 1; }; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_SYNCIO 1
-_ACEOF
+
+
+fi
+
+       rm -Rf build
+
+
+               EXTRA_KCFLAGS="$tmp_flags"
 
 
 else
@@ -13876,6 +14861,7 @@ $as_echo "no" >&6; }
 
 
 
+
 fi
 
        rm -Rf build
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether REQ_SYNC is defined" >&5
-$as_echo_n "checking whether REQ_SYNC is defined... " >&6; }
+
+
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-I\$(src)"
+
+       { $as_echo "$as_me:$LINENO: checking whether DECLARE_EVENT_CLASS() is available" >&5
+$as_echo_n "checking whether DECLARE_EVENT_CLASS() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13895,14 +14886,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/module.h>
+               MODULE_LICENSE(ZFS_META_LICENSE);
+
+               #define CREATE_TRACE_POINTS
+               #include "conftest.h"
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = REQ_SYNC;
+               trace_zfs_autoconf_event_one(1UL);
+               trace_zfs_autoconf_event_two(2UL);
 
   ;
   return 0;
@@ -13911,11 +14906,50 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+               #if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
+               #define _CONFTEST_H
+
+               #undef  TRACE_SYSTEM
+               #define TRACE_SYSTEM zfs
+               #include <linux/tracepoint.h>
+
+               DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
+                       TP_PROTO(unsigned long i),
+                       TP_ARGS(i),
+                       TP_STRUCT__entry(
+                               __field(unsigned long, i)
+                       ),
+                       TP_fast_assign(
+                               __entry->i = i;
+                       ),
+                       TP_printk("i = %lu", __entry->i)
+               );
+
+               #define DEFINE_AUTOCONF_EVENT(name) \
+               DEFINE_EVENT(zfs_autoconf_event_class, name, \
+                       TP_PROTO(unsigned long i), \
+                       TP_ARGS(i))
+               DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
+               DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
+
+               #endif /* _CONFTEST_H */
+
+               #undef  TRACE_INCLUDE_PATH
+               #define TRACE_INCLUDE_PATH .
+               #define TRACE_INCLUDE_FILE conftest
+               #include <trace/define_trace.h>
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13931,7 +14965,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_REQ_SYNC 1
+#define HAVE_DECLARE_EVENT_CLASS 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is available" >&5
-$as_echo_n "checking whether blk_end_request() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether current->bio_tail exists" >&5
+$as_echo_n "checking whether current->bio_tail exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13965,14 +14998,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/sched.h>
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_end_request(req, 0, 0);
+               current->bio_tail = (struct bio **) NULL;
 
   ;
   return 0;
@@ -13981,11 +15013,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14001,7 +15039,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_END_REQUEST 1
+#define HAVE_CURRENT_BIO_TAIL 1
 _ACEOF
 
 
@@ -14011,17 +15049,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is GPL-only" >&5
-$as_echo_n "checking whether blk_end_request() is GPL-only... " >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether current->bio_list exists" >&5
+$as_echo_n "checking whether current->bio_list exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14032,17 +15061,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
-
-               MODULE_LICENSE("CDDL");
+                       #include <linux/sched.h>
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_end_request(req, 0, 0);
+                       current->bio_list = (struct bio_list *) NULL;
 
   ;
   return 0;
@@ -14051,11 +15076,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14067,19 +15098,30 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CURRENT_BIO_LIST 1
+_ACEOF
+
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+                       { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" >&5
+$as_echo "$as_me: error: no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_END_REQUEST_GPL_ONLY 1
-_ACEOF
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5
-$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether super_block->s_user_ns exists" >&5
+$as_echo_n "checking whether super_block->s_user_ns exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14106,14 +15145,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
+               #include <linux/user_namespace.h>
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
+               struct super_block super;
+               super.s_user_ns = (struct user_namespace *)NULL;
 
   ;
   return 0;
@@ -14122,11 +15162,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14142,7 +15188,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_FLUSH 1
+#define HAVE_SUPER_USER_NS 1
 _ACEOF
 
 
@@ -14161,8 +15207,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5
-$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether submit_bio() wants 1 arg" >&5
+$as_echo_n "checking whether submit_bio() wants 1 arg... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14173,17 +15220,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
-
-               MODULE_LICENSE("CDDL");
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
+               blk_qc_t blk_qc;
+               struct bio *bio = NULL;
+               blk_qc = submit_bio(bio);
 
   ;
   return 0;
@@ -14192,73 +15237,8 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1
-_ACEOF
-
-
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5
-$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-               #include <linux/blkdev.h>
-
-int
-main (void)
-{
-
-               struct request_queue *q = NULL;
-               (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
 
-  ;
-  return 0;
-}
+cat - <<_ACEOF >conftest.h
 
 _ACEOF
 
@@ -14267,7 +15247,7 @@ _ACEOF
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14283,7 +15263,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1
+#define HAVE_1ARG_SUBMIT_BIO 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5
-$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether bops->check_events() exists" >&5
+$as_echo_n "checking whether bops->check_events() exists... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14320,12 +15299,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 
                #include <linux/blkdev.h>
 
+               unsigned int blk_check_events(struct gendisk *disk,
+                   unsigned int clearing) { return (0); }
+
+               static const struct block_device_operations
+                   bops __attribute__ ((unused)) = {
+                       .check_events   = blk_check_events,
+               };
+
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
 
   ;
   return 0;
@@ -14334,11 +15319,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14354,7 +15345,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1
+#define HAVE_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS 1
 _ACEOF
 
 
        EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_physical_block_size() is available" >&5
-$as_echo_n "checking whether blk_queue_physical_block_size() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether bops->release() is void" >&5
+$as_echo_n "checking whether bops->release() is void... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14391,13 +15382,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 
                #include <linux/blkdev.h>
 
+               void blk_release(struct gendisk *g, fmode_t mode) { return; }
+
+               static const struct block_device_operations
+                   bops __attribute__ ((unused)) = {
+                       .open           = NULL,
+                       .release        = blk_release,
+                       .ioctl          = NULL,
+                       .compat_ioctl   = NULL,
+               };
+
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               unsigned short block_size = 1;
-               (void) blk_queue_physical_block_size(q, block_size);
 
   ;
   return 0;
@@ -14406,11 +15404,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14422,11 +15426,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+               { $as_echo "$as_me:$LINENO: result: void" >&5
+$as_echo "void" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE 1
+#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID 1
 _ACEOF
 
 
@@ -14434,8 +15438,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: int" >&5
+$as_echo "int" >&6; }
 
 
 
 
        EXTRA_KCFLAGS="$tmp_flags"
 
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_io_opt() is available" >&5
-$as_echo_n "checking whether blk_queue_io_opt() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5
+$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14461,15 +15462,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/types.h>
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               unsigned int opt = 1;
-               (void) blk_queue_io_opt(q, opt);
+               fmode_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -14478,11 +15477,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14498,7 +15503,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_IO_OPT 1
+#define HAVE_FMODE_T 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_nonrot() is available" >&5
-$as_echo_n "checking whether blk_queue_nonrot() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5
+$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14533,14 +15535,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_nonrot(q);
+               struct block_device *bdev = NULL;
+               (void) blkdev_get(bdev, 0, NULL);
 
   ;
   return 0;
@@ -14549,11 +15551,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14569,7 +15577,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_NONROT 1
+#define HAVE_3ARG_BLKDEV_GET 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5
+$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_discard() is available" >&5
-$as_echo_n "checking whether blk_queue_discard() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14604,14 +15609,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_discard(q);
+               blkdev_get_by_path(NULL, 0, NULL);
 
   ;
   return 0;
@@ -14620,11 +15624,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14635,36 +15645,72 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_DISCARD 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLKDEV_GET_BY_PATH 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5
+$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_fetch_request() is available" >&5
-$as_echo_n "checking whether blk_fetch_request() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14675,14 +15721,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_fetch_request(q);
+               open_bdev_exclusive(NULL, 0, NULL);
 
   ;
   return 0;
@@ -14691,11 +15736,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14706,36 +15757,72 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_FETCH_REQUEST 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPEN_BDEV_EXCLUSIVE 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 1 arg" >&5
+$as_echo_n "checking whether lookup_bdev() wants 1 arg... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5
-$as_echo_n "checking whether blk_requeue_request() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14746,15 +15833,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               struct request *req = NULL;
-               blk_requeue_request(q, req);
+               lookup_bdev(NULL);
 
   ;
   return 0;
@@ -14763,11 +15848,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14778,22 +15869,11 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_REQUEUE_REQUEST 1
-_ACEOF
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 2 args" >&5
+$as_echo_n "checking whether lookup_bdev() wants 2 args... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is available" >&5
-$as_echo_n "checking whether blk_rq_bytes() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14818,14 +15898,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+                       #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_rq_bytes(req);
+                       lookup_bdev(NULL, FMODE_READ);
 
   ;
   return 0;
@@ -14834,11 +15913,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14849,32 +15934,103 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_BYTES 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+       if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_LOOKUP_BDEV 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
+
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 2 args" >&5
+$as_echo_n "checking whether lookup_bdev() wants 2 args... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is GPL-only" >&5
-$as_echo_n "checking whether blk_rq_bytes() is GPL-only... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14885,17 +16041,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
-
-               MODULE_LICENSE("CDDL");
+                       #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_rq_bytes(req);
+                       lookup_bdev(NULL, FMODE_READ);
 
   ;
   return 0;
@@ -14904,11 +16056,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14919,36 +16077,86 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1
+#define HAVE_2ARGS_LOOKUP_BDEV 1
 _ACEOF
 
 
+               fi
+       fi
+
+
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_1ARG_LOOKUP_BDEV 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_rq_pos() is available" >&5
-$as_echo_n "checking whether blk_rq_pos() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5
+$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14959,14 +16167,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/buffer_head.h>
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_rq_pos(req);
+               struct block_device *bdev = NULL;
+               invalidate_bdev(bdev);
 
   ;
   return 0;
@@ -14975,11 +16183,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14995,7 +16209,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_POS 1
+#define HAVE_1ARG_INVALIDATE_BDEV 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_rq_sectors() is available" >&5
-$as_echo_n "checking whether blk_rq_sectors() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5
+$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15036,8 +16249,8 @@ int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_rq_sectors(req);
+               struct block_device *bdev = NULL;
+               bdev_logical_block_size(bdev);
 
   ;
   return 0;
@@ -15046,11 +16259,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15066,7 +16285,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_SECTORS 1
+#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1
 _ACEOF
 
 
        EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5
-$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether bdev_physical_block_size() is available" >&5
+$as_echo_n "checking whether bdev_physical_block_size() is available... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15107,8 +16326,8 @@ int
 main (void)
 {
 
-               struct gendisk *disk = NULL;
-               (void) get_disk_ro(disk);
+               struct block_device *bdev = NULL;
+               bdev_physical_block_size(bdev);
 
   ;
   return 0;
@@ -15117,11 +16336,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15137,7 +16362,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_DISK_RO 1
+#define HAVE_BDEV_PHYSICAL_BLOCK_SIZE 1
 _ACEOF
 
 
@@ -15157,9 +16382,9 @@ fi
 
        EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5
-$as_echo_n "checking whether get_gendisk() is available... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether bio has bi_iter" >&5
+$as_echo_n "checking whether bio has bi_iter... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15170,13 +16395,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/genhd.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               get_gendisk(0, NULL);
+               struct bio bio;
+               bio.bi_iter.bi_sector = 0;
 
   ;
   return 0;
@@ -15185,11 +16411,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15200,74 +16432,33 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
 
-fi
-
-       rm -Rf build
-
-
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_BVEC_ITER 1
+_ACEOF
 
-       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in block/genhd.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_GENDISK 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-               fi
-       fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5
-$as_echo_n "checking whether rq_is_sync() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
+$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15278,14 +16469,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) rq_is_sync(req);
+               int flags __attribute__ ((unused));
+               flags = ((1 << BIO_RW_FAILFAST_DEV) |
+                        (1 << BIO_RW_FAILFAST_TRANSPORT) |
+                        (1 << BIO_RW_FAILFAST_DRIVER));
 
   ;
   return 0;
@@ -15294,11 +16487,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15314,7 +16513,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_RQ_IS_SYNC 1
+#define HAVE_BIO_RW_FAILFAST_DTD 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether rq_for_each_segment() is available" >&5
-$as_echo_n "checking whether rq_for_each_segment() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether bio_set_dev() exists" >&5
+$as_echo_n "checking whether bio_set_dev() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15349,16 +16545,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/bio.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct bio_vec *bv;
-               struct req_iterator iter;
-               struct request *req = NULL;
-               rq_for_each_segment(bv, req, iter) { }
+               struct block_device *bdev = NULL;
+               struct bio *bio = NULL;
+               bio_set_dev(bio, bdev);
 
   ;
   return 0;
@@ -15367,11 +16563,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15387,7 +16589,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_RQ_FOR_EACH_SEGMENT 1
+#define HAVE_BIO_SET_DEV 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether ql->discard_granularity is available" >&5
-$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5
+$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15420,15 +16621,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               struct queue_limits ql __attribute__ ((unused));
-
-               ql.discard_granularity = 0;
+               int flags __attribute__ ((unused));
+               flags = REQ_FAILFAST_MASK;
 
   ;
   return 0;
@@ -15437,11 +16637,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15457,7 +16663,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_DISCARD_GRANULARITY 1
+#define HAVE_REQ_FAILFAST_MASK 1
 _ACEOF
 
 
@@ -15476,8 +16682,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5
-$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether REQ_OP_DISCARD is defined" >&5
+$as_echo_n "checking whether REQ_OP_DISCARD is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15488,26 +16695,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
-               #include <linux/xattr.h>
-
-               const struct xattr_handler xattr_test_handler = {
-                       .prefix = "test",
-                       .get    = NULL,
-                       .set    = NULL,
-               };
-
-               const struct xattr_handler *xattr_handlers[] = {
-                       &xattr_test_handler,
-               };
+               #include <linux/blk_types.h>
 
 int
 main (void)
 {
 
-               struct super_block sb __attribute__ ((unused));
-
-               sb.s_xattr = xattr_handlers;
+               int op __attribute__ ((unused)) = REQ_OP_DISCARD;
 
   ;
   return 0;
@@ -15516,11 +16710,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15536,7 +16736,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONST_XATTR_HANDLER 1
+#define HAVE_REQ_OP_DISCARD 1
 _ACEOF
 
 
@@ -15556,8 +16756,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether REQ_OP_SECURE_ERASE is defined" >&5
+$as_echo_n "checking whether REQ_OP_SECURE_ERASE is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15568,17 +16768,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/xattr.h>
+               #include <linux/blk_types.h>
 
 int
 main (void)
 {
 
-               int (*get)(struct dentry *dentry, const char *name,
-                   void *buffer, size_t size, int handler_flags) = NULL;
-               struct xattr_handler xops __attribute__ ((unused));
-
-               xops.get = get;
+               int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
 
   ;
   return 0;
@@ -15587,11 +16783,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15607,7 +16809,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_DENTRY_XATTR_GET 1
+#define HAVE_REQ_OP_SECURE_ERASE 1
 _ACEOF
 
 
@@ -15627,8 +16829,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether REQ_OP_FLUSH is defined" >&5
+$as_echo_n "checking whether REQ_OP_FLUSH is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15639,18 +16841,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/xattr.h>
+               #include <linux/blk_types.h>
 
 int
 main (void)
 {
 
-               int (*set)(struct dentry *dentry, const char *name,
-                   const void *buffer, size_t size, int flags,
-                   int handler_flags) = NULL;
-               struct xattr_handler xops __attribute__ ((unused));
-
-               xops.set = set;
+               int op __attribute__ ((unused)) = REQ_OP_FLUSH;
 
   ;
   return 0;
@@ -15659,11 +16856,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15679,7 +16882,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_DENTRY_XATTR_SET 1
+#define HAVE_REQ_OP_FLUSH 1
 _ACEOF
 
 
@@ -15699,9 +16902,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5
-$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
-
+       { $as_echo "$as_me:$LINENO: checking whether bio->bi_opf is defined" >&5
+$as_echo_n "checking whether bio->bi_opf is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15712,17 +16914,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
-
-               int show_options (struct seq_file * x, struct dentry * y) { return 0; };
-               static struct super_operations sops __attribute__ ((unused)) = {
-                       .show_options = show_options,
-               };
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
+               struct bio bio __attribute__ ((unused));
+               bio.bi_opf = 0;
 
   ;
   return 0;
@@ -15731,11 +16930,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15751,7 +16956,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1
+#define HAVE_BIO_BI_OPF 1
 _ACEOF
 
 
@@ -15771,9 +16976,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5
-$as_echo_n "checking whether fops->fsync() wants... " >&6; }
-
+       { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 1 arg" >&5
+$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15784,16 +16988,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/bio.h>
+
+               void wanted_end_io(struct bio *bio) { return; }
+
+               bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, struct dentry *, int) = NULL;
-               struct file_operations fops __attribute__ ((unused));
-
-               fops.fsync = fsync;
 
   ;
   return 0;
@@ -15802,11 +17006,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15818,11 +17028,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: dentry" >&5
-$as_echo "dentry" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITH_DENTRY 1
+#define HAVE_1ARG_BIO_END_IO_T 1
 _ACEOF
 
 
@@ -15830,6 +17040,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -15840,6 +17052,8 @@ fi
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether bio->bi_status exists" >&5
+$as_echo_n "checking whether bio->bi_status exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15850,16 +17064,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, int) = NULL;
-               struct file_operations fops __attribute__ ((unused));
+               struct bio bio __attribute__ ((unused));
+               blk_status_t status __attribute__ ((unused)) = BLK_STS_OK;
 
-               fops.fsync = fsync;
+               bio.bi_status = status;
 
   ;
   return 0;
@@ -15868,11 +17082,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15884,11 +17104,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: no dentry" >&5
-$as_echo "no dentry" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITHOUT_DENTRY 1
+#define HAVE_BIO_BI_STATUS 1
 _ACEOF
 
 
@@ -15896,6 +17116,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -15906,6 +17128,8 @@ fi
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_BARRIER is defined" >&5
+$as_echo_n "checking whether BIO_RW_BARRIER is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15916,16 +17140,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
-               struct file_operations fops __attribute__ ((unused));
-
-               fops.fsync = fsync;
+               int flags __attribute__ ((unused));
+               flags = BIO_RW_BARRIER;
 
   ;
   return 0;
@@ -15934,11 +17156,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -15950,11 +17178,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: range" >&5
-$as_echo "range" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_RANGE 1
+#define HAVE_BIO_RW_BARRIER 1
 _ACEOF
 
 
@@ -15962,6 +17190,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -15972,6 +17202,8 @@ fi
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_DISCARD is defined" >&5
+$as_echo_n "checking whether BIO_RW_DISCARD is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15982,16 +17214,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, struct dentry *, int) = NULL;
-               file_operations_no_const fops __attribute__ ((unused));
-
-               fops.fsync = fsync;
+               int flags __attribute__ ((unused));
+               flags = BIO_RW_DISCARD;
 
   ;
   return 0;
@@ -16000,11 +17230,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16016,11 +17252,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: dentry" >&5
-$as_echo "dentry" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITH_DENTRY 1
+#define HAVE_BIO_RW_DISCARD 1
 _ACEOF
 
 
@@ -16028,6 +17264,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -16038,6 +17276,8 @@ fi
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue bdi is dynamic" >&5
+$as_echo_n "checking whether blk_queue bdi is dynamic... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16048,16 +17288,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, int) = NULL;
-               file_operations_no_const fops __attribute__ ((unused));
-
-               fops.fsync = fsync;
+               struct request_queue q;
+               struct backing_dev_info bdi;
+               q.backing_dev_info = &bdi;
 
   ;
   return 0;
@@ -16066,11 +17305,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16082,11 +17327,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: no dentry" >&5
-$as_echo "no dentry" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITHOUT_DENTRY 1
+#define HAVE_BLK_QUEUE_BDI_DYNAMIC 1
 _ACEOF
 
 
@@ -16094,6 +17339,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -16104,6 +17351,8 @@ fi
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flag_clear() exists" >&5
+$as_echo_n "checking whether blk_queue_flag_clear() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16114,16 +17363,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/kernel.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
-               file_operations_no_const fops __attribute__ ((unused));
-
-               fops.fsync = fsync;
+               struct request_queue *q = NULL;
+               blk_queue_flag_clear(0, q);
 
   ;
   return 0;
@@ -16132,11 +17380,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16148,11 +17402,12 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: range" >&5
-$as_echo "range" >&6; }
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_RANGE 1
+#define HAVE_BLK_QUEUE_FLAG_CLEAR 1
 _ACEOF
 
 
@@ -16160,6 +17415,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -16170,9 +17427,8 @@ fi
 
 
 
-
-       { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5
-$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flag_set() exists" >&5
+$as_echo_n "checking whether blk_queue_flag_set() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16183,16 +17439,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
-               void evict_inode (struct inode * t) { return; }
-               static struct super_operations sops __attribute__ ((unused)) = {
-                       .evict_inode = evict_inode,
-               };
+               #include <linux/kernel.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
+               struct request_queue *q = NULL;
+               blk_queue_flag_set(0, q);
 
   ;
   return 0;
@@ -16201,11 +17456,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16221,7 +17482,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_EVICT_INODE 1
+#define HAVE_BLK_QUEUE_FLAG_SET 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5
-$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5
+$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16253,17 +17516,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               int (*nr_cached_objects)(struct super_block *)
-                       __attribute__ ((unused)) = NULL;
-               struct super_operations sops __attribute__ ((unused)) = {
-                       .nr_cached_objects = nr_cached_objects,
-               };
+               struct request_queue *q = NULL;
+               (void) blk_queue_flush(q, REQ_FLUSH);
 
   ;
   return 0;
@@ -16272,11 +17532,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16292,28 +17558,12 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_NR_CACHED_OBJECTS 1
+#define HAVE_BLK_QUEUE_FLUSH 1
 _ACEOF
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5
-$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16324,17 +17574,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                       #include <linux/module.h>
+                       #include <linux/blkdev.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
 
 int
 main (void)
 {
 
-               void (*free_cached_objects)(struct super_block *, int)
-                       __attribute__ ((unused)) = NULL;
-               struct super_operations sops __attribute__ ((unused)) = {
-                       .free_cached_objects = free_cached_objects,
-               };
+                       struct request_queue *q = NULL;
+                       (void) blk_queue_flush(q, REQ_FLUSH);
 
   ;
   return 0;
@@ -16343,11 +17593,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16359,14 +17615,29 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FREE_CACHED_OBJECTS 1
+#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1
 _ACEOF
 
 
+
+
+fi
+
+       rm -Rf build
+
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 
-
-
-       { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5
-$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
+                                       { $as_echo "$as_me:$LINENO: checking whether blk_queue_write_cache() exists" >&5
+$as_echo_n "checking whether blk_queue_write_cache() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16396,16 +17665,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/kernel.h>
+               #include <linux/blkdev.h>
+
 
 int
 main (void)
 {
 
-               long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
-               struct file_operations fops __attribute__ ((unused)) = {
-                       .fallocate = fallocate,
-               };
+               struct request_queue *q = NULL;
+               blk_queue_write_cache(q, true, true);
 
   ;
   return 0;
@@ -16414,11 +17683,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16434,28 +17709,12 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FILE_FALLOCATE 1
+#define HAVE_BLK_QUEUE_WRITE_CACHE 1
 _ACEOF
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5
-$as_echo_n "checking whether iops->fallocate() exists... " >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether blk_queue_write_cache() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_write_cache() is GPL-only... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16466,16 +17725,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                       #include <linux/kernel.h>
+                       #include <linux/module.h>
+                       #include <linux/blkdev.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
 
 int
 main (void)
 {
 
-               long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL;
-               struct inode_operations fops __attribute__ ((unused)) = {
-                       .fallocate = fallocate,
-               };
+                       struct request_queue *q = NULL;
+                       blk_queue_write_cache(q, true, true);
 
   ;
   return 0;
@@ -16484,11 +17745,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16500,14 +17767,29 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_INODE_FALLOCATE 1
+#define HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY 1
 _ACEOF
 
 
+
+
+fi
+
+       rm -Rf build
+
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5
-$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5
+$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16536,16 +17822,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
-               struct file_operations_no_const fops __attribute__ ((unused)) = {
-                       .fallocate = fallocate,
-               };
+               struct request_queue *q = NULL;
+               (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
 
   ;
   return 0;
@@ -16554,11 +17838,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16574,7 +17864,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FILE_FALLOCATE 1
+#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-
-       { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5
-$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5
+$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16607,17 +17899,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
-               void truncate_range(struct inode *inode, loff_t start,
-                                   loff_t end) { return; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .truncate_range = truncate_range,
-               };
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
+               struct request_queue *q = NULL;
+               (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
 
   ;
   return 0;
@@ -16626,11 +17915,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16646,7 +17941,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_INODE_TRUNCATE_RANGE 1
+#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5
-$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether the BIO_RW_UNPLUG enum is available" >&5
+$as_echo_n "checking whether the BIO_RW_UNPLUG enum is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16678,17 +17976,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               int (*create) (struct inode *, struct dentry *, umode_t,
-                   struct nameidata *) = NULL;
-               struct inode_operations iops __attribute__ ((unused)) = {
-                       .create = create,
-               };
+               extern enum bio_rw_flags rw;
+
+               rw = BIO_RW_UNPLUG;
 
   ;
   return 0;
@@ -16697,11 +17993,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16717,7 +18019,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CREATE_UMODE_T 1
+#define HAVE_BLK_QUEUE_HAVE_BIO_RW_UNPLUG 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5
-$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct blk_plug is available" >&5
+$as_echo_n "checking whether struct blk_plug is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16749,16 +18054,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/dcache.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               struct vfsmount *(*d_automount) (struct path *) = NULL;
-               struct dentry_operations dops __attribute__ ((unused)) = {
-                       .d_automount = d_automount,
-               };
+               struct blk_plug plug;
+
+               blk_start_plug(&plug);
+               blk_finish_plug(&plug);
 
   ;
   return 0;
@@ -16767,73 +18072,8 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_AUTOMOUNT 1
-_ACEOF
-
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5
-$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-               #include <linux/exportfs.h>
-               int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
-                             struct inode *parent) { return 0; }
-               static struct export_operations eops __attribute__ ((unused))={
-                       .encode_fh = encode_fh,
-               };
-
-int
-main (void)
-{
-
 
-  ;
-  return 0;
-}
+cat - <<_ACEOF >conftest.h
 
 _ACEOF
 
@@ -16842,7 +18082,7 @@ _ACEOF
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16858,7 +18098,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ENCODE_FH_WITH_INODE 1
+#define HAVE_BLK_QUEUE_HAVE_BLK_PLUG 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5
-$as_echo_n "checking whether clear_inode() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether get_disk_and_module() is available" >&5
+$as_echo_n "checking whether get_disk_and_module() is available... " >&6; }
 
 
 
@@ -16890,13 +18131,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/genhd.h>
 
 int
 main (void)
 {
 
-               clear_inode(NULL);
+               struct gendisk *disk = NULL;
+               (void) get_disk_and_module(disk);
 
   ;
   return 0;
@@ -16905,11 +18147,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -16940,13 +18188,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
+       grep -q -E '[[:space:]]get_disk_and_module[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
+               for file in block/genhd.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(get_disk_and_module)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -16975,7 +18223,7 @@ $as_echo "no" >&6; }
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLEAR_INODE 1
+#define HAVE_GET_DISK_AND_MODULE 1
 _ACEOF
 
 
@@ -16983,9 +18231,11 @@ _ACEOF
        fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5
-$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5
+$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16996,13 +18246,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               insert_inode_locked(NULL);
+               struct gendisk *disk = NULL;
+               (void) get_disk_ro(disk);
 
   ;
   return 0;
@@ -17011,11 +18262,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17026,71 +18283,33 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-
-       rm -Rf build
-
-
-       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_DISK_RO 1
+_ACEOF
 
-       grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INSERT_INODE_LOCKED 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-               fi
-       fi
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5
-$as_echo_n "checking whether d_make_root() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5
+$as_echo_n "checking whether get_gendisk() is available... " >&6; }
 
 
 
@@ -17102,13 +18321,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/dcache.h>
+               #include <linux/genhd.h>
 
 int
 main (void)
 {
 
-               d_make_root(NULL);
+               get_gendisk(0, NULL);
 
   ;
   return 0;
@@ -17117,11 +18336,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17152,13 +18377,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]d_make_root[[:space:]]' \
+       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
+               for file in block/genhd.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -17187,7 +18412,7 @@ $as_echo "no" >&6; }
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_MAKE_ROOT 1
+#define HAVE_GET_GENDISK 1
 _ACEOF
 
 
@@ -17195,9 +18420,9 @@ _ACEOF
        fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5
-$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether bio_set_op_attrs is available" >&5
+$as_echo_n "checking whether bio_set_op_attrs is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17208,13 +18433,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/dcache.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               d_obtain_alias(NULL);
+               struct bio *bio __attribute__ ((unused)) = NULL;
+
+               bio_set_op_attrs(bio, 0, 0);
 
   ;
   return 0;
@@ -17223,11 +18450,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17238,72 +18471,33 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
 
-       rm -Rf build
-
-
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_SET_OP_ATTRS 1
+_ACEOF
 
-       grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_OBTAIN_ALIAS 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-               fi
-       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5
-$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether generic_readlink is global" >&5
+$as_echo_n "checking whether generic_readlink is global... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17320,7 +18514,9 @@ int
 main (void)
 {
 
-               check_disk_size_change(NULL, NULL);
+               int i __attribute__ ((unused));
+
+               i = generic_readlink(NULL, NULL, 0);
 
   ;
   return 0;
@@ -17329,11 +18525,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17344,72 +18546,33 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
 
-       rm -Rf build
-
-
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_READLINK 1
+_ACEOF
 
-       grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CHECK_DISK_SIZE_CHANGE 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-               fi
-       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5
-$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether ql->discard_granularity is available" >&5
+$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17420,13 +18583,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               truncate_setsize(NULL, 0);
+               struct queue_limits ql __attribute__ ((unused));
+
+               ql.discard_granularity = 0;
 
   ;
   return 0;
@@ -17435,11 +18600,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17450,74 +18621,33 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-
-       rm -Rf build
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DISCARD_GRANULARITY 1
+_ACEOF
 
-       grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in mm/truncate.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TRUNCATE_SETSIZE 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-               fi
-       fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5
-$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+       { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_handler" >&5
+$as_echo_n "checking whether super_block uses const struct xattr_handler... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17528,20 +18658,27 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/security.h>
+               #include <linux/fs.h>
+               #include <linux/xattr.h>
+
+               const struct xattr_handler xattr_test_handler = {
+                       .prefix = "test",
+                       .get    = NULL,
+                       .set    = NULL,
+               };
+
+               const struct xattr_handler *xattr_handlers[] = {
+                       &xattr_test_handler,
+               };
+
+               const struct super_block sb __attribute__ ((unused)) = {
+                       .s_xattr = xattr_handlers,
+               };
 
 int
 main (void)
 {
 
-               struct inode *ip __attribute__ ((unused)) = NULL;
-               struct inode *dip __attribute__ ((unused)) = NULL;
-               const struct qstr *str __attribute__ ((unused)) = NULL;
-               char *name __attribute__ ((unused)) = NULL;
-               void *value __attribute__ ((unused)) = NULL;
-               size_t len __attribute__ ((unused)) = 0;
-
-               security_inode_init_security(ip, dip, str, &name, &value, &len);
 
   ;
   return 0;
@@ -17550,11 +18687,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17570,7 +18713,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1
+#define HAVE_CONST_XATTR_HANDLER 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5
-$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+       { $as_echo "$as_me:$LINENO: checking whether xattr_handler has name" >&5
+$as_echo_n "checking whether xattr_handler has name... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17605,18 +18745,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/security.h>
+               #include <linux/xattr.h>
+
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .name = XATTR_NAME_POSIX_ACL_ACCESS,
+               };
 
 int
 main (void)
 {
 
-               struct inode *ip __attribute__ ((unused)) = NULL;
-               struct inode *dip __attribute__ ((unused)) = NULL;
-               const struct qstr *str __attribute__ ((unused)) = NULL;
-               initxattrs func __attribute__ ((unused)) = NULL;
-
-               security_inode_init_security(ip, dip, str, func, NULL);
 
   ;
   return 0;
@@ -17625,11 +18764,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17645,7 +18790,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1
+#define HAVE_XATTR_HANDLER_NAME 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5
-$as_echo_n "checking whether mount_nodev() is available... " >&6; }
 
+                                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants both dentry and inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17678,13 +18822,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/xattr.h>
+
+               int get(const struct xattr_handler *handler,
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, void *buffer, size_t size) { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .get = get,
+               };
 
 int
 main (void)
 {
 
-               mount_nodev(NULL, 0, NULL, NULL);
 
   ;
   return 0;
@@ -17693,11 +18844,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17708,72 +18865,93 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_GET_DENTRY_INODE 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
 
+                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
 
-fi
 
-       rm -Rf build
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-       if test $rc -ne 0; then :
+                       #include <linux/xattr.h>
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                       int get(const struct xattr_handler *handler,
+                           struct dentry *dentry, const char *name,
+                           void *buffer, size_t size) { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .get = get,
+                       };
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+int
+main (void)
+{
 
-       grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/super.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+  ;
+  return 0;
+}
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+_ACEOF
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MOUNT_NODEV 1
+cat - <<_ACEOF >conftest.h
+
 _ACEOF
 
 
-               fi
-       fi
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_GET_HANDLER 1
+_ACEOF
 
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5
-$as_echo_n "checking whether super_block has s_shrink... " >&6; }
+                                                                                                                                                                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17784,19 +18962,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                               #include <linux/xattr.h>
+
+                               int get(struct dentry *dentry, const char *name,
+                                   void *buffer, size_t size, int handler_flags)
+                                   { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .get = get,
+                               };
 
 int
 main (void)
 {
 
-               int (*shrink)(struct shrinker *, struct shrink_control *sc)
-                       __attribute__ ((unused)) = NULL;
-               struct super_block sb __attribute__ ((unused)) = {
-                       .s_shrink.shrink = shrink,
-                       .s_shrink.seeks = DEFAULT_SEEKS,
-                       .s_shrink.batch = 0,
-               };
 
   ;
   return 0;
@@ -17805,11 +18984,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17821,33 +19006,22 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK 1
+#define HAVE_XATTR_GET_DENTRY 1
 _ACEOF
 
 
-
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether super_block has s_bdi" >&5
-$as_echo_n "checking whether super_block has s_bdi... " >&6; }
+                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17858,14 +19032,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                                       #include <linux/xattr.h>
+
+                                       int get(struct inode *ip, const char *name,
+                                           void *buffer, size_t size) { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .get = get,
+                                       };
 
 int
 main (void)
 {
 
-               struct super_block sb __attribute__ ((unused));
-               sb.s_bdi = NULL;
 
   ;
   return 0;
@@ -17874,11 +19053,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17890,11 +19075,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI 1
+#define HAVE_XATTR_GET_INODE 1
 _ACEOF
 
 
@@ -17902,8 +19087,33 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                                       { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
 
 
 
@@ -17913,9 +19123,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() is available" >&5
-$as_echo_n "checking whether bdi_setup_and_register() is available... " >&6; }
 
+                                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants both dentry and inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17926,13 +19136,22 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/backing-dev.h>
+               #include <linux/xattr.h>
+
+               int set(const struct xattr_handler *handler,
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, const void *buffer,
+                   size_t size, int flags)
+                   { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .set = set,
+               };
 
 int
 main (void)
 {
 
-               bdi_setup_and_register(NULL, NULL, 0);
 
   ;
   return 0;
@@ -17941,11 +19160,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -17956,72 +19181,94 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_SET_DENTRY_INODE 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
 
+                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
 
-fi
 
-       rm -Rf build
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-       if test $rc -ne 0; then :
+                       #include <linux/xattr.h>
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                       int set(const struct xattr_handler *handler,
+                           struct dentry *dentry, const char *name,
+                           const void *buffer, size_t size, int flags)
+                           { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .set = set,
+                       };
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+int
+main (void)
+{
 
-       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in mm/backing-dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+  ;
+  return 0;
+}
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+_ACEOF
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI_SETUP_AND_REGISTER 1
+cat - <<_ACEOF >conftest.h
+
 _ACEOF
 
 
-               fi
-       fi
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_SET_HANDLER 1
+_ACEOF
 
 
-       { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5
-$as_echo_n "checking whether set_nlink() is available... " >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                                                                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18032,15 +19279,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                               #include <linux/xattr.h>
+
+                               int set(struct dentry *dentry, const char *name,
+                                   const void *buffer, size_t size, int flags,
+                                   int handler_flags) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .set = set,
+                               };
 
 int
 main (void)
 {
 
-               struct inode node;
-               unsigned int link = 0;
-               (void) set_nlink(&node, link);
 
   ;
   return 0;
@@ -18049,11 +19301,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -18065,11 +19323,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_NLINK 1
+#define HAVE_XATTR_SET_DENTRY 1
 _ACEOF
 
 
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
+                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
 
 
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
 
-       rm -Rf build
+                                       #include <linux/xattr.h>
 
+                                       int set(struct inode *ip, const char *name,
+                                           const void *buffer, size_t size, int flags)
+                                           { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .set = set,
+                                       };
 
+int
+main (void)
+{
 
 
-       if test "$LINUX_OBJ" != "$LINUX"; then
+  ;
+  return 0;
+}
+
+_ACEOF
 
-               KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
 
-fi
 
+cat - <<_ACEOF >conftest.h
 
+_ACEOF
 
 
-                       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
+                                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
- ;;
-               user)
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_SET_INODE 1
+_ACEOF
 
 
-# Check whether --with-udevdir was given.
-if test "${with_udevdir+set}" = set; then
-  withval=$with_udevdir; udevdir=$withval
 else
-  udevdir='${exec_prefix}/lib/udev'
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                       { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
-# Check whether --with-udevruledir was given.
-if test "${with_udevruledir+set}" = set; then
-  withval=$with_udevruledir; udevruledir=$withval
-else
-  udevruledir='${udevdir}/rules.d'
 fi
 
+       rm -Rf build
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5
-$as_echo_n "checking for target asm dir... " >&6; }
-       TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
+fi
 
-       case $TARGET_ARCH in
-       i386|x86_64)
-               TARGET_ASM_DIR=asm-${TARGET_ARCH}
-               ;;
-       *)
-               TARGET_ASM_DIR=asm-generic
-               ;;
-       esac
+       rm -Rf build
 
 
-       { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5
-$as_echo "$TARGET_ASM_DIR" >&6; }
 
 
-       { $as_echo "$as_me:$LINENO: checking for ioctl()" >&5
-$as_echo_n "checking for ioctl()... " >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <unistd.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ioctl" >/dev/null 2>&1; then
-  is_unistd=yes
-else
-  is_unistd=no
 fi
-rm -f conftest*
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/ioctl.h>
+       rm -Rf build
+
+
+
+
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ioctl" >/dev/null 2>&1; then
-  is_sys_ioctl=yes
-else
-  is_sys_ioctl=no
 fi
-rm -f conftest*
 
-       cat >conftest.$ac_ext <<_ACEOF
+       rm -Rf build
+
+
+
+
+                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants simple" >&5
+$as_echo_n "checking whether xattr_handler->list() wants simple... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stropts.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ioctl" >/dev/null 2>&1; then
-  is_stropts=yes
-else
-  is_stropts=no
-fi
-rm -f conftest*
 
+               #include <linux/xattr.h>
 
-       if test $is_unistd = yes; then
-               result=unistd.h
+               bool list(struct dentry *dentry) { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .list = list,
+               };
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_UNISTD_H 1
-_ACEOF
+int
+main (void)
+{
 
-       else
 
-               if test $is_sys_ioctl = yes; then
-                       result=sys/ioctl.h
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_SYS_IOCTL_H 1
 _ACEOF
 
-               elif test $is_stropts = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_STROPTS_H 1
+
+cat - <<_ACEOF >conftest.h
+
 _ACEOF
 
-               else
-                       result=no
-               fi
-       fi
 
-       if test $result = no; then
-                { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-                { { $as_echo "$as_me:$LINENO: error: *** Cannot locate ioctl() definition" >&5
-$as_echo "$as_me: error: *** Cannot locate ioctl() definition" >&2;}
-   { (exit 1); exit 1; }; }
-       else
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-       fi
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_LIST_SIMPLE 1
+_ACEOF
 
-       ZLIB=
 
-       if test "${ac_cv_header_zlib_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
-$as_echo_n "checking for zlib.h... " >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-$as_echo "$ac_cv_header_zlib_h" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
-$as_echo_n "checking zlib.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->list() wants xattr_handler... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <zlib.h>
+
+
+                       #include <linux/xattr.h>
+
+                       size_t list(const struct xattr_handler *handler,
+                           struct dentry *dentry, char *list, size_t list_size,
+                           const char *name, size_t name_len) { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .list = list,
+                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_LIST_HANDLER 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
+                                                                                                                                                                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->list() wants dentry... " >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
-$as_echo_n "checking zlib.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <zlib.h>
+
+
+                               #include <linux/xattr.h>
+
+                               size_t list(struct dentry *dentry,
+                                   char *list, size_t list_size,
+                                   const char *name, size_t name_len,
+                                   int handler_flags) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .list = list,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_LIST_DENTRY 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
+                                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->list() wants inode... " >&6; }
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
-$as_echo_n "checking for zlib.h... " >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_zlib_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-$as_echo "$ac_cv_header_zlib_h" >&6; }
-
-fi
-if test "x$ac_cv_header_zlib_h" = x""yes; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** zlib.h missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** zlib.h missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
-$as_echo_n "checking for compress2 in -lz... " >&6; }
-if test "${ac_cv_lib_z_compress2+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char compress2 ();
+
+                                       #include <linux/xattr.h>
+
+                                       size_t list(struct inode *ip, char *lst,
+                                           size_t list_size, const char *name,
+                                           size_t name_len) { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .list = list,
+                                       };
+
 int
-main ()
+main (void)
 {
-return compress2 ();
+
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_z_compress2=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_LIST_INODE 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_z_compress2=no
+                                       { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+       rm -Rf build
+
+
+
+
+
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
-$as_echo "$ac_cv_lib_z_compress2" >&6; }
-if test "x$ac_cv_lib_z_compress2" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
 
-  LIBS="-lz $LIBS"
+       rm -Rf build
+
+
+
+
 
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** compress2() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** compress2() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
 fi
 
+       rm -Rf build
 
 
-{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
-$as_echo_n "checking for uncompress in -lz... " >&6; }
-if test "${ac_cv_lib_z_uncompress+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether inode_owner_or_capable() exists" >&5
+$as_echo_n "checking whether inode_owner_or_capable() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uncompress ();
+
+               #include <linux/fs.h>
+
 int
-main ()
+main (void)
 {
-return uncompress ();
+
+               struct inode *ip = NULL;
+               (void) inode_owner_or_capable(ip);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_z_uncompress=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
-       ac_cv_lib_z_uncompress=no
-fi
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
-if test "x$ac_cv_lib_z_uncompress" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INODE_OWNER_OR_CAPABLE 1
 _ACEOF
 
-  LIBS="-lz $LIBS"
 
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** uncompress() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** uncompress() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether is_owner_or_cap() exists" >&5
+$as_echo_n "checking whether is_owner_or_cap() exists... " >&6; }
 
 
-{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5
-$as_echo_n "checking for crc32 in -lz... " >&6; }
-if test "${ac_cv_lib_z_crc32+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crc32 ();
+
+                       #include <linux/fs.h>
+                       #include <linux/sched.h>
+
 int
-main ()
+main (void)
 {
-return crc32 ();
+
+                       struct inode *ip = NULL;
+                       (void) is_owner_or_cap(ip);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_z_crc32=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IS_OWNER_OR_CAP 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_z_crc32=no
-fi
+                       { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" >&5
+$as_echo "$as_me: error: no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" >&2;}
+   { (exit 1); exit 1; }; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5
-$as_echo "$ac_cv_lib_z_crc32" >&6; }
-if test "x$ac_cv_lib_z_crc32" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
 
-  LIBS="-lz $LIBS"
 
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** crc32() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** crc32() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
 fi
 
+       rm -Rf build
 
-       ZLIB="-lz"
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZLIB 1
-_ACEOF
 
 
+fi
 
-       LIBUUID=
+       rm -Rf build
 
-       if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
-$as_echo_n "checking for uuid/uuid.h... " >&6; }
-if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
-$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5
-$as_echo_n "checking uuid/uuid.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_from_xattr() needs user_ns" >&5
+$as_echo_n "checking whether posix_acl_from_xattr() needs user_ns... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <uuid/uuid.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl_xattr.h>
+
+int
+main (void)
+{
+
+               posix_acl_from_xattr(&init_user_ns, NULL, 0);
+
+  ;
+  return 0;
+}
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5
-$as_echo_n "checking uuid/uuid.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <uuid/uuid.h>
+
+
+
+cat - <<_ACEOF >conftest.h
+
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_FROM_XATTR_USERNS 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;}
 
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
-$as_echo_n "checking for uuid/uuid.h... " >&6; }
-if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_uuid_uuid_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
-$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
 
-fi
-if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** uuid/uuid.h missing, libuuid-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** uuid/uuid.h missing, libuuid-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
+       rm -Rf build
 
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5
-$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_release() is available" >&5
+$as_echo_n "checking whether posix_acl_release() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uuid_generate ();
+
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
 int
-main ()
+main (void)
 {
-return uuid_generate ();
+
+               struct posix_acl* tmp = posix_acl_alloc(1, 0);
+               posix_acl_release(tmp);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_uuid_uuid_generate=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
-       ac_cv_lib_uuid_uuid_generate=no
-fi
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_RELEASE 1
 _ACEOF
 
-  LIBS="-luuid $LIBS"
-
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** uuid_generate() missing, libuuid-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** uuid_generate() missing, libuuid-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
 
+               { $as_echo "$as_me:$LINENO: checking whether posix_acl_release() is GPL-only" >&5
+$as_echo_n "checking whether posix_acl_release() is GPL-only... " >&6; }
 
 
-{ $as_echo "$as_me:$LINENO: checking for uuid_is_null in -luuid" >&5
-$as_echo_n "checking for uuid_is_null in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_uuid_is_null+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uuid_is_null ();
+
+                       #include <linux/module.h>
+                       #include <linux/cred.h>
+                       #include <linux/fs.h>
+                       #include <linux/posix_acl.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+
 int
-main ()
+main (void)
 {
-return uuid_is_null ();
+
+                       struct posix_acl* tmp = posix_acl_alloc(1, 0);
+                       posix_acl_release(tmp);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_uuid_uuid_is_null=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_uuid_uuid_is_null=no
-fi
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_is_null" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_is_null" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_RELEASE_GPL_ONLY 1
 _ACEOF
 
-  LIBS="-luuid $LIBS"
 
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** uuid_is_null() missing, libuuid-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** uuid_is_null() missing, libuuid-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+
+
 fi
 
+       rm -Rf build
 
-       LIBUUID="-luuid"
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBUUID 1
-_ACEOF
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
-# Check whether --with-blkid was given.
-if test "${with_blkid+set}" = set; then
-  withval=$with_blkid;
-else
-  with_blkid=check
 fi
 
+       rm -Rf build
 
-       LIBBLKID=
-       if test "x$with_blkid" != xno; then
 
-               { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5
-$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
-if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lblkid  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+
+       { $as_echo "$as_me:$LINENO: checking whether set_cached_acl() is usable" >&5
+$as_echo_n "checking whether set_cached_acl() is usable... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char blkid_get_cache ();
+
+               #include <linux/module.h>
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
+               MODULE_LICENSE("$ZFS_META_LICENSE");
+
 int
-main ()
+main (void)
 {
-return blkid_get_cache ();
+
+               struct inode *ip = NULL;
+               struct posix_acl *acl = posix_acl_alloc(1, 0);
+               set_cached_acl(ip, ACL_TYPE_ACCESS, acl);
+               forget_cached_acl(ip, ACL_TYPE_ACCESS);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_blkid_blkid_get_cache=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_CACHED_ACL_USABLE 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_blkid_blkid_get_cache=no
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
-$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
-if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then
 
-                       { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5
-$as_echo_n "checking for blkid zfs support... " >&6; }
+       rm -Rf build
 
-                       ZFS_DEV=`mktemp`
-                       dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \
-                               >/dev/null 2>/dev/null
-                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
-                               dd of=$ZFS_DEV bs=1k count=8 \
-                               seek=132 conv=notrunc &>/dev/null \
-                               >/dev/null 2>/dev/null
 
-                       saved_LDFLAGS="$LDFLAGS"
-                       LDFLAGS="-lblkid"
 
-                       if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_chmod exists" >&5
+$as_echo_n "checking whether posix_acl_chmod exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-                               #include <stdio.h>
-                               #include <blkid/blkid.h>
+
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
 
 int
-main ()
+main (void)
 {
 
-                               blkid_cache cache;
-                               char *value;
+               posix_acl_chmod(NULL, 0, 0)
+
+  ;
+  return 0;
+}
 
-                               if (blkid_get_cache(&cache, NULL) < 0)
-                                       return 1;
+_ACEOF
 
-                               value = blkid_get_tag_value(cache, "TYPE",
-                                                           "$ZFS_DEV");
-                               if (!value) {
-                                       blkid_put_cache(cache);
-                                       return 2;
-                               }
 
-                               if (strcmp(value, "zfs")) {
-                                       free(value);
-                                       blkid_put_cache(cache);
-                                       return 3;
-                               }
 
-                               free(value);
-                               blkid_put_cache(cache);
+cat - <<_ACEOF >conftest.h
 
-  ;
-  return 0;
-}
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-                               rm -f $ZFS_DEV
-                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-                               LIBBLKID="-lblkid"
-
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBBLKID 1
+#define HAVE_POSIX_ACL_CHMOD 1
 _ACEOF
 
 
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-
-                               rm -f $ZFS_DEV
-                               { $as_echo "$as_me:$LINENO: result: no" >&5
+               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-                               if test "x$with_blkid" != xcheck; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-blkid given but unavailable
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
 
 
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
+fi
 
+       rm -Rf build
 
-                       LDFLAGS="$saved_LDFLAGS"
 
-else
 
-                       if test "x$with_blkid" != xcheck; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-blkid given but unavailable
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
+       { $as_echo "$as_me:$LINENO: checking whether __posix_acl_chmod exists" >&5
+$as_echo_n "checking whether __posix_acl_chmod exists... " >&6; }
 
 
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
 
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
 
-fi
+int
+main (void)
+{
 
+               __posix_acl_chmod(NULL, 0, 0)
 
+  ;
+  return 0;
+}
 
+_ACEOF
 
-# Check whether --with-selinux was given.
-if test "${with_selinux+set}" = set; then
-  withval=$with_selinux;
-else
-  with_selinux=check
-fi
 
 
-       LIBSELINUX=
-       if test "x$with_selinux" != xno; then
+cat - <<_ACEOF >conftest.h
 
-               if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
-$as_echo_n "checking for selinux/selinux.h... " >&6; }
-if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
-$as_echo "$ac_cv_header_selinux_selinux_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
-$as_echo_n "checking selinux/selinux.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <selinux/selinux.h>
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
-$as_echo_n "checking selinux/selinux.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <selinux/selinux.h>
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___POSIX_ACL_CHMOD 1
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;}
 
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
-$as_echo_n "checking for selinux/selinux.h... " >&6; }
-if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_selinux_selinux_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
-$as_echo "$ac_cv_header_selinux_selinux_h" >&6; }
 
-fi
-if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then
+       rm -Rf build
 
-                       { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5
-$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
-if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lselinux  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_equiv_mode() wants umode_t" >&5
+$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char is_selinux_enabled ();
+
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
 int
-main ()
+main (void)
 {
-return is_selinux_enabled ();
+
+               umode_t tmp;
+               posix_acl_equiv_mode(NULL,&tmp);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_selinux_is_selinux_enabled=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_selinux_is_selinux_enabled=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
-$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
-if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then
 
-                               LIBSELINUX="-lselinux"
 
+cat - <<_ACEOF >conftest.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBSELINUX 1
 _ACEOF
 
 
-else
-
-                               if test "x$with_selinux" != xcheck; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-fi
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1
+_ACEOF
 
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                       if test "x$with_selinux" != xcheck; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-fi
 
 
 fi
 
+       rm -Rf build
 
 
-else
-
-               { $as_echo "$as_me:$LINENO: checking for selinux support" >&5
-$as_echo_n "checking for selinux support... " >&6; }
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-
 
 
-       { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than=<size> support" >&5
-$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_valid() wants user namespace" >&5
+$as_echo_n "checking whether posix_acl_valid() wants user namespace... " >&6; }
 
-       saved_flags="$CFLAGS"
-       CFLAGS="$CFLAGS -Wframe-larger-than=1024"
 
-       if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
 int
-main ()
+main (void)
 {
 
+               struct user_namespace *user_ns = NULL;
+               const struct posix_acl *acl = NULL;
+               int error;
+
+               error = posix_acl_valid(user_ns, acl);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               FRAME_LARGER_THAN=-Wframe-larger-than=1024
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_VALID_WITH_NS 1
+_ACEOF
+
+
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-
-               FRAME_LARGER_THAN=
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
 
+fi
 
-       CFLAGS="$saved_flags"
+       rm -Rf build
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether pthread stack includes guard" >&5
-$as_echo_n "checking whether pthread stack includes guard... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether iops->permission() exists" >&5
+$as_echo_n "checking whether iops->permission() exists... " >&6; }
 
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="-fstack-check"
-       saved_LDFLAGS="$LDFLAGS"
-       LDFLAGS="-lpthread"
 
-       if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-               #include <pthread.h>
-               #include <sys/resource.h>
-               #include <unistd.h>
-               #include <bits/local_lim.h>
 
-               #define PAGESIZE (sysconf(_SC_PAGESIZE))
-               #define STACK_SIZE 8192
-               #define BUFSIZE 4096
+               #include <linux/fs.h>
 
-               void * func(void *arg)
-               {
-                       char buf[BUFSIZE];
-               }
+               int permission_fn(struct inode *inode, int mask) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .permission = permission_fn,
+               };
 
 int
-main ()
+main (void)
 {
 
-               pthread_t tid;
-               pthread_attr_t attr;
-               struct rlimit l;
-
-               l.rlim_cur = 0;
-               l.rlim_max = 0;
-               setrlimit(RLIMIT_CORE, &l);
-               pthread_attr_init(&attr);
-               pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + STACK_SIZE);
-               pthread_attr_setguardsize(&attr, PAGESIZE);
-               pthread_create(&tid, &attr, func, NULL);
-               pthread_join(tid, NULL);
 
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define NPTL_GUARD_WITHIN_STACK 1
+#define HAVE_PERMISSION 1
 _ACEOF
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       CFLAGS="$saved_CFLAGS"
-       LDFLAGS="$saved_LDFLAGS"
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-   ;;
-               all)
 
 
-# Check whether --with-linux was given.
-if test "${with_linux+set}" = set; then
-  withval=$with_linux; kernelsrc="$withval"
 fi
 
+       rm -Rf build
 
 
-# Check whether --with-linux-obj was given.
-if test "${with_linux_obj+set}" = set; then
-  withval=$with_linux_obj; kernelbuild="$withval"
-fi
 
 
-       { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
-$as_echo_n "checking kernel source directory... " >&6; }
-       if test -z "$kernelsrc"; then
+       { $as_echo "$as_me:$LINENO: checking whether iops->permission() wants nameidata" >&5
+$as_echo_n "checking whether iops->permission() wants nameidata... " >&6; }
 
-               if test -e "/lib/modules/$(uname -r)/source"; then
 
-                       headersdir="/lib/modules/$(uname -r)/source"
-                       sourcelink=$(readlink -f "$headersdir")
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-elif test -e "/lib/modules/$(uname -r)/build"; then
 
-                       headersdir="/lib/modules/$(uname -r)/build"
-                       sourcelink=$(readlink -f "$headersdir")
+               #include <linux/fs.h>
+               #include <linux/sched.h>
 
-else
+               int permission_fn(struct inode *inode, int mask,
+                   struct nameidata *nd) { return 0; }
 
-                       sourcelink=$(ls -1d /usr/src/kernels/* \
-                                    /usr/src/linux-* \
-                                    2>/dev/null | grep -v obj | tail -1)
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .permission = permission_fn,
+               };
 
-fi
+int
+main (void)
+{
 
 
-               if test -n "$sourcelink" && test -e ${sourcelink}; then
+  ;
+  return 0;
+}
 
-                       kernelsrc=`readlink -f ${sourcelink}`
+_ACEOF
 
-else
 
-                       { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the kernel source with the '--with-linux=PATH' option." >&5
-$as_echo "$as_me: error:
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the kernel source with the '--with-linux=PATH' option." >&2;}
-   { (exit 1); exit 1; }; }
 
-fi
+cat - <<_ACEOF >conftest.h
 
+_ACEOF
 
-else
 
-               if test "$kernelsrc" = "NONE"; then
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
-                       kernsrcver=NONE
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PERMISSION 1
+_ACEOF
 
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PERMISSION_WITH_NAMEIDATA 1
+_ACEOF
 
 
-       { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5
-$as_echo "$kernelsrc" >&6; }
-       { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
-$as_echo_n "checking kernel build directory... " >&6; }
-       if test -z "$kernelbuild"; then
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-               if test -e "/lib/modules/$(uname -r)/build"; then
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-                       kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
 
-elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
 
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
+fi
 
-elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
+       rm -Rf build
 
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
 
-elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
 
-                       kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
 
-else
+       { $as_echo "$as_me:$LINENO: checking whether iops->check_acl() exists" >&5
+$as_echo_n "checking whether iops->check_acl() exists... " >&6; }
 
-                       kernelbuild=${kernelsrc}
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-fi
+               #include <linux/fs.h>
 
-       { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5
-$as_echo "$kernelbuild" >&6; }
+               int check_acl_fn(struct inode *inode, int mask) { return 0; }
 
-       { $as_echo "$as_me:$LINENO: checking kernel source version" >&5
-$as_echo_n "checking kernel source version... " >&6; }
-       utsrelease1=$kernelbuild/include/linux/version.h
-       utsrelease2=$kernelbuild/include/linux/utsrelease.h
-       utsrelease3=$kernelbuild/include/generated/utsrelease.h
-       if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .check_acl = check_acl_fn,
+               };
 
-               utsrelease=linux/version.h
+int
+main (void)
+{
 
-elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then
 
-               utsrelease=linux/utsrelease.h
+  ;
+  return 0;
+}
 
-elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then
+_ACEOF
 
-               utsrelease=generated/utsrelease.h
 
-fi
 
+cat - <<_ACEOF >conftest.h
 
-       if test "$utsrelease"; then
+_ACEOF
 
-               kernsrcver=`(echo "#include <$utsrelease>";
-                            echo "kernsrcver=UTS_RELEASE") |
-                            cpp -I $kernelbuild/include |
-                            grep "^kernsrcver=" | cut -d \" -f 2`
 
-               if test -z "$kernsrcver"; then
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
-                       { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-                       { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5
-$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
-   { (exit 1); exit 1; }; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_ACL 1
+_ACEOF
 
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-               if test "x$enable_linux_builtin" != xyes; then
-                       { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
-$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;}
-   { (exit 1); exit 1; }; }
-               else
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Cannot find UTS_RELEASE definition.
-       *** Please run 'make prepare' inside the kernel source tree." >&5
-$as_echo "$as_me: error:
-       *** Cannot find UTS_RELEASE definition.
-       *** Please run 'make prepare' inside the kernel source tree." >&2;}
-   { (exit 1); exit 1; }; }
-               fi
-
-fi
-
-
-       { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
-$as_echo "$kernsrcver" >&6; }
-
-       LINUX=${kernelsrc}
-       LINUX_OBJ=${kernelbuild}
-       LINUX_VERSION=${kernsrcver}
-
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
+fi
 
+       rm -Rf build
 
-       modpost=$LINUX/scripts/Makefile.modpost
-       { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5
-$as_echo_n "checking kernel file name for module symbols... " >&6; }
-       if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then
 
-               if grep -q Modules.symvers $modpost; then
 
-                       LINUX_SYMBOLS=Modules.symvers
 
-else
+       { $as_echo "$as_me:$LINENO: checking whether iops->check_acl() wants flags" >&5
+$as_echo_n "checking whether iops->check_acl() wants flags... " >&6; }
 
-                       LINUX_SYMBOLS=Module.symvers
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-               if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
+               #include <linux/fs.h>
 
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed.  If your building with a custom kernel make sure the
-       *** kernel is configured, built, and the '--with-linux=PATH' configure
-       *** option refers to the location of the kernel source." >&5
-$as_echo "$as_me: error:
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed.  If your building with a custom kernel make sure the
-       *** kernel is configured, built, and the '--with-linux=PATH' configure
-       *** option refers to the location of the kernel source." >&2;}
-   { (exit 1); exit 1; }; }
+               int check_acl_fn(struct inode *inode, int mask,
+                   unsigned int flags) { return 0; }
 
-fi
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .check_acl = check_acl_fn,
+               };
 
+int
+main (void)
+{
 
-else
 
-               LINUX_SYMBOLS=NONE
+  ;
+  return 0;
+}
 
-fi
+_ACEOF
 
-       { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
-$as_echo "$LINUX_SYMBOLS" >&6; }
 
 
+cat - <<_ACEOF >conftest.h
 
+_ACEOF
 
 
-# Check whether --with-spl was given.
-if test "${with_spl+set}" = set; then
-  withval=$with_spl; splsrc="$withval"
-fi
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_ACL 1
+_ACEOF
 
-# Check whether --with-spl-obj was given.
-if test "${with_spl_obj+set}" = set; then
-  withval=$with_spl_obj; splbuild="$withval"
-fi
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_ACL_WITH_FLAGS 1
+_ACEOF
 
 
-       { $as_echo "$as_me:$LINENO: checking spl source directory" >&5
-$as_echo_n "checking spl source directory... " >&6; }
-       if test -z "$splsrc"; then
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                                                               sourcelink=`ls -1d /usr/src/spl-*/${LINUX_VERSION} \
-                           2>/dev/null | tail -1`
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-                                                               if test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h; then
 
-                       sourcelink=`ls -1d /var/lib/dkms/spl/*/build \
-                                   2>/dev/null | tail -1`
 
 fi
 
+       rm -Rf build
 
-                                                               if test -z "$sourcelink" || test ! -e $sourcelink/spl_config.h; then
-
-                       sourcelink=../spl
 
-fi
 
 
-               if test -e $sourcelink/spl_config.h; then
+       { $as_echo "$as_me:$LINENO: checking whether iops->get_acl() exists" >&5
+$as_echo_n "checking whether iops->get_acl() exists... " >&6; }
 
-                       splsrc=`readlink -f ${sourcelink}`
 
-else
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-                       { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Please make sure the spl devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the spl source with the '--with-spl=PATH' option." >&5
-$as_echo "$as_me: error:
-       *** Please make sure the spl devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the spl source with the '--with-spl=PATH' option." >&2;}
-   { (exit 1); exit 1; }; }
 
-fi
+               #include <linux/fs.h>
 
+               struct posix_acl *get_acl_fn(struct inode *inode, int type)
+                   { return NULL; }
 
-else
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .get_acl = get_acl_fn,
+               };
 
-               if test "$splsrc" = "NONE"; then
+int
+main (void)
+{
 
-                       splbuild=NONE
-                       splsrcver=NONE
 
-fi
+  ;
+  return 0;
+}
 
+_ACEOF
 
-fi
 
 
-       { $as_echo "$as_me:$LINENO: result: $splsrc" >&5
-$as_echo "$splsrc" >&6; }
-       { $as_echo "$as_me:$LINENO: checking spl build directory" >&5
-$as_echo_n "checking spl build directory... " >&6; }
-       if test -z "$splbuild"; then
+cat - <<_ACEOF >conftest.h
 
-               splbuild=${splsrc}
+_ACEOF
 
-fi
 
-       { $as_echo "$as_me:$LINENO: result: $splbuild" >&5
-$as_echo "$splbuild" >&6; }
-
-       { $as_echo "$as_me:$LINENO: checking spl source version" >&5
-$as_echo_n "checking spl source version... " >&6; }
-       if test -r $splbuild/spl_config.h &&
-               fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then
-
-
-               splsrcver=`(echo "#include <spl_config.h>";
-                           echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
-                           cpp -I $splbuild |
-                           grep "^splsrcver=" | tr -d \" | cut -d= -f2`
-
-fi
-
-
-       if test -z "$splsrcver"; then
-
-               { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
-               { { $as_echo "$as_me:$LINENO: error:
-       *** Cannot determine the version of the spl source.
-       *** Please prepare the spl source before running this script" >&5
-$as_echo "$as_me: error:
-       *** Cannot determine the version of the spl source.
-       *** Please prepare the spl source before running this script" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-
-
-       { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5
-$as_echo "$splsrcver" >&6; }
-
-       SPL=${splsrc}
-       SPL_OBJ=${splbuild}
-       SPL_VERSION=${splsrcver}
-
-
-
-
-
-
-
-# Check whether --with-spl-timeout was given.
-if test "${with_spl_timeout+set}" = set; then
-  withval=$with_spl_timeout; timeout="$withval"
-else
-  timeout=0
-fi
-
-
-       { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5
-$as_echo_n "checking spl file name for module symbols... " >&6; }
-       SPL_SYMBOLS=NONE
-
-       while true; do
-               if test -r $SPL_OBJ/Module.symvers; then
-
-                       SPL_SYMBOLS=Module.symvers
-
-elif test -r $SPL_OBJ/Modules.symvers; then
-
-                       SPL_SYMBOLS=Modules.symvers
-
-elif test -r $SPL_OBJ/module/Module.symvers; then
-
-                       SPL_SYMBOLS=Module.symvers
-
-elif test -r $SPL_OBJ/module/Modules.symvers; then
-
-                       SPL_SYMBOLS=Modules.symvers
-
-fi
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-               if test $SPL_SYMBOLS != NONE -o $timeout -le 0; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_ACL 1
+_ACEOF
 
-                       break;
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                       sleep 1
-                       timeout=$((timeout-1))
-
-fi
-
-       done
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-       if test "$SPL_SYMBOLS" = NONE; then
 
-               SPL_SYMBOLS=$LINUX_SYMBOLS
 
 fi
 
+       rm -Rf build
 
-       { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5
-$as_echo "$SPL_SYMBOLS" >&6; }
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5
-$as_echo_n "checking whether modules can be built... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether iops->set_acl() exists" >&5
+$as_echo_n "checking whether iops->set_acl() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20073,10 +20937,21 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
+               #include <linux/fs.h>
+
+               int set_acl_fn(struct inode *inode, struct posix_acl *acl, int type)
+                   { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .set_acl = set_acl_fn,
+               };
+
 int
 main (void)
 {
 
+
   ;
   return 0;
 }
@@ -20084,11 +20959,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20103,25 +20984,17 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_ACL 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-               if test "x$enable_linux_builtin" != xyes; then
-                       { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5
-$as_echo "$as_me: error: *** Unable to build an empty module." >&2;}
-   { (exit 1); exit 1; }; }
-               else
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Unable to build an empty module.
-       *** Please run 'make scripts' inside the kernel source tree." >&5
-$as_echo "$as_me: error:
-       *** Unable to build an empty module.
-       *** Please run 'make scripts' inside the kernel source tree." >&2;}
-   { (exit 1); exit 1; }; }
-               fi
 
 
 
 
 
 
-       if test "$ZFS_META_LICENSE" = GPL; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GPL_ONLY_SYMBOLS 1
-_ACEOF
-
-
-fi
-
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5
-$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether iops->getattr() takes a path" >&5
+$as_echo_n "checking whether iops->getattr() takes a path... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20158,15 +21018,22 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
+               #include <linux/fs.h>
+
+               int test_getattr(
+                   const struct path *p, struct kstat *k,
+                   u32 request_mask, unsigned int query_flags)
+                   { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .getattr = test_getattr,
+               };
 
 int
 main (void)
 {
 
-               #ifndef CONFIG_PREEMPT
-               #error CONFIG_PREEMPT not #defined
-               #endif
 
   ;
   return 0;
@@ -20175,11 +21042,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20193,13 +21066,11 @@ _ACEOF
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-               { { $as_echo "$as_me:$LINENO: error:
-       *** Kernel built with CONFIG_PREEMPT which is not supported.
-       *** You must rebuild your kernel without this option." >&5
-$as_echo "$as_me: error:
-       *** Kernel built with CONFIG_PREEMPT which is not supported.
-       *** You must rebuild your kernel without this option." >&2;}
-   { (exit 1); exit 1; }; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PATH_IOPS_GETATTR 1
+_ACEOF
+
 
 else
   $as_echo "$as_me: failed program was:" >&5
@@ -20210,7 +21081,6 @@ $as_echo "no" >&6; }
 
 
 
-
 fi
 
        rm -Rf build
 
 
 
-
-
-       { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
-$as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether iops->getattr() takes a vfsmount" >&5
+$as_echo_n "checking whether iops->getattr() takes a vfsmount... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20232,15 +21100,22 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
+               #include <linux/fs.h>
+
+               int test_getattr(
+                   struct vfsmount *mnt, struct dentry *d,
+                   struct kstat *k)
+                   { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .getattr = test_getattr,
+               };
 
 int
 main (void)
 {
 
-               #ifndef CONFIG_DEBUG_LOCK_ALLOC
-               #error CONFIG_DEBUG_LOCK_ALLOC not #defined
-               #endif
 
   ;
   return 0;
@@ -20249,11 +21124,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20268,9 +21149,30 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-               { $as_echo "$as_me:$LINENO: checking whether mutex_lock() is GPL-only" >&5
-$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; }
-               tmp_flags="$EXTRA_KCFLAGS"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFSMOUNT_IOPS_GETATTR 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether inode_set_flags() exists" >&5
+$as_echo_n "checking whether inode_set_flags() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20281,20 +21183,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-                       #include <linux/module.h>
-                       #include <linux/mutex.h>
-
-                       MODULE_LICENSE("$ZFS_META_LICENSE");
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-                       struct mutex lock;
-
-                       mutex_init(&lock);
-                       mutex_lock(&lock);
-                       mutex_unlock(&lock);
+               struct inode inode;
+               inode_set_flags(&inode, S_IMMUTABLE, S_IMMUTABLE);
 
   ;
   return 0;
@@ -20303,11 +21199,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20319,35 +21221,12 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-                       { { $as_echo "$as_me:$LINENO: error:
-       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
-       *** with the CDDL license and will prevent the module linking stage
-       *** from succeeding.  You must rebuild your kernel without this
-       *** option enabled." >&5
-$as_echo "$as_me: error:
-       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
-       *** with the CDDL license and will prevent the module linking stage
-       *** from succeeding.  You must rebuild your kernel without this
-       *** option enabled." >&2;}
-   { (exit 1); exit 1; }; }
-
-
-
-fi
-
-       rm -Rf build
 
-
-               EXTRA_KCFLAGS="$tmp_flags"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INODE_SET_FLAGS 1
+_ACEOF
 
 
 else
@@ -20359,7 +21238,6 @@ $as_echo "no" >&6; }
 
 
 
-
 fi
 
        rm -Rf build
 
 
 
-
-
-       { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5
-$as_echo_n "checking block device operation prototypes... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether inode_set_iversion() exists" >&5
+$as_echo_n "checking whether inode_set_iversion() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20383,29 +21257,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/iversion.h>
 
 int
 main (void)
 {
 
-               int (*blk_open) (struct block_device *, fmode_t) = NULL;
-               int (*blk_release) (struct gendisk *, fmode_t) = NULL;
-               int (*blk_ioctl) (struct block_device *, fmode_t,
-                                 unsigned, unsigned long) = NULL;
-               int (*blk_compat_ioctl) (struct block_device *, fmode_t,
-                                         unsigned, unsigned long) = NULL;
-               struct block_device_operations blk_ops = {
-                       .open           = blk_open,
-                       .release        = blk_release,
-                       .ioctl          = blk_ioctl,
-                       .compat_ioctl   = blk_compat_ioctl,
-               };
-
-               blk_ops.open(NULL, 0);
-               blk_ops.release(NULL, 0);
-               blk_ops.ioctl(NULL, 0, 0, 0);
-               blk_ops.compat_ioctl(NULL, 0, 0, 0);
+               struct inode inode;
+               inode_set_iversion(&inode, 1);
 
   ;
   return 0;
@@ -20414,11 +21273,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20430,11 +21295,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: struct block_device" >&5
-$as_echo "struct block_device" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1
+#define HAVE_INODE_SET_IVERSION 1
 _ACEOF
 
 
@@ -20442,8 +21307,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: struct inode" >&5
-$as_echo "struct inode" >&6; }
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5
-$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether uncached_acl_sentinel() exists" >&5
+$as_echo_n "checking whether uncached_acl_sentinel() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20466,13 +21331,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/types.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               fmode_t *ptr __attribute__ ((unused));
+               void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
 
   ;
   return 0;
@@ -20481,11 +21346,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20501,7 +21372,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FMODE_T 1
+#define HAVE_KERNEL_GET_ACL_HANDLE_CACHE 1
 _ACEOF
 
 
@@ -20521,8 +21392,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5
-$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5
+$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20533,14 +21405,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/kobject.h>
+               #include <linux/fs.h>
+
+               int show_options (struct seq_file * x, struct dentry * y) { return 0; };
+               static struct super_operations sops __attribute__ ((unused)) = {
+                       .show_options = show_options,
+               };
 
 int
 main (void)
 {
 
-               int val __attribute__ ((unused));
-               val = KOBJ_NAME_LEN;
 
   ;
   return 0;
@@ -20549,11 +21424,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20569,7 +21450,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_KOBJ_NAME_LEN 1
+#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1
 _ACEOF
 
 
@@ -20589,8 +21470,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5
-$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether file_inode() is available" >&5
+$as_echo_n "checking whether file_inode() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20607,8 +21488,8 @@ int
 main (void)
 {
 
-               struct block_device *bdev = NULL;
-               (void) blkdev_get(bdev, 0, NULL);
+               struct file *f = NULL;
+               file_inode(f);
 
   ;
   return 0;
@@ -20617,11 +21498,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20637,7 +21524,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_3ARG_BLKDEV_GET 1
+#define HAVE_FILE_INODE 1
 _ACEOF
 
 
@@ -20656,9 +21543,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5
-$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether file_dentry() is available" >&5
+$as_echo_n "checking whether file_dentry() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20675,7 +21562,8 @@ int
 main (void)
 {
 
-               blkdev_get_by_path(NULL, 0, NULL);
+               struct file *f = NULL;
+               file_dentry(f);
 
   ;
   return 0;
@@ -20684,11 +21572,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20699,71 +21593,33 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-
-       rm -Rf build
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FILE_DENTRY 1
+_ACEOF
 
 
-       if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
-
-       grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
-
-               fi
-               if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLKDEV_GET_BY_PATH 1
-_ACEOF
+       rm -Rf build
 
 
-               fi
-       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5
-$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5
+$as_echo_n "checking whether fops->fsync() wants... " >&6; }
 
 
 
@@ -20777,11 +21633,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 
                #include <linux/fs.h>
 
+               int test_fsync(struct file *f, struct dentry *dentry, int x)
+                   { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
+               };
+
 int
 main (void)
 {
 
-               open_bdev_exclusive(NULL, 0, NULL);
 
   ;
   return 0;
@@ -20790,11 +21653,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20805,72 +21674,29 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-
-       rm -Rf build
-
 
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: dentry" >&5
+$as_echo "dentry" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSYNC_WITH_DENTRY 1
+_ACEOF
 
-       grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPEN_BDEV_EXCLUSIVE 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-               fi
-       fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5
-$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20881,14 +21707,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/buffer_head.h>
+               #include <linux/fs.h>
+
+               int test_fsync(struct file *f, int x) { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
+               };
 
 int
 main (void)
 {
 
-               struct block_device *bdev = NULL;
-               invalidate_bdev(bdev);
 
   ;
   return 0;
@@ -20897,11 +21728,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20913,11 +21750,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+               { $as_echo "$as_me:$LINENO: result: no dentry" >&5
+$as_echo "no dentry" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_1ARG_INVALIDATE_BDEV 1
+#define HAVE_FSYNC_WITHOUT_DENTRY 1
 _ACEOF
 
 
@@ -20925,8 +21762,6 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5
-$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20951,14 +21782,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
+
+               int test_fsync(struct file *f, loff_t a, loff_t b, int c)
+                   { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
+               };
 
 int
 main (void)
 {
 
-               struct block_device *bdev = NULL;
-               bdev_logical_block_size(bdev);
 
   ;
   return 0;
@@ -20967,11 +21804,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20983,11 +21826,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+               { $as_echo "$as_me:$LINENO: result: range" >&5
+$as_echo "range" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1
+#define HAVE_FSYNC_RANGE 1
 _ACEOF
 
 
@@ -20995,8 +21838,6 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether bio_empty_barrier() is defined" >&5
-$as_echo_n "checking whether bio_empty_barrier() is defined... " >&6; }
-       EXTRA_KCFLAGS="-Werror"
+
+       { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5
+$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21021,14 +21861,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
+               void evict_inode (struct inode * t) { return; }
+               static struct super_operations sops __attribute__ ((unused)) = {
+                       .evict_inode = evict_inode,
+               };
 
 int
 main (void)
 {
 
-               struct bio bio;
-               (void)bio_empty_barrier(&bio);
 
   ;
   return 0;
@@ -21037,11 +21879,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21057,7 +21905,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_EMPTY_BARRIER 1
+#define HAVE_EVICT_INODE 1
 _ACEOF
 
 
@@ -21077,8 +21925,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5
-$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether sops->dirty_inode() wants flags" >&5
+$as_echo_n "checking whether sops->dirty_inode() wants flags... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21089,14 +21937,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
 
-int
-main (void)
+               void dirty_inode(struct inode *a, int b) { return; }
+
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .dirty_inode = dirty_inode,
+               };
+
+int
+main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = (1 << BIO_RW_FAILFAST);
 
   ;
   return 0;
@@ -21105,11 +21958,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21125,7 +21984,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_FAILFAST 1
+#define HAVE_DIRTY_INODE_WITH_FLAGS 1
 _ACEOF
 
 
@@ -21145,8 +22004,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
-$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5
+$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21157,16 +22016,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
+
+               int nr_cached_objects(struct super_block *sb) { return 0; }
+
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .nr_cached_objects = nr_cached_objects,
+               };
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = ((1 << BIO_RW_FAILFAST_DEV) |
-                        (1 << BIO_RW_FAILFAST_TRANSPORT) |
-                        (1 << BIO_RW_FAILFAST_DRIVER));
 
   ;
   return 0;
@@ -21175,11 +22037,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21195,7 +22063,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_FAILFAST_DTD 1
+#define HAVE_NR_CACHED_OBJECTS 1
 _ACEOF
 
 
@@ -21215,8 +22083,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5
-$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5
+$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21227,14 +22095,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
+
+               void free_cached_objects(struct super_block *sb, int x)
+                   { return; }
+
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .free_cached_objects = free_cached_objects,
+               };
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = REQ_FAILFAST_MASK;
 
   ;
   return 0;
@@ -21243,11 +22117,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21263,7 +22143,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_REQ_FAILFAST_MASK 1
+#define HAVE_FREE_CACHED_OBJECTS 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5
-$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+
+       { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5
+$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21297,16 +22176,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
+
+               long test_fallocate(struct file *file, int mode,
+                   loff_t offset, loff_t len) { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fallocate = test_fallocate,
+               };
 
 int
 main (void)
 {
 
-               void (*wanted_end_io)(struct bio *, int) = NULL;
-               bio_end_io_t *local_end_io __attribute__ ((unused));
-
-               local_end_io = wanted_end_io;
 
   ;
   return 0;
@@ -21315,11 +22198,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21335,7 +22224,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_BIO_END_IO_T 1
+#define HAVE_FILE_FALLOCATE 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNC is defined" >&5
-$as_echo_n "checking whether BIO_RW_SYNC is defined... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5
+$as_echo_n "checking whether iops->fallocate() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21368,14 +22256,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
+
+               long test_fallocate(struct inode *inode, int mode,
+                   loff_t offset, loff_t len) { return 0; }
+
+               static const struct inode_operations
+                   fops __attribute__ ((unused)) = {
+                       .fallocate = test_fallocate,
+               };
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = BIO_RW_SYNC;
 
   ;
   return 0;
@@ -21384,11 +22278,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21404,7 +22304,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_SYNC 1
+#define HAVE_INODE_FALLOCATE 1
 _ACEOF
 
 
@@ -21424,8 +22324,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5
-$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether fops->aio_fsync() exists" >&5
+$as_echo_n "checking whether fops->aio_fsync() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21436,14 +22337,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .aio_fsync = NULL,
+               };
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = BIO_RW_SYNCIO;
 
   ;
   return 0;
@@ -21452,11 +22356,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21472,7 +22382,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_SYNCIO 1
+#define HAVE_FILE_AIO_FSYNC 1
 _ACEOF
 
 
@@ -21492,8 +22402,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether REQ_SYNC is defined" >&5
-$as_echo_n "checking whether REQ_SYNC is defined... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5
+$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21504,14 +22414,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
+
+               int mkdir(struct inode *inode, struct dentry *dentry,
+                   umode_t umode) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .mkdir = mkdir,
+               };
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = REQ_SYNC;
 
   ;
   return 0;
@@ -21520,11 +22436,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21540,7 +22462,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_REQ_SYNC 1
+#define HAVE_MKDIR_UMODE_T 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is available" >&5
-$as_echo_n "checking whether blk_end_request() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether iops->lookup() passes nameidata" >&5
+$as_echo_n "checking whether iops->lookup() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21574,14 +22494,22 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
+               #include <linux/sched.h>
+
+               struct dentry *inode_lookup(struct inode *inode,
+                   struct dentry *dentry, struct nameidata *nidata)
+                   { return NULL; }
+
+               static const struct inode_operations iops
+                   __attribute__ ((unused)) = {
+                       .lookup = inode_lookup,
+               };
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_end_request(req, 0, 0);
 
   ;
   return 0;
@@ -21590,11 +22518,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21610,7 +22544,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_END_REQUEST 1
+#define HAVE_LOOKUP_NAMEIDATA 1
 _ACEOF
 
 
@@ -21629,8 +22563,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is GPL-only" >&5
-$as_echo_n "checking whether blk_end_request() is GPL-only... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->create() passes nameidata" >&5
+$as_echo_n "checking whether iops->create() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21641,17 +22576,26 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
+               #include <linux/sched.h>
+
+               #ifdef HAVE_MKDIR_UMODE_T
+               int inode_create(struct inode *inode ,struct dentry *dentry,
+                   umode_t umode, struct nameidata *nidata) { return 0; }
+               #else
+               int inode_create(struct inode *inode,struct dentry *dentry,
+                   int umode, struct nameidata * nidata) { return 0; }
+               #endif
 
-               MODULE_LICENSE("CDDL");
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .create         = inode_create,
+               };
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_end_request(req, 0, 0);
 
   ;
   return 0;
@@ -21660,73 +22604,8 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_END_REQUEST_GPL_ONLY 1
-_ACEOF
-
-
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5
-$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-               #include <linux/blkdev.h>
-
-int
-main (void)
-{
-
-               struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
-
-  ;
-  return 0;
-}
+cat - <<_ACEOF >conftest.h
 
 _ACEOF
 
@@ -21735,7 +22614,7 @@ _ACEOF
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21751,7 +22630,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_FLUSH 1
+#define HAVE_CREATE_NAMEIDATA 1
 _ACEOF
 
 
@@ -21770,8 +22649,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5
-$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
+
+                                               { $as_echo "$as_me:$LINENO: checking whether iops->get_link() passes delayed" >&5
+$as_echo_n "checking whether iops->get_link() passes delayed... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21782,17 +22662,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
-
-               MODULE_LICENSE("CDDL");
+               #include <linux/fs.h>
+               const char *get_link(struct dentry *de, struct inode *ip,
+                   struct delayed_call *done) { return "symlink"; }
+               static struct inode_operations
+                    iops __attribute__ ((unused)) = {
+                       .get_link = get_link,
+               };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
 
   ;
   return 0;
@@ -21801,73 +22682,8 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1
-_ACEOF
-
-
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5
-$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-               #include <linux/blkdev.h>
-
-int
-main (void)
-{
-
-               struct request_queue *q = NULL;
-               (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
-
-  ;
-  return 0;
-}
+cat - <<_ACEOF >conftest.h
 
 _ACEOF
 
@@ -21876,7 +22692,7 @@ _ACEOF
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21892,7 +22708,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1
+#define HAVE_GET_LINK_DELAYED 1
 _ACEOF
 
 
@@ -21900,23 +22716,10 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5
-$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+               { $as_echo "$as_me:$LINENO: checking whether iops->get_link() passes cookie" >&5
+$as_echo_n "checking whether iops->get_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21927,14 +22730,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+                       #include <linux/fs.h>
+                       const char *get_link(struct dentry *de, struct
+                           inode *ip, void **cookie) { return "symlink"; }
+                       static struct inode_operations
+                            iops __attribute__ ((unused)) = {
+                               .get_link = get_link,
+                       };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
 
   ;
   return 0;
@@ -21943,11 +22750,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -21959,11 +22772,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1
+#define HAVE_GET_LINK_COOKIE 1
 _ACEOF
 
 
@@ -21971,23 +22784,11 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_physical_block_size() is available" >&5
-$as_echo_n "checking whether blk_queue_physical_block_size() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+                                       { $as_echo "$as_me:$LINENO: checking whether iops->follow_link() passes cookie" >&5
+$as_echo_n "checking whether iops->follow_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -21998,15 +22799,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
+               const char *follow_link(struct dentry *de,
+                   void **cookie) { return "symlink"; }
+               static struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .follow_link = follow_link,
+               };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               unsigned short block_size = 1;
-               (void) blk_queue_physical_block_size(q, block_size);
 
   ;
   return 0;
@@ -22015,11 +22819,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22035,7 +22845,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE 1
+#define HAVE_FOLLOW_LINK_COOKIE 1
 _ACEOF
 
 
@@ -22043,23 +22853,10 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_io_opt() is available" >&5
-$as_echo_n "checking whether blk_queue_io_opt() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+               { $as_echo "$as_me:$LINENO: checking whether iops->follow_link() passes nameidata" >&5
+$as_echo_n "checking whether iops->follow_link() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22070,15 +22867,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
+                       void *follow_link(struct dentry *de, struct
+                           nameidata *nd) { return (void *)NULL; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .follow_link = follow_link,
+                       };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               unsigned int opt = 1;
-               (void) blk_queue_io_opt(q, opt);
 
   ;
   return 0;
@@ -22087,11 +22887,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22103,11 +22909,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_IO_OPT 1
+#define HAVE_FOLLOW_LINK_NAMEIDATA 1
 _ACEOF
 
 
@@ -22115,8 +22921,9 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                       { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
-
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_nonrot() is available" >&5
-$as_echo_n "checking whether blk_queue_nonrot() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-               #include <linux/blkdev.h>
-
-int
-main (void)
-{
+fi
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_nonrot(q);
+       rm -Rf build
 
-  ;
-  return 0;
-}
 
-_ACEOF
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_NONROT 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_queue_discard() is available" >&5
-$as_echo_n "checking whether blk_queue_discard() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22213,14 +22969,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #if !defined(HAVE_GET_LINK_DELAYED)
+               #error "Expecting get_link() delayed done"
+               #endif
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_discard(q);
 
   ;
   return 0;
@@ -22229,11 +22985,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22245,11 +23007,9 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_QUEUE_DISCARD 1
+#define HAVE_PUT_LINK_DELAYED 1
 _ACEOF
 
 
@@ -22257,23 +23017,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_fetch_request() is available" >&5
-$as_echo_n "checking whether blk_fetch_request() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+                                                                               { $as_echo "$as_me:$LINENO: checking whether iops->put_link() passes cookie" >&5
+$as_echo_n "checking whether iops->put_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22284,14 +23029,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+                       #include <linux/fs.h>
+                       void put_link(struct inode *ip, void *cookie)
+                           { return; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .put_link = put_link,
+                       };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_fetch_request(q);
 
   ;
   return 0;
@@ -22300,11 +23049,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22316,11 +23071,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_FETCH_REQUEST 1
+#define HAVE_PUT_LINK_COOKIE 1
 _ACEOF
 
 
@@ -22328,23 +23083,10 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5
-$as_echo_n "checking whether blk_requeue_request() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+                       { $as_echo "$as_me:$LINENO: checking whether iops->put_link() passes nameidata" >&5
+$as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22355,15 +23097,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+                               #include <linux/fs.h>
+                               void put_link(struct dentry *de, struct
+                                   nameidata *nd, void *ptr) { return; }
+                               static struct inode_operations
+                                   iops __attribute__ ((unused)) = {
+                                       .put_link = put_link,
+                               };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               struct request *req = NULL;
-               blk_requeue_request(q, req);
 
   ;
   return 0;
@@ -22372,11 +23117,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22388,11 +23139,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_REQUEUE_REQUEST 1
+#define HAVE_PUT_LINK_NAMEIDATA 1
 _ACEOF
 
 
@@ -22400,8 +23151,9 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                               { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is available" >&5
-$as_echo_n "checking whether blk_rq_bytes() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether i_op->tmpfile() exists" >&5
+$as_echo_n "checking whether i_op->tmpfile() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22427,14 +23192,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
+               int tmpfile(struct inode *inode, struct dentry *dentry,
+                   umode_t mode) { return 0; }
+               static struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .tmpfile = tmpfile,
+               };
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_rq_bytes(req);
 
   ;
   return 0;
@@ -22443,11 +23212,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22463,7 +23238,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_BYTES 1
+#define HAVE_TMPFILE 1
 _ACEOF
 
 
@@ -22482,8 +23257,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is GPL-only" >&5
-$as_echo_n "checking whether blk_rq_bytes() is GPL-only... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5
+$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22494,17 +23270,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
-
-               MODULE_LICENSE("CDDL");
+               #include <linux/fs.h>
+               void truncate_range(struct inode *inode, loff_t start,
+                                   loff_t end) { return; }
+               static struct inode_operations iops __attribute__ ((unused)) = {
+                       .truncate_range = truncate_range,
+               };
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_rq_bytes(req);
 
   ;
   return 0;
@@ -22513,11 +23289,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22529,21 +23311,21 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1
+#define HAVE_INODE_TRUNCATE_RANGE 1
 _ACEOF
 
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
 
 
 fi
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_rq_pos() is available" >&5
-$as_echo_n "checking whether blk_rq_pos() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5
+$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22568,14 +23347,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/dcache.h>
+               struct vfsmount *d_automount(struct path *p) { return NULL; }
+               struct dentry_operations dops __attribute__ ((unused)) = {
+                       .d_automount = d_automount,
+               };
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_rq_pos(req);
 
   ;
   return 0;
@@ -22584,11 +23365,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22604,7 +23391,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_POS 1
+#define HAVE_AUTOMOUNT 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether blk_rq_sectors() is available" >&5
-$as_echo_n "checking whether blk_rq_sectors() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5
+$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22639,14 +23423,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/exportfs.h>
+               int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
+                             struct inode *parent) { return 0; }
+               static struct export_operations eops __attribute__ ((unused))={
+                       .encode_fh = encode_fh,
+               };
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) blk_rq_sectors(req);
 
   ;
   return 0;
@@ -22655,11 +23442,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22675,7 +23468,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_SECTORS 1
+#define HAVE_ENCODE_FH_WITH_INODE 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5
-$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+       { $as_echo "$as_me:$LINENO: checking whether eops->commit_metadata() exists" >&5
+$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22710,14 +23500,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/exportfs.h>
+               int commit_metadata(struct inode *inode) { return 0; }
+               static struct export_operations eops __attribute__ ((unused))={
+                       .commit_metadata = commit_metadata,
+               };
 
 int
 main (void)
 {
 
-               struct gendisk *disk = NULL;
-               (void) get_disk_ro(disk);
 
   ;
   return 0;
@@ -22726,11 +23518,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22746,7 +23544,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_DISK_RO 1
+#define HAVE_COMMIT_METADATA 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5
-$as_echo_n "checking whether get_gendisk() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5
+$as_echo_n "checking whether clear_inode() is available... " >&6; }
 
 
 
@@ -22779,13 +23576,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/genhd.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               get_gendisk(0, NULL);
+               clear_inode(NULL);
 
   ;
   return 0;
@@ -22794,11 +23591,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22829,13 +23632,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
+       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in block/genhd.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -22864,7 +23667,7 @@ $as_echo "no" >&6; }
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_GENDISK 1
+#define HAVE_CLEAR_INODE 1
 _ACEOF
 
 
@@ -22872,11 +23675,9 @@ _ACEOF
        fi
 
 
+       { $as_echo "$as_me:$LINENO: checking whether setattr_prepare() is available" >&5
+$as_echo_n "checking whether setattr_prepare() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5
-$as_echo_n "checking whether rq_is_sync() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22887,14 +23688,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct request *req = NULL;
-               (void) rq_is_sync(req);
+               struct dentry *dentry = NULL;
+               struct iattr *attr = NULL;
+               int error;
+
+               error = setattr_prepare(dentry, attr);
 
   ;
   return 0;
@@ -22903,11 +23707,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22918,36 +23728,72 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RQ_IS_SYNC 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+
+       if test $rc -ne 0; then :
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/attr.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(setattr_prepare)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
+               fi
+               if test $rc -ne 0; then :
 
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-       rm -Rf build
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       EXTRA_KCFLAGS="$tmp_flags"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SETATTR_PREPARE 1
+_ACEOF
 
 
-       { $as_echo "$as_me:$LINENO: checking whether rq_for_each_segment() is available" >&5
-$as_echo_n "checking whether rq_for_each_segment() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5
+$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -22958,16 +23804,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct bio_vec *bv;
-               struct req_iterator iter;
-               struct request *req = NULL;
-               rq_for_each_segment(bv, req, iter) { }
+               insert_inode_locked(NULL);
 
   ;
   return 0;
@@ -22976,11 +23819,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -22991,34 +23840,72 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RQ_FOR_EACH_SEGMENT 1
-_ACEOF
+fi
+
+       rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test $rc -ne 0; then :
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
+               fi
+               if test $rc -ne 0; then :
 
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-       rm -Rf build
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       EXTRA_KCFLAGS="$tmp_flags"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INSERT_INODE_LOCKED 1
+_ACEOF
 
 
-       { $as_echo "$as_me:$LINENO: checking whether ql->discard_granularity is available" >&5
-$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5
+$as_echo_n "checking whether d_make_root() is available... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23029,15 +23916,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/blkdev.h>
+               #include <linux/dcache.h>
 
 int
 main (void)
 {
 
-               struct queue_limits ql __attribute__ ((unused));
-
-               ql.discard_granularity = 0;
+               d_make_root(NULL);
 
   ;
   return 0;
@@ -23046,11 +23931,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23061,32 +23952,72 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DISCARD_GRANULARITY 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_make_root[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_MAKE_ROOT 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5
-$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5
+$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23097,26 +24028,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
-               #include <linux/xattr.h>
-
-               const struct xattr_handler xattr_test_handler = {
-                       .prefix = "test",
-                       .get    = NULL,
-                       .set    = NULL,
-               };
-
-               const struct xattr_handler *xattr_handlers[] = {
-                       &xattr_test_handler,
-               };
+               #include <linux/dcache.h>
 
 int
 main (void)
 {
 
-               struct super_block sb __attribute__ ((unused));
-
-               sb.s_xattr = xattr_handlers;
+               d_obtain_alias(NULL);
 
   ;
   return 0;
@@ -23125,11 +24043,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23140,33 +24064,72 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONST_XATTR_HANDLER 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_OBTAIN_ALIAS 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
 
 
+       { $as_echo "$as_me:$LINENO: checking whether d_prune_aliases() is available" >&5
+$as_echo_n "checking whether d_prune_aliases() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23177,17 +24140,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/xattr.h>
+               #include <linux/dcache.h>
 
 int
 main (void)
 {
 
-               int (*get)(struct dentry *dentry, const char *name,
-                   void *buffer, size_t size, int handler_flags) = NULL;
-               struct xattr_handler xops __attribute__ ((unused));
-
-               xops.get = get;
+               struct inode *ip = NULL;
+               d_prune_aliases(ip);
 
   ;
   return 0;
@@ -23196,11 +24156,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23211,33 +24177,72 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DENTRY_XATTR_GET 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_prune_aliases[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_prune_aliases)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_PRUNE_ALIASES 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
 
 
+       { $as_echo "$as_me:$LINENO: checking whether d_set_d_op() is available" >&5
+$as_echo_n "checking whether d_set_d_op() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23248,18 +24253,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/xattr.h>
+               #include <linux/dcache.h>
 
 int
 main (void)
 {
 
-               int (*set)(struct dentry *dentry, const char *name,
-                   const void *buffer, size_t size, int flags,
-                   int handler_flags) = NULL;
-               struct xattr_handler xops __attribute__ ((unused));
-
-               xops.set = set;
+               d_set_d_op(NULL, NULL);
 
   ;
   return 0;
@@ -23268,11 +24268,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23283,34 +24289,72 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DENTRY_XATTR_SET 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+
+       if test $rc -ne 0; then :
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_set_d_op[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_set_d_op)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+               else :
 
-fi
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       rm -Rf build
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_SET_D_OP 1
+_ACEOF
 
 
+               fi
+       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5
-$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether dops->d_revalidate() takes struct nameidata" >&5
+$as_echo_n "checking whether dops->d_revalidate() takes struct nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23321,11 +24365,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/dcache.h>
+               #include <linux/sched.h>
 
-               int show_options (struct seq_file * x, struct dentry * y) { return 0; };
-               static struct super_operations sops __attribute__ ((unused)) = {
-                       .show_options = show_options,
+               int revalidate (struct dentry *dentry,
+                   struct nameidata *nidata) { return 0; }
+
+               static const struct dentry_operations
+                   dops __attribute__ ((unused)) = {
+                       .d_revalidate   = revalidate,
                };
 
 int
@@ -23340,11 +24388,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23360,7 +24414,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1
+#define HAVE_D_REVALIDATE_NAMEIDATA 1
 _ACEOF
 
 
@@ -23380,9 +24434,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5
-$as_echo_n "checking whether fops->fsync() wants... " >&6; }
-
+       { $as_echo "$as_me:$LINENO: checking whether dentry uses const struct dentry_operations" >&5
+$as_echo_n "checking whether dentry uses const struct dentry_operations... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23393,16 +24446,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/dcache.h>
+
+               const struct dentry_operations test_d_op = {
+                       .d_revalidate = NULL,
+               };
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, struct dentry *, int) = NULL;
-               struct file_operations fops __attribute__ ((unused));
+               struct dentry d __attribute__ ((unused));
 
-               fops.fsync = fsync;
+               d.d_op = &test_d_op;
 
   ;
   return 0;
@@ -23411,11 +24467,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23427,11 +24489,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: dentry" >&5
-$as_echo "dentry" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITH_DENTRY 1
+#define HAVE_CONST_DENTRY_OPERATIONS 1
 _ACEOF
 
 
@@ -23439,6 +24501,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -23448,6 +24512,8 @@ fi
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5
+$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
 
 
 
@@ -23459,16 +24525,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/mm.h>
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, int) = NULL;
-               struct file_operations fops __attribute__ ((unused));
-
-               fops.fsync = fsync;
+               truncate_setsize(NULL, 0);
 
   ;
   return 0;
@@ -23477,11 +24540,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23492,20 +24561,11 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: no dentry" >&5
-$as_echo "no dentry" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITHOUT_DENTRY 1
-_ACEOF
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
+       grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/truncate.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-               #include <linux/fs.h>
-
-int
-main (void)
-{
-
-               int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
-               struct file_operations fops __attribute__ ((unused));
-
-               fops.fsync = fsync;
-
-  ;
-  return 0;
-}
-
-_ACEOF
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+               else :
 
-               { $as_echo "$as_me:$LINENO: result: range" >&5
-$as_echo "range" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_RANGE 1
+#define HAVE_TRUNCATE_SETSIZE 1
 _ACEOF
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-
-
-fi
-
-       rm -Rf build
-
+               fi
+       fi
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5
+$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23591,16 +24637,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/security.h>
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, struct dentry *, int) = NULL;
-               file_operations_no_const fops __attribute__ ((unused));
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               struct inode *dip __attribute__ ((unused)) = NULL;
+               const struct qstr *str __attribute__ ((unused)) = NULL;
+               char *name __attribute__ ((unused)) = NULL;
+               void *value __attribute__ ((unused)) = NULL;
+               size_t len __attribute__ ((unused)) = 0;
 
-               fops.fsync = fsync;
+               security_inode_init_security(ip, dip, str, &name, &value, &len);
 
   ;
   return 0;
@@ -23609,11 +24659,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23625,11 +24681,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: dentry" >&5
-$as_echo "dentry" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITH_DENTRY 1
+#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1
 _ACEOF
 
 
@@ -23637,6 +24693,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -23647,6 +24705,8 @@ fi
 
 
 
+       { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5
+$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23657,16 +24717,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/security.h>
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, int) = NULL;
-               file_operations_no_const fops __attribute__ ((unused));
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               struct inode *dip __attribute__ ((unused)) = NULL;
+               const struct qstr *str __attribute__ ((unused)) = NULL;
+               initxattrs func __attribute__ ((unused)) = NULL;
 
-               fops.fsync = fsync;
+               security_inode_init_security(ip, dip, str, func, NULL);
 
   ;
   return 0;
@@ -23675,11 +24737,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23691,11 +24759,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: no dentry" >&5
-$as_echo "no dentry" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITHOUT_DENTRY 1
+#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1
 _ACEOF
 
 
@@ -23703,6 +24771,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -23713,6 +24783,8 @@ fi
 
 
 
+        { $as_echo "$as_me:$LINENO: checking whether fst->mount() exists" >&5
+$as_echo_n "checking whether fst->mount() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23723,16 +24795,23 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                #include <linux/fs.h>
+
+                static struct dentry *
+                mount(struct file_system_type *fs_type, int flags,
+                    const char *osname, void *data) {
+                        struct dentry *d = NULL;
+                        return (d);
+                }
+
+                static struct file_system_type fst __attribute__ ((unused)) = {
+                        .mount = mount,
+                };
 
 int
 main (void)
 {
 
-               int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
-               file_operations_no_const fops __attribute__ ((unused));
-
-               fops.fsync = fsync;
 
   ;
   return 0;
@@ -23741,11 +24820,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23757,11 +24842,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: range" >&5
-$as_echo "range" >&6; }
+                { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_RANGE 1
+#define HAVE_FST_MOUNT 1
 _ACEOF
 
 
@@ -23769,6 +24854,8 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+                { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -23779,9 +24866,8 @@ fi
 
 
 
-
-       { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5
-$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5
+$as_echo_n "checking whether super_block has s_shrink... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23793,9 +24879,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 
                #include <linux/fs.h>
-               void evict_inode (struct inode * t) { return; }
-               static struct super_operations sops __attribute__ ((unused)) = {
-                       .evict_inode = evict_inode,
+
+               int shrink(struct shrinker *s, struct shrink_control *sc)
+                   { return 0; }
+
+               static const struct super_block
+                   sb __attribute__ ((unused)) = {
+                       .s_shrink.shrink = shrink,
+                       .s_shrink.seeks = DEFAULT_SEEKS,
+                       .s_shrink.batch = 0,
                };
 
 int
@@ -23810,11 +24902,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23830,10 +24928,11 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_EVICT_INODE 1
+#define HAVE_SHRINK 1
 _ACEOF
 
 
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
@@ -23850,8 +24949,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5
-$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether shrink_control has nid" >&5
+$as_echo_n "checking whether shrink_control has nid... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23868,11 +24967,9 @@ int
 main (void)
 {
 
-               int (*nr_cached_objects)(struct super_block *)
-                       __attribute__ ((unused)) = NULL;
-               struct super_operations sops __attribute__ ((unused)) = {
-                       .nr_cached_objects = nr_cached_objects,
-               };
+               struct shrink_control sc __attribute__ ((unused));
+               unsigned long scnidsize __attribute__ ((unused)) =
+                   sizeof(sc.nid);
 
   ;
   return 0;
@@ -23881,11 +24978,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23901,7 +25004,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_NR_CACHED_OBJECTS 1
+#define SHRINK_CONTROL_HAS_NID 1
 _ACEOF
 
 
@@ -23921,8 +25024,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5
-$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether super_block has s_instances list_head" >&5
+$as_echo_n "checking whether super_block has s_instances list_head... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23939,11 +25042,9 @@ int
 main (void)
 {
 
-               void (*free_cached_objects)(struct super_block *, int)
-                       __attribute__ ((unused)) = NULL;
-               struct super_operations sops __attribute__ ((unused)) = {
-                       .free_cached_objects = free_cached_objects,
-               };
+               struct super_block sb __attribute__ ((unused));
+
+               INIT_LIST_HEAD(&sb.s_instances);
 
   ;
   return 0;
@@ -23952,11 +25053,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -23972,7 +25079,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FREE_CACHED_OBJECTS 1
+#define HAVE_S_INSTANCES_LIST_HEAD 1
 _ACEOF
 
 
 
 
 
-
-
-       { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5
-$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether super_block has s_d_op" >&5
+$as_echo_n "checking whether super_block has s_d_op... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24011,10 +25116,8 @@ int
 main (void)
 {
 
-               long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
-               struct file_operations fops __attribute__ ((unused)) = {
-                       .fallocate = fallocate,
-               };
+               struct super_block sb __attribute__ ((unused));
+               sb.s_d_op = NULL;
 
   ;
   return 0;
@@ -24023,11 +25126,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24043,7 +25152,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FILE_FALLOCATE 1
+#define HAVE_S_D_OP 1
 _ACEOF
 
 
@@ -24063,8 +25172,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5
-$as_echo_n "checking whether iops->fallocate() exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether super_setup_bdi_name() exists" >&5
+$as_echo_n "checking whether super_setup_bdi_name() exists... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24076,15 +25186,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 
                #include <linux/fs.h>
+               struct super_block sb;
 
 int
 main (void)
 {
 
-               long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL;
-               struct inode_operations fops __attribute__ ((unused)) = {
-                       .fallocate = fallocate,
-               };
+               char *name = "bdi";
+               atomic_long_t zfs_bdi_seq;
+               int error __attribute__((unused)) =
+                   super_setup_bdi_name(&sb, "%.28s-%ld", name, atomic_long_inc_return(&zfs_bdi_seq));
 
   ;
   return 0;
@@ -24093,11 +25204,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24108,22 +25225,11 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INODE_FALLOCATE 1
-_ACEOF
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 2 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5
-$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24145,16 +25254,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                       #include <linux/backing-dev.h>
+                       struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-               long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
-               struct file_operations_no_const fops __attribute__ ((unused)) = {
-                       .fallocate = fallocate,
-               };
+                       char *name = "bdi";
+                       int error __attribute__((unused)) =
+                           bdi_setup_and_register(&bdi, name);
 
   ;
   return 0;
@@ -24163,11 +25272,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24178,22 +25293,11 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FILE_FALLOCATE 1
-_ACEOF
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
+       if test $rc -ne 0; then :
 
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
 
-       { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5
-$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
-
 
 cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
@@ -24216,17 +25322,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
-               void truncate_range(struct inode *inode, loff_t start,
-                                   loff_t end) { return; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .truncate_range = truncate_range,
-               };
+                               #include <linux/backing-dev.h>
+                               struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
+                               char *name = "bdi";
+                               unsigned int cap = BDI_CAP_MAP_COPY;
+                               int error __attribute__((unused)) =
+                                   bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -24235,11 +25341,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24250,33 +25362,103 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INODE_TRUNCATE_RANGE 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+       if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
 
-       rm -Rf build
 
+               fi
+       fi
 
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5
-$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24287,17 +25469,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                               #include <linux/backing-dev.h>
+                               struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-               int (*create) (struct inode *, struct dentry *, umode_t,
-                   struct nameidata *) = NULL;
-               struct inode_operations iops __attribute__ ((unused)) = {
-                       .create = create,
-               };
+                               char *name = "bdi";
+                               unsigned int cap = BDI_CAP_MAP_COPY;
+                               int error __attribute__((unused)) =
+                                   bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -24306,11 +25488,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24321,22 +25509,11 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CREATE_UMODE_T 1
-_ACEOF
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
+       if test $rc -ne 0; then :
 
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5
-$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               fi
+               if test $rc -ne 0; then :
 
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-               #include <linux/dcache.h>
+               else :
 
-int
-main (void)
-{
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-               struct vfsmount *(*d_automount) (struct path *) = NULL;
-               struct dentry_operations dops __attribute__ ((unused)) = {
-                       .d_automount = d_automount,
-               };
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
 
-  ;
-  return 0;
-}
 
-_ACEOF
+               fi
+       fi
 
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_AUTOMOUNT 1
+#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1
 _ACEOF
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
+               fi
+       fi
 
-fi
 
-       rm -Rf build
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
+       grep -q -E '[[:space:]]super_setup_bdi_name[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/super.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(super_setup_bdi_name)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 2 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5
-$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24428,17 +25630,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/exportfs.h>
-               int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
-                             struct inode *parent) { return 0; }
-               static struct export_operations eops __attribute__ ((unused))={
-                       .encode_fh = encode_fh,
-               };
+                       #include <linux/backing-dev.h>
+                       struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
+                       char *name = "bdi";
+                       int error __attribute__((unused)) =
+                           bdi_setup_and_register(&bdi, name);
 
   ;
   return 0;
@@ -24447,11 +25648,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24462,22 +25669,11 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ENCODE_FH_WITH_INODE 1
-_ACEOF
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
+       if test $rc -ne 0; then :
 
-       { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5
-$as_echo_n "checking whether clear_inode() is available... " >&6; }
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
 
 
@@ -24499,13 +25698,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                               #include <linux/backing-dev.h>
+                               struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-               clear_inode(NULL);
+                               char *name = "bdi";
+                               unsigned int cap = BDI_CAP_MAP_COPY;
+                               int error __attribute__((unused)) =
+                                   bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -24514,11 +25717,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
 
        if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -24575,16 +25784,16 @@ $as_echo "no" >&6; }
                fi
                if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
                else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLEAR_INODE 1
+#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
 _ACEOF
 
 
@@ -24592,8 +25801,39 @@ _ACEOF
        fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5
-$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
 
 
@@ -24605,13 +25845,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                               #include <linux/backing-dev.h>
+                               struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-               insert_inode_locked(NULL);
+                               char *name = "bdi";
+                               unsigned int cap = BDI_CAP_MAP_COPY;
+                               int error __attribute__((unused)) =
+                                   bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -24620,11 +25864,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
 
        if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -24681,16 +25931,44 @@ $as_echo "no" >&6; }
                fi
                if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+               else :
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
+               fi
+       fi
+
+
                else :
 
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_INSERT_INODE_LOCKED 1
+#define HAVE_SUPER_SETUP_BDI_NAME 1
 _ACEOF
 
 
@@ -24698,9 +25976,9 @@ _ACEOF
        fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5
-$as_echo_n "checking whether d_make_root() is available... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5
+$as_echo_n "checking whether set_nlink() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24711,13 +25989,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/dcache.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               d_make_root(NULL);
+               struct inode node;
+               unsigned int link = 0;
+               (void) set_nlink(&node, link);
 
   ;
   return 0;
@@ -24726,11 +26006,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24741,72 +26027,35 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-
-       rm -Rf build
-
-
-       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_NLINK 1
+_ACEOF
 
-       grep -q -E '[[:space:]]d_make_root[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_MAKE_ROOT 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-               fi
-       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5
-$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
 
+       { $as_echo "$as_me:$LINENO: checking whether elevator_change() is available" >&5
+$as_echo_n "checking whether elevator_change() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24817,13 +26066,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/dcache.h>
+               #include <linux/blkdev.h>
+               #include <linux/elevator.h>
 
 int
 main (void)
 {
 
-               d_obtain_alias(NULL);
+               int ret;
+               struct request_queue *q = NULL;
+               char *elevator = NULL;
+               ret = elevator_change(q, elevator);
 
   ;
   return 0;
@@ -24832,11 +26085,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24847,72 +26106,33 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-
-       rm -Rf build
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ELEVATOR_CHANGE 1
+_ACEOF
 
-       grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_OBTAIN_ALIAS 1
-_ACEOF
 
+fi
 
-               fi
-       fi
+       rm -Rf build
 
 
-       { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5
-$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
+       EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:$LINENO: checking whether sget() wants 5 args" >&5
+$as_echo_n "checking whether sget() wants 5 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24929,7 +26149,12 @@ int
 main (void)
 {
 
-               check_disk_size_change(NULL, NULL);
+               struct file_system_type *type = NULL;
+               int (*test)(struct super_block *,void *) = NULL;
+               int (*set)(struct super_block *,void *) = NULL;
+               int flags = 0;
+               void *data = NULL;
+               (void) sget(type, test, set, flags, data);
 
   ;
   return 0;
@@ -24938,11 +26163,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -24953,71 +26184,32 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-
-       rm -Rf build
-
-
-       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_5ARG_SGET 1
+_ACEOF
 
-       grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CHECK_DISK_SIZE_CHANGE 1
-_ACEOF
+fi
 
+       rm -Rf build
 
-               fi
-       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5
-$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether lseek_execute() is available" >&5
+$as_echo_n "checking whether lseek_execute() is available... " >&6; }
 
 
 
@@ -25029,13 +26221,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               truncate_setsize(NULL, 0);
+               struct file *fp __attribute__ ((unused)) = NULL;
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               loff_t offset __attribute__ ((unused)) = 0;
+               loff_t maxsize __attribute__ ((unused)) = 0;
+
+               lseek_execute(fp, ip, offset, maxsize);
 
   ;
   return 0;
@@ -25044,11 +26241,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25079,13 +26282,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
+       grep -q -E '[[:space:]]lseek_exclusive[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in mm/truncate.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
+               for file in fs/read_write.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lseek_exclusive)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -25114,7 +26317,7 @@ $as_echo "no" >&6; }
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_TRUNCATE_SETSIZE 1
+#define HAVE_LSEEK_EXECUTE 1
 _ACEOF
 
 
@@ -25123,10 +26326,8 @@ _ACEOF
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5
-$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+                               { $as_echo "$as_me:$LINENO: checking whether fops->iterate_shared() is available" >&5
+$as_echo_n "checking whether fops->iterate_shared() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25137,20 +26338,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/security.h>
+               #include <linux/fs.h>
+               int iterate(struct file *filp, struct dir_context * context)
+                   { return 0; }
+
+               static const struct file_operations fops
+                   __attribute__ ((unused)) = {
+                       .iterate_shared  = iterate,
+               };
 
 int
 main (void)
 {
 
-               struct inode *ip __attribute__ ((unused)) = NULL;
-               struct inode *dip __attribute__ ((unused)) = NULL;
-               const struct qstr *str __attribute__ ((unused)) = NULL;
-               char *name __attribute__ ((unused)) = NULL;
-               void *value __attribute__ ((unused)) = NULL;
-               size_t len __attribute__ ((unused)) = 0;
-
-               security_inode_init_security(ip, dip, str, &name, &value, &len);
 
   ;
   return 0;
@@ -25159,11 +26359,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25179,7 +26385,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1
+#define HAVE_VFS_ITERATE_SHARED 1
 _ACEOF
 
 
@@ -25190,20 +26396,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5
-$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+                                                                                                                                                                               { $as_echo "$as_me:$LINENO: checking whether fops->iterate() is available" >&5
+$as_echo_n "checking whether fops->iterate() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25214,18 +26408,23 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/security.h>
+                       #include <linux/fs.h>
+                       int iterate(struct file *filp,
+                           struct dir_context *context) { return 0; }
+
+                       static const struct file_operations fops
+                           __attribute__ ((unused)) = {
+                               .iterate         = iterate,
+                       };
+
+                       #if defined(FMODE_KABI_ITERATE)
+                       #error "RHEL 7.5, FMODE_KABI_ITERATE interface"
+                       #endif
 
 int
 main (void)
 {
 
-               struct inode *ip __attribute__ ((unused)) = NULL;
-               struct inode *dip __attribute__ ((unused)) = NULL;
-               const struct qstr *str __attribute__ ((unused)) = NULL;
-               initxattrs func __attribute__ ((unused)) = NULL;
-
-               security_inode_init_security(ip, dip, str, func, NULL);
 
   ;
   return 0;
@@ -25234,11 +26433,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25250,11 +26455,11 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1
+#define HAVE_VFS_ITERATE 1
 _ACEOF
 
 
@@ -25262,21 +26467,11 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-
-
-fi
-
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-       { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5
-$as_echo_n "checking whether mount_nodev() is available... " >&6; }
-
+                       { $as_echo "$as_me:$LINENO: checking whether fops->readdir() is available" >&5
+$as_echo_n "checking whether fops->readdir() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25287,13 +26482,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+                               #include <linux/fs.h>
+                               int readdir(struct file *filp, void *entry,
+                                   filldir_t func) { return 0; }
+
+                               static const struct file_operations fops
+                                   __attribute__ ((unused)) = {
+                                       .readdir = readdir,
+                               };
 
 int
 main (void)
 {
 
-               mount_nodev(NULL, 0, NULL, NULL);
 
   ;
   return 0;
@@ -25302,11 +26503,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25317,11 +26524,23 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFS_READDIR 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
+
+                               { { $as_echo "$as_me:$LINENO: error: no; file a bug report with ZoL" >&5
+$as_echo "$as_me: error: no; file a bug report with ZoL" >&2;}
+   { (exit 1); exit 1; }; }
+
 
 
 fi
        rm -Rf build
 
 
-       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/super.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
+fi
 
-               fi
-               if test $rc -ne 0; then :
+       rm -Rf build
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MOUNT_NODEV 1
-_ACEOF
 
+fi
 
-               fi
-       fi
+       rm -Rf build
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5
-$as_echo_n "checking whether super_block has s_shrink... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether fops->read/write_iter() are available" >&5
+$as_echo_n "checking whether fops->read/write_iter() are available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25395,17 +26579,21 @@ cat >>conftest.$ac_ext <<_ACEOF
 
                #include <linux/fs.h>
 
+               ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
+                   { return 0; }
+               ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
+                   { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                   .read_iter = test_read,
+                   .write_iter = test_write,
+               };
+
 int
 main (void)
 {
 
-               int (*shrink)(struct shrinker *, struct shrink_control *sc)
-                       __attribute__ ((unused)) = NULL;
-               struct super_block sb __attribute__ ((unused)) = {
-                       .s_shrink.shrink = shrink,
-                       .s_shrink.seeks = DEFAULT_SEEKS,
-                       .s_shrink.batch = 0,
-               };
 
   ;
   return 0;
@@ -25414,11 +26602,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25434,29 +26628,12 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK 1
+#define HAVE_VFS_RW_ITERATE 1
 _ACEOF
 
 
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether super_block has s_bdi" >&5
-$as_echo_n "checking whether super_block has s_bdi... " >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether new_sync_read/write() are available" >&5
+$as_echo_n "checking whether new_sync_read/write() are available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25473,8 +26650,15 @@ int
 main (void)
 {
 
-               struct super_block sb __attribute__ ((unused));
-               sb.s_bdi = NULL;
+                       ssize_t ret __attribute__ ((unused));
+                       struct file *filp = NULL;
+                       char __user *rbuf = NULL;
+                       const char __user *wbuf = NULL;
+                       size_t len = 0;
+                       loff_t ppos;
+
+                       ret = new_sync_read(filp, rbuf, len, &ppos);
+                       ret = new_sync_write(filp, wbuf, len, &ppos);
 
   ;
   return 0;
@@ -25483,11 +26667,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25503,7 +26693,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI 1
+#define HAVE_NEW_SYNC_READ 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() is available" >&5
-$as_echo_n "checking whether bdi_setup_and_register() is available... " >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
 
 
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether generic_write_checks() takes kiocb" >&5
+$as_echo_n "checking whether generic_write_checks() takes kiocb... " >&6; }
+
 
 cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
@@ -25535,13 +26740,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/backing-dev.h>
+               #include <linux/fs.h>
+
 
 int
 main (void)
 {
 
-               bdi_setup_and_register(NULL, NULL, 0);
+               struct kiocb *iocb = NULL;
+               struct iov_iter *iov = NULL;
+               generic_write_checks(iocb, iov);
 
   ;
   return 0;
@@ -25550,11 +26758,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25565,11 +26779,22 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  rc=0
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_WRITE_CHECKS_KIOCB 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
 
 
 fi
        rm -Rf build
 
 
-       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
-
-       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in mm/backing-dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
-
-               fi
-               if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-               else :
-
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI_SETUP_AND_REGISTER 1
-_ACEOF
-
-
-               fi
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5
-$as_echo_n "checking whether set_nlink() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether kmap_atomic wants 1 args" >&5
+$as_echo_n "checking whether kmap_atomic wants 1 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25641,15 +26816,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/pagemap.h>
 
 int
 main (void)
 {
 
-               struct inode node;
-               unsigned int link = 0;
-               (void) set_nlink(&node, link);
+               struct page page;
+               kmap_atomic(&page);
 
   ;
   return 0;
@@ -25658,11 +26832,17 @@ main (void)
 _ACEOF
 
 
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
        rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
        modpost_flag=''
        test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25678,7 +26858,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_NLINK 1
+#define HAVE_1ARG_KMAP_ATOMIC 1
 _ACEOF
 
 
 
 
 
-       if test "$LINUX_OBJ" != "$LINUX"; then
+       { $as_echo "$as_me:$LINENO: checking whether follow_down_one() is available" >&5
+$as_echo_n "checking whether follow_down_one() is available... " >&6; }
 
-               KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
 
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
+               #include <linux/namei.h>
 
+int
+main (void)
+{
 
-                       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
+               struct path *p = NULL;
+               follow_down_one(p);
 
+  ;
+  return 0;
+}
 
+_ACEOF
 
 
 
+cat - <<_ACEOF >conftest.h
 
-# Check whether --with-udevdir was given.
-if test "${with_udevdir+set}" = set; then
-  withval=$with_udevdir; udevdir=$withval
-else
-  udevdir='${exec_prefix}/lib/udev'
-fi
+_ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FOLLOW_DOWN_ONE 1
+_ACEOF
+
 
-# Check whether --with-udevruledir was given.
-if test "${with_udevruledir+set}" = set; then
-  withval=$with_udevruledir; udevruledir=$withval
 else
-  udevruledir='${udevdir}/rules.d'
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
+fi
 
+       rm -Rf build
 
-       { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5
-$as_echo_n "checking for target asm dir... " >&6; }
-       TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
 
-       case $TARGET_ARCH in
-       i386|x86_64)
-               TARGET_ASM_DIR=asm-${TARGET_ARCH}
-               ;;
-       *)
-               TARGET_ASM_DIR=asm-generic
-               ;;
-       esac
 
 
-       { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5
-$as_echo "$TARGET_ASM_DIR" >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns int" >&5
+$as_echo_n "checking whether make_request_fn() returns int... " >&6; }
 
 
-       { $as_echo "$as_me:$LINENO: checking for ioctl()" >&5
-$as_echo_n "checking for ioctl()... " >&6; }
-       cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <unistd.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ioctl" >/dev/null 2>&1; then
-  is_unistd=yes
-else
-  is_unistd=no
-fi
-rm -f conftest*
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/ioctl.h>
+               #include <linux/blkdev.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ioctl" >/dev/null 2>&1; then
-  is_sys_ioctl=yes
-else
-  is_sys_ioctl=no
-fi
-rm -f conftest*
+               int make_request(struct request_queue *q, struct bio *bio)
+               {
+                       return (0);
+               }
 
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stropts.h>
+int
+main (void)
+{
+
+               blk_queue_make_request(NULL, &make_request);
+
+  ;
+  return 0;
+}
 
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "ioctl" >/dev/null 2>&1; then
-  is_stropts=yes
-else
-  is_stropts=no
-fi
-rm -f conftest*
 
 
-       if test $is_unistd = yes; then
-               result=unistd.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_UNISTD_H 1
+cat - <<_ACEOF >conftest.h
+
 _ACEOF
 
-       else
 
-               if test $is_sys_ioctl = yes; then
-                       result=sys/ioctl.h
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_SYS_IOCTL_H 1
+#define MAKE_REQUEST_FN_RET int
 _ACEOF
 
-               elif test $is_stropts = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_STROPTS_H 1
+#define HAVE_MAKE_REQUEST_FN_RET_INT 1
 _ACEOF
 
-               else
-                       result=no
-               fi
-       fi
 
-       if test $result = no; then
-                { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-                { { $as_echo "$as_me:$LINENO: error: *** Cannot locate ioctl() definition" >&5
-$as_echo "$as_me: error: *** Cannot locate ioctl() definition" >&2;}
-   { (exit 1); exit 1; }; }
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-       fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns void" >&5
+$as_echo_n "checking whether make_request_fn() returns void... " >&6; }
 
-       ZLIB=
 
-       if test "${ac_cv_header_zlib_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
-$as_echo_n "checking for zlib.h... " >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-$as_echo "$ac_cv_header_zlib_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
-$as_echo_n "checking zlib.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <zlib.h>
+
+
+                       #include <linux/blkdev.h>
+
+                       void make_request(struct request_queue *q, struct bio *bio)
+                       {
+                               return;
+                       }
+
+int
+main (void)
+{
+
+                       blk_queue_make_request(NULL, &make_request);
+
+  ;
+  return 0;
+}
+
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define MAKE_REQUEST_FN_RET void
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns blk_qc_t" >&5
+$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
-$as_echo_n "checking zlib.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <zlib.h>
+
+
+                               #include <linux/blkdev.h>
+
+                               blk_qc_t make_request(struct request_queue *q, struct bio *bio)
+                               {
+                                       return (BLK_QC_T_NONE);
+                               }
+
+int
+main (void)
+{
+
+                               blk_queue_make_request(NULL, &make_request);
+
+  ;
+  return 0;
+}
+
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define MAKE_REQUEST_FN_RET blk_qc_t
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MAKE_REQUEST_FN_RET_QC 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
+                               { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
+                                   https://github.com/zfsonlinux/zfs/issues/new" >&5
+$as_echo "$as_me: error: no - Please file a bug report at
+                                   https://github.com/zfsonlinux/zfs/issues/new" >&2;}
+   { (exit 1); exit 1; }; }
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
 
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
-$as_echo_n "checking for zlib.h... " >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_zlib_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-$as_echo "$ac_cv_header_zlib_h" >&6; }
+
+       rm -Rf build
+
+
+
+
 
 fi
-if test "x$ac_cv_header_zlib_h" = x""yes; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** zlib.h missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** zlib.h missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+
+       rm -Rf build
+
+
+
+
+
 fi
 
+       rm -Rf build
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
-$as_echo_n "checking for compress2 in -lz... " >&6; }
-if test "${ac_cv_lib_z_compress2+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+       { $as_echo "$as_me:$LINENO: checking whether 3 arg generic IO accounting symbols are available" >&5
+$as_echo_n "checking whether 3 arg generic IO accounting symbols are available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char compress2 ();
+
+               #include <linux/bio.h>
+
+               void (*generic_start_io_acct_f)(int, unsigned long,
+                   struct hd_struct *) = &generic_start_io_acct;
+               void (*generic_end_io_acct_f)(int, struct hd_struct *,
+                   unsigned long) = &generic_end_io_acct;
+
 int
-main ()
+main (void)
 {
-return compress2 ();
+
+               generic_start_io_acct(0, 0, NULL);
+               generic_end_io_acct(0, NULL, 0);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_z_compress2=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-       ac_cv_lib_z_compress2=no
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
-$as_echo "$ac_cv_lib_z_compress2" >&6; }
-if test "x$ac_cv_lib_z_compress2" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
 
-  LIBS="-lz $LIBS"
+       rm -Rf build
 
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** compress2() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** compress2() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
-$as_echo_n "checking for uncompress in -lz... " >&6; }
-if test "${ac_cv_lib_z_uncompress+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uncompress ();
-int
-main ()
-{
-return uncompress ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_z_uncompress=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/bio.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(generic_start_io_acct)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-       ac_cv_lib_z_uncompress=no
-fi
+               fi
+               if test $rc -ne 0; then :
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
-if test "x$ac_cv_lib_z_uncompress" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_IO_ACCT_3ARG 1
 _ACEOF
 
-  LIBS="-lz $LIBS"
 
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** uncompress() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** uncompress() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
+               fi
+       fi
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5
-$as_echo_n "checking for crc32 in -lz... " >&6; }
-if test "${ac_cv_lib_z_crc32+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:$LINENO: checking whether 4 arg generic IO accounting symbols are available" >&5
+$as_echo_n "checking whether 4 arg generic IO accounting symbols are available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crc32 ();
+
+               #include <linux/bio.h>
+
+               void (*generic_start_io_acct_f)(struct request_queue *, int,
+                   unsigned long, struct hd_struct *) = &generic_start_io_acct;
+               void (*generic_end_io_acct_f)(struct request_queue *, int,
+                   struct hd_struct *, unsigned long) = &generic_end_io_acct;
+
 int
-main ()
+main (void)
 {
-return crc32 ();
+
+               generic_start_io_acct(NULL, 0, 0, NULL);
+               generic_end_io_acct(NULL, 0, NULL, 0);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_z_crc32=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-       ac_cv_lib_z_crc32=no
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5
-$as_echo "$ac_cv_lib_z_crc32" >&6; }
-if test "x$ac_cv_lib_z_crc32" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
 
-  LIBS="-lz $LIBS"
+       rm -Rf build
 
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** crc32() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** crc32() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
 
+       if test $rc -ne 0; then :
 
-       ZLIB="-lz"
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/bio.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(generic_start_io_acct)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZLIB 1
+#define HAVE_GENERIC_IO_ACCT_4ARG 1
 _ACEOF
 
 
+               fi
+       fi
 
-       LIBUUID=
 
-       if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
-$as_echo_n "checking for uuid/uuid.h... " >&6; }
-if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
-$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5
-$as_echo_n "checking uuid/uuid.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+
+       { $as_echo "$as_me:$LINENO: checking whether asm/fpu/api.h exists" >&5
+$as_echo_n "checking whether asm/fpu/api.h exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <uuid/uuid.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+               #include <linux/kernel.h>
+               #include <asm/fpu/api.h>
+
+int
+main (void)
+{
+
+               __kernel_fpu_begin();
+
+  ;
+  return 0;
+}
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5
-$as_echo_n "checking uuid/uuid.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <uuid/uuid.h>
+
+
+
+cat - <<_ACEOF >conftest.h
+
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FPU_API_H 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;}
 
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
-$as_echo_n "checking for uuid/uuid.h... " >&6; }
-if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_uuid_uuid_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
-$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
 
-fi
-if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** uuid/uuid.h missing, libuuid-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** uuid/uuid.h missing, libuuid-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
+       rm -Rf build
 
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5
-$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+       { $as_echo "$as_me:$LINENO: checking whether i_(uid|gid)_(read|write) exist" >&5
+$as_echo_n "checking whether i_(uid|gid)_(read|write) exist... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uuid_generate ();
+
+               #include <linux/fs.h>
+
 int
-main ()
+main (void)
 {
-return uuid_generate ();
+
+               struct inode *ip = NULL;
+               (void) i_uid_read(ip);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_uuid_uuid_generate=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KUID_HELPERS 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_uuid_uuid_generate=no
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
-_ACEOF
 
-  LIBS="-luuid $LIBS"
 
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** uuid_generate() missing, libuuid-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** uuid_generate() missing, libuuid-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
 fi
 
+       rm -Rf build
 
 
-{ $as_echo "$as_me:$LINENO: checking for uuid_is_null in -luuid" >&5
-$as_echo_n "checking for uuid_is_null in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_uuid_is_null+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+
+       { $as_echo "$as_me:$LINENO: checking whether module_param_call() is hardened" >&5
+$as_echo_n "checking whether module_param_call() is hardened... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uuid_is_null ();
+
+               #include <linux/module.h>
+               #include <linux/moduleparam.h>
+
+               int param_get(char *b, const struct kernel_param *kp)
+               {
+                       return (0);
+               }
+
+               int param_set(const char *b, const struct kernel_param *kp)
+               {
+                       return (0);
+               }
+
+               module_param_call(p, param_set, param_get, NULL, 0644);
+
 int
-main ()
+main (void)
 {
-return uuid_is_null ();
+
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_uuid_uuid_is_null=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define MODULE_PARAM_CALL_CONST 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_uuid_uuid_is_null=no
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_is_null" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_is_null" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->rename() wants flags" >&5
+$as_echo_n "checking whether iops->rename() wants flags... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               int rename_fn(struct inode *sip, struct dentry *sdp,
+                       struct inode *tip, struct dentry *tdp,
+                       unsigned int flags) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .rename = rename_fn,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RENAME_WANTS_FLAGS 1
 _ACEOF
 
-  LIBS="-luuid $LIBS"
 
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
-       *** uuid_is_null() missing, libuuid-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
-       *** uuid_is_null() missing, libuuid-devel package required
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
 fi
 
+       rm -Rf build
+
 
-       LIBUUID="-luuid"
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBUUID 1
+       { $as_echo "$as_me:$LINENO: checking whether generic_setxattr() exists" >&5
+$as_echo_n "checking whether generic_setxattr() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/xattr.h>
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .setxattr = generic_setxattr
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
 _ACEOF
 
 
 
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_SETXATTR 1
+_ACEOF
+
 
-# Check whether --with-blkid was given.
-if test "${with_blkid+set}" = set; then
-  withval=$with_blkid;
 else
-  with_blkid=check
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
 fi
 
+       rm -Rf build
 
-       LIBBLKID=
-       if test "x$with_blkid" != xno; then
 
-               { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5
-$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
-if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lblkid  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+       { $as_echo "$as_me:$LINENO: checking whether current_time() exists" >&5
+$as_echo_n "checking whether current_time() exists... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char blkid_get_cache ();
+
+               #include <linux/fs.h>
+
 int
-main ()
+main (void)
 {
-return blkid_get_cache ();
+
+               struct inode ip __attribute__ ((unused));
+               ip.i_atime = current_time(&ip);
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_blkid_blkid_get_cache=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-       ac_cv_lib_blkid_blkid_get_cache=no
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
-$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
-if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then
 
-                       { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5
-$as_echo_n "checking for blkid zfs support... " >&6; }
+       rm -Rf build
+
 
-                       ZFS_DEV=`mktemp`
-                       dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \
-                               >/dev/null 2>/dev/null
-                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
-                               dd of=$ZFS_DEV bs=1k count=8 \
-                               seek=132 conv=notrunc &>/dev/null \
-                               >/dev/null 2>/dev/null
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]current_time[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(current_time)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CURRENT_TIME 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether global_node_page_state() exists" >&5
+$as_echo_n "checking whether global_node_page_state() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/mm.h>
+               #include <linux/vmstat.h>
+
+int
+main (void)
+{
+
+               (void) global_node_page_state(0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_GLOBAL_NODE_PAGE_STATE 1
+_ACEOF
 
-                       saved_LDFLAGS="$LDFLAGS"
-                       LDFLAGS="-lblkid"
 
-                       if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether global_zone_page_state() exists" >&5
+$as_echo_n "checking whether global_zone_page_state() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-                               #include <stdio.h>
-                               #include <blkid/blkid.h>
+
+               #include <linux/mm.h>
+               #include <linux/vmstat.h>
 
 int
-main ()
+main (void)
 {
 
-                               blkid_cache cache;
-                               char *value;
+               (void) global_zone_page_state(0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_GLOBAL_ZONE_PAGE_STATE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum node_stat_item contains NR_FILE_PAGES" >&5
+$as_echo_n "checking whether enum node_stat_item contains NR_FILE_PAGES... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "node_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_FILE_PAGES'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES 1
+_ACEOF
+
+               ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum node_stat_item contains NR_INACTIVE_ANON" >&5
+$as_echo_n "checking whether enum node_stat_item contains NR_INACTIVE_ANON... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "node_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_INACTIVE_ANON'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON 1
+_ACEOF
+
+               ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum node_stat_item contains NR_INACTIVE_FILE" >&5
+$as_echo_n "checking whether enum node_stat_item contains NR_INACTIVE_FILE... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "node_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_INACTIVE_FILE'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE 1
+_ACEOF
+
+               ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum node_stat_item contains NR_SLAB_RECLAIMABLE" >&5
+$as_echo_n "checking whether enum node_stat_item contains NR_SLAB_RECLAIMABLE... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "node_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_SLAB_RECLAIMABLE'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_NODE_STAT_ITEM_NR_SLAB_RECLAIMABLE 1
+_ACEOF
+
+               ZFS_ENUM_NODE_STAT_ITEM_NR_SLAB_RECLAIMABLE=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum zone_stat_item contains NR_FILE_PAGES" >&5
+$as_echo_n "checking whether enum zone_stat_item contains NR_FILE_PAGES... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "zone_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_FILE_PAGES'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES 1
+_ACEOF
+
+               ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum zone_stat_item contains NR_INACTIVE_ANON" >&5
+$as_echo_n "checking whether enum zone_stat_item contains NR_INACTIVE_ANON... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "zone_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_INACTIVE_ANON'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1
+_ACEOF
+
+               ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum zone_stat_item contains NR_INACTIVE_FILE" >&5
+$as_echo_n "checking whether enum zone_stat_item contains NR_INACTIVE_FILE... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "zone_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_INACTIVE_FILE'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1
+_ACEOF
+
+               ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum zone_stat_item contains NR_SLAB_RECLAIMABLE" >&5
+$as_echo_n "checking whether enum zone_stat_item contains NR_SLAB_RECLAIMABLE... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "zone_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_SLAB_RECLAIMABLE'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_ZONE_STAT_ITEM_NR_SLAB_RECLAIMABLE 1
+_ACEOF
+
+               ZFS_ENUM_ZONE_STAT_ITEM_NR_SLAB_RECLAIMABLE=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking global_page_state enums are sane" >&5
+$as_echo_n "checking global_page_state enums are sane... " >&6; }
+
+
+       enum_check_a="$ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES"
+       enum_check_b="$ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES"
+       if test -n "$enum_check_a" -a -n "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_FILE_PAGES in either node_stat_item or zone_stat_item: DUPLICATE" >&5
+$as_echo "NR_FILE_PAGES in either node_stat_item or zone_stat_item: DUPLICATE" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+       if test -z "$enum_check_a" -a -z "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_FILE_PAGES in either node_stat_item or zone_stat_item: NOT FOUND" >&5
+$as_echo "NR_FILE_PAGES in either node_stat_item or zone_stat_item: NOT FOUND" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+
+
+       enum_check_a="$ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON"
+       enum_check_b="$ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON"
+       if test -n "$enum_check_a" -a -n "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_INACTIVE_ANON in either node_stat_item or zone_stat_item: DUPLICATE" >&5
+$as_echo "NR_INACTIVE_ANON in either node_stat_item or zone_stat_item: DUPLICATE" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+       if test -z "$enum_check_a" -a -z "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_INACTIVE_ANON in either node_stat_item or zone_stat_item: NOT FOUND" >&5
+$as_echo "NR_INACTIVE_ANON in either node_stat_item or zone_stat_item: NOT FOUND" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+
+
+       enum_check_a="$ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE"
+       enum_check_b="$ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE"
+       if test -n "$enum_check_a" -a -n "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_INACTIVE_FILE in either node_stat_item or zone_stat_item: DUPLICATE" >&5
+$as_echo "NR_INACTIVE_FILE in either node_stat_item or zone_stat_item: DUPLICATE" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+       if test -z "$enum_check_a" -a -z "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_INACTIVE_FILE in either node_stat_item or zone_stat_item: NOT FOUND" >&5
+$as_echo "NR_INACTIVE_FILE in either node_stat_item or zone_stat_item: NOT FOUND" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+
+
+       enum_check_a="$ZFS_ENUM_NODE_STAT_ITEM_NR_SLAB_RECLAIMABLE"
+       enum_check_b="$ZFS_ENUM_ZONE_STAT_ITEM_NR_SLAB_RECLAIMABLE"
+       if test -n "$enum_check_a" -a -n "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_SLAB_RECLAIMABLE in either node_stat_item or zone_stat_item: DUPLICATE" >&5
+$as_echo "NR_SLAB_RECLAIMABLE in either node_stat_item or zone_stat_item: DUPLICATE" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+       if test -z "$enum_check_a" -a -z "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_SLAB_RECLAIMABLE in either node_stat_item or zone_stat_item: NOT FOUND" >&5
+$as_echo "NR_SLAB_RECLAIMABLE in either node_stat_item or zone_stat_item: NOT FOUND" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl has refcount_t" >&5
+$as_echo_n "checking whether posix_acl has refcount_t... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/backing-dev.h>
+               #include <linux/refcount.h>
+               #include <linux/posix_acl.h>
+
+int
+main (void)
+{
+
+               struct posix_acl acl;
+               refcount_t *r __attribute__ ((unused)) = &acl.a_refcount;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACL_REFCOUNT 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether ns_capable exists" >&5
+$as_echo_n "checking whether ns_capable exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/capability.h>
+
+int
+main (void)
+{
+
+               ns_capable((struct user_namespace *)NULL, CAP_SYS_ADMIN);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NS_CAPABLE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether cred_t->user_ns exists" >&5
+$as_echo_n "checking whether cred_t->user_ns exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/cred.h>
+
+int
+main (void)
+{
+
+               struct cred cr;
+               cr.user_ns = (struct user_namespace *)NULL;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CRED_USER_NS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether kuid_has_mapping/kgid_has_mapping exist" >&5
+$as_echo_n "checking whether kuid_has_mapping/kgid_has_mapping exist... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/uidgid.h>
+
+int
+main (void)
+{
+
+               kuid_has_mapping((struct user_namespace *)NULL, KUIDT_INIT(0));
+               kgid_has_mapping((struct user_namespace *)NULL, KGIDT_INIT(0));
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KUID_HAS_MAPPING 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       if test "$LINUX_OBJ" != "$LINUX"; then
+
+               KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
+
+fi
+
+
+
+
+                       KERNELCPPFLAGS="$KERNELCPPFLAGS -std=gnu99"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-declaration-after-statement"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_BOOL_COMPARE"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
+
+
+ ;;
+               user)
+
+
+# Check whether --with-mounthelperdir was given.
+if test "${with_mounthelperdir+set}" = set; then
+  withval=$with_mounthelperdir; mounthelperdir=$withval
+else
+  mounthelperdir=/sbin
+fi
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for udev directories" >&5
+$as_echo_n "checking for udev directories... " >&6; }
+
+# Check whether --with-udevdir was given.
+if test "${with_udevdir+set}" = set; then
+  withval=$with_udevdir; udevdir=$withval
+else
+  udevdir=check
+fi
+
+
+       if test "x$udevdir" = xcheck; then
+
+               path1=/lib/udev
+               path2=/usr/lib/udev
+               default=$path2
+
+               if test -d "$path1"; then
+  udevdir="$path1"
+else
+
+                       if test -d "$path2"; then
+  udevdir="$path2"
+else
+  udevdir="$default"
+fi
+
+
+fi
+
+
+fi
+
+
+
+# Check whether --with-udevruledir was given.
+if test "${with_udevruledir+set}" = set; then
+  withval=$with_udevruledir; udevruledir=$withval
+else
+  udevruledir="${udevdir}/rules.d"
+fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: result: $udevdir;$udevruledir" >&5
+$as_echo "$udevdir;$udevruledir" >&6; }
+
+
+       # Check whether --enable-systemd was given.
+if test "${enable_systemd+set}" = set; then
+  enableval=$enable_systemd; enable_systemd=$enableval
+else
+  enable_systemd=check
+fi
+
+
+
+# Check whether --with-systemdunitdir was given.
+if test "${with_systemdunitdir+set}" = set; then
+  withval=$with_systemdunitdir; systemdunitdir=$withval
+else
+  systemdunitdir=/usr/lib/systemd/system
+fi
+
+
+
+# Check whether --with-systemdpresetdir was given.
+if test "${with_systemdpresetdir+set}" = set; then
+  withval=$with_systemdpresetdir; systemdpresetdir=$withval
+else
+  systemdpresetdir=/usr/lib/systemd/system-preset
+fi
+
+
+
+# Check whether --with-systemdmodulesloaddir was given.
+if test "${with_systemdmodulesloaddir+set}" = set; then
+  withval=$with_systemdmodulesloaddir; systemdmoduleloaddir=$withval
+else
+  systemdmodulesloaddir=/usr/lib/modules-load.d
+fi
+
+
+       if test "x$enable_systemd" = xcheck; then
+
+               if systemctl --version >/dev/null 2>&1; then
+  enable_systemd=yes
+else
+  enable_systemd=no
+fi
+
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking for systemd support" >&5
+$as_echo_n "checking for systemd support... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: $enable_systemd" >&5
+$as_echo "$enable_systemd" >&6; }
+
+       if test "x$enable_systemd" = xyes; then
+
+               ZFS_INIT_SYSTEMD=systemd
+               ZFS_MODULE_LOAD=modules-load.d
+               DEFINE_SYSTEMD='--with systemd --define "_unitdir $(systemdunitdir)" --define "_presetdir $(systemdpresetdir)"'
+               modulesloaddir=$systemdmodulesloaddir
+
+else
+
+               DEFINE_SYSTEMD='--without systemd'
+
+fi
+
+
+
+
+
+
+
+
+
+
+       # Check whether --enable-sysvinit was given.
+if test "${enable_sysvinit+set}" = set; then
+  enableval=$enable_sysvinit;
+else
+  enable_sysvinit=yes
+fi
+
+
+       if test "x$enable_sysvinit" = xyes; then
+  ZFS_INIT_SYSV=init.d
+fi
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for dracut directory" >&5
+$as_echo_n "checking for dracut directory... " >&6; }
+
+# Check whether --with-dracutdir was given.
+if test "${with_dracutdir+set}" = set; then
+  withval=$with_dracutdir; dracutdir=$withval
+else
+  dracutdir=check
+fi
+
+
+       if test "x$dracutdir" = xcheck; then
+
+               path1=/usr/share/dracut
+               path2=/usr/lib/dracut
+               default=$path2
+
+               if test -d "$path1"; then
+  dracutdir="$path1"
+else
+
+                       if test -d "$path2"; then
+  dracutdir="$path2"
+else
+  dracutdir="$default"
+fi
+
+
+fi
+
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: result: $dracutdir" >&5
+$as_echo "$dracutdir" >&6; }
+
+
+       ZLIB=
+
+       if test "${ac_cv_header_zlib_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
+$as_echo_n "checking for zlib.h... " >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+$as_echo "$ac_cv_header_zlib_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
+$as_echo_n "checking zlib.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <zlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
+$as_echo_n "checking zlib.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
+$as_echo_n "checking for zlib.h... " >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_zlib_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+$as_echo "$ac_cv_header_zlib_h" >&6; }
+
+fi
+if test "x$ac_cv_header_zlib_h" = x""yes; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** zlib.h missing, zlib-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** zlib.h missing, zlib-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing compress2" >&5
+$as_echo_n "checking for library containing compress2... " >&6; }
+if test "${ac_cv_search_compress2+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char compress2 ();
+int
+main ()
+{
+return compress2 ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' z; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_compress2=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_compress2+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_compress2+set}" = set; then
+  :
+else
+  ac_cv_search_compress2=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_compress2" >&5
+$as_echo "$ac_cv_search_compress2" >&6; }
+ac_res=$ac_cv_search_compress2
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** compress2() missing, zlib-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** compress2() missing, zlib-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing uncompress" >&5
+$as_echo_n "checking for library containing uncompress... " >&6; }
+if test "${ac_cv_search_uncompress+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uncompress ();
+int
+main ()
+{
+return uncompress ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' z; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_uncompress=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_uncompress+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_uncompress+set}" = set; then
+  :
+else
+  ac_cv_search_uncompress=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_uncompress" >&5
+$as_echo "$ac_cv_search_uncompress" >&6; }
+ac_res=$ac_cv_search_uncompress
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** uncompress() missing, zlib-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** uncompress() missing, zlib-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing crc32" >&5
+$as_echo_n "checking for library containing crc32... " >&6; }
+if test "${ac_cv_search_crc32+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char crc32 ();
+int
+main ()
+{
+return crc32 ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' z; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_crc32=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_crc32+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_crc32+set}" = set; then
+  :
+else
+  ac_cv_search_crc32=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_crc32" >&5
+$as_echo "$ac_cv_search_crc32" >&6; }
+ac_res=$ac_cv_search_crc32
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** crc32() missing, zlib-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** crc32() missing, zlib-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       ZLIB="-lz"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZLIB 1
+_ACEOF
+
+
+
+       LIBUUID=
+
+       if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
+$as_echo_n "checking for uuid/uuid.h... " >&6; }
+if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
+$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5
+$as_echo_n "checking uuid/uuid.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <uuid/uuid.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5
+$as_echo_n "checking uuid/uuid.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <uuid/uuid.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
+$as_echo_n "checking for uuid/uuid.h... " >&6; }
+if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_uuid_uuid_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
+$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
+
+fi
+if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** uuid/uuid.h missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** uuid/uuid.h missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing uuid_generate" >&5
+$as_echo_n "checking for library containing uuid_generate... " >&6; }
+if test "${ac_cv_search_uuid_generate+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate ();
+int
+main ()
+{
+return uuid_generate ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' uuid; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_uuid_generate=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_uuid_generate+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_uuid_generate+set}" = set; then
+  :
+else
+  ac_cv_search_uuid_generate=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_uuid_generate" >&5
+$as_echo "$ac_cv_search_uuid_generate" >&6; }
+ac_res=$ac_cv_search_uuid_generate
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** uuid_generate() missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** uuid_generate() missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing uuid_is_null" >&5
+$as_echo_n "checking for library containing uuid_is_null... " >&6; }
+if test "${ac_cv_search_uuid_is_null+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_is_null ();
+int
+main ()
+{
+return uuid_is_null ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' uuid; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_uuid_is_null=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_uuid_is_null+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_uuid_is_null+set}" = set; then
+  :
+else
+  ac_cv_search_uuid_is_null=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_uuid_is_null" >&5
+$as_echo "$ac_cv_search_uuid_is_null" >&6; }
+ac_res=$ac_cv_search_uuid_is_null
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** uuid_is_null() missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** uuid_is_null() missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       LIBUUID="-luuid"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUUID 1
+_ACEOF
+
+
+
+
+# Check whether --with-tirpc was given.
+if test "${with_tirpc+set}" = set; then
+  withval=$with_tirpc;
+else
+  with_tirpc=check
+fi
+
+
+       LIBTIRPC=
+       LIBTIRPC_CFLAGS=
+
+       if test "x$with_tirpc" != xno; then
+  { $as_echo "$as_me:$LINENO: checking for xdrmem_create in -ltirpc" >&5
+$as_echo_n "checking for xdrmem_create in -ltirpc... " >&6; }
+if test "${ac_cv_lib_tirpc_xdrmem_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltirpc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char xdrmem_create ();
+int
+main ()
+{
+return xdrmem_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_tirpc_xdrmem_create=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_tirpc_xdrmem_create=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_tirpc_xdrmem_create" >&5
+$as_echo "$ac_cv_lib_tirpc_xdrmem_create" >&6; }
+if test "x$ac_cv_lib_tirpc_xdrmem_create" = x""yes; then
+  LIBTIRPC=-ltirpc
+
+                LIBTIRPC_CFLAGS=-I/usr/include/tirpc
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBTIRPC 1
+_ACEOF
+
+
+else
+  if test "x$with_tirpc" != xcheck; then
+                   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-tirpc was given, but test for tirpc failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-tirpc was given, but test for tirpc failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+                fi
+               { $as_echo "$as_me:$LINENO: checking for library containing xdrmem_create" >&5
+$as_echo_n "checking for library containing xdrmem_create... " >&6; }
+if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char xdrmem_create ();
+int
+main ()
+{
+return xdrmem_create ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' tirpc; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_xdrmem_create=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  :
+else
+  ac_cv_search_xdrmem_create=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_xdrmem_create" >&5
+$as_echo "$ac_cv_search_xdrmem_create" >&6; }
+ac_res=$ac_cv_search_xdrmem_create
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+
+                   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: xdrmem_create() requires tirpc or libc
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: xdrmem_create() requires tirpc or libc
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+fi
+
+else
+  { $as_echo "$as_me:$LINENO: checking for library containing xdrmem_create" >&5
+$as_echo_n "checking for library containing xdrmem_create... " >&6; }
+if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char xdrmem_create ();
+int
+main ()
+{
+return xdrmem_create ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' tirpc; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_xdrmem_create=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  :
+else
+  ac_cv_search_xdrmem_create=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_xdrmem_create" >&5
+$as_echo "$ac_cv_search_xdrmem_create" >&6; }
+ac_res=$ac_cv_search_xdrmem_create
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+
+               { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: xdrmem_create() requires libc
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: xdrmem_create() requires libc
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+fi
+
+
+
+       LIBBLKID=
+
+       if test "${ac_cv_header_blkid_blkid_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for blkid/blkid.h" >&5
+$as_echo_n "checking for blkid/blkid.h... " >&6; }
+if test "${ac_cv_header_blkid_blkid_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_blkid_blkid_h" >&5
+$as_echo "$ac_cv_header_blkid_blkid_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking blkid/blkid.h usability" >&5
+$as_echo_n "checking blkid/blkid.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <blkid/blkid.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking blkid/blkid.h presence" >&5
+$as_echo_n "checking blkid/blkid.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <blkid/blkid.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for blkid/blkid.h" >&5
+$as_echo_n "checking for blkid/blkid.h... " >&6; }
+if test "${ac_cv_header_blkid_blkid_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_blkid_blkid_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_blkid_blkid_h" >&5
+$as_echo "$ac_cv_header_blkid_blkid_h" >&6; }
+
+fi
+if test "x$ac_cv_header_blkid_blkid_h" = x""yes; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** blkid.h missing, libblkid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** blkid.h missing, libblkid-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+
+       LIBBLKID="-lblkid"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBBLKID 1
+_ACEOF
+
+
+
+       LIBUDEV=
+
+       if test "${ac_cv_header_libudev_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for libudev.h" >&5
+$as_echo_n "checking for libudev.h... " >&6; }
+if test "${ac_cv_header_libudev_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libudev_h" >&5
+$as_echo "$ac_cv_header_libudev_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking libudev.h usability" >&5
+$as_echo_n "checking libudev.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <libudev.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking libudev.h presence" >&5
+$as_echo_n "checking libudev.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libudev.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libudev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libudev.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libudev.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libudev.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libudev.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libudev.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libudev.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libudev.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for libudev.h" >&5
+$as_echo_n "checking for libudev.h... " >&6; }
+if test "${ac_cv_header_libudev_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_libudev_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libudev_h" >&5
+$as_echo "$ac_cv_header_libudev_h" >&6; }
+
+fi
+if test "x$ac_cv_header_libudev_h" = x""yes; then
+
+           user_libudev=yes
+           LIBUDEV="-ludev"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUDEV 1
+_ACEOF
+
+
+else
+
+           user_libudev=no
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing udev_device_get_is_initialized" >&5
+$as_echo_n "checking for library containing udev_device_get_is_initialized... " >&6; }
+if test "${ac_cv_search_udev_device_get_is_initialized+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char udev_device_get_is_initialized ();
+int
+main ()
+{
+return udev_device_get_is_initialized ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' udev; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_udev_device_get_is_initialized=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_udev_device_get_is_initialized+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_udev_device_get_is_initialized+set}" = set; then
+  :
+else
+  ac_cv_search_udev_device_get_is_initialized=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_udev_device_get_is_initialized" >&5
+$as_echo "$ac_cv_search_udev_device_get_is_initialized" >&6; }
+ac_res=$ac_cv_search_udev_device_get_is_initialized
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED 1
+_ACEOF
+
+fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than=<size> support" >&5
+$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
+
+       saved_flags="$CFLAGS"
+       CFLAGS="$CFLAGS -Wframe-larger-than=1024"
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               FRAME_LARGER_THAN=-Wframe-larger-than=1024
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               FRAME_LARGER_THAN=
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+       CFLAGS="$saved_flags"
+
+
+
+       LIBAIO=
+
+       if test "${ac_cv_header_libaio_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for libaio.h" >&5
+$as_echo_n "checking for libaio.h... " >&6; }
+if test "${ac_cv_header_libaio_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libaio_h" >&5
+$as_echo "$ac_cv_header_libaio_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking libaio.h usability" >&5
+$as_echo_n "checking libaio.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <libaio.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking libaio.h presence" >&5
+$as_echo_n "checking libaio.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libaio.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libaio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libaio.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libaio.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libaio.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libaio.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libaio.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libaio.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libaio.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for libaio.h" >&5
+$as_echo_n "checking for libaio.h... " >&6; }
+if test "${ac_cv_header_libaio_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_libaio_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libaio_h" >&5
+$as_echo "$ac_cv_header_libaio_h" >&6; }
+
+fi
+if test "x$ac_cv_header_libaio_h" = x""yes; then
+
+           user_libaio=yes
+           LIBAIO="-laio"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBAIO 1
+_ACEOF
+
+
+else
+
+           user_libaio=no
+
+fi
+
+
+
+
+       if test "x$runstatedir" = x; then
+               runstatedir='${localstatedir}/run'
+
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking makedev() is declared in sys/sysmacros.h" >&5
+$as_echo_n "checking makedev() is declared in sys/sysmacros.h... " >&6; }
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+               #include <sys/sysmacros.h>
+
+int
+main ()
+{
+
+               int k;
+               k = makedev(0,0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MAKEDEV_IN_SYSMACROS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+       { $as_echo "$as_me:$LINENO: checking makedev() is declared in sys/mkdev.h" >&5
+$as_echo_n "checking makedev() is declared in sys/mkdev.h... " >&6; }
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+               #include <sys/mkdev.h>
+
+int
+main ()
+{
+
+               int k;
+               k = makedev(0,0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MAKEDEV_IN_MKDEV 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+       { $as_echo "$as_me:$LINENO: checking for -Wno-format-truncation support" >&5
+$as_echo_n "checking for -Wno-format-truncation support... " >&6; }
+
+       saved_flags="$CFLAGS"
+       CFLAGS="$CFLAGS -Wno-format-truncation"
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               NO_FORMAT_TRUNCATION=-Wno-format-truncation
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               NO_FORMAT_TRUNCATION=
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+       CFLAGS="$saved_flags"
+
+
+
+
+       ZONENAME="echo global"
+
+
+
+
+
+
+for ac_func in mlockall
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+   ;;
+               all)
+
+
+# Check whether --with-mounthelperdir was given.
+if test "${with_mounthelperdir+set}" = set; then
+  withval=$with_mounthelperdir; mounthelperdir=$withval
+else
+  mounthelperdir=/sbin
+fi
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for udev directories" >&5
+$as_echo_n "checking for udev directories... " >&6; }
+
+# Check whether --with-udevdir was given.
+if test "${with_udevdir+set}" = set; then
+  withval=$with_udevdir; udevdir=$withval
+else
+  udevdir=check
+fi
+
+
+       if test "x$udevdir" = xcheck; then
+
+               path1=/lib/udev
+               path2=/usr/lib/udev
+               default=$path2
+
+               if test -d "$path1"; then
+  udevdir="$path1"
+else
+
+                       if test -d "$path2"; then
+  udevdir="$path2"
+else
+  udevdir="$default"
+fi
+
+
+fi
+
+
+fi
+
+
+
+# Check whether --with-udevruledir was given.
+if test "${with_udevruledir+set}" = set; then
+  withval=$with_udevruledir; udevruledir=$withval
+else
+  udevruledir="${udevdir}/rules.d"
+fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: result: $udevdir;$udevruledir" >&5
+$as_echo "$udevdir;$udevruledir" >&6; }
+
+
+       # Check whether --enable-systemd was given.
+if test "${enable_systemd+set}" = set; then
+  enableval=$enable_systemd; enable_systemd=$enableval
+else
+  enable_systemd=check
+fi
+
+
+
+# Check whether --with-systemdunitdir was given.
+if test "${with_systemdunitdir+set}" = set; then
+  withval=$with_systemdunitdir; systemdunitdir=$withval
+else
+  systemdunitdir=/usr/lib/systemd/system
+fi
+
+
+
+# Check whether --with-systemdpresetdir was given.
+if test "${with_systemdpresetdir+set}" = set; then
+  withval=$with_systemdpresetdir; systemdpresetdir=$withval
+else
+  systemdpresetdir=/usr/lib/systemd/system-preset
+fi
+
+
+
+# Check whether --with-systemdmodulesloaddir was given.
+if test "${with_systemdmodulesloaddir+set}" = set; then
+  withval=$with_systemdmodulesloaddir; systemdmoduleloaddir=$withval
+else
+  systemdmodulesloaddir=/usr/lib/modules-load.d
+fi
+
+
+       if test "x$enable_systemd" = xcheck; then
+
+               if systemctl --version >/dev/null 2>&1; then
+  enable_systemd=yes
+else
+  enable_systemd=no
+fi
+
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking for systemd support" >&5
+$as_echo_n "checking for systemd support... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: $enable_systemd" >&5
+$as_echo "$enable_systemd" >&6; }
+
+       if test "x$enable_systemd" = xyes; then
+
+               ZFS_INIT_SYSTEMD=systemd
+               ZFS_MODULE_LOAD=modules-load.d
+               DEFINE_SYSTEMD='--with systemd --define "_unitdir $(systemdunitdir)" --define "_presetdir $(systemdpresetdir)"'
+               modulesloaddir=$systemdmodulesloaddir
+
+else
+
+               DEFINE_SYSTEMD='--without systemd'
+
+fi
+
+
+
+
+
+
+
+
+
+
+       # Check whether --enable-sysvinit was given.
+if test "${enable_sysvinit+set}" = set; then
+  enableval=$enable_sysvinit;
+else
+  enable_sysvinit=yes
+fi
+
+
+       if test "x$enable_sysvinit" = xyes; then
+  ZFS_INIT_SYSV=init.d
+fi
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for dracut directory" >&5
+$as_echo_n "checking for dracut directory... " >&6; }
+
+# Check whether --with-dracutdir was given.
+if test "${with_dracutdir+set}" = set; then
+  withval=$with_dracutdir; dracutdir=$withval
+else
+  dracutdir=check
+fi
+
+
+       if test "x$dracutdir" = xcheck; then
+
+               path1=/usr/share/dracut
+               path2=/usr/lib/dracut
+               default=$path2
+
+               if test -d "$path1"; then
+  dracutdir="$path1"
+else
+
+                       if test -d "$path2"; then
+  dracutdir="$path2"
+else
+  dracutdir="$default"
+fi
+
+
+fi
+
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: result: $dracutdir" >&5
+$as_echo "$dracutdir" >&6; }
+
+
+       ZLIB=
+
+       if test "${ac_cv_header_zlib_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
+$as_echo_n "checking for zlib.h... " >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+$as_echo "$ac_cv_header_zlib_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
+$as_echo_n "checking zlib.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <zlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
+$as_echo_n "checking zlib.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
+$as_echo_n "checking for zlib.h... " >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_zlib_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+$as_echo "$ac_cv_header_zlib_h" >&6; }
+
+fi
+if test "x$ac_cv_header_zlib_h" = x""yes; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** zlib.h missing, zlib-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** zlib.h missing, zlib-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing compress2" >&5
+$as_echo_n "checking for library containing compress2... " >&6; }
+if test "${ac_cv_search_compress2+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char compress2 ();
+int
+main ()
+{
+return compress2 ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' z; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_compress2=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_compress2+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_compress2+set}" = set; then
+  :
+else
+  ac_cv_search_compress2=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_compress2" >&5
+$as_echo "$ac_cv_search_compress2" >&6; }
+ac_res=$ac_cv_search_compress2
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** compress2() missing, zlib-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** compress2() missing, zlib-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing uncompress" >&5
+$as_echo_n "checking for library containing uncompress... " >&6; }
+if test "${ac_cv_search_uncompress+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uncompress ();
+int
+main ()
+{
+return uncompress ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' z; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_uncompress=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_uncompress+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_uncompress+set}" = set; then
+  :
+else
+  ac_cv_search_uncompress=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_uncompress" >&5
+$as_echo "$ac_cv_search_uncompress" >&6; }
+ac_res=$ac_cv_search_uncompress
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** uncompress() missing, zlib-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** uncompress() missing, zlib-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing crc32" >&5
+$as_echo_n "checking for library containing crc32... " >&6; }
+if test "${ac_cv_search_crc32+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char crc32 ();
+int
+main ()
+{
+return crc32 ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' z; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_crc32=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_crc32+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_crc32+set}" = set; then
+  :
+else
+  ac_cv_search_crc32=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_crc32" >&5
+$as_echo "$ac_cv_search_crc32" >&6; }
+ac_res=$ac_cv_search_crc32
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** crc32() missing, zlib-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** crc32() missing, zlib-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       ZLIB="-lz"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZLIB 1
+_ACEOF
+
+
+
+       LIBUUID=
+
+       if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
+$as_echo_n "checking for uuid/uuid.h... " >&6; }
+if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
+$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5
+$as_echo_n "checking uuid/uuid.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <uuid/uuid.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5
+$as_echo_n "checking uuid/uuid.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <uuid/uuid.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
+$as_echo_n "checking for uuid/uuid.h... " >&6; }
+if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_uuid_uuid_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
+$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
+
+fi
+if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** uuid/uuid.h missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** uuid/uuid.h missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing uuid_generate" >&5
+$as_echo_n "checking for library containing uuid_generate... " >&6; }
+if test "${ac_cv_search_uuid_generate+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate ();
+int
+main ()
+{
+return uuid_generate ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' uuid; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_uuid_generate=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_uuid_generate+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_uuid_generate+set}" = set; then
+  :
+else
+  ac_cv_search_uuid_generate=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_uuid_generate" >&5
+$as_echo "$ac_cv_search_uuid_generate" >&6; }
+ac_res=$ac_cv_search_uuid_generate
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** uuid_generate() missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** uuid_generate() missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing uuid_is_null" >&5
+$as_echo_n "checking for library containing uuid_is_null... " >&6; }
+if test "${ac_cv_search_uuid_is_null+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_is_null ();
+int
+main ()
+{
+return uuid_is_null ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' uuid; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_uuid_is_null=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_uuid_is_null+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_uuid_is_null+set}" = set; then
+  :
+else
+  ac_cv_search_uuid_is_null=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_uuid_is_null" >&5
+$as_echo "$ac_cv_search_uuid_is_null" >&6; }
+ac_res=$ac_cv_search_uuid_is_null
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** uuid_is_null() missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** uuid_is_null() missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+       LIBUUID="-luuid"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUUID 1
+_ACEOF
+
+
+
+
+# Check whether --with-tirpc was given.
+if test "${with_tirpc+set}" = set; then
+  withval=$with_tirpc;
+else
+  with_tirpc=check
+fi
+
+
+       LIBTIRPC=
+       LIBTIRPC_CFLAGS=
+
+       if test "x$with_tirpc" != xno; then
+  { $as_echo "$as_me:$LINENO: checking for xdrmem_create in -ltirpc" >&5
+$as_echo_n "checking for xdrmem_create in -ltirpc... " >&6; }
+if test "${ac_cv_lib_tirpc_xdrmem_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltirpc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char xdrmem_create ();
+int
+main ()
+{
+return xdrmem_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_tirpc_xdrmem_create=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_tirpc_xdrmem_create=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_tirpc_xdrmem_create" >&5
+$as_echo "$ac_cv_lib_tirpc_xdrmem_create" >&6; }
+if test "x$ac_cv_lib_tirpc_xdrmem_create" = x""yes; then
+  LIBTIRPC=-ltirpc
+
+                LIBTIRPC_CFLAGS=-I/usr/include/tirpc
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBTIRPC 1
+_ACEOF
+
+
+else
+  if test "x$with_tirpc" != xcheck; then
+                   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-tirpc was given, but test for tirpc failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-tirpc was given, but test for tirpc failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+                fi
+               { $as_echo "$as_me:$LINENO: checking for library containing xdrmem_create" >&5
+$as_echo_n "checking for library containing xdrmem_create... " >&6; }
+if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char xdrmem_create ();
+int
+main ()
+{
+return xdrmem_create ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' tirpc; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_xdrmem_create=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  :
+else
+  ac_cv_search_xdrmem_create=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_xdrmem_create" >&5
+$as_echo "$ac_cv_search_xdrmem_create" >&6; }
+ac_res=$ac_cv_search_xdrmem_create
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+
+                   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: xdrmem_create() requires tirpc or libc
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: xdrmem_create() requires tirpc or libc
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+fi
+
+else
+  { $as_echo "$as_me:$LINENO: checking for library containing xdrmem_create" >&5
+$as_echo_n "checking for library containing xdrmem_create... " >&6; }
+if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char xdrmem_create ();
+int
+main ()
+{
+return xdrmem_create ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' tirpc; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_xdrmem_create=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_xdrmem_create+set}" = set; then
+  :
+else
+  ac_cv_search_xdrmem_create=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_xdrmem_create" >&5
+$as_echo "$ac_cv_search_xdrmem_create" >&6; }
+ac_res=$ac_cv_search_xdrmem_create
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+
+               { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: xdrmem_create() requires libc
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: xdrmem_create() requires libc
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+fi
+
+
+
+       LIBBLKID=
+
+       if test "${ac_cv_header_blkid_blkid_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for blkid/blkid.h" >&5
+$as_echo_n "checking for blkid/blkid.h... " >&6; }
+if test "${ac_cv_header_blkid_blkid_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_blkid_blkid_h" >&5
+$as_echo "$ac_cv_header_blkid_blkid_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking blkid/blkid.h usability" >&5
+$as_echo_n "checking blkid/blkid.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <blkid/blkid.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking blkid/blkid.h presence" >&5
+$as_echo_n "checking blkid/blkid.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <blkid/blkid.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: blkid/blkid.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: blkid/blkid.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for blkid/blkid.h" >&5
+$as_echo_n "checking for blkid/blkid.h... " >&6; }
+if test "${ac_cv_header_blkid_blkid_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_blkid_blkid_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_blkid_blkid_h" >&5
+$as_echo "$ac_cv_header_blkid_blkid_h" >&6; }
+
+fi
+if test "x$ac_cv_header_blkid_blkid_h" = x""yes; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+       *** blkid.h missing, libblkid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+       *** blkid.h missing, libblkid-devel package required
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+
+       LIBBLKID="-lblkid"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBBLKID 1
+_ACEOF
+
+
+
+       LIBUDEV=
+
+       if test "${ac_cv_header_libudev_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for libudev.h" >&5
+$as_echo_n "checking for libudev.h... " >&6; }
+if test "${ac_cv_header_libudev_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libudev_h" >&5
+$as_echo "$ac_cv_header_libudev_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking libudev.h usability" >&5
+$as_echo_n "checking libudev.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <libudev.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking libudev.h presence" >&5
+$as_echo_n "checking libudev.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libudev.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libudev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libudev.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libudev.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libudev.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libudev.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libudev.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libudev.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libudev.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libudev.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for libudev.h" >&5
+$as_echo_n "checking for libudev.h... " >&6; }
+if test "${ac_cv_header_libudev_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_libudev_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libudev_h" >&5
+$as_echo "$ac_cv_header_libudev_h" >&6; }
+
+fi
+if test "x$ac_cv_header_libudev_h" = x""yes; then
+
+           user_libudev=yes
+           LIBUDEV="-ludev"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUDEV 1
+_ACEOF
+
+
+else
+
+           user_libudev=no
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for library containing udev_device_get_is_initialized" >&5
+$as_echo_n "checking for library containing udev_device_get_is_initialized... " >&6; }
+if test "${ac_cv_search_udev_device_get_is_initialized+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char udev_device_get_is_initialized ();
+int
+main ()
+{
+return udev_device_get_is_initialized ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' udev; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_udev_device_get_is_initialized=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_udev_device_get_is_initialized+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_udev_device_get_is_initialized+set}" = set; then
+  :
+else
+  ac_cv_search_udev_device_get_is_initialized=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_udev_device_get_is_initialized" >&5
+$as_echo "$ac_cv_search_udev_device_get_is_initialized" >&6; }
+ac_res=$ac_cv_search_udev_device_get_is_initialized
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED 1
+_ACEOF
+
+fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than=<size> support" >&5
+$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
+
+       saved_flags="$CFLAGS"
+       CFLAGS="$CFLAGS -Wframe-larger-than=1024"
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               FRAME_LARGER_THAN=-Wframe-larger-than=1024
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               FRAME_LARGER_THAN=
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+       CFLAGS="$saved_flags"
+
+
+
+       LIBAIO=
+
+       if test "${ac_cv_header_libaio_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for libaio.h" >&5
+$as_echo_n "checking for libaio.h... " >&6; }
+if test "${ac_cv_header_libaio_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libaio_h" >&5
+$as_echo "$ac_cv_header_libaio_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking libaio.h usability" >&5
+$as_echo_n "checking libaio.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <libaio.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking libaio.h presence" >&5
+$as_echo_n "checking libaio.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libaio.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libaio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libaio.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libaio.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libaio.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libaio.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libaio.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libaio.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libaio.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libaio.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for libaio.h" >&5
+$as_echo_n "checking for libaio.h... " >&6; }
+if test "${ac_cv_header_libaio_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_libaio_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libaio_h" >&5
+$as_echo "$ac_cv_header_libaio_h" >&6; }
+
+fi
+if test "x$ac_cv_header_libaio_h" = x""yes; then
+
+           user_libaio=yes
+           LIBAIO="-laio"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBAIO 1
+_ACEOF
+
+
+else
+
+           user_libaio=no
+
+fi
+
+
+
+
+       if test "x$runstatedir" = x; then
+               runstatedir='${localstatedir}/run'
+
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking makedev() is declared in sys/sysmacros.h" >&5
+$as_echo_n "checking makedev() is declared in sys/sysmacros.h... " >&6; }
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+               #include <sys/sysmacros.h>
+
+int
+main ()
+{
+
+               int k;
+               k = makedev(0,0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MAKEDEV_IN_SYSMACROS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+       { $as_echo "$as_me:$LINENO: checking makedev() is declared in sys/mkdev.h" >&5
+$as_echo_n "checking makedev() is declared in sys/mkdev.h... " >&6; }
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+               #include <sys/mkdev.h>
+
+int
+main ()
+{
+
+               int k;
+               k = makedev(0,0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MAKEDEV_IN_MKDEV 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+       { $as_echo "$as_me:$LINENO: checking for -Wno-format-truncation support" >&5
+$as_echo_n "checking for -Wno-format-truncation support... " >&6; }
+
+       saved_flags="$CFLAGS"
+       CFLAGS="$CFLAGS -Wno-format-truncation"
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+               NO_FORMAT_TRUNCATION=-Wno-format-truncation
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+               NO_FORMAT_TRUNCATION=
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+       CFLAGS="$saved_flags"
+
+
+
+
+       ZONENAME="echo global"
+
+
+
+
+
+
+for ac_func in mlockall
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+# Check whether --with-linux was given.
+if test "${with_linux+set}" = set; then
+  withval=$with_linux; kernelsrc="$withval"
+fi
+
+
+
+# Check whether --with-linux-obj was given.
+if test "${with_linux_obj+set}" = set; then
+  withval=$with_linux_obj; kernelbuild="$withval"
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
+$as_echo_n "checking kernel source directory... " >&6; }
+       if test -z "$kernelsrc"; then
+
+               if test -e "/lib/modules/$(uname -r)/source"; then
+
+                       headersdir="/lib/modules/$(uname -r)/source"
+                       sourcelink=$(readlink -f "$headersdir")
+
+elif test -e "/lib/modules/$(uname -r)/build"; then
+
+                       headersdir="/lib/modules/$(uname -r)/build"
+                       sourcelink=$(readlink -f "$headersdir")
+
+else
+
+                       sourcelink=$(ls -1d /usr/src/kernels/* \
+                                    /usr/src/linux-* \
+                                    2>/dev/null | grep -v obj | tail -1)
+
+fi
+
+
+               if test -n "$sourcelink" && test -e ${sourcelink}; then
+
+                       kernelsrc=`readlink -f ${sourcelink}`
+
+else
+
+                       kernelsrc="Not found"
+
+fi
+
+
+else
+
+               if test "$kernelsrc" = "NONE"; then
+
+                       kernsrcver=NONE
+
+fi
+
+               withlinux=yes
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5
+$as_echo "$kernelsrc" >&6; }
+       if test ! -d "$kernelsrc"; then
+
+               { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed and then try again.  If that fails, you can specify the
+       *** location of the kernel source with the '--with-linux=PATH' option." >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed and then try again.  If that fails, you can specify the
+       *** location of the kernel source with the '--with-linux=PATH' option." >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
+$as_echo_n "checking kernel build directory... " >&6; }
+       if test -z "$kernelbuild"; then
+
+               if test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"; then
+
+                       kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
+
+elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
+
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
+
+elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
+
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
+
+elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
+
+                       kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
+
+else
+
+                       kernelbuild=${kernelsrc}
+
+fi
+
+
+fi
+
+       { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5
+$as_echo "$kernelbuild" >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking kernel source version" >&5
+$as_echo_n "checking kernel source version... " >&6; }
+       utsrelease1=$kernelbuild/include/linux/version.h
+       utsrelease2=$kernelbuild/include/linux/utsrelease.h
+       utsrelease3=$kernelbuild/include/generated/utsrelease.h
+       if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then
+
+               utsrelease=linux/version.h
+
+elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then
+
+               utsrelease=linux/utsrelease.h
+
+elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then
+
+               utsrelease=generated/utsrelease.h
+
+fi
+
+
+       if test "$utsrelease"; then
+
+               kernsrcver=`(echo "#include <$utsrelease>";
+                            echo "kernsrcver=UTS_RELEASE") |
+                            cpp -I $kernelbuild/include |
+                            grep "^kernsrcver=" | cut -d \" -f 2`
+
+               if test -z "$kernsrcver"; then
+
+                       { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+                       { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5
+$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+               if test "x$enable_linux_builtin" != xyes; then
+                       { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
+$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;}
+   { (exit 1); exit 1; }; }
+               else
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Cannot find UTS_RELEASE definition.
+       *** Please run 'make prepare' inside the kernel source tree." >&5
+$as_echo "$as_me: error:
+       *** Cannot find UTS_RELEASE definition.
+       *** Please run 'make prepare' inside the kernel source tree." >&2;}
+   { (exit 1); exit 1; }; }
+               fi
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
+$as_echo "$kernsrcver" >&6; }
+
+       LINUX=${kernelsrc}
+       LINUX_OBJ=${kernelbuild}
+       LINUX_VERSION=${kernsrcver}
+
+
+
+
+
+
+       modpost=$LINUX/scripts/Makefile.modpost
+       { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5
+$as_echo_n "checking kernel file name for module symbols... " >&6; }
+       if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then
+
+               if grep -q Modules.symvers $modpost; then
+
+                       LINUX_SYMBOLS=Modules.symvers
+
+else
+
+                       LINUX_SYMBOLS=Module.symvers
+
+fi
+
+
+               if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
+
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If you are building with a custom kernel, make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If you are building with a custom kernel, make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+else
+
+               LINUX_SYMBOLS=NONE
+
+fi
+
+       { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
+$as_echo "$LINUX_SYMBOLS" >&6; }
+
+
+
+
+
+# Check whether --with-spl was given.
+if test "${with_spl+set}" = set; then
+  withval=$with_spl; if test "$withval" = "yes"; then
+  { { $as_echo "$as_me:$LINENO: error: --with-spl=PATH requires a PATH" >&5
+$as_echo "$as_me: error: --with-spl=PATH requires a PATH" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  splsrc="$withval"
+fi
+
+fi
+
+
+
+# Check whether --with-spl-obj was given.
+if test "${with_spl_obj+set}" = set; then
+  withval=$with_spl_obj; splbuild="$withval"
+fi
+
+
+
+# Check whether --with-spl-timeout was given.
+if test "${with_spl_timeout+set}" = set; then
+  withval=$with_spl_timeout; timeout="$withval"
+else
+  timeout=0
+fi
+
+
+                                       splsrc0="/var/lib/dkms/spl/${VERSION}/build"
+       splsrc1="/usr/local/src/spl-${VERSION}/${LINUX_VERSION}"
+       splsrc2="/usr/local/src/spl-${VERSION}"
+       splsrc3="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
+       splsrc4="/usr/src/spl-${VERSION}"
+       splsrc5="../spl/"
+       splsrc6="$LINUX"
+
+       { $as_echo "$as_me:$LINENO: checking spl source directory" >&5
+$as_echo_n "checking spl source directory... " >&6; }
+       if test -z "${splsrc}"; then
+
+               all_spl_sources="
+               ${splsrc0}
+               ${splsrc1}
+               ${splsrc2}
+               ${splsrc3}
+               ${splsrc4}
+               ${splsrc5}
+               ${splsrc6}",
+               if  test -e "${splsrc0}/spl.release.in"; then
+
+                       splsrc=${splsrc0}
+
+elif  test -e "${splsrc1}/spl.release.in"; then
+
+                       splsrc=${splsrc1}
+
+elif  test -e "${splsrc2}/spl.release.in"; then
+
+                       splsrc=${splsrc2}
+
+elif  test -e "${splsrc3}/spl.release.in"; then
+
+                       splsrc=$(readlink -f "${splsrc3}")
+
+elif  test -e "${splsrc4}/spl.release.in" ; then
+
+                       splsrc=${splsrc4}
+
+elif  test -e "${splsrc5}/spl.release.in"; then
+
+                       splsrc=$(readlink -f "${splsrc5}")
+
+elif  test -e "${splsrc6}/spl.release.in" ; then
+
+                       splsrc=${splsrc6}
+
+else
+
+                       splsrc="Not found"
+
+fi
+
+
+else
+
+               all_spl_sources="$withval",
+               if test "$splsrc" = "NONE"; then
+
+                       splbuild=NONE
+                       splsrcver=NONE
+
+fi
+
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: result: $splsrc" >&5
+$as_echo "$splsrc" >&6; }
+       if  test ! -e "$splsrc/spl.release.in"; then
+
+               { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kmod spl devel package for your distribution
+       *** is installed then try again.  If that fails you can specify the
+       *** location of the spl source with the '--with-spl=PATH' option.
+       *** The spl version must match the version of ZFS you are building,
+       *** ${VERSION}.  Failed to find spl.release.in in the following:
+       $all_spl_sources" >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kmod spl devel package for your distribution
+       *** is installed then try again.  If that fails you can specify the
+       *** location of the spl source with the '--with-spl=PATH' option.
+       *** The spl version must match the version of ZFS you are building,
+       *** ${VERSION}.  Failed to find spl.release.in in the following:
+       $all_spl_sources" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+                                                                                                       { $as_echo "$as_me:$LINENO: checking spl build directory" >&5
+$as_echo_n "checking spl build directory... " >&6; }
+
+       all_spl_config_locs="${splsrc}/${LINUX_VERSION}
+       ${splsrc}"
+
+       while true; do
+               if test -z "$splbuild"; then
+
+                       if  test -e "${splsrc}/${LINUX_VERSION}/spl_config.h" ; then
+
+                               splbuild="${splsrc}/${LINUX_VERSION}"
+
+elif  test -e "${splsrc}/spl_config.h" ; then
+
+                               splbuild="${splsrc}"
+
+elif  find -L "${splsrc}" -name spl_config.h 2> /dev/null | grep -wq spl_config.h ; then
+
+                               splbuild=$(find -L "${splsrc}" -name spl_config.h | sed 's,/spl_config.h,,')
+
+else
+
+                               splbuild="Not found"
+
+fi
+
+
+fi
+
+               if test -e "$splbuild/spl_config.h" -o $timeout -le 0; then
+
+                       break;
+
+else
+
+                       sleep 1
+                       timeout=$((timeout-1))
+
+fi
+
+       done
+
+       { $as_echo "$as_me:$LINENO: result: $splbuild" >&5
+$as_echo "$splbuild" >&6; }
+       if  ! test -e "$splbuild/spl_config.h"; then
+
+               { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kmod spl devel <kernel> package for your
+       *** distribution is installed then try again.  If that fails you
+       *** can specify the location of the spl objects with the
+       *** '--with-spl-obj=PATH' option.  Failed to find spl_config.h in
+       *** any of the following:
+       $all_spl_config_locs" >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kmod spl devel <kernel> package for your
+       *** distribution is installed then try again.  If that fails you
+       *** can specify the location of the spl objects with the
+       *** '--with-spl-obj=PATH' option.  Failed to find spl_config.h in
+       *** any of the following:
+       $all_spl_config_locs" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: checking spl source version" >&5
+$as_echo_n "checking spl source version... " >&6; }
+       if test -r $splbuild/spl_config.h &&
+               fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then
+
+
+               splsrcver=`(echo "#include <spl_config.h>";
+                           echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
+                           cpp -I $splbuild |
+                           grep "^splsrcver=" | tr -d \" | cut -d= -f2`
+
+fi
+
+
+       if test -z "$splsrcver"; then
+
+               { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+               { { $as_echo "$as_me:$LINENO: error:
+       *** Cannot determine the version of the spl source.
+       *** Please prepare the spl source before running this script" >&5
+$as_echo "$as_me: error:
+       *** Cannot determine the version of the spl source.
+       *** Please prepare the spl source before running this script" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5
+$as_echo "$splsrcver" >&6; }
+
+       SPL=${splsrc}
+       SPL_OBJ=${splbuild}
+       SPL_VERSION=${splsrcver}
+
+
+
+
+
+                                                                                                               { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5
+$as_echo_n "checking spl file name for module symbols... " >&6; }
+       SPL_SYMBOLS=NONE
+
+       while true; do
+               if test -r $SPL_OBJ/Module.symvers; then
+
+                       SPL_SYMBOLS=Module.symvers
+
+elif test -r $SPL_OBJ/Modules.symvers; then
+
+                       SPL_SYMBOLS=Modules.symvers
+
+elif test -r $SPL_OBJ/module/Module.symvers; then
+
+                       SPL_SYMBOLS=Module.symvers
+
+elif test -r $SPL_OBJ/module/Modules.symvers; then
+
+                       SPL_SYMBOLS=Modules.symvers
+
+fi
+
+
+               if test $SPL_SYMBOLS != NONE -o $timeout -le 0; then
+
+                       break;
+
+else
+
+                       sleep 1
+                       timeout=$((timeout-1))
+
+fi
+
+       done
+
+       if test "$SPL_SYMBOLS" = NONE; then
+
+               SPL_SYMBOLS=$LINUX_SYMBOLS
+
+fi
+
+
+       { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5
+$as_echo "$SPL_SYMBOLS" >&6; }
+
+
+
+
+# Check whether --with-qat was given.
+if test "${with_qat+set}" = set; then
+  withval=$with_qat; if test "$withval" = "yes"; then
+  { { $as_echo "$as_me:$LINENO: error: --with-qat=PATH requires a PATH" >&5
+$as_echo "$as_me: error: --with-qat=PATH requires a PATH" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  qatsrc="$withval"
+fi
+
+fi
+
+
+
+# Check whether --with-qat-obj was given.
+if test "${with_qat_obj+set}" = set; then
+  withval=$with_qat_obj; qatbuild="$withval"
+fi
+
+
+       if test ! -z "${qatsrc}"; then
+
+               { $as_echo "$as_me:$LINENO: checking qat source directory" >&5
+$as_echo_n "checking qat source directory... " >&6; }
+               { $as_echo "$as_me:$LINENO: result: $qatsrc" >&5
+$as_echo "$qatsrc" >&6; }
+               QAT_SRC="${qatsrc}/quickassist"
+               if  test ! -e "$QAT_SRC/include/cpa.h"; then
+
+                       { { $as_echo "$as_me:$LINENO: error:
+               *** Please make sure the qat driver package is installed
+               *** and specify the location of the qat source with the
+               *** '--with-qat=PATH' option then try again. Failed to
+               *** find cpa.h in:
+               ${QAT_SRC}/include" >&5
+$as_echo "$as_me: error:
+               *** Please make sure the qat driver package is installed
+               *** and specify the location of the qat source with the
+               *** '--with-qat=PATH' option then try again. Failed to
+               *** find cpa.h in:
+               ${QAT_SRC}/include" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
+
+       if test ! -z "${qatsrc}"; then
+
+               { $as_echo "$as_me:$LINENO: checking qat build directory" >&5
+$as_echo_n "checking qat build directory... " >&6; }
+               if test -z "$qatbuild"; then
+
+                       qatbuild="${qatsrc}/build"
+
+fi
+
+
+               { $as_echo "$as_me:$LINENO: result: $qatbuild" >&5
+$as_echo "$qatbuild" >&6; }
+               QAT_OBJ=${qatbuild}
+               if  ! test -e "$QAT_OBJ/icp_qa_al.ko" && ! test -e "$QAT_OBJ/qat_api.ko"; then
+
+                       { { $as_echo "$as_me:$LINENO: error:
+               *** Please make sure the qat driver is installed then try again.
+               *** Failed to find icp_qa_al.ko or qat_api.ko in:
+               $QAT_OBJ" >&5
+$as_echo "$as_me: error:
+               *** Please make sure the qat driver is installed then try again.
+               *** Failed to find icp_qa_al.ko or qat_api.ko in:
+               $QAT_OBJ" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_QAT 1
+_ACEOF
+
+
+fi
+
+
+                               if test ! -z "${qatsrc}"; then
+
+               { $as_echo "$as_me:$LINENO: checking qat file for module symbols" >&5
+$as_echo_n "checking qat file for module symbols... " >&6; }
+               QAT_SYMBOLS=$QAT_SRC/lookaside/access_layer/src/Module.symvers
+
+               if test -r $QAT_SYMBOLS; then
+
+                       { $as_echo "$as_me:$LINENO: result: $QAT_SYMBOLS" >&5
+$as_echo "$QAT_SYMBOLS" >&6; }
+
+
+else
+
+                       { { $as_echo "$as_me:$LINENO: error:
+                       *** Please make sure the qat driver is installed then try again.
+                       *** Failed to find Module.symvers in:
+                       $QAT_SYMBOLS" >&5
+$as_echo "$as_me: error:
+                       *** Please make sure the qat driver is installed then try again.
+                       *** Failed to find Module.symvers in:
+                       $QAT_SYMBOLS" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5
+$as_echo_n "checking whether modules can be built... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               if test "x$enable_linux_builtin" != xyes; then
+                       { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5
+$as_echo "$as_me: error: *** Unable to build an empty module." >&2;}
+   { (exit 1); exit 1; }; }
+               else
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Unable to build an empty module.
+       *** Please run 'make scripts' inside the kernel source tree." >&5
+$as_echo "$as_me: error:
+       *** Unable to build an empty module.
+       *** Please run 'make scripts' inside the kernel source tree." >&2;}
+   { (exit 1); exit 1; }; }
+               fi
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking for compile-time stack validation (objtool)" >&5
+$as_echo_n "checking for compile-time stack validation (objtool)... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #undef __ASSEMBLY__
+               #include <asm/frame.h>
+
+int
+main (void)
+{
+
+               #if !defined(FRAME_BEGIN)
+               CTASSERT(1);
+               #endif
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERNEL_OBJTOOL 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       if test "x$cross_compiling" != xyes; then
+
+               if test "$cross_compiling" = yes; then
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+                       /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+                               #include "$LINUX/include/linux/license.h"
+
+int
+main ()
+{
+
+                               return !license_is_gpl_compatible("$ZFS_META_LICENSE");
+
+  ;
+  return 0;
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_IS_GPL_COMPATIBLE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+
+
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether kernel was built with 16K or larger stacks" >&5
+$as_echo_n "checking whether kernel was built with 16K or larger stacks... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/module.h>
+
+int
+main (void)
+{
+
+               #if (THREAD_SIZE < 16384)
+               #error "THREAD_SIZE is less than 16K"
+               #endif
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LARGE_STACKS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether kernel was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
+$as_echo_n "checking whether kernel was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/module.h>
+
+int
+main (void)
+{
+
+               #ifndef CONFIG_DEBUG_LOCK_ALLOC
+               #error CONFIG_DEBUG_LOCK_ALLOC not #defined
+               #endif
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+               { $as_echo "$as_me:$LINENO: checking whether mutex_lock() is GPL-only" >&5
+$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; }
+               tmp_flags="$EXTRA_KCFLAGS"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/module.h>
+                       #include <linux/mutex.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+                       struct mutex lock;
+
+                       mutex_init(&lock);
+                       mutex_lock(&lock);
+                       mutex_unlock(&lock);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
+       *** with the CDDL license and will prevent the module linking stage
+       *** from succeeding.  You must rebuild your kernel without this
+       *** option enabled." >&5
+$as_echo "$as_me: error:
+       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
+       *** with the CDDL license and will prevent the module linking stage
+       *** from succeeding.  You must rebuild your kernel without this
+       *** option enabled." >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+               EXTRA_KCFLAGS="$tmp_flags"
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-I\$(src)"
+
+       { $as_echo "$as_me:$LINENO: checking whether DECLARE_EVENT_CLASS() is available" >&5
+$as_echo_n "checking whether DECLARE_EVENT_CLASS() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/module.h>
+               MODULE_LICENSE(ZFS_META_LICENSE);
+
+               #define CREATE_TRACE_POINTS
+               #include "conftest.h"
+
+int
+main (void)
+{
+
+               trace_zfs_autoconf_event_one(1UL);
+               trace_zfs_autoconf_event_two(2UL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+               #if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
+               #define _CONFTEST_H
+
+               #undef  TRACE_SYSTEM
+               #define TRACE_SYSTEM zfs
+               #include <linux/tracepoint.h>
+
+               DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
+                       TP_PROTO(unsigned long i),
+                       TP_ARGS(i),
+                       TP_STRUCT__entry(
+                               __field(unsigned long, i)
+                       ),
+                       TP_fast_assign(
+                               __entry->i = i;
+                       ),
+                       TP_printk("i = %lu", __entry->i)
+               );
+
+               #define DEFINE_AUTOCONF_EVENT(name) \
+               DEFINE_EVENT(zfs_autoconf_event_class, name, \
+                       TP_PROTO(unsigned long i), \
+                       TP_ARGS(i))
+               DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
+               DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
+
+               #endif /* _CONFTEST_H */
+
+               #undef  TRACE_INCLUDE_PATH
+               #define TRACE_INCLUDE_PATH .
+               #define TRACE_INCLUDE_FILE conftest
+               #include <trace/define_trace.h>
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DECLARE_EVENT_CLASS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+
+       { $as_echo "$as_me:$LINENO: checking whether current->bio_tail exists" >&5
+$as_echo_n "checking whether current->bio_tail exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/sched.h>
+
+int
+main (void)
+{
+
+               current->bio_tail = (struct bio **) NULL;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CURRENT_BIO_TAIL 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether current->bio_list exists" >&5
+$as_echo_n "checking whether current->bio_list exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/sched.h>
+
+int
+main (void)
+{
+
+                       current->bio_list = (struct bio_list *) NULL;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CURRENT_BIO_LIST 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" >&5
+$as_echo "$as_me: error: no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether super_block->s_user_ns exists" >&5
+$as_echo_n "checking whether super_block->s_user_ns exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/user_namespace.h>
+
+int
+main (void)
+{
+
+               struct super_block super;
+               super.s_user_ns = (struct user_namespace *)NULL;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SUPER_USER_NS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether submit_bio() wants 1 arg" >&5
+$as_echo_n "checking whether submit_bio() wants 1 arg... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               blk_qc_t blk_qc;
+               struct bio *bio = NULL;
+               blk_qc = submit_bio(bio);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_1ARG_SUBMIT_BIO 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bops->check_events() exists" >&5
+$as_echo_n "checking whether bops->check_events() exists... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+               unsigned int blk_check_events(struct gendisk *disk,
+                   unsigned int clearing) { return (0); }
+
+               static const struct block_device_operations
+                   bops __attribute__ ((unused)) = {
+                       .check_events   = blk_check_events,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bops->release() is void" >&5
+$as_echo_n "checking whether bops->release() is void... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+               void blk_release(struct gendisk *g, fmode_t mode) { return; }
+
+               static const struct block_device_operations
+                   bops __attribute__ ((unused)) = {
+                       .open           = NULL,
+                       .release        = blk_release,
+                       .ioctl          = NULL,
+                       .compat_ioctl   = NULL,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: void" >&5
+$as_echo "void" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: int" >&5
+$as_echo "int" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+       { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5
+$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/types.h>
+
+int
+main (void)
+{
+
+               fmode_t *ptr __attribute__ ((unused));
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODE_T 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5
+$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct block_device *bdev = NULL;
+               (void) blkdev_get(bdev, 0, NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_3ARG_BLKDEV_GET 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5
+$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               blkdev_get_by_path(NULL, 0, NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLKDEV_GET_BY_PATH 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5
+$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               open_bdev_exclusive(NULL, 0, NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPEN_BDEV_EXCLUSIVE 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 1 arg" >&5
+$as_echo_n "checking whether lookup_bdev() wants 1 arg... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               lookup_bdev(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 2 args" >&5
+$as_echo_n "checking whether lookup_bdev() wants 2 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/fs.h>
+
+int
+main (void)
+{
+
+                       lookup_bdev(NULL, FMODE_READ);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_LOOKUP_BDEV 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 2 args" >&5
+$as_echo_n "checking whether lookup_bdev() wants 2 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/fs.h>
+
+int
+main (void)
+{
+
+                       lookup_bdev(NULL, FMODE_READ);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_LOOKUP_BDEV 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_1ARG_LOOKUP_BDEV 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5
+$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/buffer_head.h>
+
+int
+main (void)
+{
+
+               struct block_device *bdev = NULL;
+               invalidate_bdev(bdev);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_1ARG_INVALIDATE_BDEV 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5
+$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct block_device *bdev = NULL;
+               bdev_logical_block_size(bdev);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bdev_physical_block_size() is available" >&5
+$as_echo_n "checking whether bdev_physical_block_size() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct block_device *bdev = NULL;
+               bdev_physical_block_size(bdev);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDEV_PHYSICAL_BLOCK_SIZE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bio has bi_iter" >&5
+$as_echo_n "checking whether bio has bi_iter... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               struct bio bio;
+               bio.bi_iter.bi_sector = 0;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_BVEC_ITER 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
+$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               int flags __attribute__ ((unused));
+               flags = ((1 << BIO_RW_FAILFAST_DEV) |
+                        (1 << BIO_RW_FAILFAST_TRANSPORT) |
+                        (1 << BIO_RW_FAILFAST_DRIVER));
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_RW_FAILFAST_DTD 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bio_set_dev() exists" >&5
+$as_echo_n "checking whether bio_set_dev() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct block_device *bdev = NULL;
+               struct bio *bio = NULL;
+               bio_set_dev(bio, bdev);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_SET_DEV 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5
+$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               int flags __attribute__ ((unused));
+               flags = REQ_FAILFAST_MASK;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_REQ_FAILFAST_MASK 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether REQ_OP_DISCARD is defined" >&5
+$as_echo_n "checking whether REQ_OP_DISCARD is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+               int op __attribute__ ((unused)) = REQ_OP_DISCARD;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_REQ_OP_DISCARD 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether REQ_OP_SECURE_ERASE is defined" >&5
+$as_echo_n "checking whether REQ_OP_SECURE_ERASE is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+               int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_REQ_OP_SECURE_ERASE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether REQ_OP_FLUSH is defined" >&5
+$as_echo_n "checking whether REQ_OP_FLUSH is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+               int op __attribute__ ((unused)) = REQ_OP_FLUSH;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_REQ_OP_FLUSH 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bio->bi_opf is defined" >&5
+$as_echo_n "checking whether bio->bi_opf is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               struct bio bio __attribute__ ((unused));
+               bio.bi_opf = 0;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_BI_OPF 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 1 arg" >&5
+$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+               void wanted_end_io(struct bio *bio) { return; }
+
+               bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_1ARG_BIO_END_IO_T 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bio->bi_status exists" >&5
+$as_echo_n "checking whether bio->bi_status exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               struct bio bio __attribute__ ((unused));
+               blk_status_t status __attribute__ ((unused)) = BLK_STS_OK;
+
+               bio.bi_status = status;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_BI_STATUS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_BARRIER is defined" >&5
+$as_echo_n "checking whether BIO_RW_BARRIER is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               int flags __attribute__ ((unused));
+               flags = BIO_RW_BARRIER;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_RW_BARRIER 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether BIO_RW_DISCARD is defined" >&5
+$as_echo_n "checking whether BIO_RW_DISCARD is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               int flags __attribute__ ((unused));
+               flags = BIO_RW_DISCARD;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_RW_DISCARD 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue bdi is dynamic" >&5
+$as_echo_n "checking whether blk_queue bdi is dynamic... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue q;
+               struct backing_dev_info bdi;
+               q.backing_dev_info = &bdi;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_BDI_DYNAMIC 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flag_clear() exists" >&5
+$as_echo_n "checking whether blk_queue_flag_clear() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/kernel.h>
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               blk_queue_flag_clear(0, q);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_FLAG_CLEAR 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flag_set() exists" >&5
+$as_echo_n "checking whether blk_queue_flag_set() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/kernel.h>
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               blk_queue_flag_set(0, q);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_FLAG_SET 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5
+$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               (void) blk_queue_flush(q, REQ_FLUSH);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_FLUSH 1
+_ACEOF
+
+
+               { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/module.h>
+                       #include <linux/blkdev.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+                       struct request_queue *q = NULL;
+                       (void) blk_queue_flush(q, REQ_FLUSH);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1
+_ACEOF
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+                                       { $as_echo "$as_me:$LINENO: checking whether blk_queue_write_cache() exists" >&5
+$as_echo_n "checking whether blk_queue_write_cache() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/kernel.h>
+               #include <linux/blkdev.h>
+
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               blk_queue_write_cache(q, true, true);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_WRITE_CACHE 1
+_ACEOF
+
+
+               { $as_echo "$as_me:$LINENO: checking whether blk_queue_write_cache() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_write_cache() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/kernel.h>
+                       #include <linux/module.h>
+                       #include <linux/blkdev.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+                       struct request_queue *q = NULL;
+                       blk_queue_write_cache(q, true, true);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY 1
+_ACEOF
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5
+$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+
+       { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5
+$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+
+       { $as_echo "$as_me:$LINENO: checking whether the BIO_RW_UNPLUG enum is available" >&5
+$as_echo_n "checking whether the BIO_RW_UNPLUG enum is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               extern enum bio_rw_flags rw;
+
+               rw = BIO_RW_UNPLUG;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_HAVE_BIO_RW_UNPLUG 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+
+       { $as_echo "$as_me:$LINENO: checking whether struct blk_plug is available" >&5
+$as_echo_n "checking whether struct blk_plug is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct blk_plug plug;
+
+               blk_start_plug(&plug);
+               blk_finish_plug(&plug);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_HAVE_BLK_PLUG 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+       { $as_echo "$as_me:$LINENO: checking whether get_disk_and_module() is available" >&5
+$as_echo_n "checking whether get_disk_and_module() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/genhd.h>
+
+int
+main (void)
+{
+
+               struct gendisk *disk = NULL;
+               (void) get_disk_and_module(disk);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]get_disk_and_module[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/genhd.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(get_disk_and_module)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_DISK_AND_MODULE 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5
+$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct gendisk *disk = NULL;
+               (void) get_disk_ro(disk);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_DISK_RO 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+       { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5
+$as_echo_n "checking whether get_gendisk() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/genhd.h>
+
+int
+main (void)
+{
+
+               get_gendisk(0, NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/genhd.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_GENDISK 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether bio_set_op_attrs is available" >&5
+$as_echo_n "checking whether bio_set_op_attrs is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               struct bio *bio __attribute__ ((unused)) = NULL;
+
+               bio_set_op_attrs(bio, 0, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BIO_SET_OP_ATTRS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether generic_readlink is global" >&5
+$as_echo_n "checking whether generic_readlink is global... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               int i __attribute__ ((unused));
+
+               i = generic_readlink(NULL, NULL, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_READLINK 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether ql->discard_granularity is available" >&5
+$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct queue_limits ql __attribute__ ((unused));
+
+               ql.discard_granularity = 0;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DISCARD_GRANULARITY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_handler" >&5
+$as_echo_n "checking whether super_block uses const struct xattr_handler... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/xattr.h>
+
+               const struct xattr_handler xattr_test_handler = {
+                       .prefix = "test",
+                       .get    = NULL,
+                       .set    = NULL,
+               };
+
+               const struct xattr_handler *xattr_handlers[] = {
+                       &xattr_test_handler,
+               };
+
+               const struct super_block sb __attribute__ ((unused)) = {
+                       .s_xattr = xattr_handlers,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CONST_XATTR_HANDLER 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether xattr_handler has name" >&5
+$as_echo_n "checking whether xattr_handler has name... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/xattr.h>
+
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .name = XATTR_NAME_POSIX_ACL_ACCESS,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_HANDLER_NAME 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+                                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants both dentry and inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/xattr.h>
+
+               int get(const struct xattr_handler *handler,
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, void *buffer, size_t size) { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .get = get,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_GET_DENTRY_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/xattr.h>
+
+                       int get(const struct xattr_handler *handler,
+                           struct dentry *dentry, const char *name,
+                           void *buffer, size_t size) { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .get = get,
+                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_GET_HANDLER 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                                                                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/xattr.h>
+
+                               int get(struct dentry *dentry, const char *name,
+                                   void *buffer, size_t size, int handler_flags)
+                                   { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .get = get,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_GET_DENTRY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                                       #include <linux/xattr.h>
+
+                                       int get(struct inode *ip, const char *name,
+                                           void *buffer, size_t size) { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .get = get,
+                                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_GET_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                       { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+                                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants both dentry and inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/xattr.h>
+
+               int set(const struct xattr_handler *handler,
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, const void *buffer,
+                   size_t size, int flags)
+                   { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .set = set,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_SET_DENTRY_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/xattr.h>
+
+                       int set(const struct xattr_handler *handler,
+                           struct dentry *dentry, const char *name,
+                           const void *buffer, size_t size, int flags)
+                           { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .set = set,
+                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_SET_HANDLER 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                                                                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/xattr.h>
+
+                               int set(struct dentry *dentry, const char *name,
+                                   const void *buffer, size_t size, int flags,
+                                   int handler_flags) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .set = set,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_SET_DENTRY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                                       #include <linux/xattr.h>
+
+                                       int set(struct inode *ip, const char *name,
+                                           const void *buffer, size_t size, int flags)
+                                           { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .set = set,
+                                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_SET_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                       { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants simple" >&5
+$as_echo_n "checking whether xattr_handler->list() wants simple... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/xattr.h>
+
+               bool list(struct dentry *dentry) { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .list = list,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_LIST_SIMPLE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->list() wants xattr_handler... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/xattr.h>
+
+                       size_t list(const struct xattr_handler *handler,
+                           struct dentry *dentry, char *list, size_t list_size,
+                           const char *name, size_t name_len) { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .list = list,
+                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_LIST_HANDLER 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                                                                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->list() wants dentry... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/xattr.h>
+
+                               size_t list(struct dentry *dentry,
+                                   char *list, size_t list_size,
+                                   const char *name, size_t name_len,
+                                   int handler_flags) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .list = list,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_LIST_DENTRY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                               { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->list() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                                       #include <linux/xattr.h>
+
+                                       size_t list(struct inode *ip, char *lst,
+                                           size_t list_size, const char *name,
+                                           size_t name_len) { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .list = list,
+                                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XATTR_LIST_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                       { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether inode_owner_or_capable() exists" >&5
+$as_echo_n "checking whether inode_owner_or_capable() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct inode *ip = NULL;
+               (void) inode_owner_or_capable(ip);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INODE_OWNER_OR_CAPABLE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether is_owner_or_cap() exists" >&5
+$as_echo_n "checking whether is_owner_or_cap() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/fs.h>
+                       #include <linux/sched.h>
+
+int
+main (void)
+{
+
+                       struct inode *ip = NULL;
+                       (void) is_owner_or_cap(ip);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IS_OWNER_OR_CAP 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" >&5
+$as_echo "$as_me: error: no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_from_xattr() needs user_ns" >&5
+$as_echo_n "checking whether posix_acl_from_xattr() needs user_ns... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl_xattr.h>
+
+int
+main (void)
+{
+
+               posix_acl_from_xattr(&init_user_ns, NULL, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_FROM_XATTR_USERNS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_release() is available" >&5
+$as_echo_n "checking whether posix_acl_release() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
+int
+main (void)
+{
+
+               struct posix_acl* tmp = posix_acl_alloc(1, 0);
+               posix_acl_release(tmp);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_RELEASE 1
+_ACEOF
+
+
+               { $as_echo "$as_me:$LINENO: checking whether posix_acl_release() is GPL-only" >&5
+$as_echo_n "checking whether posix_acl_release() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/module.h>
+                       #include <linux/cred.h>
+                       #include <linux/fs.h>
+                       #include <linux/posix_acl.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+                       struct posix_acl* tmp = posix_acl_alloc(1, 0);
+                       posix_acl_release(tmp);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_RELEASE_GPL_ONLY 1
+_ACEOF
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether set_cached_acl() is usable" >&5
+$as_echo_n "checking whether set_cached_acl() is usable... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/module.h>
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
+               MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+               struct inode *ip = NULL;
+               struct posix_acl *acl = posix_acl_alloc(1, 0);
+               set_cached_acl(ip, ACL_TYPE_ACCESS, acl);
+               forget_cached_acl(ip, ACL_TYPE_ACCESS);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_CACHED_ACL_USABLE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_chmod exists" >&5
+$as_echo_n "checking whether posix_acl_chmod exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
+int
+main (void)
+{
+
+               posix_acl_chmod(NULL, 0, 0)
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_CHMOD 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether __posix_acl_chmod exists" >&5
+$as_echo_n "checking whether __posix_acl_chmod exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
+int
+main (void)
+{
+
+               __posix_acl_chmod(NULL, 0, 0)
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___POSIX_ACL_CHMOD 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_equiv_mode() wants umode_t" >&5
+$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
+int
+main (void)
+{
+
+               umode_t tmp;
+               posix_acl_equiv_mode(NULL,&tmp);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl_valid() wants user namespace" >&5
+$as_echo_n "checking whether posix_acl_valid() wants user namespace... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
+
+int
+main (void)
+{
+
+               struct user_namespace *user_ns = NULL;
+               const struct posix_acl *acl = NULL;
+               int error;
+
+               error = posix_acl_valid(user_ns, acl);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_ACL_VALID_WITH_NS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->permission() exists" >&5
+$as_echo_n "checking whether iops->permission() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int permission_fn(struct inode *inode, int mask) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .permission = permission_fn,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PERMISSION 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->permission() wants nameidata" >&5
+$as_echo_n "checking whether iops->permission() wants nameidata... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/sched.h>
+
+               int permission_fn(struct inode *inode, int mask,
+                   struct nameidata *nd) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .permission = permission_fn,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PERMISSION 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PERMISSION_WITH_NAMEIDATA 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->check_acl() exists" >&5
+$as_echo_n "checking whether iops->check_acl() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int check_acl_fn(struct inode *inode, int mask) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .check_acl = check_acl_fn,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_ACL 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->check_acl() wants flags" >&5
+$as_echo_n "checking whether iops->check_acl() wants flags... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int check_acl_fn(struct inode *inode, int mask,
+                   unsigned int flags) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .check_acl = check_acl_fn,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_ACL 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_ACL_WITH_FLAGS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->get_acl() exists" >&5
+$as_echo_n "checking whether iops->get_acl() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               struct posix_acl *get_acl_fn(struct inode *inode, int type)
+                   { return NULL; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .get_acl = get_acl_fn,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_ACL 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->set_acl() exists" >&5
+$as_echo_n "checking whether iops->set_acl() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int set_acl_fn(struct inode *inode, struct posix_acl *acl, int type)
+                   { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .set_acl = set_acl_fn,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_ACL 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->getattr() takes a path" >&5
+$as_echo_n "checking whether iops->getattr() takes a path... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int test_getattr(
+                   const struct path *p, struct kstat *k,
+                   u32 request_mask, unsigned int query_flags)
+                   { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .getattr = test_getattr,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PATH_IOPS_GETATTR 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->getattr() takes a vfsmount" >&5
+$as_echo_n "checking whether iops->getattr() takes a vfsmount... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int test_getattr(
+                   struct vfsmount *mnt, struct dentry *d,
+                   struct kstat *k)
+                   { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .getattr = test_getattr,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFSMOUNT_IOPS_GETATTR 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether inode_set_flags() exists" >&5
+$as_echo_n "checking whether inode_set_flags() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct inode inode;
+               inode_set_flags(&inode, S_IMMUTABLE, S_IMMUTABLE);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INODE_SET_FLAGS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether inode_set_iversion() exists" >&5
+$as_echo_n "checking whether inode_set_iversion() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/iversion.h>
+
+int
+main (void)
+{
+
+               struct inode inode;
+               inode_set_iversion(&inode, 1);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INODE_SET_IVERSION 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether uncached_acl_sentinel() exists" >&5
+$as_echo_n "checking whether uncached_acl_sentinel() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERNEL_GET_ACL_HANDLE_CACHE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5
+$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int show_options (struct seq_file * x, struct dentry * y) { return 0; };
+               static struct super_operations sops __attribute__ ((unused)) = {
+                       .show_options = show_options,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether file_inode() is available" >&5
+$as_echo_n "checking whether file_inode() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct file *f = NULL;
+               file_inode(f);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FILE_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether file_dentry() is available" >&5
+$as_echo_n "checking whether file_dentry() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct file *f = NULL;
+               file_dentry(f);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FILE_DENTRY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5
+$as_echo_n "checking whether fops->fsync() wants... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int test_fsync(struct file *f, struct dentry *dentry, int x)
+                   { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: dentry" >&5
+$as_echo "dentry" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSYNC_WITH_DENTRY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int test_fsync(struct file *f, int x) { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: no dentry" >&5
+$as_echo "no dentry" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSYNC_WITHOUT_DENTRY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int test_fsync(struct file *f, loff_t a, loff_t b, int c)
+                   { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: range" >&5
+$as_echo "range" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSYNC_RANGE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5
+$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               void evict_inode (struct inode * t) { return; }
+               static struct super_operations sops __attribute__ ((unused)) = {
+                       .evict_inode = evict_inode,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EVICT_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether sops->dirty_inode() wants flags" >&5
+$as_echo_n "checking whether sops->dirty_inode() wants flags... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               void dirty_inode(struct inode *a, int b) { return; }
+
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .dirty_inode = dirty_inode,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIRTY_INODE_WITH_FLAGS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5
+$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int nr_cached_objects(struct super_block *sb) { return 0; }
+
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .nr_cached_objects = nr_cached_objects,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NR_CACHED_OBJECTS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5
+$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               void free_cached_objects(struct super_block *sb, int x)
+                   { return; }
+
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .free_cached_objects = free_cached_objects,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREE_CACHED_OBJECTS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5
+$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               long test_fallocate(struct file *file, int mode,
+                   loff_t offset, loff_t len) { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fallocate = test_fallocate,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FILE_FALLOCATE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5
+$as_echo_n "checking whether iops->fallocate() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               long test_fallocate(struct inode *inode, int mode,
+                   loff_t offset, loff_t len) { return 0; }
+
+               static const struct inode_operations
+                   fops __attribute__ ((unused)) = {
+                       .fallocate = test_fallocate,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INODE_FALLOCATE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether fops->aio_fsync() exists" >&5
+$as_echo_n "checking whether fops->aio_fsync() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .aio_fsync = NULL,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FILE_AIO_FSYNC 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5
+$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int mkdir(struct inode *inode, struct dentry *dentry,
+                   umode_t umode) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .mkdir = mkdir,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MKDIR_UMODE_T 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->lookup() passes nameidata" >&5
+$as_echo_n "checking whether iops->lookup() passes nameidata... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/sched.h>
+
+               struct dentry *inode_lookup(struct inode *inode,
+                   struct dentry *dentry, struct nameidata *nidata)
+                   { return NULL; }
+
+               static const struct inode_operations iops
+                   __attribute__ ((unused)) = {
+                       .lookup = inode_lookup,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOOKUP_NAMEIDATA 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->create() passes nameidata" >&5
+$as_echo_n "checking whether iops->create() passes nameidata... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/sched.h>
+
+               #ifdef HAVE_MKDIR_UMODE_T
+               int inode_create(struct inode *inode ,struct dentry *dentry,
+                   umode_t umode, struct nameidata *nidata) { return 0; }
+               #else
+               int inode_create(struct inode *inode,struct dentry *dentry,
+                   int umode, struct nameidata * nidata) { return 0; }
+               #endif
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .create         = inode_create,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CREATE_NAMEIDATA 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+                                               { $as_echo "$as_me:$LINENO: checking whether iops->get_link() passes delayed" >&5
+$as_echo_n "checking whether iops->get_link() passes delayed... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               const char *get_link(struct dentry *de, struct inode *ip,
+                   struct delayed_call *done) { return "symlink"; }
+               static struct inode_operations
+                    iops __attribute__ ((unused)) = {
+                       .get_link = get_link,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_LINK_DELAYED 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether iops->get_link() passes cookie" >&5
+$as_echo_n "checking whether iops->get_link() passes cookie... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/fs.h>
+                       const char *get_link(struct dentry *de, struct
+                           inode *ip, void **cookie) { return "symlink"; }
+                       static struct inode_operations
+                            iops __attribute__ ((unused)) = {
+                               .get_link = get_link,
+                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GET_LINK_COOKIE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+                                       { $as_echo "$as_me:$LINENO: checking whether iops->follow_link() passes cookie" >&5
+$as_echo_n "checking whether iops->follow_link() passes cookie... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               const char *follow_link(struct dentry *de,
+                   void **cookie) { return "symlink"; }
+               static struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .follow_link = follow_link,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FOLLOW_LINK_COOKIE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether iops->follow_link() passes nameidata" >&5
+$as_echo_n "checking whether iops->follow_link() passes nameidata... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+                       void *follow_link(struct dentry *de, struct
+                           nameidata *nd) { return (void *)NULL; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .follow_link = follow_link,
+                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FOLLOW_LINK_NAMEIDATA 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #if !defined(HAVE_GET_LINK_DELAYED)
+               #error "Expecting get_link() delayed done"
+               #endif
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PUT_LINK_DELAYED 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                               { $as_echo "$as_me:$LINENO: checking whether iops->put_link() passes cookie" >&5
+$as_echo_n "checking whether iops->put_link() passes cookie... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/fs.h>
+                       void put_link(struct inode *ip, void *cookie)
+                           { return; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .put_link = put_link,
+                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PUT_LINK_COOKIE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether iops->put_link() passes nameidata" >&5
+$as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/fs.h>
+                               void put_link(struct dentry *de, struct
+                                   nameidata *nd, void *ptr) { return; }
+                               static struct inode_operations
+                                   iops __attribute__ ((unused)) = {
+                                       .put_link = put_link,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PUT_LINK_NAMEIDATA 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                               { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
+$as_echo "$as_me: error: no; please file a bug report" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether i_op->tmpfile() exists" >&5
+$as_echo_n "checking whether i_op->tmpfile() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               int tmpfile(struct inode *inode, struct dentry *dentry,
+                   umode_t mode) { return 0; }
+               static struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .tmpfile = tmpfile,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TMPFILE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5
+$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               void truncate_range(struct inode *inode, loff_t start,
+                                   loff_t end) { return; }
+               static struct inode_operations iops __attribute__ ((unused)) = {
+                       .truncate_range = truncate_range,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INODE_TRUNCATE_RANGE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5
+$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+               struct vfsmount *d_automount(struct path *p) { return NULL; }
+               struct dentry_operations dops __attribute__ ((unused)) = {
+                       .d_automount = d_automount,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AUTOMOUNT 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5
+$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/exportfs.h>
+               int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
+                             struct inode *parent) { return 0; }
+               static struct export_operations eops __attribute__ ((unused))={
+                       .encode_fh = encode_fh,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENCODE_FH_WITH_INODE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether eops->commit_metadata() exists" >&5
+$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/exportfs.h>
+               int commit_metadata(struct inode *inode) { return 0; }
+               static struct export_operations eops __attribute__ ((unused))={
+                       .commit_metadata = commit_metadata,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_COMMIT_METADATA 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5
+$as_echo_n "checking whether clear_inode() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               clear_inode(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CLEAR_INODE 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether setattr_prepare() is available" >&5
+$as_echo_n "checking whether setattr_prepare() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct dentry *dentry = NULL;
+               struct iattr *attr = NULL;
+               int error;
+
+               error = setattr_prepare(dentry, attr);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/attr.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(setattr_prepare)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SETATTR_PREPARE 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5
+$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               insert_inode_locked(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INSERT_INODE_LOCKED 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5
+$as_echo_n "checking whether d_make_root() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+
+int
+main (void)
+{
+
+               d_make_root(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_make_root[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_MAKE_ROOT 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5
+$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+
+int
+main (void)
+{
+
+               d_obtain_alias(NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_OBTAIN_ALIAS 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether d_prune_aliases() is available" >&5
+$as_echo_n "checking whether d_prune_aliases() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+
+int
+main (void)
+{
+
+               struct inode *ip = NULL;
+               d_prune_aliases(ip);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_prune_aliases[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_prune_aliases)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_PRUNE_ALIASES 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       { $as_echo "$as_me:$LINENO: checking whether d_set_d_op() is available" >&5
+$as_echo_n "checking whether d_set_d_op() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+
+int
+main (void)
+{
+
+               d_set_d_op(NULL, NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]d_set_d_op[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_set_d_op)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_SET_D_OP 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether dops->d_revalidate() takes struct nameidata" >&5
+$as_echo_n "checking whether dops->d_revalidate() takes struct nameidata... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+               #include <linux/sched.h>
+
+               int revalidate (struct dentry *dentry,
+                   struct nameidata *nidata) { return 0; }
+
+               static const struct dentry_operations
+                   dops __attribute__ ((unused)) = {
+                       .d_revalidate   = revalidate,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_REVALIDATE_NAMEIDATA 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether dentry uses const struct dentry_operations" >&5
+$as_echo_n "checking whether dentry uses const struct dentry_operations... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/dcache.h>
+
+               const struct dentry_operations test_d_op = {
+                       .d_revalidate = NULL,
+               };
+
+int
+main (void)
+{
+
+               struct dentry d __attribute__ ((unused));
+
+               d.d_op = &test_d_op;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CONST_DENTRY_OPERATIONS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5
+$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/mm.h>
+
+int
+main (void)
+{
+
+               truncate_setsize(NULL, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/truncate.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TRUNCATE_SETSIZE 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5
+$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/security.h>
+
+int
+main (void)
+{
+
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               struct inode *dip __attribute__ ((unused)) = NULL;
+               const struct qstr *str __attribute__ ((unused)) = NULL;
+               char *name __attribute__ ((unused)) = NULL;
+               void *value __attribute__ ((unused)) = NULL;
+               size_t len __attribute__ ((unused)) = 0;
+
+               security_inode_init_security(ip, dip, str, &name, &value, &len);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5
+$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/security.h>
+
+int
+main (void)
+{
+
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               struct inode *dip __attribute__ ((unused)) = NULL;
+               const struct qstr *str __attribute__ ((unused)) = NULL;
+               initxattrs func __attribute__ ((unused)) = NULL;
+
+               security_inode_init_security(ip, dip, str, func, NULL);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+        { $as_echo "$as_me:$LINENO: checking whether fst->mount() exists" >&5
+$as_echo_n "checking whether fst->mount() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                #include <linux/fs.h>
+
+                static struct dentry *
+                mount(struct file_system_type *fs_type, int flags,
+                    const char *osname, void *data) {
+                        struct dentry *d = NULL;
+                        return (d);
+                }
+
+                static struct file_system_type fst __attribute__ ((unused)) = {
+                        .mount = mount,
+                };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FST_MOUNT 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5
+$as_echo_n "checking whether super_block has s_shrink... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               int shrink(struct shrinker *s, struct shrink_control *sc)
+                   { return 0; }
+
+               static const struct super_block
+                   sb __attribute__ ((unused)) = {
+                       .s_shrink.shrink = shrink,
+                       .s_shrink.seeks = DEFAULT_SEEKS,
+                       .s_shrink.batch = 0,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK 1
+_ACEOF
+
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether shrink_control has nid" >&5
+$as_echo_n "checking whether shrink_control has nid... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct shrink_control sc __attribute__ ((unused));
+               unsigned long scnidsize __attribute__ ((unused)) =
+                   sizeof(sc.nid);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define SHRINK_CONTROL_HAS_NID 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether super_block has s_instances list_head" >&5
+$as_echo_n "checking whether super_block has s_instances list_head... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct super_block sb __attribute__ ((unused));
+
+               INIT_LIST_HEAD(&sb.s_instances);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_INSTANCES_LIST_HEAD 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether super_block has s_d_op" >&5
+$as_echo_n "checking whether super_block has s_d_op... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct super_block sb __attribute__ ((unused));
+               sb.s_d_op = NULL;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_S_D_OP 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether super_setup_bdi_name() exists" >&5
+$as_echo_n "checking whether super_setup_bdi_name() exists... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               struct super_block sb;
+
+int
+main (void)
+{
+
+               char *name = "bdi";
+               atomic_long_t zfs_bdi_seq;
+               int error __attribute__((unused)) =
+                   super_setup_bdi_name(&sb, "%.28s-%ld", name, atomic_long_inc_return(&zfs_bdi_seq));
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 2 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/backing-dev.h>
+                       struct backing_dev_info bdi;
+
+int
+main (void)
+{
+
+                       char *name = "bdi";
+                       int error __attribute__((unused)) =
+                           bdi_setup_and_register(&bdi, name);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/backing-dev.h>
+                               struct backing_dev_info bdi;
+
+int
+main (void)
+{
+
+                               char *name = "bdi";
+                               unsigned int cap = BDI_CAP_MAP_COPY;
+                               int error __attribute__((unused)) =
+                                   bdi_setup_and_register(&bdi, name, cap);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/backing-dev.h>
+                               struct backing_dev_info bdi;
+
+int
+main (void)
+{
+
+                               char *name = "bdi";
+                               unsigned int cap = BDI_CAP_MAP_COPY;
+                               int error __attribute__((unused)) =
+                                   bdi_setup_and_register(&bdi, name, cap);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+               else :
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]super_setup_bdi_name[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/super.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(super_setup_bdi_name)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 2 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/backing-dev.h>
+                       struct backing_dev_info bdi;
+
+int
+main (void)
+{
+
+                       char *name = "bdi";
+                       int error __attribute__((unused)) =
+                           bdi_setup_and_register(&bdi, name);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/backing-dev.h>
+                               struct backing_dev_info bdi;
+
+int
+main (void)
+{
+
+                               char *name = "bdi";
+                               unsigned int cap = BDI_CAP_MAP_COPY;
+                               int error __attribute__((unused)) =
+                                   bdi_setup_and_register(&bdi, name, cap);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/backing-dev.h>
+                               struct backing_dev_info bdi;
+
+int
+main (void)
+{
+
+                               char *name = "bdi";
+                               unsigned int cap = BDI_CAP_MAP_COPY;
+                               int error __attribute__((unused)) =
+                                   bdi_setup_and_register(&bdi, name, cap);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+               else :
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SUPER_SETUP_BDI_NAME 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5
+$as_echo_n "checking whether set_nlink() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct inode node;
+               unsigned int link = 0;
+               (void) set_nlink(&node, link);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_NLINK 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether elevator_change() is available" >&5
+$as_echo_n "checking whether elevator_change() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+               #include <linux/elevator.h>
+
+int
+main (void)
+{
+
+               int ret;
+               struct request_queue *q = NULL;
+               char *elevator = NULL;
+               ret = elevator_change(q, elevator);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ELEVATOR_CHANGE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+       { $as_echo "$as_me:$LINENO: checking whether sget() wants 5 args" >&5
+$as_echo_n "checking whether sget() wants 5 args... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct file_system_type *type = NULL;
+               int (*test)(struct super_block *,void *) = NULL;
+               int (*set)(struct super_block *,void *) = NULL;
+               int flags = 0;
+               void *data = NULL;
+               (void) sget(type, test, set, flags, data);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_5ARG_SGET 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether lseek_execute() is available" >&5
+$as_echo_n "checking whether lseek_execute() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct file *fp __attribute__ ((unused)) = NULL;
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               loff_t offset __attribute__ ((unused)) = 0;
+               loff_t maxsize __attribute__ ((unused)) = 0;
+
+               lseek_execute(fp, ip, offset, maxsize);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lseek_exclusive[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/read_write.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lseek_exclusive)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LSEEK_EXECUTE 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+                               { $as_echo "$as_me:$LINENO: checking whether fops->iterate_shared() is available" >&5
+$as_echo_n "checking whether fops->iterate_shared() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               int iterate(struct file *filp, struct dir_context * context)
+                   { return 0; }
+
+               static const struct file_operations fops
+                   __attribute__ ((unused)) = {
+                       .iterate_shared  = iterate,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFS_ITERATE_SHARED 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+                                                                                                                                                                               { $as_echo "$as_me:$LINENO: checking whether fops->iterate() is available" >&5
+$as_echo_n "checking whether fops->iterate() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/fs.h>
+                       int iterate(struct file *filp,
+                           struct dir_context *context) { return 0; }
+
+                       static const struct file_operations fops
+                           __attribute__ ((unused)) = {
+                               .iterate         = iterate,
+                       };
+
+                       #if defined(FMODE_KABI_ITERATE)
+                       #error "RHEL 7.5, FMODE_KABI_ITERATE interface"
+                       #endif
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFS_ITERATE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+                       { $as_echo "$as_me:$LINENO: checking whether fops->readdir() is available" >&5
+$as_echo_n "checking whether fops->readdir() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/fs.h>
+                               int readdir(struct file *filp, void *entry,
+                                   filldir_t func) { return 0; }
+
+                               static const struct file_operations fops
+                                   __attribute__ ((unused)) = {
+                                       .readdir = readdir,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFS_READDIR 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                               { { $as_echo "$as_me:$LINENO: error: no; file a bug report with ZoL" >&5
+$as_echo "$as_me: error: no; file a bug report with ZoL" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether fops->read/write_iter() are available" >&5
+$as_echo_n "checking whether fops->read/write_iter() are available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+               ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
+                   { return 0; }
+               ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
+                   { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                   .read_iter = test_read,
+                   .write_iter = test_write,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFS_RW_ITERATE 1
+_ACEOF
+
+
+               { $as_echo "$as_me:$LINENO: checking whether new_sync_read/write() are available" >&5
+$as_echo_n "checking whether new_sync_read/write() are available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+                       ssize_t ret __attribute__ ((unused));
+                       struct file *filp = NULL;
+                       char __user *rbuf = NULL;
+                       const char __user *wbuf = NULL;
+                       size_t len = 0;
+                       loff_t ppos;
+
+                       ret = new_sync_read(filp, rbuf, len, &ppos);
+                       ret = new_sync_write(filp, wbuf, len, &ppos);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NEW_SYNC_READ 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether generic_write_checks() takes kiocb" >&5
+$as_echo_n "checking whether generic_write_checks() takes kiocb... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+
+int
+main (void)
+{
+
+               struct kiocb *iocb = NULL;
+               struct iov_iter *iov = NULL;
+               generic_write_checks(iocb, iov);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_WRITE_CHECKS_KIOCB 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether kmap_atomic wants 1 args" >&5
+$as_echo_n "checking whether kmap_atomic wants 1 args... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/pagemap.h>
+
+int
+main (void)
+{
+
+               struct page page;
+               kmap_atomic(&page);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_1ARG_KMAP_ATOMIC 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether follow_down_one() is available" >&5
+$as_echo_n "checking whether follow_down_one() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/namei.h>
+
+int
+main (void)
+{
+
+               struct path *p = NULL;
+               follow_down_one(p);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FOLLOW_DOWN_ONE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns int" >&5
+$as_echo_n "checking whether make_request_fn() returns int... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/blkdev.h>
+
+               int make_request(struct request_queue *q, struct bio *bio)
+               {
+                       return (0);
+               }
+
+int
+main (void)
+{
+
+               blk_queue_make_request(NULL, &make_request);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define MAKE_REQUEST_FN_RET int
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MAKE_REQUEST_FN_RET_INT 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns void" >&5
+$as_echo_n "checking whether make_request_fn() returns void... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                       #include <linux/blkdev.h>
+
+                       void make_request(struct request_queue *q, struct bio *bio)
+                       {
+                               return;
+                       }
+
+int
+main (void)
+{
+
+                       blk_queue_make_request(NULL, &make_request);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define MAKE_REQUEST_FN_RET void
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns blk_qc_t" >&5
+$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+                               #include <linux/blkdev.h>
+
+                               blk_qc_t make_request(struct request_queue *q, struct bio *bio)
+                               {
+                                       return (BLK_QC_T_NONE);
+                               }
+
+int
+main (void)
+{
+
+                               blk_queue_make_request(NULL, &make_request);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+                               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define MAKE_REQUEST_FN_RET blk_qc_t
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MAKE_REQUEST_FN_RET_QC 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                               { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
+                                   https://github.com/zfsonlinux/zfs/issues/new" >&5
+$as_echo "$as_me: error: no - Please file a bug report at
+                                   https://github.com/zfsonlinux/zfs/issues/new" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether 3 arg generic IO accounting symbols are available" >&5
+$as_echo_n "checking whether 3 arg generic IO accounting symbols are available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+               void (*generic_start_io_acct_f)(int, unsigned long,
+                   struct hd_struct *) = &generic_start_io_acct;
+               void (*generic_end_io_acct_f)(int, struct hd_struct *,
+                   unsigned long) = &generic_end_io_acct;
+
+int
+main (void)
+{
+
+               generic_start_io_acct(0, 0, NULL);
+               generic_end_io_acct(0, NULL, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/bio.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(generic_start_io_acct)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_IO_ACCT_3ARG 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether 4 arg generic IO accounting symbols are available" >&5
+$as_echo_n "checking whether 4 arg generic IO accounting symbols are available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/bio.h>
+
+               void (*generic_start_io_acct_f)(struct request_queue *, int,
+                   unsigned long, struct hd_struct *) = &generic_start_io_acct;
+               void (*generic_end_io_acct_f)(struct request_queue *, int,
+                   struct hd_struct *, unsigned long) = &generic_end_io_acct;
+
+int
+main (void)
+{
+
+               generic_start_io_acct(NULL, 0, 0, NULL);
+               generic_end_io_acct(NULL, 0, NULL, 0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/bio.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(generic_start_io_acct)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_IO_ACCT_4ARG 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether asm/fpu/api.h exists" >&5
+$as_echo_n "checking whether asm/fpu/api.h exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/kernel.h>
+               #include <asm/fpu/api.h>
+
+int
+main (void)
+{
+
+               __kernel_fpu_begin();
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FPU_API_H 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether i_(uid|gid)_(read|write) exist" >&5
+$as_echo_n "checking whether i_(uid|gid)_(read|write) exist... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct inode *ip = NULL;
+               (void) i_uid_read(ip);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KUID_HELPERS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether module_param_call() is hardened" >&5
+$as_echo_n "checking whether module_param_call() is hardened... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/module.h>
+               #include <linux/moduleparam.h>
+
+               int param_get(char *b, const struct kernel_param *kp)
+               {
+                       return (0);
+               }
+
+               int param_set(const char *b, const struct kernel_param *kp)
+               {
+                       return (0);
+               }
+
+               module_param_call(p, param_set, param_get, NULL, 0644);
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define MODULE_PARAM_CALL_CONST 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether iops->rename() wants flags" >&5
+$as_echo_n "checking whether iops->rename() wants flags... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               int rename_fn(struct inode *sip, struct dentry *sdp,
+                       struct inode *tip, struct dentry *tdp,
+                       unsigned int flags) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .rename = rename_fn,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RENAME_WANTS_FLAGS 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether generic_setxattr() exists" >&5
+$as_echo_n "checking whether generic_setxattr() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+               #include <linux/xattr.h>
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .setxattr = generic_setxattr
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_SETXATTR 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether current_time() exists" >&5
+$as_echo_n "checking whether current_time() exists... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/fs.h>
+
+int
+main (void)
+{
+
+               struct inode ip __attribute__ ((unused));
+               ip.i_atime = current_time(&ip);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+
+       rm -Rf build
+
+
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]current_time[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(current_time)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CURRENT_TIME 1
+_ACEOF
+
+
+               fi
+       fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether global_node_page_state() exists" >&5
+$as_echo_n "checking whether global_node_page_state() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/mm.h>
+               #include <linux/vmstat.h>
+
+int
+main (void)
+{
+
+               (void) global_node_page_state(0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_GLOBAL_NODE_PAGE_STATE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether global_zone_page_state() exists" >&5
+$as_echo_n "checking whether global_zone_page_state() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+               #include <linux/mm.h>
+               #include <linux/vmstat.h>
+
+int
+main (void)
+{
+
+               (void) global_zone_page_state(0);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_GLOBAL_ZONE_PAGE_STATE 1
+_ACEOF
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum node_stat_item contains NR_FILE_PAGES" >&5
+$as_echo_n "checking whether enum node_stat_item contains NR_FILE_PAGES... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "node_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_FILE_PAGES'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES 1
+_ACEOF
+
+               ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum node_stat_item contains NR_INACTIVE_ANON" >&5
+$as_echo_n "checking whether enum node_stat_item contains NR_INACTIVE_ANON... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "node_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_INACTIVE_ANON'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON 1
+_ACEOF
+
+               ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum node_stat_item contains NR_INACTIVE_FILE" >&5
+$as_echo_n "checking whether enum node_stat_item contains NR_INACTIVE_FILE... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "node_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_INACTIVE_FILE'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE 1
+_ACEOF
+
+               ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum node_stat_item contains NR_SLAB_RECLAIMABLE" >&5
+$as_echo_n "checking whether enum node_stat_item contains NR_SLAB_RECLAIMABLE... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "node_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_SLAB_RECLAIMABLE'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_NODE_STAT_ITEM_NR_SLAB_RECLAIMABLE 1
+_ACEOF
+
+               ZFS_ENUM_NODE_STAT_ITEM_NR_SLAB_RECLAIMABLE=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum zone_stat_item contains NR_FILE_PAGES" >&5
+$as_echo_n "checking whether enum zone_stat_item contains NR_FILE_PAGES... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "zone_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_FILE_PAGES'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES 1
+_ACEOF
+
+               ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum zone_stat_item contains NR_INACTIVE_ANON" >&5
+$as_echo_n "checking whether enum zone_stat_item contains NR_INACTIVE_ANON... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "zone_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_INACTIVE_ANON'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1
+_ACEOF
+
+               ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum zone_stat_item contains NR_INACTIVE_FILE" >&5
+$as_echo_n "checking whether enum zone_stat_item contains NR_INACTIVE_FILE... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "zone_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_INACTIVE_FILE'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1
+_ACEOF
+
+               ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether enum zone_stat_item contains NR_SLAB_RECLAIMABLE" >&5
+$as_echo_n "checking whether enum zone_stat_item contains NR_SLAB_RECLAIMABLE... " >&6; }
+       if { ac_try='"${srcdir}/scripts/enum-extract.pl" "zone_stat_item" "$LINUX/include/linux/mmzone.h" | egrep -qx NR_SLAB_RECLAIMABLE'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define ZFS_ENUM_ZONE_STAT_ITEM_NR_SLAB_RECLAIMABLE 1
+_ACEOF
+
+               ZFS_ENUM_ZONE_STAT_ITEM_NR_SLAB_RECLAIMABLE=1
+
+else
+
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking global_page_state enums are sane" >&5
+$as_echo_n "checking global_page_state enums are sane... " >&6; }
+
+
+       enum_check_a="$ZFS_ENUM_NODE_STAT_ITEM_NR_FILE_PAGES"
+       enum_check_b="$ZFS_ENUM_ZONE_STAT_ITEM_NR_FILE_PAGES"
+       if test -n "$enum_check_a" -a -n "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_FILE_PAGES in either node_stat_item or zone_stat_item: DUPLICATE" >&5
+$as_echo "NR_FILE_PAGES in either node_stat_item or zone_stat_item: DUPLICATE" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+       if test -z "$enum_check_a" -a -z "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_FILE_PAGES in either node_stat_item or zone_stat_item: NOT FOUND" >&5
+$as_echo "NR_FILE_PAGES in either node_stat_item or zone_stat_item: NOT FOUND" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+
+
+       enum_check_a="$ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_ANON"
+       enum_check_b="$ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_ANON"
+       if test -n "$enum_check_a" -a -n "$enum_check_b"; then
+
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_INACTIVE_ANON in either node_stat_item or zone_stat_item: DUPLICATE" >&5
+$as_echo "NR_INACTIVE_ANON in either node_stat_item or zone_stat_item: DUPLICATE" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+
+fi
+
+       if test -z "$enum_check_a" -a -z "$enum_check_b"; then
+
 
-                               if (blkid_get_cache(&cache, NULL) < 0)
-                                       return 1;
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_INACTIVE_ANON in either node_stat_item or zone_stat_item: NOT FOUND" >&5
+$as_echo "NR_INACTIVE_ANON in either node_stat_item or zone_stat_item: NOT FOUND" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 
-                               value = blkid_get_tag_value(cache, "TYPE",
-                                                           "$ZFS_DEV");
-                               if (!value) {
-                                       blkid_put_cache(cache);
-                                       return 2;
-                               }
 
-                               if (strcmp(value, "zfs")) {
-                                       free(value);
-                                       blkid_put_cache(cache);
-                                       return 3;
-                               }
+fi
 
-                               free(value);
-                               blkid_put_cache(cache);
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-                               rm -f $ZFS_DEV
-                               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-                               LIBBLKID="-lblkid"
+       enum_check_a="$ZFS_ENUM_NODE_STAT_ITEM_NR_INACTIVE_FILE"
+       enum_check_b="$ZFS_ENUM_ZONE_STAT_ITEM_NR_INACTIVE_FILE"
+       if test -n "$enum_check_a" -a -n "$enum_check_b"; then
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBBLKID 1
-_ACEOF
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_INACTIVE_FILE in either node_stat_item or zone_stat_item: DUPLICATE" >&5
+$as_echo "NR_INACTIVE_FILE in either node_stat_item or zone_stat_item: DUPLICATE" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 
 
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
 
-( exit $ac_status )
+       if test -z "$enum_check_a" -a -z "$enum_check_b"; then
 
-                               rm -f $ZFS_DEV
-                               { $as_echo "$as_me:$LINENO: result: no" >&5
+
+       { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-                               if test "x$with_blkid" != xcheck; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+       { $as_echo "$as_me:$LINENO: result: NR_INACTIVE_FILE in either node_stat_item or zone_stat_item: NOT FOUND" >&5
+$as_echo "NR_INACTIVE_FILE in either node_stat_item or zone_stat_item: NOT FOUND" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-blkid given but unavailable
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }; }
-fi
 
 
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 
-                       LDFLAGS="$saved_LDFLAGS"
+       enum_check_a="$ZFS_ENUM_NODE_STAT_ITEM_NR_SLAB_RECLAIMABLE"
+       enum_check_b="$ZFS_ENUM_ZONE_STAT_ITEM_NR_SLAB_RECLAIMABLE"
+       if test -n "$enum_check_a" -a -n "$enum_check_b"; then
 
-else
 
-                       if test "x$with_blkid" != xcheck; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_SLAB_RECLAIMABLE in either node_stat_item or zone_stat_item: DUPLICATE" >&5
+$as_echo "NR_SLAB_RECLAIMABLE in either node_stat_item or zone_stat_item: DUPLICATE" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-blkid given but unavailable
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }; }
+
+
 fi
 
+       if test -z "$enum_check_a" -a -z "$enum_check_b"; then
 
 
-fi
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: result: NR_SLAB_RECLAIMABLE in either node_stat_item or zone_stat_item: NOT FOUND" >&5
+$as_echo "NR_SLAB_RECLAIMABLE in either node_stat_item or zone_stat_item: NOT FOUND" >&6; }
+       { $as_echo "$as_me:$LINENO: result: configure needs updating, see: config/kernel-global_page_state.m4" >&5
+$as_echo "configure needs updating, see: config/kernel-global_page_state.m4" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SHUT 'ER DOWN CLANCY, SHE'S PUMPIN' MUD!
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 
 
 fi
 
 
 
+       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-# Check whether --with-selinux was given.
-if test "${with_selinux+set}" = set; then
-  withval=$with_selinux;
-else
-  with_selinux=check
-fi
 
 
-       LIBSELINUX=
-       if test "x$with_selinux" != xno; then
+       { $as_echo "$as_me:$LINENO: checking whether posix_acl has refcount_t" >&5
+$as_echo_n "checking whether posix_acl has refcount_t... " >&6; }
 
-               if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
-$as_echo_n "checking for selinux/selinux.h... " >&6; }
-if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
-$as_echo "$ac_cv_header_selinux_selinux_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
-$as_echo_n "checking selinux/selinux.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <selinux/selinux.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+               #include <linux/backing-dev.h>
+               #include <linux/refcount.h>
+               #include <linux/posix_acl.h>
+
+int
+main (void)
+{
+
+               struct posix_acl acl;
+               refcount_t *r __attribute__ ((unused)) = &acl.a_refcount;
+
+  ;
+  return 0;
+}
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
-$as_echo_n "checking selinux/selinux.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <selinux/selinux.h>
+
+
+
+cat - <<_ACEOF >conftest.h
+
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACL_REFCOUNT 1
+_ACEOF
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;}
 
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
-$as_echo_n "checking for selinux/selinux.h... " >&6; }
-if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_selinux_selinux_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
-$as_echo "$ac_cv_header_selinux_selinux_h" >&6; }
 
-fi
-if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then
+       rm -Rf build
 
-                       { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5
-$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
-if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lselinux  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether ns_capable exists" >&5
+$as_echo_n "checking whether ns_capable exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char is_selinux_enabled ();
+
+               #include <linux/capability.h>
+
 int
-main ()
+main (void)
 {
-return is_selinux_enabled ();
+
+               ns_capable((struct user_namespace *)NULL, CAP_SYS_ADMIN);
+
   ;
   return 0;
 }
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_selinux_is_selinux_enabled=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_selinux_is_selinux_enabled=no
-fi
+_ACEOF
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
-$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
-if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then
 
-                               LIBSELINUX="-lselinux"
 
+cat - <<_ACEOF >conftest.h
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBSELINUX 1
 _ACEOF
 
 
-else
-
-                               if test "x$with_selinux" != xcheck; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-fi
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NS_CAPABLE 1
+_ACEOF
 
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                       if test "x$with_selinux" != xcheck; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-fi
 
 
 fi
 
+       rm -Rf build
 
 
-else
-
-               { $as_echo "$as_me:$LINENO: checking for selinux support" >&5
-$as_echo_n "checking for selinux support... " >&6; }
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-
 
 
-       { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than=<size> support" >&5
-$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether cred_t->user_ns exists" >&5
+$as_echo_n "checking whether cred_t->user_ns exists... " >&6; }
 
-       saved_flags="$CFLAGS"
-       CFLAGS="$CFLAGS -Wframe-larger-than=1024"
 
-       if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+
+               #include <linux/cred.h>
+
 int
-main ()
+main (void)
 {
 
+               struct cred cr;
+               cr.user_ns = (struct user_namespace *)NULL;
+
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               FRAME_LARGER_THAN=-Wframe-larger-than=1024
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CRED_USER_NS 1
+_ACEOF
+
+
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-
-               FRAME_LARGER_THAN=
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
 
+fi
 
-       CFLAGS="$saved_flags"
+       rm -Rf build
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether pthread stack includes guard" >&5
-$as_echo_n "checking whether pthread stack includes guard... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether kuid_has_mapping/kgid_has_mapping exist" >&5
+$as_echo_n "checking whether kuid_has_mapping/kgid_has_mapping exist... " >&6; }
 
-       saved_CFLAGS="$CFLAGS"
-       CFLAGS="-fstack-check"
-       saved_LDFLAGS="$LDFLAGS"
-       LDFLAGS="-lpthread"
 
-       if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-               #include <pthread.h>
-               #include <sys/resource.h>
-               #include <unistd.h>
-               #include <bits/local_lim.h>
 
-               #define PAGESIZE (sysconf(_SC_PAGESIZE))
-               #define STACK_SIZE 8192
-               #define BUFSIZE 4096
-
-               void * func(void *arg)
-               {
-                       char buf[BUFSIZE];
-               }
+               #include <linux/uidgid.h>
 
 int
-main ()
+main (void)
 {
 
-               pthread_t tid;
-               pthread_attr_t attr;
-               struct rlimit l;
-
-               l.rlim_cur = 0;
-               l.rlim_max = 0;
-               setrlimit(RLIMIT_CORE, &l);
-               pthread_attr_init(&attr);
-               pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + STACK_SIZE);
-               pthread_attr_setguardsize(&attr, PAGESIZE);
-               pthread_create(&tid, &attr, func, NULL);
-               pthread_join(tid, NULL);
+               kuid_has_mapping((struct user_namespace *)NULL, KUIDT_INIT(0));
+               kgid_has_mapping((struct user_namespace *)NULL, KGIDT_INIT(0));
 
   ;
   return 0;
 }
+
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KUID_HAS_MAPPING 1
+_ACEOF
+
 
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define NPTL_GUARD_WITHIN_STACK 1
-_ACEOF
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+       rm -Rf build
+
+
+
+
+
+       if test "$LINUX_OBJ" != "$LINUX"; then
+
+               KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
+
 fi
 
 
-       CFLAGS="$saved_CFLAGS"
-       LDFLAGS="$saved_LDFLAGS"
 
-   ;;
+
+                       KERNELCPPFLAGS="$KERNELCPPFLAGS -std=gnu99"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-declaration-after-statement"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_BOOL_COMPARE"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
+
+
+ ;;
                srpm)                        ;;
                *)
                { $as_echo "$as_me:$LINENO: result: Error!" >&5
@@ -27285,7 +48254,7 @@ else
 fi
 
         if test "$ZFS_CONFIG" = kernel -o "$ZFS_CONFIG" = all &&
-                      test "x$enable_linux_builtin" != xyes ; then
+           test "x$enable_linux_builtin" != xyes ; then
   CONFIG_KERNEL_TRUE=
   CONFIG_KERNEL_FALSE='#'
 else
@@ -27293,10 +48262,35 @@ else
   CONFIG_KERNEL_FALSE=
 fi
 
+        if test "$ZFS_CONFIG" = kernel -o "$ZFS_CONFIG" = all &&
+           test "x$qatsrc" != x ; then
+  CONFIG_QAT_TRUE=
+  CONFIG_QAT_FALSE='#'
+else
+  CONFIG_QAT_TRUE='#'
+  CONFIG_QAT_FALSE=
+fi
+
+        if test "x$user_libudev" = xyes ; then
+  WANT_DEVNAME2DEVID_TRUE=
+  WANT_DEVNAME2DEVID_FALSE='#'
+else
+  WANT_DEVNAME2DEVID_TRUE='#'
+  WANT_DEVNAME2DEVID_FALSE=
+fi
+
+        if test "x$user_libaio" = xyes ; then
+  WANT_MMAP_LIBAIO_TRUE=
+  WANT_MMAP_LIBAIO_FALSE='#'
+else
+  WANT_MMAP_LIBAIO_TRUE='#'
+  WANT_MMAP_LIBAIO_FALSE=
+fi
+
 
 
-       { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5
-$as_echo_n "checking whether debugging is enabled... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether assertion support will be enabled" >&5
+$as_echo_n "checking whether assertion support will be enabled... " >&6; }
        # Check whether --enable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval=$enable_debug;
@@ -27305,29 +48299,29 @@ else
 fi
 
 
-       if test "x$enable_debug" = xyes; then
-
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
-               HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG -Werror"
-               DEBUG_CFLAGS="-DDEBUG -Werror"
-               DEBUG_STACKFLAGS="-fstack-check"
-               DEBUG_ZFS="_with_debug"
+       case "x$enable_debug" in
+  "xyes")
+       KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
+       HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG -Werror"
+       DEBUG_CFLAGS="-DDEBUG -Werror"
+       DEBUG_ZFS="_with_debug"
 
 cat >>confdefs.h <<\_ACEOF
 #define ZFS_DEBUG 1
 _ACEOF
 
-
-else
-
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG "
-               HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG "
-               DEBUG_CFLAGS="-DNDEBUG"
-               DEBUG_STACKFLAGS=""
-               DEBUG_ZFS="_without_debug"
-
-fi
-
+ ;;
+  "xno")
+       KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG "
+       HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG "
+       DEBUG_CFLAGS="-DNDEBUG"
+       DEBUG_STACKFLAGS=""
+       DEBUG_ZFS="_without_debug"
+ ;;
+  *) { { $as_echo "$as_me:$LINENO: error: Unknown option $enable_debug" >&5
+$as_echo "$as_me: error: Unknown option $enable_debug" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
 
 
 
 $as_echo "$enable_debug" >&6; }
 
 
-       # Check whether --enable-debug-dmu-tx was given.
-if test "${enable_debug_dmu_tx+set}" = set; then
-  enableval=$enable_debug_dmu_tx;
+       { $as_echo "$as_me:$LINENO: checking whether debuginfo support will be forced" >&5
+$as_echo_n "checking whether debuginfo support will be forced... " >&6; }
+       # Check whether --enable-debuginfo was given.
+if test "${enable_debuginfo+set}" = set; then
+  enableval=$enable_debuginfo;
 else
-  enable_debug_dmu_tx=no
+  enable_debuginfo=no
 fi
 
 
-       if test "x$enable_debug_dmu_tx" = xyes; then
+       case "x$enable_debuginfo" in
+  "xyes")
+       KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS CONFIG_DEBUG_INFO=y"
+       KERNELCPPFLAGS="${KERNELCPPFLAGS} -fno-inline"
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_DMU_TX"
-               DEBUG_DMU_TX="_with_debug_dmu_tx"
 
-cat >>confdefs.h <<\_ACEOF
-#define DEBUG_DMU_TX 1
-_ACEOF
-
-
-else
-
-               DEBUG_DMU_TX="_without_debug_dmu_tx"
+       DEBUG_CFLAGS="${DEBUG_CFLAGS} -g -fno-inline"
+ ;;
+  "xkernel")
+       KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS CONFIG_DEBUG_INFO=y"
+       KERNELCPPFLAGS="${KERNELCPPFLAGS} -fno-inline"
+ ;;
+  "xuser")
+       DEBUG_CFLAGS="${DEBUG_CFLAGS} -g -fno-inline"
+ ;;
+  "xno") : ;;
+  *) { { $as_echo "$as_me:$LINENO: error: Unknown option $enable_debug" >&5
+$as_echo "$as_me: error: Unknown option $enable_debug" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
 
-fi
 
 
+       { $as_echo "$as_me:$LINENO: result: $enable_debuginfo" >&5
+$as_echo "$enable_debuginfo" >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether dmu tx validation is enabled" >&5
-$as_echo_n "checking whether dmu tx validation is enabled... " >&6; }
-       { $as_echo "$as_me:$LINENO: result: $enable_debug_dmu_tx" >&5
-$as_echo "$enable_debug_dmu_tx" >&6; }
 
+ac_config_files="$ac_config_files Makefile udev/Makefile udev/rules.d/Makefile etc/Makefile etc/init.d/Makefile etc/zfs/Makefile etc/systemd/Makefile etc/systemd/system/Makefile etc/sudoers.d/Makefile etc/modules-load.d/Makefile man/Makefile man/man1/Makefile man/man5/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libicp/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/libzfs.pc lib/libzfs/libzfs_core.pc lib/libzfs/Makefile lib/libzfs_core/Makefile lib/libshare/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zhack/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/zstreamdump/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/fsck_zfs/Makefile cmd/zvol_id/Makefile cmd/vdev_id/Makefile cmd/arcstat/Makefile cmd/dbufstat/Makefile cmd/arc_summary/Makefile cmd/zed/Makefile cmd/raidz_test/Makefile cmd/zgenhostid/Makefile contrib/Makefile contrib/bash_completion.d/Makefile contrib/dracut/Makefile contrib/dracut/02zfsexpandknowledge/Makefile contrib/dracut/90zfs/Makefile contrib/initramfs/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile module/icp/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile include/sys/crypto/Makefile include/sys/sysevent/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/common.sh tests/Makefile tests/test-runner/Makefile tests/test-runner/cmd/Makefile tests/test-runner/include/Makefile tests/test-runner/man/Makefile tests/runfiles/Makefile tests/zfs-tests/Makefile tests/zfs-tests/callbacks/Makefile tests/zfs-tests/cmd/Makefile tests/zfs-tests/cmd/chg_usr_exec/Makefile tests/zfs-tests/cmd/user_ns_exec/Makefile tests/zfs-tests/cmd/devname2devid/Makefile tests/zfs-tests/cmd/dir_rd_update/Makefile tests/zfs-tests/cmd/file_check/Makefile tests/zfs-tests/cmd/file_trunc/Makefile tests/zfs-tests/cmd/file_write/Makefile tests/zfs-tests/cmd/largest_file/Makefile tests/zfs-tests/cmd/mkbusy/Makefile tests/zfs-tests/cmd/mkfile/Makefile tests/zfs-tests/cmd/mkfiles/Makefile tests/zfs-tests/cmd/mktree/Makefile tests/zfs-tests/cmd/mmap_exec/Makefile tests/zfs-tests/cmd/mmap_libaio/Makefile tests/zfs-tests/cmd/mmapwrite/Makefile tests/zfs-tests/cmd/randfree_file/Makefile tests/zfs-tests/cmd/readmmap/Makefile tests/zfs-tests/cmd/rename_dir/Makefile tests/zfs-tests/cmd/rm_lnkcnt_zero_file/Makefile tests/zfs-tests/cmd/threadsappend/Makefile tests/zfs-tests/cmd/xattrtest/Makefile tests/zfs-tests/include/Makefile tests/zfs-tests/include/default.cfg tests/zfs-tests/tests/Makefile tests/zfs-tests/tests/functional/Makefile tests/zfs-tests/tests/functional/acl/Makefile tests/zfs-tests/tests/functional/acl/posix/Makefile tests/zfs-tests/tests/functional/atime/Makefile tests/zfs-tests/tests/functional/bootfs/Makefile tests/zfs-tests/tests/functional/cache/Makefile tests/zfs-tests/tests/functional/cachefile/Makefile tests/zfs-tests/tests/functional/casenorm/Makefile tests/zfs-tests/tests/functional/checksum/Makefile tests/zfs-tests/tests/functional/chattr/Makefile tests/zfs-tests/tests/functional/clean_mirror/Makefile tests/zfs-tests/tests/functional/cli_root/Makefile tests/zfs-tests/tests/functional/cli_root/zdb/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_clone/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_copies/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_create/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_destroy/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_get/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_inherit/Makefile tests/zfs-tests/tests/functional/cli_root/zfs/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_mount/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_promote/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_property/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_rename/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_reservation/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_rollback/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_send/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_set/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_share/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_unmount/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_unshare/Makefile tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_add/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_attach/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_clear/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_create/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_destroy/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_detach/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_expand/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_export/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_get/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_history/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/Makefile tests/zfs-tests/tests/functional/cli_root/zpool/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_offline/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_online/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_remove/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_replace/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_scrub/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_set/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_sync/Makefile tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/Makefile tests/zfs-tests/tests/functional/cli_user/Makefile tests/zfs-tests/tests/functional/cli_user/misc/Makefile tests/zfs-tests/tests/functional/cli_user/zfs_list/Makefile tests/zfs-tests/tests/functional/cli_user/zpool_iostat/Makefile tests/zfs-tests/tests/functional/cli_user/zpool_list/Makefile tests/zfs-tests/tests/functional/compression/Makefile tests/zfs-tests/tests/functional/cp_files/Makefile tests/zfs-tests/tests/functional/ctime/Makefile tests/zfs-tests/tests/functional/delegate/Makefile tests/zfs-tests/tests/functional/devices/Makefile tests/zfs-tests/tests/functional/events/Makefile tests/zfs-tests/tests/functional/exec/Makefile tests/zfs-tests/tests/functional/fault/Makefile tests/zfs-tests/tests/functional/features/async_destroy/Makefile tests/zfs-tests/tests/functional/features/large_dnode/Makefile tests/zfs-tests/tests/functional/features/Makefile tests/zfs-tests/tests/functional/grow_pool/Makefile tests/zfs-tests/tests/functional/grow_replicas/Makefile tests/zfs-tests/tests/functional/history/Makefile tests/zfs-tests/tests/functional/inheritance/Makefile tests/zfs-tests/tests/functional/inuse/Makefile tests/zfs-tests/tests/functional/kstat/Makefile tests/zfs-tests/tests/functional/large_files/Makefile tests/zfs-tests/tests/functional/largest_pool/Makefile tests/zfs-tests/tests/functional/link_count/Makefile tests/zfs-tests/tests/functional/libzfs/Makefile tests/zfs-tests/tests/functional/migration/Makefile tests/zfs-tests/tests/functional/mmap/Makefile tests/zfs-tests/tests/functional/mmp/Makefile tests/zfs-tests/tests/functional/mount/Makefile tests/zfs-tests/tests/functional/mv_files/Makefile tests/zfs-tests/tests/functional/nestedfs/Makefile tests/zfs-tests/tests/functional/no_space/Makefile tests/zfs-tests/tests/functional/nopwrite/Makefile tests/zfs-tests/tests/functional/online_offline/Makefile tests/zfs-tests/tests/functional/pool_names/Makefile tests/zfs-tests/tests/functional/poolversion/Makefile tests/zfs-tests/tests/functional/privilege/Makefile tests/zfs-tests/tests/functional/quota/Makefile tests/zfs-tests/tests/functional/raidz/Makefile tests/zfs-tests/tests/functional/redundancy/Makefile tests/zfs-tests/tests/functional/refquota/Makefile tests/zfs-tests/tests/functional/refreserv/Makefile tests/zfs-tests/tests/functional/rename_dirs/Makefile tests/zfs-tests/tests/functional/replacement/Makefile tests/zfs-tests/tests/functional/reservation/Makefile tests/zfs-tests/tests/functional/rootpool/Makefile tests/zfs-tests/tests/functional/rsend/Makefile tests/zfs-tests/tests/functional/scrub_mirror/Makefile tests/zfs-tests/tests/functional/slog/Makefile tests/zfs-tests/tests/functional/snapshot/Makefile tests/zfs-tests/tests/functional/snapused/Makefile tests/zfs-tests/tests/functional/sparse/Makefile tests/zfs-tests/tests/functional/threadsappend/Makefile tests/zfs-tests/tests/functional/tmpfile/Makefile tests/zfs-tests/tests/functional/truncate/Makefile tests/zfs-tests/tests/functional/user_namespace/Makefile tests/zfs-tests/tests/functional/userquota/Makefile tests/zfs-tests/tests/functional/upgrade/Makefile tests/zfs-tests/tests/functional/vdev_zaps/Makefile tests/zfs-tests/tests/functional/write_dirs/Makefile tests/zfs-tests/tests/functional/xattr/Makefile tests/zfs-tests/tests/functional/zvol/Makefile tests/zfs-tests/tests/functional/zvol/zvol_cli/Makefile tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/Makefile tests/zfs-tests/tests/functional/zvol/zvol_misc/Makefile tests/zfs-tests/tests/functional/zvol/zvol_swap/Makefile tests/zfs-tests/tests/perf/Makefile tests/zfs-tests/tests/perf/fio/Makefile tests/zfs-tests/tests/perf/regression/Makefile tests/zfs-tests/tests/perf/scripts/Makefile tests/zfs-tests/tests/stress/Makefile rpm/Makefile rpm/redhat/Makefile rpm/redhat/zfs.spec rpm/redhat/zfs-kmod.spec rpm/redhat/zfs-dkms.spec rpm/generic/Makefile rpm/generic/zfs.spec rpm/generic/zfs-kmod.spec rpm/generic/zfs-dkms.spec zfs-script-config.sh zfs.release"
 
-ac_config_files="$ac_config_files Makefile dracut/Makefile dracut/90zfs/Makefile udev/Makefile udev/rules.d/Makefile etc/Makefile etc/init.d/Makefile etc/zfs/Makefile man/Makefile man/man5/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/sysevent/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/Makefile lib/libshare/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/zpool_layout/Makefile cmd/zvol_id/Makefile cmd/zpool_id/Makefile cmd/vdev_id/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/zpool-layout/Makefile scripts/common.sh zfs.spec zfs-modules.spec PKGBUILD-zfs PKGBUILD-zfs-modules zfs-script-config.sh zfs.release dkms.conf"
 
 
 cat >confcache <<\_ACEOF
@@ -27504,6 +48504,34 @@ $as_echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"CODE_COVERAGE_ENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"CODE_COVERAGE_ENABLED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${TARGET_ASM_X86_64_TRUE}" && test -z "${TARGET_ASM_X86_64_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"TARGET_ASM_X86_64\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"TARGET_ASM_X86_64\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${TARGET_ASM_I386_TRUE}" && test -z "${TARGET_ASM_I386_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"TARGET_ASM_I386\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"TARGET_ASM_I386\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${TARGET_ASM_GENERIC_TRUE}" && test -z "${TARGET_ASM_GENERIC_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"TARGET_ASM_GENERIC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"TARGET_ASM_GENERIC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${CONFIG_USER_TRUE}" && test -z "${CONFIG_USER_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_USER\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -27518,6 +48546,27 @@ $as_echo "$as_me: error: conditional \"CONFIG_KERNEL\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${CONFIG_QAT_TRUE}" && test -z "${CONFIG_QAT_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_QAT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"CONFIG_QAT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${WANT_DEVNAME2DEVID_TRUE}" && test -z "${WANT_DEVNAME2DEVID_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"WANT_DEVNAME2DEVID\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"WANT_DEVNAME2DEVID\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${WANT_MMAP_LIBAIO_TRUE}" && test -z "${WANT_MMAP_LIBAIO_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"WANT_MMAP_LIBAIO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"WANT_MMAP_LIBAIO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
@@ -27840,7 +48889,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by $as_me, which was
+This file was extended by zfs $as_me 0.7.11, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -27903,7 +48952,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-config.status
+zfs config.status 0.7.11
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "dracut/Makefile") CONFIG_FILES="$CONFIG_FILES dracut/Makefile" ;;
-    "dracut/90zfs/Makefile") CONFIG_FILES="$CONFIG_FILES dracut/90zfs/Makefile" ;;
     "udev/Makefile") CONFIG_FILES="$CONFIG_FILES udev/Makefile" ;;
     "udev/rules.d/Makefile") CONFIG_FILES="$CONFIG_FILES udev/rules.d/Makefile" ;;
     "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
     "etc/init.d/Makefile") CONFIG_FILES="$CONFIG_FILES etc/init.d/Makefile" ;;
     "etc/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES etc/zfs/Makefile" ;;
+    "etc/systemd/Makefile") CONFIG_FILES="$CONFIG_FILES etc/systemd/Makefile" ;;
+    "etc/systemd/system/Makefile") CONFIG_FILES="$CONFIG_FILES etc/systemd/system/Makefile" ;;
+    "etc/sudoers.d/Makefile") CONFIG_FILES="$CONFIG_FILES etc/sudoers.d/Makefile" ;;
+    "etc/modules-load.d/Makefile") CONFIG_FILES="$CONFIG_FILES etc/modules-load.d/Makefile" ;;
     "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+    "man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES man/man1/Makefile" ;;
     "man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES man/man5/Makefile" ;;
     "man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES man/man8/Makefile" ;;
     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
     "lib/libspl/include/ia32/sys/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/ia32/sys/Makefile" ;;
     "lib/libspl/include/rpc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/rpc/Makefile" ;;
     "lib/libspl/include/sys/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/sys/Makefile" ;;
-    "lib/libspl/include/sys/sysevent/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/sys/sysevent/Makefile" ;;
     "lib/libspl/include/sys/dktp/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/sys/dktp/Makefile" ;;
     "lib/libspl/include/util/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/util/Makefile" ;;
     "lib/libavl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libavl/Makefile" ;;
     "lib/libefi/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libefi/Makefile" ;;
+    "lib/libicp/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libicp/Makefile" ;;
     "lib/libnvpair/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libnvpair/Makefile" ;;
     "lib/libunicode/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libunicode/Makefile" ;;
     "lib/libuutil/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libuutil/Makefile" ;;
     "lib/libzpool/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libzpool/Makefile" ;;
+    "lib/libzfs/libzfs.pc") CONFIG_FILES="$CONFIG_FILES lib/libzfs/libzfs.pc" ;;
+    "lib/libzfs/libzfs_core.pc") CONFIG_FILES="$CONFIG_FILES lib/libzfs/libzfs_core.pc" ;;
     "lib/libzfs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libzfs/Makefile" ;;
+    "lib/libzfs_core/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libzfs_core/Makefile" ;;
     "lib/libshare/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libshare/Makefile" ;;
     "cmd/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;;
     "cmd/zdb/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zdb/Makefile" ;;
+    "cmd/zhack/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zhack/Makefile" ;;
     "cmd/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zfs/Makefile" ;;
     "cmd/zinject/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zinject/Makefile" ;;
     "cmd/zpool/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool/Makefile" ;;
+    "cmd/zstreamdump/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zstreamdump/Makefile" ;;
     "cmd/ztest/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/ztest/Makefile" ;;
     "cmd/zpios/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpios/Makefile" ;;
     "cmd/mount_zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/mount_zfs/Makefile" ;;
-    "cmd/zpool_layout/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool_layout/Makefile" ;;
+    "cmd/fsck_zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/fsck_zfs/Makefile" ;;
     "cmd/zvol_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zvol_id/Makefile" ;;
-    "cmd/zpool_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool_id/Makefile" ;;
     "cmd/vdev_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/vdev_id/Makefile" ;;
+    "cmd/arcstat/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/arcstat/Makefile" ;;
+    "cmd/dbufstat/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/dbufstat/Makefile" ;;
+    "cmd/arc_summary/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/arc_summary/Makefile" ;;
+    "cmd/zed/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zed/Makefile" ;;
+    "cmd/raidz_test/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/raidz_test/Makefile" ;;
+    "cmd/zgenhostid/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zgenhostid/Makefile" ;;
+    "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
+    "contrib/bash_completion.d/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/bash_completion.d/Makefile" ;;
+    "contrib/dracut/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dracut/Makefile" ;;
+    "contrib/dracut/02zfsexpandknowledge/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dracut/02zfsexpandknowledge/Makefile" ;;
+    "contrib/dracut/90zfs/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dracut/90zfs/Makefile" ;;
+    "contrib/initramfs/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/initramfs/Makefile" ;;
     "module/Makefile") CONFIG_FILES="$CONFIG_FILES module/Makefile" ;;
     "module/avl/Makefile") CONFIG_FILES="$CONFIG_FILES module/avl/Makefile" ;;
     "module/nvpair/Makefile") CONFIG_FILES="$CONFIG_FILES module/nvpair/Makefile" ;;
     "module/zcommon/Makefile") CONFIG_FILES="$CONFIG_FILES module/zcommon/Makefile" ;;
     "module/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES module/zfs/Makefile" ;;
     "module/zpios/Makefile") CONFIG_FILES="$CONFIG_FILES module/zpios/Makefile" ;;
+    "module/icp/Makefile") CONFIG_FILES="$CONFIG_FILES module/icp/Makefile" ;;
     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
     "include/linux/Makefile") CONFIG_FILES="$CONFIG_FILES include/linux/Makefile" ;;
     "include/sys/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;;
     "include/sys/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fs/Makefile" ;;
     "include/sys/fm/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fm/Makefile" ;;
     "include/sys/fm/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fm/fs/Makefile" ;;
+    "include/sys/crypto/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/crypto/Makefile" ;;
+    "include/sys/sysevent/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/sysevent/Makefile" ;;
     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
     "scripts/zpios-profile/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/zpios-profile/Makefile" ;;
     "scripts/zpios-test/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/zpios-test/Makefile" ;;
     "scripts/zpool-config/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/zpool-config/Makefile" ;;
-    "scripts/zpool-layout/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/zpool-layout/Makefile" ;;
     "scripts/common.sh") CONFIG_FILES="$CONFIG_FILES scripts/common.sh" ;;
-    "zfs.spec") CONFIG_FILES="$CONFIG_FILES zfs.spec" ;;
-    "zfs-modules.spec") CONFIG_FILES="$CONFIG_FILES zfs-modules.spec" ;;
-    "PKGBUILD-zfs") CONFIG_FILES="$CONFIG_FILES PKGBUILD-zfs" ;;
-    "PKGBUILD-zfs-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-zfs-modules" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "tests/test-runner/Makefile") CONFIG_FILES="$CONFIG_FILES tests/test-runner/Makefile" ;;
+    "tests/test-runner/cmd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/test-runner/cmd/Makefile" ;;
+    "tests/test-runner/include/Makefile") CONFIG_FILES="$CONFIG_FILES tests/test-runner/include/Makefile" ;;
+    "tests/test-runner/man/Makefile") CONFIG_FILES="$CONFIG_FILES tests/test-runner/man/Makefile" ;;
+    "tests/runfiles/Makefile") CONFIG_FILES="$CONFIG_FILES tests/runfiles/Makefile" ;;
+    "tests/zfs-tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/Makefile" ;;
+    "tests/zfs-tests/callbacks/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/callbacks/Makefile" ;;
+    "tests/zfs-tests/cmd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/Makefile" ;;
+    "tests/zfs-tests/cmd/chg_usr_exec/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/chg_usr_exec/Makefile" ;;
+    "tests/zfs-tests/cmd/user_ns_exec/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/user_ns_exec/Makefile" ;;
+    "tests/zfs-tests/cmd/devname2devid/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/devname2devid/Makefile" ;;
+    "tests/zfs-tests/cmd/dir_rd_update/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/dir_rd_update/Makefile" ;;
+    "tests/zfs-tests/cmd/file_check/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/file_check/Makefile" ;;
+    "tests/zfs-tests/cmd/file_trunc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/file_trunc/Makefile" ;;
+    "tests/zfs-tests/cmd/file_write/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/file_write/Makefile" ;;
+    "tests/zfs-tests/cmd/largest_file/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/largest_file/Makefile" ;;
+    "tests/zfs-tests/cmd/mkbusy/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/mkbusy/Makefile" ;;
+    "tests/zfs-tests/cmd/mkfile/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/mkfile/Makefile" ;;
+    "tests/zfs-tests/cmd/mkfiles/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/mkfiles/Makefile" ;;
+    "tests/zfs-tests/cmd/mktree/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/mktree/Makefile" ;;
+    "tests/zfs-tests/cmd/mmap_exec/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/mmap_exec/Makefile" ;;
+    "tests/zfs-tests/cmd/mmap_libaio/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/mmap_libaio/Makefile" ;;
+    "tests/zfs-tests/cmd/mmapwrite/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/mmapwrite/Makefile" ;;
+    "tests/zfs-tests/cmd/randfree_file/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/randfree_file/Makefile" ;;
+    "tests/zfs-tests/cmd/readmmap/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/readmmap/Makefile" ;;
+    "tests/zfs-tests/cmd/rename_dir/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/rename_dir/Makefile" ;;
+    "tests/zfs-tests/cmd/rm_lnkcnt_zero_file/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/rm_lnkcnt_zero_file/Makefile" ;;
+    "tests/zfs-tests/cmd/threadsappend/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/threadsappend/Makefile" ;;
+    "tests/zfs-tests/cmd/xattrtest/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/cmd/xattrtest/Makefile" ;;
+    "tests/zfs-tests/include/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/include/Makefile" ;;
+    "tests/zfs-tests/include/default.cfg") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/include/default.cfg" ;;
+    "tests/zfs-tests/tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/Makefile" ;;
+    "tests/zfs-tests/tests/functional/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/Makefile" ;;
+    "tests/zfs-tests/tests/functional/acl/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/acl/Makefile" ;;
+    "tests/zfs-tests/tests/functional/acl/posix/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/acl/posix/Makefile" ;;
+    "tests/zfs-tests/tests/functional/atime/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/atime/Makefile" ;;
+    "tests/zfs-tests/tests/functional/bootfs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/bootfs/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cache/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cache/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cachefile/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cachefile/Makefile" ;;
+    "tests/zfs-tests/tests/functional/casenorm/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/casenorm/Makefile" ;;
+    "tests/zfs-tests/tests/functional/checksum/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/checksum/Makefile" ;;
+    "tests/zfs-tests/tests/functional/chattr/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/chattr/Makefile" ;;
+    "tests/zfs-tests/tests/functional/clean_mirror/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/clean_mirror/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zdb/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zdb/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_clone/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_clone/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_copies/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_copies/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_create/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_create/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_destroy/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_destroy/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_get/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_get/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_inherit/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_inherit/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_mount/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_mount/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_promote/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_promote/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_property/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_property/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_rename/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_rename/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_reservation/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_reservation/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_rollback/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_rollback/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_send/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_send/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_set/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_set/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_share/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_share/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_snapshot/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_unmount/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_unmount/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_unshare/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_unshare/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_add/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_add/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_attach/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_attach/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_clear/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_clear/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_create/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_create/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_destroy/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_destroy/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_detach/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_detach/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_expand/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_expand/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_export/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_export/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_get/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_get/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_history/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_history/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_labelclear/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_offline/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_offline/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_online/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_online/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_remove/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_remove/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_replace/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_replace/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_scrub/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_scrub/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_set/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_set/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_status/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_sync/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_sync/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_user/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_user/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_user/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_user/misc/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_user/zfs_list/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_user/zfs_list/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_user/zpool_iostat/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_user/zpool_iostat/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cli_user/zpool_list/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cli_user/zpool_list/Makefile" ;;
+    "tests/zfs-tests/tests/functional/compression/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/compression/Makefile" ;;
+    "tests/zfs-tests/tests/functional/cp_files/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/cp_files/Makefile" ;;
+    "tests/zfs-tests/tests/functional/ctime/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/ctime/Makefile" ;;
+    "tests/zfs-tests/tests/functional/delegate/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/delegate/Makefile" ;;
+    "tests/zfs-tests/tests/functional/devices/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/devices/Makefile" ;;
+    "tests/zfs-tests/tests/functional/events/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/events/Makefile" ;;
+    "tests/zfs-tests/tests/functional/exec/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/exec/Makefile" ;;
+    "tests/zfs-tests/tests/functional/fault/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/fault/Makefile" ;;
+    "tests/zfs-tests/tests/functional/features/async_destroy/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/features/async_destroy/Makefile" ;;
+    "tests/zfs-tests/tests/functional/features/large_dnode/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/features/large_dnode/Makefile" ;;
+    "tests/zfs-tests/tests/functional/features/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/features/Makefile" ;;
+    "tests/zfs-tests/tests/functional/grow_pool/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/grow_pool/Makefile" ;;
+    "tests/zfs-tests/tests/functional/grow_replicas/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/grow_replicas/Makefile" ;;
+    "tests/zfs-tests/tests/functional/history/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/history/Makefile" ;;
+    "tests/zfs-tests/tests/functional/inheritance/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/inheritance/Makefile" ;;
+    "tests/zfs-tests/tests/functional/inuse/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/inuse/Makefile" ;;
+    "tests/zfs-tests/tests/functional/kstat/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/kstat/Makefile" ;;
+    "tests/zfs-tests/tests/functional/large_files/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/large_files/Makefile" ;;
+    "tests/zfs-tests/tests/functional/largest_pool/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/largest_pool/Makefile" ;;
+    "tests/zfs-tests/tests/functional/link_count/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/link_count/Makefile" ;;
+    "tests/zfs-tests/tests/functional/libzfs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/libzfs/Makefile" ;;
+    "tests/zfs-tests/tests/functional/migration/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/migration/Makefile" ;;
+    "tests/zfs-tests/tests/functional/mmap/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/mmap/Makefile" ;;
+    "tests/zfs-tests/tests/functional/mmp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/mmp/Makefile" ;;
+    "tests/zfs-tests/tests/functional/mount/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/mount/Makefile" ;;
+    "tests/zfs-tests/tests/functional/mv_files/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/mv_files/Makefile" ;;
+    "tests/zfs-tests/tests/functional/nestedfs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/nestedfs/Makefile" ;;
+    "tests/zfs-tests/tests/functional/no_space/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/no_space/Makefile" ;;
+    "tests/zfs-tests/tests/functional/nopwrite/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/nopwrite/Makefile" ;;
+    "tests/zfs-tests/tests/functional/online_offline/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/online_offline/Makefile" ;;
+    "tests/zfs-tests/tests/functional/pool_names/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/pool_names/Makefile" ;;
+    "tests/zfs-tests/tests/functional/poolversion/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/poolversion/Makefile" ;;
+    "tests/zfs-tests/tests/functional/privilege/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/privilege/Makefile" ;;
+    "tests/zfs-tests/tests/functional/quota/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/quota/Makefile" ;;
+    "tests/zfs-tests/tests/functional/raidz/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/raidz/Makefile" ;;
+    "tests/zfs-tests/tests/functional/redundancy/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/redundancy/Makefile" ;;
+    "tests/zfs-tests/tests/functional/refquota/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/refquota/Makefile" ;;
+    "tests/zfs-tests/tests/functional/refreserv/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/refreserv/Makefile" ;;
+    "tests/zfs-tests/tests/functional/rename_dirs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/rename_dirs/Makefile" ;;
+    "tests/zfs-tests/tests/functional/replacement/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/replacement/Makefile" ;;
+    "tests/zfs-tests/tests/functional/reservation/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/reservation/Makefile" ;;
+    "tests/zfs-tests/tests/functional/rootpool/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/rootpool/Makefile" ;;
+    "tests/zfs-tests/tests/functional/rsend/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/rsend/Makefile" ;;
+    "tests/zfs-tests/tests/functional/scrub_mirror/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/scrub_mirror/Makefile" ;;
+    "tests/zfs-tests/tests/functional/slog/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/slog/Makefile" ;;
+    "tests/zfs-tests/tests/functional/snapshot/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/snapshot/Makefile" ;;
+    "tests/zfs-tests/tests/functional/snapused/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/snapused/Makefile" ;;
+    "tests/zfs-tests/tests/functional/sparse/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/sparse/Makefile" ;;
+    "tests/zfs-tests/tests/functional/threadsappend/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/threadsappend/Makefile" ;;
+    "tests/zfs-tests/tests/functional/tmpfile/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/tmpfile/Makefile" ;;
+    "tests/zfs-tests/tests/functional/truncate/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/truncate/Makefile" ;;
+    "tests/zfs-tests/tests/functional/user_namespace/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/user_namespace/Makefile" ;;
+    "tests/zfs-tests/tests/functional/userquota/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/userquota/Makefile" ;;
+    "tests/zfs-tests/tests/functional/upgrade/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/upgrade/Makefile" ;;
+    "tests/zfs-tests/tests/functional/vdev_zaps/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/vdev_zaps/Makefile" ;;
+    "tests/zfs-tests/tests/functional/write_dirs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/write_dirs/Makefile" ;;
+    "tests/zfs-tests/tests/functional/xattr/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/xattr/Makefile" ;;
+    "tests/zfs-tests/tests/functional/zvol/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/zvol/Makefile" ;;
+    "tests/zfs-tests/tests/functional/zvol/zvol_cli/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/zvol/zvol_cli/Makefile" ;;
+    "tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/Makefile" ;;
+    "tests/zfs-tests/tests/functional/zvol/zvol_misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/zvol/zvol_misc/Makefile" ;;
+    "tests/zfs-tests/tests/functional/zvol/zvol_swap/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/functional/zvol/zvol_swap/Makefile" ;;
+    "tests/zfs-tests/tests/perf/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/perf/Makefile" ;;
+    "tests/zfs-tests/tests/perf/fio/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/perf/fio/Makefile" ;;
+    "tests/zfs-tests/tests/perf/regression/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/perf/regression/Makefile" ;;
+    "tests/zfs-tests/tests/perf/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/perf/scripts/Makefile" ;;
+    "tests/zfs-tests/tests/stress/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/stress/Makefile" ;;
+    "rpm/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/Makefile" ;;
+    "rpm/redhat/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/redhat/Makefile" ;;
+    "rpm/redhat/zfs.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/zfs.spec" ;;
+    "rpm/redhat/zfs-kmod.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/zfs-kmod.spec" ;;
+    "rpm/redhat/zfs-dkms.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/zfs-dkms.spec" ;;
+    "rpm/generic/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/generic/Makefile" ;;
+    "rpm/generic/zfs.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/zfs.spec" ;;
+    "rpm/generic/zfs-kmod.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/zfs-kmod.spec" ;;
+    "rpm/generic/zfs-dkms.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/zfs-dkms.spec" ;;
     "zfs-script-config.sh") CONFIG_FILES="$CONFIG_FILES zfs-script-config.sh" ;;
     "zfs.release") CONFIG_FILES="$CONFIG_FILES zfs.release" ;;
-    "dkms.conf") CONFIG_FILES="$CONFIG_FILES dkms.conf" ;;
 
   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}