X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=configure;h=9b97fb427afa589e077de0f746b4021b9fed596c;hb=330d06f90d143b41b276796526a66a1c1fff046d;hp=d9bea44f07400b93f5a9787d1cb0c99d7f3d1fc6;hpb=1c5de20ae2511124613926e4f780572634818218;p=zfs.git diff --git a/configure b/configure index d9bea44..9b97fb4 100755 --- a/configure +++ b/configure @@ -981,6 +981,7 @@ enable_fast_install with_gnu_ld enable_libtool_lock with_config +enable_linux_builtin with_linux with_linux_obj with_spl @@ -1643,6 +1644,8 @@ 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-dmu-tx Enable dmu tx validation [default=no] @@ -4839,13 +4842,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:4842: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4845: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4845: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4848: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4848: output\"" >&5) + (eval echo "\"\$as_me:4851: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6051,7 +6054,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6054 "configure"' > conftest.$ac_ext + echo '#line 6057 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7904,11 +7907,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:7907: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7910: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7911: \$? = $ac_status" >&5 + echo "$as_me:7914: \$? = $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. @@ -8243,11 +8246,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:8246: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8249: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8250: \$? = $ac_status" >&5 + echo "$as_me:8253: \$? = $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. @@ -8348,11 +8351,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:8351: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8354: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8355: \$? = $ac_status" >&5 + echo "$as_me:8358: \$? = $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 @@ -8403,11 +8406,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:8406: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8409: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8410: \$? = $ac_status" >&5 + echo "$as_me:8413: \$? = $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 @@ -11206,7 +11209,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11209 "configure" +#line 11212 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11302,7 +11305,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11305 "configure" +#line 11308 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11945,6 +11948,13 @@ if test "${with_config+set}" = set; then withval=$with_config; ZFS_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 zfs config" >&5 $as_echo_n "checking zfs config... " >&6; } @@ -12123,7 +12133,7 @@ elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then elif test -d ${kernelsrc}-obj/${target_cpu}/default; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/default + kernelbuild=${kernelsrc}-obj/${target_cpu}/default elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then @@ -12183,9 +12193,19 @@ 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 @@ -12205,7 +12225,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 @@ -12394,6 +12414,89 @@ $as_echo "$SPL_SYMBOLS" >&6; } + { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 +$as_echo_n "checking whether modules can be built... " >&6; } + + +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 "$ZFS_META_LICENSE" = GPL; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GPL_ONLY_SYMBOLS 1 +_ACEOF + + +fi + + { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5 @@ -12425,9 +12528,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=$? @@ -12466,9 +12571,9 @@ fi - if test "$ZFS_META_LICENSE" = CDDL; then - { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5 + + { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5 $as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; } @@ -12497,9 +12602,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=$? @@ -12513,23 +12620,78 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is - *** incompatible with the CDDL license. You must rebuild - *** your kernel without this option." >&5 -$as_echo "$as_me: error: - *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is - *** incompatible with the CDDL license. You must rebuild - *** your kernel without this option." >&2;} - { (exit 1); exit 1; }; } + + { $as_echo "$as_me:$LINENO: checking whether mutex_lock() is GPL-only" >&5 +$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + + MODULE_LICENSE("$ZFS_META_LICENSE"); + +int +main (void) +{ + + struct mutex lock; + + mutex_init(&lock); + mutex_lock(&lock); + mutex_unlock(&lock); + + ; + 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: result: no" >&5 -$as_echo "no" >&6; } - + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible + *** with the CDDL license and will prevent the module linking stage + *** from succeeding. You must rebuild your kernel without this + *** option enabled." >&5 +$as_echo "$as_me: error: + *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible + *** with the CDDL license and will prevent the module linking stage + *** from succeeding. You must rebuild your kernel without this + *** option enabled." >&2;} + { (exit 1); exit 1; }; } @@ -12538,21 +12700,26 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" -fi - +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "$ZFS_META_LICENSE" = GPL; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_GPL_ONLY_SYMBOLS 1 -_ACEOF fi + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5 @@ -12600,9 +12767,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=$? @@ -12665,9 +12834,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=$? @@ -12731,9 +12902,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=$? @@ -12769,114 +12942,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5 -$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; } - grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in fs/block_dev.c; do - grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - - export=1 - break; - -fi - - done - if test $export -eq 0; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BLKDEV_GET_BY_PATH 1 -_ACEOF - - -fi - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BLKDEV_GET_BY_PATH 1 -_ACEOF - - -fi - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5 -$as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; } - grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in fs/block_dev.c; do - grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - - export=1 - break; - -fi - - done - if test $export -eq 0; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPEN_BDEV_EXCLUSIVE 1 -_ACEOF - - -fi - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPEN_BDEV_EXCLUSIVE 1 -_ACEOF - - -fi - - - - - { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5 -$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5 +$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -12887,14 +12954,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { struct block_device *bdev = NULL; - invalidate_bdev(bdev); + (void) blkdev_get(bdev, 0, NULL); ; return 0; @@ -12903,9 +12970,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=$? @@ -12921,7 +12990,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_1ARG_INVALIDATE_BDEV 1 +#define HAVE_3ARG_BLKDEV_GET 1 _ACEOF @@ -12940,11 +13009,9 @@ fi + { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5 +$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5 -$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -12955,7 +13022,289 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + +int +main (void) +{ + + blkdev_get_by_path(NULL, 0, NULL); + + ; + 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 + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + + + fi + fi + + + { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5 +$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + open_bdev_exclusive(NULL, 0, NULL); + + ; + 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 + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPEN_BDEV_EXCLUSIVE 1 +_ACEOF + + + fi + fi + + + + { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5 +$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct block_device *bdev = NULL; + invalidate_bdev(bdev); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_1ARG_INVALIDATE_BDEV 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5 +$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include int main (void) @@ -12971,9 +13320,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=$? @@ -13039,9 +13390,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=$? @@ -13105,9 +13458,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=$? @@ -13173,9 +13528,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=$? @@ -13239,9 +13596,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=$? @@ -13309,9 +13668,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=$? @@ -13376,9 +13737,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=$? @@ -13442,9 +13805,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=$? @@ -13508,9 +13873,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=$? @@ -13576,9 +13943,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=$? @@ -13644,9 +14013,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=$? @@ -13713,9 +14084,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=$? @@ -13781,9 +14154,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=$? @@ -13850,9 +14225,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=$? @@ -13919,9 +14296,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=$? @@ -13989,9 +14368,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=$? @@ -14059,9 +14440,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=$? @@ -14128,9 +14511,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=$? @@ -14197,9 +14582,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=$? @@ -14266,9 +14653,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=$? @@ -14336,9 +14725,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=$? @@ -14405,9 +14796,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=$? @@ -14473,9 +14866,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=$? @@ -14542,9 +14937,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=$? @@ -14611,9 +15008,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=$? @@ -14680,9 +15079,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=$? @@ -14718,11 +15119,9 @@ fi EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5 +$as_echo_n "checking whether get_gendisk() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5 -$as_echo_n "checking whether rq_is_sync() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -14733,14 +15132,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) rq_is_sync(req); + get_gendisk(0, NULL); ; return 0; @@ -14749,9 +15147,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=$? @@ -14762,22 +15162,131 @@ _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_RQ_IS_SYNC 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 + + grep -q -E '[[:space:]]get_gendisk[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in block/genhd.c; do + grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_GENDISK 1 +_ACEOF + + + fi + fi + + + + { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5 +$as_echo_n "checking whether rq_is_sync() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct request *req = NULL; + (void) rq_is_sync(req); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_RQ_IS_SYNC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi @@ -14820,9 +15329,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=$? @@ -14898,9 +15409,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=$? @@ -14967,9 +15480,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=$? @@ -15037,9 +15552,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=$? @@ -15090,14 +15607,15 @@ cat >>conftest.$ac_ext <<_ACEOF #include + int show_options (struct seq_file * x, struct dentry * y) { return 0; }; + static struct super_operations sops __attribute__ ((unused)) = { + .show_options = show_options, + }; + int main (void) { - int (*show_options) (struct seq_file *, struct dentry *) = NULL; - struct super_operations sops __attribute__ ((unused)); - - sops.show_options = show_options; ; return 0; @@ -15106,9 +15624,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=$? @@ -15175,9 +15695,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=$? @@ -15239,9 +15761,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=$? @@ -15303,9 +15827,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=$? @@ -15340,9 +15866,6 @@ fi - { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 -$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ @@ -15358,10 +15881,10 @@ int main (void) { - void (*evict_inode) (struct inode *) = NULL; - struct super_operations sops __attribute__ ((unused)) = { - .evict_inode = evict_inode, - }; + int (*fsync) (struct file *, struct dentry *, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -15370,9 +15893,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=$? @@ -15384,11 +15909,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: dentry" >&5 +$as_echo "dentry" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_EVICT_INODE 1 +#define HAVE_FSYNC_WITH_DENTRY 1 _ACEOF @@ -15396,8 +15921,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; } @@ -15408,8 +15931,6 @@ fi - { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5 -$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15426,11 +15947,10 @@ int main (void) { - int (*nr_cached_objects)(struct super_block *) - __attribute__ ((unused)) = NULL; - struct super_operations sops __attribute__ ((unused)) = { - .nr_cached_objects = nr_cached_objects, - }; + int (*fsync) (struct file *, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -15439,9 +15959,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=$? @@ -15453,11 +15975,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: no dentry" >&5 +$as_echo "no dentry" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_NR_CACHED_OBJECTS 1 +#define HAVE_FSYNC_WITHOUT_DENTRY 1 _ACEOF @@ -15465,8 +15987,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; } @@ -15477,8 +15997,6 @@ fi - { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5 -$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15495,11 +16013,10 @@ int main (void) { - void (*free_cached_objects)(struct super_block *, int) - __attribute__ ((unused)) = NULL; - struct super_operations sops __attribute__ ((unused)) = { - .free_cached_objects = free_cached_objects, - }; + int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -15508,9 +16025,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=$? @@ -15522,11 +16041,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: range" >&5 +$as_echo "range" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FREE_CACHED_OBJECTS 1 +#define HAVE_FSYNC_RANGE 1 _ACEOF @@ -15534,8 +16053,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; } @@ -15547,8 +16064,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 -$as_echo_n "checking whether fops->fallocate() exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 +$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15560,15 +16077,15 @@ cat >>conftest.$ac_ext <<_ACEOF #include + void evict_inode (struct inode * t) { return; } + static struct super_operations sops __attribute__ ((unused)) = { + .evict_inode = evict_inode, + }; int main (void) { - long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; - struct file_operations fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; ; return 0; @@ -15577,9 +16094,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=$? @@ -15595,7 +16114,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FILE_FALLOCATE 1 +#define HAVE_EVICT_INODE 1 _ACEOF @@ -15615,8 +16134,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5 -$as_echo_n "checking whether iops->fallocate() exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5 +$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15633,9 +16152,10 @@ int main (void) { - long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; - struct inode_operations fops __attribute__ ((unused)) = { - .fallocate = fallocate, + int (*nr_cached_objects)(struct super_block *) + __attribute__ ((unused)) = NULL; + struct super_operations sops __attribute__ ((unused)) = { + .nr_cached_objects = nr_cached_objects, }; ; @@ -15645,9 +16165,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=$? @@ -15663,7 +16185,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INODE_FALLOCATE 1 +#define HAVE_NR_CACHED_OBJECTS 1 _ACEOF @@ -15683,9 +16205,8 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5 -$as_echo_n "checking whether dops->d_automount() exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5 +$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15696,15 +16217,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct vfsmount *(*d_automount) (struct path *) = NULL; - struct dentry_operations dops __attribute__ ((unused)) = { - .d_automount = d_automount, + void (*free_cached_objects)(struct super_block *, int) + __attribute__ ((unused)) = NULL; + struct super_operations sops __attribute__ ((unused)) = { + .free_cached_objects = free_cached_objects, }; ; @@ -15714,9 +16236,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=$? @@ -15732,7 +16256,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_AUTOMOUNT 1 +#define HAVE_FREE_CACHED_OBJECTS 1 _ACEOF @@ -15752,222 +16276,79 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol insert_inode_locked is exported" >&5 -$as_echo_n "checking whether symbol insert_inode_locked is exported... " >&6; } - grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/inode.c; do - grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } - export=1 - break; -fi +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + #include +int +main (void) +{ -else + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_INSERT_INODE_LOCKED 1 _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_INSERT_INODE_LOCKED 1 +#define HAVE_FILE_FALLOCATE 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 d_obtain_alias is exported" >&5 -$as_echo_n "checking whether symbol d_obtain_alias is exported... " >&6; } - grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in fs/dcache.c; do - grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - - export=1 - break; - -fi - - done - if test $export -eq 0; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_D_OBTAIN_ALIAS 1 -_ACEOF - - -fi - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_D_OBTAIN_ALIAS 1 -_ACEOF - - -fi - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5 -$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; } - grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in fs/block_dev.c; do - grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - - export=1 - break; - -fi - - done - if test $export -eq 0; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHECK_DISK_SIZE_CHANGE 1 -_ACEOF - - -fi - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHECK_DISK_SIZE_CHANGE 1 -_ACEOF - - -fi - - - - - { $as_echo "$as_me:$LINENO: checking whether symbol truncate_setsize is exported" >&5 -$as_echo_n "checking whether symbol truncate_setsize is exported... " >&6; } - grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in mm/truncate.c; do - grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - - export=1 - break; - -fi - - done - if test $export -eq 0; then - - { $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_TRUNCATE_SETSIZE 1 -_ACEOF - fi - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TRUNCATE_SETSIZE 1 -_ACEOF - - -fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5 -$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5 +$as_echo_n "checking whether iops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15978,20 +16359,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct inode *ip __attribute__ ((unused)) = NULL; - struct inode *dip __attribute__ ((unused)) = NULL; - const struct qstr *str __attribute__ ((unused)) = NULL; - char *name __attribute__ ((unused)) = NULL; - void *value __attribute__ ((unused)) = NULL; - size_t len __attribute__ ((unused)) = 0; - - security_inode_init_security(ip, dip, str, &name, &value, &len); + long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; + struct inode_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -16000,9 +16377,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=$? @@ -16018,7 +16397,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1 +#define HAVE_INODE_FALLOCATE 1 _ACEOF @@ -16036,13 +16415,10 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5 -$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16053,18 +16429,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct inode *ip __attribute__ ((unused)) = NULL; - struct inode *dip __attribute__ ((unused)) = NULL; - const struct qstr *str __attribute__ ((unused)) = NULL; - initxattrs func __attribute__ ((unused)) = NULL; - - security_inode_init_security(ip, dip, str, func, NULL); + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -16073,9 +16447,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=$? @@ -16091,7 +16467,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF @@ -16109,64 +16485,11 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - - - { $as_echo "$as_me:$LINENO: checking whether symbol mount_nodev is exported" >&5 -$as_echo_n "checking whether symbol mount_nodev is exported... " >&6; } - grep -q -E '[[:space:]]mount_nodev[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in fs/super.c; do - grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - - export=1 - break; - -fi - - done - if test $export -eq 0; then - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MOUNT_NODEV 1 -_ACEOF - - -fi - - -else - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MOUNT_NODEV 1 -_ACEOF - - -fi - - { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5 -$as_echo_n "checking whether super_block has s_shrink... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5 +$as_echo_n "checking whether iops->truncate_range() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16178,18 +16501,16 @@ cat >>conftest.$ac_ext <<_ACEOF #include + void truncate_range(struct inode *inode, loff_t start, + loff_t end) { return; } + static struct inode_operations iops __attribute__ ((unused)) = { + .truncate_range = truncate_range, + }; int main (void) { - int (*shrink)(struct shrinker *, struct shrink_control *sc) - __attribute__ ((unused)) = NULL; - struct super_block sb __attribute__ ((unused)) = { - .s_shrink.shrink = shrink, - .s_shrink.seeks = DEFAULT_SEEKS, - .s_shrink.batch = 0, - }; ; return 0; @@ -16198,9 +16519,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=$? @@ -16216,11 +16539,10 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SHRINK 1 +#define HAVE_INODE_TRUNCATE_RANGE 1 _ACEOF - else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -16237,8 +16559,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether super_block has s_bdi" >&5 -$as_echo_n "checking whether super_block has s_bdi... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5 +$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16255,8 +16577,11 @@ int main (void) { - struct super_block sb __attribute__ ((unused)); - sb.s_bdi = NULL; + int (*create) (struct inode *, struct dentry *, umode_t, + struct nameidata *) = NULL; + struct inode_operations iops __attribute__ ((unused)) = { + .create = create, + }; ; return 0; @@ -16265,9 +16590,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=$? @@ -16283,7 +16610,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BDI 1 +#define HAVE_CREATE_UMODE_T 1 _ACEOF @@ -16303,61 +16630,78 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol bdi_setup_and_register is exported" >&5 -$as_echo_n "checking whether symbol bdi_setup_and_register is exported... " >&6; } - grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in mm/backing-dev.c; do - grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then + { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5 +$as_echo_n "checking whether dops->d_automount() exists... " >&6; } - export=1 - break; -fi +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + #include +int +main (void) +{ -else + struct vfsmount *(*d_automount) (struct path *) = NULL; + struct dentry_operations dops __attribute__ ((unused)) = { + .d_automount = d_automount, + }; - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_BDI_SETUP_AND_REGISTER 1 _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_BDI_SETUP_AND_REGISTER 1 +#define HAVE_AUTOMOUNT 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5 -$as_echo_n "checking whether set_nlink() is available... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5 +$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16368,15 +16712,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + int encode_fh(struct inode *inode, __u32 *fh, int *max_len, + struct inode *parent) { return 0; } + static struct export_operations eops __attribute__ ((unused))={ + .encode_fh = encode_fh, + }; int main (void) { - struct inode node; - unsigned int link = 0; - (void) set_nlink(&node, link); ; return 0; @@ -16385,9 +16731,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=$? @@ -16403,7 +16751,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SET_NLINK 1 +#define HAVE_ENCODE_FH_WITH_INODE 1 _ACEOF @@ -16422,1937 +16770,4240 @@ fi + { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5 +$as_echo_n "checking whether clear_inode() is available... " >&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. */ + #include +int +main (void) +{ - KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE" - KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL" - KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\"" + clear_inode(NULL); + ; + return 0; +} - ;; - user) +_ACEOF -# Check whether --with-udevdir was given. -if test "${with_udevdir+set}" = set; then - withval=$with_udevdir; udevdir=$withval + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 else - udevdir='${exec_prefix}/lib/udev' -fi - + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 -# Check whether --with-udevruledir was given. -if test "${with_udevruledir+set}" = set; then - withval=$with_udevruledir; udevruledir=$withval -else - udevruledir='${udevdir}/rules.d' fi + rm -Rf build + 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 for target asm dir" >&5 -$as_echo_n "checking for target asm dir... " >&6; } - TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/` + grep -q -E '[[:space:]]clear_inode[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi - case $TARGET_ARCH in - i386|x86_64) - TARGET_ASM_DIR=asm-${TARGET_ARCH} - ;; - *) - TARGET_ASM_DIR=asm-generic - ;; - esac + fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5 -$as_echo "$TARGET_ASM_DIR" >&6; } + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking for ioctl()" >&5 -$as_echo_n "checking for ioctl()... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLEAR_INODE 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ioctl" >/dev/null 2>&1; then - is_unistd=yes -else - is_unistd=no -fi -rm -f conftest* - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include + fi + fi -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ioctl" >/dev/null 2>&1; then - is_sys_ioctl=yes -else - is_sys_ioctl=no -fi -rm -f conftest* - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5 +$as_echo_n "checking whether insert_inode_locked() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ioctl" >/dev/null 2>&1; then - is_stropts=yes -else - is_stropts=no -fi -rm -f conftest* + #include - if test $is_unistd = yes; then - result=unistd.h +int +main (void) +{ + + insert_inode_locked(NULL); + + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_IOCTL_IN_UNISTD_H 1 _ACEOF - else - if test $is_sys_ioctl = yes; then - result=sys/ioctl.h + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 -cat >>confdefs.h <<\_ACEOF -#define HAVE_IOCTL_IN_SYS_IOCTL_H 1 -_ACEOF - elif test $is_stropts = yes; then +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_IOCTL_IN_STROPTS_H 1 -_ACEOF + rm -Rf build - else - result=no - fi - fi - if test $result = no; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot locate ioctl() definition" >&5 -$as_echo "$as_me: error: *** Cannot locate ioctl() definition" >&2;} - { (exit 1); exit 1; }; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - ZLIB= + else + if test "x$enable_linux_builtin" != xyes; then - if test "${ac_cv_header_zlib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 -$as_echo_n "checking for zlib.h... " >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -$as_echo "$ac_cv_header_zlib_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 -$as_echo_n "checking zlib.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include + grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INSERT_INODE_LOCKED 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + fi + fi -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 -$as_echo_n "checking zlib.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF + + { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5 +$as_echo_n "checking whether d_make_root() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + + + #include + +int +main (void) +{ + + d_make_root(NULL); + + ; + return 0; +} + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + rm -Rf build -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 -$as_echo_n "checking for zlib.h... " >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_zlib_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -$as_echo "$ac_cv_header_zlib_h" >&6; } + if test $rc -ne 0; then : -fi -if test "x$ac_cv_header_zlib_h" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: - *** zlib.h missing, zlib-devel package required -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: - *** zlib.h missing, zlib-devel package required -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]d_make_root[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else : -{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5 -$as_echo_n "checking for compress2 in -lz... " >&6; } -if test "${ac_cv_lib_z_compress2+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_MAKE_ROOT 1 +_ACEOF + + + fi + fi + + + { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5 +$as_echo_n "checking whether d_obtain_alias() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char compress2 (); + + #include + int -main () +main (void) { -return compress2 (); + + d_obtain_alias(NULL); + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_z_compress2=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - ac_cv_lib_z_compress2=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5 -$as_echo "$ac_cv_lib_z_compress2" >&6; } -if test "x$ac_cv_lib_z_compress2" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_OBTAIN_ALIAS 1 _ACEOF - LIBS="-lz $LIBS" -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: - *** compress2() missing, zlib-devel package required -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: - *** compress2() missing, zlib-devel package required -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi + fi + fi + { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5 +$as_echo_n "checking whether check_disk_size_change() is available... " >&6; } -{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5 -$as_echo_n "checking for uncompress in -lz... " >&6; } -if test "${ac_cv_lib_z_uncompress+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char uncompress (); + + #include + int -main () +main (void) { -return uncompress (); + + check_disk_size_change(NULL, NULL); + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_z_uncompress=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - ac_cv_lib_z_uncompress=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5 -$as_echo "$ac_cv_lib_z_uncompress" >&6; } -if test "x$ac_cv_lib_z_uncompress" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHECK_DISK_SIZE_CHANGE 1 _ACEOF - LIBS="-lz $LIBS" -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: - *** uncompress() missing, zlib-devel package required -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: - *** uncompress() missing, zlib-devel package required -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi + fi + fi + { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5 +$as_echo_n "checking whether truncate_setsize() is available... " >&6; } -{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5 -$as_echo_n "checking for crc32 in -lz... " >&6; } -if test "${ac_cv_lib_z_crc32+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char crc32 (); + + #include + int -main () +main (void) { -return crc32 (); + + truncate_setsize(NULL, 0); + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_z_crc32=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - ac_cv_lib_z_crc32=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5 -$as_echo "$ac_cv_lib_z_crc32" >&6; } -if test "x$ac_cv_lib_z_crc32" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - LIBS="-lz $LIBS" + rm -Rf build -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: - *** crc32() missing, zlib-devel package required -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: - *** crc32() missing, zlib-devel package required -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi + if test $rc -ne 0; then : - ZLIB="-lz" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in mm/truncate.c; do + grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ZLIB 1 +#define HAVE_TRUNCATE_SETSIZE 1 _ACEOF + fi + fi - LIBUUID= - if test "${ac_cv_header_uuid_uuid_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5 -$as_echo_n "checking for uuid/uuid.h... " >&6; } -if test "${ac_cv_header_uuid_uuid_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5 -$as_echo "$ac_cv_header_uuid_uuid_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5 -$as_echo_n "checking uuid/uuid.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi + { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5 +$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5 -$as_echo_n "checking uuid/uuid.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + + + #include + +int +main (void) +{ + + struct inode *ip __attribute__ ((unused)) = NULL; + struct inode *dip __attribute__ ((unused)) = NULL; + const struct qstr *str __attribute__ ((unused)) = NULL; + char *name __attribute__ ((unused)) = NULL; + void *value __attribute__ ((unused)) = NULL; + size_t len __attribute__ ((unused)) = 0; + + security_inode_init_security(ip, dip, str, &name, &value, &len); + + ; + return 0; +} + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c 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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5 -$as_echo_n "checking for uuid/uuid.h... " >&6; } -if test "${ac_cv_header_uuid_uuid_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_uuid_uuid_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5 -$as_echo "$ac_cv_header_uuid_uuid_h" >&6; } -fi -if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: - *** uuid/uuid.h missing, libuuid-devel package required -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: - *** uuid/uuid.h missing, libuuid-devel package required -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi + rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" -{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5 -$as_echo_n "checking for uuid_generate in -luuid... " >&6; } -if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-luuid $LIBS" -cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5 +$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char uuid_generate (); + + #include + int -main () +main (void) { -return uuid_generate (); + + struct inode *ip __attribute__ ((unused)) = NULL; + struct inode *dip __attribute__ ((unused)) = NULL; + const struct qstr *str __attribute__ ((unused)) = NULL; + initxattrs func __attribute__ ((unused)) = NULL; + + security_inode_init_security(ip, dip, str, func, NULL); + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_uuid_uuid_generate=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_uuid_uuid_generate=no -fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5 -$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; } -if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUUID 1 + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5 +$as_echo_n "checking whether mount_nodev() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + mount_nodev(NULL, 0, NULL, NULL); + + ; + return 0; +} + _ACEOF - LIBS="-luuid $LIBS" + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: - *** uuid_generate() missing, libuuid-devel package required -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: - *** uuid_generate() missing, libuuid-devel package required -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + fi + rm -Rf build -{ $as_echo "$as_me:$LINENO: checking for uuid_is_null in -luuid" >&5 -$as_echo_n "checking for uuid_is_null in -luuid... " >&6; } -if test "${ac_cv_lib_uuid_uuid_is_null+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-luuid $LIBS" -cat >conftest.$ac_ext <<_ACEOF + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]mount_nodev[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/super.c; do + grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MOUNT_NODEV 1 +_ACEOF + + + fi + fi + + + + { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5 +$as_echo_n "checking whether super_block has s_shrink... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char uuid_is_null (); + + #include + int -main () +main (void) { -return uuid_is_null (); + + int (*shrink)(struct shrinker *, struct shrink_control *sc) + __attribute__ ((unused)) = NULL; + struct super_block sb __attribute__ ((unused)) = { + .s_shrink.shrink = shrink, + .s_shrink.seeks = DEFAULT_SEEKS, + .s_shrink.batch = 0, + }; + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_uuid_uuid_is_null=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHRINK 1 +_ACEOF + + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_uuid_uuid_is_null=no -fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_is_null" >&5 -$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; } -if test "x$ac_cv_lib_uuid_uuid_is_null" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUUID 1 + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether super_block has s_bdi" >&5 +$as_echo_n "checking whether super_block has s_bdi... " >&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 + +int +main (void) +{ + + struct super_block sb __attribute__ ((unused)); + sb.s_bdi = NULL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BDI 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 bdi_setup_and_register() is available" >&5 +$as_echo_n "checking whether bdi_setup_and_register() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + bdi_setup_and_register(NULL, NULL, 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 + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + +fi + + rm -Rf build + + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in mm/backing-dev.c; do + grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BDI_SETUP_AND_REGISTER 1 +_ACEOF + + + fi + fi + + + + { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5 +$as_echo_n "checking whether set_nlink() is available... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct inode node; + unsigned int link = 0; + (void) set_nlink(&node, link); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NLINK 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + if test "$LINUX_OBJ" != "$LINUX"; then + + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" + +fi + + + + + KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE" + KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL" + KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\"" + + + ;; + user) + + +# Check whether --with-udevdir was given. +if test "${with_udevdir+set}" = set; then + withval=$with_udevdir; udevdir=$withval +else + udevdir='${exec_prefix}/lib/udev' +fi + + + +# Check whether --with-udevruledir was given. +if test "${with_udevruledir+set}" = set; then + withval=$with_udevruledir; udevruledir=$withval +else + udevruledir='${udevdir}/rules.d' +fi + + + + + + + { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5 +$as_echo_n "checking for target asm dir... " >&6; } + TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/` + + case $TARGET_ARCH in + i386|x86_64) + TARGET_ASM_DIR=asm-${TARGET_ARCH} + ;; + *) + TARGET_ASM_DIR=asm-generic + ;; + esac + + + { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5 +$as_echo "$TARGET_ASM_DIR" >&6; } + + + { $as_echo "$as_me:$LINENO: checking for ioctl()" >&5 +$as_echo_n "checking for ioctl()... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "ioctl" >/dev/null 2>&1; then + is_unistd=yes +else + is_unistd=no +fi +rm -f conftest* + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "ioctl" >/dev/null 2>&1; then + is_sys_ioctl=yes +else + is_sys_ioctl=no +fi +rm -f conftest* + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "ioctl" >/dev/null 2>&1; then + is_stropts=yes +else + is_stropts=no +fi +rm -f conftest* + + + if test $is_unistd = yes; then + result=unistd.h + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IOCTL_IN_UNISTD_H 1 +_ACEOF + + else + + if test $is_sys_ioctl = yes; then + result=sys/ioctl.h + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IOCTL_IN_SYS_IOCTL_H 1 +_ACEOF + + elif test $is_stropts = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IOCTL_IN_STROPTS_H 1 +_ACEOF + + else + result=no + fi + fi + + if test $result = no; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Cannot locate ioctl() definition" >&5 +$as_echo "$as_me: error: *** Cannot locate ioctl() definition" >&2;} + { (exit 1); exit 1; }; } + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + + ZLIB= + + if test "${ac_cv_header_zlib_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 +$as_echo_n "checking for zlib.h... " >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +$as_echo "$ac_cv_header_zlib_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 +$as_echo_n "checking zlib.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 +$as_echo_n "checking zlib.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 +$as_echo_n "checking for zlib.h... " >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_zlib_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +$as_echo "$ac_cv_header_zlib_h" >&6; } + +fi +if test "x$ac_cv_header_zlib_h" = x""yes; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: + *** zlib.h missing, zlib-devel package required +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: + *** zlib.h missing, zlib-devel package required +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + + +{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5 +$as_echo_n "checking for compress2 in -lz... " >&6; } +if test "${ac_cv_lib_z_compress2+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char compress2 (); +int +main () +{ +return compress2 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_z_compress2=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_compress2=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5 +$as_echo "$ac_cv_lib_z_compress2" >&6; } +if test "x$ac_cv_lib_z_compress2" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: + *** compress2() missing, zlib-devel package required +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: + *** compress2() missing, zlib-devel package required +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + +{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5 +$as_echo_n "checking for uncompress in -lz... " >&6; } +if test "${ac_cv_lib_z_uncompress+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uncompress (); +int +main () +{ +return uncompress (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_z_uncompress=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_uncompress=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5 +$as_echo "$ac_cv_lib_z_uncompress" >&6; } +if test "x$ac_cv_lib_z_uncompress" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: + *** uncompress() missing, zlib-devel package required +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: + *** uncompress() missing, zlib-devel package required +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + +{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5 +$as_echo_n "checking for crc32 in -lz... " >&6; } +if test "${ac_cv_lib_z_crc32+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char crc32 (); +int +main () +{ +return crc32 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_z_crc32=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_crc32=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5 +$as_echo "$ac_cv_lib_z_crc32" >&6; } +if test "x$ac_cv_lib_z_crc32" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: + *** crc32() missing, zlib-devel package required +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: + *** crc32() missing, zlib-devel package required +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + ZLIB="-lz" + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB 1 +_ACEOF + + + + LIBUUID= + + if test "${ac_cv_header_uuid_uuid_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5 +$as_echo_n "checking for uuid/uuid.h... " >&6; } +if test "${ac_cv_header_uuid_uuid_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5 +$as_echo "$ac_cv_header_uuid_uuid_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5 +$as_echo_n "checking uuid/uuid.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5 +$as_echo_n "checking uuid/uuid.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5 +$as_echo_n "checking for uuid/uuid.h... " >&6; } +if test "${ac_cv_header_uuid_uuid_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_uuid_uuid_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5 +$as_echo "$ac_cv_header_uuid_uuid_h" >&6; } + +fi +if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: + *** uuid/uuid.h missing, libuuid-devel package required +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: + *** uuid/uuid.h missing, libuuid-devel package required +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + + +{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5 +$as_echo_n "checking for uuid_generate in -luuid... " >&6; } +if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-luuid $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_generate (); +int +main () +{ +return uuid_generate (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_uuid_uuid_generate=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_uuid_uuid_generate=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5 +$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; } +if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUUID 1 +_ACEOF + + LIBS="-luuid $LIBS" + +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: + *** uuid_generate() missing, libuuid-devel package required +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: + *** uuid_generate() missing, libuuid-devel package required +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + +{ $as_echo "$as_me:$LINENO: checking for uuid_is_null in -luuid" >&5 +$as_echo_n "checking for uuid_is_null in -luuid... " >&6; } +if test "${ac_cv_lib_uuid_uuid_is_null+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-luuid $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_is_null (); +int +main () +{ +return uuid_is_null (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_uuid_uuid_is_null=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_uuid_uuid_is_null=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_is_null" >&5 +$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; } +if test "x$ac_cv_lib_uuid_uuid_is_null" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUUID 1 +_ACEOF + + LIBS="-luuid $LIBS" + +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: + *** uuid_is_null() missing, libuuid-devel package required +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: + *** uuid_is_null() missing, libuuid-devel package required +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + LIBUUID="-luuid" + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBUUID 1 +_ACEOF + + + + +# Check whether --with-blkid was given. +if test "${with_blkid+set}" = set; then + withval=$with_blkid; +else + with_blkid=check +fi + + + LIBBLKID= + if test "x$with_blkid" != xno; then + + { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5 +$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; } +if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblkid $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char blkid_get_cache (); +int +main () +{ +return blkid_get_cache (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_blkid_blkid_get_cache=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_blkid_blkid_get_cache=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5 +$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; } +if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then + + { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5 +$as_echo_n "checking for blkid zfs support... " >&6; } + + ZFS_DEV=`mktemp` + dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \ + >/dev/null 2>/dev/null + echo -en "\x0c\xb1\xba\0\0\0\0\0" | \ + dd of=$ZFS_DEV bs=1k count=8 \ + seek=132 conv=notrunc &>/dev/null \ + >/dev/null 2>/dev/null + + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="-lblkid" + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + blkid_cache cache; + char *value; + + if (blkid_get_cache(&cache, NULL) < 0) + return 1; + + value = blkid_get_tag_value(cache, "TYPE", + "$ZFS_DEV"); + if (!value) { + blkid_put_cache(cache); + return 2; + } + + if (strcmp(value, "zfs")) { + free(value); + blkid_put_cache(cache); + return 3; + } + + free(value); + blkid_put_cache(cache); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + rm -f $ZFS_DEV + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + LIBBLKID="-lblkid" + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBBLKID 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 ) + + rm -f $ZFS_DEV + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + if test "x$with_blkid" != xcheck; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: --with-blkid given but unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + LDFLAGS="$saved_LDFLAGS" + +else + + if test "x$with_blkid" != xcheck; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: --with-blkid given but unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + +fi + + +fi + + + + +# Check whether --with-selinux was given. +if test "${with_selinux+set}" = set; then + withval=$with_selinux; +else + with_selinux=check +fi + + + LIBSELINUX= + if test "x$with_selinux" != xno; then + + if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 +$as_echo_n "checking for selinux/selinux.h... " >&6; } +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 +$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5 +$as_echo_n "checking selinux/selinux.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5 +$as_echo_n "checking selinux/selinux.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 +$as_echo_n "checking for selinux/selinux.h... " >&6; } +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_selinux_selinux_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 +$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } + +fi +if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then + + { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5 +$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } +if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lselinux $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char is_selinux_enabled (); +int +main () +{ +return is_selinux_enabled (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_selinux_is_selinux_enabled=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_selinux_is_selinux_enabled=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 +$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } +if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then + + LIBSELINUX="-lselinux" + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBSELINUX 1 +_ACEOF + + +else + + if test "x$with_selinux" != xcheck; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: --with-selinux given but unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +fi + + +fi + + +else + + if test "x$with_selinux" != xcheck; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: --with-selinux given but unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +fi + + +fi + + + +else + + { $as_echo "$as_me:$LINENO: checking for selinux support" >&5 +$as_echo_n "checking for selinux support... " >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than= support" >&5 +$as_echo_n "checking for -Wframe-larger-than= support... " >&6; } + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wframe-larger-than=1024" + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_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 + + FRAME_LARGER_THAN=-Wframe-larger-than=1024 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + FRAME_LARGER_THAN= + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + CFLAGS="$saved_flags" + + + + + { $as_echo "$as_me:$LINENO: checking whether pthread stack includes guard" >&5 +$as_echo_n "checking whether pthread stack includes guard... " >&6; } + + saved_CFLAGS="$CFLAGS" + CFLAGS="-fstack-check" + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="-lpthread" + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + #include + #include + + #define PAGESIZE (sysconf(_SC_PAGESIZE)) + #define STACK_SIZE 8192 + #define BUFSIZE 4096 + + void * func(void *arg) + { + char buf[BUFSIZE]; + } + +int +main () +{ + + pthread_t tid; + pthread_attr_t attr; + struct rlimit l; + + l.rlim_cur = 0; + l.rlim_max = 0; + setrlimit(RLIMIT_CORE, &l); + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + STACK_SIZE); + pthread_attr_setguardsize(&attr, PAGESIZE); + pthread_create(&tid, &attr, func, NULL); + pthread_join(tid, NULL); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + 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 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + +cat >>confdefs.h <<\_ACEOF +#define NPTL_GUARD_WITHIN_STACK 1 +_ACEOF + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CFLAGS="$saved_CFLAGS" + LDFLAGS="$saved_LDFLAGS" + + ;; + 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; } + if test "x$enable_linux_builtin" != xyes; then + { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 +$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} + { (exit 1); exit 1; }; } + else + { { $as_echo "$as_me:$LINENO: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&5 +$as_echo "$as_me: error: + *** Cannot find UTS_RELEASE definition. + *** Please run 'make prepare' inside the kernel source tree." >&2;} + { (exit 1); exit 1; }; } + fi + +fi + + + { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 +$as_echo "$kernsrcver" >&6; } + + LINUX=${kernelsrc} + LINUX_OBJ=${kernelbuild} + LINUX_VERSION=${kernsrcver} + + + + + + + modpost=$LINUX/scripts/Makefile.modpost + { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 +$as_echo_n "checking kernel file name for module symbols... " >&6; } + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then + + if grep -q Modules.symvers $modpost; then + + LINUX_SYMBOLS=Modules.symvers + +else + + LINUX_SYMBOLS=Module.symvers + +fi + + + if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then + + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If 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; } + + + + + +# Check whether --with-spl was given. +if test "${with_spl+set}" = set; then + withval=$with_spl; splsrc="$withval" +fi + + + +# Check whether --with-spl-obj was given. +if test "${with_spl_obj+set}" = set; then + withval=$with_spl_obj; splbuild="$withval" +fi + + + + { $as_echo "$as_me:$LINENO: checking spl source directory" >&5 +$as_echo_n "checking spl source directory... " >&6; } + if test -z "$splsrc"; then + + sourcelink=`ls -1d /usr/src/spl-*/${LINUX_VERSION} \ + 2>/dev/null | tail -1` + + if test -z "$sourcelink" || test ! -e $sourcelink; then + + sourcelink=../spl + +fi + + + if test -e $sourcelink; then + + splsrc=`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 spl devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the spl source with the '--with-spl=PATH' option." >&5 +$as_echo "$as_me: error: + *** Please make sure the spl devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the spl source with the '--with-spl=PATH' option." >&2;} + { (exit 1); exit 1; }; } + +fi + + +else + + if test "$splsrc" = "NONE"; then + + splbuild=NONE + splsrcver=NONE + +fi + + +fi + + + { $as_echo "$as_me:$LINENO: result: $splsrc" >&5 +$as_echo "$splsrc" >&6; } + { $as_echo "$as_me:$LINENO: checking spl build directory" >&5 +$as_echo_n "checking spl build directory... " >&6; } + if test -z "$splbuild"; then + + splbuild=${splsrc} + +fi + + { $as_echo "$as_me:$LINENO: result: $splbuild" >&5 +$as_echo "$splbuild" >&6; } + + { $as_echo "$as_me:$LINENO: checking spl source version" >&5 +$as_echo_n "checking spl source version... " >&6; } + if test -r $splbuild/spl_config.h && + fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then + + + splsrcver=`(echo "#include "; + echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") | + cpp -I $splbuild | + grep "^splsrcver=" | tr -d \" | cut -d= -f2` + +fi + + + if test -z "$splsrcver"; then + + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** Cannot determine the version of the spl source. + *** Please prepare the spl source before running this script" >&5 +$as_echo "$as_me: error: + *** Cannot determine the version of the spl source. + *** Please prepare the spl source before running this script" >&2;} + { (exit 1); exit 1; }; } + +fi + + + { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5 +$as_echo "$splsrcver" >&6; } + + SPL=${splsrc} + SPL_OBJ=${splbuild} + SPL_VERSION=${splsrcver} + - LIBS="-luuid $LIBS" -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: - *** uuid_is_null() missing, libuuid-devel package required -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: - *** uuid_is_null() missing, libuuid-devel package required -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - LIBUUID="-luuid" + { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5 +$as_echo_n "checking spl file name for module symbols... " >&6; } + if test -r $SPL_OBJ/Module.symvers; then + + SPL_SYMBOLS=Module.symvers -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBUUID 1 -_ACEOF +elif test -r $SPL_OBJ/Modules.symvers; then + + SPL_SYMBOLS=Modules.symvers +elif test -r $SPL_OBJ/module/Module.symvers; then + SPL_SYMBOLS=Module.symvers +elif test -r $SPL_OBJ/module/Modules.symvers; then + + SPL_SYMBOLS=Modules.symvers -# Check whether --with-blkid was given. -if test "${with_blkid+set}" = set; then - withval=$with_blkid; else - with_blkid=check + + SPL_SYMBOLS=$LINUX_SYMBOLS + fi - LIBBLKID= - if test "x$with_blkid" != xno; then + { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5 +$as_echo "$SPL_SYMBOLS" >&6; } - { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5 -$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; } -if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lblkid $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + + { $as_echo "$as_me:$LINENO: checking whether 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. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char blkid_get_cache (); + int -main () +main (void) { -return blkid_get_cache (); + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_blkid_blkid_get_cache=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_blkid_blkid_get_cache=no -fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + 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 + + -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5 -$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; } -if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5 -$as_echo_n "checking for blkid zfs support... " >&6; } + rm -Rf build - ZFS_DEV=`mktemp` - dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \ - >/dev/null 2>/dev/null - echo -en "\x0c\xb1\xba\0\0\0\0\0" | \ - dd of=$ZFS_DEV bs=1k count=8 \ - seek=132 conv=notrunc &>/dev/null \ - >/dev/null 2>/dev/null - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="-lblkid" - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - #include - #include -int -main () -{ + if test "$ZFS_META_LICENSE" = GPL; then - blkid_cache cache; - char *value; - if (blkid_get_cache(&cache, NULL) < 0) - return 1; +cat >>confdefs.h <<\_ACEOF +#define HAVE_GPL_ONLY_SYMBOLS 1 +_ACEOF - value = blkid_get_tag_value(cache, "TYPE", - "$ZFS_DEV"); - if (!value) { - blkid_put_cache(cache); - return 2; - } - if (strcmp(value, "zfs")) { - free(value); - blkid_put_cache(cache); - return 3; - } +fi - free(value); - blkid_put_cache(cache); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rm -f $ZFS_DEV - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - LIBBLKID="-lblkid" + { $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 -#define HAVE_LIBBLKID 1 + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -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 + #include -( exit $ac_status ) +int +main (void) +{ - rm -f $ZFS_DEV - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - if test "x$with_blkid" != xcheck; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --with-blkid given but unavailable -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi + #ifndef CONFIG_PREEMPT + #error CONFIG_PREEMPT not #defined + #endif + ; + return 0; +} -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 +_ACEOF + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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 - LDFLAGS="$saved_LDFLAGS" + { $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; } - if test "x$with_blkid" != xcheck; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --with-blkid given but unavailable -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi fi + rm -Rf build -fi -# Check whether --with-selinux was given. -if test "${with_selinux+set}" = set; then - withval=$with_selinux; -else - with_selinux=check -fi + { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5 +$as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; } - LIBSELINUX= - if test "x$with_selinux" != xno; then - if test "${ac_cv_header_selinux_selinux_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 -$as_echo_n "checking for selinux/selinux.h... " >&6; } -if test "${ac_cv_header_selinux_selinux_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 -$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5 -$as_echo_n "checking selinux/selinux.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include + + + #include + +int +main (void) +{ + + #ifndef CONFIG_DEBUG_LOCK_ALLOC + #error CONFIG_DEBUG_LOCK_ALLOC not #defined + #endif + + ; + return 0; +} + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - ac_header_compiler=no -fi + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + { $as_echo "$as_me:$LINENO: checking whether mutex_lock() is GPL-only" >&5 +$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5 -$as_echo_n "checking selinux/selinux.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + + + #include + #include + + MODULE_LICENSE("$ZFS_META_LICENSE"); + +int +main (void) +{ + + struct mutex lock; + + mutex_init(&lock); + mutex_lock(&lock); + mutex_unlock(&lock); + + ; + return 0; +} + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible + *** with the CDDL license and will prevent the module linking stage + *** from succeeding. You must rebuild your kernel without this + *** option enabled." >&5 +$as_echo "$as_me: error: + *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible + *** with the CDDL license and will prevent the module linking stage + *** from succeeding. You must rebuild your kernel without this + *** option enabled." >&2;} + { (exit 1); exit 1; }; } + + + fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 -$as_echo_n "checking for selinux/selinux.h... " >&6; } -if test "${ac_cv_header_selinux_selinux_h+set}" = set; then - $as_echo_n "(cached) " >&6 else - ac_cv_header_selinux_selinux_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 -$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } + $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 -if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5 -$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lselinux $LIBS" -cat >conftest.$ac_ext <<_ACEOF + rm -Rf build + + + + + + + { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5 +$as_echo_n "checking block device operation prototypes... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char is_selinux_enabled (); -int -main () -{ -return is_selinux_enabled (); + + #include + +int +main (void) +{ + + int (*blk_open) (struct block_device *, fmode_t) = NULL; + int (*blk_release) (struct gendisk *, fmode_t) = NULL; + int (*blk_ioctl) (struct block_device *, fmode_t, + unsigned, unsigned long) = NULL; + int (*blk_compat_ioctl) (struct block_device *, fmode_t, + unsigned, unsigned long) = NULL; + struct block_device_operations blk_ops = { + .open = blk_open, + .release = blk_release, + .ioctl = blk_ioctl, + .compat_ioctl = blk_compat_ioctl, + }; + + blk_ops.open(NULL, 0); + blk_ops.release(NULL, 0); + blk_ops.ioctl(NULL, 0, 0, 0); + blk_ops.compat_ioctl(NULL, 0, 0, 0); + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_selinux_is_selinux_enabled=yes + (exit $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: struct block_device" >&5 +$as_echo "struct block_device" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_selinux_is_selinux_enabled=no -fi + { $as_echo "$as_me:$LINENO: result: struct inode" >&5 +$as_echo "struct inode" >&6; } + + -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 -$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } -if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then - LIBSELINUX="-lselinux" + rm -Rf build -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBSELINUX 1 -_ACEOF + EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5 +$as_echo_n "checking whether kernel defines fmode_t... " >&6; } -else - if test "x$with_selinux" != xcheck; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --with-selinux given but unavailable -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +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 -fi +int +main (void) +{ + fmode_t *ptr __attribute__ ((unused)); -else + ; + return 0; +} - if test "x$with_selinux" != xcheck; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --with-selinux given but unavailable -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +_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 -fi + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_FMODE_T 1 +_ACEOF else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: checking for selinux support" >&5 -$as_echo_n "checking for selinux support... " >&6; } { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + + fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than= support" >&5 -$as_echo_n "checking for -Wframe-larger-than= support... " >&6; } - saved_flags="$CFLAGS" - CFLAGS="$CFLAGS -Wframe-larger-than=1024" - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5 +$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&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 + int -main () +main (void) { + int val __attribute__ ((unused)); + val = KOBJ_NAME_LEN; + ; return 0; } + _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c 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); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - FRAME_LARGER_THAN=-Wframe-larger-than=1024 { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_KOBJ_NAME_LEN 1 +_ACEOF + + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) - - FRAME_LARGER_THAN= { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +fi - CFLAGS="$saved_flags" + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether pthread stack includes guard" >&5 -$as_echo_n "checking whether pthread stack includes guard... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5 +$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; } - saved_CFLAGS="$CFLAGS" - CFLAGS="-fstack-check" - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="-lpthread" - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include - #include - #include - - #define PAGESIZE (sysconf(_SC_PAGESIZE)) - #define STACK_SIZE 8192 - #define BUFSIZE 4096 - void * func(void *arg) - { - char buf[BUFSIZE]; - } + #include int -main () -{ - - pthread_t tid; - pthread_attr_t attr; - struct rlimit l; - - l.rlim_cur = 0; - l.rlim_max = 0; - setrlimit(RLIMIT_CORE, &l); - pthread_attr_init(&attr); - pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + STACK_SIZE); - pthread_attr_setguardsize(&attr, PAGESIZE); - pthread_create(&tid, &attr, func, NULL); - pthread_join(tid, NULL); +main (void) +{ + + struct block_device *bdev = NULL; + (void) blkdev_get(bdev, 0, NULL); ; return 0; } + _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARG_BLKDEV_GET 1 +_ACEOF + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) - + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define NPTL_GUARD_WITHIN_STACK 1 -_ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi + rm -Rf build - CFLAGS="$saved_CFLAGS" - LDFLAGS="$saved_LDFLAGS" - ;; - all) + { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5 +$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; } -# Check whether --with-linux was given. -if test "${with_linux+set}" = set; then - withval=$with_linux; kernelsrc="$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. */ -# Check whether --with-linux-obj was given. -if test "${with_linux_obj+set}" = set; then - withval=$with_linux_obj; kernelbuild="$withval" -fi + #include - { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 -$as_echo_n "checking kernel source directory... " >&6; } - if test -z "$kernelsrc"; then +int +main (void) +{ - if test -e "/lib/modules/$(uname -r)/source"; then + blkdev_get_by_path(NULL, 0, NULL); - headersdir="/lib/modules/$(uname -r)/source" - sourcelink=$(readlink -f "$headersdir") + ; + return 0; +} -elif test -e "/lib/modules/$(uname -r)/build"; then +_ACEOF - headersdir="/lib/modules/$(uname -r)/build" - sourcelink=$(readlink -f "$headersdir") + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ - 2>/dev/null | grep -v obj | tail -1) fi + rm -Rf build - if test -n "$sourcelink" && test -e ${sourcelink}; then - kernelsrc=`readlink -f ${sourcelink}` + if test $rc -ne 0; then : -else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - { $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; }; } + else + if test "x$enable_linux_builtin" != xyes; then -fi + grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + fi + if test $rc -ne 0; then : -else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - if test "$kernelsrc" = "NONE"; then + else : - kernsrcver=NONE + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF -fi + 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 + { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5 +$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; } - 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 +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} -elif test -d ${kernelsrc}-obj/${target_cpu}/default; then + #include - kernelbuild=${kernelsrc}-obj/${target_cpu}/default +int +main (void) +{ -elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then + open_bdev_exclusive(NULL, 0, NULL); - kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} + ; + return 0; +} -else +_ACEOF - kernelbuild=${kernelsrc} -fi + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 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 + rm -Rf build -elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then - utsrelease=linux/utsrelease.h + if test $rc -ne 0; then : -elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - utsrelease=generated/utsrelease.h + else + if test "x$enable_linux_builtin" != xyes; then -fi + grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + fi + if test $rc -ne 0; then : - if test "$utsrelease"; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - kernsrcver=`(echo "#include <$utsrelease>"; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` + else : - if test -z "$kernsrcver"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - { $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; }; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPEN_BDEV_EXCLUSIVE 1 +_ACEOF -fi + fi + 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: checking whether invalidate_bdev() wants 1 arg" >&5 +$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; } - { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 -$as_echo "$kernsrcver" >&6; } +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - LINUX=${kernelsrc} - LINUX_OBJ=${kernelbuild} - LINUX_VERSION=${kernsrcver} + #include +int +main (void) +{ + struct block_device *bdev = NULL; + invalidate_bdev(bdev); + ; + return 0; +} +_ACEOF - 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 + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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 - LINUX_SYMBOLS=Modules.symvers + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -else +cat >>confdefs.h <<\_ACEOF +#define HAVE_1ARG_INVALIDATE_BDEV 1 +_ACEOF - LINUX_SYMBOLS=Module.symvers -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; } - 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 + rm -Rf build -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 bdev_logical_block_size() is available" >&5 +$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include -# Check whether --with-spl was given. -if test "${with_spl+set}" = set; then - withval=$with_spl; splsrc="$withval" -fi +int +main (void) +{ + struct block_device *bdev = NULL; + bdev_logical_block_size(bdev); + ; + return 0; +} -# Check whether --with-spl-obj was given. -if test "${with_spl_obj+set}" = set; then - withval=$with_spl_obj; splbuild="$withval" -fi +_ACEOF + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: checking spl source directory" >&5 -$as_echo_n "checking spl source directory... " >&6; } - if test -z "$splsrc"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - sourcelink=`ls -1d /usr/src/spl-*/${LINUX_VERSION} \ - 2>/dev/null | tail -1` +cat >>confdefs.h <<\_ACEOF +#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1 +_ACEOF - if test -z "$sourcelink" || test ! -e $sourcelink; then - sourcelink=../spl +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - if test -e $sourcelink; then - splsrc=`readlink -f ${sourcelink}` +fi -else + rm -Rf build - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Please make sure the spl devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the spl source with the '--with-spl=PATH' option." >&5 -$as_echo "$as_me: error: - *** Please make sure the spl devel package for your distribution - *** is installed then try again. If that fails you can specify the - *** location of the spl source with the '--with-spl=PATH' option." >&2;} - { (exit 1); exit 1; }; } -fi + EXTRA_KCFLAGS="$tmp_flags" -else + { $as_echo "$as_me:$LINENO: checking whether bio_empty_barrier() is defined" >&5 +$as_echo_n "checking whether bio_empty_barrier() is defined... " >&6; } + EXTRA_KCFLAGS="-Werror" - if test "$splsrc" = "NONE"; then - splbuild=NONE - splsrcver=NONE +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 -fi +int +main (void) +{ + struct bio bio; + (void)bio_empty_barrier(&bio); - { $as_echo "$as_me:$LINENO: result: $splsrc" >&5 -$as_echo "$splsrc" >&6; } - { $as_echo "$as_me:$LINENO: checking spl build directory" >&5 -$as_echo_n "checking spl build directory... " >&6; } - if test -z "$splbuild"; then + ; + return 0; +} - splbuild=${splsrc} +_ACEOF -fi - { $as_echo "$as_me:$LINENO: result: $splbuild" >&5 -$as_echo "$splbuild" >&6; } + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: checking spl source version" >&5 -$as_echo_n "checking spl source version... " >&6; } - if test -r $splbuild/spl_config.h && - fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_EMPTY_BARRIER 1 +_ACEOF - splsrcver=`(echo "#include "; - echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") | - cpp -I $splbuild | - grep "^splsrcver=" | tr -d \" | cut -d= -f2` -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; } - if test -z "$splsrcver"; then - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Cannot determine the version of the spl source. - *** Please prepare the spl source before running this script" >&5 -$as_echo "$as_me: error: - *** Cannot determine the version of the spl source. - *** Please prepare the spl source before running this script" >&2;} - { (exit 1); exit 1; }; } fi + rm -Rf build - { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5 -$as_echo "$splsrcver" >&6; } - SPL=${splsrc} - SPL_OBJ=${splbuild} - SPL_VERSION=${splsrcver} + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5 +$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5 -$as_echo_n "checking spl file name for module symbols... " >&6; } - if test -r $SPL_OBJ/Module.symvers; then + #include - SPL_SYMBOLS=Module.symvers +int +main (void) +{ -elif test -r $SPL_OBJ/Modules.symvers; then + int flags __attribute__ ((unused)); + flags = (1 << BIO_RW_FAILFAST); - SPL_SYMBOLS=Modules.symvers + ; + return 0; +} -elif test -r $SPL_OBJ/module/Module.symvers; then +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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 - SPL_SYMBOLS=Module.symvers + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -elif test -r $SPL_OBJ/module/Modules.symvers; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_RW_FAILFAST 1 +_ACEOF - SPL_SYMBOLS=Modules.symvers else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - SPL_SYMBOLS=$LINUX_SYMBOLS + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -fi - { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5 -$as_echo "$SPL_SYMBOLS" >&6; } +fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5 -$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5 +$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18363,15 +21014,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - #ifndef CONFIG_PREEMPT - #error CONFIG_PREEMPT not #defined - #endif + int flags __attribute__ ((unused)); + flags = ((1 << BIO_RW_FAILFAST_DEV) | + (1 << BIO_RW_FAILFAST_TRANSPORT) | + (1 << BIO_RW_FAILFAST_DRIVER)); ; return 0; @@ -18380,9 +21032,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=$? @@ -18396,13 +21050,11 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Kernel built with CONFIG_PREEMPT which is not supported. - *** You must rebuild your kernel without this option." >&5 -$as_echo "$as_me: error: - *** Kernel built with CONFIG_PREEMPT which is not supported. - *** You must rebuild your kernel without this option." >&2;} - { (exit 1); exit 1; }; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_RW_FAILFAST_DTD 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 @@ -18413,7 +21065,6 @@ $as_echo "no" >&6; } - fi rm -Rf build @@ -18421,10 +21072,8 @@ fi - if test "$ZFS_META_LICENSE" = CDDL; then - - { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5 -$as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5 +$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18435,15 +21084,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - #ifndef CONFIG_DEBUG_LOCK_ALLOC - #error CONFIG_DEBUG_LOCK_ALLOC not #defined - #endif + int flags __attribute__ ((unused)); + flags = REQ_FAILFAST_MASK; ; return 0; @@ -18452,9 +21100,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=$? @@ -18468,15 +21118,11 @@ _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is - *** incompatible with the CDDL license. You must rebuild - *** your kernel without this option." >&5 -$as_echo "$as_me: error: - *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is - *** incompatible with the CDDL license. You must rebuild - *** your kernel without this option." >&2;} - { (exit 1); exit 1; }; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_REQ_FAILFAST_MASK 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 @@ -18487,7 +21133,6 @@ $as_echo "no" >&6; } - fi rm -Rf build @@ -18495,25 +21140,10 @@ fi -fi - - - if test "$ZFS_META_LICENSE" = GPL; then - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GPL_ONLY_SYMBOLS 1 -_ACEOF - - -fi - - - - { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5 -$as_echo_n "checking block device operation prototypes... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5 +$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; } tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + EXTRA_KCFLAGS="-Werror" cat confdefs.h - <<_ACEOF >conftest.c @@ -18524,29 +21154,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int (*blk_open) (struct block_device *, fmode_t) = NULL; - int (*blk_release) (struct gendisk *, fmode_t) = NULL; - int (*blk_ioctl) (struct block_device *, fmode_t, - unsigned, unsigned long) = NULL; - int (*blk_compat_ioctl) (struct block_device *, fmode_t, - unsigned, unsigned long) = NULL; - struct block_device_operations blk_ops = { - .open = blk_open, - .release = blk_release, - .ioctl = blk_ioctl, - .compat_ioctl = blk_compat_ioctl, - }; + void (*wanted_end_io)(struct bio *, int) = NULL; + bio_end_io_t *local_end_io __attribute__ ((unused)); - blk_ops.open(NULL, 0); - blk_ops.release(NULL, 0); - blk_ops.ioctl(NULL, 0, 0, 0); - blk_ops.compat_ioctl(NULL, 0, 0, 0); + local_end_io = wanted_end_io; ; return 0; @@ -18555,9 +21172,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=$? @@ -18569,11 +21188,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: struct block_device" >&5 -$as_echo "struct block_device" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1 +#define HAVE_2ARGS_BIO_END_IO_T 1 _ACEOF @@ -18581,8 +21200,8 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: struct inode" >&5 -$as_echo "struct inode" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -18593,8 +21212,9 @@ fi EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5 -$as_echo_n "checking whether kernel defines fmode_t... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNC is defined" >&5 +$as_echo_n "checking whether BIO_RW_SYNC is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18605,13 +21225,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - fmode_t *ptr __attribute__ ((unused)); + int flags __attribute__ ((unused)); + flags = BIO_RW_SYNC; ; return 0; @@ -18620,9 +21241,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=$? @@ -18638,7 +21261,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FMODE_T 1 +#define HAVE_BIO_RW_SYNC 1 _ACEOF @@ -18658,8 +21281,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5 -$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5 +$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18670,14 +21293,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int val __attribute__ ((unused)); - val = KOBJ_NAME_LEN; + int flags __attribute__ ((unused)); + flags = BIO_RW_SYNCIO; ; return 0; @@ -18686,9 +21309,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=$? @@ -18704,7 +21329,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KOBJ_NAME_LEN 1 +#define HAVE_BIO_RW_SYNCIO 1 _ACEOF @@ -18724,114 +21349,145 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5 -$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; } - grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in fs/block_dev.c; do - grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then + { $as_echo "$as_me:$LINENO: checking whether REQ_SYNC is defined" >&5 +$as_echo_n "checking whether REQ_SYNC is defined... " >&6; } - export=1 - break; -fi +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + #include +int +main (void) +{ -else + int flags __attribute__ ((unused)); + flags = REQ_SYNC; - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_BLKDEV_GET_BY_PATH 1 _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_BLKDEV_GET_BY_PATH 1 +#define HAVE_REQ_SYNC 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5 -$as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; } - grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/block_dev.c; do - grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then + { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is available" >&5 +$as_echo_n "checking whether blk_end_request() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" - export=1 - break; -fi +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + #include +int +main (void) +{ -else + struct request *req = NULL; + (void) blk_end_request(req, 0, 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: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_OPEN_BDEV_EXCLUSIVE 1 +#define HAVE_BLK_END_REQUEST 1 _ACEOF -fi - - else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPEN_BDEV_EXCLUSIVE 1 -_ACEOF fi + rm -Rf build - { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5 -$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is GPL-only" >&5 +$as_echo_n "checking whether blk_end_request() is GPL-only... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18842,14 +21498,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + + MODULE_LICENSE("CDDL"); int main (void) { - struct block_device *bdev = NULL; - invalidate_bdev(bdev); + struct request *req = NULL; + (void) blk_end_request(req, 0, 0); ; return 0; @@ -18858,9 +21517,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=$? @@ -18872,21 +21533,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_1ARG_INVALIDATE_BDEV 1 +#define HAVE_BLK_END_REQUEST_GPL_ONLY 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 @@ -18894,10 +21555,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5 -$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5 +$as_echo_n "checking whether blk_queue_flush() is available... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Wno-unused-but-set-variable" @@ -18916,8 +21578,8 @@ int main (void) { - struct block_device *bdev = NULL; - bdev_logical_block_size(bdev); + struct request_queue *q = NULL; + (void) blk_queue_flush(q, REQ_FLUSH); ; return 0; @@ -18926,9 +21588,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=$? @@ -18944,7 +21608,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1 +#define HAVE_BLK_QUEUE_FLUSH 1 _ACEOF @@ -18962,12 +21626,9 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether bio_empty_barrier() is defined" >&5 -$as_echo_n "checking whether bio_empty_barrier() is defined... " >&6; } - EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5 +$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18978,14 +21639,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + + MODULE_LICENSE("CDDL"); int main (void) { - struct bio bio; - (void)bio_empty_barrier(&bio); + struct request_queue *q = NULL; + (void) blk_queue_flush(q, REQ_FLUSH); ; return 0; @@ -18994,9 +21658,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=$? @@ -19008,21 +21674,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_BIO_EMPTY_BARRIER 1 +#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 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 @@ -19030,10 +21696,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5 -$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5 +$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19044,14 +21713,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = (1 << BIO_RW_FAILFAST); + struct request_queue *q = NULL; + (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS); ; return 0; @@ -19060,9 +21729,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=$? @@ -19078,7 +21749,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_FAILFAST 1 +#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1 _ACEOF @@ -19096,10 +21767,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5 -$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5 +$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19110,16 +21784,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = ((1 << BIO_RW_FAILFAST_DEV) | - (1 << BIO_RW_FAILFAST_TRANSPORT) | - (1 << BIO_RW_FAILFAST_DRIVER)); + struct request_queue *q = NULL; + (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS); ; return 0; @@ -19128,9 +21800,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=$? @@ -19146,7 +21820,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_FAILFAST_DTD 1 +#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1 _ACEOF @@ -19164,10 +21838,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5 -$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_physical_block_size() is available" >&5 +$as_echo_n "checking whether blk_queue_physical_block_size() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19178,14 +21855,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = REQ_FAILFAST_MASK; + struct request_queue *q = NULL; + unsigned short block_size = 1; + (void) blk_queue_physical_block_size(q, block_size); ; return 0; @@ -19194,9 +21872,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=$? @@ -19212,7 +21892,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_REQ_FAILFAST_MASK 1 +#define HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE 1 _ACEOF @@ -19230,12 +21910,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5 -$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_io_opt() is available" >&5 +$as_echo_n "checking whether blk_queue_io_opt() is available... " >&6; } tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19246,16 +21927,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - void (*wanted_end_io)(struct bio *, int) = NULL; - bio_end_io_t *local_end_io __attribute__ ((unused)); - - local_end_io = wanted_end_io; + struct request_queue *q = NULL; + unsigned int opt = 1; + (void) blk_queue_io_opt(q, opt); ; return 0; @@ -19264,9 +21944,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=$? @@ -19282,7 +21964,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_BIO_END_IO_T 1 +#define HAVE_BLK_QUEUE_IO_OPT 1 _ACEOF @@ -19303,8 +21985,10 @@ fi EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNC is defined" >&5 -$as_echo_n "checking whether BIO_RW_SYNC is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_nonrot() is available" >&5 +$as_echo_n "checking whether blk_queue_nonrot() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19315,14 +21999,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = BIO_RW_SYNC; + struct request_queue *q = NULL; + (void) blk_queue_nonrot(q); ; return 0; @@ -19331,9 +22015,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=$? @@ -19349,7 +22035,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_SYNC 1 +#define HAVE_BLK_QUEUE_NONROT 1 _ACEOF @@ -19367,10 +22053,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5 -$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_discard() is available" >&5 +$as_echo_n "checking whether blk_queue_discard() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19381,14 +22070,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = BIO_RW_SYNCIO; + struct request_queue *q = NULL; + (void) blk_queue_discard(q); ; return 0; @@ -19397,9 +22086,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=$? @@ -19415,7 +22106,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_SYNCIO 1 +#define HAVE_BLK_QUEUE_DISCARD 1 _ACEOF @@ -19433,10 +22124,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether REQ_SYNC is defined" >&5 -$as_echo_n "checking whether REQ_SYNC is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_fetch_request() is available" >&5 +$as_echo_n "checking whether blk_fetch_request() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19447,14 +22141,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = REQ_SYNC; + struct request_queue *q = NULL; + (void) blk_fetch_request(q); ; return 0; @@ -19463,9 +22157,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=$? @@ -19481,7 +22177,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_REQ_SYNC 1 +#define HAVE_BLK_FETCH_REQUEST 1 _ACEOF @@ -19499,10 +22195,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is available" >&5 -$as_echo_n "checking whether blk_end_request() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5 +$as_echo_n "checking whether blk_requeue_request() is available... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Wno-unused-but-set-variable" @@ -19521,8 +22218,9 @@ int main (void) { + struct request_queue *q = NULL; struct request *req = NULL; - (void) blk_end_request(req, 0, 0); + blk_requeue_request(q, req); ; return 0; @@ -19531,9 +22229,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=$? @@ -19549,7 +22249,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_END_REQUEST 1 +#define HAVE_BLK_REQUEUE_REQUEST 1 _ACEOF @@ -19567,9 +22267,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is GPL-only" >&5 -$as_echo_n "checking whether blk_end_request() is GPL-only... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is available" >&5 +$as_echo_n "checking whether blk_rq_bytes() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19580,17 +22284,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include #include - MODULE_LICENSE("CDDL"); - int main (void) { struct request *req = NULL; - (void) blk_end_request(req, 0, 0); + (void) blk_rq_bytes(req); ; return 0; @@ -19599,9 +22300,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=$? @@ -19613,21 +22316,21 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_END_REQUEST_GPL_ONLY 1 +#define HAVE_BLK_RQ_BYTES 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 @@ -19635,13 +22338,9 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5 -$as_echo_n "checking whether blk_queue_flush() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is GPL-only" >&5 +$as_echo_n "checking whether blk_rq_bytes() is GPL-only... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -19652,14 +22351,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include + MODULE_LICENSE("CDDL"); + int main (void) { - struct request_queue *q = NULL; - (void) blk_queue_flush(q, REQ_FLUSH); + struct request *req = NULL; + (void) blk_rq_bytes(req); ; return 0; @@ -19668,9 +22370,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=$? @@ -19682,21 +22386,21 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_QUEUE_FLUSH 1 +#define HAVE_BLK_RQ_BYTES_GPL_ONLY 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 @@ -19704,9 +22408,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5 -$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether blk_rq_pos() is available" >&5 +$as_echo_n "checking whether blk_rq_pos() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19717,17 +22425,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include #include - MODULE_LICENSE("CDDL"); - int main (void) { - struct request_queue *q = NULL; - (void) blk_queue_flush(q, REQ_FLUSH); + struct request *req = NULL; + (void) blk_rq_pos(req); ; return 0; @@ -19736,9 +22441,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=$? @@ -19750,21 +22457,21 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1 +#define HAVE_BLK_RQ_POS 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 @@ -19775,8 +22482,8 @@ fi EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5 -$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_rq_sectors() is available" >&5 +$as_echo_n "checking whether blk_rq_sectors() is available... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Wno-unused-but-set-variable" @@ -19795,8 +22502,8 @@ int main (void) { - struct request_queue *q = NULL; - (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS); + struct request *req = NULL; + (void) blk_rq_sectors(req); ; return 0; @@ -19805,9 +22512,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=$? @@ -19823,7 +22532,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1 +#define HAVE_BLK_RQ_SECTORS 1 _ACEOF @@ -19844,8 +22553,8 @@ fi EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5 -$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5 +$as_echo_n "checking whether get_disk_ro() is available... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Wno-unused-but-set-variable" @@ -19864,8 +22573,8 @@ int main (void) { - struct request_queue *q = NULL; - (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS); + struct gendisk *disk = NULL; + (void) get_disk_ro(disk); ; return 0; @@ -19874,9 +22583,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=$? @@ -19892,7 +22603,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1 +#define HAVE_GET_DISK_RO 1 _ACEOF @@ -19912,11 +22623,9 @@ fi EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5 +$as_echo_n "checking whether get_gendisk() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether blk_queue_physical_block_size() is available" >&5 -$as_echo_n "checking whether blk_queue_physical_block_size() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -19927,15 +22636,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request_queue *q = NULL; - unsigned short block_size = 1; - (void) blk_queue_physical_block_size(q, block_size); + get_gendisk(0, NULL); ; return 0; @@ -19944,9 +22651,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=$? @@ -19957,34 +22666,72 @@ _ACEOF ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE 1 -_ACEOF +fi + rm -Rf build -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]get_gendisk[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in block/genhd.c; do + grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_GENDISK 1 +_ACEOF - rm -Rf build + fi + fi - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_queue_io_opt() is available" >&5 -$as_echo_n "checking whether blk_queue_io_opt() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5 +$as_echo_n "checking whether rq_is_sync() is available... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Wno-unused-but-set-variable" @@ -20003,9 +22750,8 @@ int main (void) { - struct request_queue *q = NULL; - unsigned int opt = 1; - (void) blk_queue_io_opt(q, opt); + struct request *req = NULL; + (void) rq_is_sync(req); ; return 0; @@ -20014,9 +22760,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=$? @@ -20032,7 +22780,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_QUEUE_IO_OPT 1 +#define HAVE_RQ_IS_SYNC 1 _ACEOF @@ -20053,8 +22801,8 @@ fi EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_queue_nonrot() is available" >&5 -$as_echo_n "checking whether blk_queue_nonrot() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether rq_for_each_segment() is available" >&5 +$as_echo_n "checking whether rq_for_each_segment() is available... " >&6; } tmp_flags="$EXTRA_KCFLAGS" EXTRA_KCFLAGS="-Wno-unused-but-set-variable" @@ -20073,8 +22821,10 @@ int main (void) { - struct request_queue *q = NULL; - (void) blk_queue_nonrot(q); + struct bio_vec *bv; + struct req_iterator iter; + struct request *req = NULL; + rq_for_each_segment(bv, req, iter) { } ; return 0; @@ -20083,9 +22833,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=$? @@ -20101,7 +22853,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_QUEUE_NONROT 1 +#define HAVE_RQ_FOR_EACH_SEGMENT 1 _ACEOF @@ -20121,11 +22873,8 @@ fi EXTRA_KCFLAGS="$tmp_flags" - - { $as_echo "$as_me:$LINENO: checking whether blk_queue_discard() is available" >&5 -$as_echo_n "checking whether blk_queue_discard() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5 +$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -20136,14 +22885,26 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + + const struct xattr_handler xattr_test_handler = { + .prefix = "test", + .get = NULL, + .set = NULL, + }; + + const struct xattr_handler *xattr_handlers[] = { + &xattr_test_handler, + }; int main (void) { - struct request_queue *q = NULL; - (void) blk_queue_discard(q); + struct super_block sb __attribute__ ((unused)); + + sb.s_xattr = xattr_handlers; ; return 0; @@ -20152,9 +22913,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=$? @@ -20170,7 +22933,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_QUEUE_DISCARD 1 +#define HAVE_CONST_XATTR_HANDLER 1 _ACEOF @@ -20188,13 +22951,10 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_fetch_request() is available" >&5 -$as_echo_n "checking whether blk_fetch_request() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5 +$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -20205,14 +22965,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request_queue *q = NULL; - (void) blk_fetch_request(q); + int (*get)(struct dentry *dentry, const char *name, + void *buffer, size_t size, int handler_flags) = NULL; + struct xattr_handler xops __attribute__ ((unused)); + + xops.get = get; ; return 0; @@ -20221,9 +22984,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=$? @@ -20239,7 +23004,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_FETCH_REQUEST 1 +#define HAVE_DENTRY_XATTR_GET 1 _ACEOF @@ -20257,13 +23022,10 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5 -$as_echo_n "checking whether blk_requeue_request() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5 +$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -20274,15 +23036,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request_queue *q = NULL; - struct request *req = NULL; - blk_requeue_request(q, req); + int (*set)(struct dentry *dentry, const char *name, + const void *buffer, size_t size, int flags, + int handler_flags) = NULL; + struct xattr_handler xops __attribute__ ((unused)); + + xops.set = set; ; return 0; @@ -20291,9 +23056,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=$? @@ -20309,7 +23076,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_REQUEUE_REQUEST 1 +#define HAVE_DENTRY_XATTR_SET 1 _ACEOF @@ -20327,13 +23094,11 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is available" >&5 -$as_echo_n "checking whether blk_rq_bytes() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5 +$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.c @@ -20344,14 +23109,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + + int show_options (struct seq_file * x, struct dentry * y) { return 0; }; + static struct super_operations sops __attribute__ ((unused)) = { + .show_options = show_options, + }; int main (void) { - struct request *req = NULL; - (void) blk_rq_bytes(req); ; return 0; @@ -20360,9 +23128,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=$? @@ -20378,7 +23148,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_BYTES 1 +#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1 _ACEOF @@ -20397,8 +23167,10 @@ fi - { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is GPL-only" >&5 -$as_echo_n "checking whether blk_rq_bytes() is GPL-only... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5 +$as_echo_n "checking whether fops->fsync() wants... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.c @@ -20409,17 +23181,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include - - MODULE_LICENSE("CDDL"); + #include int main (void) { - struct request *req = NULL; - (void) blk_rq_bytes(req); + int (*fsync) (struct file *, struct dentry *, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -20428,9 +23199,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=$? @@ -20442,20 +23215,18 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: result: dentry" >&5 +$as_echo "dentry" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSYNC_WITH_DENTRY 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1 -_ACEOF - @@ -20464,13 +23235,8 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_rq_pos() is available" >&5 -$as_echo_n "checking whether blk_rq_pos() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -20481,14 +23247,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) blk_rq_pos(req); + int (*fsync) (struct file *, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -20497,9 +23265,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=$? @@ -20511,11 +23281,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: no dentry" >&5 +$as_echo "no dentry" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_POS 1 +#define HAVE_FSYNC_WITHOUT_DENTRY 1 _ACEOF @@ -20523,8 +23293,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; } @@ -20533,13 +23301,8 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_rq_sectors() is available" >&5 -$as_echo_n "checking whether blk_rq_sectors() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -20550,14 +23313,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) blk_rq_sectors(req); + int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -20566,9 +23331,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=$? @@ -20580,11 +23347,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: range" >&5 +$as_echo "range" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_SECTORS 1 +#define HAVE_FSYNC_RANGE 1 _ACEOF @@ -20592,8 +23359,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; } @@ -20602,13 +23367,8 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5 -$as_echo_n "checking whether get_disk_ro() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -20619,14 +23379,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct gendisk *disk = NULL; - (void) get_disk_ro(disk); + int (*fsync) (struct file *, struct dentry *, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -20635,9 +23397,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=$? @@ -20649,11 +23413,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: dentry" >&5 +$as_echo "dentry" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_DISK_RO 1 +#define HAVE_FSYNC_WITH_DENTRY 1 _ACEOF @@ -20661,8 +23425,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; } @@ -20671,13 +23433,8 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5 -$as_echo_n "checking whether rq_is_sync() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -20688,14 +23445,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) rq_is_sync(req); + int (*fsync) (struct file *, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -20704,9 +23463,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=$? @@ -20718,11 +23479,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: no dentry" >&5 +$as_echo "no dentry" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RQ_IS_SYNC 1 +#define HAVE_FSYNC_WITHOUT_DENTRY 1 _ACEOF @@ -20730,8 +23491,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; } @@ -20740,13 +23499,8 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether rq_for_each_segment() is available" >&5 -$as_echo_n "checking whether rq_for_each_segment() is available... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -20757,16 +23511,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct bio_vec *bv; - struct req_iterator iter; - struct request *req = NULL; - rq_for_each_segment(bv, req, iter) { } + int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -20775,9 +23529,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=$? @@ -20789,11 +23545,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:$LINENO: result: range" >&5 +$as_echo "range" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RQ_FOR_EACH_SEGMENT 1 +#define HAVE_FSYNC_RANGE 1 _ACEOF @@ -20801,8 +23557,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; } @@ -20811,10 +23565,11 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5 -$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; } + + + { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 +$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -20826,25 +23581,15 @@ cat >>conftest.$ac_ext <<_ACEOF #include - #include - - const struct xattr_handler xattr_test_handler = { - .prefix = "test", - .get = NULL, - .set = NULL, - }; - - const struct xattr_handler *xattr_handlers[] = { - &xattr_test_handler, + void evict_inode (struct inode * t) { return; } + static struct super_operations sops __attribute__ ((unused)) = { + .evict_inode = evict_inode, }; int main (void) { - struct super_block sb __attribute__ ((unused)); - - sb.s_xattr = xattr_handlers; ; return 0; @@ -20853,9 +23598,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=$? @@ -20871,7 +23618,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CONST_XATTR_HANDLER 1 +#define HAVE_EVICT_INODE 1 _ACEOF @@ -20891,8 +23638,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5 -$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5 +$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -20903,17 +23650,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int (*get)(struct dentry *dentry, const char *name, - void *buffer, size_t size, int handler_flags) = NULL; - struct xattr_handler xops __attribute__ ((unused)); - - xops.get = get; + int (*nr_cached_objects)(struct super_block *) + __attribute__ ((unused)) = NULL; + struct super_operations sops __attribute__ ((unused)) = { + .nr_cached_objects = nr_cached_objects, + }; ; return 0; @@ -20922,9 +23669,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=$? @@ -20940,7 +23689,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_DENTRY_XATTR_GET 1 +#define HAVE_NR_CACHED_OBJECTS 1 _ACEOF @@ -20960,8 +23709,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5 -$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5 +$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -20972,18 +23721,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int (*set)(struct dentry *dentry, const char *name, - const void *buffer, size_t size, int flags, - int handler_flags) = NULL; - struct xattr_handler xops __attribute__ ((unused)); - - xops.set = set; + void (*free_cached_objects)(struct super_block *, int) + __attribute__ ((unused)) = NULL; + struct super_operations sops __attribute__ ((unused)) = { + .free_cached_objects = free_cached_objects, + }; ; return 0; @@ -20992,9 +23740,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=$? @@ -21010,7 +23760,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_DENTRY_XATTR_SET 1 +#define HAVE_FREE_CACHED_OBJECTS 1 _ACEOF @@ -21030,9 +23780,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5 -$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -21049,10 +23799,10 @@ int main (void) { - int (*show_options) (struct seq_file *, struct dentry *) = NULL; - struct super_operations sops __attribute__ ((unused)); - - sops.show_options = show_options; + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -21061,9 +23811,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=$? @@ -21079,7 +23831,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF @@ -21099,9 +23851,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5 -$as_echo_n "checking whether fops->fsync() wants... " >&6; } - + { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5 +$as_echo_n "checking whether iops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -21118,10 +23869,10 @@ int main (void) { - int (*fsync) (struct file *, struct dentry *, int) = NULL; - struct file_operations fops __attribute__ ((unused)); - - fops.fsync = fsync; + long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; + struct inode_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -21130,9 +23881,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=$? @@ -21144,11 +23897,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: dentry" >&5 -$as_echo "dentry" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FSYNC_WITH_DENTRY 1 +#define HAVE_INODE_FALLOCATE 1 _ACEOF @@ -21156,6 +23909,8 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21166,6 +23921,8 @@ fi + { $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 @@ -21182,10 +23939,10 @@ int main (void) { - int (*fsync) (struct file *, int) = NULL; - struct file_operations fops __attribute__ ((unused)); - - fops.fsync = fsync; + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -21194,9 +23951,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=$? @@ -21208,11 +23967,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no dentry" >&5 -$as_echo "no dentry" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FSYNC_WITHOUT_DENTRY 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF @@ -21220,6 +23979,8 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21231,6 +23992,9 @@ fi + { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5 +$as_echo_n "checking whether iops->truncate_range() exists... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ @@ -21241,15 +24005,16 @@ cat >>conftest.$ac_ext <<_ACEOF #include + void truncate_range(struct inode *inode, loff_t start, + loff_t end) { return; } + static struct inode_operations iops __attribute__ ((unused)) = { + .truncate_range = truncate_range, + }; int main (void) { - int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; - struct file_operations fops __attribute__ ((unused)); - - fops.fsync = fsync; ; return 0; @@ -21258,9 +24023,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=$? @@ -21272,11 +24039,11 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: range" >&5 -$as_echo "range" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FSYNC_RANGE 1 +#define HAVE_INODE_TRUNCATE_RANGE 1 _ACEOF @@ -21284,6 +24051,8 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } @@ -21294,9 +24063,8 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 -$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5 +$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -21313,9 +24081,10 @@ int main (void) { - void (*evict_inode) (struct inode *) = NULL; - struct super_operations sops __attribute__ ((unused)) = { - .evict_inode = evict_inode, + int (*create) (struct inode *, struct dentry *, umode_t, + struct nameidata *) = NULL; + struct inode_operations iops __attribute__ ((unused)) = { + .create = create, }; ; @@ -21325,9 +24094,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=$? @@ -21343,7 +24114,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_EVICT_INODE 1 +#define HAVE_CREATE_UMODE_T 1 _ACEOF @@ -21363,8 +24134,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5 -$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5 +$as_echo_n "checking whether dops->d_automount() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -21375,16 +24146,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int (*nr_cached_objects)(struct super_block *) - __attribute__ ((unused)) = NULL; - struct super_operations sops __attribute__ ((unused)) = { - .nr_cached_objects = nr_cached_objects, + struct vfsmount *(*d_automount) (struct path *) = NULL; + struct dentry_operations dops __attribute__ ((unused)) = { + .d_automount = d_automount, }; ; @@ -21394,9 +24164,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=$? @@ -21412,7 +24184,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_NR_CACHED_OBJECTS 1 +#define HAVE_AUTOMOUNT 1 _ACEOF @@ -21432,8 +24204,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5 -$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5 +$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -21444,18 +24216,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + int encode_fh(struct inode *inode, __u32 *fh, int *max_len, + struct inode *parent) { return 0; } + static struct export_operations eops __attribute__ ((unused))={ + .encode_fh = encode_fh, + }; int main (void) { - void (*free_cached_objects)(struct super_block *, int) - __attribute__ ((unused)) = NULL; - struct super_operations sops __attribute__ ((unused)) = { - .free_cached_objects = free_cached_objects, - }; - + ; return 0; } @@ -21463,9 +24235,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=$? @@ -21481,7 +24255,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FREE_CACHED_OBJECTS 1 +#define HAVE_ENCODE_FH_WITH_INODE 1 _ACEOF @@ -21500,11 +24274,10 @@ fi + { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5 +$as_echo_n "checking whether clear_inode() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 -$as_echo_n "checking whether fops->fallocate() exists... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ @@ -21520,10 +24293,7 @@ int main (void) { - long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; - struct file_operations fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; + clear_inode(NULL); ; return 0; @@ -21532,9 +24302,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=$? @@ -21545,33 +24317,72 @@ _ACEOF ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_FILE_FALLOCATE 1 -_ACEOF +fi + rm -Rf build -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]clear_inode[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLEAR_INODE 1 +_ACEOF - rm -Rf build + fi + fi + { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5 +$as_echo_n "checking whether insert_inode_locked() is available... " >&6; } - { $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 @@ -21588,10 +24399,7 @@ int main (void) { - long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; - struct inode_operations fops __attribute__ ((unused)) = { - .fallocate = fallocate, - }; + insert_inode_locked(NULL); ; return 0; @@ -21600,9 +24408,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=$? @@ -21613,34 +24423,72 @@ _ACEOF ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_INODE_FALLOCATE 1 -_ACEOF +fi + rm -Rf build -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + + if test $rc -ne 0; then : { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi -fi + fi + if test $rc -ne 0; then : - rm -Rf build + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_INSERT_INODE_LOCKED 1 +_ACEOF - { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5 -$as_echo_n "checking whether dops->d_automount() exists... " >&6; } + fi + fi + + + { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5 +$as_echo_n "checking whether d_make_root() is available... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.c @@ -21657,10 +24505,7 @@ int main (void) { - struct vfsmount *(*d_automount) (struct path *) = NULL; - struct dentry_operations dops __attribute__ ((unused)) = { - .d_automount = d_automount, - }; + d_make_root(NULL); ; return 0; @@ -21669,9 +24514,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=$? @@ -21682,22 +24529,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_AUTOMOUNT 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 @@ -21705,89 +24541,152 @@ 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 insert_inode_locked is exported" >&5 -$as_echo_n "checking whether symbol insert_inode_locked is exported... " >&6; } - grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \ + grep -q -E '[[:space:]]d_make_root[[:space:]]' \ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null rc=$? if test $rc -ne 0; then - export=0 - for file in fs/inode.c; do - grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" "$LINUX/$file" 2>/dev/null + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \ + "$LINUX/$file" 2>/dev/null rc=$? if test $rc -eq 0; then - export=1 break; - -fi - + fi done - if test $export -eq 0; then + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -else + else : - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INSERT_INODE_LOCKED 1 +#define HAVE_D_MAKE_ROOT 1 _ACEOF -fi + fi + fi -else + { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5 +$as_echo_n "checking whether d_obtain_alias() is available... " >&6; } - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_INSERT_INODE_LOCKED 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 + +int +main (void) +{ + + d_obtain_alias(NULL); + + ; + 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 + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + fi + rm -Rf build + + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol d_obtain_alias is exported" >&5 -$as_echo_n "checking whether symbol d_obtain_alias is exported... " >&6; } grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null rc=$? if test $rc -ne 0; then - export=0 for file in fs/dcache.c; do - grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \ + "$LINUX/$file" 2>/dev/null rc=$? if test $rc -eq 0; then - export=1 break; - -fi - + fi done - if test $export -eq 0; then + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -else + else : - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF @@ -21795,52 +24694,105 @@ cat >>confdefs.h <<\_ACEOF _ACEOF -fi + fi + fi -else + { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5 +$as_echo_n "checking whether check_disk_size_change() is available... " >&6; } - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_D_OBTAIN_ALIAS 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 + +int +main (void) +{ + + check_disk_size_change(NULL, NULL); + + ; + 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 + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + fi + rm -Rf build + + + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5 -$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; } grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null rc=$? if test $rc -ne 0; then - export=0 for file in fs/block_dev.c; do - grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \ + "$LINUX/$file" 2>/dev/null rc=$? if test $rc -eq 0; then - export=1 break; - -fi - + fi done - if test $export -eq 0; then + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -else + else : - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF @@ -21848,63 +24800,103 @@ cat >>confdefs.h <<\_ACEOF _ACEOF -fi + fi + fi -else + { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5 +$as_echo_n "checking whether truncate_setsize() is available... " >&6; } - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHECK_DISK_SIZE_CHANGE 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 + +int +main (void) +{ + + truncate_setsize(NULL, 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 + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + fi + rm -Rf build + + + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: checking whether symbol truncate_setsize is exported" >&5 -$as_echo_n "checking whether symbol truncate_setsize is exported... " >&6; } grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null rc=$? if test $rc -ne 0; then - export=0 for file in mm/truncate.c; do - grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" "$LINUX/$file" 2>/dev/null + grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \ + "$LINUX/$file" 2>/dev/null rc=$? if test $rc -eq 0; then - export=1 break; - -fi - + 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_TRUNCATE_SETSIZE 1 -_ACEOF - + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi -fi + fi + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -else + else : { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -21914,8 +24906,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF -fi - + fi + fi @@ -21955,9 +24947,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=$? @@ -22028,9 +25022,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=$? @@ -22066,46 +25062,99 @@ fi EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5 +$as_echo_n "checking whether mount_nodev() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol mount_nodev is exported" >&5 -$as_echo_n "checking whether symbol mount_nodev is exported... " >&6; } - grep -q -E '[[:space:]]mount_nodev[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in fs/super.c; do - grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; -fi +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + #include +int +main (void) +{ -else + mount_nodev(NULL, 0, NULL, NULL); - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_MOUNT_NODEV 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 + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + fi + rm -Rf build -else + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]mount_nodev[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/super.c; do + grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -22115,8 +25164,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF -fi - + fi + fi @@ -22153,9 +25202,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=$? @@ -22220,9 +25271,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=$? @@ -22257,46 +25310,99 @@ fi + { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() is available" >&5 +$as_echo_n "checking whether bdi_setup_and_register() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol bdi_setup_and_register is exported" >&5 -$as_echo_n "checking whether symbol bdi_setup_and_register is exported... " >&6; } - grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - - export=0 - for file in mm/backing-dev.c; do - grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; -fi +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + #include +int +main (void) +{ -else + bdi_setup_and_register(NULL, NULL, 0); - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_BDI_SETUP_AND_REGISTER 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 + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + fi + rm -Rf build -else + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in mm/backing-dev.c; do + grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } @@ -22306,8 +25412,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF -fi - + fi + fi @@ -22340,9 +25446,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=$? @@ -23956,8 +27064,7 @@ $as_echo "$as_me: error: Bad value \"$ZFS_CONFIG\" for --with-config, { (exit 1); exit 1; }; } ;; esac - if test "$ZFS_CONFIG" = user || - test "$ZFS_CONFIG" = all; then + if test "$ZFS_CONFIG" = user -o "$ZFS_CONFIG" = all; then CONFIG_USER_TRUE= CONFIG_USER_FALSE='#' else @@ -23965,8 +27072,8 @@ else CONFIG_USER_FALSE= fi - if test "$ZFS_CONFIG" = kernel || - test "$ZFS_CONFIG" = all; then + if test "$ZFS_CONFIG" = kernel -o "$ZFS_CONFIG" = all && + test "x$enable_linux_builtin" != xyes ; then CONFIG_KERNEL_TRUE= CONFIG_KERNEL_FALSE='#' else @@ -24049,7 +27156,7 @@ $as_echo_n "checking whether dmu tx validation is enabled... " >&6; } $as_echo "$enable_debug_dmu_tx" >&6; } -ac_config_files="$ac_config_files Makefile dracut/Makefile dracut/90zfs/Makefile udev/Makefile udev/rules.d/Makefile etc/Makefile etc/init.d/Makefile etc/zfs/Makefile man/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/sysevent/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/Makefile lib/libshare/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/zpool_layout/Makefile cmd/zvol_id/Makefile cmd/zpool_id/Makefile cmd/sas_switch_id/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/zpool-layout/Makefile scripts/common.sh zfs.spec zfs-modules.spec PKGBUILD-zfs PKGBUILD-zfs-modules zfs-script-config.sh" +ac_config_files="$ac_config_files Makefile dracut/Makefile dracut/90zfs/Makefile udev/Makefile udev/rules.d/Makefile etc/Makefile etc/init.d/Makefile etc/zfs/Makefile man/Makefile man/man5/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/sysevent/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/Makefile lib/libshare/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/zpool_layout/Makefile cmd/zvol_id/Makefile cmd/zpool_id/Makefile cmd/vdev_id/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/zpool-layout/Makefile scripts/common.sh zfs.spec zfs-modules.spec PKGBUILD-zfs PKGBUILD-zfs-modules zfs-script-config.sh zfs.release" cat >confcache <<\_ACEOF @@ -24974,6 +28081,7 @@ do "etc/init.d/Makefile") CONFIG_FILES="$CONFIG_FILES etc/init.d/Makefile" ;; "etc/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES etc/zfs/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES man/man5/Makefile" ;; "man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES man/man8/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/libspl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/Makefile" ;; @@ -25007,7 +28115,7 @@ do "cmd/zpool_layout/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool_layout/Makefile" ;; "cmd/zvol_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zvol_id/Makefile" ;; "cmd/zpool_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool_id/Makefile" ;; - "cmd/sas_switch_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/sas_switch_id/Makefile" ;; + "cmd/vdev_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/vdev_id/Makefile" ;; "module/Makefile") CONFIG_FILES="$CONFIG_FILES module/Makefile" ;; "module/avl/Makefile") CONFIG_FILES="$CONFIG_FILES module/avl/Makefile" ;; "module/nvpair/Makefile") CONFIG_FILES="$CONFIG_FILES module/nvpair/Makefile" ;; @@ -25032,6 +28140,7 @@ do "PKGBUILD-zfs") CONFIG_FILES="$CONFIG_FILES PKGBUILD-zfs" ;; "PKGBUILD-zfs-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-zfs-modules" ;; "zfs-script-config.sh") CONFIG_FILES="$CONFIG_FILES zfs-script-config.sh" ;; + "zfs.release") CONFIG_FILES="$CONFIG_FILES zfs.release" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}