]> git.proxmox.com Git - mirror_spl-debian.git/blobdiff - configure
Update changelog for new upstream release
[mirror_spl-debian.git] / configure
index cf396e484803ce8db102ed0113f51c965c710907..5b72452c20295a75ca78dd5f299e3c230ccaa259 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 spl 0.6.5.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='spl'
+PACKAGE_TARNAME='spl'
+PACKAGE_VERSION='0.6.5.11'
+PACKAGE_STRING='spl 0.6.5.11'
+PACKAGE_BUGREPORT=''
 
 # Factoring default headers for most tests.
 ac_includes_default="\
@@ -791,6 +791,9 @@ CONFIG_KERNEL_FALSE
 CONFIG_KERNEL_TRUE
 CONFIG_USER_FALSE
 CONFIG_USER_TRUE
+DEBUG_KMEM_TRACKING
+DEBUG_KMEM
+DEBUG_SPL
 DEBUG_CFLAGS
 KERNELCPPFLAGS
 KERNELMAKE_PARAMS
@@ -799,8 +802,6 @@ LINUX_VERSION
 LINUX_OBJ
 LINUX
 SPL_CONFIG
-DEFAULT_PACKAGE
-VENDOR
 ALIEN_VERSION
 ALIEN
 HAVE_ALIEN
@@ -810,13 +811,23 @@ 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
-LICENSE
+DEFAULT_PACKAGE
+VENDOR
 CPP
 OTOOL64
 OTOOL
@@ -858,7 +869,6 @@ am__tar
 AMTAR
 am__leading_dot
 SET_MAKE
-AWK
 mkdir_p
 MKDIR_P
 INSTALL_STRIP_PROGRAM
@@ -899,9 +909,12 @@ SPL_META_LT_CURRENT
 SPL_META_AUTHOR
 SPL_META_DATA
 SPL_META_ALIAS
+SPL_META_LICENSE
+RELEASE
 SPL_META_RELEASE
 SPL_META_VERSION
 SPL_META_NAME
+AWK
 target_alias
 host_alias
 build_alias
@@ -951,7 +964,9 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+with_spec
 with_config
+enable_linux_builtin
 with_linux
 with_linux_obj
 enable_debug
@@ -1008,7 +1023,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}'
@@ -1520,7 +1535,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 spl 0.6.5.11 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1568,7 +1583,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/spl]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1590,7 +1605,9 @@ _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
-
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of spl 0.6.5.11:";;
+   esac
   cat <<\_ACEOF
 
 Optional Features:
@@ -1608,8 +1625,10 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-linux-builtin  Configure for builtin in-tree kernel modules
+                          [default=no]
   --enable-debug          Enable generic debug support [default=no]
-  --enable-debug-kmem     Enable basic kmem accounting [default=yes]
+  --enable-debug-kmem     Enable basic kmem accounting [default=no]
   --enable-debug-kmem-tracking
                           Enable detailed kmem tracking [default=no]
   --enable-atomic-spinlocks
@@ -1621,6 +1640,7 @@ 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-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
@@ -1700,7 +1720,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-configure
+spl configure 0.6.5.11
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1714,7 +1734,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 spl $as_me 0.6.5.11, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2062,6 +2082,14 @@ fi
 
 
 
+
+
+
+
+
+
+
+
 
 
 
@@ -2081,24 +2109,57 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 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"
-       _spl_ac_meta_got_file=no
+       _spl_ac_meta_type="none"
        if test -f "$META"; then
-               _spl_ac_meta_got_file=yes
-
-               SPL_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`;
+               _spl_ac_meta_type="META file"
+
+               SPL_META_NAME=`$AWK -F ':[ \t]+' '$1 ~ /^ *(Name|Project|Package)$/ { print $2; exit }' $META`;
                if test -n "$SPL_META_NAME"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2108,16 +2169,7 @@ _ACEOF
 
                fi
 
-               SPL_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`;
+               SPL_META_VERSION=`$AWK -F ':[ \t]+' '$1 ~ /^ *Version$/ { print $2; exit }' $META`;
                if test -n "$SPL_META_VERSION"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2127,16 +2179,17 @@ _ACEOF
 
                fi
 
-               SPL_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`;
+               SPL_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="${SPL_META_NAME}-${SPL_META_VERSION}"
+                       _alias=$(git describe --match=${_match} 2>/dev/null)
+                       _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
+                       if test -n "${_release}"; then
+                               SPL_META_RELEASE=${_release}
+                               _spl_ac_meta_type="git describe"
+                       fi
+               fi
+
                if test -n "$SPL_META_RELEASE"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2144,6 +2197,19 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+
+                       RELEASE="$SPL_META_RELEASE"
+
+               fi
+
+               SPL_META_LICENSE=`$AWK -F ':[ \t]+' '$1 ~ /^ *License$/ { print $2; exit }' $META`;
+               if test -n "$SPL_META_LICENSE"; then
+
+cat >>confdefs.h <<_ACEOF
+#define SPL_META_LICENSE "$SPL_META_LICENSE"
+_ACEOF
+
+
                fi
 
                if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then
@@ -2158,16 +2224,7 @@ _ACEOF
 
                fi
 
-               SPL_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`;
+               SPL_META_DATA=`$AWK -F ':[ \t]+' '$1 ~ /^ *Date$/ { print $2; exit }' $META`;
                if test -n "$SPL_META_DATA"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2177,16 +2234,7 @@ _ACEOF
 
                fi
 
-               SPL_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`;
+               SPL_META_AUTHOR=`$AWK -F ':[ \t]+' '$1 ~ /^ *Author$/ { print $2; exit }' $META`;
                if test -n "$SPL_META_AUTHOR"; then
 
 cat >>confdefs.h <<_ACEOF
@@ -2197,36 +2245,9 @@ _ACEOF
                fi
 
 
-               SPL_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`;
-               SPL_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`;
-               SPL_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`;
+               SPL_META_LT_CURRENT=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Current$/ { print $2; exit }' $META`;
+               SPL_META_LT_REVISION=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Revision$/ { print $2; exit }' $META`;
+               SPL_META_LT_AGE=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Age$/ { print $2; exit }' $META`;
                if test -n "$SPL_META_LT_CURRENT" \
                                 -o -n "$SPL_META_LT_REVISION" \
                                 -o -n "$SPL_META_LT_AGE"; then
@@ -2254,8 +2275,8 @@ _ACEOF
                fi
        fi
 
-       { $as_echo "$as_me:$LINENO: result: $_spl_ac_meta_got_file" >&5
-$as_echo "$_spl_ac_meta_got_file" >&6; }
+       { $as_echo "$as_me:$LINENO: result: $_spl_ac_meta_type" >&5
+$as_echo "$_spl_ac_meta_type" >&6; }
 
 
 ac_aux_dir=
@@ -2289,6 +2310,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
@@ -2446,7 +2468,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='\'
 
@@ -2794,48 +2816,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}
@@ -2899,8 +2879,8 @@ fi
 
 
 # Define the identity of the package.
- PACKAGE=$SPL_META_NAME
- VERSION=$SPL_META_VERSION
+ PACKAGE='spl'
+ VERSION='0.6.5.11'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4777,13 +4757,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:4780: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4760: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4783: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4763: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4786: output\"" >&5)
+  (eval echo "\"\$as_me:4766: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5989,7 +5969,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5992 "configure"' > conftest.$ac_ext
+  echo '#line 5972 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7817,6 +7797,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=
@@ -7842,11 +7826,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:7845: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7829: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7849: \$? = $ac_status" >&5
+   echo "$as_me:7833: \$? = $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.
@@ -8181,11 +8165,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:8184: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8168: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8188: \$? = $ac_status" >&5
+   echo "$as_me:8172: \$? = $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.
@@ -8286,11 +8270,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:8289: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8273: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8293: \$? = $ac_status" >&5
+   echo "$as_me:8277: \$? = $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
@@ -8341,11 +8325,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:8344: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8328: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8348: \$? = $ac_status" >&5
+   echo "$as_me:8332: \$? = $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
@@ -11144,7 +11128,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11147 "configure"
+#line 11131 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11240,7 +11224,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11243 "configure"
+#line 11227 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11469,13 +11453,65 @@ CC="$lt_save_CC"
 
 
 
+       { $as_echo "$as_me:$LINENO: checking spl author" >&5
+$as_echo_n "checking spl author... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: $SPL_META_AUTHOR" >&5
+$as_echo "$SPL_META_AUTHOR" >&6; }
+
        { $as_echo "$as_me:$LINENO: checking spl license" >&5
 $as_echo_n "checking spl license... " >&6; }
-       LICENSE=GPL
-       { $as_echo "$as_me:$LINENO: result: $LICENSE" >&5
-$as_echo "$LICENSE" >&6; }
-       KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS"
+       { $as_echo "$as_me:$LINENO: result: $SPL_META_LICENSE" >&5
+$as_echo "$SPL_META_LICENSE" >&6; }
+
+
+
+       { $as_echo "$as_me:$LINENO: checking linux distribution" >&5
+$as_echo_n "checking linux distribution... " >&6; }
+       if test -f /etc/toss-release ; then
+               VENDOR=toss ;
+       elif test -f /etc/fedora-release ; then
+               VENDOR=fedora ;
+       elif test -f /etc/redhat-release ; then
+               VENDOR=redhat ;
+       elif test -f /etc/gentoo-release ; then
+               VENDOR=gentoo ;
+       elif test -f /etc/arch-release ; then
+               VENDOR=arch ;
+       elif test -f /etc/SuSE-release ; then
+               VENDOR=sles ;
+       elif test -f /etc/slackware-version ; then
+               VENDOR=slackware ;
+       elif test -f /etc/lunar.release ; then
+               VENDOR=lunar ;
+       elif test -f /etc/lsb-release ; then
+               VENDOR=ubuntu ;
+       elif test -f /etc/debian_version ; then
+               VENDOR=debian ;
+       else
+               VENDOR= ;
+       fi
+       { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5
+$as_echo "$VENDOR" >&6; }
+
 
+       { $as_echo "$as_me:$LINENO: checking default package type" >&5
+$as_echo_n "checking default package type... " >&6; }
+       case "$VENDOR" in
+               toss)       DEFAULT_PACKAGE=rpm  ;;
+               redhat)     DEFAULT_PACKAGE=rpm  ;;
+               fedora)     DEFAULT_PACKAGE=rpm  ;;
+               gentoo)     DEFAULT_PACKAGE=tgz  ;;
+               arch)       DEFAULT_PACKAGE=tgz  ;;
+               sles)       DEFAULT_PACKAGE=rpm  ;;
+               slackware)  DEFAULT_PACKAGE=tgz  ;;
+               lunar)      DEFAULT_PACKAGE=tgz  ;;
+               ubuntu)     DEFAULT_PACKAGE=deb  ;;
+               debian)     DEFAULT_PACKAGE=deb  ;;
+               *)          DEFAULT_PACKAGE=rpm  ;;
+       esac
+
+       { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5
+$as_echo "$DEFAULT_PACKAGE" >&6; }
 
 
 
@@ -11518,6 +11554,39 @@ $as_echo "$HAVE_RPMBUILD" >&6; }
 fi
 
 
+       RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"'
+       RPM_DEFINE_UTIL=
+       RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"'
+       RPM_DEFINE_DKMS=
+
+       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; }
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking linux distribution" >&5
-$as_echo_n "checking linux distribution... " >&6; }
-       if test -f /etc/redhat-release ; then
-               VENDOR=redhat ;
-       elif test -f /etc/fedora-release ; then
-               VENDOR=fedora ;
-       elif test -f /etc/lsb-release ; then
-               VENDOR=ubuntu ;
-       elif test -f /etc/debian_version ; then
-               VENDOR=debian ;
-       elif test -f /etc/SuSE-release ; then
-               VENDOR=sles ;
-       elif test -f /etc/slackware-version ; then
-               VENDOR=slackware ;
-       elif test -f /etc/gentoo-release ; then
-               VENDOR=gentoo ;
-       else
-               VENDOR= ;
-       fi
-       { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5
-$as_echo "$VENDOR" >&6; }
-
-
-       { $as_echo "$as_me:$LINENO: checking default package type" >&5
-$as_echo_n "checking default package type... " >&6; }
-       case "$VENDOR" in
-               fedora)     DEFAULT_PACKAGE=rpm ;;
-               redhat)     DEFAULT_PACKAGE=rpm ;;
-               sles)       DEFAULT_PACKAGE=rpm ;;
-               ubuntu)     DEFAULT_PACKAGE=deb ;;
-               debian)     DEFAULT_PACKAGE=deb ;;
-               slackware)  DEFAULT_PACKAGE=tgz ;;
-               *)          DEFAULT_PACKAGE=rpm ;;
-       esac
-
-       { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5
-$as_echo "$DEFAULT_PACKAGE" >&6; }
-
-
-
 
-        SPL_CONFIG=all
+       SPL_CONFIG=all
 
 # Check whether --with-config was given.
 if test "${with_config+set}" = set; then
   withval=$with_config; SPL_CONFIG="$withval"
 fi
 
+       # Check whether --enable-linux-builtin was given.
+if test "${enable_linux_builtin+set}" = set; then
+  enableval=$enable_linux_builtin;
+else
+  enable_linux_builtin=no
+fi
 
