]> git.proxmox.com Git - mirror_spl-debian.git/blobdiff - configure
Fix gcc configure warnings
[mirror_spl-debian.git] / configure
index 285c9a434ddddd7424eeaac5aa65d63fbef9ca49..6a322ce4edecb97162a30650a6624ad0c0eb4cc7 100755 (executable)
--- a/configure
+++ b/configure
@@ -800,6 +800,7 @@ LINUX_OBJ
 LINUX
 SPL_CONFIG
 DEFAULT_PACKAGE
+VENDOR
 ALIEN_VERSION
 ALIEN
 HAVE_ALIEN
@@ -4165,8 +4166,8 @@ esac
 
 
 
-macro_version='2.2.6'
-macro_revision='1.3012'
+macro_version='2.2.6b'
+macro_revision='1.3017'
 
 
 
@@ -4776,13 +4777,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:4779: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4780: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4782: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4783: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4785: output\"" >&5)
+  (eval echo "\"\$as_me:4786: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5988,7 +5989,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5991 "configure"' > conftest.$ac_ext
+  echo '#line 5992 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7841,11 +7842,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:7844: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7845: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7848: \$? = $ac_status" >&5
+   echo "$as_me:7849: \$? = $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.
@@ -8180,11 +8181,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:8183: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8184: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8187: \$? = $ac_status" >&5
+   echo "$as_me:8188: \$? = $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.
@@ -8285,11 +8286,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:8288: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8289: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8292: \$? = $ac_status" >&5
+   echo "$as_me:8293: \$? = $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
@@ -8340,11 +8341,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:8343: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8344: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8347: \$? = $ac_status" >&5
+   echo "$as_me:8348: \$? = $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
@@ -11143,7 +11144,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11146 "configure"
+#line 11147 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11239,7 +11240,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11242 "configure"
+#line 11243 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 
-       VENDOR=$(echo $ac_build_alias | cut -f2 -d'-')
+       { $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; }
        { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
 $as_echo_n "checking kernel source directory... " >&6; }
        if test -z "$kernelsrc"; then
-               headersdir="/lib/modules/$(uname -r)/build"
-               if test -e "$headersdir"; 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/* \
@@ -11689,7 +11714,9 @@ $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 -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; 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
@@ -11757,6 +11784,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; }
                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
@@ -11766,16 +11807,85 @@ $as_echo "$LINUX_SYMBOLS" >&6; }
 
 
 
-                       abs_srcdir=`readlink -f ${srcdir}`
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h"
+       { $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
+
+               { $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"
 
 
 
@@ -11879,7 +11989,7 @@ int
 main (void)
 {
 
-               atomic64_t *ptr;
+               atomic64_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -12122,7 +12232,7 @@ int
 main (void)
 {
 
-               uintptr_t *ptr;
+               uintptr_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -12186,7 +12296,7 @@ int
 main (void)
 {
 
-               struct work_struct work;
+               struct work_struct work __attribute__ ((unused));
                INIT_WORK(&work, NULL, NULL);
 
   ;
@@ -12251,7 +12361,7 @@ int
 main (void)
 {
 
-               return register_sysctl_table(NULL,0);
+               (void) register_sysctl_table(NULL, 0);
 
   ;
   return 0;
 
 
 
+       { $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"
+
+
+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 shrinker_cb(struct shrinker *, int, unsigned int);
+
+int
+main (void)
+{
+
+               struct shrinker cache_shrinker = {
+                       .shrink = shrinker_cb,
+                       .seeks = DEFAULT_SEEKS,
+               };
+               register_shrinker(&cache_shrinker);
+
+  ;
+  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_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; }
+
+
+
+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; }
 
@@ -12380,7 +12563,7 @@ int
 main (void)
 {
 
-               struct nameidata nd;
+               struct nameidata nd __attribute__ ((unused));
 
                nd.path.mnt = NULL;
                nd.path.dentry = NULL;
@@ -12555,7 +12738,7 @@ int
 main (void)
 {
 
-               struct ctl_table ctl;
+               struct ctl_table ctl __attribute__ ((unused));
                ctl.ctl_name = 0;
 
   ;
@@ -12941,7 +13124,9 @@ int
 main (void)
 {
 
-               struct timespec a, b, c = { 0 };
+               struct timespec a = { 0 };
+               struct timespec b = { 0 };
+               struct timespec c __attribute__ ((unused));
                c = timespec_sub(a, b);
 
   ;
@@ -13007,7 +13192,8 @@ int
 main (void)
 {
 
-               struct new_utsname *a = init_utsname();
+               struct new_utsname *a __attribute__ ((unused));
+               a = init_utsname();
 
   ;
   return 0;
@@ -13145,7 +13331,8 @@ main (void)
 {
 
                struct files_struct *files = current->files;
-               struct fdtable *fdt = files_fdtable(files);
+               struct fdtable *fdt __attribute__ ((unused));
+               fdt = files_fdtable(files);
 
   ;
   return 0;
@@ -13278,7 +13465,8 @@ int
 main (void)
 {
 
-               void *a = kmalloc_node(1, GFP_KERNEL, 0);
+               void *a __attribute__ ((unused));
+               a = kmalloc_node(1, GFP_KERNEL, 0);
 
   ;
   return 0;
@@ -13451,7 +13639,7 @@ int
 main (void)
 {
 
-               struct mutex mtx;
+               struct mutex mtx __attribute__ ((unused));
                mtx.owner = NULL;
 
   ;
@@ -13913,7 +14101,7 @@ int
 main (void)
 {
 
-               unsigned long state;
+               unsigned long state __attribute__ ((unused));
                state = global_page_state(0);
 
   ;
@@ -13979,7 +14167,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_FREE_PAGES;
 
   ;
@@ -14045,7 +14233,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE;
 
   ;
@@ -14110,7 +14298,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE_ANON;
 
   ;
@@ -14175,7 +14363,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE_FILE;
 
   ;
@@ -14241,7 +14429,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE;
 
   ;
@@ -14306,7 +14494,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE_ANON;
 
   ;
@@ -14371,7 +14559,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE_FILE;
 
   ;
 
 
 
+       { $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);
+
+  ;
+  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_FS_STRUCT_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; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
        { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5
 $as_echo_n "checking whether struct cred exists... " >&6; }
 
@@ -14830,7 +15085,7 @@ int
 main (void)
 {
 
-               struct cred *cr;
+               struct cred *cr __attribute__ ((unused));
                cr  = NULL;
 
   ;
@@ -15171,44 +15426,234 @@ _ACEOF
        fi
 
 
- ;;
-                user)
 
-       if test "x$AWK" != xgawk; then
+       { $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; }
 
-                { { $as_echo "$as_me:$LINENO: error:
-       *** Required util gawk missing.  Please install the required
-       *** gawk package for your distribution and try again." >&5
-$as_echo "$as_me: error:
-       *** Required util gawk missing.  Please install the required
-       *** gawk package for your distribution and try again." >&2;}
-   { (exit 1); exit 1; }; }
+               else
+                       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INVALIDATE_INODES 1
+_ACEOF
 
+               fi
+       else
+               { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-   ;;
-                all)
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INVALIDATE_INODES 1
+_ACEOF
 
+       fi
 
-# Check whether --with-linux was given.
-if test "${with_linux+set}" = set; then
-  withval=$with_linux; kernelsrc="$withval"
-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; }
 
 
-# Check whether --with-linux-obj was given.
-if test "${with_linux_obj+set}" = set; then
-  withval=$with_linux_obj; kernelbuild="$withval"
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-       { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
-$as_echo_n "checking kernel source directory... " >&6; }
+               #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
+
+
+ ;;
+                user)
+
+       if test "x$AWK" != xgawk; then
+
+                { { $as_echo "$as_me:$LINENO: error:
+       *** Required util gawk missing.  Please install the required
+       *** gawk package for your distribution and try again." >&5
+$as_echo "$as_me: error:
+       *** Required util gawk missing.  Please install the required
+       *** gawk package for your distribution and try again." >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+   ;;
+                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
-               headersdir="/lib/modules/$(uname -r)/build"
-               if test -e "$headersdir"; 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/* \
@@ -15242,7 +15687,9 @@ $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 -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; 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
@@ -15310,6 +15757,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; }
                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
@@ -15319,16 +15780,85 @@ $as_echo "$LINUX_SYMBOLS" >&6; }
 
 
 
-                       abs_srcdir=`readlink -f ${srcdir}`
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h"
+       { $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
+
+               { $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"
 
 
 
@@ -15432,7 +15962,7 @@ int
 main (void)
 {
 
-               atomic64_t *ptr;
+               atomic64_t *ptr __attribute__ ((unused));
 
   ;
   return 0;
@@ -15675,7 +16205,72 @@ int
 main (void)
 {
 
-               uintptr_t *ptr;
+               uintptr_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
+
+               { $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; }
+
+
+
+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; }
+
+
+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/workqueue.h>
+
+int
+main (void)
+{
+
+               struct work_struct work __attribute__ ((unused));
+               INIT_WORK(&work, NULL, NULL);
 
   ;
   return 0;
@@ -15702,7 +16297,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTPTR_T 1
+#define HAVE_3ARGS_INIT_WORK 1
 _ACEOF
 
 
@@ -15721,8 +16316,8 @@ 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; }
+       { $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
@@ -15733,14 +16328,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/workqueue.h>
+               #include <linux/sysctl.h>
 
 int
 main (void)
 {
 
-               struct work_struct work;
-               INIT_WORK(&work, NULL, NULL);
+               (void) register_sysctl_table(NULL, 0);
 
   ;
   return 0;
@@ -15767,7 +16361,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_3ARGS_INIT_WORK 1
+#define HAVE_2ARGS_REGISTER_SYSCTL 1
 _ACEOF
 
 
@@ -15786,8 +16380,9 @@ 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; }
+
+       { $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
@@ -15798,13 +16393,13 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
 
-               #include <linux/sysctl.h>
+               #include <linux/mm.h>
 
 int
 main (void)
 {
 
-               return register_sysctl_table(NULL,0);
+               return set_shrinker(DEFAULT_SEEKS, NULL);
 
   ;
   return 0;
@@ -15831,7 +16426,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_REGISTER_SYSCTL 1
+#define HAVE_SET_SHRINKER 1
 _ACEOF
 
 
 
 
 
-
-       { $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 shrinker callback wants 3 args" >&5
+$as_echo_n "checking whether shrinker callback wants 3 args... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15865,11 +16461,17 @@ cat >>conftest.$ac_ext <<_ACEOF
 
                #include <linux/mm.h>
 
+               int shrinker_cb(struct shrinker *, int, unsigned int);
+
 int
 main (void)
 {
 
-               return set_shrinker(DEFAULT_SEEKS, NULL);
+               struct shrinker cache_shrinker = {
+                       .shrink = shrinker_cb,
+                       .seeks = DEFAULT_SEEKS,
+               };
+               register_shrinker(&cache_shrinker);
 
   ;
   return 0;
@@ -15896,7 +16498,7 @@ _ACEOF
 $as_echo "yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_SHRINKER 1
+#define HAVE_3ARGS_SHRINKER_CALLBACK 1
 _ACEOF
 
 
@@ -15914,6 +16516,7 @@ 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; }
@@ -15933,7 +16536,7 @@ int
 main (void)
 {
 
-               struct nameidata nd;
+               struct nameidata nd __attribute__ ((unused));
 
                nd.path.mnt = NULL;
                nd.path.dentry = NULL;
@@ -16108,7 +16711,7 @@ int
 main (void)
 {
 
-               struct ctl_table ctl;
+               struct ctl_table ctl __attribute__ ((unused));
                ctl.ctl_name = 0;
 
   ;
@@ -16494,7 +17097,9 @@ int
 main (void)
 {
 
-               struct timespec a, b, c = { 0 };
+               struct timespec a = { 0 };
+               struct timespec b = { 0 };
+               struct timespec c __attribute__ ((unused));
                c = timespec_sub(a, b);
 
   ;
@@ -16560,7 +17165,8 @@ int
 main (void)
 {
 
-               struct new_utsname *a = init_utsname();
+               struct new_utsname *a __attribute__ ((unused));
+               a = init_utsname();
 
   ;
   return 0;
@@ -16698,7 +17304,8 @@ main (void)
 {
 
                struct files_struct *files = current->files;
-               struct fdtable *fdt = files_fdtable(files);
+               struct fdtable *fdt __attribute__ ((unused));
+               fdt = files_fdtable(files);
 
   ;
   return 0;
@@ -16831,7 +17438,8 @@ int
 main (void)
 {
 
-               void *a = kmalloc_node(1, GFP_KERNEL, 0);
+               void *a __attribute__ ((unused));
+               a = kmalloc_node(1, GFP_KERNEL, 0);
 
   ;
   return 0;
@@ -17004,7 +17612,7 @@ int
 main (void)
 {
 
-               struct mutex mtx;
+               struct mutex mtx __attribute__ ((unused));
                mtx.owner = NULL;
 
   ;
@@ -17466,7 +18074,7 @@ int
 main (void)
 {
 
-               unsigned long state;
+               unsigned long state __attribute__ ((unused));
                state = global_page_state(0);
 
   ;
@@ -17532,7 +18140,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_FREE_PAGES;
 
   ;
@@ -17598,7 +18206,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE;
 
   ;
@@ -17663,7 +18271,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE_ANON;
 
   ;
@@ -17728,7 +18336,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_INACTIVE_FILE;
 
   ;
@@ -17794,7 +18402,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE;
 
   ;
@@ -17859,7 +18467,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE_ANON;
 
   ;
@@ -17924,7 +18532,7 @@ int
 main (void)
 {
 
-               enum zone_stat_item zsi;
+               enum zone_stat_item zsi __attribute__ ((unused));
                zsi = NR_ACTIVE_FILE;
 
   ;
 
 
 
+       { $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);
+
+  ;
+  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_FS_STRUCT_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; }
+
+
+
+fi
+
+       rm -Rf build
+
+
+
+
        { $as_echo "$as_me:$LINENO: checking whether struct cred exists" >&5
 $as_echo_n "checking whether struct cred exists... " >&6; }
 
@@ -18383,7 +19058,7 @@ int
 main (void)
 {
 
-               struct cred *cr;
+               struct cred *cr __attribute__ ((unused));
                cr  = NULL;
 
   ;
@@ -18725,6 +19400,193 @@ _ACEOF
 
 
 
+       { $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
+
+
+
 
 
        if test "x$AWK" != xgawk; then
@@ -20347,7 +21209,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
   case $ac_file$ac_mode in
     "spl_config.h":H)
        (mv spl_config.h spl_config.h.tmp &&
-       awk -f config/config.awk spl_config.h.tmp >spl_config.h &&
+       awk -f ${ac_srcdir}/config/config.awk spl_config.h.tmp >spl_config.h &&
        rm spl_config.h.tmp) || exit 1 ;;
     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
   # Autoconf 2.62 quotes --file arguments for eval, but not when files