X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=configure;h=9b97fb427afa589e077de0f746b4021b9fed596c;hb=330d06f90d143b41b276796526a66a1c1fff046d;hp=b0d1b8a1eccfb260f83c5be31cd1a7f6a7d82bf6;hpb=df554c148ecfdfb7e597f8ab7eee71388b24a19d;p=zfs.git diff --git a/configure b/configure index b0d1b8a..9b97fb4 100755 --- a/configure +++ b/configure @@ -787,6 +787,8 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +DEBUG_DMU_TX +DEBUG_ZFS DEBUG_STACKFLAGS DEBUG_CFLAGS CONFIG_KERNEL_FALSE @@ -798,6 +800,8 @@ LIBSELINUX LIBBLKID LIBUUID ZLIB +udevruledir +udevdir KERNELCPPFLAGS KERNELMAKE_PARAMS SPL_SYMBOLS @@ -808,11 +812,15 @@ LINUX_SYMBOLS LINUX_VERSION LINUX_OBJ LINUX +NO_UNUSED_BUT_SET_VARIABLE ZFS_CONFIG TARGET_ASM_DIR -DEFAULT_INIT_SCRIPT -DEFAULT_PACKAGE -VENDOR +MAKEPKG_VERSION +MAKEPKG +HAVE_MAKEPKG +PACMAN_VERSION +PACMAN +HAVE_PACMAN ALIEN_VERSION ALIEN HAVE_ALIEN @@ -828,6 +836,10 @@ HAVE_RPMBUILD RPM_VERSION RPM HAVE_RPM +DEFAULT_INIT_SCRIPT +DEFAULT_INIT_DIR +DEFAULT_PACKAGE +VENDOR am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE @@ -969,13 +981,17 @@ enable_fast_install with_gnu_ld enable_libtool_lock with_config +enable_linux_builtin with_linux with_linux_obj with_spl with_spl_obj +with_udevdir +with_udevruledir with_blkid with_selinux enable_debug +enable_debug_dmu_tx ' ac_precious_vars='build_alias host_alias @@ -1628,7 +1644,10 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-linux-builtin Configure for builtin in-tree kernel modules + [default=no] --enable-debug Enable generic debug support [default=no] + --enable-debug-dmu-tx Enable dmu tx validation [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1641,6 +1660,8 @@ Optional Packages: --with-linux-obj=PATH Path to kernel build objects --with-spl=PATH Path to spl source --with-spl-obj=PATH Path to spl build objects + --with-udevdir=DIR install udev helpers [EPREFIX/lib/udev] + --with-udevruledir=DIR install udev rules [UDEVDIR/rules.d] --with-blkid support blkid caching [default=check] --with-selinux support selinux [default=check] @@ -4821,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:4824: $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:4827: $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:4830: 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" @@ -6033,7 +6054,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6036 "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=$? @@ -7886,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:7889: $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:7893: \$? = $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. @@ -8225,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:8228: $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:8232: \$? = $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. @@ -8330,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:8333: $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:8337: \$? = $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 @@ -8385,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:8388: $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:8392: \$? = $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 @@ -11188,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 11191 "configure" +#line 11212 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11284,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 11287 "configure" +#line 11308 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11657,6 +11678,87 @@ $as_echo "$ZFS_META_LICENSE" >&6; } + { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 +$as_echo_n "checking linux distribution... " >&6; } + if test -f /etc/toss-release ; then + VENDOR=toss ; + elif test -f /etc/fedora-release ; then + VENDOR=fedora ; + elif test -f /etc/redhat-release ; then + VENDOR=redhat ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; + elif test -f /etc/SuSE-release ; then + VENDOR=sles ; + elif test -f /etc/slackware-version ; then + VENDOR=slackware ; + elif test -f /etc/lunar.release ; then + VENDOR=lunar ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/debian_version ; then + VENDOR=debian ; + else + VENDOR= ; + fi + { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5 +$as_echo "$VENDOR" >&6; } + + + { $as_echo "$as_me:$LINENO: checking default package type" >&5 +$as_echo_n "checking default package type... " >&6; } + case "$VENDOR" in + toss) DEFAULT_PACKAGE=rpm ;; + redhat) DEFAULT_PACKAGE=rpm ;; + fedora) DEFAULT_PACKAGE=rpm ;; + gentoo) DEFAULT_PACKAGE=tgz ;; + arch) DEFAULT_PACKAGE=arch ;; + sles) DEFAULT_PACKAGE=rpm ;; + slackware) DEFAULT_PACKAGE=tgz ;; + lunar) DEFAULT_PACKAGE=tgz ;; + ubuntu) DEFAULT_PACKAGE=deb ;; + debian) DEFAULT_PACKAGE=deb ;; + *) DEFAULT_PACKAGE=rpm ;; + esac + + { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 +$as_echo "$DEFAULT_PACKAGE" >&6; } + + + { $as_echo "$as_me:$LINENO: checking default init directory" >&5 +$as_echo_n "checking default init directory... " >&6; } + case "$VENDOR" in + arch) DEFAULT_INIT_DIR=$sysconfdir/rc.d ;; + *) DEFAULT_INIT_DIR=$sysconfdir/init.d ;; + esac + + { $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_DIR" >&5 +$as_echo "$DEFAULT_INIT_DIR" >&6; } + + + { $as_echo "$as_me:$LINENO: checking default init script type" >&5 +$as_echo_n "checking default init script type... " >&6; } + case "$VENDOR" in + toss) DEFAULT_INIT_SCRIPT=redhat ;; + redhat) DEFAULT_INIT_SCRIPT=redhat ;; + fedora) DEFAULT_INIT_SCRIPT=fedora ;; + gentoo) DEFAULT_INIT_SCRIPT=gentoo ;; + arch) DEFAULT_INIT_SCRIPT=arch ;; + sles) DEFAULT_INIT_SCRIPT=lsb ;; + slackware) DEFAULT_INIT_SCRIPT=lsb ;; + lunar) DEFAULT_INIT_SCRIPT=lunar ;; + ubuntu) DEFAULT_INIT_SCRIPT=lsb ;; + debian) DEFAULT_INIT_SCRIPT=lsb ;; + *) DEFAULT_INIT_SCRIPT=lsb ;; + esac + + { $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_SCRIPT" >&5 +$as_echo "$DEFAULT_INIT_SCRIPT" >&6; } + + + RPM=rpm RPMBUILD=rpmbuild @@ -11779,63 +11881,63 @@ fi - { $as_echo "$as_me:$LINENO: checking linux distribution" >&5 -$as_echo_n "checking linux distribution... " >&6; } - if test -f /etc/redhat-release ; then - VENDOR=redhat ; - elif test -f /etc/fedora-release ; then - VENDOR=fedora ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; - elif test -f /etc/debian_version ; then - VENDOR=debian ; - elif test -f /etc/SuSE-release ; then - VENDOR=sles ; - elif test -f /etc/slackware-version ; then - VENDOR=slackware ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; - else - VENDOR= ; - fi - { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5 -$as_echo "$VENDOR" >&6; } + if test "$VENDOR" = "arch"; then + PACMAN=pacman + MAKEPKG=makepkg - { $as_echo "$as_me:$LINENO: checking default package type" >&5 -$as_echo_n "checking default package type... " >&6; } - case "$VENDOR" in - fedora) DEFAULT_PACKAGE=rpm ;; - redhat) DEFAULT_PACKAGE=rpm ;; - sles) DEFAULT_PACKAGE=rpm ;; - ubuntu) DEFAULT_PACKAGE=deb ;; - debian) DEFAULT_PACKAGE=deb ;; - slackware) DEFAULT_PACKAGE=tgz ;; - *) DEFAULT_PACKAGE=rpm ;; - esac + { $as_echo "$as_me:$LINENO: checking whether $PACMAN is available" >&5 +$as_echo_n "checking whether $PACMAN is available... " >&6; } + tmp=$($PACMAN --version 2>/dev/null) + if test -n "$tmp"; then - { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5 -$as_echo "$DEFAULT_PACKAGE" >&6; } + PACMAN_VERSION=$(echo $tmp | + $AWK '/Pacman/ { print $3 }' | + $SED 's/^v//') + HAVE_PACMAN=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_PACMAN ($PACMAN_VERSION)" >&5 +$as_echo "$HAVE_PACMAN ($PACMAN_VERSION)" >&6; } + +else + HAVE_PACMAN=no + { $as_echo "$as_me:$LINENO: result: $HAVE_PACMAN" >&5 +$as_echo "$HAVE_PACMAN" >&6; } - { $as_echo "$as_me:$LINENO: checking default init script type" >&5 -$as_echo_n "checking default init script type... " >&6; } - case "$VENDOR" in - fedora) DEFAULT_INIT_SCRIPT=fedora ;; - redhat) DEFAULT_INIT_SCRIPT=fedora ;; - sles) DEFAULT_INIT_SCRIPT=lsb ;; - ubuntu) DEFAULT_INIT_SCRIPT=lsb ;; - debian) DEFAULT_INIT_SCRIPT=lsb ;; - slackware) DEFAULT_INIT_SCRIPT=lsb ;; - *) DEFAULT_INIT_SCRIPT=lsb ;; - esac +fi - { $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_SCRIPT" >&5 -$as_echo "$DEFAULT_INIT_SCRIPT" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether $MAKEPKG is available" >&5 +$as_echo_n "checking whether $MAKEPKG is available... " >&6; } + tmp=$($MAKEPKG --version 2>/dev/null) + if test -n "$tmp"; then + + MAKEPKG_VERSION=$(echo $tmp | $AWK '/makepkg/ { print $3 }') + HAVE_MAKEPKG=yes + { $as_echo "$as_me:$LINENO: result: $HAVE_MAKEPKG ($MAKEPKG_VERSION)" >&5 +$as_echo "$HAVE_MAKEPKG ($MAKEPKG_VERSION)" >&6; } + +else + + HAVE_MAKEPKG=no + { $as_echo "$as_me:$LINENO: result: $HAVE_MAKEPKG" >&5 +$as_echo "$HAVE_MAKEPKG" >&6; } + +fi + + + + + + +fi + + + TARGET_ASM_DIR=asm-generic @@ -11846,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; } @@ -11853,6 +11962,88 @@ $as_echo_n "checking zfs config... " >&6; } $as_echo "$ZFS_CONFIG" >&6; }; + + + { $as_echo "$as_me:$LINENO: checking for -Wno-unused-but-set-variable support" >&5 +$as_echo_n "checking for -Wno-unused-but-set-variable support... " >&6; } + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wunused-but-set-variable" + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* 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 + + NO_UNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + NO_UNUSED_BUT_SET_VARIABLE= + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + CFLAGS="$saved_flags" + + + + case "$ZFS_CONFIG" in kernel) @@ -11873,21 +12064,32 @@ 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 + +elif test -e "/lib/modules/$(uname -r)/build"; then + headersdir="/lib/modules/$(uname -r)/build" sourcelink=$(readlink -f "$headersdir") - else + +else + sourcelink=$(ls -1d /usr/src/kernels/* \ - /usr/src/linux-* \ + /usr/src/linux-* \ 2>/dev/null | grep -v obj | tail -1) - fi + +fi + if test -n "$sourcelink" && test -e ${sourcelink}; then + kernelsrc=`readlink -f ${sourcelink}` - else + +else + { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } { { $as_echo "$as_me:$LINENO: error: @@ -11899,30 +12101,53 @@ $as_echo "$as_me: error: *** 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 + +fi + + +else + if test "$kernelsrc" = "NONE"; then + kernsrcver=NONE - fi - 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 + 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 + +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 + +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 + +else + kernelbuild=${kernelsrc} - fi - fi + +fi + + +fi + { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5 $as_echo "$kernelbuild" >&6; } @@ -11932,33 +12157,58 @@ $as_echo_n "checking kernel source version... " >&6; } 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 + +elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then + utsrelease=linux/utsrelease.h - elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then + +elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then + utsrelease=generated/utsrelease.h - fi + +fi + if test "$utsrelease"; then + kernsrcver=`(echo "#include <$utsrelease>"; echo "kernsrcver=UTS_RELEASE") | cpp -I $kernelbuild/include | grep "^kernsrcver=" | cut -d \" -f 2` if test -z "$kernsrcver"; then + { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5 $as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} { (exit 1); exit 1; }; } - fi - else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 -$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} + +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; }; } - fi + 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; } @@ -11975,14 +12225,21 @@ $as_echo "$kernsrcver" >&6; } modpost=$LINUX/scripts/Makefile.modpost { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 $as_echo_n "checking kernel file name for module symbols... " >&6; } - if test -f "$modpost"; then + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then + if grep -q Modules.symvers $modpost; then + LINUX_SYMBOLS=Modules.symvers - else + +else + LINUX_SYMBOLS=Module.symvers - fi - if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then +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 @@ -11994,10 +12251,16 @@ $as_echo "$as_me: error: *** 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 + +fi + + +else + LINUX_SYMBOLS=NONE - fi + +fi + { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 $as_echo "$LINUX_SYMBOLS" >&6; } @@ -12022,16 +12285,23 @@ 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 + +fi + if test -e $sourcelink; then + splsrc=`readlink -f ${sourcelink}` - else + +else + { $as_echo "$as_me:$LINENO: result: Not found" >&5 $as_echo "Not found" >&6; } { { $as_echo "$as_me:$LINENO: error: @@ -12043,21 +12313,33 @@ $as_echo "$as_me: error: *** 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 + +fi + + +else + if test "$splsrc" = "NONE"; then + splbuild=NONE splsrcver=NONE - fi - fi + +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 + +fi + { $as_echo "$as_me:$LINENO: result: $splbuild" >&5 $as_echo "$splbuild" >&6; } @@ -12066,23 +12348,29 @@ $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") | + echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") | cpp -I $splbuild | - grep "^splsrcver=" | cut -d \" -f 2` - fi + 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 + *** 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;} + *** Cannot determine the version of the spl source. + *** Please prepare the spl source before running this script" >&2;} { (exit 1); exit 1; }; } - fi + +fi + { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5 $as_echo "$splsrcver" >&6; } @@ -12099,22 +12387,116 @@ $as_echo "$splsrcver" >&6; } { $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 - elif test -r $SPL_OBJ/Modules.symvers; then + +elif test -r $SPL_OBJ/Modules.symvers; then + SPL_SYMBOLS=Modules.symvers - elif test -r $SPL_OBJ/module/Module.symvers; then + +elif test -r $SPL_OBJ/module/Module.symvers; then + SPL_SYMBOLS=Module.symvers - elif test -r $SPL_OBJ/module/Modules.symvers; then + +elif test -r $SPL_OBJ/module/Modules.symvers; then + SPL_SYMBOLS=Modules.symvers - else + +else + SPL_SYMBOLS=$LINUX_SYMBOLS - fi + +fi + { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5 $as_echo "$SPL_SYMBOLS" >&6; } + { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 +$as_echo_n "checking whether modules can be built... " >&6; } + + +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 @@ -12129,9 +12511,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifndef AUTOCONF_INCLUDED - #include - #endif + #include int main (void) @@ -12148,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=$? @@ -12165,11 +12547,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 + *** 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;} + *** Kernel built with CONFIG_PREEMPT which is not supported. + *** You must rebuild your kernel without this option." >&2;} { (exit 1); exit 1; }; } else @@ -12189,8 +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; } @@ -12202,9 +12585,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifndef AUTOCONF_INCLUDED - #include - #endif + #include int main (void) @@ -12221,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=$? @@ -12237,16 +12620,89 @@ _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:$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: 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. You must rebuild - *** your kernel without this option." >&2;} + *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible + *** with the CDDL license and will prevent the module linking stage + *** from succeeding. You must rebuild your kernel without this + *** option enabled." >&2;} { (exit 1); exit 1; }; } + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -12263,19 +12719,13 @@ 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; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -12317,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=$? @@ -12353,6 +12805,7 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5 $as_echo_n "checking whether kernel defines fmode_t... " >&6; } @@ -12381,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=$? @@ -12447,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=$? @@ -12485,75 +12942,273 @@ 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; } + { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5 +$as_echo_n "checking whether blkdev_get() wants 3 args... " >&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 +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; + (void) blkdev_get(bdev, 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 - 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 +#define HAVE_3ARG_BLKDEV_GET 1 _ACEOF - fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking whether symbol 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:]]' \ +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5 +$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +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.*(open_bdev_exclusive)" "$LINUX/$file" 2>/dev/null + 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 + 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 + 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 + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_OPEN_BDEV_EXCLUSIVE 1 +#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; } @@ -12561,6 +13216,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_OPEN_BDEV_EXCLUSIVE 1 _ACEOF + + fi fi @@ -12593,9 +13250,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=$? @@ -12633,6 +13292,8 @@ fi { $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 @@ -12659,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=$? @@ -12695,6 +13358,7 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" { $as_echo "$as_me:$LINENO: checking whether bio_empty_barrier() is defined" >&5 @@ -12726,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=$? @@ -12792,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=$? @@ -12860,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=$? @@ -12926,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=$? @@ -12996,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=$? @@ -13063,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=$? @@ -13129,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=$? @@ -13195,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=$? @@ -13235,6 +13915,8 @@ fi { $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" cat confdefs.h - <<_ACEOF >conftest.c @@ -13261,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=$? @@ -13329,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=$? @@ -13365,10 +14051,13 @@ 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; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5 +$as_echo_n "checking whether blk_queue_flush() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -13386,7 +14075,7 @@ main (void) { struct request_queue *q = NULL; - (void) blk_fetch_request(q); + (void) blk_queue_flush(q, REQ_FLUSH); ; return 0; @@ -13395,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=$? @@ -13413,7 +14104,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_FETCH_REQUEST 1 +#define HAVE_BLK_QUEUE_FLUSH 1 _ACEOF @@ -13432,9 +14123,8 @@ fi - - { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5 -$as_echo_n "checking whether blk_requeue_request() is available... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5 +$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -13445,15 +14135,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include #include + MODULE_LICENSE("CDDL"); + int main (void) { struct request_queue *q = NULL; - struct request *req = NULL; - blk_requeue_request(q, req); + (void) blk_queue_flush(q, REQ_FLUSH); ; return 0; @@ -13462,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=$? @@ -13476,21 +14170,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_REQUEUE_REQUEST 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 @@ -13498,10 +14192,13 @@ 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; } + { $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 @@ -13518,8 +14215,8 @@ int main (void) { - struct request *req = NULL; - (void) blk_rq_bytes(req); + struct request_queue *q = NULL; + (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS); ; return 0; @@ -13528,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=$? @@ -13546,7 +14245,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_BYTES 1 +#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1 _ACEOF @@ -13564,9 +14263,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $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 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 @@ -13577,17 +14280,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include #include - MODULE_LICENSE("CDDL"); - int main (void) { - struct request *req = NULL; - (void) blk_rq_bytes(req); + struct request_queue *q = NULL; + (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS); ; return 0; @@ -13596,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=$? @@ -13610,32 +14312,35 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1 +#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + - fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether blk_rq_pos() is available" >&5 -$as_echo_n "checking whether blk_rq_pos() 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 @@ -13652,8 +14357,9 @@ int main (void) { - struct request *req = NULL; - (void) blk_rq_pos(req); + struct request_queue *q = NULL; + unsigned short block_size = 1; + (void) blk_queue_physical_block_size(q, block_size); ; return 0; @@ -13662,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=$? @@ -13680,7 +14388,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_POS 1 +#define HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE 1 _ACEOF @@ -13698,10 +14406,13 @@ 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; } + { $as_echo "$as_me:$LINENO: checking whether blk_queue_io_opt() is available" >&5 +$as_echo_n "checking whether blk_queue_io_opt() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -13718,8 +14429,9 @@ int main (void) { - struct request *req = NULL; - (void) blk_rq_sectors(req); + struct request_queue *q = NULL; + unsigned int opt = 1; + (void) blk_queue_io_opt(q, opt); ; return 0; @@ -13728,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=$? @@ -13746,7 +14460,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_SECTORS 1 +#define HAVE_BLK_QUEUE_IO_OPT 1 _ACEOF @@ -13764,10 +14478,13 @@ 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; } + { $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 @@ -13784,8 +14501,8 @@ int main (void) { - struct gendisk *disk = NULL; - (void) get_disk_ro(disk); + struct request_queue *q = NULL; + (void) blk_queue_nonrot(q); ; return 0; @@ -13794,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=$? @@ -13812,7 +14531,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_DISK_RO 1 +#define HAVE_BLK_QUEUE_NONROT 1 _ACEOF @@ -13830,10 +14549,13 @@ 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; } + { $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 @@ -13850,8 +14572,8 @@ int main (void) { - struct request *req = NULL; - (void) rq_is_sync(req); + struct request_queue *q = NULL; + (void) blk_queue_discard(q); ; return 0; @@ -13860,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=$? @@ -13878,7 +14602,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RQ_IS_SYNC 1 +#define HAVE_BLK_QUEUE_DISCARD 1 _ACEOF @@ -13896,10 +14620,13 @@ 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; } + { $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 @@ -13916,10 +14643,8 @@ int main (void) { - struct bio_vec *bv; - struct req_iterator iter; - struct request *req = NULL; - rq_for_each_segment(bv, req, iter) { } + struct request_queue *q = NULL; + (void) blk_fetch_request(q); ; return 0; @@ -13928,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=$? @@ -13946,7 +14673,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RQ_FOR_EACH_SEGMENT 1 +#define HAVE_BLK_FETCH_REQUEST 1 _ACEOF @@ -13964,9 +14691,13 @@ 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 blk_requeue_request() is available" >&5 +$as_echo_n "checking whether blk_requeue_request() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" cat confdefs.h - <<_ACEOF >conftest.c @@ -13977,26 +14708,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include - - const struct xattr_handler xattr_test_handler = { - .prefix = "test", - .get = NULL, - .set = NULL, - }; - - const struct xattr_handler *xattr_handlers[] = { - &xattr_test_handler, - }; + #include int main (void) { - struct super_block sb __attribute__ ((unused)); - - sb.s_xattr = xattr_handlers; + struct request_queue *q = NULL; + struct request *req = NULL; + blk_requeue_request(q, req); ; return 0; @@ -14005,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=$? @@ -14023,7 +14745,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CONST_XATTR_HANDLER 1 +#define HAVE_BLK_REQUEUE_REQUEST 1 _ACEOF @@ -14041,10 +14763,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $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 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 @@ -14055,17 +14780,14 @@ 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; + struct request *req = NULL; + (void) blk_rq_bytes(req); ; return 0; @@ -14074,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=$? @@ -14092,7 +14816,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_DENTRY_XATTR_GET 1 +#define HAVE_BLK_RQ_BYTES 1 _ACEOF @@ -14111,9 +14835,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 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 @@ -14124,18 +14847,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + + MODULE_LICENSE("CDDL"); 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; + struct request *req = NULL; + (void) blk_rq_bytes(req); ; return 0; @@ -14144,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=$? @@ -14158,21 +14882,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_DENTRY_XATTR_SET 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 @@ -14180,10 +14904,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants 2 args" >&5 -$as_echo_n "checking whether fops->fsync() wants 2 args... " >&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 @@ -14194,16 +14921,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int (*fsync) (struct file *, int datasync) = NULL; - struct file_operations fops __attribute__ ((unused)); - - fops.fsync = fsync; + struct request *req = NULL; + (void) blk_rq_pos(req); ; return 0; @@ -14212,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=$? @@ -14230,7 +14957,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_FSYNC 1 +#define HAVE_BLK_RQ_POS 1 _ACEOF @@ -14248,10 +14975,13 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 -$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether blk_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 @@ -14262,16 +14992,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - void (*evict_inode) (struct inode *) = NULL; - struct super_operations sops __attribute__ ((unused)); - - sops.evict_inode = evict_inode; + struct request *req = NULL; + (void) blk_rq_sectors(req); ; return 0; @@ -14280,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=$? @@ -14298,7 +15028,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_EVICT_INODE 1 +#define HAVE_BLK_RQ_SECTORS 1 _ACEOF @@ -14316,1935 +15046,7765 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $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 - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether 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" - else - { $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. */ - fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_INSERT_INODE_LOCKED 1 -_ACEOF + #include - fi +int +main (void) +{ + struct gendisk *disk = NULL; + (void) get_disk_ro(disk); + ; + return 0; +} - { $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; } +_ACEOF - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_D_OBTAIN_ALIAS 1 -_ACEOF + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - fi - else { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_D_OBTAIN_ALIAS 1 +#define HAVE_GET_DISK_RO 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 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 "$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; } +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHECK_DISK_SIZE_CHANGE 1 -_ACEOF - - fi - - - - if test "$LINUX_OBJ" != "$LINUX"; then - KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" - fi - - - - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-unused-but-set-variable" - KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL" - KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\"" - - - ;; - user) + rm -Rf build - { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5 -$as_echo_n "checking for target asm dir... " >&6; } - TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/` - case $TARGET_ARCH in - i386|x86_64) - TARGET_ASM_DIR=asm-${TARGET_ARCH} - ;; - *) - TARGET_ASM_DIR=asm-generic - ;; - esac + 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: 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 +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_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 + #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* +int +main (void) +{ - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include + get_gendisk(0, NULL); + + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ioctl" >/dev/null 2>&1; then - is_stropts=yes + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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 - is_stropts=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 + + fi -rm -f conftest* + rm -Rf build - if test $is_unistd = yes; then - result=unistd.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_IOCTL_IN_UNISTD_H 1 -_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 - if test $is_sys_ioctl = yes; then - result=sys/ioctl.h + 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 -cat >>confdefs.h <<\_ACEOF -#define HAVE_IOCTL_IN_SYS_IOCTL_H 1 -_ACEOF + fi + if test $rc -ne 0; then : - elif test $is_stropts = yes; 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_IOCTL_IN_STROPTS_H 1 +#define HAVE_GET_GENDISK 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= + { $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" - if test "${ac_cv_header_zlib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 -$as_echo_n "checking for zlib.h... " >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -$as_echo "$ac_cv_header_zlib_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 -$as_echo_n "checking zlib.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include + + + #include + +int +main (void) +{ + + struct request *req = NULL; + (void) rq_is_sync(req); + + ; + 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 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_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 - ac_header_compiler=no + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + rm -Rf build -# 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 + + 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext 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) { } + + ; + 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_RQ_FOR_EACH_SEGMENT 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: 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 + 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 for compress2 in -lz" >&5 -$as_echo_n "checking for compress2 in -lz... " >&6; } -if test "${ac_cv_lib_z_compress2+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char compress2 (); + + #include + #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 () +main (void) { -return compress2 (); + + struct super_block sb __attribute__ ((unused)); + + sb.s_xattr = xattr_handlers; + ; 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 + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CONST_XATTR_HANDLER 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_z_compress2=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_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 + rm -Rf build -{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5 -$as_echo_n "checking for uncompress in -lz... " >&6; } -if test "${ac_cv_lib_z_uncompress+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + + { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5 +$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* 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 (); + + 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; } + _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 + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DENTRY_XATTR_GET 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_z_uncompress=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_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 + rm -Rf build -{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5 -$as_echo_n "checking for crc32 in -lz... " >&6; } -if test "${ac_cv_lib_z_crc32+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + + { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5 +$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* 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 (); + + 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; } + _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 + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DENTRY_XATTR_SET 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_z_crc32=no -fi + { $as_echo "$as_me:$LINENO: 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_z_crc32" >&5 -$as_echo "$ac_cv_lib_z_crc32" >&6; } -if test "x$ac_cv_lib_z_crc32" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF - LIBS="-lz $LIBS" -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: - *** crc32() missing, zlib-devel package required -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: - *** crc32() missing, zlib-devel package required -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } fi + rm -Rf build - ZLIB="-lz" -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZLIB 1 -_ACEOF + { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5 +$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; } - 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 +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 show_options (struct seq_file * x, struct dentry * y) { return 0; }; + static struct super_operations sops __attribute__ ((unused)) = { + .show_options = show_options, + }; + +int +main (void) +{ + + + ; + return 0; +} + _ACEOF -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 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + rm -Rf build -# 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 + + + + { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5 +$as_echo_n "checking whether fops->fsync() wants... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -_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 + + + #include + +int +main (void) +{ + + int (*fsync) (struct file *, struct dentry *, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; + + ; + 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 && { - 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: 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 - 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 + rm -Rf build -{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5 -$as_echo_n "checking for uuid_generate in -luuid... " >&6; } -if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-luuid $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + +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 (); + + int (*fsync) (struct file *, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; + ; 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: no dentry" >&5 +$as_echo "no dentry" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSYNC_WITHOUT_DENTRY 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - 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 + 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 + + + + +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 (*fsync) (struct file *, loff_t, loff_t, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; + ; 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: range" >&5 +$as_echo "range" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSYNC_RANGE 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - 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 - + rm -Rf build -# 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 +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char blkid_get_cache (); + + #include + int -main () +main (void) { -return blkid_get_cache (); + + int (*fsync) (struct file *, struct dentry *, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; + ; 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: 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 - ac_cv_lib_blkid_blkid_get_cache=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5 -$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; } -if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5 -$as_echo_n "checking for blkid zfs support... " >&6; } + rm -Rf build - ZFS_DEV=`mktemp` - dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \ - >/dev/null 2>/dev/null - echo -en "\x0c\xb1\xba\0\0\0\0\0" | \ - dd of=$ZFS_DEV bs=1k count=8 \ - seek=132 conv=notrunc &>/dev/null \ - >/dev/null 2>/dev/null - 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 + + + +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 int -main () +main (void) { - 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; - } + int (*fsync) (struct file *, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); - free(value); - blkid_put_cache(cache); + fops.fsync = fsync; ; 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 - rm -f $ZFS_DEV - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - LIBBLKID="-lblkid" - + { $as_echo "$as_me:$LINENO: result: no dentry" >&5 +$as_echo "no dentry" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBBLKID 1 +#define HAVE_FSYNC_WITHOUT_DENTRY 1 _ACEOF else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) - rm -f $ZFS_DEV - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "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 + rm -Rf build - LDFLAGS="$saved_LDFLAGS" -else - if test "x$with_blkid" != xcheck; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --with-blkid given but unavailable -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi +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) +{ + int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + fops.fsync = fsync; + ; + return 0; +} -# Check whether --with-selinux was given. -if test "${with_selinux+set}" = set; then - withval=$with_selinux; -else - with_selinux=check -fi +_ACEOF - 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 + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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 - - ac_header_compiler=no -fi + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + { $as_echo "$as_me:$LINENO: result: range" >&5 +$as_echo "range" >&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 +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSYNC_RANGE 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 -$as_echo_n "checking for selinux/selinux.h... " >&6; } -if test "${ac_cv_header_selinux_selinux_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_selinux_selinux_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 -$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } -fi -if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then + rm -Rf build - { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5 -$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lselinux $LIBS" -cat >conftest.$ac_ext <<_ACEOF + + + + + { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 +$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char is_selinux_enabled (); + + #include + void evict_inode (struct inode * t) { return; } + static struct super_operations sops __attribute__ ((unused)) = { + .evict_inode = evict_inode, + }; + int -main () +main (void) { -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 +_ACEOF -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 -$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } -if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then - LIBSELINUX="-lselinux" + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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_LIBSELINUX 1 +#define HAVE_EVICT_INODE 1 _ACEOF else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "x$with_selinux" != xcheck; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: --with-selinux given but unavailable -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -fi fi + rm -Rf build -else - 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 + { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5 +$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; } -fi +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -else + #include - { $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; } +int +main (void) +{ -fi + int (*nr_cached_objects)(struct super_block *) + __attribute__ ((unused)) = NULL; + struct super_operations sops __attribute__ ((unused)) = { + .nr_cached_objects = nr_cached_objects, + }; + ; + return 0; +} +_ACEOF - { $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" + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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_NR_CACHED_OBJECTS 1 +_ACEOF + - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } else - cat >conftest.$ac_ext <<_ACEOF + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5 +$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + + #include + int -main () +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; } + _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_FREE_CACHED_OBJECTS 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; } - saved_CFLAGS="$CFLAGS" - CFLAGS="-fstack-check" - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="-lpthread" + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } - 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 () +main (void) { - pthread_t tid; - pthread_attr_t attr; - struct rlimit l; - - l.rlim_cur = 0; - l.rlim_max = 0; - setrlimit(RLIMIT_CORE, &l); - pthread_attr_init(&attr); - pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + STACK_SIZE); - pthread_attr_setguardsize(&attr, PAGESIZE); - pthread_create(&tid, &attr, func, NULL); - pthread_join(tid, NULL); + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; 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_FILE_FALLOCATE 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) -# Check whether --with-linux was given. -if test "${with_linux+set}" = set; then - withval=$with_linux; kernelsrc="$withval" -fi + { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5 +$as_echo_n "checking whether iops->fallocate() exists... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# 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 - 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 +int +main (void) +{ - 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 + long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; + struct inode_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; - { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5 + ; + 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_INODE_FALLOCATE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; + + ; + 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_FILE_FALLOCATE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + + { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5 +$as_echo_n "checking whether iops->truncate_range() exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + void truncate_range(struct inode *inode, loff_t start, + loff_t end) { return; } + static struct inode_operations iops __attribute__ ((unused)) = { + .truncate_range = truncate_range, + }; + +int +main (void) +{ + + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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_INODE_TRUNCATE_RANGE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5 +$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + int (*create) (struct inode *, struct dentry *, umode_t, + struct nameidata *) = NULL; + struct inode_operations iops __attribute__ ((unused)) = { + .create = create, + }; + + ; + 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_CREATE_UMODE_T 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5 +$as_echo_n "checking whether dops->d_automount() exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct vfsmount *(*d_automount) (struct path *) = NULL; + struct dentry_operations dops __attribute__ ((unused)) = { + .d_automount = d_automount, + }; + + ; + 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_AUTOMOUNT 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5 +$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + int encode_fh(struct inode *inode, __u32 *fh, int *max_len, + struct inode *parent) { return 0; } + static struct export_operations eops __attribute__ ((unused))={ + .encode_fh = encode_fh, + }; + +int +main (void) +{ + + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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_ENCODE_FH_WITH_INODE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5 +$as_echo_n "checking whether clear_inode() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + clear_inode(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:]]clear_inode[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLEAR_INODE 1 +_ACEOF + + + fi + fi + + + { $as_echo "$as_me:$LINENO: checking whether 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 + +int +main (void) +{ + + insert_inode_locked(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:]]insert_inode_locked[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/inode.c; do + grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INSERT_INODE_LOCKED 1 +_ACEOF + + + fi + fi + + + { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5 +$as_echo_n "checking whether d_make_root() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + d_make_root(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:]]d_make_root[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_MAKE_ROOT 1 +_ACEOF + + + fi + fi + + + { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5 +$as_echo_n "checking whether d_obtain_alias() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +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 + + grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_OBTAIN_ALIAS 1 +_ACEOF + + + fi + fi + + + { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5 +$as_echo_n "checking whether check_disk_size_change() 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) +{ + + 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 + + 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 + + + fi + fi + + + { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5 +$as_echo_n "checking whether truncate_setsize() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +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 + + grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in mm/truncate.c; do + grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TRUNCATE_SETSIZE 1 +_ACEOF + + + fi + fi + + + + { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5 +$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +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 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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_6ARGS_SECURITY_INODE_INIT_SECURITY 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + 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" + + +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 *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 -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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_CALLBACK_SECURITY_INODE_INIT_SECURITY 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + 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 + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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:]]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. */ + + + #include + +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; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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_SHRINK 1 +_ACEOF + + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether 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 + +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 + +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} + + + + + + + { $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 + +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 + +else + + SPL_SYMBOLS=$LINUX_SYMBOLS + +fi + + + { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5 +$as_echo "$SPL_SYMBOLS" >&6; } + + + + { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 +$as_echo_n "checking whether modules can be built... " >&6; } + + +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 - kernelbuild=${kernelsrc} + { { $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 +$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + #ifndef CONFIG_PREEMPT + #error CONFIG_PREEMPT not #defined + #endif + + ; + 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; } + { { $as_echo "$as_me:$LINENO: error: + *** Kernel built with CONFIG_PREEMPT which is not supported. + *** You must rebuild your kernel without this option." >&5 +$as_echo "$as_me: error: + *** Kernel built with CONFIG_PREEMPT which is not supported. + *** You must rebuild your kernel without this option." >&2;} + { (exit 1); exit 1; }; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + + +fi + + rm -Rf build + + + + + + + { $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; } + + +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) +{ + + #ifndef CONFIG_DEBUG_LOCK_ALLOC + #error CONFIG_DEBUG_LOCK_ALLOC not #defined + #endif + + ; + 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; } + + { $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: yes" >&5 +$as_echo "yes" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible + *** with the CDDL license and will prevent the module linking stage + *** from succeeding. You must rebuild your kernel without this + *** option enabled." >&5 +$as_echo "$as_me: error: + *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible + *** with the CDDL license and will prevent the module linking stage + *** from succeeding. You must rebuild your kernel without this + *** option enabled." >&2;} + { (exit 1); exit 1; }; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + + +fi + + rm -Rf build + + + + + + + { $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. */ + + + #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 -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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: 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 + + { $as_echo "$as_me:$LINENO: result: struct inode" >&5 +$as_echo "struct inode" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5 +$as_echo_n "checking whether kernel defines fmode_t... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + fmode_t *ptr __attribute__ ((unused)); + + ; + 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_FMODE_T 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether 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 (void) +{ + + int val __attribute__ ((unused)); + val = KOBJ_NAME_LEN; + + ; + 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_KOBJ_NAME_LEN 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5 +$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct block_device *bdev = NULL; + (void) blkdev_get(bdev, 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 + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARG_BLKDEV_GET 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5 +$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +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 - { $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 + 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) +{ + + struct block_device *bdev = NULL; + bdev_logical_block_size(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_BDEV_LOGICAL_BLOCK_SIZE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether bio_empty_barrier() is defined" >&5 +$as_echo_n "checking whether bio_empty_barrier() is defined... " >&6; } + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct bio bio; + (void)bio_empty_barrier(&bio); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_EMPTY_BARRIER 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST 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. */ + + + #include + +int +main (void) +{ + + int flags __attribute__ ((unused)); + flags = (1 << BIO_RW_FAILFAST); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_RW_FAILFAST 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5 +$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + int flags __attribute__ ((unused)); + flags = ((1 << BIO_RW_FAILFAST_DEV) | + (1 << BIO_RW_FAILFAST_TRANSPORT) | + (1 << BIO_RW_FAILFAST_DRIVER)); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_RW_FAILFAST_DTD 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5 +$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + int flags __attribute__ ((unused)); + flags = REQ_FAILFAST_MASK; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_REQ_FAILFAST_MASK 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5 +$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +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) +{ + + void (*wanted_end_io)(struct bio *, int) = NULL; + bio_end_io_t *local_end_io __attribute__ ((unused)); + + local_end_io = wanted_end_io; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.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_2ARGS_BIO_END_IO_T 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + 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; } + + +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) +{ + + int flags __attribute__ ((unused)); + flags = BIO_RW_SYNC; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_RW_SYNC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5 +$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; } + + +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) +{ + + int flags __attribute__ ((unused)); + flags = BIO_RW_SYNCIO; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BIO_RW_SYNCIO 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $as_echo "$as_me:$LINENO: checking whether REQ_SYNC is defined" >&5 +$as_echo_n "checking whether REQ_SYNC is defined... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + int flags __attribute__ ((unused)); + flags = REQ_SYNC; + + ; + 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_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 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" + + +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) 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 "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_END_REQUEST 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is GPL-only" >&5 +$as_echo_n "checking whether blk_end_request() is GPL-only... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + + MODULE_LICENSE("CDDL"); + +int +main (void) +{ + + 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: no" >&5 +$as_echo "no" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_END_REQUEST_GPL_ONLY 1 +_ACEOF + + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5 +$as_echo_n "checking whether blk_queue_flush() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct request_queue *q = NULL; + (void) blk_queue_flush(q, REQ_FLUSH); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_QUEUE_FLUSH 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5 +$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + + MODULE_LICENSE("CDDL"); + +int +main (void) +{ + + struct request_queue *q = NULL; + (void) blk_queue_flush(q, REQ_FLUSH); + + ; + 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: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1 +_ACEOF + + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5 +$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct request_queue *q = NULL; + (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5 +$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-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_queue *q = NULL; + (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct request_queue *q = NULL; + unsigned short block_size = 1; + (void) blk_queue_physical_block_size(q, block_size); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether blk_queue_io_opt() is available" >&5 +$as_echo_n "checking whether blk_queue_io_opt() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + + +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_queue *q = NULL; + unsigned int opt = 1; + (void) blk_queue_io_opt(q, opt); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_QUEUE_IO_OPT 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether blk_queue_nonrot() is available" >&5 +$as_echo_n "checking whether blk_queue_nonrot() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct request_queue *q = NULL; + (void) blk_queue_nonrot(q); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_QUEUE_NONROT 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether blk_queue_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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct request_queue *q = NULL; + (void) blk_queue_discard(q); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_QUEUE_DISCARD 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + 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" + + +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_queue *q = NULL; + (void) blk_fetch_request(q); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_FETCH_REQUEST 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5 +$as_echo_n "checking whether blk_requeue_request() is available... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Wno-unused-but-set-variable" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct request_queue *q = NULL; + struct request *req = NULL; + blk_requeue_request(q, 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_BLK_REQUEUE_REQUEST 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether blk_rq_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 +/* 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) blk_rq_bytes(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_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 + + rm -Rf build + + + + { $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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + + MODULE_LICENSE("CDDL"); + +int +main (void) +{ + + struct request *req = NULL; + (void) blk_rq_bytes(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: no" >&5 +$as_echo "no" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1 +_ACEOF + + + + +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 +/* 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) blk_rq_pos(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_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 + + 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 +/* 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) blk_rq_sectors(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_BLK_RQ_SECTORS 1 +_ACEOF + - if test "$utsrelease"; then - kernsrcver=`(echo "#include <$utsrelease>"; - echo "kernsrcver=UTS_RELEASE") | - cpp -I $kernelbuild/include | - grep "^kernsrcver=" | cut -d \" -f 2` +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test -z "$kernsrcver"; then - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5 -$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} - { (exit 1); exit 1; }; } - fi - else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 -$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} - { (exit 1); exit 1; }; } - fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 -$as_echo "$kernsrcver" >&6; } - LINUX=${kernelsrc} - LINUX_OBJ=${kernelbuild} - LINUX_VERSION=${kernsrcver} +fi + rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - modpost=$LINUX/scripts/Makefile.modpost - { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 -$as_echo_n "checking kernel file name for module symbols... " >&6; } - if test -f "$modpost"; then - if grep -q Modules.symvers $modpost; then - LINUX_SYMBOLS=Modules.symvers - else - LINUX_SYMBOLS=Module.symvers - fi + { $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" - 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; } +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 gendisk *disk = NULL; + (void) get_disk_ro(disk); + + ; + 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_GET_DISK_RO 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + -# Check whether --with-spl was given. -if test "${with_spl+set}" = set; then - withval=$with_spl; splsrc="$withval" fi + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5 +$as_echo_n "checking whether get_gendisk() is available... " >&6; } + + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + get_gendisk(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 -# Check whether --with-spl-obj was given. -if test "${with_spl_obj+set}" = set; then - withval=$with_spl_obj; splbuild="$withval" fi + rm -Rf build - { $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 $rc -ne 0; then : - if test -z "$sourcelink" || test ! -e $sourcelink; then - sourcelink=../spl - fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - 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 + 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 - { $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 + 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: 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") | - cpp -I $splbuild | - grep "^splsrcver=" | cut -d \" -f 2` - 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: 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 + - { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5 -$as_echo "$splsrcver" >&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 - SPL=${splsrc} - SPL_OBJ=${splbuild} - SPL_VERSION=${splsrcver} + { $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; } - { $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 - 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 - else - SPL_SYMBOLS=$LINUX_SYMBOLS - fi - { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5 -$as_echo "$SPL_SYMBOLS" >&6; } +fi + rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $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 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 @@ -16255,17 +22815,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifndef AUTOCONF_INCLUDED - #include - #endif + #include int main (void) { - #ifndef CONFIG_PREEMPT - #error CONFIG_PREEMPT not #defined - #endif + struct bio_vec *bv; + struct req_iterator iter; + struct request *req = NULL; + rq_for_each_segment(bv, req, iter) { } ; return 0; @@ -16274,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=$? @@ -16290,13 +22851,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_RQ_FOR_EACH_SEGMENT 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 @@ -16307,17 +22866,15 @@ $as_echo "no" >&6; } - fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - - 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 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 @@ -16328,17 +22885,26 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifndef AUTOCONF_INCLUDED - #include - #endif + #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) { - #ifndef CONFIG_DEBUG_LOCK_ALLOC - #error CONFIG_DEBUG_LOCK_ALLOC not #defined - #endif + struct super_block sb __attribute__ ((unused)); + + sb.s_xattr = xattr_handlers; ; return 0; @@ -16347,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=$? @@ -16363,15 +22931,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_CONST_XATTR_HANDLER 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 @@ -16382,26 +22946,86 @@ $as_echo "no" >&6; } - fi rm -Rf build - fi - if test "$ZFS_META_LICENSE" = GPL; then + { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5 +$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +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; + + ; + 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_GPL_ONLY_SYMBOLS 1 +#define HAVE_DENTRY_XATTR_GET 1 _ACEOF - fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5 -$as_echo_n "checking block device operation prototypes... " >&6; } + +fi + + rm -Rf build + + + + + { $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 @@ -16412,29 +23036,18 @@ 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, - }; + 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)); - 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); + xops.set = set; ; return 0; @@ -16443,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=$? @@ -16457,11 +23072,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_DENTRY_XATTR_SET 1 _ACEOF @@ -16469,8 +23084,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; } @@ -16480,8 +23095,10 @@ fi - { $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 sops->show_options() wants dentry" >&5 +$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.c @@ -16492,13 +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) { - fmode_t *ptr __attribute__ ((unused)); ; return 0; @@ -16507,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=$? @@ -16525,7 +23148,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FMODE_T 1 +#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1 _ACEOF @@ -16545,8 +23168,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5 -$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5 +$as_echo_n "checking whether fops->fsync() wants... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.c @@ -16557,14 +23181,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int val __attribute__ ((unused)); - val = KOBJ_NAME_LEN; + int (*fsync) (struct file *, struct dentry *, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -16573,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=$? @@ -16587,11 +23215,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_KOBJ_NAME_LEN 1 +#define HAVE_FSYNC_WITH_DENTRY 1 _ACEOF @@ -16599,8 +23227,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; } @@ -16611,88 +23237,72 @@ 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 +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) +{ + + int (*fsync) (struct file *, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; + + ; + 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 - fi - else - { $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_BLKDEV_GET_BY_PATH 1 +#define HAVE_FSYNC_WITHOUT_DENTRY 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 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; } +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPEN_BDEV_EXCLUSIVE 1 -_ACEOF + rm -Rf build - 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 @@ -16703,14 +23313,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct block_device *bdev = NULL; - invalidate_bdev(bdev); + int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -16719,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=$? @@ -16733,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_1ARG_INVALIDATE_BDEV 1 +#define HAVE_FSYNC_RANGE 1 _ACEOF @@ -16745,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; } @@ -16757,8 +23369,6 @@ fi - { $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; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16769,14 +23379,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct block_device *bdev = NULL; - bdev_logical_block_size(bdev); + int (*fsync) (struct file *, struct dentry *, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -16785,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=$? @@ -16799,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_BDEV_LOGICAL_BLOCK_SIZE 1 +#define HAVE_FSYNC_WITH_DENTRY 1 _ACEOF @@ -16811,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; } @@ -16823,9 +23435,6 @@ fi - { $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" cat confdefs.h - <<_ACEOF >conftest.c @@ -16836,14 +23445,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct bio bio; - (void)bio_empty_barrier(&bio); + int (*fsync) (struct file *, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -16852,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=$? @@ -16866,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_BIO_EMPTY_BARRIER 1 +#define HAVE_FSYNC_WITHOUT_DENTRY 1 _ACEOF @@ -16878,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; } @@ -16890,8 +23501,6 @@ fi - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5 -$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16902,14 +23511,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = (1 << BIO_RW_FAILFAST); + int (*fsync) (struct file *, loff_t, loff_t, int) = NULL; + file_operations_no_const fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -16918,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=$? @@ -16932,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_BIO_RW_FAILFAST 1 +#define HAVE_FSYNC_RANGE 1 _ACEOF @@ -16944,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; } @@ -16956,8 +23567,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5 -$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 +$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16968,16 +23580,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + void evict_inode (struct inode * t) { return; } + static struct super_operations sops __attribute__ ((unused)) = { + .evict_inode = evict_inode, + }; int main (void) { - int flags __attribute__ ((unused)); - flags = ((1 << BIO_RW_FAILFAST_DEV) | - (1 << BIO_RW_FAILFAST_TRANSPORT) | - (1 << BIO_RW_FAILFAST_DRIVER)); ; return 0; @@ -16986,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=$? @@ -17004,7 +23618,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_FAILFAST_DTD 1 +#define HAVE_EVICT_INODE 1 _ACEOF @@ -17024,8 +23638,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5 -$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5 +$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17036,14 +23650,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = REQ_FAILFAST_MASK; + int (*nr_cached_objects)(struct super_block *) + __attribute__ ((unused)) = NULL; + struct super_operations sops __attribute__ ((unused)) = { + .nr_cached_objects = nr_cached_objects, + }; ; return 0; @@ -17052,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=$? @@ -17070,7 +23689,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_REQ_FAILFAST_MASK 1 +#define HAVE_NR_CACHED_OBJECTS 1 _ACEOF @@ -17090,10 +23709,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5 -$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; } - tmp_flags="$EXTRA_KCFLAGS" - EXTRA_KCFLAGS="-Werror" + { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5 +$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17104,16 +23721,17 @@ 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; + 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; @@ -17122,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=$? @@ -17140,7 +23760,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_BIO_END_IO_T 1 +#define HAVE_FREE_CACHED_OBJECTS 1 _ACEOF @@ -17158,11 +23778,11 @@ fi rm -Rf build - EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNC is defined" >&5 -$as_echo_n "checking whether BIO_RW_SYNC is defined... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17173,14 +23793,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = BIO_RW_SYNC; + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -17189,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=$? @@ -17207,7 +23831,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_SYNC 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF @@ -17227,8 +23851,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5 -$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5 +$as_echo_n "checking whether iops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17239,14 +23863,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = BIO_RW_SYNCIO; + long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL; + struct inode_operations fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -17255,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=$? @@ -17273,7 +23901,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_SYNCIO 1 +#define HAVE_INODE_FALLOCATE 1 _ACEOF @@ -17293,8 +23921,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether REQ_SYNC is defined" >&5 -$as_echo_n "checking whether REQ_SYNC is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5 +$as_echo_n "checking whether fops->fallocate() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17305,14 +23933,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags __attribute__ ((unused)); - flags = REQ_SYNC; + long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL; + struct file_operations_no_const fops __attribute__ ((unused)) = { + .fallocate = fallocate, + }; ; return 0; @@ -17321,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=$? @@ -17339,7 +23971,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_REQ_SYNC 1 +#define HAVE_FILE_FALLOCATE 1 _ACEOF @@ -17359,8 +23991,9 @@ fi - { $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 iops->truncate_range() exists" >&5 +$as_echo_n "checking whether iops->truncate_range() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17371,14 +24004,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #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) { - struct request *req = NULL; - (void) blk_end_request(req, 0, 0); ; return 0; @@ -17387,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=$? @@ -17405,7 +24043,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_END_REQUEST 1 +#define HAVE_INODE_TRUNCATE_RANGE 1 _ACEOF @@ -17424,8 +24062,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is GPL-only" >&5 -$as_echo_n "checking whether blk_end_request() is GPL-only... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether iops->create()/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 @@ -17436,17 +24075,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include - - MODULE_LICENSE("CDDL"); + #include int main (void) { - struct request *req = NULL; - (void) blk_end_request(req, 0, 0); + int (*create) (struct inode *, struct dentry *, umode_t, + struct nameidata *) = NULL; + struct inode_operations iops __attribute__ ((unused)) = { + .create = create, + }; ; return 0; @@ -17455,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=$? @@ -17469,21 +24110,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_CREATE_UMODE_T 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi @@ -17493,8 +24134,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether blk_fetch_request() is available" >&5 -$as_echo_n "checking whether blk_fetch_request() is available... " >&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 @@ -17505,14 +24146,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request_queue *q = NULL; - (void) blk_fetch_request(q); + struct vfsmount *(*d_automount) (struct path *) = NULL; + struct dentry_operations dops __attribute__ ((unused)) = { + .d_automount = d_automount, + }; ; return 0; @@ -17521,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=$? @@ -17539,7 +24184,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_FETCH_REQUEST 1 +#define HAVE_AUTOMOUNT 1 _ACEOF @@ -17559,8 +24204,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5 -$as_echo_n "checking whether blk_requeue_request() 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 @@ -17571,15 +24216,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 request_queue *q = NULL; - struct request *req = NULL; - blk_requeue_request(q, req); ; return 0; @@ -17588,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=$? @@ -17606,7 +24255,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_REQUEUE_REQUEST 1 +#define HAVE_ENCODE_FH_WITH_INODE 1 _ACEOF @@ -17625,9 +24274,9 @@ 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 blk_rq_bytes() is available" >&5 -$as_echo_n "checking whether blk_rq_bytes() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17638,14 +24287,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) blk_rq_bytes(req); + clear_inode(NULL); ; return 0; @@ -17654,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=$? @@ -17667,32 +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_BLK_RQ_BYTES 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 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 @@ -17703,17 +24393,13 @@ 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); + insert_inode_locked(NULL); ; return 0; @@ -17722,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=$? @@ -17735,33 +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 + + +fi + + rm -Rf build + + + if test $rc -ne 0; 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 + else + if test "x$enable_linux_builtin" != xyes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&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 + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1 -_ACEOF + 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_INSERT_INODE_LOCKED 1 +_ACEOF - rm -Rf build + 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; } - { $as_echo "$as_me:$LINENO: checking whether blk_rq_pos() is available" >&5 -$as_echo_n "checking whether blk_rq_pos() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17772,14 +24499,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) blk_rq_pos(req); + d_make_root(NULL); ; return 0; @@ -17788,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=$? @@ -17801,33 +24529,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_RQ_POS 1 -_ACEOF +fi + rm -Rf build -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + + if test $rc -ne 0; then : + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]d_make_root[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + + fi + if test $rc -ne 0; then : { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_MAKE_ROOT 1 +_ACEOF - rm -Rf build + fi + fi + { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5 +$as_echo_n "checking whether d_obtain_alias() 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; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17838,14 +24605,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) blk_rq_sectors(req); + d_obtain_alias(NULL); ; return 0; @@ -17854,9 +24620,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17867,33 +24635,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_RQ_SECTORS 1 -_ACEOF +fi + rm -Rf build -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + + if test $rc -ne 0; then : { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + else + if test "x$enable_linux_builtin" != xyes; then + + grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi + fi + if test $rc -ne 0; then : -fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - rm -Rf build + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_OBTAIN_ALIAS 1 +_ACEOF - { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5 -$as_echo_n "checking whether get_disk_ro() is available... " >&6; } + 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; } + cat confdefs.h - <<_ACEOF >conftest.c @@ -17904,14 +24711,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct gendisk *disk = NULL; - (void) get_disk_ro(disk); + check_disk_size_change(NULL, NULL); ; return 0; @@ -17920,9 +24726,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=$? @@ -17933,33 +24741,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_GET_DISK_RO 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:]]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; } -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHECK_DISK_SIZE_CHANGE 1 +_ACEOF - rm -Rf build + fi + fi + { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5 +$as_echo_n "checking whether truncate_setsize() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5 -$as_echo_n "checking whether rq_is_sync() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17970,14 +24817,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) rq_is_sync(req); + truncate_setsize(NULL, 0); ; return 0; @@ -17986,9 +24832,11 @@ main (void) _ACEOF - rm -Rf build && mkdir -p build + rm -Rf build && mkdir -p build && touch build/conftest.mod.c echo "obj-m := conftest.o" >build/Makefile - if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17999,33 +24847,74 @@ _ACEOF ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_RQ_IS_SYNC 1 -_ACEOF +fi + rm -Rf build -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + + if test $rc -ne 0; then : { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]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 + 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_TRUNCATE_SETSIZE 1 +_ACEOF + + + fi + fi - { $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; } + + { $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" cat confdefs.h - <<_ACEOF >conftest.c @@ -18036,16 +24925,20 @@ 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) { } + 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; @@ -18054,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=$? @@ -18072,7 +24967,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RQ_FOR_EACH_SEGMENT 1 +#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1 _ACEOF @@ -18090,9 +24985,13 @@ 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 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 @@ -18103,26 +25002,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #include - - const struct xattr_handler xattr_test_handler = { - .prefix = "test", - .get = NULL, - .set = NULL, - }; - - const struct xattr_handler *xattr_handlers[] = { - &xattr_test_handler, - }; + #include int main (void) { - struct super_block sb __attribute__ ((unused)); + struct inode *ip __attribute__ ((unused)) = NULL; + struct inode *dip __attribute__ ((unused)) = NULL; + const struct qstr *str __attribute__ ((unused)) = NULL; + initxattrs func __attribute__ ((unused)) = NULL; - sb.s_xattr = xattr_handlers; + security_inode_init_security(ip, dip, str, func, NULL); ; return 0; @@ -18131,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=$? @@ -18149,7 +25042,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CONST_XATTR_HANDLER 1 +#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1 _ACEOF @@ -18167,10 +25060,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" + { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5 +$as_echo_n "checking whether mount_nodev() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5 -$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18181,17 +25075,13 @@ 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; + mount_nodev(NULL, 0, NULL, NULL); ; return 0; @@ -18200,9 +25090,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=$? @@ -18213,33 +25105,72 @@ _ACEOF ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + rc=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + rc=1 - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_DENTRY_XATTR_GET 1 -_ACEOF +fi + rm -Rf build -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + + if test $rc -ne 0; then : { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } + else + if test "x$enable_linux_builtin" != xyes; then + grep -q -E '[[:space:]]mount_nodev[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/super.c; do + grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + rc=1 + else : + rc=0 + fi + else : + rc=0 + fi -fi + fi + if test $rc -ne 0; then : - rm -Rf build + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else : + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_MOUNT_NODEV 1 +_ACEOF + + + fi + fi - { $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 super_block has s_shrink" >&5 +$as_echo_n "checking whether super_block has s_shrink... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18250,18 +25181,19 @@ 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; + 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; @@ -18270,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=$? @@ -18288,10 +25222,11 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_DENTRY_XATTR_SET 1 +#define HAVE_SHRINK 1 _ACEOF + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -18308,8 +25243,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants 2 args" >&5 -$as_echo_n "checking whether fops->fsync() wants 2 args... " >&6; } + { $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 @@ -18326,10 +25261,8 @@ int main (void) { - int (*fsync) (struct file *, int datasync) = NULL; - struct file_operations fops __attribute__ ((unused)); - - fops.fsync = fsync; + struct super_block sb __attribute__ ((unused)); + sb.s_bdi = NULL; ; return 0; @@ -18338,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=$? @@ -18356,7 +25291,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_FSYNC 1 +#define HAVE_BDI 1 _ACEOF @@ -18375,9 +25310,9 @@ fi + { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() is available" >&5 +$as_echo_n "checking whether bdi_setup_and_register() is available... " >&6; } - { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 -$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -18388,16 +25323,13 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - void (*evict_inode) (struct inode *) = NULL; - struct super_operations sops __attribute__ ((unused)); - - sops.evict_inode = evict_inode; + bdi_setup_and_register(NULL, NULL, 0); ; return 0; @@ -18406,9 +25338,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=$? @@ -18419,22 +25353,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_EVICT_INODE 1 -_ACEOF - - + rc=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - + rc=1 fi @@ -18442,135 +25365,137 @@ fi rm -Rf build + if test $rc -ne 0; then : + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking whether 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:]]' \ + 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 fs/inode.c; do - grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" "$LINUX/$file" 2>/dev/null + 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 + 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 + 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 + else : + + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INSERT_INODE_LOCKED 1 +#define HAVE_BDI_SETUP_AND_REGISTER 1 _ACEOF + fi - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_INSERT_INODE_LOCKED 1 + + + { $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. */ - fi + #include +int +main (void) +{ - { $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; } + struct inode node; + unsigned int link = 0; + (void) set_nlink(&node, link); - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_D_OBTAIN_ALIAS 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_D_OBTAIN_ALIAS 1 +#define HAVE_SET_NLINK 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 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 "$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; } +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHECK_DISK_SIZE_CHANGE 1 -_ACEOF + rm -Rf build - fi if test "$LINUX_OBJ" != "$LINUX"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" - fi + +fi + - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-unused-but-set-variable" + KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE" KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL" KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\"" @@ -18578,6 +25503,28 @@ _ACEOF + +# Check whether --with-udevdir was given. +if test "${with_udevdir+set}" = set; then + withval=$with_udevdir; udevdir=$withval +else + udevdir='${exec_prefix}/lib/udev' +fi + + + +# 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/` @@ -20117,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 @@ -20126,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 @@ -20153,6 +27099,12 @@ fi HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" DEBUG_STACKFLAGS="-fstack-check" + DEBUG_ZFS="_with_debug" + +cat >>confdefs.h <<\_ACEOF +#define ZFS_DEBUG 1 +_ACEOF + else @@ -20160,17 +27112,51 @@ else HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG " DEBUG_CFLAGS="-DNDEBUG" DEBUG_STACKFLAGS="" + DEBUG_ZFS="_without_debug" fi + { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5 $as_echo "$enable_debug" >&6; } -ac_config_files="$ac_config_files Makefile dracut/Makefile dracut/90zfs/Makefile etc/Makefile etc/udev/Makefile etc/udev/rules.d/Makefile etc/udev/rules.d/60-zpool.rules etc/udev/rules.d/60-zvol.rules 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 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 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 zfs-script-config.sh" + # Check whether --enable-debug-dmu-tx was given. +if test "${enable_debug_dmu_tx+set}" = set; then + enableval=$enable_debug_dmu_tx; +else + enable_debug_dmu_tx=no +fi + + + if test "x$enable_debug_dmu_tx" = xyes; then + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_DMU_TX" + DEBUG_DMU_TX="_with_debug_dmu_tx" + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_DMU_TX 1 +_ACEOF + + +else + + DEBUG_DMU_TX="_without_debug_dmu_tx" + +fi + + + + { $as_echo "$as_me:$LINENO: checking whether dmu tx validation is enabled" >&5 +$as_echo_n "checking whether dmu tx validation is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_dmu_tx" >&5 +$as_echo "$enable_debug_dmu_tx" >&6; } + + +ac_config_files="$ac_config_files Makefile 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 @@ -21089,14 +28075,13 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "dracut/Makefile") CONFIG_FILES="$CONFIG_FILES dracut/Makefile" ;; "dracut/90zfs/Makefile") CONFIG_FILES="$CONFIG_FILES dracut/90zfs/Makefile" ;; + "udev/Makefile") CONFIG_FILES="$CONFIG_FILES udev/Makefile" ;; + "udev/rules.d/Makefile") CONFIG_FILES="$CONFIG_FILES udev/rules.d/Makefile" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; - "etc/udev/Makefile") CONFIG_FILES="$CONFIG_FILES etc/udev/Makefile" ;; - "etc/udev/rules.d/Makefile") CONFIG_FILES="$CONFIG_FILES etc/udev/rules.d/Makefile" ;; - "etc/udev/rules.d/60-zpool.rules") CONFIG_FILES="$CONFIG_FILES etc/udev/rules.d/60-zpool.rules" ;; - "etc/udev/rules.d/60-zvol.rules") CONFIG_FILES="$CONFIG_FILES etc/udev/rules.d/60-zvol.rules" ;; "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" ;; @@ -21118,6 +28103,7 @@ do "lib/libuutil/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libuutil/Makefile" ;; "lib/libzpool/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libzpool/Makefile" ;; "lib/libzfs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libzfs/Makefile" ;; + "lib/libshare/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libshare/Makefile" ;; "cmd/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;; "cmd/zdb/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zdb/Makefile" ;; "cmd/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zfs/Makefile" ;; @@ -21129,6 +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/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" ;; @@ -21150,7 +28137,10 @@ do "scripts/common.sh") CONFIG_FILES="$CONFIG_FILES scripts/common.sh" ;; "zfs.spec") CONFIG_FILES="$CONFIG_FILES zfs.spec" ;; "zfs-modules.spec") CONFIG_FILES="$CONFIG_FILES zfs-modules.spec" ;; + "PKGBUILD-zfs") CONFIG_FILES="$CONFIG_FILES PKGBUILD-zfs" ;; + "PKGBUILD-zfs-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-zfs-modules" ;; "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;}