-        { $as_echo "$as_me:$LINENO: checking spl config" >&5
+
+       { $as_echo "$as_me:$LINENO: checking spl config" >&5
 $as_echo_n "checking spl config... " >&6; }
-        { $as_echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5
+       { $as_echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5
 $as_echo "$SPL_CONFIG" >&6; };
 
 
-        case "$SPL_CONFIG" in
-                kernel)
+       case "$SPL_CONFIG" in
+               kernel)
 
 
 # Check whether --with-linux was given.
@@ -11684,24 +11720,14 @@ $as_echo_n "checking kernel source directory... " >&6; }
                        sourcelink=$(readlink -f "$headersdir")
                else
                        sourcelink=$(ls -1d /usr/src/kernels/* \
-                                    /usr/src/linux-* \
+                                    /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
-                       { $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; }; }
+                       kernelsrc="Not found"
                fi
        else
                if test "$kernelsrc" = "NONE"; then
@@ -11711,6 +11737,18 @@ $as_echo "$as_me: error:
 
        { $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
@@ -11758,9 +11796,19 @@ $as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
        else
                { $as_echo "$as_me:$LINENO: result: Not found" >&5
 $as_echo "Not found" >&6; }
-               { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
+               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
@@ -11778,7 +11826,7 @@ $as_echo "$kernsrcver" >&6; }
        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 -f "$modpost"; then
+       if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then
                if grep -q Modules.symvers $modpost; then
                        LINUX_SYMBOLS=Modules.symvers
                else
@@ -11788,12 +11836,12 @@ $as_echo_n "checking kernel file name for module symbols... " >&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 your building with a custom kernel make sure the
+       *** 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 your building with a custom kernel make sure the
+       *** 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; }; }
@@ -11807,112 +11855,42 @@ $as_echo "$LINUX_SYMBOLS" >&6; }
 
 
 
-       { $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; }
+       if test "${LINUX_OBJ}" != "${LINUX}"; then
+               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.  */
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes"
 
 
-               #ifndef AUTOCONF_INCLUDED
-               #include <linux/config.h>
-               #endif
 
-int
-main (void)
-{
+       { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5
+$as_echo_n "checking whether debugging is enabled... " >&6; }
+       # Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug;
+else
+  enable_debug=no
+fi
 
-               #ifndef CONFIG_PREEMPT
-               #error CONFIG_PREEMPT not #defined
-               #endif
 
-  ;
-  return 0;
-}
+       if test "x$enable_debug" = xyes; then
 
-_ACEOF
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
+               DEBUG_CFLAGS="-DDEBUG -Werror"
+               DEBUG_SPL="_with_debug"
 
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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: 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; }; }
-
-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 -Wstrict-prototypes"
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5
-$as_echo_n "checking whether debugging is enabled... " >&6; }
-       # Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then
-  enableval=$enable_debug;
-else
-  enable_debug=no
-fi
-
-
-       if test "x$enable_debug" = xyes; then
-
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
-               DEBUG_CFLAGS="-DDEBUG -Werror"
-
-else
+else
 
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"
                DEBUG_CFLAGS="-DNDEBUG"
+               DEBUG_SPL="_without_debug"
 
 fi
 
 
 
+
        { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5
 $as_echo "$enable_debug" >&6; }
 
@@ -11921,20 +11899,28 @@ $as_echo "$enable_debug" >&6; }
 if test "${enable_debug_kmem+set}" = set; then
   enableval=$enable_debug_kmem;
 else
-  enable_debug_kmem=yes
+  enable_debug_kmem=no
 fi
 
 
        if test "x$enable_debug_kmem" = xyes; then
 
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+               DEBUG_KMEM="_with_debug_kmem"
+
 cat >>confdefs.h <<\_ACEOF
 #define DEBUG_KMEM 1
 _ACEOF
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+
+else
+
+               DEBUG_KMEM="_without_debug_kmem"
+
 fi
 
 
