X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=configure;h=497c9931b56847fe335fa18f53ad0583cffa554a;hb=2cf7f52bc42f215d4ef27d0fd75fc1b1417cb841;hp=c55348036898cae11d7af8f86228cd1560daf302;hpb=675de5aa379bfceb0258a20c4ccd1414e4798ee6;p=zfs.git diff --git a/configure b/configure index c553480..497c993 100755 --- a/configure +++ b/configure @@ -794,6 +794,7 @@ CONFIG_KERNEL_TRUE CONFIG_USER_FALSE CONFIG_USER_TRUE FRAME_LARGER_THAN +LIBSELINUX LIBBLKID LIBUUID ZLIB @@ -807,8 +808,10 @@ LINUX_SYMBOLS LINUX_VERSION LINUX_OBJ LINUX +NO_UNUSED_BUT_SET_VARIABLE ZFS_CONFIG TARGET_ASM_DIR +DEFAULT_INIT_SCRIPT DEFAULT_PACKAGE VENDOR ALIEN_VERSION @@ -972,6 +975,7 @@ with_linux_obj with_spl with_spl_obj with_blkid +with_selinux enable_debug ' ac_precious_vars='build_alias @@ -1639,6 +1643,7 @@ Optional Packages: --with-spl=PATH Path to spl source --with-spl-obj=PATH Path to spl build objects --with-blkid support blkid caching [default=check] + --with-selinux support selinux [default=check] Some influential environment variables: CC C compiler command @@ -4206,8 +4211,8 @@ esac -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6b' +macro_revision='1.3017' @@ -4817,13 +4822,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:4820: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4825: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4823: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4828: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4826: output\"" >&5) + (eval echo "\"\$as_me:4831: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6029,7 +6034,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6032 "configure"' > conftest.$ac_ext + echo '#line 6037 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7882,11 +7887,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:7885: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7890: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7889: \$? = $ac_status" >&5 + echo "$as_me:7894: \$? = $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. @@ -8221,11 +8226,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:8224: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8229: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8228: \$? = $ac_status" >&5 + echo "$as_me:8233: \$? = $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. @@ -8326,11 +8331,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:8329: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8334: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8333: \$? = $ac_status" >&5 + echo "$as_me:8338: \$? = $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 @@ -8381,11 +8386,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:8384: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8389: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8388: \$? = $ac_status" >&5 + echo "$as_me:8393: \$? = $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 @@ -11184,7 +11189,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11187 "configure" +#line 11192 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11280,7 +11285,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11283 "configure" +#line 11288 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11781,16 +11786,18 @@ $as_echo_n "checking linux distribution... " >&6; } VENDOR=redhat ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; 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 ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/lunar.release ; then + VENDOR=lunar ; else VENDOR= ; fi @@ -11801,12 +11808,14 @@ $as_echo "$VENDOR" >&6; } { $as_echo "$as_me:$LINENO: checking default package type" >&5 $as_echo_n "checking default package type... " >&6; } case "$VENDOR" in - fedora) DEFAULT_PACKAGE=rpm ;; redhat) DEFAULT_PACKAGE=rpm ;; - sles) DEFAULT_PACKAGE=rpm ;; + fedora) DEFAULT_PACKAGE=rpm ;; ubuntu) DEFAULT_PACKAGE=deb ;; debian) DEFAULT_PACKAGE=deb ;; + sles) DEFAULT_PACKAGE=rpm ;; slackware) DEFAULT_PACKAGE=tgz ;; + gentoo) DEFAULT_PACKAGE=tgz ;; + lunar) DEFAULT_PACKAGE=tgz ;; *) DEFAULT_PACKAGE=rpm ;; esac @@ -11814,6 +11823,24 @@ $as_echo_n "checking default package type... " >&6; } $as_echo "$DEFAULT_PACKAGE" >&6; } + { $as_echo "$as_me:$LINENO: checking default init script type" >&5 +$as_echo_n "checking default init script type... " >&6; } + case "$VENDOR" in + redhat) DEFAULT_INIT_SCRIPT=redhat ;; + fedora) DEFAULT_INIT_SCRIPT=fedora ;; + ubuntu) DEFAULT_INIT_SCRIPT=lsb ;; + debian) DEFAULT_INIT_SCRIPT=lsb ;; + sles) DEFAULT_INIT_SCRIPT=lsb ;; + slackware) DEFAULT_INIT_SCRIPT=lsb ;; + gentoo) DEFAULT_INIT_SCRIPT=gentoo ;; + lunar) DEFAULT_INIT_SCRIPT=lunar ;; + *) DEFAULT_INIT_SCRIPT=lsb ;; + esac + + { $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_SCRIPT" >&5 +$as_echo "$DEFAULT_INIT_SCRIPT" >&6; } + + TARGET_ASM_DIR=asm-generic @@ -11833,6 +11860,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) @@ -11853,8 +11962,11 @@ fi { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 $as_echo_n "checking kernel source directory... " >&6; } if test -z "$kernelsrc"; then - headersdir="/lib/modules/$(uname -r)/build" - if test -e "$headersdir"; then + if test -e "/lib/modules/$(uname -r)/source"; then + headersdir="/lib/modules/$(uname -r)/source" + sourcelink=$(readlink -f "$headersdir") + elif test -e "/lib/modules/$(uname -r)/build"; then + headersdir="/lib/modules/$(uname -r)/build" sourcelink=$(readlink -f "$headersdir") else sourcelink=$(ls -1d /usr/src/kernels/* \ @@ -11888,7 +12000,9 @@ $as_echo "$kernelsrc" >&6; } { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 $as_echo_n "checking kernel build directory... " >&6; } if test -z "$kernelbuild"; then - if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + if test -e "/lib/modules/$(uname -r)/build"; then + kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` + elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} elif test -d ${kernelsrc}-obj/${target_cpu}/default; then kernelbuild=${kernelsrc}-obj/${target_cpu}/default @@ -11956,6 +12070,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; } else LINUX_SYMBOLS=Module.symvers fi + + if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&2;} + { (exit 1); exit 1; }; } + fi else LINUX_SYMBOLS=NONE fi @@ -12078,6 +12206,78 @@ $as_echo "$SPL_SYMBOLS" >&6; } + { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5 +$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #ifndef AUTOCONF_INCLUDED + #include + #endif + +int +main (void) +{ + + #ifndef CONFIG_PREEMPT + #error CONFIG_PREEMPT not #defined + #endif + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** Kernel built with CONFIG_PREEMPT which is not supported. + ** You must rebuild your kernel without this option." >&5 +$as_echo "$as_me: error: + *** Kernel built with CONFIG_PREEMPT which is not supported. + ** You must rebuild your kernel without this option." >&2;} + { (exit 1); exit 1; }; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + + +fi + + rm -Rf build + + + + if test "$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; } @@ -12261,7 +12461,7 @@ int main (void) { - fmode_t *ptr; + fmode_t *ptr __attribute__ ((unused)); ; return 0; @@ -12326,7 +12526,7 @@ int main (void) { - int val; + int val __attribute__ ((unused)); val = KOBJ_NAME_LEN; ; @@ -12374,6 +12574,46 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5 +$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; } + grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + + fi + + + { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5 $as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; } grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \ @@ -12432,7 +12672,7 @@ int main (void) { - struct block_device *bdev; + struct block_device *bdev = NULL; invalidate_bdev(bdev); ; @@ -12631,7 +12871,7 @@ int main (void) { - int flags; + int flags __attribute__ ((unused)); flags = (1 << BIO_RW_FAILFAST); ; @@ -12697,7 +12937,7 @@ int main (void) { - int flags; + int flags __attribute__ ((unused)); flags = ((1 << BIO_RW_FAILFAST_DEV) | (1 << BIO_RW_FAILFAST_TRANSPORT) | (1 << BIO_RW_FAILFAST_DRIVER)); @@ -12765,7 +13005,7 @@ int main (void) { - int flags; + int flags __attribute__ ((unused)); flags = REQ_FAILFAST_MASK; ; @@ -12834,7 +13074,7 @@ main (void) { void (*wanted_end_io)(struct bio *, int) = NULL; - bio_end_io_t *local_end_io; + bio_end_io_t *local_end_io __attribute__ ((unused)); local_end_io = wanted_end_io; @@ -12902,7 +13142,7 @@ int main (void) { - int flags; + int flags __attribute__ ((unused)); flags = BIO_RW_SYNC; ; @@ -12968,7 +13208,7 @@ int main (void) { - int flags; + int flags __attribute__ ((unused)); flags = BIO_RW_SYNCIO; ; @@ -13034,7 +13274,7 @@ int main (void) { - int flags; + int flags __attribute__ ((unused)); flags = REQ_SYNC; ; @@ -13814,632 +14054,766 @@ fi - - if test "$LINUX_OBJ" != "$LINUX"; then - KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" - fi - - - - KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL" - KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\"" - - - ;; - user) - - { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5 -$as_echo_n "checking for target asm dir... " >&6; } - TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/` - - case $TARGET_ARCH in - i386|x86_64) - TARGET_ASM_DIR=asm-${TARGET_ARCH} - ;; - *) - TARGET_ASM_DIR=asm-generic - ;; - esac - - - { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5 -$as_echo "$TARGET_ASM_DIR" >&6; } + { $as_echo "$as_me:$LINENO: checking whether 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 sa_init in -lshare" >&5 -$as_echo_n "checking for sa_init in -lshare... " >&6; } -if test "${ac_cv_lib_share_sa_init+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lshare $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 sa_init (); + + #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 sa_init (); + + 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 + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - 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_share_sa_init=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_share_sa_init=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_share_sa_init" >&5 -$as_echo "$ac_cv_lib_share_sa_init" >&6; } -if test "x$ac_cv_lib_share_sa_init" = x""yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBSHARE 1 -_ACEOF fi + rm -Rf build - { $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 + { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5 +$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; } -_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 +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ioctl" >/dev/null 2>&1; then - is_stropts=yes -else - is_stropts=no -fi -rm -f conftest* + #include - if test $is_unistd = yes; then - result=unistd.h +int +main (void) +{ -cat >>confdefs.h <<\_ACEOF -#define HAVE_IOCTL_IN_UNISTD_H 1 -_ACEOF + int (*get)(struct dentry *dentry, const char *name, + void *buffer, size_t size, int handler_flags) = NULL; + struct xattr_handler xops __attribute__ ((unused)); - else + xops.get = get; - if test $is_sys_ioctl = yes; then - result=sys/ioctl.h + ; + return 0; +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_IOCTL_IN_SYS_IOCTL_H 1 _ACEOF - elif test $is_stropts = yes; then + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_IOCTL_IN_STROPTS_H 1 +#define HAVE_DENTRY_XATTR_GET 1 _ACEOF - else - result=no - fi - fi - if test $result = no; then - { $as_echo "$as_me:$LINENO: result: no" >&5 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** 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 + + 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 /* 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) +{ + + 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 -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 + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - 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_DENTRY_XATTR_SET 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 + + + + { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants 2 args" >&5 +$as_echo_n "checking whether fops->fsync() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + + + #include + +int +main (void) +{ + + int (*fsync) (struct file *, int datasync) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; + + ; + 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 + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - 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_2ARGS_FSYNC 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 -{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5 -$as_echo_n "checking for compress2 in -lz... " >&6; } -if test "${ac_cv_lib_z_compress2+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking whether 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 compress2 (); + + #include + int -main () +main (void) { -return compress2 (); + + void (*evict_inode) (struct inode *) = NULL; + struct super_operations sops __attribute__ ((unused)); + + sops.evict_inode = evict_inode; + ; 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 + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - 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 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - ac_cv_lib_z_compress2=no -fi + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_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 +cat >>confdefs.h <<\_ACEOF +#define HAVE_EVICT_INODE 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: 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 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 + rm -Rf build - 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 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; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INSERT_INODE_LOCKED 1 +_ACEOF -{ $as_echo "$as_me:$LINENO: checking 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 + 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 + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether symbol d_obtain_alias is exported" >&5 +$as_echo_n "checking whether symbol d_obtain_alias is exported... " >&6; } + grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_OBTAIN_ALIAS 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_OBTAIN_ALIAS 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5 +$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; } + grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHECK_DISK_SIZE_CHANGE 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHECK_DISK_SIZE_CHANGE 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether symbol truncate_setsize is exported" >&5 +$as_echo_n "checking whether symbol truncate_setsize is exported... " >&6; } + grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in mm/truncate.c; do + grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TRUNCATE_SETSIZE 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TRUNCATE_SETSIZE 1 +_ACEOF + + fi + + + + { $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. */ -/* 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 (); + + security_inode_init_security(NULL,NULL,NULL,NULL,NULL,NULL); + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - 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_6ARGS_SECURITY_INODE_INIT_SECURITY 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" + EXTRA_KCFLAGS="$tmp_flags" -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZLIB 1 -_ACEOF + { $as_echo "$as_me:$LINENO: checking whether symbol mount_nodev is exported" >&5 +$as_echo_n "checking whether symbol mount_nodev is exported... " >&6; } + grep -q -E '[[:space:]]mount_nodev[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/super.c; do + grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - LIBUUID= +cat >>confdefs.h <<\_ACEOF +#define HAVE_MOUNT_NODEV 1 +_ACEOF - 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 + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MOUNT_NODEV 1 +_ACEOF + + fi + + + + 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) + + { $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_uuid_uuid_h" >&5 -$as_echo "$ac_cv_header_uuid_uuid_h" >&6; } +{ $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 uuid/uuid.h usability" >&5 -$as_echo_n "checking uuid/uuid.h usability... " >&6; } +{ $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 @@ -14447,7 +14821,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -14480,15 +14854,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $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; } +{ $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 +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -14522,49 +14896,49 @@ $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;} + { $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: 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;} + { $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 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 "$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_uuid_uuid_h=$ac_header_preproc + ac_cv_header_zlib_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; } +{ $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_uuid_uuid_h" = x""yes; then +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: - *** uuid/uuid.h missing, libuuid-devel package required + *** zlib.h missing, zlib-devel package required See \`config.log' for more details." >&5 $as_echo "$as_me: error: - *** uuid/uuid.h missing, libuuid-devel package required + *** zlib.h missing, zlib-devel package required See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi @@ -14572,13 +14946,13 @@ 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 "$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="-luuid $LIBS" +LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14592,11 +14966,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char uuid_generate (); +char compress2 (); int main () { -return uuid_generate (); +return compress2 (); ; return 0; } @@ -14622,12 +14996,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_uuid_uuid_generate=yes + ac_cv_lib_z_compress2=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_uuid_uuid_generate=no + ac_cv_lib_z_compress2=no fi rm -rf conftest.dSYM @@ -14635,36 +15009,36 @@ 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 +{ $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_LIBUUID 1 +#define HAVE_LIBZ 1 _ACEOF - LIBS="-luuid $LIBS" + 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: - *** uuid_generate() missing, libuuid-devel package required + *** compress2() missing, zlib-devel package required See \`config.log' for more details." >&5 $as_echo "$as_me: error: - *** uuid_generate() missing, libuuid-devel package required + *** 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 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 "$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="-luuid $LIBS" +LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14678,11 +15052,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char uuid_is_null (); +char uncompress (); int main () { -return uuid_is_null (); +return uncompress (); ; return 0; } @@ -14708,12 +15082,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_uuid_uuid_is_null=yes + ac_cv_lib_z_uncompress=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_uuid_uuid_is_null=no + ac_cv_lib_z_uncompress=no fi rm -rf conftest.dSYM @@ -14721,56 +15095,36 @@ 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 +{ $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_LIBUUID 1 +#define HAVE_LIBZ 1 _ACEOF - LIBS="-luuid $LIBS" + 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: - *** uuid_is_null() missing, libuuid-devel package required + *** uncompress() missing, zlib-devel package required See \`config.log' for more details." >&5 $as_echo "$as_me: error: - *** uuid_is_null() missing, libuuid-devel package required + *** uncompress() missing, zlib-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 "$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="-lblkid $LIBS" +LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14784,11 +15138,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char blkid_get_cache (); +char crc32 (); int main () { -return blkid_get_cache (); +return crc32 (); ; return 0; } @@ -14814,12 +15168,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_blkid_blkid_get_cache=yes + ac_cv_lib_z_crc32=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_blkid_blkid_get_cache=no + ac_cv_lib_z_crc32=no fi rm -rf conftest.dSYM @@ -14827,595 +15181,1609 @@ 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 +{ $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 - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="-lblkid" + LIBS="-lz $LIBS" - if test "$cross_compiling" = 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: cannot run test program while cross compiling +{ { $as_echo "$as_me:$LINENO: error: + *** crc32() missing, zlib-devel package required See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: + *** crc32() missing, zlib-devel package required 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. */ +fi - #include - #include -int -main () -{ + ZLIB="-lz" - blkid_cache cache; - char *value; - if (blkid_get_cache(&cache, NULL) < 0) - return 1; +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB 1 +_ACEOF - value = blkid_get_tag_value(cache, "TYPE", - "$ZFS_DEV"); - if (!value) { - blkid_put_cache(cache); - return 2; - } - if (strcmp(value, "zfs")) { - free(value); - blkid_put_cache(cache); - return 3; - } - free(value); - blkid_put_cache(cache); + LIBUUID= - ; - return 0; -} + 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 -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +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_link") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + (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_try") 2>&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); }; }; then - - rm -f $ZFS_DEV - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - LIBBLKID="-lblkid" + (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 -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBBLKID 1 -_ACEOF +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 - $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 ) + 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; } - rm -f $ZFS_DEV - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - if test "x$with_blkid" != xcheck; then +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: --with-blkid given but unavailable +{ { $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: --with-blkid given but unavailable +$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 *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +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 - LDFLAGS="$saved_LDFLAGS" +{ $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. */ - if test "x$with_blkid" != xcheck; then +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char 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: --with-blkid given but unavailable +{ { $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: --with-blkid given but unavailable +$as_echo "$as_me: error: + *** uuid_is_null() missing, libuuid-devel package required See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi + LIBUUID="-luuid" + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBUUID 1 +_ACEOF + + + + +# Check whether --with-blkid was given. +if test "${with_blkid+set}" = set; then + withval=$with_blkid; +else + with_blkid=check +fi + + + LIBBLKID= + if test "x$with_blkid" != xno; then + + { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5 +$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; } +if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblkid $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char blkid_get_cache (); +int +main () +{ +return blkid_get_cache (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_blkid_blkid_get_cache=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_blkid_blkid_get_cache=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5 +$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; } +if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then + + { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5 +$as_echo_n "checking for blkid zfs support... " >&6; } + + ZFS_DEV=`mktemp` + dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \ + >/dev/null 2>/dev/null + echo -en "\x0c\xb1\xba\0\0\0\0\0" | \ + dd of=$ZFS_DEV bs=1k count=8 \ + seek=132 conv=notrunc &>/dev/null \ + >/dev/null 2>/dev/null + + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="-lblkid" + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + blkid_cache cache; + char *value; + + if (blkid_get_cache(&cache, NULL) < 0) + return 1; + + value = blkid_get_tag_value(cache, "TYPE", + "$ZFS_DEV"); + if (!value) { + blkid_put_cache(cache); + return 2; + } + + if (strcmp(value, "zfs")) { + free(value); + blkid_put_cache(cache); + return 3; + } + + free(value); + blkid_put_cache(cache); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + rm -f $ZFS_DEV + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + LIBBLKID="-lblkid" + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBBLKID 1 +_ACEOF + + +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + rm -f $ZFS_DEV + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + if test "x$with_blkid" != xcheck; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: --with-blkid given but unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + LDFLAGS="$saved_LDFLAGS" + +else + + if test "x$with_blkid" != xcheck; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: --with-blkid given but unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + + +fi + + +fi + + + + +# Check whether --with-selinux was given. +if test "${with_selinux+set}" = set; then + withval=$with_selinux; +else + with_selinux=check +fi + + + LIBSELINUX= + if test "x$with_selinux" != xno; then + + if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 +$as_echo_n "checking for selinux/selinux.h... " >&6; } +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 +$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5 +$as_echo_n "checking selinux/selinux.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5 +$as_echo_n "checking selinux/selinux.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 +$as_echo_n "checking for selinux/selinux.h... " >&6; } +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_selinux_selinux_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 +$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } + +fi +if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then + + { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5 +$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } +if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lselinux $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char is_selinux_enabled (); +int +main () +{ +return is_selinux_enabled (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_selinux_is_selinux_enabled=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_selinux_is_selinux_enabled=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 +$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } +if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then + + LIBSELINUX="-lselinux" + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBSELINUX 1 +_ACEOF + + +else + + if test "x$with_selinux" != xcheck; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: --with-selinux given but unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +fi + + +fi + + +else + + if test "x$with_selinux" != xcheck; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: --with-selinux given but unavailable +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +fi + + +fi + + + +else + + { $as_echo "$as_me:$LINENO: checking for selinux support" >&5 +$as_echo_n "checking for selinux support... " >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than= support" >&5 +$as_echo_n "checking for -Wframe-larger-than= support... " >&6; } + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wframe-larger-than=1024" + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + FRAME_LARGER_THAN=-Wframe-larger-than=1024 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + FRAME_LARGER_THAN= + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + CFLAGS="$saved_flags" + + + + + { $as_echo "$as_me:$LINENO: checking whether pthread stack includes guard" >&5 +$as_echo_n "checking whether pthread stack includes guard... " >&6; } + + saved_CFLAGS="$CFLAGS" + CFLAGS="-fstack-check" + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="-lpthread" + + if test "$cross_compiling" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + #include + #include + + #define PAGESIZE (sysconf(_SC_PAGESIZE)) + #define STACK_SIZE 8192 + #define BUFSIZE 4096 + + void * func(void *arg) + { + char buf[BUFSIZE]; + } + +int +main () +{ + + pthread_t tid; + pthread_attr_t attr; + struct rlimit l; + + l.rlim_cur = 0; + l.rlim_max = 0; + setrlimit(RLIMIT_CORE, &l); + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + STACK_SIZE); + pthread_attr_setguardsize(&attr, PAGESIZE); + pthread_create(&tid, &attr, func, NULL); + pthread_join(tid, NULL); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + +cat >>confdefs.h <<\_ACEOF +#define NPTL_GUARD_WITHIN_STACK 1 +_ACEOF + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CFLAGS="$saved_CFLAGS" + LDFLAGS="$saved_LDFLAGS" + + ;; + all) + + +# Check whether --with-linux was given. +if test "${with_linux+set}" = set; then + withval=$with_linux; kernelsrc="$withval" +fi + + + +# Check whether --with-linux-obj was given. +if test "${with_linux_obj+set}" = set; then + withval=$with_linux_obj; kernelbuild="$withval" +fi + + + { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5 +$as_echo_n "checking kernel source directory... " >&6; } + if test -z "$kernelsrc"; then + if test -e "/lib/modules/$(uname -r)/source"; then + headersdir="/lib/modules/$(uname -r)/source" + sourcelink=$(readlink -f "$headersdir") + elif test -e "/lib/modules/$(uname -r)/build"; then + headersdir="/lib/modules/$(uname -r)/build" + sourcelink=$(readlink -f "$headersdir") + else + sourcelink=$(ls -1d /usr/src/kernels/* \ + /usr/src/linux-* \ + 2>/dev/null | grep -v obj | tail -1) + fi + + if test -n "$sourcelink" && test -e ${sourcelink}; then + kernelsrc=`readlink -f ${sourcelink}` + else + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed then try again. If that fails you can specify the + *** location of the kernel source with the '--with-linux=PATH' option." >&2;} + { (exit 1); exit 1; }; } + fi + else + if test "$kernelsrc" = "NONE"; then + kernsrcver=NONE + fi + fi + + { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5 +$as_echo "$kernelsrc" >&6; } + { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5 +$as_echo_n "checking kernel build directory... " >&6; } + if test -z "$kernelbuild"; then + if test -e "/lib/modules/$(uname -r)/build"; then + kernelbuild=`readlink -f /lib/modules/$(uname -r)/build` + elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then + kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} + elif test -d ${kernelsrc}-obj/${target_cpu}/default; then + kernelbuild=${kernelsrc}-obj/${target_cpu}/default + elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then + kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} + else + kernelbuild=${kernelsrc} + fi + fi + { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5 +$as_echo "$kernelbuild" >&6; } + + { $as_echo "$as_me:$LINENO: checking kernel source version" >&5 +$as_echo_n "checking kernel source version... " >&6; } + utsrelease1=$kernelbuild/include/linux/version.h + utsrelease2=$kernelbuild/include/linux/utsrelease.h + utsrelease3=$kernelbuild/include/generated/utsrelease.h + if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then + utsrelease=linux/version.h + elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then + utsrelease=linux/utsrelease.h + elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then + utsrelease=generated/utsrelease.h + fi + + if test "$utsrelease"; then + kernsrcver=`(echo "#include <$utsrelease>"; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + + if test -z "$kernsrcver"; then + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5 +$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} + { (exit 1); exit 1; }; } + fi + else + { $as_echo "$as_me:$LINENO: result: Not found" >&5 +$as_echo "Not found" >&6; } + { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 +$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} + { (exit 1); exit 1; }; } + fi + + { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 +$as_echo "$kernsrcver" >&6; } + + LINUX=${kernelsrc} + LINUX_OBJ=${kernelbuild} + LINUX_VERSION=${kernsrcver} + + + + + + + modpost=$LINUX/scripts/Makefile.modpost + { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 +$as_echo_n "checking kernel file name for module symbols... " >&6; } + if test -f "$modpost"; then + if grep -q Modules.symvers $modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi + + if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then + { { $as_echo "$as_me:$LINENO: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&5 +$as_echo "$as_me: error: + *** Please make sure the kernel devel package for your distribution + *** is installed. If your building with a custom kernel make sure the + *** kernel is configured, built, and the '--with-linux=PATH' configure + *** option refers to the location of the kernel source." >&2;} + { (exit 1); exit 1; }; } + fi + else + LINUX_SYMBOLS=NONE + fi + { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 +$as_echo "$LINUX_SYMBOLS" >&6; } + + + + + +# 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") | + 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: result: $splsrcver" >&5 +$as_echo "$splsrcver" >&6; } + + SPL=${splsrc} + SPL_OBJ=${splbuild} + SPL_VERSION=${splsrcver} + + -fi -fi + { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5 +$as_echo_n "checking spl file name for module symbols... " >&6; } + 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 for -Wframe-larger-than= support" >&5 -$as_echo_n "checking for -Wframe-larger-than= support... " >&6; } - saved_flags="$CFLAGS" - CFLAGS="$CFLAGS -Wframe-larger-than=1024" - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF + + + { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5 +$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + + #ifndef AUTOCONF_INCLUDED + #include + #endif + int -main () +main (void) { + #ifndef CONFIG_PREEMPT + #error CONFIG_PREEMPT not #defined + #endif + ; 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 + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { 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; } + { { $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: 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 - CFLAGS="$saved_flags" +fi + 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" + 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; } - 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]; - } + #ifndef AUTOCONF_INCLUDED + #include + #endif 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); + #ifndef CONFIG_DEBUG_LOCK_ALLOC + #error CONFIG_DEBUG_LOCK_ALLOC not #defined + #endif ; 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 + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) - - -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 - headersdir="/lib/modules/$(uname -r)/build" - if test -e "$headersdir"; then - 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:$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: - *** 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;} + *** 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; }; } - 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 -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu} - elif test -d ${kernelsrc}-obj/${target_cpu}/default; then - kernelbuild=${kernelsrc}-obj/${target_cpu}/default - elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then - kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu} - else - kernelbuild=${kernelsrc} - fi - fi - { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5 -$as_echo "$kernelbuild" >&6; } +else + $as_echo "$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 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 "$ZFS_META_LICENSE" = GPL; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GPL_ONLY_SYMBOLS 1 +_ACEOF - if test -z "$kernsrcver"; then - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5 -$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} - { (exit 1); exit 1; }; } - fi - else - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 -$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} - { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 -$as_echo "$kernsrcver" >&6; } - LINUX=${kernelsrc} - LINUX_OBJ=${kernelbuild} - LINUX_VERSION=${kernsrcver} + { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5 +$as_echo_n "checking block device operation prototypes... " >&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) +{ - 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 - else - LINUX_SYMBOLS=NONE - fi - { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 -$as_echo "$LINUX_SYMBOLS" >&6; } + 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 -# Check whether --with-spl was given. -if test "${with_spl+set}" = set; then - withval=$with_spl; splsrc="$withval" -fi + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: struct block_device" >&5 +$as_echo "struct block_device" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1 +_ACEOF -# Check whether --with-spl-obj was given. -if test "${with_spl_obj+set}" = set; then - withval=$with_spl_obj; splbuild="$withval" -fi +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: 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 - { $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 + rm -Rf build - { $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") | - cpp -I $splbuild | - grep "^splsrcver=" | cut -d \" -f 2` - fi + { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5 +$as_echo_n "checking whether kernel defines fmode_t... " >&6; } - if test -z "$splsrcver"; then - { $as_echo "$as_me:$LINENO: result: Not found" >&5 -$as_echo "Not found" >&6; } - { { $as_echo "$as_me:$LINENO: error: - *** Cannot determine the version of the spl source. - *** Please prepare the spl source before running this script" >&5 -$as_echo "$as_me: error: - *** Cannot determine the version of the spl source. - *** Please prepare the spl source before running this script" >&2;} - { (exit 1); exit 1; }; } - fi - { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5 -$as_echo "$splsrcver" >&6; } +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - SPL=${splsrc} - SPL_OBJ=${splbuild} - SPL_VERSION=${splsrcver} + #include +int +main (void) +{ + fmode_t *ptr __attribute__ ((unused)); + ; + return 0; +} +_ACEOF - { $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; } + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_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 - 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 kernel defines KOBJ_NAME_LEN" >&5 +$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15426,17 +16794,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #ifndef AUTOCONF_INCLUDED - #include - #endif + #include int main (void) { - #ifndef CONFIG_DEBUG_LOCK_ALLOC - #error CONFIG_DEBUG_LOCK_ALLOC not #defined - #endif + int val __attribute__ ((unused)); + val = KOBJ_NAME_LEN; ; return 0; @@ -15461,15 +16826,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_KOBJ_NAME_LEN 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 @@ -15480,26 +16841,95 @@ $as_echo "no" >&6; } - fi rm -Rf build + + { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5 +$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; } + grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + fi - if test "$ZFS_META_LICENSE" = GPL; then + + + { $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_GPL_ONLY_SYMBOLS 1 +#define HAVE_OPEN_BDEV_EXCLUSIVE 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPEN_BDEV_EXCLUSIVE 1 _ACEOF fi - { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5 -$as_echo_n "checking block device operation prototypes... " >&6; } + + { $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 @@ -15510,29 +16940,14 @@ 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, - }; - - blk_ops.open(NULL, 0); - blk_ops.release(NULL, 0); - blk_ops.ioctl(NULL, 0, 0, 0); - blk_ops.compat_ioctl(NULL, 0, 0, 0); + struct block_device *bdev = NULL; + invalidate_bdev(bdev); ; return 0; @@ -15555,11 +16970,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_1ARG_INVALIDATE_BDEV 1 _ACEOF @@ -15567,8 +16982,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; } @@ -15578,8 +16993,9 @@ 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 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 @@ -15590,13 +17006,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - fmode_t *ptr; + struct block_device *bdev = NULL; + bdev_logical_block_size(bdev); ; return 0; @@ -15623,7 +17040,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FMODE_T 1 +#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1 _ACEOF @@ -15643,8 +17060,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 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 @@ -15655,14 +17073,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int val; - val = KOBJ_NAME_LEN; + struct bio bio; + (void)bio_empty_barrier(&bio); ; return 0; @@ -15689,7 +17107,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KOBJ_NAME_LEN 1 +#define HAVE_BIO_EMPTY_BARRIER 1 _ACEOF @@ -15709,48 +17127,74 @@ fi - { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5 -$as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; } - grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in fs/block_dev.c; do - grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5 +$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPEN_BDEV_EXCLUSIVE 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) +{ + + int flags __attribute__ ((unused)); + flags = (1 << BIO_RW_FAILFAST); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - fi - 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_BIO_RW_FAILFAST 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 invalidate_bdev() wants 1 arg" >&5 -$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&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 @@ -15761,14 +17205,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct block_device *bdev; - invalidate_bdev(bdev); + int flags __attribute__ ((unused)); + flags = ((1 << BIO_RW_FAILFAST_DEV) | + (1 << BIO_RW_FAILFAST_TRANSPORT) | + (1 << BIO_RW_FAILFAST_DRIVER)); ; return 0; @@ -15795,7 +17241,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_1ARG_INVALIDATE_BDEV 1 +#define HAVE_BIO_RW_FAILFAST_DTD 1 _ACEOF @@ -15815,8 +17261,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; } + { $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 @@ -15827,14 +17273,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct block_device *bdev = NULL; - bdev_logical_block_size(bdev); + int flags __attribute__ ((unused)); + flags = REQ_FAILFAST_MASK; ; return 0; @@ -15861,7 +17307,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1 +#define HAVE_BIO_REQ_FAILFAST_MASK 1 _ACEOF @@ -15881,8 +17327,9 @@ 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; } + { $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" @@ -15900,8 +17347,10 @@ int main (void) { - struct bio bio; - (void)bio_empty_barrier(&bio); + 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; @@ -15928,7 +17377,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_EMPTY_BARRIER 1 +#define HAVE_2ARGS_BIO_END_IO_T 1 _ACEOF @@ -15946,10 +17395,11 @@ fi rm -Rf build + EXTRA_KCFLAGS="$tmp_flags" - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5 -$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNC is defined" >&5 +$as_echo_n "checking whether BIO_RW_SYNC is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -15966,8 +17416,8 @@ int main (void) { - int flags; - flags = (1 << BIO_RW_FAILFAST); + int flags __attribute__ ((unused)); + flags = BIO_RW_SYNC; ; return 0; @@ -15994,7 +17444,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_FAILFAST 1 +#define HAVE_BIO_RW_SYNC 1 _ACEOF @@ -16014,8 +17464,8 @@ fi - { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5 -$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5 +$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16032,10 +17482,8 @@ int main (void) { - int flags; - flags = ((1 << BIO_RW_FAILFAST_DEV) | - (1 << BIO_RW_FAILFAST_TRANSPORT) | - (1 << BIO_RW_FAILFAST_DRIVER)); + int flags __attribute__ ((unused)); + flags = BIO_RW_SYNCIO; ; return 0; @@ -16062,7 +17510,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_FAILFAST_DTD 1 +#define HAVE_BIO_RW_SYNCIO 1 _ACEOF @@ -16082,8 +17530,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 REQ_SYNC is defined" >&5 +$as_echo_n "checking whether REQ_SYNC is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16100,8 +17548,8 @@ int main (void) { - int flags; - flags = REQ_FAILFAST_MASK; + int flags __attribute__ ((unused)); + flags = REQ_SYNC; ; return 0; @@ -16128,7 +17576,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_REQ_FAILFAST_MASK 1 +#define HAVE_REQ_SYNC 1 _ACEOF @@ -16148,10 +17596,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 blk_end_request() is available" >&5 +$as_echo_n "checking whether blk_end_request() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16162,16 +17608,14 @@ 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; - - local_end_io = wanted_end_io; + struct request *req = NULL; + (void) blk_end_request(req, 0, 0); ; return 0; @@ -16198,7 +17642,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_2ARGS_BIO_END_IO_T 1 +#define HAVE_BLK_END_REQUEST 1 _ACEOF @@ -16216,11 +17660,9 @@ 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 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 @@ -16231,14 +17673,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + + MODULE_LICENSE("CDDL"); int main (void) { - int flags; - flags = BIO_RW_SYNC; + struct request *req = NULL; + (void) blk_end_request(req, 0, 0); ; return 0; @@ -16261,21 +17706,21 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_SYNC 1 +#define HAVE_BLK_END_REQUEST_GPL_ONLY 1 _ACEOF -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi @@ -16285,8 +17730,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 blk_fetch_request() is available" >&5 +$as_echo_n "checking whether blk_fetch_request() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16297,14 +17742,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags; - flags = BIO_RW_SYNCIO; + struct request_queue *q = NULL; + (void) blk_fetch_request(q); ; return 0; @@ -16331,7 +17776,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BIO_RW_SYNCIO 1 +#define HAVE_BLK_FETCH_REQUEST 1 _ACEOF @@ -16351,8 +17796,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 blk_requeue_request() is available" >&5 +$as_echo_n "checking whether blk_requeue_request() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16363,14 +17808,15 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - int flags; - flags = REQ_SYNC; + struct request_queue *q = NULL; + struct request *req = NULL; + blk_requeue_request(q, req); ; return 0; @@ -16397,7 +17843,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_REQ_SYNC 1 +#define HAVE_BLK_REQUEUE_REQUEST 1 _ACEOF @@ -16417,8 +17863,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; } + { $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 @@ -16436,7 +17882,7 @@ main (void) { struct request *req = NULL; - (void) blk_end_request(req, 0, 0); + (void) blk_rq_bytes(req); ; return 0; @@ -16463,7 +17909,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_END_REQUEST 1 +#define HAVE_BLK_RQ_BYTES 1 _ACEOF @@ -16482,8 +17928,8 @@ 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 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 @@ -16504,7 +17950,7 @@ main (void) { struct request *req = NULL; - (void) blk_end_request(req, 0, 0); + (void) blk_rq_bytes(req); ; return 0; @@ -16538,7 +17984,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_END_REQUEST_GPL_ONLY 1 +#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1 _ACEOF @@ -16551,8 +17997,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 blk_rq_pos() is available" >&5 +$as_echo_n "checking whether blk_rq_pos() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16569,8 +18015,8 @@ int main (void) { - struct request_queue *q = NULL; - (void) blk_fetch_request(q); + struct request *req = NULL; + (void) blk_rq_pos(req); ; return 0; @@ -16597,7 +18043,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_FETCH_REQUEST 1 +#define HAVE_BLK_RQ_POS 1 _ACEOF @@ -16617,8 +18063,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_rq_sectors() is available" >&5 +$as_echo_n "checking whether blk_rq_sectors() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16635,9 +18081,8 @@ int main (void) { - struct request_queue *q = NULL; struct request *req = NULL; - blk_requeue_request(q, req); + (void) blk_rq_sectors(req); ; return 0; @@ -16664,7 +18109,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_REQUEUE_REQUEST 1 +#define HAVE_BLK_RQ_SECTORS 1 _ACEOF @@ -16684,8 +18129,8 @@ fi - { $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 get_disk_ro() is available" >&5 +$as_echo_n "checking whether get_disk_ro() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16702,8 +18147,8 @@ int main (void) { - struct request *req = NULL; - (void) blk_rq_bytes(req); + struct gendisk *disk = NULL; + (void) get_disk_ro(disk); ; return 0; @@ -16730,7 +18175,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_BYTES 1 +#define HAVE_GET_DISK_RO 1 _ACEOF @@ -16749,8 +18194,9 @@ fi - { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is GPL-only" >&5 -$as_echo_n "checking whether blk_rq_bytes() is GPL-only... " >&6; } + + { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5 +$as_echo_n "checking whether rq_is_sync() is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16761,17 +18207,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); + (void) rq_is_sync(req); ; return 0; @@ -16794,21 +18237,89 @@ _ACEOF $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_RQ_IS_SYNC 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + + { $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; } + + +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_vec *bv; + struct req_iterator iter; + struct request *req = NULL; + rq_for_each_segment(bv, req, iter) { } + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1 +#define HAVE_RQ_FOR_EACH_SEGMENT 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 @@ -16817,9 +18328,8 @@ fi - - { $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 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 @@ -16830,14 +18340,26 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include + #include + + const struct xattr_handler xattr_test_handler = { + .prefix = "test", + .get = NULL, + .set = NULL, + }; + + const struct xattr_handler *xattr_handlers[] = { + &xattr_test_handler, + }; int main (void) { - struct request *req = NULL; - (void) blk_rq_pos(req); + struct super_block sb __attribute__ ((unused)); + + sb.s_xattr = xattr_handlers; ; return 0; @@ -16864,7 +18386,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_POS 1 +#define HAVE_CONST_XATTR_HANDLER 1 _ACEOF @@ -16884,8 +18406,8 @@ fi - { $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 xattr_handler->get() wants dentry" >&5 +$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -16896,14 +18418,17 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) blk_rq_sectors(req); + 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; @@ -16930,7 +18455,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BLK_RQ_SECTORS 1 +#define HAVE_DENTRY_XATTR_GET 1 _ACEOF @@ -16950,8 +18475,8 @@ 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; } + { $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 @@ -16962,14 +18487,18 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct gendisk *disk = NULL; - (void) get_disk_ro(disk); + 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; @@ -16996,7 +18525,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_DISK_RO 1 +#define HAVE_DENTRY_XATTR_SET 1 _ACEOF @@ -17016,8 +18545,8 @@ 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; } + { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants 2 args" >&5 +$as_echo_n "checking whether fops->fsync() wants 2 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17028,14 +18557,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct request *req = NULL; - (void) rq_is_sync(req); + int (*fsync) (struct file *, int datasync) = NULL; + struct file_operations fops __attribute__ ((unused)); + + fops.fsync = fsync; ; return 0; @@ -17062,7 +18593,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RQ_IS_SYNC 1 +#define HAVE_2ARGS_FSYNC 1 _ACEOF @@ -17082,8 +18613,8 @@ 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 sops->evict_inode() exists" >&5 +$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.c @@ -17094,16 +18625,16 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #include int main (void) { - struct bio_vec *bv; - struct req_iterator iter; - struct request *req = NULL; - rq_for_each_segment(bv, req, iter) { } + void (*evict_inode) (struct inode *) = NULL; + struct super_operations sops __attribute__ ((unused)); + + sops.evict_inode = evict_inode; ; return 0; @@ -17130,7 +18661,7 @@ _ACEOF $as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RQ_FOR_EACH_SEGMENT 1 +#define HAVE_EVICT_INODE 1 _ACEOF @@ -17150,112 +18681,306 @@ fi - if test "$LINUX_OBJ" != "$LINUX"; then - KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" + { $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; } + + 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 + 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 - KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL" - KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\"" + { $as_echo "$as_me:$LINENO: checking whether symbol d_obtain_alias is exported" >&5 +$as_echo_n "checking whether symbol d_obtain_alias is exported... " >&6; } + grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_OBTAIN_ALIAS 1 +_ACEOF + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_OBTAIN_ALIAS 1 +_ACEOF - { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5 -$as_echo_n "checking for target asm dir... " >&6; } - TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/` + fi - case $TARGET_ARCH in - i386|x86_64) - TARGET_ASM_DIR=asm-${TARGET_ARCH} - ;; - *) - TARGET_ASM_DIR=asm-generic - ;; - esac - { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5 -$as_echo "$TARGET_ASM_DIR" >&6; } + { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5 +$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; } + grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking for sa_init in -lshare" >&5 -$as_echo_n "checking for sa_init in -lshare... " >&6; } -if test "${ac_cv_lib_share_sa_init+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lshare $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHECK_DISK_SIZE_CHANGE 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHECK_DISK_SIZE_CHANGE 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether symbol truncate_setsize is exported" >&5 +$as_echo_n "checking whether symbol truncate_setsize is exported... " >&6; } + grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in mm/truncate.c; do + grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TRUNCATE_SETSIZE 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TRUNCATE_SETSIZE 1 +_ACEOF + + fi + + + + { $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. */ -/* 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 sa_init (); + + #include + int -main () +main (void) { -return sa_init (); + + security_inode_init_security(NULL,NULL,NULL,NULL,NULL,NULL); + ; return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - 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_share_sa_init=yes + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1 +_ACEOF + + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_share_sa_init=no -fi + { $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 symbol mount_nodev is exported" >&5 +$as_echo_n "checking whether symbol mount_nodev is exported... " >&6; } + grep -q -E '[[:space:]]mount_nodev[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/super.c; do + grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -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_share_sa_init" >&5 -$as_echo "$ac_cv_lib_share_sa_init" >&6; } -if test "x$ac_cv_lib_share_sa_init" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_MOUNT_NODEV 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBSHARE 1 +#define HAVE_MOUNT_NODEV 1 _ACEOF -fi + fi + + + + 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\\\"" + + + { $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 @@ -18314,6 +20039,268 @@ 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; } @@ -18568,7 +20555,7 @@ fi $as_echo "$enable_debug" >&6; } -ac_config_files="$ac_config_files Makefile etc/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/zpool_id/Makefile cmd/zpool_layout/Makefile cmd/ztest/Makefile cmd/zpios/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/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" +ac_config_files="$ac_config_files Makefile dracut/Makefile dracut/90zfs/Makefile etc/Makefile etc/udev/Makefile etc/udev/rules.d/Makefile etc/init.d/Makefile etc/zfs/Makefile man/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/sysevent/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/zpool_layout/Makefile cmd/zvol_id/Makefile cmd/zpool_id/Makefile cmd/sas_switch_id/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/zpool-layout/Makefile scripts/common.sh zfs.spec zfs-modules.spec zfs-script-config.sh" cat >confcache <<\_ACEOF @@ -19485,7 +21472,13 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "dracut/Makefile") CONFIG_FILES="$CONFIG_FILES dracut/Makefile" ;; + "dracut/90zfs/Makefile") CONFIG_FILES="$CONFIG_FILES dracut/90zfs/Makefile" ;; "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/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/man8/Makefile") CONFIG_FILES="$CONFIG_FILES man/man8/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; @@ -19513,10 +21506,13 @@ do "cmd/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zfs/Makefile" ;; "cmd/zinject/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zinject/Makefile" ;; "cmd/zpool/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool/Makefile" ;; - "cmd/zpool_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool_id/Makefile" ;; - "cmd/zpool_layout/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool_layout/Makefile" ;; "cmd/ztest/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/ztest/Makefile" ;; "cmd/zpios/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpios/Makefile" ;; + "cmd/mount_zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/mount_zfs/Makefile" ;; + "cmd/zpool_layout/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool_layout/Makefile" ;; + "cmd/zvol_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zvol_id/Makefile" ;; + "cmd/zpool_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool_id/Makefile" ;; + "cmd/sas_switch_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/sas_switch_id/Makefile" ;; "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" ;; @@ -19525,6 +21521,7 @@ do "module/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES module/zfs/Makefile" ;; "module/zpios/Makefile") CONFIG_FILES="$CONFIG_FILES module/zpios/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "include/linux/Makefile") CONFIG_FILES="$CONFIG_FILES include/linux/Makefile" ;; "include/sys/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;; "include/sys/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fs/Makefile" ;; "include/sys/fm/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fm/Makefile" ;;