X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=configure;h=aacbeffd20f78484736688a2208b0ee1c68bb900;hb=d30babc23b4f25be970ada2e63a50220a3672281;hp=cfdd721ed43049ae2ef97cb8b4bed2448273c6a2;hpb=4aa85f09e755fc827cd5ab6225f20c83cd42245d;p=debian%2Ftar diff --git a/configure b/configure index cfdd721e..aacbeffd 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GNU tar 1.28. +# Generated by GNU Autoconf 2.69 for GNU tar 1.29. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU tar' PACKAGE_TARNAME='tar' -PACKAGE_VERSION='1.28' -PACKAGE_STRING='GNU tar 1.28' +PACKAGE_VERSION='1.29' +PACKAGE_STRING='GNU tar 1.29' PACKAGE_BUGREPORT='bug-tar@gnu.org' PACKAGE_URL='http://www.gnu.org/software/tar/' @@ -661,10 +661,6 @@ DEFAULT_ARCHIVE DEFAULT_ARCHIVE_FORMAT RSH LIBOBJS -TAR_COND_GRANTPT_FALSE -TAR_COND_GRANTPT_TRUE -TAR_LIB_ATTR_FALSE -TAR_LIB_ATTR_TRUE TAR_COND_XATTR_H_FALSE TAR_COND_XATTR_H_TRUE GNULIB_TEST_WARN_CFLAGS @@ -690,6 +686,7 @@ LIBUNISTRING_UNITYPES_H HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H +UNISTD_H_DEFINES_STRUCT_TIMESPEC PTHREAD_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC @@ -746,8 +743,6 @@ GNULIB_SIGPROCMASK GNULIB_SIGNAL_H_SIGPIPE GNULIB_RAISE GNULIB_PTHREAD_SIGMASK -USE_ACL -LIB_ACL HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE GL_GENERATE_STDBOOL_H_TRUE @@ -762,6 +757,7 @@ HAVE_TIMEGM HAVE_STRPTIME HAVE_NANOSLEEP HAVE_DECL_LOCALTIME_R +GNULIB_TIME_RZ GNULIB_TIME_R GNULIB_TIMEGM GNULIB_STRPTIME @@ -852,6 +848,7 @@ GL_GENERATE_STDDEF_H_FALSE GL_GENERATE_STDDEF_H_TRUE STDDEF_H HAVE_WCHAR_T +HAVE_MAX_ALIGN_T REPLACE_NULL REPLACE_STRUCT_LCONV REPLACE_DUPLOCALE @@ -938,6 +935,7 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H NEXT_SYS_TIME_H REPLACE_STRUCT_TIMEVAL REPLACE_GETTIMEOFDAY +HAVE_TIMEZONE_T HAVE_SYS_TIME_H HAVE_STRUCT_TIMEVAL HAVE_GETTIMEOFDAY @@ -1065,6 +1063,7 @@ GL_GENERATE_FLOAT_H_TRUE FLOAT_H NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H +LIB_HAS_ACL NEXT_AS_FIRST_DIRECTIVE_FCNTL_H NEXT_FCNTL_H REPLACE_OPENAT @@ -1162,9 +1161,11 @@ REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R +REPLACE_SYMLINKAT REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR +REPLACE_READLINKAT REPLACE_READLINK REPLACE_READ REPLACE_PWRITE @@ -1283,6 +1284,7 @@ REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC REPLACE_RANDOM_R +REPLACE_QSORT_R REPLACE_PUTENV REPLACE_PTSNAME_R REPLACE_PTSNAME @@ -1334,6 +1336,7 @@ GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_RANDOM +GNULIB_QSORT_R GNULIB_PUTENV GNULIB_PTSNAME_R GNULIB_PTSNAME @@ -1456,6 +1459,8 @@ GL_GENERATE_ALLOCA_H_FALSE GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H ALLOCA +USE_ACL +LIB_ACL GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE ac_ct_AR @@ -2136,7 +2141,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU tar 1.28 to adapt to many kinds of systems. +\`configure' configures GNU tar 1.29 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2206,7 +2211,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU tar 1.28:";; + short | recursive ) echo "Configuration of GNU tar 1.29:";; esac cat <<\_ACEOF @@ -2356,7 +2361,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU tar configure 1.28 +GNU tar configure 1.29 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3065,7 +3070,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU tar $as_me 1.28, which was +It was created by GNU tar $as_me 1.29, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3362,6 +3367,7 @@ as_fn_append ac_header_list " sys/tprintf.h" as_fn_append ac_header_list " sys/tape.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " locale.h" +as_fn_append ac_func_list " fchmod" as_fn_append ac_func_list " flockfile" as_fn_append ac_func_list " funlockfile" as_fn_append ac_header_list " features.h" @@ -3425,10 +3431,7 @@ as_fn_append ac_func_list " mkfifoat" as_fn_append ac_func_list " mknodat" as_fn_append ac_func_list " mknod" as_fn_append ac_func_list " nl_langinfo" -as_fn_append ac_func_list " posix_openpt" as_fn_append ac_header_list " priv.h" -as_fn_append ac_func_list " ptsname_r" -as_fn_append ac_func_list " fchmod" as_fn_append ac_header_list " malloc.h" as_fn_append ac_func_list " renameat" as_fn_append ac_func_list " secure_getenv" @@ -3445,6 +3448,7 @@ as_fn_append ac_func_list " strtoumax" as_fn_append ac_func_list " symlinkat" as_fn_append ac_header_list " sysexits.h" as_fn_append ac_func_list " localtime_r" +as_fn_append ac_func_list " timegm" as_fn_append ac_func_list " pipe" as_fn_append ac_func_list " unlinkat" as_fn_append ac_header_list " utime.h" @@ -3461,7 +3465,6 @@ as_fn_append ac_header_list " pwd.h" as_fn_append ac_header_list " grp.h" as_fn_append ac_func_list " setlocale" as_fn_append ac_func_list " fsync" -as_fn_append ac_func_list " grantpt" gt_needs="$gt_needs need-formatstring-macros" # Check that the precious variables saved in the cache have kept the same # value. @@ -4050,7 +4053,7 @@ fi # Define the identity of the package. PACKAGE='tar' - VERSION='1.28' + VERSION='1.29' cat >>confdefs.h <<_ACEOF @@ -6164,12 +6167,12 @@ else fi if test -z "$ARFLAGS"; then - ARFLAGS='cru' + ARFLAGS='cr' fi fi else if test -z "$ARFLAGS"; then - ARFLAGS='cru' + ARFLAGS='cr' fi fi @@ -6465,6 +6468,8 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h @@ -6798,15 +6803,19 @@ fi # Code from module absolute-header: - # Code from module acl: + # Code from module acl-permissions: + # Code from module alignof: # Code from module alloca: # Code from module alloca-opt: # Code from module allocator: # Code from module areadlink: + # Code from module areadlink-with-size: # Code from module areadlinkat: + # Code from module areadlinkat-with-size: # Code from module argmatch: # Code from module argp: # Code from module argp-version-etc: + # Code from module assure: # Code from module at-internal: # Code from module backupfile: # Code from module bitrotate: @@ -6854,9 +6863,11 @@ fi # Code from module fd-hook: # Code from module fdopendir: # Code from module fdutimensat: + # Code from module file-has-acl: # Code from module fileblocks: # Code from module filename: # Code from module filenamecat-lgpl: + # Code from module flexmember: # Code from module float: # Code from module fnmatch: # Code from module fnmatch-gnu: @@ -6892,7 +6903,6 @@ fi # Code from module inttostr: # Code from module inttypes: # Code from module inttypes-incomplete: - # Code from module isatty: # Code from module iswblank: # Code from module langinfo: # Code from module largefile: @@ -6927,6 +6937,7 @@ fi # Code from module mkfifoat: # Code from module mknod: # Code from module mktime: + # Code from module mktime-internal: # Code from module modechange: # Code from module msvc-inval: # Code from module msvc-nothrow: @@ -6941,12 +6952,8 @@ fi # Code from module opendir: # Code from module parse-datetime: # Code from module pathmax: - # Code from module posix_openpt: # Code from module priv-set: # Code from module progname: - # Code from module ptsname: - # Code from module ptsname_r: - # Code from module qacl: # Code from module quote: # Code from module quotearg: # Code from module quotearg-simple: @@ -7025,8 +7032,10 @@ fi # Code from module tempname: # Code from module time: # Code from module time_r: + # Code from module time_rz: + # Code from module timegm: # Code from module timespec: - # Code from module ttyname_r: + # Code from module timespec-sub: # Code from module unistd: # Code from module unistd-safer: # Code from module unitypes: @@ -7036,7 +7045,6 @@ fi # Code from module unlinkat: # Code from module unlinkdir: # Code from module unlocked-io: - # Code from module unlockpt: # Code from module unsetenv: # Code from module utimens: # Code from module utimensat: @@ -7809,6 +7817,33 @@ $as_echo "#define ssize_t int" >>confdefs.h LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ + + gl_need_lib_has_acl= + # Check whether --enable-acl was given. +if test "${enable_acl+set}" = set; then : + enableval=$enable_acl; +else + enable_acl=auto +fi + + + + + + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : @@ -8020,17 +8055,19 @@ else for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + int main () { int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + ; return 0; } @@ -8202,21 +8239,6 @@ _ACEOF - for ac_func in $ac_func_list -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - @@ -8757,6 +8779,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } GNULIB_PTSNAME=0; GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; + GNULIB_QSORT_R=0; GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; @@ -8808,6 +8831,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } REPLACE_PTSNAME=0; REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; + REPLACE_QSORT_R=0; REPLACE_RANDOM_R=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; @@ -9178,9 +9202,11 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h REPLACE_PWRITE=0; REPLACE_READ=0; REPLACE_READLINK=0; + REPLACE_READLINKAT=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; + REPLACE_SYMLINKAT=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; @@ -11035,14 +11061,15 @@ if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then : else rm -f conftest.sym conftest.file echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; - esac + *-gnu*) + # Guess yes on glibc systems. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + *) + # If we don't know, assume the worst. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11052,10 +11079,12 @@ int main () { struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; + if (symlink ("conftest.file", "conftest.sym") != 0) + return 1; + /* Linux will dereference the symlink and fail, as required by + POSIX. That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; @@ -11070,11 +11099,6 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" - fi rm -f conftest.sym conftest.file fi @@ -11224,6 +11248,17 @@ _ACEOF +ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" +if test "x$ac_cv_have_decl_getdtablesize" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETDTABLESIZE $ac_have_decl +_ACEOF + ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" if test "x$ac_cv_have_decl_getline" = xyes; then : ac_have_decl=1 @@ -11876,6 +11911,7 @@ _ACEOF HAVE_GETTIMEOFDAY=1; HAVE_STRUCT_TIMEVAL=1; HAVE_SYS_TIME_H=1; + HAVE_TIMEZONE_T=0; REPLACE_GETTIMEOFDAY=0; REPLACE_STRUCT_TIMEVAL=0; @@ -12125,48 +12161,29 @@ $as_echo_n "checking for unsigned long long int... " >&6; } if ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); +unsigned long long int ull = 18446744073709551615ULL; + typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +unsigned long long int ullmax = 18446744073709551615ull; + return (ull << 63 | ull >> 63 | ull << i | ull >> i + | ullmax / ull | ullmax % ull); ; return 0; } - _ACEOF if ac_fn_c_try_link "$LINENO"; then : - + ac_cv_type_unsigned_long_long_int=yes else ac_cv_type_unsigned_long_long_int=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } @@ -13714,6 +13731,7 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; } REPLACE_NULL=0; + HAVE_MAX_ALIGN_T=1; HAVE_WCHAR_T=1; @@ -13753,6 +13771,15 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h STDDEF_H= + ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include + +" +if test "x$ac_cv_type_max_align_t" = xyes; then : + +else + HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h +fi + if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -14646,6 +14673,7 @@ _ACEOF GNULIB_STRPTIME=0; GNULIB_TIMEGM=0; GNULIB_TIME_R=0; + GNULIB_TIME_RZ=0; HAVE_DECL_LOCALTIME_R=1; HAVE_NANOSLEEP=1; HAVE_STRPTIME=1; @@ -14906,12 +14934,6 @@ fi - - - - - - GNULIB_PTHREAD_SIGMASK=0; GNULIB_RAISE=0; GNULIB_SIGNAL_H_SIGPIPE=0; @@ -15120,7 +15142,7 @@ else # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; + freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; @@ -15621,6 +15643,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else @@ -15681,6 +15704,36 @@ fi $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_unistd_h=yes +else + gl_cv_sys_struct_timespec_in_unistd_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then + UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 + fi fi fi fi @@ -15699,6 +15752,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else @@ -15766,16 +15820,7 @@ $as_echo "$gl_cv_next_time_h" >&6; } -ac_fn_c_check_decl "$LINENO" "ttyname_r" "ac_cv_have_decl_ttyname_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_ttyname_r" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TTYNAME_R $ac_have_decl -_ACEOF @@ -16568,189 +16613,631 @@ fi gl_source_base='gnu' - if test $ac_cv_func_alloca_works = no; then - : - fi - - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 -$as_echo_n "checking for alloca as a compiler built-in... " >&6; } -if ${gl_cv_rpl_alloca+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca -#endif + LIB_ACL= + use_acl=0 + if test "$enable_acl" != no; then + for ac_header in sys/acl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_acl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_ACL_H 1 _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Need own alloca" >/dev/null 2>&1; then : - gl_cv_rpl_alloca=yes -else - gl_cv_rpl_alloca=no + fi -rm -f conftest* +done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 -$as_echo "$gl_cv_rpl_alloca" >&6; } - if test $gl_cv_rpl_alloca = yes; then + if test $ac_cv_header_sys_acl_h = yes; then + ac_save_LIBS=$LIBS -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + if test $use_acl = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5 +$as_echo_n "checking for library containing acl_get_file... " >&6; } +if ${ac_cv_search_acl_get_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ALLOCA_H=alloca.h - else - ALLOCA_H= - fi +/* 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 acl_get_file (); +int +main () +{ +return acl_get_file (); + ; + return 0; +} +_ACEOF +for ac_lib in '' acl pacl; do + if test -z "$ac_lib"; then + ac_res="none required" else - ALLOCA_H=alloca.h + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_acl_get_file=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_acl_get_file+:} false; then : + break +fi +done +if ${ac_cv_search_acl_get_file+:} false; then : - if test -n "$ALLOCA_H"; then - GL_GENERATE_ALLOCA_H_TRUE= - GL_GENERATE_ALLOCA_H_FALSE='#' else - GL_GENERATE_ALLOCA_H_TRUE='#' - GL_GENERATE_ALLOCA_H_FALSE= + ac_cv_search_acl_get_file=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5 +$as_echo "$ac_cv_search_acl_get_file" >&6; } +ac_res=$ac_cv_search_acl_get_file +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + if test "$ac_cv_search_acl_get_file" != "none required"; then + LIB_ACL=$ac_cv_search_acl_get_file + fi + for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \ + acl_free acl_from_mode acl_from_text \ + acl_delete_def_file acl_extended_file \ + acl_delete_fd_np acl_delete_file_np \ + acl_copy_ext_native acl_create_entry_np \ + acl_to_short_text acl_free_text +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done + # If the acl_get_file bug is detected, don't enable the ACL support. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5 +$as_echo_n "checking for working acl_get_file... " >&6; } +if ${gl_cv_func_working_acl_get_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_func_working_acl_get_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include -cat >>confdefs.h <<_ACEOF -#define GNULIB_AREADLINKAT 1 -_ACEOF +int +main () +{ +if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT) + return 1; + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if test $cross_compiling = yes; then + gl_cv_func_working_acl_get_file="guessing yes" + elif ./conftest$ac_exeext; then + gl_cv_func_working_acl_get_file=yes + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5 +$as_echo "$gl_cv_func_working_acl_get_file" >&6; } + if test "$gl_cv_func_working_acl_get_file" != no; then : + use_acl=1 +fi + if test $use_acl = 1; then + for ac_header in acl/libacl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default" +if test "x$ac_cv_header_acl_libacl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACL_LIBACL_H 1 +_ACEOF +fi +done - ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include -" -if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : -else -$as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h -fi - ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include -" -if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl + for ac_func in acl_entries +do : + ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries" +if test "x$ac_cv_func_acl_entries" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACL_ENTRIES 1 _ACEOF -if test $ac_have_decl = 1; then : else -$as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi +done - # Check if program_invocation_name and program_invocation_short_name - # are defined elsewhere. It is improbable that only one of them will - # be defined and other not, I prefer to stay on the safe side and to - # test each one separately. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5 -$as_echo_n "checking whether program_invocation_name is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5 +$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; } +if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +#include +int type = ACL_FIRST_ENTRY; int main () { -program_invocation_name = "test"; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_acl_ACL_FIRST_ENTRY=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + gl_cv_acl_ACL_FIRST_ENTRY=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5 +$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; } + if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5 -$as_echo_n "checking whether program_invocation_short_name is defined... " >&6; } +$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5 +$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; } +if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +#include +int type = ACL_TYPE_EXTENDED; int main () { -program_invocation_short_name = "test"; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_acl_ACL_TYPE_EXTENDED=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + gl_cv_acl_ACL_TYPE_EXTENDED=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5 +$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; } + if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then +$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h + fi + else + LIB_ACL= + fi +fi + fi + if test $use_acl = 0; then + for ac_func in facl +do : + ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl" +if test "x$ac_cv_func_facl" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FACL 1 +_ACEOF +fi +done + if test $ac_cv_func_facl = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5 +$as_echo_n "checking for library containing acl_trivial... " >&6; } +if ${ac_cv_search_acl_trivial+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 acl_trivial (); +int +main () +{ +return acl_trivial (); + ; + return 0; +} +_ACEOF +for ac_lib in '' sec; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_acl_trivial=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_acl_trivial+:} false; then : + break +fi +done +if ${ac_cv_search_acl_trivial+:} false; then : +else + ac_cv_search_acl_trivial=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5 +$as_echo "$ac_cv_search_acl_trivial" >&6; } +ac_res=$ac_cv_search_acl_trivial +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + if test "$ac_cv_search_acl_trivial" != "none required"; then + LIB_ACL=$ac_cv_search_acl_trivial + fi +fi + for ac_func in acl_trivial +do : + ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial" +if test "x$ac_cv_func_acl_trivial" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACL_TRIVIAL 1 +_ACEOF +fi +done + use_acl=1 + fi + fi + if test $use_acl = 0; then + for ac_func in getacl +do : + ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl" +if test "x$ac_cv_func_getacl" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETACL 1 +_ACEOF +fi +done + if test $ac_cv_func_getacl = yes; then + use_acl=1 + fi + for ac_header in aclv.h +do : + ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include +" +if test "x$ac_cv_header_aclv_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACLV_H 1 +_ACEOF - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format" +fi +done + fi - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format" + if test $use_acl = 0; then + for ac_func in aclx_get +do : + ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get" +if test "x$ac_cv_func_aclx_get" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACLX_GET 1 +_ACEOF + +fi +done + + if test $ac_cv_func_aclx_get = yes; then + use_acl=1 + fi + fi + + if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then + for ac_func in statacl +do : + ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl" +if test "x$ac_cv_func_statacl" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STATACL 1 +_ACEOF + +fi +done + + if test $ac_cv_func_statacl = yes; then + use_acl=1 + fi + fi + + if test $use_acl = 0; then + for ac_func in aclsort +do : + ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort" +if test "x$ac_cv_func_aclsort" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACLSORT 1 +_ACEOF + +fi +done + + if test $ac_cv_func_aclsort = yes; then + use_acl=1 + fi + fi + + LIBS=$ac_save_LIBS + fi + + if test "$enable_acl$use_acl" = yes0; then + as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5 + elif test "$enable_acl$use_acl" = auto0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5 +$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5 +$as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;} + fi + fi + test $gl_need_lib_has_acl && LIB_HAS_ACL=$LIB_ACL + + +cat >>confdefs.h <<_ACEOF +#define USE_ACL $use_acl +_ACEOF + + USE_ACL=$use_acl + + + + + if test $ac_cv_func_alloca_works = no; then + : + fi + + # Define an additional variable used in the Makefile substitution. + if test $ac_cv_working_alloca_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 +$as_echo_n "checking for alloca as a compiler built-in... " >&6; } +if ${gl_cv_rpl_alloca+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined __GNUC__ || defined _AIX || defined _MSC_VER + Need own alloca +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Need own alloca" >/dev/null 2>&1; then : + gl_cv_rpl_alloca=yes +else + gl_cv_rpl_alloca=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 +$as_echo "$gl_cv_rpl_alloca" >&6; } + if test $gl_cv_rpl_alloca = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + + ALLOCA_H=alloca.h + else + ALLOCA_H= + fi + else + ALLOCA_H=alloca.h + fi + + if test -n "$ALLOCA_H"; then + GL_GENERATE_ALLOCA_H_TRUE= + GL_GENERATE_ALLOCA_H_FALSE='#' +else + GL_GENERATE_ALLOCA_H_TRUE='#' + GL_GENERATE_ALLOCA_H_FALSE= +fi + + + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_AREADLINKAT 1 +_ACEOF + + + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_AREADLINKAT_WITH_SIZE 1 +_ACEOF + + + + + + + + ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include +" +if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + +$as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h + +fi + + ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include +" +if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + +$as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h + +fi + + + # Check if program_invocation_name and program_invocation_short_name + # are defined elsewhere. It is improbable that only one of them will + # be defined and other not, I prefer to stay on the safe side and to + # test each one separately. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5 +$as_echo_n "checking whether program_invocation_name is defined... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +program_invocation_name = "test"; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +$as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5 +$as_echo_n "checking whether program_invocation_short_name is defined... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +program_invocation_short_name = "test"; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +$as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + + + + + + + + + + + + + + + + + + XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format" + + + + XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format" @@ -17856,49 +18343,66 @@ else gl_cv_func_dup2_works="guessing no" ;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 gl_cv_func_dup2_works="guessing no" ;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. - gl_cv_func_dup2_works="guessing no" ;; - freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. + aix* | freebsd*) + # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, + # not EBADF. gl_cv_func_dup2_works="guessing no" ;; haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. gl_cv_func_dup2_works="guessing no" ;; + *-android*) # implemented using dup3(), which fails if oldfd == newfd + gl_cv_func_dup2_works="guessing no" ;; *) gl_cv_func_dup2_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include -#include -#include + #include + #include + #include + #include + #include + #ifndef RLIM_SAVED_CUR + # define RLIM_SAVED_CUR RLIM_INFINITY + #endif + #ifndef RLIM_SAVED_MAX + # define RLIM_SAVED_MAX RLIM_INFINITY + #endif + int main () { int result = 0; -#ifdef FD_CLOEXEC - if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) - result |= 1; -#endif - if (dup2 (1, 1) == 0) - result |= 2; -#ifdef FD_CLOEXEC - if (fcntl (1, F_GETFD) != FD_CLOEXEC) - result |= 4; -#endif - close (0); - if (dup2 (0, 0) != -1) - result |= 8; - /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (2, 1000000) == -1 && errno != EBADF) - result |= 16; - /* Flush out some cygwin core dumps. */ - if (dup2 (2, -1) != -1 || errno != EBADF) - result |= 32; - dup2 (2, 255); - dup2 (2, 256); - return result; - + int bad_fd = INT_MAX; + struct rlimit rlim; + if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 + && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX + && rlim.rlim_cur != RLIM_INFINITY + && rlim.rlim_cur != RLIM_SAVED_MAX + && rlim.rlim_cur != RLIM_SAVED_CUR) + bad_fd = rlim.rlim_cur; + #ifdef FD_CLOEXEC + if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) + result |= 1; + #endif + if (dup2 (1, 1) != 1) + result |= 2; + #ifdef FD_CLOEXEC + if (fcntl (1, F_GETFD) != FD_CLOEXEC) + result |= 4; + #endif + close (0); + if (dup2 (0, 0) != -1) + result |= 8; + /* Many gnulib modules require POSIX conformance of EBADF. */ + if (dup2 (2, bad_fd) == -1 && errno != EBADF) + result |= 16; + /* Flush out some cygwin core dumps. */ + if (dup2 (2, -1) != -1 || errno != EBADF) + result |= 32; + dup2 (2, 255); + dup2 (2, 256); + return result; ; return 0; } @@ -18662,26 +19166,43 @@ if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - # Guess that it works on glibc systems - case $host_os in #(( - *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; - *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; + case $host_os in + aix* | cygwin* | haiku*) + gl_cv_func_fcntl_f_dupfd_works="guessing no" ;; + *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include #include + #include + #include + #include + #include + #ifndef RLIM_SAVED_CUR + # define RLIM_SAVED_CUR RLIM_INFINITY + #endif + #ifndef RLIM_SAVED_MAX + # define RLIM_SAVED_MAX RLIM_INFINITY + #endif int main () { int result = 0; - if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; - if (errno != EINVAL) result |= 2; - return result; - + int bad_fd = INT_MAX; + struct rlimit rlim; + if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 + && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX + && rlim.rlim_cur != RLIM_INFINITY + && rlim.rlim_cur != RLIM_SAVED_MAX + && rlim.rlim_cur != RLIM_SAVED_CUR) + bad_fd = rlim.rlim_cur; + if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; + if (errno != EINVAL) result |= 2; + if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; + if (errno != EINVAL) result |= 8; + return result; ; return 0; } @@ -19078,6 +19599,52 @@ _ACEOF + if test "$enable_acl" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getxattr with XATTR_NAME_POSIX_ACL macros" >&5 +$as_echo_n "checking for getxattr with XATTR_NAME_POSIX_ACL macros... " >&6; } +if ${gl_cv_getxattr_with_posix_acls+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_getxattr_with_posix_acls=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + +int +main () +{ +ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0); + ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0); + return a < 0 || b < 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_getxattr_with_posix_acls=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_getxattr_with_posix_acls" >&5 +$as_echo "$gl_cv_getxattr_with_posix_acls" >&6; } + fi + if test "$gl_cv_getxattr_with_posix_acls" = yes; then + LIB_HAS_ACL= + +$as_echo "#define GETXATTR_WITH_POSIX_ACLS 1" >>confdefs.h + + else + gl_need_lib_has_acl=1 + LIB_HAS_ACL=$LIB_ACL + fi + + + + ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : @@ -19115,6 +19682,48 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 +$as_echo_n "checking for flexible array member... " >&6; } +if ${ac_cv_c_flexmember+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + struct s { int n; double d[]; }; +int +main () +{ +int m = getchar (); + struct s *p = malloc (offsetof (struct s, d) + + m * sizeof (double)); + p->d[0] = 0.0; + return p->d != (double *) NULL; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_flexmember=yes +else + ac_cv_c_flexmember=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 +$as_echo "$ac_cv_c_flexmember" >&6; } + if test $ac_cv_c_flexmember = yes; then + +$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h + + else + $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h + + fi + + FLOAT_H= @@ -20227,6 +20836,8 @@ main () if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) { + struct stat sb; + c = getcwd (buf, PATH_MAX); if (!c && errno == ENOENT) { @@ -20243,6 +20854,16 @@ main () fail = 21; break; } + + /* Our replacement needs to be able to stat() long ../../paths, + so generate a path larger than PATH_MAX to check, + avoiding the replacement if we can't stat(). */ + c = getcwd (buf, cwd_len + 1); + if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno)) + { + fail = 32; + break; + } } if (dotdot_max <= cwd_len - initial_cwd_len) @@ -20302,6 +20923,7 @@ else case $? in 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; *) gl_cv_func_getcwd_path_max=no;; esac fi @@ -20500,12 +21122,17 @@ $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h + ;; + "yes, but with shorter paths") + +$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h + ;; esac if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ || test $gl_cv_func_getcwd_posix_signature != yes \ - || test "$gl_cv_func_getcwd_path_max" != yes \ + || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \ || test $gl_abort_bug = yes; then REPLACE_GETCWD=1 fi @@ -20739,7 +21366,9 @@ $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h - if test $ac_cv_func_getdtablesize = yes; then + + if test $ac_cv_func_getdtablesize = yes && + test $ac_cv_have_decl_getdtablesize = yes; then # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit # up to an unchangeable hard limit; all other platforms correctly # require setrlimit before getdtablesize() can report a larger value. @@ -21841,40 +22470,6 @@ $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } - case $host_os in - mingw*) REPLACE_ISATTY=1 ;; - esac - - if test $REPLACE_ISATTY = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS isatty.$ac_objext" - - : - fi - - - - - - GNULIB_ISATTY=1 - - - - - -$as_echo "#define GNULIB_TEST_ISATTY 1" >>confdefs.h - - - - - @@ -22494,49 +23089,60 @@ _ACEOF if test $ac_cv_func_linkat = no; then HAVE_LINKAT=0 else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5 -$as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; } -if ${gl_cv_func_linkat_follow+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat() can link symlinks" >&5 +$as_echo_n "checking whether linkat() can link symlinks... " >&6; } +if ${gl_cv_func_linkat_nofollow+:} false; then : $as_echo_n "(cached) " >&6 else - rm -rf conftest.f1 conftest.f2 - touch conftest.f1 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + rm -rf conftest.l1 conftest.l2 + ln -s target conftest.l1 + if test "$cross_compiling" = yes; then : + case "$host_os" in + darwin*) gl_cv_func_linkat_nofollow="guessing no" ;; + *) gl_cv_func_linkat_nofollow="guessing yes" ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include -#include -#ifdef __linux__ -/* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW - until 2.6.18. Always replace linkat to support older kernels. */ -choke me -#endif + #include int main () { -return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2", - AT_SYMLINK_FOLLOW); +return linkat (AT_FDCWD, "conftest.l1", AT_FDCWD, + "conftest.l2", 0); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_linkat_follow=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_linkat_nofollow=yes else - gl_cv_func_linkat_follow="need runtime check" + gl_cv_func_linkat_nofollow=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - rm -rf conftest.f1 conftest.f2 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + rm -rf conftest.l1 conftest.l2 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_follow" >&5 -$as_echo "$gl_cv_func_linkat_follow" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_nofollow" >&5 +$as_echo "$gl_cv_func_linkat_nofollow" >&6; } + + case $gl_cv_func_linkat_nofollow in + *no) LINKAT_SYMLINK_NOTSUP=1 ;; + *yes) LINKAT_SYMLINK_NOTSUP=0 ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5 $as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; } if ${gl_cv_func_linkat_slash+:} false; then : $as_echo_n "(cached) " >&6 else - rm -rf conftest.a conftest.b conftest.c conftest.d + rm -rf conftest.a conftest.b conftest.c conftest.d conftest.e conftest.s if test "$cross_compiling" = yes; then : # Guess yes on glibc systems, no otherwise. case "$host_os" in @@ -22578,6 +23184,16 @@ int result; if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/", AT_SYMLINK_FOLLOW) == 0) result |= 8; + + /* On OS X 10.10 a trailing "/" will cause the second path to be + dereferenced, and thus will succeed on a dangling symlink. */ + if (symlink ("conftest.e", "conftest.s") == 0) + { + if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.s/", + AT_SYMLINK_FOLLOW) == 0) + result |= 16; + } + return result; ; @@ -22593,7 +23209,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -rf conftest.a conftest.b conftest.c conftest.d + rm -rf conftest.a conftest.b conftest.c conftest.d conftest.e conftest.s fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5 $as_echo "$gl_cv_func_linkat_slash" >&6; } @@ -22601,7 +23217,13 @@ $as_echo "$gl_cv_func_linkat_slash" >&6; } *yes) gl_linkat_slash_bug=0 ;; *) gl_linkat_slash_bug=1 ;; esac - if test "$gl_cv_func_linkat_follow" != yes \ + + case "$gl_cv_func_linkat_nofollow" in + *yes) linkat_nofollow=yes ;; + *) linkat_nofollow=no ;; + esac + + if test "$linkat_nofollow" != yes \ || test $gl_linkat_slash_bug = 1; then REPLACE_LINKAT=1 @@ -22609,6 +23231,11 @@ cat >>confdefs.h <<_ACEOF #define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug _ACEOF + +cat >>confdefs.h <<_ACEOF +#define LINKAT_SYMLINK_NOTSUP $LINKAT_SYMLINK_NOTSUP +_ACEOF + fi fi @@ -22623,8 +23250,6 @@ _ACEOF gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext" - fi - if test $HAVE_LINKAT = 0; then @@ -23766,6 +24391,49 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 +$as_echo_n "checking whether mbrtowc works on empty input... " >&6; } +if ${gl_cv_func_mbrtowc_empty_input+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on AIX and glibc systems. + aix* | *-gnu*) + gl_cv_func_mbrtowc_empty_input="guessing no" ;; + *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + esac + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + static wchar_t wc; + static mbstate_t mbs; + int + main (void) + { + return mbrtowc (&wc, "", 0, &mbs) == (size_t) -2; + } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_empty_input=no +else + gl_cv_func_mbrtowc_empty_input=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5 +$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } + case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) @@ -23795,6 +24463,14 @@ $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h *) $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_empty_input" in + *yes) ;; + *) +$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h + REPLACE_MBRTOWC=1 ;; esac @@ -25336,6 +26012,35 @@ $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h + + if test $REPLACE_MKTIME = 0; then + ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal" +if test "x$ac_cv_func___mktime_internal" = xyes; then : + +$as_echo "#define mktime_internal __mktime_internal" >>confdefs.h + + +else + REPLACE_MKTIME=1 + +fi + + fi + + if test $REPLACE_MKTIME = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" + + : + fi + : @@ -25486,23 +26191,26 @@ $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5 -$as_echo_n "checking for obstacks... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5 +$as_echo_n "checking for obstacks that work with any size object... " >&6; } if ${ac_cv_func_obstack+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - #include "obstack.h" +#include "obstack.h" + void *obstack_chunk_alloc (size_t n) { return 0; } + void obstack_chunk_free (void *p) { } + /* Check that an internal function returns size_t, not int. */ + size_t _obstack_memory_used (struct obstack *); + int main () { struct obstack mem; - #define obstack_chunk_alloc malloc - #define obstack_chunk_free free - obstack_init (&mem); - obstack_free (&mem, 0); + obstack_init (&mem); + obstack_free (&mem, 0); + ; return 0; } @@ -25517,11 +26225,11 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5 $as_echo "$ac_cv_func_obstack" >&6; } -if test $ac_cv_func_obstack = yes; then + if test "$ac_cv_func_obstack" = yes; then $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h -else + else @@ -25532,7 +26240,7 @@ else gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" -fi + fi @@ -25868,43 +26576,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - - - if test $ac_cv_func_posix_openpt != yes; then - HAVE_POSIX_OPENPT=0 - fi - - if test $HAVE_POSIX_OPENPT = 0; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS posix_openpt.$ac_objext" - - fi - - - - - - GNULIB_POSIX_OPENPT=1 - - - - - -$as_echo "#define GNULIB_TEST_POSIX_OPENPT 1" >>confdefs.h - - - - for ac_func in getppriv do : ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv" @@ -25943,677 +26614,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF - - - - - for ac_func in ptsname -do : - ac_fn_c_check_func "$LINENO" "ptsname" "ac_cv_func_ptsname" -if test "x$ac_cv_func_ptsname" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTSNAME 1 -_ACEOF - -fi -done - - if test $ac_cv_func_ptsname = no; then - HAVE_PTSNAME=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ptsname sets errno on failure" >&5 -$as_echo_n "checking whether ptsname sets errno on failure... " >&6; } -if ${gl_cv_func_ptsname_sets_errno+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_ptsname_sets_errno="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_ptsname_sets_errno="guessing no" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ - - return ptsname (-1) || !errno; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_ptsname_sets_errno=yes -else - gl_cv_func_ptsname_sets_errno=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ptsname_sets_errno" >&5 -$as_echo "$gl_cv_func_ptsname_sets_errno" >&6; } - case $gl_cv_func_ptsname_sets_errno in - *no) REPLACE_PTSNAME=1 ;; - esac - fi - - if test $HAVE_PTSNAME = 0 || test $REPLACE_PTSNAME = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS ptsname.$ac_objext" - - - : - - fi - - - - - - GNULIB_PTSNAME=1 - - - - - -$as_echo "#define GNULIB_TEST_PTSNAME 1" >>confdefs.h - - - - - - - - - - if test $ac_cv_func_ptsname_r = no; then - HAVE_PTSNAME_R=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ptsname_r has the same signature as in glibc" >&5 -$as_echo_n "checking whether ptsname_r has the same signature as in glibc... " >&6; } -if ${gl_cv_func_ptsname_r_signature_ok+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - /* Test whether ptsname_r is declared at all. */ - int (*f) (int, char *, size_t) = ptsname_r; - /* Test whether it has the same declaration as in glibc. */ - #undef ptsname_r - extern - #ifdef __cplusplus - "C" - #endif - int ptsname_r (int, char *, size_t); - -int -main () -{ -return f (0, NULL, 0); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_ptsname_r_signature_ok=yes -else - gl_cv_func_ptsname_r_signature_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ptsname_r_signature_ok" >&5 -$as_echo "$gl_cv_func_ptsname_r_signature_ok" >&6; } - if test $gl_cv_func_ptsname_r_signature_ok = no; then - REPLACE_PTSNAME_R=1 - fi - fi - - if test $HAVE_PTSNAME_R = 0 || test $REPLACE_PTSNAME_R = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS ptsname_r.$ac_objext" - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isatty sets errno when it fails" >&5 -$as_echo_n "checking whether isatty sets errno when it fails... " >&6; } -if ${gl_cv_func_isatty_sets_errno+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - irix* | solaris* | mingw*) - gl_cv_func_isatty_sets_errno="guessing no";; - *) - gl_cv_func_isatty_sets_errno="guessing yes";; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - # include - #else - # include - #endif - -int -main () -{ -errno = 0; - isatty (-1); - return errno == 0; - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_isatty_sets_errno=yes -else - gl_cv_func_isatty_sets_errno=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isatty_sets_errno" >&5 -$as_echo "$gl_cv_func_isatty_sets_errno" >&6; } - case "$gl_cv_func_isatty_sets_errno" in - *yes) ;; - *) - -$as_echo "#define ISATTY_FAILS_WITHOUT_SETTING_ERRNO 1" >>confdefs.h - - ;; - esac - - fi - - - - - - GNULIB_PTSNAME_R=1 - - - - - -$as_echo "#define GNULIB_TEST_PTSNAME_R 1" >>confdefs.h - - - - - # Check whether --enable-acl was given. -if test "${enable_acl+set}" = set; then : - enableval=$enable_acl; -else - enable_acl=auto -fi - - - - LIB_ACL= - use_acl=0 - if test "x$enable_acl" != "xno"; then - for ac_header in sys/acl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_acl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_ACL_H 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_sys_acl_h = yes; then - ac_save_LIBS=$LIBS - - if test $use_acl = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5 -$as_echo_n "checking for library containing acl_get_file... " >&6; } -if ${ac_cv_search_acl_get_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 acl_get_file (); -int -main () -{ -return acl_get_file (); - ; - return 0; -} -_ACEOF -for ac_lib in '' acl pacl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_acl_get_file=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_acl_get_file+:} false; then : - break -fi -done -if ${ac_cv_search_acl_get_file+:} false; then : - -else - ac_cv_search_acl_get_file=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5 -$as_echo "$ac_cv_search_acl_get_file" >&6; } -ac_res=$ac_cv_search_acl_get_file -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - if test "$ac_cv_search_acl_get_file" != "none required"; then - LIB_ACL=$ac_cv_search_acl_get_file - fi - for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \ - acl_free acl_from_mode acl_from_text \ - acl_delete_def_file acl_extended_file \ - acl_delete_fd_np acl_delete_file_np \ - acl_copy_ext_native acl_create_entry_np \ - acl_to_short_text acl_free_text -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - # If the acl_get_file bug is detected, don't enable the ACL support. - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5 -$as_echo_n "checking for working acl_get_file... " >&6; } -if ${gl_cv_func_working_acl_get_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_func_working_acl_get_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include - -int -main () -{ -if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT) - return 1; - return 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if test $cross_compiling = yes; then - gl_cv_func_working_acl_get_file="guessing yes" - elif ./conftest$ac_exeext; then - gl_cv_func_working_acl_get_file=yes - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5 -$as_echo "$gl_cv_func_working_acl_get_file" >&6; } - if test "$gl_cv_func_working_acl_get_file" != no; then : - use_acl=1 -fi - - if test $use_acl = 1; then - for ac_header in acl/libacl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default" -if test "x$ac_cv_header_acl_libacl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ACL_LIBACL_H 1 -_ACEOF - -fi - -done - - - - - - - - - - for ac_func in acl_entries -do : - ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries" -if test "x$ac_cv_func_acl_entries" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ACL_ENTRIES 1 -_ACEOF - -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - -fi -done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5 -$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; } -if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int type = ACL_FIRST_ENTRY; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_acl_ACL_FIRST_ENTRY=yes -else - gl_cv_acl_ACL_FIRST_ENTRY=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5 -$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; } - if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then - -$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5 -$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; } -if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int type = ACL_TYPE_EXTENDED; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_acl_ACL_TYPE_EXTENDED=yes -else - gl_cv_acl_ACL_TYPE_EXTENDED=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5 -$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; } - if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then - -$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h - - fi - else - LIB_ACL= - fi - -fi - - fi - - if test $use_acl = 0; then - for ac_func in facl -do : - ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl" -if test "x$ac_cv_func_facl" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FACL 1 -_ACEOF - -fi -done - - if test $ac_cv_func_facl = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5 -$as_echo_n "checking for library containing acl_trivial... " >&6; } -if ${ac_cv_search_acl_trivial+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 acl_trivial (); -int -main () -{ -return acl_trivial (); - ; - return 0; -} -_ACEOF -for ac_lib in '' sec; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_acl_trivial=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_acl_trivial+:} false; then : - break -fi -done -if ${ac_cv_search_acl_trivial+:} false; then : - -else - ac_cv_search_acl_trivial=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5 -$as_echo "$ac_cv_search_acl_trivial" >&6; } -ac_res=$ac_cv_search_acl_trivial -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - if test "$ac_cv_search_acl_trivial" != "none required"; then - LIB_ACL=$ac_cv_search_acl_trivial - fi - -fi - - for ac_func in acl_trivial -do : - ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial" -if test "x$ac_cv_func_acl_trivial" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ACL_TRIVIAL 1 -_ACEOF - -fi -done - - use_acl=1 - fi - fi - - if test $use_acl = 0; then - for ac_func in getacl -do : - ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl" -if test "x$ac_cv_func_getacl" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETACL 1 -_ACEOF - -fi -done - - if test $ac_cv_func_getacl = yes; then - use_acl=1 - fi - for ac_header in aclv.h -do : - ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include -" -if test "x$ac_cv_header_aclv_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ACLV_H 1 -_ACEOF - -fi - -done - - fi - - if test $use_acl = 0; then - for ac_func in aclx_get -do : - ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get" -if test "x$ac_cv_func_aclx_get" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ACLX_GET 1 -_ACEOF - -fi -done - - if test $ac_cv_func_aclx_get = yes; then - use_acl=1 - fi - fi - - if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then - for ac_func in statacl -do : - ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl" -if test "x$ac_cv_func_statacl" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STATACL 1 -_ACEOF - -fi -done - - if test $ac_cv_func_statacl = yes; then - use_acl=1 - fi - fi - - if test $use_acl = 0; then - for ac_func in aclsort -do : - ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort" -if test "x$ac_cv_func_aclsort" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ACLSORT 1 -_ACEOF - -fi -done - - if test $ac_cv_func_aclsort = yes; then - use_acl=1 - fi - fi - - LIBS=$ac_save_LIBS - fi - if test "x$enable_acl$use_acl" = "xyes0"; then - as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5 - elif test "x$enable_acl$use_acl" = "xauto0"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5 -$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5 -$as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;} - fi - fi - - -cat >>confdefs.h <<_ACEOF -#define USE_ACL $use_acl -_ACEOF - - USE_ACL=$use_acl - - - : @@ -26924,11 +26924,52 @@ $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h + if test $ac_cv_func_readlinkat = no; then HAVE_READLINKAT=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlinkat signature is correct" >&5 +$as_echo_n "checking whether readlinkat signature is correct... " >&6; } +if ${gl_cv_decl_readlinkat_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check whether original declaration has correct type. */ + ssize_t readlinkat (int, char const *, char *, size_t); +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_readlinkat_works=yes +else + gl_cv_decl_readlinkat_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlinkat_works" >&5 +$as_echo "$gl_cv_decl_readlinkat_works" >&6; } + # Assume readinkat has the same trailing slash bug as readlink, + # as is the case on Mac Os X 10.10 + case "$gl_cv_func_readlink_works" in + *yes) + if test "$gl_cv_decl_readlinkat_works" != yes; then + REPLACE_READLINKAT=1 + fi + ;; + *) + REPLACE_READLINKAT=1 + ;; + esac fi - if test $HAVE_READLINKAT = 0; then + if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then @@ -29136,8 +29177,12 @@ else /* Test _Alignas only on platforms where gnulib can help. */ #if \ ((defined __cplusplus && 201103 <= __cplusplus) \ - || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ - || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + || (defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__) \ + || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ + || __ICC || 0x5110 <= __SUNPRO_C \ + || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 ? 1 : -1]; @@ -29391,6 +29436,15 @@ fi STDDEF_H= + ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include + +" +if test "x$ac_cv_type_max_align_t" = xyes; then : + +else + HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h +fi + if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -29520,6 +29574,8 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } + + if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else @@ -29584,6 +29640,48 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 +$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; } +if ${gl_cv_func_printf_attribute_flavor+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define __STDC_FORMAT_MACROS 1 + #include + #include + /* For non-mingw systems, compilation will trivially succeed. + For mingw, compilation will succeed for older mingw (system + printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ + #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_printf_attribute_flavor=system +else + gl_cv_func_printf_attribute_flavor=gnu +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 +$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; } + if test "$gl_cv_func_printf_attribute_flavor" = gnu; then + +$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h + + fi + GNULIB_FSCANF=1 @@ -30830,9 +30928,64 @@ $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h if test $ac_cv_func_symlinkat = no; then HAVE_SYMLINKAT=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlinkat handles trailing slash correctly" >&5 +$as_echo_n "checking whether symlinkat handles trailing slash correctly... " >&6; } +if ${gl_cv_func_symlinkat_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_symlinkat_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_symlinkat_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +int result = 0; + if (!symlinkat ("a", AT_FDCWD, "conftest.link/")) + result |= 1; + if (symlinkat ("conftest.f", AT_FDCWD, "conftest.lnk2")) + result |= 2; + else if (!symlinkat ("a", AT_FDCWD, "conftest.lnk2/")) + result |= 4; + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_symlinkat_works=yes +else + gl_cv_func_symlinkat_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm -f conftest.f conftest.link conftest.lnk2 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlinkat_works" >&5 +$as_echo "$gl_cv_func_symlinkat_works" >&6; } + case "$gl_cv_func_symlinkat_works" in + *yes) ;; + *) + REPLACE_SYMLINKAT=1 + ;; + esac fi - if test $HAVE_SYMLINKAT = 0; then + if test $HAVE_SYMLINKAT = 0 || test $REPLACE_SYMLINKAT = 1; then @@ -31255,172 +31408,103 @@ $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h - : - if test $ac_cv_have_decl_ttyname_r = no; then - HAVE_DECL_TTYNAME_R=0 - fi + ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include +" +if test "x$ac_cv_type_timezone_t" = xyes; then : - for ac_func in ttyname_r -do : - ac_fn_c_check_func "$LINENO" "ttyname_r" "ac_cv_func_ttyname_r" -if test "x$ac_cv_func_ttyname_r" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TTYNAME_R 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_TIMEZONE_T 1 _ACEOF + fi -done - if test $ac_cv_func_ttyname_r = no; then - HAVE_TTYNAME_R=0 - else - HAVE_TTYNAME_R=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ttyname_r is compatible with its POSIX signature" >&5 -$as_echo_n "checking whether ttyname_r is compatible with its POSIX signature... " >&6; } -if ${gl_cv_func_ttyname_r_posix+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -*ttyname_r (0, NULL, 0); - ; - return 0; -} + if test "$ac_cv_type_timezone_t" = yes; then + HAVE_TIMEZONE_T=1 + fi -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_ttyname_r_posix=no -else - gl_cv_func_ttyname_r_posix=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$HAVE_TIMEZONE_T" = 0; then -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ttyname_r_posix" >&5 -$as_echo "$gl_cv_func_ttyname_r_posix" >&6; } - if test $gl_cv_func_ttyname_r_posix = no; then - REPLACE_TTYNAME_R=1 - else -$as_echo "#define HAVE_POSIXDECL_TTYNAME_R 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ttyname_r works with small buffers" >&5 -$as_echo_n "checking whether ttyname_r works with small buffers... " >&6; } -if ${gl_cv_func_ttyname_r_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_ttyname_r_works="guessing no" ;; - # Guess no on OSF/1. - osf*) gl_cv_func_ttyname_r_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_ttyname_r_works="guessing yes" ;; - esac - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main (void) -{ - int result = 0; - int fd; - char buf[31]; /* use any size < 128 here */ - fd = open ("/dev/tty", O_RDONLY); - if (fd < 0) - result |= 16; - else if (ttyname_r (fd, buf, sizeof (buf)) != 0) - result |= 17; - else if (ttyname_r (fd, buf, 1) == 0) - result |= 18; - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_ttyname_r_works=yes -else - case $? in - 17 | 18) gl_cv_func_ttyname_r_works=no ;; - esac -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ttyname_r_works" >&5 -$as_echo "$gl_cv_func_ttyname_r_works" >&6; } - case "$gl_cv_func_ttyname_r_works" in - *yes) ;; - *) REPLACE_TTYNAME_R=1 ;; - esac - fi fi - if test $HAVE_TTYNAME_R = 0 || test $REPLACE_TTYNAME_R = 1; then + GNULIB_TIME_RZ=1 - gl_LIBOBJS="$gl_LIBOBJS ttyname_r.$ac_objext" + +$as_echo "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h + + - for ac_func in ttyname -do : - ac_fn_c_check_func "$LINENO" "ttyname" "ac_cv_func_ttyname" -if test "x$ac_cv_func_ttyname" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TTYNAME 1 -_ACEOF -fi -done + REPLACE_TIMEGM=0 + if test $ac_cv_func_timegm = yes; then + if test $gl_cv_func_working_mktime = no; then + # Assume that timegm is buggy if mktime is. + REPLACE_TIMEGM=1 + fi + else + HAVE_TIMEGM=0 fi + if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then + + + - GNULIB_TTYNAME_R=1 + gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext" + : + + fi + -$as_echo "#define GNULIB_TEST_TTYNAME_R 1" >>confdefs.h + GNULIB_TIMEGM=1 +$as_echo "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h + + + + : + + + + @@ -31576,7 +31660,7 @@ fi || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 } } } @@ -31603,7 +31687,7 @@ fi || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 } } } @@ -31630,7 +31714,7 @@ fi || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 6 } } } @@ -31847,6 +31931,7 @@ $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h ;; *) # GNU/Hurd has unlinkat, but it has the same bug as unlink. + # Darwin has unlinkat, but it has the same UNLINK_PARENT_BUG. if test $REPLACE_UNLINK = 1; then REPLACE_UNLINKAT=1 fi @@ -31926,66 +32011,6 @@ $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h - - - - for ac_func in unlockpt -do : - ac_fn_c_check_func "$LINENO" "unlockpt" "ac_cv_func_unlockpt" -if test "x$ac_cv_func_unlockpt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_UNLOCKPT 1 -_ACEOF - -fi -done - - if test $ac_cv_func_unlockpt = no; then - HAVE_UNLOCKPT=0 - fi - - if test $HAVE_UNLOCKPT = 0; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unlockpt.$ac_objext" - - - for ac_func in revoke -do : - ac_fn_c_check_func "$LINENO" "revoke" "ac_cv_func_revoke" -if test "x$ac_cv_func_revoke" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_REVOKE 1 -_ACEOF - -fi -done - - - fi - - - - - - GNULIB_UNLOCKPT=1 - - - - - -$as_echo "#define GNULIB_TEST_UNLOCKPT 1" >>confdefs.h - - - - - if test $ac_cv_have_decl_unsetenv = no; then HAVE_DECL_UNSETENV=0 @@ -34342,6 +34367,7 @@ fi nw="$nw -Winline" # It's OK to not inline. nw="$nw -Wstrict-overflow" # It's OK to optimize strictly. nw="$nw -Wsuggest-attribute=pure" # Too many warnings for now. + nw="$nw -Wstack-protector" @@ -34451,6 +34477,14 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } fi # List all gcc warning categories. + # To compare this list to your installed GCC's, run this Bash command: + # + # comm -3 \ + # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \ + # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort | + # grep -v -x -f <( + # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec)) + gl_manywarn_set= for gl_manywarn_item in \ -W \ @@ -34458,20 +34492,25 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } -Waddress \ -Waggressive-loop-optimizations \ -Wall \ - -Warray-bounds \ -Wattributes \ -Wbad-function-cast \ + -Wbool-compare \ -Wbuiltin-macro-redefined \ -Wcast-align \ -Wchar-subscripts \ + -Wchkp \ -Wclobbered \ -Wcomment \ -Wcomments \ -Wcoverage-mismatch \ -Wcpp \ + -Wdate-time \ -Wdeprecated \ -Wdeprecated-declarations \ + -Wdesignated-init \ -Wdisabled-optimization \ + -Wdiscarded-array-qualifiers \ + -Wdiscarded-qualifiers \ -Wdiv-by-zero \ -Wdouble-promotion \ -Wempty-body \ @@ -34482,6 +34521,7 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } -Wformat-extra-args \ -Wformat-nonliteral \ -Wformat-security \ + -Wformat-signedness \ -Wformat-y2k \ -Wformat-zero-length \ -Wfree-nonheap-object \ @@ -34489,15 +34529,19 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } -Wimplicit \ -Wimplicit-function-declaration \ -Wimplicit-int \ + -Wincompatible-pointer-types \ -Winit-self \ -Winline \ + -Wint-conversion \ -Wint-to-pointer-cast \ -Winvalid-memory-model \ -Winvalid-pch \ -Wjump-misses-init \ + -Wlogical-not-parentheses \ -Wlogical-op \ -Wmain \ -Wmaybe-uninitialized \ + -Wmemset-transposed-args \ -Wmissing-braces \ -Wmissing-declarations \ -Wmissing-field-initializers \ @@ -34508,9 +34552,10 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } -Wnarrowing \ -Wnested-externs \ -Wnonnull \ - -Wnormalized=nfc \ + -Wodr \ -Wold-style-declaration \ -Wold-style-definition \ + -Wopenmp-simd \ -Woverflow \ -Woverlength-strings \ -Woverride-init \ @@ -34525,6 +34570,9 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } -Wreturn-type \ -Wsequence-point \ -Wshadow \ + -Wshift-count-negative \ + -Wshift-count-overflow \ + -Wsizeof-array-argument \ -Wsizeof-pointer-memaccess \ -Wstack-protector \ -Wstrict-aliasing \ @@ -34534,7 +34582,10 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } -Wsuggest-attribute=format \ -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure \ + -Wsuggest-final-methods \ + -Wsuggest-final-types \ -Wswitch \ + -Wswitch-bool \ -Wswitch-default \ -Wsync-nand \ -Wsystem-headers \ @@ -34561,13 +34612,27 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; } -Wvla \ -Wvolatile-register-var \ -Wwrite-strings \ - -fdiagnostics-show-option \ - -funit-at-a-time \ \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done + # gcc --help=warnings outputs an unusual form for these options; list + # them here so that the above 'comm' command doesn't report a false match. + gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2" + gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc" + + # These are needed for older GCC versions. + if test -n "$GCC"; then + case `($CC --version) 2>/dev/null` in + 'gcc (GCC) '[0-3].* | \ + 'gcc (GCC) '4.[0-7].*) + gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option" + gl_manywarn_set="$gl_manywarn_set -funit-at-a-time" + ;; + esac + fi + # Disable specific options as needed. if test "$gl_cv_cc_nomfi_needed" = yes; then gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" @@ -34866,6 +34931,7 @@ fi + $as_echo "#define lint 1" >>confdefs.h @@ -34994,41 +35060,6 @@ else TAR_COND_XATTR_H_FALSE= fi - if false; then - TAR_LIB_ATTR_TRUE= - TAR_LIB_ATTR_FALSE='#' -else - TAR_LIB_ATTR_TRUE='#' - TAR_LIB_ATTR_FALSE= -fi - - if test "$ac_cv_header_sys_xattr_h" = yes; then - for ac_func in getxattr fgetxattr lgetxattr \ - setxattr fsetxattr lsetxattr \ - listxattr flistxattr llistxattr -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - # only when functions are present - -$as_echo "#define HAVE_SYS_XATTR_H 1" >>confdefs.h - - if test "$with_xattrs" != no; then - -$as_echo "#define HAVE_XATTRS /**/" >>confdefs.h - - fi - -fi -done - - fi - - # If is not found, then check for if test "$ac_cv_header_sys_xattr_h" != yes; then for ac_header in attr/xattr.h do : @@ -35050,13 +35081,20 @@ else TAR_COND_XATTR_H_FALSE= fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5 -$as_echo_n "checking for fgetxattr in -lattr... " >&6; } -if ${ac_cv_lib_attr_fgetxattr+:} false; then : + fi + + if test "$with_xattrs" != no; then + for i in getxattr fgetxattr lgetxattr \ + setxattr fsetxattr lsetxattr \ + listxattr flistxattr llistxattr + do + as_ac_Search=`$as_echo "ac_cv_search_$i" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $i" >&5 +$as_echo_n "checking for library containing $i... " >&6; } +if eval \${$as_ac_Search+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lattr $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -35066,67 +35104,56 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char fgetxattr (); +char $i (); int main () { -return fgetxattr (); +return $i (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_attr_fgetxattr=yes -else - ac_cv_lib_attr_fgetxattr=no +for ac_lib in '' attr; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Search=\$ac_res" fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5 -$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; } -if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBATTR 1 -_ACEOF - - LIBS="-lattr $LIBS" - + conftest$ac_exeext + if eval \${$as_ac_Search+:} false; then : + break fi +done +if eval \${$as_ac_Search+:} false; then : - if test "$ac_cv_lib_attr_fgetxattr" = yes; then - TAR_LIB_ATTR_TRUE= - TAR_LIB_ATTR_FALSE='#' else - TAR_LIB_ATTR_TRUE='#' - TAR_LIB_ATTR_FALSE= + eval "$as_ac_Search=no" fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +eval ac_res=\$$as_ac_Search + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval ac_res=\$$as_ac_Search +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - if test "$ac_cv_header_attr_xattr_h" = yes; then - for ac_func in getxattr fgetxattr lgetxattr \ - setxattr fsetxattr lsetxattr \ - listxattr flistxattr llistxattr -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - # only when functions are present +fi -$as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h + eval found=\$ac_cv_search_$i + test "$found" = "no" && break + done - if test "$with_xattrs" != no; then + if test "$found" != no; then $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h - fi - -fi -done - fi fi @@ -35135,16 +35162,6 @@ done - - if test $ac_cv_func_grantpt = yes; then - TAR_COND_GRANTPT_TRUE= - TAR_COND_GRANTPT_FALSE='#' -else - TAR_COND_GRANTPT_TRUE='#' - TAR_COND_GRANTPT_FALSE= -fi - - ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include " if test "x$ac_cv_have_decl_getgrgid" = xyes; then : @@ -36258,36 +36275,42 @@ else if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - if test "$cross_compiling" = yes; then : - - case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac - + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -int main () + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main () { - int result = 0; +int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\342\202\254"; /* EURO SIGN */ + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; @@ -36300,14 +36323,14 @@ int main () iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\263"; + static ICONV_CONST char input[] = "\263"; char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; @@ -36319,14 +36342,14 @@ int main () iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { - static const char input[] = "\304"; + static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; @@ -36339,14 +36362,14 @@ int main () iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; @@ -36366,17 +36389,20 @@ int main () && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; + + ; + return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes -else - am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + test "$am_cv_func_iconv_works" = no || break + done LIBS="$am_save_LIBS" fi @@ -36572,7 +36598,7 @@ $as_echo "$USE_NLS" >&6; } - GETTEXT_MACRO_VERSION=0.18 + GETTEXT_MACRO_VERSION=0.19 @@ -37125,36 +37151,42 @@ else if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - if test "$cross_compiling" = yes; then : - - case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac - + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -int main () + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main () { - int result = 0; +int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\342\202\254"; /* EURO SIGN */ + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; @@ -37167,14 +37199,14 @@ int main () iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\263"; + static ICONV_CONST char input[] = "\263"; char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; @@ -37186,14 +37218,14 @@ int main () iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { - static const char input[] = "\304"; + static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; @@ -37206,14 +37238,14 @@ int main () iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; @@ -37233,17 +37265,20 @@ int main () && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; + + ; + return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes -else - am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + test "$am_cv_func_iconv_works" = no || break + done LIBS="$am_save_LIBS" fi @@ -38187,22 +38222,10 @@ if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; th as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then - as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then - as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${TAR_COND_GRANTPT_TRUE}" && test -z "${TAR_COND_GRANTPT_FALSE}"; then - as_fn_error $? "conditional \"TAR_COND_GRANTPT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -38600,7 +38623,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU tar $as_me 1.28, which was +This file was extended by GNU tar $as_me 1.29, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -38668,7 +38691,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU tar config.status 1.28 +GNU tar config.status 1.29 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\"