+
        { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5
 $as_echo_n "checking whether basic kmem accounting is enabled... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5
 
        if test "x$enable_debug_kmem_tracking" = xyes; then
 
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+               DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
+
 cat >>confdefs.h <<\_ACEOF
 #define DEBUG_KMEM_TRACKING 1
 _ACEOF
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+
+else
+
+               DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
+
 fi
 
 
+
        { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5
 $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5
 $as_echo "$enable_debug_kmem_tracking" >&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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main (void)
+{
+
+  ;
+  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; }
+
+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
+
+
+
+       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(
+                                   "$SPL_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 SPL_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
+
+
 
        # Check whether --enable-atomic-spinlocks was given.
 if test "${enable_atomic_spinlocks+set}" = set; then
@@ -11983,7 +12127,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <asm/atomic.h>
+               #include <linux/fs.h>
 
 int
 main (void)
@@ -11998,9 +12142,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12085,8 +12231,11 @@ $as_echo_n "checking whether kernel defines atomic64_t... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5
 $as_echo "$have_atomic64_t" >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5
-$as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&6; }
+
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
+                                       { $as_echo "$as_me:$LINENO: checking whether old 2-argument shrinker exists" >&5
+$as_echo_n "checking whether old 2-argument shrinker exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12097,14 +12246,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <asm/atomic.h>
-               #include <asm/system.h>
+               #include <linux/mm.h>
+
+               int shrinker_cb(int nr_to_scan, gfp_t gfp_mask);
 
 int
 main (void)
 {
 
-               atomic64_cmpxchg((atomic64_t *)NULL, 0, 0);
+               struct shrinker cache_shrinker = {
+                       .shrink = shrinker_cb,
+                       .seeks = DEFAULT_SEEKS,
+               };
+               register_shrinker(&cache_shrinker);
 
   ;
   return 0;
@@ -12113,9 +12267,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12131,7 +12287,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ATOMIC64_CMPXCHG 1
+#define HAVE_2ARGS_OLD_SHRINKER_CALLBACK 1
 _ACEOF
 
 
@@ -12141,17 +12297,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 kernel defines atomic64_xchg" >&5
-$as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; }
+                                                                                               { $as_echo "$as_me:$LINENO: checking whether old 3-argument shrinker exists" >&5
+$as_echo_n "checking whether old 3-argument shrinker exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12162,13 +12309,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <asm/atomic.h>
+                       #include <linux/mm.h>
+
+                       int shrinker_cb(struct shrinker *, int nr_to_scan,
+                                       gfp_t gfp_mask);
 
 int
 main (void)
 {
 
-               atomic64_xchg((atomic64_t *)NULL, 0);
+                       struct shrinker cache_shrinker = {
+                               .shrink = shrinker_cb,
+                               .seeks = DEFAULT_SEEKS,
+                       };
+                       register_shrinker(&cache_shrinker);
 
   ;
   return 0;
@@ -12177,9 +12331,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12191,11 +12347,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_ATOMIC64_XCHG 1
+#define HAVE_3ARGS_SHRINKER_CALLBACK 1
 _ACEOF
 
 
@@ -12203,19 +12359,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
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5
-$as_echo_n "checking whether kernel defines uintptr_t... " >&6; }
+                                                                                                                                               { $as_echo "$as_me:$LINENO: checking whether new 2-argument shrinker exists" >&5
+$as_echo_n "checking whether new 2-argument shrinker exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12226,13 +12373,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/types.h>
+                               #include <linux/mm.h>
+
+                               int shrinker_cb(struct shrinker *,
+                                               struct shrink_control *sc);
 
 int
 main (void)
 {
 
-               uintptr_t *ptr __attribute__ ((unused));
+                               struct shrinker cache_shrinker = {
+                                       .shrink = shrinker_cb,
+                                       .seeks = DEFAULT_SEEKS,
+                               };
+                               register_shrinker(&cache_shrinker);
 
   ;
   return 0;
@@ -12241,9 +12395,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12255,11 +12411,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_UINTPTR_T 1
+#define HAVE_2ARGS_NEW_SHRINKER_CALLBACK 1
 _ACEOF
 
 
@@ -12267,19 +12423,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
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5
-$as_echo_n "checking whether INIT_WORK wants 3 args... " >&6; }
+                                                                                                                                                                                               { $as_echo "$as_me:$LINENO: checking whether ->count_objects callback exists" >&5
+$as_echo_n "checking whether ->count_objects callback exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12290,14 +12437,22 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/workqueue.h>
+                                       #include <linux/mm.h>
+
+                                       unsigned long shrinker_cb(
+                                               struct shrinker *,
+                                               struct shrink_control *sc);
 
 int
 main (void)
 {
 
-               struct work_struct work __attribute__ ((unused));
-               INIT_WORK(&work, NULL, NULL);
+                                       struct shrinker cache_shrinker = {
+                                               .count_objects = shrinker_cb,
+                                               .scan_objects = shrinker_cb,
+                                               .seeks = DEFAULT_SEEKS,
+                                       };
+                                       register_shrinker(&cache_shrinker);
 
   ;
   return 0;
@@ -12306,9 +12461,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12320,11 +12477,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_3ARGS_INIT_WORK 1
+#define HAVE_SPLIT_SHRINKER_CALLBACK 1
 _ACEOF
 
 
@@ -12332,8 +12489,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: error" >&5
+$as_echo "$as_me: error: error" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5
-$as_echo_n "checking whether register_sysctl_table() 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/sysctl.h>
-
-int
-main (void)
-{
-
-               (void) register_sysctl_table(NULL, 0);
+fi
 
-  ;
-  return 0;
-}
+       rm -Rf build
 
-_ACEOF
 
 
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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_2ARGS_REGISTER_SYSCTL 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 set_shrinker() available" >&5
-$as_echo_n "checking whether set_shrinker() available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5
+$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12420,13 +12539,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/sysctl.h>
 
 int
 main (void)
 {
 
-               return set_shrinker(DEFAULT_SEEKS, NULL);
+               struct ctl_table ctl __attribute__ ((unused));
+               ctl.ctl_name = 0;
 
   ;
   return 0;
@@ -12435,9 +12555,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12453,7 +12575,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_SHRINKER 1
+#define HAVE_CTL_NAME 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether shrinker callback wants 3 args" >&5
-$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+
+       { $as_echo "$as_me:$LINENO: checking whether CONFIG_TRIM_UNUSED_KSYM is disabled" >&5
+$as_echo_n "checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12486,20 +12607,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
-
-               int shrinker_cb(struct shrinker *, int, unsigned int);
+               #if defined(CONFIG_TRIM_UNUSED_KSYMS)
+               #error CONFIG_TRIM_UNUSED_KSYMS not defined
+               #endif
 
 int
 main (void)
 {
 
-               struct shrinker cache_shrinker = {
-                       .shrink = shrinker_cb,
-                       .seeks = DEFAULT_SEEKS,
-               };
-               register_shrinker(&cache_shrinker);
-
   ;
   return 0;
 }
@@ -12507,9 +12622,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12524,17 +12641,19 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_3ARGS_SHRINKER_CALLBACK 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: error:
+       *** This kernel has unused symbols trimming enabled, please disable.
+       *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set." >&5
+$as_echo "$as_me: error:
+       *** This kernel has unused symbols trimming enabled, please disable.
+       *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set." >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5
-$as_echo_n "checking whether struct path used in struct nameidata... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether PDE_DATA() is available" >&5
+$as_echo_n "checking whether PDE_DATA() is available... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12557,16 +12677,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/namei.h>
+               #include <linux/proc_fs.h>
 
 int
 main (void)
 {
 
-               struct nameidata nd __attribute__ ((unused));
-
-               nd.path.mnt = NULL;
-               nd.path.dentry = NULL;
+               PDE_DATA(NULL);
 
   ;
   return 0;
@@ -12575,9 +12692,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12588,22 +12707,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_PATH_IN_NAMEIDATA 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; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5
-$as_echo_n "checking whether symbol task_curr is exported... " >&6; }
-       grep -q -E '[[:space:]]task_curr[[:space:]]' \
+       grep -q -E '[[:space:]]PDE_DATA[[:space:]]' \
                $LINUX_OBJ/Module*.symvers 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in kernel/sched.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(task_curr)" \
+               for file in ; do
+                       grep -q -E "EXPORT_SYMBOL.*(PDE_DATA)" \
                                "$LINUX_OBJ/$file" 2>/dev/null
                        rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
                done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-               else
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+               fi
+               if test $rc -ne 0; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TASK_CURR 1
-_ACEOF
+               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
 
-               fi
-       else
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_TASK_CURR 1
+#define HAVE_PDE_DATA 1
 _ACEOF
 
+
+               fi
        fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5
-$as_echo_n "checking whether unnumbered sysctl support exists... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
+       { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() requires const struct path *" >&5
+$as_echo_n "checking whether set_fs_pwd() requires const struct path *... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12665,15 +12784,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sysctl.h>
+               #include <linux/spinlock.h>
+               #include <linux/fs_struct.h>
+               #include <linux/path.h>
+               void (*const set_fs_pwd_func)
+                       (struct fs_struct *, const struct path *)
+                       = set_fs_pwd;
 
 int
 main (void)
 {
 
-               #ifndef CTL_UNNUMBERED
-               #error CTL_UNNUMBERED undefined
-               #endif
+               return 0;
 
   ;
   return 0;
@@ -12682,9 +12804,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12700,7 +12824,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CTL_UNNUMBERED 1
+#define HAVE_SET_FS_PWD_WITH_CONST 1
 _ACEOF
 
 
@@ -12708,9 +12832,63 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+
+
+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/spinlock.h>
+                       #include <linux/fs_struct.h>
+                       #include <linux/path.h>
+                       void (*const set_fs_pwd_func)
+                               (struct fs_struct *, struct path *)
+                               = set_fs_pwd;
+
+int
+main (void)
+{
+
+                       return 0;
+
+  ;
+  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: 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: error: unknown" >&5
+$as_echo "$as_me: error: unknown" >&2;}
+   { (exit 1); exit 1; }; }
+
 
 
 fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5
-$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; }
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+       { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5
+$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12732,14 +12918,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sysctl.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct ctl_table ctl __attribute__ ((unused));
-               ctl.ctl_name = 0;
+               vfs_unlink((struct inode *) NULL, (struct dentry *) NULL);
 
   ;
   return 0;
@@ -12748,9 +12933,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12766,7 +12953,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CTL_NAME 1
+#define HAVE_2ARGS_VFS_UNLINK 1
 _ACEOF
 
 
@@ -12776,17 +12963,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 fls64() is available" >&5
-$as_echo_n "checking whether fls64() is available... " >&6; }
+                                                                               { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 3 args" >&5
+$as_echo_n "checking whether vfs_unlink() wants 3 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12797,13 +12975,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bitops.h>
+                       #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               return fls64(0);
+                       vfs_unlink((struct inode *) NULL,
+                               (struct dentry *) NULL,
+                               (struct inode **) NULL);
 
   ;
   return 0;
@@ -12812,9 +12992,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12826,11 +13008,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_FLS64 1
+#define HAVE_3ARGS_VFS_UNLINK 1
 _ACEOF
 
 
@@ -12838,8 +13020,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" >&5
+$as_echo "$as_me: error: no" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5
-$as_echo_n "checking whether symbol device_create is exported... " >&6; }
-       grep -q -E '[[:space:]]device_create[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in drivers/base/core.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(device_create)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_DEVICE_CREATE 1
-_ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DEVICE_CREATE 1
-_ACEOF
+fi
 
-       fi
+       rm -Rf build
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5
-$as_echo_n "checking whether device_create() wants 5 args... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+       { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5
+$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -12905,13 +13053,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/device.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               device_create(NULL, NULL, 0, NULL, "%d", 1);
+               vfs_rename((struct inode *) NULL, (struct dentry *) NULL,
+                       (struct inode *) NULL, (struct dentry *) NULL);
 
   ;
   return 0;
@@ -12920,9 +13069,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -12938,7 +13089,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_5ARGS_DEVICE_CREATE 1
+#define HAVE_4ARGS_VFS_RENAME 1
 _ACEOF
 
 
@@ -12948,101 +13099,158 @@ 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 vfs_rename() wants 5 args" >&5
+$as_echo_n "checking whether vfs_rename() 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.  */
 
-fi
 
-       rm -Rf build
+                       #include <linux/fs.h>
 
+int
+main (void)
+{
 
-       EXTRA_KCFLAGS="$tmp_flags"
+                       vfs_rename((struct inode *) NULL,
+                               (struct dentry *) NULL,
+                               (struct inode *) NULL,
+                               (struct dentry *) NULL,
+                               (struct inode **) NULL);
 
+  ;
+  return 0;
+}
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5
-$as_echo_n "checking whether symbol class_device_create is exported... " >&6; }
-       grep -q -E '[[:space:]]class_device_create[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in drivers/base/class.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&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
 
-               else
                        { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLASS_DEVICE_CREATE 1
+#define HAVE_5ARGS_VFS_RENAME 1
 _ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLASS_DEVICE_CREATE 1
+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 vfs_rename() wants 6 args" >&5
+$as_echo_n "checking whether vfs_rename() 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.  */
 
-       fi
 
+                               #include <linux/fs.h>
 
+int
+main (void)
+{
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5
-$as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6; }
-       grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in kernel/time.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                               vfs_rename((struct inode *) NULL,
+                                       (struct dentry *) NULL,
+                                       (struct inode *) NULL,
+                                       (struct dentry *) NULL,
+                                       (struct inode **) NULL,
+                                       (unsigned int) 0);
 
-               else
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1
 _ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&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 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_SET_NORMALIZED_TIMESPEC_EXPORT 1
+#define HAVE_6ARGS_VFS_RENAME 1
 _ACEOF
 
-       fi
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                               { { $as_echo "$as_me:$LINENO: error: no" >&5
+$as_echo "$as_me: error: no" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5
-$as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() wants 2 args" >&5
+$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13053,14 +13261,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/time.h>
-               void set_normalized_timespec(struct timespec *ts,
-                                            time_t sec, long nsec) { }
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
+               vfs_fsync(NULL, 0);
+
   ;
   return 0;
 }
@@ -13068,9 +13276,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13082,21 +13292,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_SET_NORMALIZED_TIMESPEC_INLINE 1
+#define HAVE_2ARGS_VFS_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
@@ -13106,8 +13316,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5
-$as_echo_n "checking whether timespec_sub() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether truncate_range() inode operation is available" >&5
+$as_echo_n "checking whether truncate_range() inode operation is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13118,16 +13328,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/time.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct timespec a = { 0 };
-               struct timespec b = { 0 };
-               struct timespec c __attribute__ ((unused));
-               c = timespec_sub(a, b);
+               struct inode_operations ops;
+               ops.truncate_range = NULL;
 
   ;
   return 0;
@@ -13136,9 +13344,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13154,7 +13364,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIMESPEC_SUB 1
+#define HAVE_INODE_TRUNCATE_RANGE 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5
-$as_echo_n "checking whether init_utsname() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5
+$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13186,14 +13398,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/utsname.h>
+               #include <linux/sched.h>
+               #include <linux/fs_struct.h>
 
 int
 main (void)
 {
 
-               struct new_utsname *a __attribute__ ((unused));
-               a = init_utsname();
+               static struct fs_struct fs;
+               spin_lock_init(&fs.lock);
 
   ;
   return 0;
@@ -13202,9 +13415,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13220,7 +13435,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_INIT_UTSNAME 1
+#define HAVE_FS_STRUCT_SPINLOCK 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5
-$as_echo_n "checking whether header linux/fdtable.h exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether kuid_t/kgid_t is available" >&5
+$as_echo_n "checking whether kuid_t/kgid_t is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13252,13 +13468,56 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fdtable.h>
+               #include <linux/uidgid.h>
 
 int
 main (void)
 {
 
-               return 0;
+               kuid_t userid = KUIDT_INIT(0);
+               kgid_t groupid = KGIDT_INIT(0);
+
+  ;
+  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
+
+
+
+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_t userid = 0;
+                       kgid_t groupid = 0;
 
   ;
   return 0;
@@ -13267,9 +13526,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13281,13 +13542,27 @@ _ACEOF
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
+                       { $as_echo "$as_me:$LINENO: result: yes; optional" >&5
+$as_echo "yes; optional" >&6; }
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       { $as_echo "$as_me:$LINENO: result: yes; mandatory" >&5
+$as_echo "yes; mandatory" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FDTABLE_HEADER 1
+#define HAVE_KUIDGID_T 1
 _ACEOF
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+
+
+
+fi
+
+       rm -Rf build
+
 
 
 else
@@ -13299,7 +13574,6 @@ $as_echo "no" >&6; }
 
 
 
-
 fi
 
        rm -Rf build
@@ -13308,8 +13582,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5
-$as_echo_n "checking whether files_fdtable() is available... " >&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
@@ -13320,19 +13594,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sched.h>
-               #include <linux/file.h>
-               #ifdef HAVE_FDTABLE_HEADER
-               #include <linux/fdtable.h>
-               #endif
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct files_struct *files = current->files;
-               struct fdtable *fdt __attribute__ ((unused));
-               fdt = files_fdtable(files);
+               long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
+               struct file_operations fops __attribute__ ((unused)) = {
+                       .fallocate = fallocate,
+               };
 
   ;
   return 0;
@@ -13341,9 +13612,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13359,7 +13632,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FILES_FDTABLE 1
+#define HAVE_FILE_FALLOCATE 1
 _ACEOF
 
 
@@ -13379,8 +13652,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5
-$as_echo_n "checking whether header linux/uaccess.h exists... " >&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
@@ -13391,13 +13664,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/uaccess.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               return 0;
+               long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL;
+               struct inode_operations fops __attribute__ ((unused)) = {
+                       .fallocate = fallocate,
+               };
 
   ;
   return 0;
@@ -13406,9 +13682,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13420,14 +13698,13 @@ _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_UACCESS_HEADER 1
+#define HAVE_INODE_FALLOCATE 1
 _ACEOF
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
 
 else
   $as_echo "$as_me: failed program was:" >&5
@@ -13438,7 +13715,6 @@ $as_echo "no" >&6; }
 
 
 
-
 fi
 
        rm -Rf build
@@ -13446,9 +13722,8 @@ fi
 
 
 
-
-       { $as_echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5
-$as_echo_n "checking whether kmalloc_node() is available... " >&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
@@ -13459,14 +13734,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/slab.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               void *a __attribute__ ((unused));
-               a = kmalloc_node(1, GFP_KERNEL, 0);
+               long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
+               struct file_operations_no_const fops __attribute__ ((unused)) = {
+                       .fallocate = fallocate,
+               };
 
   ;
   return 0;
@@ -13475,9 +13752,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13493,7 +13772,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_KMALLOC_NODE 1
+#define HAVE_FILE_FALLOCATE 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5
-$as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; }
-       grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_MONOTONIC_CLOCK 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MONOTONIC_CLOCK 1
-_ACEOF
-
-       fi
-
-
 
-       { $as_echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5
-$as_echo_n "checking whether struct inode has i_mutex... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether CONFIG_ZLIB_INFLATE is defined" >&5
+$as_echo_n "checking whether CONFIG_ZLIB_INFLATE is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13566,16 +13805,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
-               #include <linux/mutex.h>
+               #if !defined(CONFIG_ZLIB_INFLATE) && \
+                   !defined(CONFIG_ZLIB_INFLATE_MODULE)
+               #error CONFIG_ZLIB_INFLATE not defined
+               #endif
 
 int
 main (void)
 {
 
-               struct inode i;
-               mutex_init(&i.i_mutex);
-
   ;
   return 0;
 }
@@ -13583,9 +13821,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13600,17 +13840,19 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INODE_I_MUTEX 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: error:
+       *** This kernel does not include the required zlib inflate support.
+       *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." >&5
+$as_echo "$as_me: error:
+       *** This kernel does not include the required zlib inflate support.
+       *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
@@ -13621,8 +13863,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5
-$as_echo_n "checking whether struct mutex has owner... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether CONFIG_ZLIB_DEFLATE is defined" >&5
+$as_echo_n "checking whether CONFIG_ZLIB_DEFLATE is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13633,15 +13875,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mutex.h>
+               #if !defined(CONFIG_ZLIB_DEFLATE) && \
+                   !defined(CONFIG_ZLIB_DEFLATE_MODULE)
+               #error CONFIG_ZLIB_DEFLATE not defined
+               #endif
 
 int
 main (void)
 {
 
-               struct mutex mtx __attribute__ ((unused));
-               mtx.owner = NULL;
-
   ;
   return 0;
 }
@@ -13649,9 +13891,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13666,17 +13910,19 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MUTEX_OWNER 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: error:
+       *** This kernel does not include the required zlib deflate support.
+       *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." >&5
+$as_echo "$as_me: error:
+       *** This kernel does not include the required zlib deflate support.
+       *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
 
 
 
-
-       { $as_echo "$as_me:$LINENO: checking whether struct mutex owner is a task_struct" >&5
-$as_echo_n "checking whether struct mutex owner is a task_struct... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
+       { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5
+$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13701,14 +13944,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mutex.h>
+               #include <linux/zlib.h>
 
 int
 main (void)
 {
 
-               struct mutex mtx __attribute__ ((unused));
-               mtx.owner = current;
+               return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
 
   ;
   return 0;
@@ -13717,9 +13959,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13735,7 +13979,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_MUTEX_OWNER_TASK_STRUCT 1
+#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1
 _ACEOF
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5
-$as_echo_n "checking whether mutex_lock_nested() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5
+$as_echo_n "checking whether struct shrink_control exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13768,15 +14011,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mutex.h>
+               #include <linux/mm.h>
 
 int
 main (void)
 {
 
-               struct mutex mutex;
-               mutex_init(&mutex);
-               mutex_lock_nested(&mutex, 0);
+               struct shrink_control sc __attribute__ ((unused));
+
+               sc.nr_to_scan = 0;
+               sc.gfp_mask = GFP_KERNEL;
 
   ;
   return 0;
@@ -13785,9 +14029,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13803,7 +14049,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_MUTEX_LOCK_NESTED 1
+#define HAVE_SHRINK_CONTROL_STRUCT 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5
-$as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore member wait_lock is raw" >&5
+$as_echo_n "checking whether struct rw_semaphore member wait_lock is raw... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -13835,13 +14083,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/smp.h>
+               #include <linux/rwsem.h>
 
 int
 main (void)
 {
 
-               on_each_cpu(NULL, NULL, 0);
+               struct rw_semaphore dummy_semaphore __attribute__ ((unused));
+               raw_spinlock_t dummy_lock __attribute__ ((unused)) =
+                   __RAW_SPIN_LOCK_INITIALIZER(dummy_lock);
+               dummy_semaphore.wait_lock = dummy_lock;
 
   ;
   return 0;
@@ -13850,9 +14101,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -13868,7 +14121,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_3ARGS_ON_EACH_CPU 1
+#define RWSEM_SPINLOCK_IS_RAW 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5
-$as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; }
-       grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_KALLSYMS_LOOKUP_NAME 1
-_ACEOF
+       { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore has member activity" >&5
+$as_echo_n "checking whether struct rw_semaphore has member activity... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KALLSYMS_LOOKUP_NAME 1
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
 _ACEOF
-
-       fi
-
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5
-$as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; }
-       grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+               #include <linux/rwsem.h>
 
-               else
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+int
+main (void)
+{
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_VMALLOC_INFO 1
-_ACEOF
+               struct rw_semaphore dummy_semaphore __attribute__ ((unused));
+               dummy_semaphore.activity = 0;
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_VMALLOC_INFO 1
 _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
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5
-$as_echo_n "checking whether symbol *_pgdat exist... " >&6; }
-       grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null
-       rc=$?
-       if test $rc -eq 0; then
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_PGDAT_HELPERS 1
+#define HAVE_RWSEM_ACTIVITY 1
 _ACEOF
 
-       else
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-       fi
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5
-$as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; }
-       grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_FIRST_ONLINE_PGDAT 1
-_ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FIRST_ONLINE_PGDAT 1
-_ACEOF
+       rm -Rf build
 
-       fi
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5
-$as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; }
-       grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore has atomic_long_t member count" >&5
+$as_echo_n "checking whether struct rw_semaphore has atomic_long_t member count... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
-               else
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ONLINE_PGDAT 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
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ONLINE_PGDAT 1
-_ACEOF
+               #include <linux/rwsem.h>
 
-       fi
+int
+main (void)
+{
 
+               DECLARE_RWSEM(dummy_semaphore);
+               (void) atomic_long_read(&dummy_semaphore.count);
 
+  ;
+  return 0;
+}
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5
-$as_echo_n "checking whether symbol next_zone is exported... " >&6; }
-       grep -q -E '[[:space:]]next_zone[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(next_zone)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $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_NEXT_ZONE 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
 
-               fi
-       else
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ZONE 1
+#define HAVE_RWSEM_ATOMIC_LONG_COUNT 1
 _ACEOF
 
-       fi
-
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5
-$as_echo_n "checking whether symbol pgdat_list is exported... " >&6; }
-       grep -q -E '[[:space:]]pgdat_list[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_PGDAT_LIST 1
-_ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PGDAT_LIST 1
-_ACEOF
+fi
 
-       fi
+       rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5
-$as_echo_n "checking whether global_page_state() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether header linux/sched/rt.h exists" >&5
+$as_echo_n "checking whether header linux/sched/rt.h exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14164,14 +14295,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/sched.h>
+               #include <linux/sched/rt.h>
 
 int
 main (void)
 {
 
-               unsigned long state __attribute__ ((unused));
-               state = global_page_state(0);
+               return 0;
 
   ;
   return 0;
@@ -14180,9 +14311,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14194,13 +14327,13 @@ _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_GLOBAL_PAGE_STATE 1
+#define HAVE_SCHED_RT_HEADER 1
 _ACEOF
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
   $as_echo "$as_me: failed program was:" >&5
@@ -14217,9 +14350,8 @@ fi
 
 
 
-
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5
-$as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether header linux/sched/signal.h exists" >&5
+$as_echo_n "checking whether header linux/sched/signal.h exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14230,14 +14362,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/sched.h>
+               #include <linux/sched/signal.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_FREE_PAGES;
+               return 0;
 
   ;
   return 0;
@@ -14246,9 +14378,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14260,13 +14394,13 @@ _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_ZONE_STAT_ITEM_NR_FREE_PAGES 1
+#define HAVE_SCHED_SIGNAL_HEADER 1
 _ACEOF
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
   $as_echo "$as_me: failed program was:" >&5
@@ -14284,8 +14418,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5
-$as_echo_n "checking whether page state NR_INACTIVE is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 4 args" >&5
+$as_echo_n "checking whether vfs_getattr() wants 4 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14296,14 +14430,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_INACTIVE;
+               vfs_getattr((const struct path *)NULL,
+                       (struct kstat *)NULL,
+                       (u32)0,
+                       (unsigned int)0);
 
   ;
   return 0;
@@ -14312,9 +14448,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14330,7 +14468,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1
+#define HAVE_4ARGS_VFS_GETATTR 1
 _ACEOF
 
 
@@ -14349,8 +14487,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5
-$as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 3 args" >&5
+$as_echo_n "checking whether vfs_getattr() wants 3 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14361,14 +14500,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_INACTIVE_ANON;
+               vfs_getattr((struct vfsmount *)NULL,
+                       (struct dentry *)NULL,
+                       (struct kstat *)NULL);
 
   ;
   return 0;
@@ -14377,9 +14517,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14395,7 +14537,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 1
+#define HAVE_3ARGS_VFS_GETATTR 1
 _ACEOF
 
 
@@ -14414,8 +14556,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5
-$as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 2 args" >&5
+$as_echo_n "checking whether vfs_getattr() wants 2 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14426,14 +14569,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_INACTIVE_FILE;
+               vfs_getattr((struct path *) NULL,
+                       (struct kstat *)NULL);
 
   ;
   return 0;
@@ -14442,9 +14585,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14460,7 +14605,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 1
+#define HAVE_2ARGS_VFS_GETATTR 1
 _ACEOF
 
 
@@ -14480,8 +14625,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5
-$as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether usleep_range() is available" >&5
+$as_echo_n "checking whether usleep_range() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14492,14 +14637,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/delay.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_ACTIVE;
+               usleep_range(0, 0);
 
   ;
   return 0;
@@ -14508,9 +14652,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14526,7 +14672,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1
+#define HAVE_USLEEP_RANGE 1
 _ACEOF
 
 
@@ -14545,8 +14691,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5
-$as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether struct kmem_cache has allocflags" >&5
+$as_echo_n "checking whether struct kmem_cache has allocflags... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14557,14 +14704,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/slab.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_ACTIVE_ANON;
+               struct kmem_cache cachep __attribute__ ((unused));
+               cachep.allocflags = GFP_KERNEL;
 
   ;
   return 0;
@@ -14573,9 +14720,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14591,7 +14740,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1
+#define HAVE_KMEM_CACHE_ALLOCFLAGS 1
 _ACEOF
 
 
@@ -14602,16 +14751,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 page state NR_ACTIVE_FILE is available" >&5
-$as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; }
+               { $as_echo "$as_me:$LINENO: checking whether struct kmem_cache has gfpflags" >&5
+$as_echo_n "checking whether struct kmem_cache has gfpflags... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14622,14 +14763,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+                       #include <linux/slab.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_ACTIVE_FILE;
+                       struct kmem_cache cachep __attribute__ ((unused));
+                       cachep.gfpflags = GFP_KERNEL;
 
   ;
   return 0;
@@ -14638,9 +14779,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14652,11 +14795,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_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1
+#define HAVE_KMEM_CACHE_GFPFLAGS 1
 _ACEOF
 
 
@@ -14664,7 +14807,7 @@ 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; }
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5
-$as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; }
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether wait_on_bit() takes an action" >&5
+$as_echo_n "checking whether wait_on_bit() takes an action... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14688,26 +14839,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
+               #include <linux/wait.h>
 
 int
 main (void)
 {
 
-               #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES)
-               #error "global_page_state needs NR_FREE_PAGES"
-               #endif
-
-               #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \
-                   !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \
-                   !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE)
-               #error "global_page_state needs NR_ACTIVE*"
-               #endif
-
-               #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \
-                   !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \
-                   !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE)
-               #error "global_page_state needs NR_INACTIVE*"
-               #endif
+               int (*action)(void *) = NULL;
+               wait_on_bit(NULL, 0, action, 0);
 
   ;
   return 0;
@@ -14716,9 +14855,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14730,60 +14871,20 @@ _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 NEED_GET_ZONE_COUNTS 1
+#define HAVE_WAIT_ON_BIT_ACTION 1
 _ACEOF
 
 
-               { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5
-$as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; }
-       grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_ZONE_COUNTS 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_ZONE_COUNTS 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; }
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5
-$as_echo_n "checking whether symbol user_path_at is exported... " >&6; }
-       grep -q -E '[[:space:]]user_path_at[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_USER_PATH_DIR 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_USER_PATH_DIR 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5
-$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; }
-       grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_SET_FS_PWD 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_FS_PWD 1
-_ACEOF
-
-       fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5
-$as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether inode_lock_shared() exists" >&5
+$as_echo_n "checking whether inode_lock_shared() exists... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14887,14 +14909,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sched.h>
-               #include <linux/fs_struct.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               set_fs_pwd(NULL, NULL);
+               struct inode *inode = NULL;
+               inode_lock_shared(inode);
 
   ;
   return 0;
@@ -14903,9 +14925,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14921,7 +14945,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_SET_FS_PWD 1
+#define HAVE_INODE_LOCK_SHARED 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5
-$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether mutex has owner" >&5
+$as_echo_n "checking whether mutex has owner... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14952,13 +14980,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/mutex.h>
+               #include <linux/spinlock.h>
 
 int
 main (void)
 {
 
-               vfs_unlink(NULL, NULL);
+               DEFINE_MUTEX(m);
+               struct task_struct *t __attribute__ ((unused));
+               t = m.owner;
 
   ;
   return 0;
@@ -14967,9 +14998,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -14985,7 +15018,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_VFS_UNLINK 1
+#define HAVE_MUTEX_OWNER 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5
-$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether group_info->gid exists" >&5
+$as_echo_n "checking whether group_info->gid exists... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15016,13 +15053,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/cred.h>
 
 int
 main (void)
 {
 
-               vfs_rename(NULL, NULL, NULL, NULL);
+               struct group_info *gi = groups_alloc(1);
+               gi->gid[0] = KGIDT_INIT(0);
 
   ;
   return 0;
@@ -15031,9 +15069,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -15049,7 +15089,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_4ARGS_VFS_RENAME 1
+#define HAVE_GROUP_INFO_GID 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
+ ;;
+               user)      ;;
+               all)
 
-       { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5
-$as_echo_n "checking whether struct fs_struct uses spinlock_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/sched.h>
-               #include <linux/fs_struct.h>
-
-int
-main (void)
-{
 
-               struct fs_struct fs;
-               spin_lock_init(&fs.lock);
+# Check whether --with-linux was given.
+if test "${with_linux+set}" = set; then
+  withval=$with_linux; kernelsrc="$withval"
+fi
 
-  ;
-  return 0;
-}
 
-_ACEOF
 
+# Check whether --with-linux-obj was given.
+if test "${with_linux_obj+set}" = set; then
+  withval=$with_linux_obj; kernelbuild="$withval"
+fi
 
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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 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
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FS_STRUCT_SPINLOCK 1
-_ACEOF
+               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
+       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
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       { $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`
+               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: result: no" >&5
-$as_echo "no" >&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
 
-fi
+       { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
+$as_echo "$kernsrcver" >&6; }
 
-       rm -Rf build
+       LINUX=${kernelsrc}
+       LINUX_OBJ=${kernelbuild}
+       LINUX_VERSION=${kernsrcver}
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5
-$as_echo_n "checking whether struct cred 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 __attribute__ ((unused));
-               cr  = NULL;
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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_STRUCT 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 symbol groups_search is exported" >&5
-$as_echo_n "checking whether symbol groups_search is exported... " >&6; }
-       grep -q -E '[[:space:]]groups_search[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(groups_search)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_GROUPS_SEARCH 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GROUPS_SEARCH 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5
-$as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; }
-       grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_PUT_TASK_STRUCT 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PUT_TASK_STRUCT 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5
-$as_echo_n "checking whether proc_handler() 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/sysctl.h>
-
-int
-main (void)
-{
-
-               proc_dostring(NULL, 0, NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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_5ARGS_PROC_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 symbol kvasprintf is exported" >&5
-$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; }
-       grep -q -E '[[:space:]]kvasprintf[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_KVASPRINTF 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KVASPRINTF 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether file_fsync() wants 3 args" >&5
-$as_echo_n "checking whether file_fsync() 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/buffer_head.h>
-
-int
-main (void)
-{
-
-               file_fsync(NULL, NULL, 0);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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_3ARGS_FILE_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 symbol rwsem_is_locked is exported" >&5
-$as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; }
-       grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in lib/rwsem-spinlock.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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 RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes is exported" >&5
-$as_echo_n "checking whether symbol invalidate_inodes is exported... " >&6; }
-       grep -q -E '[[:space:]]invalidate_inodes[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_INVALIDATE_INODES 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INVALIDATE_INODES 1
-_ACEOF
-
-       fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5
-$as_echo_n "checking whether invalidate_inodes() 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)
-{
-
-               return __invalidate_device(NULL, 0);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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_2ARGS_INVALIDATE_INODES 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 symbol shrink_dcache_memory is exported" >&5
-$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; }
-       grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_SHRINK_DCACHE_MEMORY 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK_DCACHE_MEMORY 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5
-$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; }
-       grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_SHRINK_ICACHE_MEMORY 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK_ICACHE_MEMORY 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5
-$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; }
-       grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/namei.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_KERN_PATH_PARENT 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KERN_PATH_PARENT 1
-_ACEOF
-
-       fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5
-$as_echo_n "checking whether zlib_deflate_workspacesize() 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/zlib.h>
-
-int
-main (void)
-{
-
-               return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 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 struct shrink_control exists" >&5
-$as_echo_n "checking whether struct shrink_control 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>
-
-int
-main (void)
-{
-
-               struct shrink_control sc __attribute__ ((unused));
-
-               sc.nr_to_scan = 0;
-               sc.gfp_mask = GFP_KERNEL;
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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_CONTROL_STRUCT 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
-
-
-
- ;;
-                user)      ;;
-                all)
-
-
-# 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
-                       { $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
-       else
-               if test "$kernelsrc" = "NONE"; then
-                       kernsrcver=NONE
-               fi
-       fi
-
-       { $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`
-               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; }
-               { { $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; }; }
-       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 -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 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
-       else
-               LINUX_SYMBOLS=NONE
-       fi
-       { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
-$as_echo "$LINUX_SYMBOLS" >&6; }
-
-
-
-
-       { $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; }
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-               #ifndef AUTOCONF_INCLUDED
-               #include <linux/config.h>
-               #endif
-
-int
-main (void)
-{
-
-               #ifndef CONFIG_PREEMPT
-               #error CONFIG_PREEMPT not #defined
-               #endif
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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
+       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
 
-               { $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
+               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:
-               *** Kernel built with CONFIG_PREEMPT which is not supported.
-               ** You must rebuild your kernel without this option." >&2;}
+       *** 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; }; }
-
-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
-
+               fi
+       else
+               LINUX_SYMBOLS=NONE
+       fi
+       { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
+$as_echo "$LINUX_SYMBOLS" >&6; }
 
 
 
 
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
                DEBUG_CFLAGS="-DDEBUG -Werror"
+               DEBUG_SPL="_with_debug"
 
 else
 
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"
                DEBUG_CFLAGS="-DNDEBUG"
+               DEBUG_SPL="_without_debug"
 
 fi
 
 
 
+
        { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5
 $as_echo "$enable_debug" >&6; }
 
 
        # Check whether --enable-debug-kmem was given.
 if test "${enable_debug_kmem+set}" = set; then
-  enableval=$enable_debug_kmem;
-else
-  enable_debug_kmem=yes
-fi
-
-
-       if test "x$enable_debug_kmem" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define DEBUG_KMEM 1
-_ACEOF
-
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
-fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5
-$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; }
-       { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5
-$as_echo "$enable_debug_kmem" >&6; }
-
-
-       # Check whether --enable-debug-kmem-tracking was given.
-if test "${enable_debug_kmem_tracking+set}" = set; then
-  enableval=$enable_debug_kmem_tracking;
-else
-  enable_debug_kmem_tracking=no
-fi
-
-
-       if test "x$enable_debug_kmem_tracking" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define DEBUG_KMEM_TRACKING 1
-_ACEOF
-
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
-fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5
-$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; }
-       { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5
-$as_echo "$enable_debug_kmem_tracking" >&6; }
-
-
-       # Check whether --enable-atomic-spinlocks was given.
-if test "${enable_atomic_spinlocks+set}" = set; then
-  enableval=$enable_atomic_spinlocks;
-else
-  enable_atomic_spinlocks=check
-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 <asm/atomic.h>
-
-int
-main (void)
-{
-
-               atomic64_t *ptr __attribute__ ((unused));
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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
-
-               have_atomic64_t=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ATOMIC64_T 1
-_ACEOF
-
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               have_atomic64_t=no
-
-
-
-fi
-
-       rm -Rf build
-
-
-
-       if test "x$enable_atomic_spinlocks" = xcheck; then
-
-               if test "x$have_atomic64_t" = xyes; then
-
-                       enable_atomic_spinlocks=no
-
-else
-
-                       enable_atomic_spinlocks=yes
-
-fi
-
-
-fi
-
-
-       if test "x$enable_atomic_spinlocks" = xyes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define ATOMIC_SPINLOCK 1
-_ACEOF
-
-
-else
-
-               if test "x$have_atomic64_t" = xno; 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: --disable-atomic-spinlocks given but required atomic64 support is unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-fi
-
-
-fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5
-$as_echo_n "checking whether atomic types use spinlocks... " >&6; }
-       { $as_echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5
-$as_echo "$enable_atomic_spinlocks" >&6; }
-
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5
-$as_echo_n "checking whether kernel defines atomic64_t... " >&6; }
-       { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5
-$as_echo "$have_atomic64_t" >&6; }
-
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_cmpxchg" >&5
-$as_echo_n "checking whether kernel defines atomic64_cmpxchg... " >&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 <asm/atomic.h>
-               #include <asm/system.h>
-
-int
-main (void)
-{
-
-               atomic64_cmpxchg((atomic64_t *)NULL, 0, 0);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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_ATOMIC64_CMPXCHG 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; }
-
-
-
+  enableval=$enable_debug_kmem;
+else
+  enable_debug_kmem=no
 fi
 
-       rm -Rf build
 
+       if test "x$enable_debug_kmem" = xyes; then
+
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+               DEBUG_KMEM="_with_debug_kmem"
 
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_KMEM 1
+_ACEOF
 
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_xchg" >&5
-$as_echo_n "checking whether kernel defines atomic64_xchg... " >&6; }
 
+else
 
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               DEBUG_KMEM="_without_debug_kmem"
 
+fi
 
-               #include <asm/atomic.h>
 
-int
-main (void)
-{
 
-               atomic64_xchg((atomic64_t *)NULL, 0);
+       { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5
+$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5
+$as_echo "$enable_debug_kmem" >&6; }
 
-  ;
-  return 0;
-}
 
-_ACEOF
+       # Check whether --enable-debug-kmem-tracking was given.
+if test "${enable_debug_kmem_tracking+set}" = set; then
+  enableval=$enable_debug_kmem_tracking;
+else
+  enable_debug_kmem_tracking=no
+fi
 
 
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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
+       if test "x$enable_debug_kmem_tracking" = xyes; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+               DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ATOMIC64_XCHG 1
+#define DEBUG_KMEM_TRACKING 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; }
-
 
+               DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
 
 fi
 
-       rm -Rf build
 
 
+       { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5
+$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5
+$as_echo "$enable_debug_kmem_tracking" >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5
-$as_echo_n "checking whether kernel defines uintptr_t... " >&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
@@ -16426,14 +15388,10 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/types.h>
-
 int
 main (void)
 {
 
-               uintptr_t *ptr __attribute__ ((unused));
-
   ;
   return 0;
 }
@@ -16441,9 +15399,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -16458,17 +15418,25 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTPTR_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; }
+               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
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5
-$as_echo_n "checking whether INIT_WORK wants 3 args... " >&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/workqueue.h>
+                               #include "$LINUX/include/linux/license.h"
 
 int
-main (void)
+main ()
 {
 
-               struct work_struct work __attribute__ ((unused));
-               INIT_WORK(&work, NULL, NULL);
+                               return !license_is_gpl_compatible(
+                                   "$SPL_META_LICENSE");
 
   ;
   return 0;
 }
 
 _ACEOF
-
-
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (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_3ARGS_INIT_WORK 1
+#define SPL_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
 
 
 
 fi
 
-       rm -Rf build
 
 
+       # Check whether --enable-atomic-spinlocks was given.
+if test "${enable_atomic_spinlocks+set}" = set; then
+  enableval=$enable_atomic_spinlocks;
+else
+  enable_atomic_spinlocks=check
+fi
+
 
-       { $as_echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5
-$as_echo_n "checking whether register_sysctl_table() wants 2 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16555,13 +15545,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sysctl.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               (void) register_sysctl_table(NULL, 0);
+               atomic64_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -16570,9 +15560,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -16584,11 +15576,10 @@ _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; }
+               have_atomic64_t=yes
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_REGISTER_SYSCTL 1
+#define HAVE_ATOMIC64_T 1
 _ACEOF
 
 
@@ -16596,8 +15587,7 @@ 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; }
+               have_atomic64_t=no
 
 
 
 
 
 
+       if test "x$enable_atomic_spinlocks" = xcheck; then
 
-       { $as_echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5
-$as_echo_n "checking whether set_shrinker() 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.  */
+               if test "x$have_atomic64_t" = xyes; then
 
+                       enable_atomic_spinlocks=no
 
-               #include <linux/mm.h>
+else
 
-int
-main (void)
-{
+                       enable_atomic_spinlocks=yes
 
-               return set_shrinker(DEFAULT_SEEKS, NULL);
+fi
 
-  ;
-  return 0;
-}
 
-_ACEOF
+fi
 
 
-       rm -Rf build && mkdir -p build
-       echo "obj-m := conftest.o" >build/Makefile
-       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'
-  { (eval echo "$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
+       if test "x$enable_atomic_spinlocks" = xyes; then
 
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_SHRINKER 1
+#define ATOMIC_SPINLOCK 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$have_atomic64_t" = xno; 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: --disable-atomic-spinlocks given but required atomic64 support is unavailable
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --disable-atomic-spinlocks given but required atomic64 support is unavailable
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 
+fi
 
 
 fi
 
-       rm -Rf build
 
+       { $as_echo "$as_me:$LINENO: checking whether atomic types use spinlocks" >&5
+$as_echo_n "checking whether atomic types use spinlocks... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: $enable_atomic_spinlocks" >&5
+$as_echo "$enable_atomic_spinlocks" >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5
+$as_echo_n "checking whether kernel defines atomic64_t... " >&6; }
+       { $as_echo "$as_me:$LINENO: result: $have_atomic64_t" >&5
+$as_echo "$have_atomic64_t" >&6; }
 
 
-       { $as_echo "$as_me:$LINENO: checking whether shrinker callback wants 3 args" >&5
-$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
+                                       { $as_echo "$as_me:$LINENO: checking whether old 2-argument shrinker exists" >&5
+$as_echo_n "checking whether old 2-argument shrinker exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16688,7 +15666,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
                #include <linux/mm.h>
 
-               int shrinker_cb(struct shrinker *, int, unsigned int);
+               int shrinker_cb(int nr_to_scan, gfp_t gfp_mask);
 
 int
 main (void)
@@ -16707,9 +15685,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -16725,7 +15705,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_3ARGS_SHRINKER_CALLBACK 1
+#define HAVE_2ARGS_OLD_SHRINKER_CALLBACK 1
 _ACEOF
 
 
@@ -16735,18 +15715,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 struct path used in struct nameidata" >&5
-$as_echo_n "checking whether struct path used in struct nameidata... " >&6; }
+                                                                                               { $as_echo "$as_me:$LINENO: checking whether old 3-argument shrinker exists" >&5
+$as_echo_n "checking whether old 3-argument shrinker exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16757,16 +15727,20 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/namei.h>
+                       #include <linux/mm.h>
+
+                       int shrinker_cb(struct shrinker *, int nr_to_scan,
+                                       gfp_t gfp_mask);
 
 int
 main (void)
 {
 
-               struct nameidata nd __attribute__ ((unused));
-
-               nd.path.mnt = NULL;
-               nd.path.dentry = NULL;
+                       struct shrinker cache_shrinker = {
+                               .shrink = shrinker_cb,
+                               .seeks = DEFAULT_SEEKS,
+                       };
+                       register_shrinker(&cache_shrinker);
 
   ;
   return 0;
@@ -16775,9 +15749,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -16789,11 +15765,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_PATH_IN_NAMEIDATA 1
+#define HAVE_3ARGS_SHRINKER_CALLBACK 1
 _ACEOF
 
 
@@ -16801,60 +15777,74 @@ 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; }
+                                                                                                                                               { $as_echo "$as_me:$LINENO: checking whether new 2-argument shrinker exists" >&5
+$as_echo_n "checking whether new 2-argument shrinker 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
-
-       rm -Rf build
 
+                               #include <linux/mm.h>
 
+                               int shrinker_cb(struct shrinker *,
+                                               struct shrink_control *sc);
 
+int
+main (void)
+{
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5
-$as_echo_n "checking whether symbol task_curr is exported... " >&6; }
-       grep -q -E '[[:space:]]task_curr[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in kernel/sched.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(task_curr)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                               struct shrinker cache_shrinker = {
+                                       .shrink = shrinker_cb,
+                                       .seeks = DEFAULT_SEEKS,
+                               };
+                               register_shrinker(&cache_shrinker);
 
-               else
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TASK_CURR 1
 _ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&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 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_TASK_CURR 1
+#define HAVE_2ARGS_NEW_SHRINKER_CALLBACK 1
 _ACEOF
 
-       fi
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5
-$as_echo_n "checking whether unnumbered sysctl support exists... " >&6; }
+                               { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                                                                                                                                                                                               { $as_echo "$as_me:$LINENO: checking whether ->count_objects callback exists" >&5
+$as_echo_n "checking whether ->count_objects callback exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16865,15 +15855,22 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sysctl.h>
+                                       #include <linux/mm.h>
+
+                                       unsigned long shrinker_cb(
+                                               struct shrinker *,
+                                               struct shrink_control *sc);
 
 int
 main (void)
 {
 
-               #ifndef CTL_UNNUMBERED
-               #error CTL_UNNUMBERED undefined
-               #endif
+                                       struct shrinker cache_shrinker = {
+                                               .count_objects = shrinker_cb,
+                                               .scan_objects = shrinker_cb,
+                                               .seeks = DEFAULT_SEEKS,
+                                       };
+                                       register_shrinker(&cache_shrinker);
 
   ;
   return 0;
@@ -16882,9 +15879,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -16896,11 +15895,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_CTL_UNNUMBERED 1
+#define HAVE_SPLIT_SHRINKER_CALLBACK 1
 _ACEOF
 
 
@@ -16908,8 +15907,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: error" >&5
+$as_echo "$as_me: error: error" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+
+fi
+
+       rm -Rf build
+
+
 
 
 
@@ -16918,6 +15942,7 @@ fi
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
        { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5
@@ -16948,9 +15973,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -16985,8 +16012,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5
-$as_echo_n "checking whether fls64() is available... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether CONFIG_TRIM_UNUSED_KSYM is disabled" >&5
+$as_echo_n "checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16997,14 +16025,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/bitops.h>
+               #if defined(CONFIG_TRIM_UNUSED_KSYMS)
+               #error CONFIG_TRIM_UNUSED_KSYMS not defined
+               #endif
 
 int
 main (void)
 {
 
-               return fls64(0);
-
   ;
   return 0;
 }
@@ -17012,9 +16040,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17029,17 +16059,19 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FLS64 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: error:
+       *** This kernel has unused symbols trimming enabled, please disable.
+       *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set." >&5
+$as_echo "$as_me: error:
+       *** This kernel has unused symbols trimming enabled, please disable.
+       *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set." >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5
-$as_echo_n "checking whether symbol device_create is exported... " >&6; }
-       grep -q -E '[[:space:]]device_create[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in drivers/base/core.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(device_create)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_DEVICE_CREATE 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DEVICE_CREATE 1
-_ACEOF
-
-       fi
-
-
+       { $as_echo "$as_me:$LINENO: checking whether PDE_DATA() is available" >&5
+$as_echo_n "checking whether PDE_DATA() is available... " >&6; }
 
-       { $as_echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5
-$as_echo_n "checking whether device_create() wants 5 args... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17105,13 +16095,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/device.h>
+               #include <linux/proc_fs.h>
 
 int
 main (void)
 {
 
-               device_create(NULL, NULL, 0, NULL, "%d", 1);
+               PDE_DATA(NULL);
 
   ;
   return 0;
@@ -17120,9 +16110,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17133,22 +16125,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_5ARGS_DEVICE_CREATE 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; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5
-$as_echo_n "checking whether symbol class_device_create is exported... " >&6; }
-       grep -q -E '[[:space:]]class_device_create[[:space:]]' \
+       grep -q -E '[[:space:]]PDE_DATA[[:space:]]' \
                $LINUX_OBJ/Module*.symvers 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in drivers/base/class.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \
+               for file in ; do
+                       grep -q -E "EXPORT_SYMBOL.*(PDE_DATA)" \
                                "$LINUX_OBJ/$file" 2>/dev/null
                        rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
                done
-               if test $export -eq 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_CLASS_DEVICE_CREATE 1
-_ACEOF
-
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
                fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CLASS_DEVICE_CREATE 1
-_ACEOF
-
+       else :
+               rc=0
        fi
 
+               fi
+               if test $rc -ne 0; then :
 
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5
-$as_echo_n "checking whether symbol set_normalized_timespec is exported... " >&6; }
-       grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in kernel/time.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_SET_NORMALIZED_TIMESPEC_EXPORT 1
-_ACEOF
+               else :
 
-               fi
-       else
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1
+#define HAVE_PDE_DATA 1
 _ACEOF
 
-       fi
 
+               fi
+       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5
-$as_echo_n "checking whether set_normalized_timespec() is an inline... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
+       { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() requires const struct path *" >&5
+$as_echo_n "checking whether set_fs_pwd() requires const struct path *... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17253,14 +16202,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/time.h>
-               void set_normalized_timespec(struct timespec *ts,
-                                            time_t sec, long nsec) { }
+               #include <linux/spinlock.h>
+               #include <linux/fs_struct.h>
+               #include <linux/path.h>
+               void (*const set_fs_pwd_func)
+                       (struct fs_struct *, const struct path *)
+                       = set_fs_pwd;
 
 int
 main (void)
 {
 
+               return 0;
+
   ;
   return 0;
 }
@@ -17268,9 +16222,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17282,33 +16238,19 @@ _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_SET_NORMALIZED_TIMESPEC_INLINE 1
+#define HAVE_SET_FS_PWD_WITH_CONST 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 timespec_sub() is available" >&5
-$as_echo_n "checking whether timespec_sub() is available... " >&6; }
-
 
 cat confdefs.h - <<_ACEOF >conftest.c
 /* confdefs.h.  */
@@ -17318,16 +16260,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/time.h>
+                       #include <linux/spinlock.h>
+                       #include <linux/fs_struct.h>
+                       #include <linux/path.h>
+                       void (*const set_fs_pwd_func)
+                               (struct fs_struct *, struct path *)
+                               = set_fs_pwd;
 
 int
 main (void)
 {
 
-               struct timespec a = { 0 };
-               struct timespec b = { 0 };
-               struct timespec c __attribute__ ((unused));
-               c = timespec_sub(a, b);
+                       return 0;
 
   ;
   return 0;
@@ -17336,9 +16280,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17350,20 +16296,16 @@ _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_TIMESPEC_SUB 1
-_ACEOF
-
+                       { $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: no" >&5
-$as_echo "no" >&6; }
+                       { { $as_echo "$as_me:$LINENO: error: unknown" >&5
+$as_echo "$as_me: error: unknown" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5
-$as_echo_n "checking whether init_utsname() is available... " >&6; }
+
+fi
+
+       rm -Rf build
+
+
+       EXTRA_KCFLAGS="$tmp_flags"
+
+       { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5
+$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17386,14 +16336,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/utsname.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct new_utsname *a __attribute__ ((unused));
-               a = init_utsname();
+               vfs_unlink((struct inode *) NULL, (struct dentry *) NULL);
 
   ;
   return 0;
@@ -17402,9 +16351,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17420,7 +16371,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_INIT_UTSNAME 1
+#define HAVE_2ARGS_VFS_UNLINK 1
 _ACEOF
 
 
@@ -17430,18 +16381,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 header linux/fdtable.h exists" >&5
-$as_echo_n "checking whether header linux/fdtable.h exists... " >&6; }
+                                                                               { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 3 args" >&5
+$as_echo_n "checking whether vfs_unlink() wants 3 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17452,13 +16393,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fdtable.h>
+                       #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               return 0;
+                       vfs_unlink((struct inode *) NULL,
+                               (struct dentry *) NULL,
+                               (struct inode **) NULL);
 
   ;
   return 0;
@@ -17467,9 +16410,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17481,22 +16426,21 @@ _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_FDTABLE_HEADER 1
+#define HAVE_3ARGS_VFS_UNLINK 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
 
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+                       { { $as_echo "$as_me:$LINENO: error: no" >&5
+$as_echo "$as_me: error: no" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5
-$as_echo_n "checking whether files_fdtable() is available... " >&6; }
+
+fi
+
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5
+$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17520,19 +16471,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sched.h>
-               #include <linux/file.h>
-               #ifdef HAVE_FDTABLE_HEADER
-               #include <linux/fdtable.h>
-               #endif
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct files_struct *files = current->files;
-               struct fdtable *fdt __attribute__ ((unused));
-               fdt = files_fdtable(files);
+               vfs_rename((struct inode *) NULL, (struct dentry *) NULL,
+                       (struct inode *) NULL, (struct dentry *) NULL);
 
   ;
   return 0;
@@ -17541,9 +16487,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17559,7 +16507,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FILES_FDTABLE 1
+#define HAVE_4ARGS_VFS_RENAME 1
 _ACEOF
 
 
@@ -17569,18 +16517,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 header linux/uaccess.h exists" >&5
-$as_echo_n "checking whether header linux/uaccess.h exists... " >&6; }
+                                                                               { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 5 args" >&5
+$as_echo_n "checking whether vfs_rename() wants 5 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17591,13 +16529,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/uaccess.h>
+                       #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               return 0;
+                       vfs_rename((struct inode *) NULL,
+                               (struct dentry *) NULL,
+                               (struct inode *) NULL,
+                               (struct dentry *) NULL,
+                               (struct inode **) NULL);
 
   ;
   return 0;
@@ -17606,9 +16548,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17620,35 +16564,22 @@ _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_UACCESS_HEADER 1
+#define HAVE_5ARGS_VFS_RENAME 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
-
-               { $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: checking whether kmalloc_node() is available" >&5
-$as_echo_n "checking whether kmalloc_node() is available... " >&6; }
+                       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                                                                                                                       { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 6 args" >&5
+$as_echo_n "checking whether vfs_rename() wants 6 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17659,14 +16590,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/slab.h>
+                               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               void *a __attribute__ ((unused));
-               a = kmalloc_node(1, GFP_KERNEL, 0);
+                               vfs_rename((struct inode *) NULL,
+                                       (struct dentry *) NULL,
+                                       (struct inode *) NULL,
+                                       (struct dentry *) NULL,
+                                       (struct inode **) NULL,
+                                       (unsigned int) 0);
 
   ;
   return 0;
@@ -17675,9 +16610,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17689,11 +16626,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_KMALLOC_NODE 1
+#define HAVE_6ARGS_VFS_RENAME 1
 _ACEOF
 
 
@@ -17701,8 +16638,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" >&5
+$as_echo "$as_me: error: no" >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5
-$as_echo_n "checking whether symbol monotonic_clock is exported... " >&6; }
-       grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_MONOTONIC_CLOCK 1
-_ACEOF
+       rm -Rf build
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MONOTONIC_CLOCK 1
-_ACEOF
 
-       fi
+
+
+fi
+
+       rm -Rf build
+
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5
-$as_echo_n "checking whether struct inode has i_mutex... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether vfs_fsync() wants 2 args" >&5
+$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17767,14 +16680,12 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 
                #include <linux/fs.h>
-               #include <linux/mutex.h>
 
 int
 main (void)
 {
 
-               struct inode i;
-               mutex_init(&i.i_mutex);
+               vfs_fsync(NULL, 0);
 
   ;
   return 0;
@@ -17783,9 +16694,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17801,7 +16714,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_INODE_I_MUTEX 1
+#define HAVE_2ARGS_VFS_FSYNC 1
 _ACEOF
 
 
@@ -17821,8 +16734,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct mutex has owner" >&5
-$as_echo_n "checking whether struct mutex has owner... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether truncate_range() inode operation is available" >&5
+$as_echo_n "checking whether truncate_range() inode operation is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17833,14 +16746,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mutex.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct mutex mtx __attribute__ ((unused));
-               mtx.owner = NULL;
+               struct inode_operations ops;
+               ops.truncate_range = NULL;
 
   ;
   return 0;
@@ -17849,9 +16762,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17867,7 +16782,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_MUTEX_OWNER 1
+#define HAVE_INODE_TRUNCATE_RANGE 1
 _ACEOF
 
 
@@ -17887,8 +16802,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct mutex owner is a task_struct" >&5
-$as_echo_n "checking whether struct mutex owner is a task_struct... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5
+$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
 
@@ -17901,14 +16816,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mutex.h>
+               #include <linux/sched.h>
+               #include <linux/fs_struct.h>
 
 int
 main (void)
 {
 
-               struct mutex mtx __attribute__ ((unused));
-               mtx.owner = current;
+               static struct fs_struct fs;
+               spin_lock_init(&fs.lock);
 
   ;
   return 0;
@@ -17917,9 +16833,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17935,7 +16853,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_MUTEX_OWNER_TASK_STRUCT 1
+#define HAVE_FS_STRUCT_SPINLOCK 1
 _ACEOF
 
 
@@ -17956,8 +16874,8 @@ fi
        EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5
-$as_echo_n "checking whether mutex_lock_nested() is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether kuid_t/kgid_t is available" >&5
+$as_echo_n "checking whether kuid_t/kgid_t is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -17968,15 +16886,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mutex.h>
+               #include <linux/uidgid.h>
 
 int
 main (void)
 {
 
-               struct mutex mutex;
-               mutex_init(&mutex);
-               mutex_lock_nested(&mutex, 0);
+               kuid_t userid = KUIDT_INIT(0);
+               kgid_t groupid = KGIDT_INIT(0);
 
   ;
   return 0;
@@ -17985,9 +16902,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -17999,32 +16918,6 @@ _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_MUTEX_LOCK_NESTED 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 on_each_cpu() wants 3 args" >&5
-$as_echo_n "checking whether on_each_cpu() wants 3 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18035,13 +16928,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/smp.h>
+                       #include <linux/uidgid.h>
 
 int
 main (void)
 {
 
-               on_each_cpu(NULL, NULL, 0);
+                       kuid_t userid = 0;
+                       kgid_t groupid = 0;
 
   ;
   return 0;
@@ -18050,9 +16944,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18064,296 +16960,48 @@ _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_3ARGS_ON_EACH_CPU 1
-_ACEOF
-
+                       { $as_echo "$as_me:$LINENO: result: yes; optional" >&5
+$as_echo "yes; optional" >&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 symbol kallsyms_lookup_name is exported" >&5
-$as_echo_n "checking whether symbol kallsyms_lookup_name is exported... " >&6; }
-       grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_KALLSYMS_LOOKUP_NAME 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+                       { $as_echo "$as_me:$LINENO: result: yes; mandatory" >&5
+$as_echo "yes; mandatory" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_KALLSYMS_LOOKUP_NAME 1
+#define HAVE_KUIDGID_T 1
 _ACEOF
 
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5
-$as_echo_n "checking whether symbol get_vmalloc_info is exported... " >&6; }
-       grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_VMALLOC_INFO 1
-_ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_VMALLOC_INFO 1
-_ACEOF
 
-       fi
+fi
 
+       rm -Rf build
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5
-$as_echo_n "checking whether symbol *_pgdat exist... " >&6; }
-       grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null
-       rc=$?
-       if test $rc -eq 0; then
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PGDAT_HELPERS 1
-_ACEOF
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       else
                { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-       fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5
-$as_echo_n "checking whether symbol first_online_pgdat is exported... " >&6; }
-       grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_FIRST_ONLINE_PGDAT 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FIRST_ONLINE_PGDAT 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5
-$as_echo_n "checking whether symbol next_online_pgdat is exported... " >&6; }
-       grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_NEXT_ONLINE_PGDAT 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ONLINE_PGDAT 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5
-$as_echo_n "checking whether symbol next_zone is exported... " >&6; }
-       grep -q -E '[[:space:]]next_zone[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(next_zone)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_NEXT_ZONE 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEXT_ZONE 1
-_ACEOF
-
-       fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5
-$as_echo_n "checking whether symbol pgdat_list is exported... " >&6; }
-       grep -q -E '[[:space:]]pgdat_list[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_PGDAT_LIST 1
-_ACEOF
+fi
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+       rm -Rf build
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PGDAT_LIST 1
-_ACEOF
 
-       fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5
-$as_echo_n "checking whether global_page_state() is available... " >&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
@@ -18364,14 +17012,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               unsigned long state __attribute__ ((unused));
-               state = global_page_state(0);
+               long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
+               struct file_operations fops __attribute__ ((unused)) = {
+                       .fallocate = fallocate,
+               };
 
   ;
   return 0;
@@ -18380,9 +17030,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18398,7 +17050,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GLOBAL_PAGE_STATE 1
+#define HAVE_FILE_FALLOCATE 1
 _ACEOF
 
 
@@ -18418,8 +17070,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_FREE_PAGES is available" >&5
-$as_echo_n "checking whether page state NR_FREE_PAGES is available... " >&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
@@ -18430,14 +17082,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_FREE_PAGES;
+               long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL;
+               struct inode_operations fops __attribute__ ((unused)) = {
+                       .fallocate = fallocate,
+               };
 
   ;
   return 0;
@@ -18446,9 +17100,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18464,7 +17120,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES 1
+#define HAVE_INODE_FALLOCATE 1
 _ACEOF
 
 
@@ -18484,8 +17140,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE is available" >&5
-$as_echo_n "checking whether page state NR_INACTIVE is available... " >&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
@@ -18496,14 +17152,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_INACTIVE;
+               long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
+               struct file_operations_no_const fops __attribute__ ((unused)) = {
+                       .fallocate = fallocate,
+               };
 
   ;
   return 0;
@@ -18512,9 +17170,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18530,7 +17190,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE 1
+#define HAVE_FILE_FALLOCATE 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_ANON is available" >&5
-$as_echo_n "checking whether page state NR_INACTIVE_ANON is available... " >&6; }
+
+
+       { $as_echo "$as_me:$LINENO: checking whether CONFIG_ZLIB_INFLATE is defined" >&5
+$as_echo_n "checking whether CONFIG_ZLIB_INFLATE is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18561,15 +17223,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #if !defined(CONFIG_ZLIB_INFLATE) && \
+                   !defined(CONFIG_ZLIB_INFLATE_MODULE)
+               #error CONFIG_ZLIB_INFLATE not defined
+               #endif
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_INACTIVE_ANON;
-
   ;
   return 0;
 }
@@ -18577,9 +17239,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18594,17 +17258,19 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON 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: error:
+       *** This kernel does not include the required zlib inflate support.
+       *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." >&5
+$as_echo "$as_me: error:
+       *** This kernel does not include the required zlib inflate support.
+       *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
@@ -18614,8 +17280,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_INACTIVE_FILE is available" >&5
-$as_echo_n "checking whether page state NR_INACTIVE_FILE is available... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether CONFIG_ZLIB_DEFLATE is defined" >&5
+$as_echo_n "checking whether CONFIG_ZLIB_DEFLATE is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18626,15 +17293,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #if !defined(CONFIG_ZLIB_DEFLATE) && \
+                   !defined(CONFIG_ZLIB_DEFLATE_MODULE)
+               #error CONFIG_ZLIB_DEFLATE not defined
+               #endif
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_INACTIVE_FILE;
-
   ;
   return 0;
 }
@@ -18642,9 +17309,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18659,17 +17328,19 @@ _ACEOF
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE 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: error:
+       *** This kernel does not include the required zlib deflate support.
+       *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." >&5
+$as_echo "$as_me: error:
+       *** This kernel does not include the required zlib deflate support.
+       *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." >&2;}
+   { (exit 1); exit 1; }; }
 
 
 
@@ -18679,9 +17350,8 @@ fi
 
 
 
-
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE is available" >&5
-$as_echo_n "checking whether page state NR_ACTIVE is available... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5
+$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18692,14 +17362,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/zlib.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_ACTIVE;
+               return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
 
   ;
   return 0;
@@ -18708,9 +17377,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18726,7 +17397,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE 1
+#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1
 _ACEOF
 
 
@@ -18745,8 +17416,9 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_ANON is available" >&5
-$as_echo_n "checking whether page state NR_ACTIVE_ANON is available... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5
+$as_echo_n "checking whether struct shrink_control exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18763,8 +17435,10 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_ACTIVE_ANON;
+               struct shrink_control sc __attribute__ ((unused));
+
+               sc.nr_to_scan = 0;
+               sc.gfp_mask = GFP_KERNEL;
 
   ;
   return 0;
@@ -18773,9 +17447,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18791,7 +17467,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON 1
+#define HAVE_SHRINK_CONTROL_STRUCT 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether page state NR_ACTIVE_FILE is available" >&5
-$as_echo_n "checking whether page state NR_ACTIVE_FILE is available... " >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore member wait_lock is raw" >&5
+$as_echo_n "checking whether struct rw_semaphore member wait_lock is raw... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18822,14 +17501,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/rwsem.h>
 
 int
 main (void)
 {
 
-               enum zone_stat_item zsi __attribute__ ((unused));
-               zsi = NR_ACTIVE_FILE;
+               struct rw_semaphore dummy_semaphore __attribute__ ((unused));
+               raw_spinlock_t dummy_lock __attribute__ ((unused)) =
+                   __RAW_SPIN_LOCK_INITIALIZER(dummy_lock);
+               dummy_semaphore.wait_lock = dummy_lock;
 
   ;
   return 0;
@@ -18838,9 +17519,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18856,7 +17539,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE 1
+#define RWSEM_SPINLOCK_IS_RAW 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is needed" >&5
-$as_echo_n "checking whether symbol get_zone_counts is needed... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore has member activity" >&5
+$as_echo_n "checking whether struct rw_semaphore has member activity... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18888,26 +17574,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
+               #include <linux/rwsem.h>
 
 int
 main (void)
 {
 
-               #if !defined(HAVE_ZONE_STAT_ITEM_NR_FREE_PAGES)
-               #error "global_page_state needs NR_FREE_PAGES"
-               #endif
-
-               #if !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE) && \
-                   !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_ANON) && \
-                   !defined(HAVE_ZONE_STAT_ITEM_NR_ACTIVE_FILE)
-               #error "global_page_state needs NR_ACTIVE*"
-               #endif
-
-               #if !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE) && \
-                   !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_ANON) && \
-                   !defined(HAVE_ZONE_STAT_ITEM_NR_INACTIVE_FILE)
-               #error "global_page_state needs NR_INACTIVE*"
-               #endif
+               struct rw_semaphore dummy_semaphore __attribute__ ((unused));
+               dummy_semaphore.activity = 0;
 
   ;
   return 0;
@@ -18916,9 +17590,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -18930,60 +17606,20 @@ _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 NEED_GET_ZONE_COUNTS 1
-_ACEOF
-
-
-               { $as_echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5
-$as_echo_n "checking whether symbol get_zone_counts is exported... " >&6; }
-       grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_ZONE_COUNTS 1
+#define HAVE_RWSEM_ACTIVITY 1
 _ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_ZONE_COUNTS 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; }
 
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5
-$as_echo_n "checking whether symbol user_path_at is exported... " >&6; }
-       grep -q -E '[[:space:]]user_path_at[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_USER_PATH_DIR 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_USER_PATH_DIR 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5
-$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; }
-       grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(set_fs_pwd)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_SET_FS_PWD 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_FS_PWD 1
-_ACEOF
-
-       fi
-
-
-       { $as_echo "$as_me:$LINENO: checking whether set_fs_pwd() wants 2 args" >&5
-$as_echo_n "checking whether set_fs_pwd() wants 2 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct rw_semaphore has atomic_long_t member count" >&5
+$as_echo_n "checking whether struct rw_semaphore has atomic_long_t member count... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19087,14 +17645,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sched.h>
-               #include <linux/fs_struct.h>
+               #include <linux/rwsem.h>
 
 int
 main (void)
 {
 
-               set_fs_pwd(NULL, NULL);
+               DECLARE_RWSEM(dummy_semaphore);
+               (void) atomic_long_read(&dummy_semaphore.count);
 
   ;
   return 0;
@@ -19103,9 +17661,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19121,7 +17681,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_SET_FS_PWD 1
+#define HAVE_RWSEM_ATOMIC_LONG_COUNT 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5
-$as_echo_n "checking whether vfs_unlink() wants 2 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether header linux/sched/rt.h exists" >&5
+$as_echo_n "checking whether header linux/sched/rt.h exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19152,13 +17713,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/sched.h>
+               #include <linux/sched/rt.h>
 
 int
 main (void)
 {
 
-               vfs_unlink(NULL, NULL);
+               return 0;
 
   ;
   return 0;
@@ -19167,9 +17729,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19181,13 +17745,13 @@ _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_2ARGS_VFS_UNLINK 1
+#define HAVE_SCHED_RT_HEADER 1
 _ACEOF
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
   $as_echo "$as_me: failed program was:" >&5
@@ -19204,8 +17768,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5
-$as_echo_n "checking whether vfs_rename() wants 4 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether header linux/sched/signal.h exists" >&5
+$as_echo_n "checking whether header linux/sched/signal.h exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19216,13 +17780,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/sched.h>
+               #include <linux/sched/signal.h>
 
 int
 main (void)
 {
 
-               vfs_rename(NULL, NULL, NULL, NULL);
+               return 0;
 
   ;
   return 0;
@@ -19231,9 +17796,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19245,13 +17812,13 @@ _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_4ARGS_VFS_RENAME 1
+#define HAVE_SCHED_SIGNAL_HEADER 1
 _ACEOF
 
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
   $as_echo "$as_me: failed program was:" >&5
@@ -19269,8 +17836,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct fs_struct uses spinlock_t" >&5
-$as_echo_n "checking whether struct fs_struct uses spinlock_t... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 4 args" >&5
+$as_echo_n "checking whether vfs_getattr() wants 4 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19281,15 +17848,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sched.h>
-               #include <linux/fs_struct.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct fs_struct fs;
-               spin_lock_init(&fs.lock);
+               vfs_getattr((const struct path *)NULL,
+                       (struct kstat *)NULL,
+                       (u32)0,
+                       (unsigned int)0);
 
   ;
   return 0;
@@ -19298,9 +17866,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19316,7 +17886,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_FS_STRUCT_SPINLOCK 1
+#define HAVE_4ARGS_VFS_GETATTR 1
 _ACEOF
 
 
@@ -19336,8 +17906,8 @@ fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5
-$as_echo_n "checking whether struct cred exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 3 args" >&5
+$as_echo_n "checking whether vfs_getattr() wants 3 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19348,14 +17918,15 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/cred.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct cred *cr __attribute__ ((unused));
-               cr  = NULL;
+               vfs_getattr((struct vfsmount *)NULL,
+                       (struct dentry *)NULL,
+                       (struct kstat *)NULL);
 
   ;
   return 0;
@@ -19364,9 +17935,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19382,7 +17955,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_CRED_STRUCT 1
+#define HAVE_3ARGS_VFS_GETATTR 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol groups_search is exported" >&5
-$as_echo_n "checking whether symbol groups_search is exported... " >&6; }
-       grep -q -E '[[:space:]]groups_search[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(groups_search)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether vfs_getattr() wants 2 args" >&5
+$as_echo_n "checking whether vfs_getattr() wants 2 args... " >&6; }
 
-               else
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GROUPS_SEARCH 1
+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)
+{
+
+               vfs_getattr((struct path *) NULL,
+                       (struct kstat *)NULL);
+
+  ;
+  return 0;
+}
+
 _ACEOF
 
-               fi
-       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 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_GROUPS_SEARCH 1
+#define HAVE_2ARGS_VFS_GETATTR 1
 _ACEOF
 
-       fi
-
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol __put_task_struct is exported" >&5
-$as_echo_n "checking whether symbol __put_task_struct is exported... " >&6; }
-       grep -q -E '[[:space:]]__put_task_struct[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(__put_task_struct)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_PUT_TASK_STRUCT 1
-_ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PUT_TASK_STRUCT 1
-_ACEOF
+       rm -Rf build
 
-       fi
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether proc_handler() wants 5 args" >&5
-$as_echo_n "checking whether proc_handler() wants 5 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether usleep_range() is available" >&5
+$as_echo_n "checking whether usleep_range() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19496,13 +18055,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sysctl.h>
+               #include <linux/delay.h>
 
 int
 main (void)
 {
 
-               proc_dostring(NULL, 0, NULL, NULL, NULL);
+               usleep_range(0, 0);
 
   ;
   return 0;
@@ -19511,9 +18070,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19529,7 +18090,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_5ARGS_PROC_HANDLER 1
+#define HAVE_USLEEP_RANGE 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5
-$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; }
-       grep -q -E '[[:space:]]kvasprintf[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_KVASPRINTF 1
-_ACEOF
-
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KVASPRINTF 1
-_ACEOF
-
-       fi
-
-
-
-       { $as_echo "$as_me:$LINENO: checking whether file_fsync() wants 3 args" >&5
-$as_echo_n "checking whether file_fsync() wants 3 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether struct kmem_cache has allocflags" >&5
+$as_echo_n "checking whether struct kmem_cache has allocflags... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19602,13 +18122,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/buffer_head.h>
+               #include <linux/slab.h>
 
 int
 main (void)
 {
 
-               file_fsync(NULL, NULL, 0);
+               struct kmem_cache cachep __attribute__ ((unused));
+               cachep.allocflags = GFP_KERNEL;
 
   ;
   return 0;
@@ -19617,9 +18138,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19635,7 +18158,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_3ARGS_FILE_FSYNC 1
+#define HAVE_KMEM_CACHE_ALLOCFLAGS 1
 _ACEOF
 
 
@@ -19646,98 +18169,84 @@ 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 struct kmem_cache has gfpflags" >&5
+$as_echo_n "checking whether struct kmem_cache has gfpflags... " >&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.  */
 
 
+                       #include <linux/slab.h>
 
+int
+main (void)
+{
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol rwsem_is_locked is exported" >&5
-$as_echo_n "checking whether symbol rwsem_is_locked is exported... " >&6; }
-       grep -q -E '[[:space:]]rwsem_is_locked[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in lib/rwsem-spinlock.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(rwsem_is_locked)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+                       struct kmem_cache cachep __attribute__ ((unused));
+                       cachep.gfpflags = GFP_KERNEL;
 
-               else
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  ;
+  return 0;
+}
 
-cat >>confdefs.h <<\_ACEOF
-#define RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1
 _ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&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 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 RWSEM_IS_LOCKED_TAKES_WAIT_LOCK 1
+#define HAVE_KMEM_CACHE_GFPFLAGS 1
 _ACEOF
 
-       fi
-
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol invalidate_inodes is exported" >&5
-$as_echo_n "checking whether symbol invalidate_inodes is exported... " >&6; }
-       grep -q -E '[[:space:]]invalidate_inodes[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in ; do
-                       grep -q -E "EXPORT_SYMBOL.*(invalidate_inodes)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_INVALIDATE_INODES 1
-_ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INVALIDATE_INODES 1
-_ACEOF
+       rm -Rf build
 
-       fi
 
 
-       { $as_echo "$as_me:$LINENO: checking whether invalidate_inodes() wants 2 args" >&5
-$as_echo_n "checking whether invalidate_inodes() wants 2 args... " >&6; }
+
+
+fi
+
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:$LINENO: checking whether wait_on_bit() takes an action" >&5
+$as_echo_n "checking whether wait_on_bit() takes an action... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19748,13 +18257,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/fs.h>
+               #include <linux/wait.h>
 
 int
 main (void)
 {
 
-               return __invalidate_device(NULL, 0);
+               int (*action)(void *) = NULL;
+               wait_on_bit(NULL, 0, action, 0);
 
   ;
   return 0;
@@ -19763,9 +18273,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19781,7 +18293,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_INVALIDATE_INODES 1
+#define HAVE_WAIT_ON_BIT_ACTION 1
 _ACEOF
 
 
 
 
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol shrink_dcache_memory is exported" >&5
-$as_echo_n "checking whether symbol shrink_dcache_memory is exported... " >&6; }
-       grep -q -E '[[:space:]]shrink_dcache_memory[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(shrink_dcache_memory)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether inode_lock_shared() exists" >&5
+$as_echo_n "checking whether inode_lock_shared() exists... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
-               else
-                       { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK_DCACHE_MEMORY 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
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK_DCACHE_MEMORY 1
-_ACEOF
+               #include <linux/fs.h>
 
-       fi
+int
+main (void)
+{
 
+               struct inode *inode = NULL;
+               inode_lock_shared(inode);
 
+  ;
+  return 0;
+}
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol shrink_icache_memory is exported" >&5
-$as_echo_n "checking whether symbol shrink_icache_memory is exported... " >&6; }
-       grep -q -E '[[:space:]]shrink_icache_memory[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(shrink_icache_memory)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then
-                       { $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_SHRINK_ICACHE_MEMORY 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
 
-               fi
-       else
                { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK_ICACHE_MEMORY 1
+#define HAVE_INODE_LOCK_SHARED 1
 _ACEOF
 
-       fi
-
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5
-$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; }
-       grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \
-               $LINUX_OBJ/Module*.symvers 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/namei.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \
-                               "$LINUX_OBJ/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 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_KERN_PATH_PARENT 1
-_ACEOF
 
-               fi
-       else
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_KERN_PATH_PARENT 1
-_ACEOF
+       rm -Rf build
 
-       fi
+
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether zlib_deflate_workspacesize() wants 2 args" >&5
-$as_echo_n "checking whether zlib_deflate_workspacesize() wants 2 args... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether mutex has owner" >&5
+$as_echo_n "checking whether mutex has owner... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19935,13 +18398,16 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/zlib.h>
+               #include <linux/mutex.h>
+               #include <linux/spinlock.h>
 
 int
 main (void)
 {
 
-               return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
+               DEFINE_MUTEX(m);
+               struct task_struct *t __attribute__ ((unused));
+               t = m.owner;
 
   ;
   return 0;
@@ -19950,9 +18416,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -19968,7 +18436,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE 1
+#define HAVE_MUTEX_OWNER 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:$LINENO: checking whether struct shrink_control exists" >&5
-$as_echo_n "checking whether struct shrink_control exists... " >&6; }
+       { $as_echo "$as_me:$LINENO: checking whether group_info->gid exists" >&5
+$as_echo_n "checking whether group_info->gid exists... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20000,16 +18471,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/mm.h>
+               #include <linux/cred.h>
 
 int
 main (void)
 {
 
-               struct shrink_control sc __attribute__ ((unused));
-
-               sc.nr_to_scan = 0;
-               sc.gfp_mask = GFP_KERNEL;
+               struct group_info *gi = groups_alloc(1);
+               gi->gid[0] = KGIDT_INIT(0);
 
   ;
   return 0;
@@ -20018,9 +18487,11 @@ main (void)
 _ACEOF
 
 
-       rm -Rf build && mkdir -p build
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
        echo "obj-m := conftest.o" >build/Makefile
-       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=''
+       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=$?
@@ -20036,7 +18507,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK_CONTROL_STRUCT 1
+#define HAVE_GROUP_INFO_GID 1
 _ACEOF
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-                           ;;
+                          ;;
                srpm)                        ;;
-                *)
-                { $as_echo "$as_me:$LINENO: result: Error!" >&5
+               *)
+               { $as_echo "$as_me:$LINENO: result: Error!" >&5
 $as_echo "Error!" >&6; }
-                { { $as_echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config,
-                              user kernel|user|all|srpm" >&5
+               { { $as_echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config,
+                            user kernel|user|all|srpm" >&5
 $as_echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config,
-                              user kernel|user|all|srpm" >&2;}
+                            user kernel|user|all|srpm" >&2;}
    { (exit 1); exit 1; }; } ;;
-        esac
+       esac
 
-         if test "$SPL_CONFIG" = user ||
-                       test "$SPL_CONFIG" = all; then
+        if test "$SPL_CONFIG" = user -o "$SPL_CONFIG" = all; then
   CONFIG_USER_TRUE=
   CONFIG_USER_FALSE='#'
 else
@@ -20077,8 +18548,8 @@ else
   CONFIG_USER_FALSE=
 fi
 
-         if test "$SPL_CONFIG" = kernel ||
-                       test "$SPL_CONFIG" = all; then
+        if test "$SPL_CONFIG" = kernel -o "$SPL_CONFIG" = all &&
+                      test "x$enable_linux_builtin" != xyes ; then
   CONFIG_KERNEL_TRUE=
   CONFIG_KERNEL_FALSE='#'
 else
@@ -20088,7 +18559,7 @@ fi
 
 
 
-ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec"
+ac_config_files="$ac_config_files Makefile man/Makefile man/man1/Makefile man/man5/Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile include/fs/Makefile include/linux/Makefile include/rpc/Makefile include/sharefs/Makefile include/sys/Makefile include/sys/fm/Makefile include/sys/fs/Makefile include/sys/sysevent/Makefile include/util/Makefile include/vm/Makefile scripts/Makefile rpm/Makefile rpm/redhat/Makefile rpm/redhat/spl.spec rpm/redhat/spl-kmod.spec rpm/redhat/spl-dkms.spec rpm/generic/Makefile rpm/generic/spl.spec rpm/generic/spl-kmod.spec rpm/generic/spl-dkms.spec spl.release"
 
 
 cat >confcache <<\_ACEOF
@@ -20553,7 +19024,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 spl $as_me 0.6.5.11, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20616,7 +19087,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-config.status
+spl config.status 0.6.5.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" ;;
+    "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" ;;
     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
     "cmd/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;;
     "module/Makefile") CONFIG_FILES="$CONFIG_FILES module/Makefile" ;;
     "module/spl/Makefile") CONFIG_FILES="$CONFIG_FILES module/spl/Makefile" ;;
     "module/splat/Makefile") CONFIG_FILES="$CONFIG_FILES module/splat/Makefile" ;;
     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+    "include/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/fs/Makefile" ;;
+    "include/linux/Makefile") CONFIG_FILES="$CONFIG_FILES include/linux/Makefile" ;;
+    "include/rpc/Makefile") CONFIG_FILES="$CONFIG_FILES include/rpc/Makefile" ;;
+    "include/sharefs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sharefs/Makefile" ;;
+    "include/sys/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;;
+    "include/sys/fm/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fm/Makefile" ;;
+    "include/sys/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fs/Makefile" ;;
+    "include/sys/sysevent/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/sysevent/Makefile" ;;
+    "include/util/Makefile") CONFIG_FILES="$CONFIG_FILES include/util/Makefile" ;;
+    "include/vm/Makefile") CONFIG_FILES="$CONFIG_FILES include/vm/Makefile" ;;
     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
-    "spl.spec") CONFIG_FILES="$CONFIG_FILES spl.spec" ;;
-    "spl-modules.spec") CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;;
+    "rpm/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/Makefile" ;;
+    "rpm/redhat/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/redhat/Makefile" ;;
+    "rpm/redhat/spl.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/spl.spec" ;;
+    "rpm/redhat/spl-kmod.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/spl-kmod.spec" ;;
+    "rpm/redhat/spl-dkms.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/spl-dkms.spec" ;;
+    "rpm/generic/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/generic/Makefile" ;;
+    "rpm/generic/spl.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/spl.spec" ;;
+    "rpm/generic/spl-kmod.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/spl-kmod.spec" ;;
+    "rpm/generic/spl-dkms.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/spl-dkms.spec" ;;
+    "spl.release") CONFIG_FILES="$CONFIG_FILES spl.release" ;;
 
   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}