2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.193-8974 for gzip 1.9.
5 # Report bugs to <bug-gzip@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2017 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
28 case `(set -o) 2>/dev/null` in #(
37 # The user is always right.
38 if ${PATH_SEPARATOR+false} :; then
40 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
41 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48 # We need space, tab and new line, in precisely that order. Quoting is
49 # there to prevent editors from complaining about space-tab.
50 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51 # splitting by setting IFS to empty value.)
57 # Find who we are. Look in the path if we contain no directory separator.
60 *[\\/]* ) as_myself=$0 ;;
61 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
70 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
76 # We did not find ourselves, most probably we were run as `sh COMMAND'
77 # in which case we are not to be found in the path.
78 if test "x$as_myself" = x; then
81 if test ! -f "$as_myself"; then
82 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
86 # Unset variables that we do not need and which cause bugs (e.g. in
87 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
88 # suppresses any "Segmentation fault" message there. '((' could
89 # trigger a bug in pdksh 5.2.14.
90 for as_var in BASH_ENV ENV MAIL MAILPATH
91 do eval test \${$as_var+y} \
92 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
105 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
107 # Use a proper internal environment variable to ensure we don't fall
108 # into an infinite loop, continuously re-executing ourselves.
109 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
110 _as_can_reexec=no; export _as_can_reexec;
111 # We cannot yet assume a decent shell, so we have to provide a
112 # neutralization value for shells without unset; and this also
113 # works around shells that cannot unset nonexistent variables.
114 # Preserve -v and -x to the replacement shell.
117 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
119 *v*x* | *x*v* ) as_opts=-vx ;;
124 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
125 # Admittedly, this is quite paranoid, since all the known shells bail
126 # out after a failed `exec'.
127 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
130 # We don't want this to propagate to other subprocesses.
131 { _as_can_reexec=; unset _as_can_reexec;}
132 if test "x$CONFIG_SHELL" = x; then
133 as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
137 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
138 # is contrary to our usage. Disable this feature.
139 alias -g '\${1+\"\$@\"}'='\"\$@\"'
142 case \`(set -o) 2>/dev/null\` in #(
150 as_required="as_fn_return () { (exit \$1); }
151 as_fn_success () { as_fn_return 0; }
152 as_fn_failure () { as_fn_return 1; }
153 as_fn_ret_success () { return 0; }
154 as_fn_ret_failure () { return 1; }
157 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
158 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
159 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
160 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
161 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
165 exitcode=1; echo positional parameters were not saved.
167 test x\$exitcode = x0 || exit 1
169 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
170 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
171 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
172 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
173 test \$(( 1 + 1 )) = 2 || exit 1"
174 if (eval "$as_required") 2>/dev/null
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
192 *) as_dir=$as_dir/ ;;
197 for as_base in sh bash ksh sh5; do
198 # Try only shells that exist, to save several forks.
199 as_shell=$as_dir$as_base
200 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
201 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null
203 CONFIG_SHELL=$as_shell as_have_required=yes
204 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null
214 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
215 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null
217 CONFIG_SHELL=$SHELL as_have_required=yes
221 if test "x$CONFIG_SHELL" != x
224 # We cannot yet assume a decent shell, so we have to provide a
225 # neutralization value for shells without unset; and this also
226 # works around shells that cannot unset nonexistent variables.
227 # Preserve -v and -x to the replacement shell.
230 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
232 *v*x* | *x*v* ) as_opts=-vx ;;
237 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
238 # Admittedly, this is quite paranoid, since all the known shells bail
239 # out after a failed `exec'.
240 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
244 if test x$as_have_required = xno
246 printf "%s\n" "$0: This script requires a shell more modern than all"
247 printf "%s\n" "$0: the shells that I found on your system."
248 if test ${ZSH_VERSION+y} ; then
249 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
250 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
252 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-gzip@gnu.org
253 $0: about your system, including any error possibly output
254 $0: before this message. Then install a modern shell, or
255 $0: manually run the script under such a shell if you do
262 SHELL=${CONFIG_SHELL-/bin/sh}
264 # Unset more variables known to interfere with behavior of common tools.
265 CLICOLOR_FORCE= GREP_OPTIONS=
266 unset CLICOLOR_FORCE GREP_OPTIONS
268 ## --------------------- ##
269 ## M4sh Shell Functions. ##
270 ## --------------------- ##
273 # Portably unset VAR.
276 { eval $1=; unset $1;}
280 # as_fn_set_status STATUS
281 # -----------------------
282 # Set $? to STATUS, without forking.
290 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
300 # Create "$as_dir" as a directory, including parents if necessary.
305 -*) as_dir=./$as_dir;;
307 test -d "$as_dir" || eval $as_mkdir_p || {
311 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
314 as_dirs="'$as_qdir' $as_dirs"
315 as_dir=`$as_dirname -- "$as_dir" ||
316 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
317 X"$as_dir" : 'X\(//\)[^/]' \| \
318 X"$as_dir" : 'X\(//\)$' \| \
319 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
320 printf "%s\n" X"$as_dir" |
321 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
338 test -d "$as_dir" && break
340 test -z "$as_dirs" || eval "mkdir $as_dirs"
341 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
346 # as_fn_executable_p FILE
347 # -----------------------
348 # Test if FILE is an executable regular file.
349 as_fn_executable_p ()
351 test -f "$1" && test -x "$1"
352 } # as_fn_executable_p
353 # as_fn_append VAR VALUE
354 # ----------------------
355 # Append the text in VALUE to the end of the definition contained in VAR. Take
356 # advantage of any shell optimizations that allow amortized linear growth over
357 # repeated appends, instead of the typical quadratic growth present in naive
359 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
361 eval 'as_fn_append ()
374 # Perform arithmetic evaluation on the ARGs, and store the result in the
375 # global $as_val. Take advantage of shells that can avoid forks. The arguments
376 # must be portable across $(()) and expr.
377 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
386 as_val=`expr "$@" || test $? -eq 1`
391 # as_fn_error STATUS ERROR [LINENO LOG_FD]
392 # ----------------------------------------
393 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
394 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
395 # script with STATUS, using 1 if that was 0.
398 as_status=$1; test $as_status -eq 0 && as_status=1
400 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
401 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
403 printf "%s\n" "$as_me: error: $2" >&2
404 as_fn_exit $as_status
407 if expr a : '\(a\)' >/dev/null 2>&1 &&
408 test "X`expr 00001 : '.*\(...\)'`" = X001; then
414 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
420 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
426 as_me=`$as_basename -- "$0" ||
427 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
428 X"$0" : 'X\(//\)$' \| \
429 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
430 printf "%s\n" X/"$0" |
431 sed '/^.*\/\([^/][^/]*\)\/*$/{
445 # Avoid depending upon Character Ranges.
446 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
447 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
448 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
449 as_cr_digits='0123456789'
450 as_cr_alnum=$as_cr_Letters$as_cr_digits
453 as_lineno_1=$LINENO as_lineno_1a=$LINENO
454 as_lineno_2=$LINENO as_lineno_2a=$LINENO
455 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
456 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
457 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
469 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
473 chmod +x "$as_me.lineno" ||
474 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
476 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
477 # already done that, so ensure we don't try to do so again and fall
478 # in an infinite loop. This has already happened in practice.
479 _as_can_reexec=no; export _as_can_reexec
480 # Don't try to exec as it changes $[0], causing all sort of problems
481 # (the dirname of $[0] is not the place where we might find the
482 # original and so on. Autoconf is especially sensitive to this).
484 # Exit status is that of the last command.
488 ECHO_C= ECHO_N= ECHO_T=
489 case `echo -n x` in #(((((
491 case `echo 'xy\c'` in
492 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
494 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
501 rm -f conf$$ conf$$.exe conf$$.file
502 if test -d conf$$.dir; then
503 rm -f conf$$.dir/conf$$.file
506 mkdir conf$$.dir 2>/dev/null
508 if (echo >conf$$.file) 2>/dev/null; then
509 if ln -s conf$$.file conf$$ 2>/dev/null; then
511 # ... but there are two gotchas:
512 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
513 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
514 # In both cases, we have to default to `cp -pR'.
515 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
517 elif ln conf$$.file conf$$ 2>/dev/null; then
525 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
526 rmdir conf$$.dir 2>/dev/null
528 if mkdir -p . 2>/dev/null; then
529 as_mkdir_p='mkdir -p "$as_dir"'
531 test -d ./-p && rmdir ./-p
536 as_executable_p=as_fn_executable_p
538 # Sed expression to map a string onto a valid CPP name.
539 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
541 # Sed expression to map a string onto a valid variable name.
542 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
545 test -n "$DJDIR" || exec 7<&0 </dev/null
549 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
550 # so uname gets run too.
551 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
556 ac_default_prefix=/usr/local
558 ac_config_libobj_dir=.
565 # Identity of this package.
567 PACKAGE_TARNAME='gzip'
568 PACKAGE_VERSION='1.9'
569 PACKAGE_STRING='gzip 1.9'
570 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
573 ac_unique_file="gzip.c"
574 # Factoring default headers for most tests.
575 ac_includes_default="\
580 #ifdef HAVE_SYS_TYPES_H
581 # include <sys/types.h>
583 #ifdef HAVE_SYS_STAT_H
584 # include <sys/stat.h>
586 #ifdef HAVE_STRINGS_H
587 # include <strings.h>
589 #ifdef HAVE_INTTYPES_H
590 # include <inttypes.h>
600 gl_use_threads_default=
602 gl_getopt_required=POSIX
603 ac_subst_vars='gltests_LTLIBOBJS
623 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
719 GL_GENERATE_UTIME_H_FALSE
720 GL_GENERATE_UTIME_H_TRUE
723 NEXT_AS_FIRST_DIRECTIVE_UTIME_H
729 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
731 UNISTD_H_DEFINES_STRUCT_TIMESPEC
732 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
733 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
734 TIME_H_DEFINES_STRUCT_TIMESPEC
735 NEXT_AS_FIRST_DIRECTIVE_TIME_H
737 NEXT_AS_FIRST_DIRECTIVE_STRING_H
739 GL_GENERATE_STDNORETURN_H_FALSE
740 GL_GENERATE_STDNORETURN_H_TRUE
742 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
744 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
746 GL_GENERATE_STDINT_H_FALSE
747 GL_GENERATE_STDINT_H_TRUE
759 HAVE_SIGNED_SIG_ATOMIC_T
762 BITSIZEOF_SIG_ATOMIC_T
766 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
771 HAVE_UNSIGNED_LONG_LONG_INT
773 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
775 GL_GENERATE_STDDEF_H_FALSE
776 GL_GENERATE_STDDEF_H_TRUE
782 GL_GENERATE_STDBOOL_H_FALSE
783 GL_GENERATE_STDBOOL_H_TRUE
860 GNULIB_EXPLICIT_BZERO
861 NEXT_AS_FIRST_DIRECTIVE_MATH_H
871 GL_GENERATE_LIMITS_H_FALSE
872 GL_GENERATE_LIMITS_H_TRUE
874 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
876 IGNORE_UNUSED_LIBRARIES_CFLAGS
895 HAVE_DECL_LOCALTIME_R
906 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
908 REPLACE_STRUCT_TIMEVAL
916 GNULIB_GL_UNISTD_H_GETOPT
921 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
923 WINDOWS_64_BIT_ST_SIZE
924 WINDOWS_STAT_TIMESPEC
925 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
947 GNULIB_OVERRIDES_STRUCT_STAT
963 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
974 REPLACE_SIGNBIT_USING_GCC
1051 HAVE_DECL_REMAINDERL
1233 GNULIB_OVERRIDES_WINT_T
1234 APPLE_UNIVERSAL_BUILD
1235 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1237 GL_GENERATE_FLOAT_H_FALSE
1238 GL_GENERATE_FLOAT_H_TRUE
1240 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1243 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1261 REPLACE_STDIO_WRITE_FUNCS
1262 REPLACE_STDIO_READ_FUNCS
1271 REPLACE_OBSTACK_PRINTF
1296 HAVE_DECL_OBSTACK_PRINTF
1302 GNULIB_VSPRINTF_POSIX
1304 GNULIB_VPRINTF_POSIX
1306 GNULIB_VFPRINTF_POSIX
1313 GNULIB_STDIO_H_SIGPIPE
1314 GNULIB_STDIO_H_NONBLOCKING
1315 GNULIB_SPRINTF_POSIX
1329 GNULIB_OBSTACK_PRINTF_POSIX
1330 GNULIB_OBSTACK_PRINTF
1346 GNULIB_FPRINTF_POSIX
1361 GL_GENERATE_ERRNO_H_FALSE
1362 GL_GENERATE_ERRNO_H_TRUE
1364 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1367 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1370 PRAGMA_SYSTEM_HEADER
1371 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1395 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1397 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1398 UNISTD_H_HAVE_WINSOCK2_H
1422 REPLACE_GETDTABLESIZE
1423 REPLACE_GETDOMAINNAME
1435 HAVE_DECL_SETHOSTNAME
1436 HAVE_DECL_GETUSERSHELL
1437 HAVE_DECL_GETPAGESIZE
1438 HAVE_DECL_GETLOGIN_R
1440 HAVE_DECL_GETDOMAINNAME
1480 GNULIB_UNISTD_H_SIGPIPE
1481 GNULIB_UNISTD_H_NONBLOCKING
1508 GNULIB_GETDTABLESIZE
1509 GNULIB_GETDOMAINNAME
1539 REPLACE_CANONICALIZE_FILE_NAME
1544 HAVE_STRUCT_RANDOM_DATA
1570 HAVE_DECL_GETLOADAVG
1571 HAVE_CANONICALIZE_FILE_NAME
1582 GNULIB_SECURE_GETENV
1585 GNULIB_REALLOC_POSIX
1604 GNULIB_CANONICALIZE_FILE_NAME
1608 GL_GENERATE_ALLOCA_H_FALSE
1609 GL_GENERATE_ALLOCA_H_TRUE
1612 GL_COND_LIBTOOL_FALSE
1613 GL_COND_LIBTOOL_TRUE
1647 AM_DEFAULT_VERBOSITY
1658 INSTALL_STRIP_PROGRAM
1701 program_transform_name
1715 enable_option_checking
1717 enable_dependency_tracking
1725 ac_precious_vars='build_alias
1736 # Initialize some variables set by options.
1738 ac_init_version=false
1739 ac_unrecognized_opts=
1740 ac_unrecognized_sep=
1741 # The variables have the same names as the options, with
1742 # dashes changed to underlines.
1743 cache_file=/dev/null
1750 program_transform_name=s,x,x,
1758 # Installation directory options.
1759 # These are left unexpanded so users can "make install exec_prefix=/foo"
1760 # and all the variables that are supposed to be based on exec_prefix
1761 # by default will actually change.
1762 # Use braces instead of parens because sh, perl, etc. also accept them.
1763 # (The list follows the same order as the GNU Coding Standards.)
1764 bindir='${exec_prefix}/bin'
1765 sbindir='${exec_prefix}/sbin'
1766 libexecdir='${exec_prefix}/libexec'
1767 datarootdir='${prefix}/share'
1768 datadir='${datarootdir}'
1769 sysconfdir='${prefix}/etc'
1770 sharedstatedir='${prefix}/com'
1771 localstatedir='${prefix}/var'
1772 runstatedir='${localstatedir}/run'
1773 includedir='${prefix}/include'
1774 oldincludedir='/usr/include'
1775 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1776 infodir='${datarootdir}/info'
1781 libdir='${exec_prefix}/lib'
1782 localedir='${datarootdir}/locale'
1783 mandir='${datarootdir}/man'
1789 # If the previous option needs an argument, assign it.
1790 if test -n "$ac_prev"; then
1791 eval $ac_prev=\$ac_option
1797 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1802 # Accept the important Cygnus configure options, so we can diagnose typos.
1804 case $ac_dashdash$ac_option in
1808 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1810 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1811 bindir=$ac_optarg ;;
1813 -build | --build | --buil | --bui | --bu)
1814 ac_prev=build_alias ;;
1815 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1816 build_alias=$ac_optarg ;;
1818 -cache-file | --cache-file | --cache-fil | --cache-fi \
1819 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1820 ac_prev=cache_file ;;
1821 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1822 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1823 cache_file=$ac_optarg ;;
1825 --config-cache | -C)
1826 cache_file=config.cache ;;
1828 -datadir | --datadir | --datadi | --datad)
1830 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1831 datadir=$ac_optarg ;;
1833 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1834 | --dataroo | --dataro | --datar)
1835 ac_prev=datarootdir ;;
1836 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1837 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1838 datarootdir=$ac_optarg ;;
1840 -disable-* | --disable-*)
1841 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1842 # Reject names that are not valid shell variable names.
1843 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1844 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1845 ac_useropt_orig=$ac_useropt
1846 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1847 case $ac_user_opts in
1849 "enable_$ac_useropt"
1851 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1852 ac_unrecognized_sep=', ';;
1854 eval enable_$ac_useropt=no ;;
1856 -docdir | --docdir | --docdi | --doc | --do)
1858 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1859 docdir=$ac_optarg ;;
1861 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1863 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1864 dvidir=$ac_optarg ;;
1866 -enable-* | --enable-*)
1867 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1868 # Reject names that are not valid shell variable names.
1869 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1870 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1871 ac_useropt_orig=$ac_useropt
1872 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1873 case $ac_user_opts in
1875 "enable_$ac_useropt"
1877 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1878 ac_unrecognized_sep=', ';;
1880 eval enable_$ac_useropt=\$ac_optarg ;;
1882 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1883 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1884 | --exec | --exe | --ex)
1885 ac_prev=exec_prefix ;;
1886 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1887 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1888 | --exec=* | --exe=* | --ex=*)
1889 exec_prefix=$ac_optarg ;;
1891 -gas | --gas | --ga | --g)
1892 # Obsolete; use --with-gas.
1895 -help | --help | --hel | --he | -h)
1896 ac_init_help=long ;;
1897 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1898 ac_init_help=recursive ;;
1899 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1900 ac_init_help=short ;;
1902 -host | --host | --hos | --ho)
1903 ac_prev=host_alias ;;
1904 -host=* | --host=* | --hos=* | --ho=*)
1905 host_alias=$ac_optarg ;;
1907 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1909 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1911 htmldir=$ac_optarg ;;
1913 -includedir | --includedir | --includedi | --included | --include \
1914 | --includ | --inclu | --incl | --inc)
1915 ac_prev=includedir ;;
1916 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1917 | --includ=* | --inclu=* | --incl=* | --inc=*)
1918 includedir=$ac_optarg ;;
1920 -infodir | --infodir | --infodi | --infod | --info | --inf)
1922 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1923 infodir=$ac_optarg ;;
1925 -libdir | --libdir | --libdi | --libd)
1927 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1928 libdir=$ac_optarg ;;
1930 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1931 | --libexe | --libex | --libe)
1932 ac_prev=libexecdir ;;
1933 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1934 | --libexe=* | --libex=* | --libe=*)
1935 libexecdir=$ac_optarg ;;
1937 -localedir | --localedir | --localedi | --localed | --locale)
1938 ac_prev=localedir ;;
1939 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1940 localedir=$ac_optarg ;;
1942 -localstatedir | --localstatedir | --localstatedi | --localstated \
1943 | --localstate | --localstat | --localsta | --localst | --locals)
1944 ac_prev=localstatedir ;;
1945 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1946 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1947 localstatedir=$ac_optarg ;;
1949 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1951 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1952 mandir=$ac_optarg ;;
1954 -nfp | --nfp | --nf)
1955 # Obsolete; use --without-fp.
1958 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1959 | --no-cr | --no-c | -n)
1962 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1963 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1966 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1967 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1968 | --oldin | --oldi | --old | --ol | --o)
1969 ac_prev=oldincludedir ;;
1970 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1971 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1972 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1973 oldincludedir=$ac_optarg ;;
1975 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1977 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1978 prefix=$ac_optarg ;;
1980 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1981 | --program-pre | --program-pr | --program-p)
1982 ac_prev=program_prefix ;;
1983 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1984 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1985 program_prefix=$ac_optarg ;;
1987 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1988 | --program-suf | --program-su | --program-s)
1989 ac_prev=program_suffix ;;
1990 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1991 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1992 program_suffix=$ac_optarg ;;
1994 -program-transform-name | --program-transform-name \
1995 | --program-transform-nam | --program-transform-na \
1996 | --program-transform-n | --program-transform- \
1997 | --program-transform | --program-transfor \
1998 | --program-transfo | --program-transf \
1999 | --program-trans | --program-tran \
2000 | --progr-tra | --program-tr | --program-t)
2001 ac_prev=program_transform_name ;;
2002 -program-transform-name=* | --program-transform-name=* \
2003 | --program-transform-nam=* | --program-transform-na=* \
2004 | --program-transform-n=* | --program-transform-=* \
2005 | --program-transform=* | --program-transfor=* \
2006 | --program-transfo=* | --program-transf=* \
2007 | --program-trans=* | --program-tran=* \
2008 | --progr-tra=* | --program-tr=* | --program-t=*)
2009 program_transform_name=$ac_optarg ;;
2011 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2013 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2014 pdfdir=$ac_optarg ;;
2016 -psdir | --psdir | --psdi | --psd | --ps)
2018 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2021 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2022 | -silent | --silent | --silen | --sile | --sil)
2025 -runstatedir | --runstatedir | --runstatedi | --runstated \
2026 | --runstate | --runstat | --runsta | --runst | --runs \
2027 | --run | --ru | --r)
2028 ac_prev=runstatedir ;;
2029 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2030 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2031 | --run=* | --ru=* | --r=*)
2032 runstatedir=$ac_optarg ;;
2034 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2036 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2038 sbindir=$ac_optarg ;;
2040 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2041 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2042 | --sharedst | --shareds | --shared | --share | --shar \
2044 ac_prev=sharedstatedir ;;
2045 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2046 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2047 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2049 sharedstatedir=$ac_optarg ;;
2051 -site | --site | --sit)
2053 -site=* | --site=* | --sit=*)
2056 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2058 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2059 srcdir=$ac_optarg ;;
2061 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2062 | --syscon | --sysco | --sysc | --sys | --sy)
2063 ac_prev=sysconfdir ;;
2064 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2065 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2066 sysconfdir=$ac_optarg ;;
2068 -target | --target | --targe | --targ | --tar | --ta | --t)
2069 ac_prev=target_alias ;;
2070 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2071 target_alias=$ac_optarg ;;
2073 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2076 -version | --version | --versio | --versi | --vers | -V)
2077 ac_init_version=: ;;
2080 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2081 # Reject names that are not valid shell variable names.
2082 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2083 as_fn_error $? "invalid package name: \`$ac_useropt'"
2084 ac_useropt_orig=$ac_useropt
2085 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2086 case $ac_user_opts in
2090 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2091 ac_unrecognized_sep=', ';;
2093 eval with_$ac_useropt=\$ac_optarg ;;
2095 -without-* | --without-*)
2096 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2097 # Reject names that are not valid shell variable names.
2098 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2099 as_fn_error $? "invalid package name: \`$ac_useropt'"
2100 ac_useropt_orig=$ac_useropt
2101 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2102 case $ac_user_opts in
2106 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2107 ac_unrecognized_sep=', ';;
2109 eval with_$ac_useropt=no ;;
2112 # Obsolete; use --with-x.
2115 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2116 | --x-incl | --x-inc | --x-in | --x-i)
2117 ac_prev=x_includes ;;
2118 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2119 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2120 x_includes=$ac_optarg ;;
2122 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2123 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2124 ac_prev=x_libraries ;;
2125 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2126 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2127 x_libraries=$ac_optarg ;;
2129 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2130 Try \`$0 --help' for more information"
2134 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2135 # Reject names that are not valid shell variable names.
2136 case $ac_envvar in #(
2137 '' | [0-9]* | *[!_$as_cr_alnum]* )
2138 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2140 eval $ac_envvar=\$ac_optarg
2141 export $ac_envvar ;;
2144 # FIXME: should be removed in autoconf 3.0.
2145 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2146 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2147 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2148 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2154 if test -n "$ac_prev"; then
2155 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2156 as_fn_error $? "missing argument to $ac_option"
2159 if test -n "$ac_unrecognized_opts"; then
2160 case $enable_option_checking in
2162 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2163 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2167 # Check all directory arguments for consistency.
2168 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2169 datadir sysconfdir sharedstatedir localstatedir includedir \
2170 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2171 libdir localedir mandir runstatedir
2173 eval ac_val=\$$ac_var
2174 # Remove trailing slashes.
2177 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2178 eval $ac_var=\$ac_val;;
2180 # Be sure to have absolute directory names.
2182 [\\/$]* | ?:[\\/]* ) continue;;
2183 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2185 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2188 # There might be people who depend on the old broken behavior: `$host'
2189 # used to hold the argument of --host etc.
2190 # FIXME: To remove some day.
2193 target=$target_alias
2195 # FIXME: To remove some day.
2196 if test "x$host_alias" != x; then
2197 if test "x$build_alias" = x; then
2198 cross_compiling=maybe
2199 elif test "x$build_alias" != "x$host_alias"; then
2205 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2207 test "$silent" = yes && exec 6>/dev/null
2210 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2211 ac_ls_di=`ls -di .` &&
2212 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2213 as_fn_error $? "working directory cannot be determined"
2214 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2215 as_fn_error $? "pwd does not report name of working directory"
2218 # Find the source files, if location was not specified.
2219 if test -z "$srcdir"; then
2220 ac_srcdir_defaulted=yes
2221 # Try the directory containing this script, then the parent directory.
2222 ac_confdir=`$as_dirname -- "$as_myself" ||
2223 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2224 X"$as_myself" : 'X\(//\)[^/]' \| \
2225 X"$as_myself" : 'X\(//\)$' \| \
2226 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2227 printf "%s\n" X"$as_myself" |
2228 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2246 if test ! -r "$srcdir/$ac_unique_file"; then
2250 ac_srcdir_defaulted=no
2252 if test ! -r "$srcdir/$ac_unique_file"; then
2253 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2254 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2256 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2258 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2260 # When building in place, set srcdir=.
2261 if test "$ac_abs_confdir" = "$ac_pwd"; then
2264 # Remove unnecessary trailing slashes from srcdir.
2265 # Double slashes in file names in object file debugging info
2266 # mess up M-x gdb in Emacs.
2268 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2270 for ac_var in $ac_precious_vars; do
2271 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2272 eval ac_env_${ac_var}_value=\$${ac_var}
2273 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2274 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2278 # Report the --help message.
2280 if test "$ac_init_help" = "long"; then
2281 # Omit some internal or obsolete options to make the list less imposing.
2282 # This message is too long to be a string in the A/UX 3.1 sh.
2284 \`configure' configures gzip 1.9 to adapt to many kinds of systems.
2286 Usage: $0 [OPTION]... [VAR=VALUE]...
2288 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2289 VAR=VALUE. See below for descriptions of some of the useful variables.
2291 Defaults for the options are specified in brackets.
2294 -h, --help display this help and exit
2295 --help=short display options specific to this package
2296 --help=recursive display the short help of all the included packages
2297 -V, --version display version information and exit
2298 -q, --quiet, --silent do not print \`checking ...' messages
2299 --cache-file=FILE cache test results in FILE [disabled]
2300 -C, --config-cache alias for \`--cache-file=config.cache'
2301 -n, --no-create do not create output files
2302 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2304 Installation directories:
2305 --prefix=PREFIX install architecture-independent files in PREFIX
2306 [$ac_default_prefix]
2307 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2310 By default, \`make install' will install all the files in
2311 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2312 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2313 for instance \`--prefix=\$HOME'.
2315 For better control, use the options below.
2317 Fine tuning of the installation directories:
2318 --bindir=DIR user executables [EPREFIX/bin]
2319 --sbindir=DIR system admin executables [EPREFIX/sbin]
2320 --libexecdir=DIR program executables [EPREFIX/libexec]
2321 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2322 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2323 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2324 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2325 --libdir=DIR object code libraries [EPREFIX/lib]
2326 --includedir=DIR C header files [PREFIX/include]
2327 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2328 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2329 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2330 --infodir=DIR info documentation [DATAROOTDIR/info]
2331 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2332 --mandir=DIR man documentation [DATAROOTDIR/man]
2333 --docdir=DIR documentation root [DATAROOTDIR/doc/gzip]
2334 --htmldir=DIR html documentation [DOCDIR]
2335 --dvidir=DIR dvi documentation [DOCDIR]
2336 --pdfdir=DIR pdf documentation [DOCDIR]
2337 --psdir=DIR ps documentation [DOCDIR]
2343 --program-prefix=PREFIX prepend PREFIX to installed program names
2344 --program-suffix=SUFFIX append SUFFIX to installed program names
2345 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2348 --build=BUILD configure for building on BUILD [guessed]
2349 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2353 if test -n "$ac_init_help"; then
2354 case $ac_init_help in
2355 short | recursive ) echo "Configuration of gzip 1.9:";;
2360 --disable-option-checking ignore unrecognized --enable/--with options
2361 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2362 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2363 --enable-silent-rules less verbose build output (undo: "make V=1")
2364 --disable-silent-rules verbose build output (undo: "make V=0")
2365 --enable-dependency-tracking
2366 do not reject slow dependency extractors
2367 --disable-dependency-tracking
2368 speeds up one-time build
2369 --disable-largefile omit support for large files
2370 --enable-threads={posix|solaris|pth|windows}
2371 specify multithreading API
2372 --disable-threads build without multithread safety
2373 --disable-rpath do not hardcode runtime library paths
2374 --enable-gcc-warnings turn on many GCC warnings (for developers; best with
2378 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2379 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2380 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2381 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2382 --without-libpth-prefix don't search for libpth in includedir and libdir
2384 Some influential environment variables:
2385 CC C compiler command
2386 CFLAGS C compiler flags
2387 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2388 nonstandard directory <lib dir>
2389 LIBS libraries to pass to the linker, e.g. -l<library>
2390 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2391 you have headers in a nonstandard directory <include dir>
2394 Use these variables to override the choices made by `configure' or to help
2395 it to find libraries and programs with nonstandard names/locations.
2397 Report bugs to <bug-gzip@gnu.org>.
2402 if test "$ac_init_help" = "recursive"; then
2403 # If there are subdirs, report their specific --help.
2404 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2405 test -d "$ac_dir" ||
2406 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2411 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2413 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2414 # A ".." for each directory in $ac_dir_suffix.
2415 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2416 case $ac_top_builddir_sub in
2417 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2418 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2421 ac_abs_top_builddir=$ac_pwd
2422 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2423 # for backward compatibility:
2424 ac_top_builddir=$ac_top_build_prefix
2427 .) # We are building in place.
2429 ac_top_srcdir=$ac_top_builddir_sub
2430 ac_abs_top_srcdir=$ac_pwd ;;
2431 [\\/]* | ?:[\\/]* ) # Absolute name.
2432 ac_srcdir=$srcdir$ac_dir_suffix;
2433 ac_top_srcdir=$srcdir
2434 ac_abs_top_srcdir=$srcdir ;;
2436 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2437 ac_top_srcdir=$ac_top_build_prefix$srcdir
2438 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2440 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2442 cd "$ac_dir" || { ac_status=$?; continue; }
2443 # Check for guested configure.
2444 if test -f "$ac_srcdir/configure.gnu"; then
2446 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2447 elif test -f "$ac_srcdir/configure"; then
2449 $SHELL "$ac_srcdir/configure" --help=recursive
2451 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2453 cd "$ac_pwd" || { ac_status=$?; break; }
2457 test -n "$ac_init_help" && exit $ac_status
2458 if $ac_init_version; then
2461 generated by GNU Autoconf 2.69.193-8974
2463 Copyright (C) 2017 Free Software Foundation, Inc.
2464 This configure script is free software; the Free Software Foundation
2465 gives unlimited permission to copy, distribute and modify it.
2470 ## ------------------------ ##
2471 ## Autoconf initialization. ##
2472 ## ------------------------ ##
2474 # ac_fn_c_try_compile LINENO
2475 # --------------------------
2476 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2477 ac_fn_c_try_compile ()
2479 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480 rm -f conftest.$ac_objext
2481 if { { ac_try="$ac_compile"
2483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484 *) ac_try_echo=$ac_try;;
2486 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487 printf "%s\n" "$ac_try_echo"; } >&5
2488 (eval "$ac_compile") 2>conftest.err
2490 if test -s conftest.err; then
2491 grep -v '^ *+' conftest.err >conftest.er1
2492 cat conftest.er1 >&5
2493 mv -f conftest.er1 conftest.err
2495 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496 test $ac_status = 0; } && {
2497 test -z "$ac_c_werror_flag" ||
2498 test ! -s conftest.err
2499 } && test -s conftest.$ac_objext
2503 printf "%s\n" "$as_me: failed program was:" >&5
2504 sed 's/^/| /' conftest.$ac_ext >&5
2508 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2509 as_fn_set_status $ac_retval
2511 } # ac_fn_c_try_compile
2513 # ac_fn_c_try_cpp LINENO
2514 # ----------------------
2515 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2518 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519 if { { ac_try="$ac_cpp conftest.$ac_ext"
2521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2522 *) ac_try_echo=$ac_try;;
2524 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2525 printf "%s\n" "$ac_try_echo"; } >&5
2526 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2528 if test -s conftest.err; then
2529 grep -v '^ *+' conftest.err >conftest.er1
2530 cat conftest.er1 >&5
2531 mv -f conftest.er1 conftest.err
2533 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534 test $ac_status = 0; } > conftest.i && {
2535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2536 test ! -s conftest.err
2541 printf "%s\n" "$as_me: failed program was:" >&5
2542 sed 's/^/| /' conftest.$ac_ext >&5
2546 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2547 as_fn_set_status $ac_retval
2551 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2552 # -------------------------------------------------------
2553 # Tests whether HEADER exists and can be compiled using the include files in
2554 # INCLUDES, setting the cache variable VAR accordingly.
2555 ac_fn_c_check_header_compile ()
2557 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2559 printf %s "checking for $2... " >&6; }
2560 if eval test \${$3+y}
2562 printf %s "(cached) " >&6
2564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2565 /* end confdefs.h. */
2569 if ac_fn_c_try_compile "$LINENO"
2575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2579 printf "%s\n" "$ac_res" >&6; }
2580 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2582 } # ac_fn_c_check_header_compile
2584 # ac_fn_c_try_link LINENO
2585 # -----------------------
2586 # Try to link conftest.$ac_ext, and return whether this succeeded.
2589 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590 rm -f conftest.$ac_objext conftest$ac_exeext
2591 if { { ac_try="$ac_link"
2593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2594 *) ac_try_echo=$ac_try;;
2596 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2597 printf "%s\n" "$ac_try_echo"; } >&5
2598 (eval "$ac_link") 2>conftest.err
2600 if test -s conftest.err; then
2601 grep -v '^ *+' conftest.err >conftest.er1
2602 cat conftest.er1 >&5
2603 mv -f conftest.er1 conftest.err
2605 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2606 test $ac_status = 0; } && {
2607 test -z "$ac_c_werror_flag" ||
2608 test ! -s conftest.err
2609 } && test -s conftest$ac_exeext && {
2610 test "$cross_compiling" = yes ||
2611 test -x conftest$ac_exeext
2616 printf "%s\n" "$as_me: failed program was:" >&5
2617 sed 's/^/| /' conftest.$ac_ext >&5
2621 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2622 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2623 # interfere with the next link command; also delete a directory that is
2624 # left behind by Apple's compiler. We do this before executing the actions.
2625 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2626 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2627 as_fn_set_status $ac_retval
2629 } # ac_fn_c_try_link
2631 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2632 # -------------------------------------------
2633 # Tests whether TYPE exists after having included INCLUDES, setting cache
2634 # variable VAR accordingly.
2635 ac_fn_c_check_type ()
2637 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2639 printf %s "checking for $2... " >&6; }
2640 if eval test \${$3+y}
2642 printf %s "(cached) " >&6
2645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646 /* end confdefs.h. */
2657 if ac_fn_c_try_compile "$LINENO"
2659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660 /* end confdefs.h. */
2671 if ac_fn_c_try_compile "$LINENO"
2677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2683 printf "%s\n" "$ac_res" >&6; }
2684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2686 } # ac_fn_c_check_type
2688 # ac_fn_c_check_func LINENO FUNC VAR
2689 # ----------------------------------
2690 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2691 ac_fn_c_check_func ()
2693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2695 printf %s "checking for $2... " >&6; }
2696 if eval test \${$3+y}
2698 printf %s "(cached) " >&6
2700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2701 /* end confdefs.h. */
2702 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2703 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2704 #define $2 innocuous_$2
2706 /* System header to define __stub macros and hopefully few prototypes,
2707 which can conflict with char $2 (); below. */
2712 /* Override any GCC internal prototype to avoid an error.
2713 Use char because int might match the return type of a GCC
2714 builtin and then its argument prototype would still apply. */
2719 /* The GNU C library defines this for functions which it implements
2720 to always fail with ENOSYS. Some functions are actually named
2721 something starting with __ and the normal name is an alias. */
2722 #if defined __stub_$2 || defined __stub___$2
2734 if ac_fn_c_try_link "$LINENO"
2740 rm -f core conftest.err conftest.$ac_objext \
2741 conftest$ac_exeext conftest.$ac_ext
2744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2745 printf "%s\n" "$ac_res" >&6; }
2746 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2748 } # ac_fn_c_check_func
2750 # ac_fn_c_try_run LINENO
2751 # ----------------------
2752 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2753 # executables *can* be run.
2756 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2757 if { { ac_try="$ac_link"
2759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2760 *) ac_try_echo=$ac_try;;
2762 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2763 printf "%s\n" "$ac_try_echo"; } >&5
2764 (eval "$ac_link") 2>&5
2766 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2767 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2768 { { case "(($ac_try" in
2769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2770 *) ac_try_echo=$ac_try;;
2772 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2773 printf "%s\n" "$ac_try_echo"; } >&5
2774 (eval "$ac_try") 2>&5
2776 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2777 test $ac_status = 0; }; }
2781 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2782 printf "%s\n" "$as_me: failed program was:" >&5
2783 sed 's/^/| /' conftest.$ac_ext >&5
2785 ac_retval=$ac_status
2787 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2788 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2789 as_fn_set_status $ac_retval
2793 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2794 # ---------------------------------------------
2795 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2797 ac_fn_c_check_decl ()
2799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2800 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2801 as_decl_name=`echo $2|sed 's/ *(.*//'`
2802 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2804 printf %s "checking whether $as_decl_name is declared... " >&6; }
2805 if eval test \${$3+y}
2807 printf %s "(cached) " >&6
2809 ac_save_werror_flag=$ac_c_werror_flag
2810 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812 /* end confdefs.h. */
2817 #ifndef $as_decl_name
2819 (void) $as_decl_use;
2821 (void) $as_decl_name;
2829 if ac_fn_c_try_compile "$LINENO"
2835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2839 printf "%s\n" "$ac_res" >&6; }
2840 ac_c_werror_flag=$ac_save_werror_flag
2841 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2843 } # ac_fn_c_check_decl
2845 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2846 # --------------------------------------------
2847 # Tries to find the compile-time value of EXPR in a program that includes
2848 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2850 ac_fn_c_compute_int ()
2852 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2853 if test "$cross_compiling" = yes; then
2854 # Depending upon the size, compute the lo and hi bounds.
2855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2856 /* end confdefs.h. */
2861 static int test_array [1 - 2 * !(($2) >= 0)];
2863 return test_array [0];
2869 if ac_fn_c_try_compile "$LINENO"
2873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2874 /* end confdefs.h. */
2879 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2881 return test_array [0];
2887 if ac_fn_c_try_compile "$LINENO"
2889 ac_hi=$ac_mid; break
2891 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2892 if test $ac_lo -le $ac_mid; then
2896 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902 /* end confdefs.h. */
2907 static int test_array [1 - 2 * !(($2) < 0)];
2909 return test_array [0];
2915 if ac_fn_c_try_compile "$LINENO"
2919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2920 /* end confdefs.h. */
2925 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2927 return test_array [0];
2933 if ac_fn_c_try_compile "$LINENO"
2935 ac_lo=$ac_mid; break
2937 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2938 if test $ac_mid -le $ac_hi; then
2942 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2952 # Binary search between lo and hi bounds.
2953 while test "x$ac_lo" != "x$ac_hi"; do
2954 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2956 /* end confdefs.h. */
2961 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2963 return test_array [0];
2969 if ac_fn_c_try_compile "$LINENO"
2973 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2978 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2983 /* end confdefs.h. */
2985 static long int longval () { return $2; }
2986 static unsigned long int ulongval () { return $2; }
2993 FILE *f = fopen ("conftest.val", "w");
2998 long int i = longval ();
3001 fprintf (f, "%ld", i);
3005 unsigned long int i = ulongval ();
3008 fprintf (f, "%lu", i);
3010 /* Do not output a trailing newline, as this causes \r\n confusion
3011 on some platforms. */
3012 return ferror (f) || fclose (f) != 0;
3018 if ac_fn_c_try_run "$LINENO"
3020 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3025 conftest.$ac_objext conftest.beam conftest.$ac_ext
3029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3030 as_fn_set_status $ac_retval
3032 } # ac_fn_c_compute_int
3034 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3035 # ----------------------------------------------------
3036 # Tries to find if the field MEMBER exists in type AGGR, after including
3037 # INCLUDES, setting cache variable VAR accordingly.
3038 ac_fn_c_check_member ()
3040 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3042 printf %s "checking for $2.$3... " >&6; }
3043 if eval test \${$4+y}
3045 printf %s "(cached) " >&6
3047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3048 /* end confdefs.h. */
3060 if ac_fn_c_try_compile "$LINENO"
3064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3065 /* end confdefs.h. */
3071 if (sizeof ac_aggr.$3)
3077 if ac_fn_c_try_compile "$LINENO"
3083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3089 printf "%s\n" "$ac_res" >&6; }
3090 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3092 } # ac_fn_c_check_member
3093 cat >config.log <<_ACEOF
3094 This file contains any messages produced by compilers while
3095 running configure, to aid debugging if configure makes a mistake.
3097 It was created by gzip $as_me 1.9, which was
3098 generated by GNU Autoconf 2.69.193-8974. Invocation command line was
3110 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3111 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3112 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3113 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3114 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3116 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3117 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3119 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3120 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3121 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3122 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3123 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3124 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3125 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3133 case $as_dir in #(((
3136 *) as_dir=$as_dir/ ;;
3138 printf "%s\n" "PATH: $as_dir"
3154 # Keep a trace of the command line.
3155 # Strip out --no-create and --no-recursion so they do not pile up.
3156 # Strip out --silent because we don't want to record it for future runs.
3157 # Also quote any args containing shell meta-characters.
3158 # Make two passes to allow for proper duplicate-argument suppression.
3162 ac_must_keep_next=false
3168 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3169 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3170 | -silent | --silent | --silen | --sile | --sil)
3173 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3176 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3178 as_fn_append ac_configure_args1 " '$ac_arg'"
3179 if test $ac_must_keep_next = true; then
3180 ac_must_keep_next=false # Got value, back to normal.
3183 *=* | --config-cache | -C | -disable-* | --disable-* \
3184 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3185 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3186 | -with-* | --with-* | -without-* | --without-* | --x)
3187 case "$ac_configure_args0 " in
3188 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3191 -* ) ac_must_keep_next=true ;;
3194 as_fn_append ac_configure_args " '$ac_arg'"
3199 { ac_configure_args0=; unset ac_configure_args0;}
3200 { ac_configure_args1=; unset ac_configure_args1;}
3202 # When interrupted or exit'd, cleanup temporary files, and complete
3203 # config.log. We remove comments because anyway the quotes in there
3204 # would cause problems or look ugly.
3205 # WARNING: Use '\'' to represent an apostrophe within the trap.
3206 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3207 trap 'exit_status=$?
3210 # Save into config.log some information that might help in debugging.
3214 printf "%s\n" "## ---------------- ##
3215 ## Cache variables. ##
3216 ## ---------------- ##"
3218 # The following way of writing the cache mishandles newlines in values,
3220 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3221 eval ac_val=\$$ac_var
3225 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3226 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3229 _ | IFS | as_nl) ;; #(
3230 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3231 *) { eval $ac_var=; unset $ac_var;} ;;
3236 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3237 *${as_nl}ac_space=\ *)
3239 "s/'\''/'\''\\\\'\'''\''/g;
3240 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3243 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3250 printf "%s\n" "## ----------------- ##
3251 ## Output variables. ##
3252 ## ----------------- ##"
3254 for ac_var in $ac_subst_vars
3256 eval ac_val=\$$ac_var
3258 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3260 printf "%s\n" "$ac_var='\''$ac_val'\''"
3264 if test -n "$ac_subst_files"; then
3265 printf "%s\n" "## ------------------- ##
3266 ## File substitutions. ##
3267 ## ------------------- ##"
3269 for ac_var in $ac_subst_files
3271 eval ac_val=\$$ac_var
3273 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3275 printf "%s\n" "$ac_var='\''$ac_val'\''"
3280 if test -s confdefs.h; then
3281 printf "%s\n" "## ----------- ##
3288 test "$ac_signal" != 0 &&
3289 printf "%s\n" "$as_me: caught signal $ac_signal"
3290 printf "%s\n" "$as_me: exit $exit_status"
3292 rm -f core *.core core.conftest.* &&
3293 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3296 for ac_signal in 1 2 13 15; do
3297 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3301 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3302 rm -f -r conftest* confdefs.h
3304 printf "%s\n" "/* confdefs.h */" > confdefs.h
3306 # Predefined preprocessor variables.
3308 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3310 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3312 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3314 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3316 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3318 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3321 # Let the site file select an alternate cache file if it wants to.
3322 # Prefer an explicitly selected file to automatically selected ones.
3325 if test -n "$CONFIG_SITE"; then
3326 # We do not want a PATH search for config.site.
3327 case $CONFIG_SITE in #((
3328 -*) ac_site_file1=./$CONFIG_SITE;;
3329 */*) ac_site_file1=$CONFIG_SITE;;
3330 *) ac_site_file1=./$CONFIG_SITE;;
3332 elif test "x$prefix" != xNONE; then
3333 ac_site_file1=$prefix/share/config.site
3334 ac_site_file2=$prefix/etc/config.site
3336 ac_site_file1=$ac_default_prefix/share/config.site
3337 ac_site_file2=$ac_default_prefix/etc/config.site
3339 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3341 test "x$ac_site_file" = xNONE && continue
3342 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3344 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3345 sed 's/^/| /' "$ac_site_file" >&5
3347 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3348 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3349 as_fn_error $? "failed to load site script $ac_site_file
3350 See \`config.log' for more details" "$LINENO" 5; }
3354 if test -r "$cache_file"; then
3355 # Some versions of bash will fail to source /dev/null (special files
3356 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3357 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3359 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3361 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3362 *) . "./$cache_file";;
3366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3367 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3371 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3372 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3373 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3374 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3375 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3376 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3377 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
3378 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
3379 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
3380 as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
3381 as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
3382 as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
3383 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
3384 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
3385 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
3386 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
3387 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
3388 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
3389 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
3390 as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
3391 as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
3392 as_fn_append ac_func_c_list " __freading HAVE___FREADING"
3393 as_fn_append ac_func_c_list " __fseterr HAVE___FSETERR"
3394 as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT"
3395 as_fn_append ac_func_c_list " fsync HAVE_FSYNC"
3396 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
3397 gl_getopt_required=GNU
3398 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
3399 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
3400 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
3401 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
3402 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
3403 as_fn_append ac_func_c_list " nanotime HAVE_NANOTIME"
3404 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
3405 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
3406 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
3407 as_fn_append ac_header_c_list " math.h math_h HAVE_MATH_H"
3408 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
3409 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
3410 as_fn_append ac_func_c_list " openat HAVE_OPENAT"
3411 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
3413 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3414 as_fn_append ac_func_c_list " strdup HAVE_STRDUP"
3415 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
3416 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
3417 as_fn_append ac_func_c_list " unlinkat HAVE_UNLINKAT"
3418 as_fn_append ac_func_c_list " utime HAVE_UTIME"
3419 as_fn_append ac_header_c_list " utime.h utime_h HAVE_UTIME_H"
3420 as_fn_append ac_func_c_list " futimes HAVE_FUTIMES"
3421 as_fn_append ac_func_c_list " futimesat HAVE_FUTIMESAT"
3422 as_fn_append ac_func_c_list " futimens HAVE_FUTIMENS"
3423 as_fn_append ac_func_c_list " utimensat HAVE_UTIMENSAT"
3424 as_fn_append ac_func_c_list " lutimes HAVE_LUTIMES"
3425 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
3426 as_fn_append ac_header_c_list " fcntl.h fcntl_h HAVE_FCNTL_H"
3427 as_fn_append ac_header_c_list " memory.h memory_h HAVE_MEMORY_H"
3428 as_fn_append ac_header_c_list " time.h time_h HAVE_TIME_H"
3429 as_fn_append ac_func_c_list " chown HAVE_CHOWN"
3430 as_fn_append ac_func_c_list " fchmod HAVE_FCHMOD"
3431 as_fn_append ac_func_c_list " fchown HAVE_FCHOWN"
3432 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
3433 # Check that the precious variables saved in the cache have kept the same
3435 ac_cache_corrupted=false
3436 for ac_var in $ac_precious_vars; do
3437 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3438 eval ac_new_set=\$ac_env_${ac_var}_set
3439 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3440 eval ac_new_val=\$ac_env_${ac_var}_value
3441 case $ac_old_set,$ac_new_set in
3443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3444 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3445 ac_cache_corrupted=: ;;
3447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3448 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3449 ac_cache_corrupted=: ;;
3452 if test "x$ac_old_val" != "x$ac_new_val"; then
3453 # differences in whitespace do not lead to failure.
3454 ac_old_val_w=`echo x $ac_old_val`
3455 ac_new_val_w=`echo x $ac_new_val`
3456 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3458 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3459 ac_cache_corrupted=:
3461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3462 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3463 eval $ac_var=\$ac_old_val
3465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3466 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3468 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
3471 # Pass precious variables to config.status.
3472 if test "$ac_new_set" = set; then
3474 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3475 *) ac_arg=$ac_var=$ac_new_val ;;
3477 case " $ac_configure_args " in
3478 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3479 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3483 if $ac_cache_corrupted; then
3484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3485 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3487 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3488 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3490 ## -------------------- ##
3491 ## Main body of script. ##
3492 ## -------------------- ##
3495 ac_cpp='$CPP $CPPFLAGS'
3496 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3497 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3498 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3504 for ac_dir in build-aux "$srcdir"/build-aux
3506 if test -f "$ac_dir/install-sh"; then
3508 ac_install_sh="$ac_aux_dir/install-sh -c"
3510 elif test -f "$ac_dir/install.sh"; then
3512 ac_install_sh="$ac_aux_dir/install.sh -c"
3514 elif test -f "$ac_dir/shtool"; then
3516 ac_install_sh="$ac_aux_dir/shtool install -c"
3520 if test -z "$ac_aux_dir"; then
3521 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3524 # These three variables are undocumented and unsupported,
3525 # and are intended to be withdrawn in a future Autoconf release.
3526 # They can cause serious problems if a builder's source tree is in a directory
3527 # whose full name contains unusual characters.
3528 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3529 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3530 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3534 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3536 am__api_version='1.15a'
3538 # Find a good install program. We prefer a C program (faster),
3539 # so one script is as good as another. But avoid the broken or
3540 # incompatible versions:
3541 # SysV /etc/install, /usr/sbin/install
3542 # SunOS /usr/etc/install
3543 # IRIX /sbin/install
3545 # AmigaOS /C/install, which installs bootblocks on floppy discs
3546 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3547 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3548 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3549 # OS/2's system install, which has a completely different semantic
3550 # ./install, which can be erroneously created by make from ./install.sh.
3551 # Reject install programs that cannot install multiple files.
3552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3553 printf %s "checking for a BSD-compatible install... " >&6; }
3554 if test -z "$INSTALL"; then
3555 if test ${ac_cv_path_install+y}
3557 printf %s "(cached) " >&6
3559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563 case $as_dir in #(((
3566 *) as_dir=$as_dir/ ;;
3568 # Account for fact that we put trailing slashes in our PATH walk.
3571 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3572 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3575 # OSF1 and SCO ODT 3.0 have their own names for install.
3576 # Don't use installbsd from OSF since it installs stuff as root
3578 for ac_prog in ginstall scoinst install; do
3579 for ac_exec_ext in '' $ac_executable_extensions; do
3580 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3581 if test $ac_prog = install &&
3582 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3583 # AIX install. It has an incompatible calling convention.
3585 elif test $ac_prog = install &&
3586 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3587 # program-specific install script used by HP pwplus--don't use.
3590 rm -rf conftest.one conftest.two conftest.dir
3591 echo one > conftest.one
3592 echo two > conftest.two
3594 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3595 test -s conftest.one && test -s conftest.two &&
3596 test -s conftest.dir/conftest.one &&
3597 test -s conftest.dir/conftest.two
3599 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3612 rm -rf conftest.one conftest.two conftest.dir
3615 if test ${ac_cv_path_install+y}; then
3616 INSTALL=$ac_cv_path_install
3618 # As a last resort, use the slow shell script. Don't cache a
3619 # value for INSTALL within a source directory, because that will
3620 # break other packages using the cache if that directory is
3621 # removed, or if the value is a relative name.
3622 INSTALL=$ac_install_sh
3625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3626 printf "%s\n" "$INSTALL" >&6; }
3628 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3629 # It thinks the first close brace ends the variable substitution.
3630 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3632 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3634 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3637 printf %s "checking whether build environment is sane... " >&6; }
3638 # Reject unsafe characters in $srcdir or the absolute working directory
3639 # name. Accept space and tab only in the latter.
3643 *[\\\"\#\$\&\'\`$am_lf]*)
3644 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3647 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3648 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3651 # Do 'set' in a subshell so we don't clobber the current shell's
3652 # arguments. Must try -L first in case configure is actually a
3653 # symlink; some systems play weird games with the mod time of symlinks
3654 # (eg FreeBSD returns the mod time of the symlink's containing
3658 for am_try in 1 2; do
3659 echo "timestamp, slept: $am_has_slept" > conftest.file
3660 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3661 if test "$*" = "X"; then
3663 set X `ls -t "$srcdir/configure" conftest.file`
3665 if test "$*" != "X $srcdir/configure conftest.file" \
3666 && test "$*" != "X conftest.file $srcdir/configure"; then
3668 # If neither matched, then we have a broken ls. This can happen
3669 # if, for instance, CONFIG_SHELL is bash and it inherits a
3670 # broken ls alias from the environment. This has actually
3671 # happened. Such a system could not be considered "sane".
3672 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3673 alias in your environment" "$LINENO" 5
3675 if test "$2" = conftest.file || test $am_try -eq 2; then
3682 test "$2" = conftest.file
3688 as_fn_error $? "newly created file is older than distributed files!
3689 Check your system clock" "$LINENO" 5
3691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3692 printf "%s\n" "yes" >&6; }
3693 # If we didn't sleep, we still need to ensure time stamps of config.status and
3694 # generated files are strictly newer.
3696 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3703 test "$program_prefix" != NONE &&
3704 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3705 # Use a double $ so make ignores it.
3706 test "$program_suffix" != NONE &&
3707 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3708 # Double any \ or $.
3709 # By default was `s,x,x', remove it if useless.
3710 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3711 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3713 # Expand $ac_aux_dir to an absolute path.
3714 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3716 if test x"${MISSING+set}" != xset; then
3719 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3721 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3724 # Use eval to expand $SHELL
3725 if eval "$MISSING --is-lightweight"; then
3726 am_missing_run="$MISSING "
3729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3730 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3733 if test x"${install_sh+set}" != xset; then
3736 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3738 install_sh="\${SHELL} $am_aux_dir/install-sh"
3742 # Installed binaries are usually stripped using 'strip' when the user
3743 # run "make install-strip". However 'strip' might not be the right
3744 # tool to use in cross-compilation environments, therefore Automake
3745 # will honor the 'STRIP' environment variable to overrule this program.
3746 if test "$cross_compiling" != no; then
3747 if test -n "$ac_tool_prefix"; then
3748 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3749 set dummy ${ac_tool_prefix}strip; ac_word=$2
3750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3751 printf %s "checking for $ac_word... " >&6; }
3752 if test ${ac_cv_prog_STRIP+y}
3754 printf %s "(cached) " >&6
3756 if test -n "$STRIP"; then
3757 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3763 case $as_dir in #(((
3766 *) as_dir=$as_dir/ ;;
3768 for ac_exec_ext in '' $ac_executable_extensions; do
3769 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3770 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3771 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3780 STRIP=$ac_cv_prog_STRIP
3781 if test -n "$STRIP"; then
3782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3783 printf "%s\n" "$STRIP" >&6; }
3785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3786 printf "%s\n" "no" >&6; }
3791 if test -z "$ac_cv_prog_STRIP"; then
3793 # Extract the first word of "strip", so it can be a program name with args.
3794 set dummy strip; ac_word=$2
3795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796 printf %s "checking for $ac_word... " >&6; }
3797 if test ${ac_cv_prog_ac_ct_STRIP+y}
3799 printf %s "(cached) " >&6
3801 if test -n "$ac_ct_STRIP"; then
3802 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3808 case $as_dir in #(((
3811 *) as_dir=$as_dir/ ;;
3813 for ac_exec_ext in '' $ac_executable_extensions; do
3814 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3815 ac_cv_prog_ac_ct_STRIP="strip"
3816 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3825 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3826 if test -n "$ac_ct_STRIP"; then
3827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3828 printf "%s\n" "$ac_ct_STRIP" >&6; }
3830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831 printf "%s\n" "no" >&6; }
3834 if test "x$ac_ct_STRIP" = x; then
3837 case $cross_compiling:$ac_tool_warned in
3839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3840 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3841 ac_tool_warned=yes ;;
3846 STRIP="$ac_cv_prog_STRIP"
3850 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3853 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3854 if test -z "$MKDIR_P"; then
3855 if test ${ac_cv_path_mkdir+y}
3857 printf %s "(cached) " >&6
3859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3863 case $as_dir in #(((
3866 *) as_dir=$as_dir/ ;;
3868 for ac_prog in mkdir gmkdir; do
3869 for ac_exec_ext in '' $ac_executable_extensions; do
3870 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3871 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3872 'mkdir ('*'coreutils) '* | \
3874 'mkdir (fileutils) '4.1*)
3875 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3885 test -d ./--version && rmdir ./--version
3886 if test ${ac_cv_path_mkdir+y}; then
3887 MKDIR_P="$ac_cv_path_mkdir -p"
3889 # As a last resort, use the slow shell script. Don't cache a
3890 # value for MKDIR_P within a source directory, because that will
3891 # break other packages using the cache if that directory is
3892 # removed, or if the value is a relative name.
3893 MKDIR_P="$ac_install_sh -d"
3896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3897 printf "%s\n" "$MKDIR_P" >&6; }
3899 for ac_prog in gawk mawk nawk awk
3901 # Extract the first word of "$ac_prog", so it can be a program name with args.
3902 set dummy $ac_prog; ac_word=$2
3903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3904 printf %s "checking for $ac_word... " >&6; }
3905 if test ${ac_cv_prog_AWK+y}
3907 printf %s "(cached) " >&6
3909 if test -n "$AWK"; then
3910 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3916 case $as_dir in #(((
3919 *) as_dir=$as_dir/ ;;
3921 for ac_exec_ext in '' $ac_executable_extensions; do
3922 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3923 ac_cv_prog_AWK="$ac_prog"
3924 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3934 if test -n "$AWK"; then
3935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3936 printf "%s\n" "$AWK" >&6; }
3938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3939 printf "%s\n" "no" >&6; }
3943 test -n "$AWK" && break
3946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3947 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3949 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3950 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3952 printf %s "(cached) " >&6
3954 cat >conftest.make <<\_ACEOF
3957 @echo '@@@%%%=$(MAKE)=@@@%%%'
3959 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3960 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3962 eval ac_cv_prog_make_${ac_make}_set=yes;;
3964 eval ac_cv_prog_make_${ac_make}_set=no;;
3968 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3970 printf "%s\n" "yes" >&6; }
3973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974 printf "%s\n" "no" >&6; }
3975 SET_MAKE="MAKE=${MAKE-make}"
3978 rm -rf .tst 2>/dev/null
3979 mkdir .tst 2>/dev/null
3980 if test -d .tst; then
3985 rmdir .tst 2>/dev/null
3987 # Check whether --enable-silent-rules was given.
3988 if test ${enable_silent_rules+y}
3990 enableval=$enable_silent_rules;
3993 case $enable_silent_rules in # (((
3994 yes) AM_DEFAULT_VERBOSITY=0;;
3995 no) AM_DEFAULT_VERBOSITY=1;;
3996 *) AM_DEFAULT_VERBOSITY=1;;
3998 am_make=${MAKE-make}
3999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4000 printf %s "checking whether $am_make supports nested variables... " >&6; }
4001 if test ${am_cv_make_support_nested_variables+y}
4003 printf %s "(cached) " >&6
4005 if printf "%s\n" 'TRUE=$(BAR$(V))
4011 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4012 am_cv_make_support_nested_variables=yes
4014 am_cv_make_support_nested_variables=no
4017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4018 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4019 if test $am_cv_make_support_nested_variables = yes; then
4021 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4023 AM_V=$AM_DEFAULT_VERBOSITY
4024 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4028 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4029 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4030 # is not polluted with repeated "-I."
4031 am__isrc=' -I$(srcdir)'
4032 # test to see if srcdir already configured
4033 if test -f $srcdir/config.status; then
4034 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4038 # test whether we have cygpath
4039 if test -z "$CYGPATH_W"; then
4040 if (cygpath --version) >/dev/null 2>/dev/null; then
4041 CYGPATH_W='cygpath -w'
4048 # Define the identity of the package.
4053 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4056 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4058 # Some tools Automake needs.
4060 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4063 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4066 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4069 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4072 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4074 # For better backward compatibility. To be removed once Automake 1.9.x
4075 # dies out for good. For more background, see:
4076 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4077 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4078 mkdir_p='$(MKDIR_P)'
4080 # We need awk for the "check" target (and possibly the TAP driver). The
4081 # system "awk" is bad on some platforms.
4082 # Always define AMTAR for backward compatibility. Yes, it's still used
4083 # in the wild :-( We should find a proper way to deprecate it ...
4087 # We'll loop over all known methods to create a tar archive until one works.
4088 _am_tools='gnutar pax cpio none'
4090 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4097 # POSIX will say in a future version that running "rm -f" with no argument
4098 # is OK; and we want to be able to make that assumption in our Makefile
4099 # recipes. So use an aggressive probe to check that the usage we want is
4100 # actually supported "in the wild" to an acceptable degree.
4101 # See automake bug#10828.
4102 # To make any issue more visible, cause the running configure to be aborted
4103 # by default if the 'rm' program in use doesn't match our expectations; the
4104 # user can still override this though.
4105 if rm -f && rm -fr && rm -rf; then : OK; else
4109 Your 'rm' program seems unable to run without file operands specified
4110 on the command line, even when the '-f' option is present. This is contrary
4111 to the behaviour of most rm programs out there, and not conforming with
4112 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4114 Please tell bug-automake@gnu.org about your system, including the value
4115 of your $PATH and any error possibly output before this message. This
4116 can help us improve future automake versions.
4119 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4120 echo 'Configuration will proceed anyway, since you have set the' >&2
4121 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4125 Aborting the configuration process, to ensure you take notice of the issue.
4127 You can download and install GNU coreutils to get an 'rm' implementation
4128 that behaves properly: <https://www.gnu.org/software/coreutils/>.
4130 If you want to complete the configuration process using your problematic
4131 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4132 to "yes", and re-run configure.
4135 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4139 # Check whether --enable-silent-rules was given.
4140 if test ${enable_silent_rules+y}
4142 enableval=$enable_silent_rules;
4145 case $enable_silent_rules in # (((
4146 yes) AM_DEFAULT_VERBOSITY=0;;
4147 no) AM_DEFAULT_VERBOSITY=1;;
4148 *) AM_DEFAULT_VERBOSITY=0;;
4150 am_make=${MAKE-make}
4151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4152 printf %s "checking whether $am_make supports nested variables... " >&6; }
4153 if test ${am_cv_make_support_nested_variables+y}
4155 printf %s "(cached) " >&6
4157 if printf "%s\n" 'TRUE=$(BAR$(V))
4163 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4164 am_cv_make_support_nested_variables=yes
4166 am_cv_make_support_nested_variables=no
4169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4170 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4171 if test $am_cv_make_support_nested_variables = yes; then
4173 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4175 AM_V=$AM_DEFAULT_VERBOSITY
4176 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4179 # make --enable-silent-rules the default.
4186 DEPDIR="${am__leading_dot}deps"
4188 ac_config_commands="$ac_config_commands depfiles"
4190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4191 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4192 cat > confinc.mk << 'END'
4194 @echo this is the am__doit target >confinc.out
4199 # BSD make does it like this.
4200 echo '.include "confinc.mk" # ignored' > confmf.BSD
4201 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4202 echo 'include confinc.mk # ignored' > confmf.GNU
4204 for s in GNU BSD; do
4205 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4206 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); }
4210 case $?:`cat confinc.out 2>/dev/null` in #(
4211 '0:this is the am__doit target') :
4214 am__include='.include' am__quote='"' ;; #(
4216 am__include='include' am__quote='' ;;
4221 if test "$am__include" != "#"; then
4222 _am_result="yes ($s style)"
4226 rm -f confinc.* confmf.*
4227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4228 printf "%s\n" "${_am_result}" >&6; }
4230 # Check whether --enable-dependency-tracking was given.
4231 if test ${enable_dependency_tracking+y}
4233 enableval=$enable_dependency_tracking;
4236 if test "x$enable_dependency_tracking" != xno; then
4237 am_depcomp="$ac_aux_dir/depcomp"
4241 if test "x$enable_dependency_tracking" != xno; then
4251 ac_cpp='$CPP $CPPFLAGS'
4252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4255 if test -n "$ac_tool_prefix"; then
4256 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4257 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4259 printf %s "checking for $ac_word... " >&6; }
4260 if test ${ac_cv_prog_CC+y}
4262 printf %s "(cached) " >&6
4264 if test -n "$CC"; then
4265 ac_cv_prog_CC="$CC" # Let the user override the test.
4267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4271 case $as_dir in #(((
4274 *) as_dir=$as_dir/ ;;
4276 for ac_exec_ext in '' $ac_executable_extensions; do
4277 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4278 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4279 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4289 if test -n "$CC"; then
4290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4291 printf "%s\n" "$CC" >&6; }
4293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4294 printf "%s\n" "no" >&6; }
4299 if test -z "$ac_cv_prog_CC"; then
4301 # Extract the first word of "gcc", so it can be a program name with args.
4302 set dummy gcc; ac_word=$2
4303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4304 printf %s "checking for $ac_word... " >&6; }
4305 if test ${ac_cv_prog_ac_ct_CC+y}
4307 printf %s "(cached) " >&6
4309 if test -n "$ac_ct_CC"; then
4310 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316 case $as_dir in #(((
4319 *) as_dir=$as_dir/ ;;
4321 for ac_exec_ext in '' $ac_executable_extensions; do
4322 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4323 ac_cv_prog_ac_ct_CC="gcc"
4324 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4333 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4334 if test -n "$ac_ct_CC"; then
4335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4336 printf "%s\n" "$ac_ct_CC" >&6; }
4338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4339 printf "%s\n" "no" >&6; }
4342 if test "x$ac_ct_CC" = x; then
4345 case $cross_compiling:$ac_tool_warned in
4347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4348 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4349 ac_tool_warned=yes ;;
4357 if test -z "$CC"; then
4358 if test -n "$ac_tool_prefix"; then
4359 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4360 set dummy ${ac_tool_prefix}cc; ac_word=$2
4361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4362 printf %s "checking for $ac_word... " >&6; }
4363 if test ${ac_cv_prog_CC+y}
4365 printf %s "(cached) " >&6
4367 if test -n "$CC"; then
4368 ac_cv_prog_CC="$CC" # Let the user override the test.
4370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4374 case $as_dir in #(((
4377 *) as_dir=$as_dir/ ;;
4379 for ac_exec_ext in '' $ac_executable_extensions; do
4380 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4381 ac_cv_prog_CC="${ac_tool_prefix}cc"
4382 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4392 if test -n "$CC"; then
4393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4394 printf "%s\n" "$CC" >&6; }
4396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4397 printf "%s\n" "no" >&6; }
4403 if test -z "$CC"; then
4404 # Extract the first word of "cc", so it can be a program name with args.
4405 set dummy cc; ac_word=$2
4406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4407 printf %s "checking for $ac_word... " >&6; }
4408 if test ${ac_cv_prog_CC+y}
4410 printf %s "(cached) " >&6
4412 if test -n "$CC"; then
4413 ac_cv_prog_CC="$CC" # Let the user override the test.
4416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4420 case $as_dir in #(((
4423 *) as_dir=$as_dir/ ;;
4425 for ac_exec_ext in '' $ac_executable_extensions; do
4426 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4427 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4428 ac_prog_rejected=yes
4432 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4439 if test $ac_prog_rejected = yes; then
4440 # We found a bogon in the path, so make sure we never use it.
4441 set dummy $ac_cv_prog_CC
4443 if test $# != 0; then
4444 # We chose a different compiler from the bogus one.
4445 # However, it has the same basename, so the bogon will be chosen
4446 # first if we set CC to just the basename; use the full file name.
4448 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4454 if test -n "$CC"; then
4455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4456 printf "%s\n" "$CC" >&6; }
4458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4459 printf "%s\n" "no" >&6; }
4464 if test -z "$CC"; then
4465 if test -n "$ac_tool_prefix"; then
4466 for ac_prog in cl.exe
4468 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4469 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471 printf %s "checking for $ac_word... " >&6; }
4472 if test ${ac_cv_prog_CC+y}
4474 printf %s "(cached) " >&6
4476 if test -n "$CC"; then
4477 ac_cv_prog_CC="$CC" # Let the user override the test.
4479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4483 case $as_dir in #(((
4486 *) as_dir=$as_dir/ ;;
4488 for ac_exec_ext in '' $ac_executable_extensions; do
4489 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4490 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4491 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4501 if test -n "$CC"; then
4502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4503 printf "%s\n" "$CC" >&6; }
4505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4506 printf "%s\n" "no" >&6; }
4510 test -n "$CC" && break
4513 if test -z "$CC"; then
4515 for ac_prog in cl.exe
4517 # Extract the first word of "$ac_prog", so it can be a program name with args.
4518 set dummy $ac_prog; ac_word=$2
4519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4520 printf %s "checking for $ac_word... " >&6; }
4521 if test ${ac_cv_prog_ac_ct_CC+y}
4523 printf %s "(cached) " >&6
4525 if test -n "$ac_ct_CC"; then
4526 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4532 case $as_dir in #(((
4535 *) as_dir=$as_dir/ ;;
4537 for ac_exec_ext in '' $ac_executable_extensions; do
4538 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4539 ac_cv_prog_ac_ct_CC="$ac_prog"
4540 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4549 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4550 if test -n "$ac_ct_CC"; then
4551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4552 printf "%s\n" "$ac_ct_CC" >&6; }
4554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555 printf "%s\n" "no" >&6; }
4559 test -n "$ac_ct_CC" && break
4562 if test "x$ac_ct_CC" = x; then
4565 case $cross_compiling:$ac_tool_warned in
4567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4568 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4569 ac_tool_warned=yes ;;
4576 if test -z "$CC"; then
4577 if test -n "$ac_tool_prefix"; then
4578 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4579 set dummy ${ac_tool_prefix}clang; ac_word=$2
4580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4581 printf %s "checking for $ac_word... " >&6; }
4582 if test ${ac_cv_prog_CC+y}
4584 printf %s "(cached) " >&6
4586 if test -n "$CC"; then
4587 ac_cv_prog_CC="$CC" # Let the user override the test.
4589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593 case $as_dir in #(((
4596 *) as_dir=$as_dir/ ;;
4598 for ac_exec_ext in '' $ac_executable_extensions; do
4599 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4600 ac_cv_prog_CC="${ac_tool_prefix}clang"
4601 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4611 if test -n "$CC"; then
4612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4613 printf "%s\n" "$CC" >&6; }
4615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4616 printf "%s\n" "no" >&6; }
4621 if test -z "$ac_cv_prog_CC"; then
4623 # Extract the first word of "clang", so it can be a program name with args.
4624 set dummy clang; ac_word=$2
4625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626 printf %s "checking for $ac_word... " >&6; }
4627 if test ${ac_cv_prog_ac_ct_CC+y}
4629 printf %s "(cached) " >&6
4631 if test -n "$ac_ct_CC"; then
4632 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638 case $as_dir in #(((
4641 *) as_dir=$as_dir/ ;;
4643 for ac_exec_ext in '' $ac_executable_extensions; do
4644 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4645 ac_cv_prog_ac_ct_CC="clang"
4646 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4656 if test -n "$ac_ct_CC"; then
4657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4658 printf "%s\n" "$ac_ct_CC" >&6; }
4660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661 printf "%s\n" "no" >&6; }
4664 if test "x$ac_ct_CC" = x; then
4667 case $cross_compiling:$ac_tool_warned in
4669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4670 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4671 ac_tool_warned=yes ;;
4682 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4683 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4684 as_fn_error $? "no acceptable C compiler found in \$PATH
4685 See \`config.log' for more details" "$LINENO" 5; }
4687 # Provide some information about the compiler.
4688 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4691 for ac_option in --version -v -V -qversion -version; do
4692 { { ac_try="$ac_compiler $ac_option >&5"
4694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4695 *) ac_try_echo=$ac_try;;
4697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4698 printf "%s\n" "$ac_try_echo"; } >&5
4699 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4701 if test -s conftest.err; then
4703 ... rest of stderr output deleted ...
4704 10q' conftest.err >conftest.er1
4705 cat conftest.er1 >&5
4707 rm -f conftest.er1 conftest.err
4708 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4709 test $ac_status = 0; }
4712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4713 /* end confdefs.h. */
4723 ac_clean_files_save=$ac_clean_files
4724 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4725 # Try to create an executable without -o first, disregard a.out.
4726 # It will help us diagnose broken compilers, and finding out an intuition
4728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4729 printf %s "checking whether the C compiler works... " >&6; }
4730 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4732 # The possible output files:
4733 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4736 for ac_file in $ac_files
4739 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4740 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4745 if { { ac_try="$ac_link_default"
4747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4748 *) ac_try_echo=$ac_try;;
4750 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4751 printf "%s\n" "$ac_try_echo"; } >&5
4752 (eval "$ac_link_default") 2>&5
4754 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4755 test $ac_status = 0; }
4757 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4758 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4759 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4760 # so that the user can short-circuit this test for compilers unknown to
4762 for ac_file in $ac_files ''
4764 test -f "$ac_file" || continue
4766 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4769 # We found the default executable, but exeext='' is most
4773 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4775 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4777 # We set ac_cv_exeext here because the later test for it is not
4778 # safe: cross compilers may not add the suffix if given an `-o'
4779 # argument, so we may need to know it at that point already.
4780 # Even if this section looks crufty: it has the advantage of
4787 test "$ac_cv_exeext" = no && ac_cv_exeext=
4792 if test -z "$ac_file"
4794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4795 printf "%s\n" "no" >&6; }
4796 printf "%s\n" "$as_me: failed program was:" >&5
4797 sed 's/^/| /' conftest.$ac_ext >&5
4799 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4800 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4801 as_fn_error 77 "C compiler cannot create executables
4802 See \`config.log' for more details" "$LINENO" 5; }
4804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4805 printf "%s\n" "yes" >&6; }
4807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4808 printf %s "checking for C compiler default output file name... " >&6; }
4809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4810 printf "%s\n" "$ac_file" >&6; }
4811 ac_exeext=$ac_cv_exeext
4813 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4814 ac_clean_files=$ac_clean_files_save
4815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4816 printf %s "checking for suffix of executables... " >&6; }
4817 if { { ac_try="$ac_link"
4819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4820 *) ac_try_echo=$ac_try;;
4822 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4823 printf "%s\n" "$ac_try_echo"; } >&5
4824 (eval "$ac_link") 2>&5
4826 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4827 test $ac_status = 0; }
4829 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4830 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4831 # work properly (i.e., refer to `conftest.exe'), while it won't with
4833 for ac_file in conftest.exe conftest conftest.*; do
4834 test -f "$ac_file" || continue
4836 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4837 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4843 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4844 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4845 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4846 See \`config.log' for more details" "$LINENO" 5; }
4848 rm -f conftest conftest$ac_cv_exeext
4849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4850 printf "%s\n" "$ac_cv_exeext" >&6; }
4852 rm -f conftest.$ac_ext
4853 EXEEXT=$ac_cv_exeext
4855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4856 /* end confdefs.h. */
4861 FILE *f = fopen ("conftest.out", "w");
4862 return ferror (f) || fclose (f) != 0;
4868 ac_clean_files="$ac_clean_files conftest.out"
4869 # Check that the compiler produces executables we can run. If not, either
4870 # the compiler is broken, or we cross compile.
4871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4872 printf %s "checking whether we are cross compiling... " >&6; }
4873 if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
4875 elif test "$cross_compiling" != yes; then
4876 { { ac_try="$ac_link"
4878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4879 *) ac_try_echo=$ac_try;;
4881 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4882 printf "%s\n" "$ac_try_echo"; } >&5
4883 (eval "$ac_link") 2>&5
4885 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4886 test $ac_status = 0; }
4887 if { ac_try='./conftest$ac_cv_exeext'
4888 { { case "(($ac_try" in
4889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4890 *) ac_try_echo=$ac_try;;
4892 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4893 printf "%s\n" "$ac_try_echo"; } >&5
4894 (eval "$ac_try") 2>&5
4896 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4897 test $ac_status = 0; }; }; then
4900 if test "$cross_compiling" = maybe; then
4903 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4904 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4905 as_fn_error $? "cannot run C compiled programs.
4906 If you meant to cross compile, use \`--host'.
4907 See \`config.log' for more details" "$LINENO" 5; }
4911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4912 printf "%s\n" "$cross_compiling" >&6; }
4914 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4915 ac_clean_files=$ac_clean_files_save
4916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4917 printf %s "checking for suffix of object files... " >&6; }
4918 if test ${ac_cv_objext+y}
4920 printf %s "(cached) " >&6
4922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923 /* end confdefs.h. */
4933 rm -f conftest.o conftest.obj
4934 if { { ac_try="$ac_compile"
4936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4937 *) ac_try_echo=$ac_try;;
4939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4940 printf "%s\n" "$ac_try_echo"; } >&5
4941 (eval "$ac_compile") 2>&5
4943 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4944 test $ac_status = 0; }
4946 for ac_file in conftest.o conftest.obj conftest.*; do
4947 test -f "$ac_file" || continue;
4949 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4950 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4955 printf "%s\n" "$as_me: failed program was:" >&5
4956 sed 's/^/| /' conftest.$ac_ext >&5
4958 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4959 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4960 as_fn_error $? "cannot compute suffix of object files: cannot compile
4961 See \`config.log' for more details" "$LINENO" 5; }
4963 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4966 printf "%s\n" "$ac_cv_objext" >&6; }
4967 OBJEXT=$ac_cv_objext
4969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4970 printf %s "checking whether the compiler supports GNU C... " >&6; }
4971 if test ${ac_cv_c_compiler_gnu+y}
4973 printf %s "(cached) " >&6
4975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4976 /* end confdefs.h. */
4989 if ac_fn_c_try_compile "$LINENO"
4995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4996 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5000 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5001 if test $ac_compiler_gnu = yes; then
5006 ac_test_CFLAGS=${CFLAGS+y}
5007 ac_save_CFLAGS=$CFLAGS
5008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5009 printf %s "checking whether $CC accepts -g... " >&6; }
5010 if test ${ac_cv_prog_cc_g+y}
5012 printf %s "(cached) " >&6
5014 ac_save_c_werror_flag=$ac_c_werror_flag
5015 ac_c_werror_flag=yes
5018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5019 /* end confdefs.h. */
5029 if ac_fn_c_try_compile "$LINENO"
5034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5035 /* end confdefs.h. */
5045 if ac_fn_c_try_compile "$LINENO"
5049 ac_c_werror_flag=$ac_save_c_werror_flag
5051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5052 /* end confdefs.h. */
5062 if ac_fn_c_try_compile "$LINENO"
5066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5071 ac_c_werror_flag=$ac_save_c_werror_flag
5073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5074 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5075 if test $ac_test_CFLAGS; then
5076 CFLAGS=$ac_save_CFLAGS
5077 elif test $ac_cv_prog_cc_g = yes; then
5078 if test "$GCC" = yes; then
5084 if test "$GCC" = yes; then
5090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5091 printf %s "checking for $CC option to enable C11 features... " >&6; }
5092 if test ${ac_cv_prog_cc_c11+y}
5094 printf %s "(cached) " >&6
5096 ac_cv_prog_cc_c11=no
5098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5099 /* end confdefs.h. */
5101 #include <stdbool.h>
5107 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5108 #define debug(...) fprintf (stderr, __VA_ARGS__)
5109 #define showlist(...) puts (#__VA_ARGS__)
5110 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5112 test_varargs_macros (void)
5117 debug ("X = %d\n", x);
5118 showlist (The first, second, and third items.);
5119 report (x>y, "x is %d but y is %d", x, y);
5122 // Check long long types.
5123 #define BIG64 18446744073709551615ull
5124 #define BIG32 4294967295ul
5125 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5127 your preprocessor is broken;
5131 your preprocessor is broken;
5133 static long long int bignum = -9223372036854775807LL;
5134 static unsigned long long int ubignum = BIG64;
5136 struct incomplete_array
5144 const wchar_t *name;
5148 typedef const char *ccp;
5151 test_restrict (ccp restrict text)
5153 // See if C++-style comments work.
5154 // Iterate through items via the restricted pointer.
5155 // Also check for declarations in for loops.
5156 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5161 // Check varargs and va_copy.
5163 test_varargs (const char *format, ...)
5166 va_start (args, format);
5168 va_copy (args_copy, args);
5170 const char *str = "";
5179 str = va_arg (args_copy, const char *);
5182 number = va_arg (args_copy, int);
5185 fnumber = va_arg (args_copy, double);
5194 return *str && number && fnumber;
5197 char _Alignas (double) aligned_as_double;
5198 char _Alignas (0) no_special_alignment;
5199 extern char aligned_as_int;
5200 char _Alignas (0) _Alignas (int) aligned_as_int;
5205 int_alignment = _Alignof (int),
5206 int_array_alignment = _Alignof (int[100]),
5207 char_alignment = _Alignof (char)
5209 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5212 int _Noreturn does_not_return (void) { for (;;) continue; }
5214 // Check _Static_assert.
5215 struct test_static_assert
5218 _Static_assert (sizeof (int) <= sizeof (long int),
5219 "_Static_assert does not work in struct");
5223 // Check UTF-8 literals.
5224 #define u8 syntax error!
5225 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5227 // Check duplicate typedefs.
5228 typedef long *long_ptr;
5229 typedef long int *long_ptr;
5230 typedef long_ptr long_ptr;
5232 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5236 struct { int i; int j; };
5237 struct { int k; long int l; } w;
5247 _Bool success = false;
5250 if (test_restrict ("String literal") == 0)
5252 char *restrict newvar = "Another string";
5255 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5256 test_varargs_macros ();
5258 // Check flexible array members.
5259 struct incomplete_array *ia =
5260 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5262 for (int i = 0; i < ia->datasize; ++i)
5263 ia->data[i] = i * 1.234;
5265 // Check named initializers.
5266 struct named_init ni = {
5268 .name = L"Test wide string",
5269 .average = 543.34343,
5274 int dynamic_array[ni.number];
5275 dynamic_array[ni.number - 1] = 543;
5277 // work around unused variable warnings
5278 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5279 || dynamic_array[ni.number - 1] != 543);
5283 _Static_assert ((offsetof (struct anonymous, i)
5284 == offsetof (struct anonymous, w.k)),
5285 "Anonymous union alignment botch");
5291 for ac_arg in '' -std=gnu11
5293 CC="$ac_save_CC $ac_arg"
5294 if ac_fn_c_try_compile "$LINENO"
5296 ac_cv_prog_cc_c11=$ac_arg
5298 rm -f core conftest.err conftest.$ac_objext
5299 test "x$ac_cv_prog_cc_c11" != "xno" && break
5301 rm -f conftest.$ac_ext
5306 ac_prog_cc_stdc_options=
5307 case "x$ac_cv_prog_cc_c11" in
5309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5310 printf "%s\n" "none needed" >&6; } ;;
5312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5313 printf "%s\n" "unsupported" >&6; } ;;
5315 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5316 CC=$CC$ac_prog_cc_stdc_options
5317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5318 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5320 if test "x$ac_cv_prog_cc_c11" != xno
5323 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5326 printf %s "checking for $CC option to enable C99 features... " >&6; }
5327 if test ${ac_cv_prog_cc_c99+y}
5329 printf %s "(cached) " >&6
5331 ac_cv_prog_cc_c99=no
5333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5334 /* end confdefs.h. */
5336 #include <stdbool.h>
5342 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5343 #define debug(...) fprintf (stderr, __VA_ARGS__)
5344 #define showlist(...) puts (#__VA_ARGS__)
5345 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5347 test_varargs_macros (void)
5352 debug ("X = %d\n", x);
5353 showlist (The first, second, and third items.);
5354 report (x>y, "x is %d but y is %d", x, y);
5357 // Check long long types.
5358 #define BIG64 18446744073709551615ull
5359 #define BIG32 4294967295ul
5360 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5362 your preprocessor is broken;
5366 your preprocessor is broken;
5368 static long long int bignum = -9223372036854775807LL;
5369 static unsigned long long int ubignum = BIG64;
5371 struct incomplete_array
5379 const wchar_t *name;
5383 typedef const char *ccp;
5386 test_restrict (ccp restrict text)
5388 // See if C++-style comments work.
5389 // Iterate through items via the restricted pointer.
5390 // Also check for declarations in for loops.
5391 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5396 // Check varargs and va_copy.
5398 test_varargs (const char *format, ...)
5401 va_start (args, format);
5403 va_copy (args_copy, args);
5405 const char *str = "";
5414 str = va_arg (args_copy, const char *);
5417 number = va_arg (args_copy, int);
5420 fnumber = va_arg (args_copy, double);
5429 return *str && number && fnumber;
5436 _Bool success = false;
5439 if (test_restrict ("String literal") == 0)
5441 char *restrict newvar = "Another string";
5444 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5445 test_varargs_macros ();
5447 // Check flexible array members.
5448 struct incomplete_array *ia =
5449 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5451 for (int i = 0; i < ia->datasize; ++i)
5452 ia->data[i] = i * 1.234;
5454 // Check named initializers.
5455 struct named_init ni = {
5457 .name = L"Test wide string",
5458 .average = 543.34343,
5463 int dynamic_array[ni.number];
5464 dynamic_array[ni.number - 1] = 543;
5466 // work around unused variable warnings
5467 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5468 || dynamic_array[ni.number - 1] != 543);
5474 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5476 CC="$ac_save_CC $ac_arg"
5477 if ac_fn_c_try_compile "$LINENO"
5479 ac_cv_prog_cc_c99=$ac_arg
5481 rm -f core conftest.err conftest.$ac_objext
5482 test "x$ac_cv_prog_cc_c99" != "xno" && break
5484 rm -f conftest.$ac_ext
5489 ac_prog_cc_stdc_options=
5490 case "x$ac_cv_prog_cc_c99" in
5492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5493 printf "%s\n" "none needed" >&6; } ;;
5495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5496 printf "%s\n" "unsupported" >&6; } ;;
5498 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5499 CC=$CC$ac_prog_cc_stdc_options
5500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5501 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5503 if test "x$ac_cv_prog_cc_c99" != xno
5506 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5509 printf %s "checking for $CC option to enable C89 features... " >&6; }
5510 if test ${ac_cv_prog_cc_c89+y}
5512 printf %s "(cached) " >&6
5514 ac_cv_prog_cc_c89=no
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517 /* end confdefs.h. */
5521 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5522 struct buf { int x; };
5523 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5524 static char *e (p, i)
5530 static char *f (char * (*g) (char **, int), char **p, ...)
5535 s = g (p, va_arg (v,int));
5540 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5541 function prototypes and stuff, but not '\xHH' hex character constants.
5542 These don't provoke an error unfortunately, instead are silently treated
5543 as 'x'. The following induces an error, until -std is added to get
5544 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5545 array size at least. It's necessary to write '\x00'==0 to get something
5546 that's true only with -std. */
5547 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5549 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5550 inside strings and character constants. */
5552 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5554 int test (int i, double x);
5555 struct s1 {int (*f) (int a);};
5556 struct s2 {int (*f) (double a);};
5557 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5563 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5568 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5569 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5571 CC="$ac_save_CC $ac_arg"
5572 if ac_fn_c_try_compile "$LINENO"
5574 ac_cv_prog_cc_c89=$ac_arg
5576 rm -f core conftest.err conftest.$ac_objext
5577 test "x$ac_cv_prog_cc_c89" != "xno" && break
5579 rm -f conftest.$ac_ext
5584 ac_prog_cc_stdc_options=
5585 case "x$ac_cv_prog_cc_c89" in
5587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5588 printf "%s\n" "none needed" >&6; } ;;
5590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5591 printf "%s\n" "unsupported" >&6; } ;;
5593 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5594 CC=$CC$ac_prog_cc_stdc_options
5595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5596 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5598 if test "x$ac_cv_prog_cc_c89" != xno
5601 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5604 ac_cv_prog_cc_stdc=no
5612 ac_cpp='$CPP $CPPFLAGS'
5613 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5614 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5615 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5618 ac_cpp='$CPP $CPPFLAGS'
5619 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5620 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5621 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5623 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5624 if test ${am_cv_prog_cc_c_o+y}
5626 printf %s "(cached) " >&6
5628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5629 /* end confdefs.h. */
5639 # Make sure it works both with $CC and with simple cc.
5640 # Following AC_PROG_CC_C_O, we do the test twice because some
5641 # compilers refuse to overwrite an existing .o file with -o,
5642 # though they will create one.
5643 am_cv_prog_cc_c_o=yes
5645 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5646 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5649 (exit $ac_status); } \
5650 && test -f conftest2.$ac_objext; then
5653 am_cv_prog_cc_c_o=no
5657 rm -f core conftest*
5660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5661 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5662 if test "$am_cv_prog_cc_c_o" != yes; then
5663 # Losing compiler, so override with the script.
5664 # FIXME: It is wrong to rewrite CC.
5665 # But if we don't then we get into trouble of one sort or another.
5666 # A longer-term fix would be to have automake use am__CC in this case,
5667 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5668 CC="$am_aux_dir/compile $CC"
5671 ac_cpp='$CPP $CPPFLAGS'
5672 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5673 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5674 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5677 depcc="$CC" am_compiler_list=
5679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5680 printf %s "checking dependency style of $depcc... " >&6; }
5681 if test ${am_cv_CC_dependencies_compiler_type+y}
5683 printf %s "(cached) " >&6
5685 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5686 # We make a subdir and do the tests there. Otherwise we can end up
5687 # making bogus files that we don't know about and never remove. For
5688 # instance it was reported that on HP-UX the gcc test will end up
5689 # making a dummy file named 'D' -- because '-MD' means "put the output
5693 # Copy depcomp to subdir because otherwise we won't find it if we're
5694 # using a relative directory.
5695 cp "$am_depcomp" conftest.dir
5697 # We will build objects and dependencies in a subdirectory because
5698 # it helps to detect inapplicable dependency modes. For instance
5699 # both Tru64's cc and ICC support -MD to output dependencies as a
5700 # side effect of compilation, but ICC will put the dependencies in
5701 # the current directory while Tru64 will put them in the object
5705 am_cv_CC_dependencies_compiler_type=none
5706 if test "$am_compiler_list" = ""; then
5707 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5710 case " $depcc " in #(
5711 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5714 for depmode in $am_compiler_list; do
5715 # Setup a source with many dependencies, because some compilers
5716 # like to wrap large dependency lists on column 80 (with \), and
5717 # we should not choose a depcomp mode which is confused by this.
5719 # We need to recreate these files for each test, as the compiler may
5720 # overwrite some of them when testing with obscure command lines.
5721 # This happens at least with the AIX C compiler.
5723 for i in 1 2 3 4 5 6; do
5724 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5725 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5726 # Solaris 10 /bin/sh.
5727 echo '/* dummy */' > sub/conftst$i.h
5729 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5731 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5732 # mode. It turns out that the SunPro C++ compiler does not properly
5733 # handle '-M -o', and we need to detect this. Also, some Intel
5734 # versions had trouble with output in subdirs.
5735 am__obj=sub/conftest.${OBJEXT-o}
5736 am__minus_obj="-o $am__obj"
5739 # This depmode causes a compiler race in universal mode.
5740 test "$am__universal" = false || continue
5743 # After this tag, mechanisms are not by side-effect, so they'll
5744 # only be used when explicitly requested.
5745 if test "x$enable_dependency_tracking" = xyes; then
5751 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5752 # This compiler won't grok '-c -o', but also, the minuso test has
5753 # not run yet. These depmodes are late enough in the game, and
5754 # so weak that their functioning should not be impacted.
5755 am__obj=conftest.${OBJEXT-o}
5760 if depmode=$depmode \
5761 source=sub/conftest.c object=$am__obj \
5762 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5763 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5764 >/dev/null 2>conftest.err &&
5765 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5766 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5767 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5768 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5769 # icc doesn't choke on unknown options, it will just issue warnings
5770 # or remarks (even with -Werror). So we grep stderr for any message
5771 # that says an option was ignored or not supported.
5772 # When given -MP, icc 7.0 and 7.1 complain thusly:
5773 # icc: Command line warning: ignoring option '-M'; no argument required
5774 # The diagnosis changed in icc 8.0:
5775 # icc: Command line remark: option '-MP' not supported
5776 if (grep 'ignoring option' conftest.err ||
5777 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5778 am_cv_CC_dependencies_compiler_type=$depmode
5787 am_cv_CC_dependencies_compiler_type=none
5791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5792 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5793 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5796 test "x$enable_dependency_tracking" != xno \
5797 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5799 am__fastdepCC_FALSE='#'
5801 am__fastdepCC_TRUE='#'
5802 am__fastdepCC_FALSE=
5809 ac_cpp='$CPP $CPPFLAGS'
5810 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5811 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5812 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5814 printf %s "checking how to run the C preprocessor... " >&6; }
5815 # On Suns, sometimes $CPP names a directory.
5816 if test -n "$CPP" && test -d "$CPP"; then
5819 if test -z "$CPP"; then
5820 if test ${ac_cv_prog_CPP+y}
5822 printf %s "(cached) " >&6
5824 # Double quotes because CPP needs to be expanded
5825 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5828 for ac_c_preproc_warn_flag in '' yes
5830 # Use a header file that comes with gcc, so configuring glibc
5831 # with a fresh cross-compiler works.
5832 # On the NeXT, cc -E runs the code through the compiler's parser,
5833 # not just through cpp. "Syntax error" is here to catch this case.
5834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5835 /* end confdefs.h. */
5839 if ac_fn_c_try_cpp "$LINENO"
5843 # Broken: fails on valid input.
5846 rm -f conftest.err conftest.i conftest.$ac_ext
5848 # OK, works on sane cases. Now check whether nonexistent headers
5849 # can be detected and how.
5850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5851 /* end confdefs.h. */
5852 #include <ac_nonexistent.h>
5854 if ac_fn_c_try_cpp "$LINENO"
5856 # Broken: success on invalid input.
5859 # Passes both tests.
5863 rm -f conftest.err conftest.i conftest.$ac_ext
5866 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5867 rm -f conftest.i conftest.err conftest.$ac_ext
5881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5882 printf "%s\n" "$CPP" >&6; }
5884 for ac_c_preproc_warn_flag in '' yes
5886 # Use a header file that comes with gcc, so configuring glibc
5887 # with a fresh cross-compiler works.
5888 # On the NeXT, cc -E runs the code through the compiler's parser,
5889 # not just through cpp. "Syntax error" is here to catch this case.
5890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5891 /* end confdefs.h. */
5895 if ac_fn_c_try_cpp "$LINENO"
5899 # Broken: fails on valid input.
5902 rm -f conftest.err conftest.i conftest.$ac_ext
5904 # OK, works on sane cases. Now check whether nonexistent headers
5905 # can be detected and how.
5906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5907 /* end confdefs.h. */
5908 #include <ac_nonexistent.h>
5910 if ac_fn_c_try_cpp "$LINENO"
5912 # Broken: success on invalid input.
5915 # Passes both tests.
5919 rm -f conftest.err conftest.i conftest.$ac_ext
5922 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5923 rm -f conftest.i conftest.err conftest.$ac_ext
5928 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5929 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5930 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5931 See \`config.log' for more details" "$LINENO" 5; }
5935 ac_cpp='$CPP $CPPFLAGS'
5936 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5937 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5938 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5941 printf %s "checking for grep that handles long lines and -e... " >&6; }
5942 if test ${ac_cv_path_GREP+y}
5944 printf %s "(cached) " >&6
5946 if test -z "$GREP"; then
5947 ac_path_GREP_found=false
5948 # Loop through the user's path and test for each of PROGNAME-LIST
5949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5953 case $as_dir in #(((
5956 *) as_dir=$as_dir/ ;;
5958 for ac_prog in grep ggrep
5960 for ac_exec_ext in '' $ac_executable_extensions; do
5961 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5962 as_fn_executable_p "$ac_path_GREP" || continue
5963 # Check for GNU ac_path_GREP and select it if it is found.
5964 # Check for GNU $ac_path_GREP
5965 case `"$ac_path_GREP" --version 2>&1` in
5967 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5970 printf %s 0123456789 >"conftest.in"
5973 cat "conftest.in" "conftest.in" >"conftest.tmp"
5974 mv "conftest.tmp" "conftest.in"
5975 cp "conftest.in" "conftest.nl"
5976 printf "%s\n" 'GREP' >> "conftest.nl"
5977 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5978 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5979 as_fn_arith $ac_count + 1 && ac_count=$as_val
5980 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5981 # Best one so far, save it but keep looking for a better one
5982 ac_cv_path_GREP="$ac_path_GREP"
5983 ac_path_GREP_max=$ac_count
5985 # 10*(2^10) chars as input seems more than enough
5986 test $ac_count -gt 10 && break
5988 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5991 $ac_path_GREP_found && break 3
5996 if test -z "$ac_cv_path_GREP"; then
5997 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6000 ac_cv_path_GREP=$GREP
6004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6005 printf "%s\n" "$ac_cv_path_GREP" >&6; }
6006 GREP="$ac_cv_path_GREP"
6009 if test -n "$ac_tool_prefix"; then
6010 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
6011 set dummy ${ac_tool_prefix}nm; ac_word=$2
6012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6013 printf %s "checking for $ac_word... " >&6; }
6014 if test ${ac_cv_prog_NM+y}
6016 printf %s "(cached) " >&6
6018 if test -n "$NM"; then
6019 ac_cv_prog_NM="$NM" # Let the user override the test.
6021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025 case $as_dir in #(((
6028 *) as_dir=$as_dir/ ;;
6030 for ac_exec_ext in '' $ac_executable_extensions; do
6031 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6032 ac_cv_prog_NM="${ac_tool_prefix}nm"
6033 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6043 if test -n "$NM"; then
6044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
6045 printf "%s\n" "$NM" >&6; }
6047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048 printf "%s\n" "no" >&6; }
6053 if test -z "$ac_cv_prog_NM"; then
6055 # Extract the first word of "nm", so it can be a program name with args.
6056 set dummy nm; ac_word=$2
6057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6058 printf %s "checking for $ac_word... " >&6; }
6059 if test ${ac_cv_prog_ac_ct_NM+y}
6061 printf %s "(cached) " >&6
6063 if test -n "$ac_ct_NM"; then
6064 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
6066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6070 case $as_dir in #(((
6073 *) as_dir=$as_dir/ ;;
6075 for ac_exec_ext in '' $ac_executable_extensions; do
6076 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6077 ac_cv_prog_ac_ct_NM="nm"
6078 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6087 ac_ct_NM=$ac_cv_prog_ac_ct_NM
6088 if test -n "$ac_ct_NM"; then
6089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
6090 printf "%s\n" "$ac_ct_NM" >&6; }
6092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093 printf "%s\n" "no" >&6; }
6096 if test "x$ac_ct_NM" = x; then
6099 case $cross_compiling:$ac_tool_warned in
6101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6102 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6103 ac_tool_warned=yes ;;
6111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6112 printf %s "checking whether ln -s works... " >&6; }
6114 if test "$LN_S" = "ln -s"; then
6115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6116 printf "%s\n" "yes" >&6; }
6118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6119 printf "%s\n" "no, using $LN_S" >&6; }
6122 if test -n "$ac_tool_prefix"; then
6123 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6124 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126 printf %s "checking for $ac_word... " >&6; }
6127 if test ${ac_cv_prog_RANLIB+y}
6129 printf %s "(cached) " >&6
6131 if test -n "$RANLIB"; then
6132 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138 case $as_dir in #(((
6141 *) as_dir=$as_dir/ ;;
6143 for ac_exec_ext in '' $ac_executable_extensions; do
6144 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6145 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6146 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6155 RANLIB=$ac_cv_prog_RANLIB
6156 if test -n "$RANLIB"; then
6157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6158 printf "%s\n" "$RANLIB" >&6; }
6160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161 printf "%s\n" "no" >&6; }
6166 if test -z "$ac_cv_prog_RANLIB"; then
6167 ac_ct_RANLIB=$RANLIB
6168 # Extract the first word of "ranlib", so it can be a program name with args.
6169 set dummy ranlib; ac_word=$2
6170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6171 printf %s "checking for $ac_word... " >&6; }
6172 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6174 printf %s "(cached) " >&6
6176 if test -n "$ac_ct_RANLIB"; then
6177 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183 case $as_dir in #(((
6186 *) as_dir=$as_dir/ ;;
6188 for ac_exec_ext in '' $ac_executable_extensions; do
6189 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6190 ac_cv_prog_ac_ct_RANLIB="ranlib"
6191 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6200 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6201 if test -n "$ac_ct_RANLIB"; then
6202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6203 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206 printf "%s\n" "no" >&6; }
6209 if test "x$ac_ct_RANLIB" = x; then
6212 case $cross_compiling:$ac_tool_warned in
6214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6215 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6216 ac_tool_warned=yes ;;
6218 RANLIB=$ac_ct_RANLIB
6221 RANLIB="$ac_cv_prog_RANLIB"
6224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
6225 printf %s "checking for a POSIX-compliant shell... " >&6; }
6226 if test ${ac_cv_path_shell+y}
6228 printf %s "(cached) " >&6
6231 # Test the noclobber option, using the portable POSIX.2 syntax.
6235 >|conftest.c || exit
6236 !>conftest.c || exit
6237 # Test that $(...) works.
6238 test "$(expr 3 + 4)" -eq 7 || exit
6240 # Solaris 11 /bin/sh (AT&T Research) 93u 2011-02-08 has a file
6241 # descriptor bug that breaks zgrep and is hard to test for
6242 # directly. At some point $(...) is reading a pipe from the
6243 # subshell, but the pipe is also open in the parent shell, so
6244 # the read deadlocks. Prefer some other shell if available.
6245 ac_maybe_solaris_sh_bug='test "${.sh.version}"'
6252 if ("$SHELL" -c "$ac_command") 2>/dev/null; then
6253 "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null ||
6254 ac_cv_path_shell=$SHELL
6258 case $ac_cv_path_shell in
6260 # Prefer shells that are more likely to be installed in the
6261 # same place on all hosts of this platform. Therefore, prefer
6262 # shells in /bin and /usr/bin to shells in the installer's
6263 # PATH. Also, loop through PATH first and then through
6264 # shells, since less-"nice" shells in /bin and /usr/bin are
6265 # more likely to be installed than "nicer" shells elsewhere.
6266 ac_break_if_good_shell=:
6267 as_save_IFS=$IFS; IFS=:
6268 for as_dir in /bin /usr/bin $PATH
6273 for ac_base in sh bash ksh sh5; do
6275 if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
6276 if "$as_dir/$ac_base" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null
6278 test "$ac_cv_path_shell" = no
6280 ac_break_if_good_shell=break
6282 fi && ac_cv_path_shell=$as_dir/$ac_base
6283 $ac_break_if_good_shell
6286 $ac_break_if_good_shell
6293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
6294 printf "%s\n" "$ac_cv_path_shell" >&6; }
6295 SHELL=$ac_cv_path_shell
6296 if test "$SHELL" = no; then
6298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
6299 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
6301 if "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null; then
6302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it may have file descriptor bugs" >&5
6303 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it may have file descriptor bugs" >&2;}
6308 ac_header= ac_cache=
6309 for ac_item in $ac_header_c_list
6311 if test $ac_cache; then
6312 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6313 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6314 printf "%s\n" "#define $ac_item 1" >> confdefs.h
6316 ac_header= ac_cache=
6317 elif test $ac_header; then
6329 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
6331 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
6333 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6336 ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6337 if test "x$ac_cv_header_minix_config_h" = xyes
6344 if test "$MINIX" = yes; then
6346 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6349 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6352 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6355 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6361 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6362 if test ${ac_cv_safe_to_define___extensions__+y}
6364 printf %s "(cached) " >&6
6366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6367 /* end confdefs.h. */
6369 # define __EXTENSIONS__ 1
6370 $ac_includes_default
6379 if ac_fn_c_try_compile "$LINENO"
6381 ac_cv_safe_to_define___extensions__=yes
6383 ac_cv_safe_to_define___extensions__=no
6385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6388 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6389 test $ac_cv_safe_to_define___extensions__ = yes &&
6390 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6392 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6394 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6396 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6398 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6400 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6402 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6404 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6406 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6408 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6410 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6412 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6414 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6416 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6418 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6421 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6422 if test ${ac_cv_should_define__xopen_source+y}
6424 printf %s "(cached) " >&6
6426 ac_cv_should_define__xopen_source=no
6427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6428 /* end confdefs.h. */
6440 if ac_fn_c_try_compile "$LINENO"
6444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6445 /* end confdefs.h. */
6447 #define _XOPEN_SOURCE 500
6458 if ac_fn_c_try_compile "$LINENO"
6460 ac_cv_should_define__xopen_source=yes
6462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6467 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6468 test $ac_cv_should_define__xopen_source = yes &&
6469 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6480 printf %s "checking for egrep... " >&6; }
6481 if test ${ac_cv_path_EGREP+y}
6483 printf %s "(cached) " >&6
6485 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6486 then ac_cv_path_EGREP="$GREP -E"
6488 if test -z "$EGREP"; then
6489 ac_path_EGREP_found=false
6490 # Loop through the user's path and test for each of PROGNAME-LIST
6491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6495 case $as_dir in #(((
6498 *) as_dir=$as_dir/ ;;
6500 for ac_prog in egrep
6502 for ac_exec_ext in '' $ac_executable_extensions; do
6503 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6504 as_fn_executable_p "$ac_path_EGREP" || continue
6505 # Check for GNU ac_path_EGREP and select it if it is found.
6506 # Check for GNU $ac_path_EGREP
6507 case `"$ac_path_EGREP" --version 2>&1` in
6509 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6512 printf %s 0123456789 >"conftest.in"
6515 cat "conftest.in" "conftest.in" >"conftest.tmp"
6516 mv "conftest.tmp" "conftest.in"
6517 cp "conftest.in" "conftest.nl"
6518 printf "%s\n" 'EGREP' >> "conftest.nl"
6519 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6520 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6521 as_fn_arith $ac_count + 1 && ac_count=$as_val
6522 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6523 # Best one so far, save it but keep looking for a better one
6524 ac_cv_path_EGREP="$ac_path_EGREP"
6525 ac_path_EGREP_max=$ac_count
6527 # 10*(2^10) chars as input seems more than enough
6528 test $ac_count -gt 10 && break
6530 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6533 $ac_path_EGREP_found && break 3
6538 if test -z "$ac_cv_path_EGREP"; then
6539 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6542 ac_cv_path_EGREP=$EGREP
6547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6548 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6549 EGREP="$ac_cv_path_EGREP"
6555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6556 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6557 if test ${gl_cv_c_amsterdam_compiler+y}
6559 printf %s "(cached) " >&6
6562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6563 /* end confdefs.h. */
6570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6571 $EGREP "Amsterdam" >/dev/null 2>&1
6573 gl_cv_c_amsterdam_compiler=yes
6575 gl_cv_c_amsterdam_compiler=no
6581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6582 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6584 if test $gl_cv_c_amsterdam_compiler = yes; then
6585 if test -z "$AR"; then
6588 if test -z "$ARFLAGS"; then
6595 if test -n "$ac_tool_prefix"; then
6596 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6597 set dummy ${ac_tool_prefix}ar; ac_word=$2
6598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599 printf %s "checking for $ac_word... " >&6; }
6600 if test ${ac_cv_prog_AR+y}
6602 printf %s "(cached) " >&6
6604 if test -n "$AR"; then
6605 ac_cv_prog_AR="$AR" # Let the user override the test.
6607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6611 case $as_dir in #(((
6614 *) as_dir=$as_dir/ ;;
6616 for ac_exec_ext in '' $ac_executable_extensions; do
6617 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6618 ac_cv_prog_AR="${ac_tool_prefix}ar"
6619 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6629 if test -n "$AR"; then
6630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6631 printf "%s\n" "$AR" >&6; }
6633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6634 printf "%s\n" "no" >&6; }
6639 if test -z "$ac_cv_prog_AR"; then
6641 # Extract the first word of "ar", so it can be a program name with args.
6642 set dummy ar; ac_word=$2
6643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6644 printf %s "checking for $ac_word... " >&6; }
6645 if test ${ac_cv_prog_ac_ct_AR+y}
6647 printf %s "(cached) " >&6
6649 if test -n "$ac_ct_AR"; then
6650 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6656 case $as_dir in #(((
6659 *) as_dir=$as_dir/ ;;
6661 for ac_exec_ext in '' $ac_executable_extensions; do
6662 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6663 ac_cv_prog_ac_ct_AR="ar"
6664 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6673 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6674 if test -n "$ac_ct_AR"; then
6675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6676 printf "%s\n" "$ac_ct_AR" >&6; }
6678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679 printf "%s\n" "no" >&6; }
6682 if test "x$ac_ct_AR" = x; then
6685 case $cross_compiling:$ac_tool_warned in
6687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6688 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6689 ac_tool_warned=yes ;;
6697 if test -z "$ARFLAGS"; then
6703 if test -z "$RANLIB"; then
6704 if test $gl_cv_c_amsterdam_compiler = yes; then
6707 if test -n "$ac_tool_prefix"; then
6708 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6709 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711 printf %s "checking for $ac_word... " >&6; }
6712 if test ${ac_cv_prog_RANLIB+y}
6714 printf %s "(cached) " >&6
6716 if test -n "$RANLIB"; then
6717 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6723 case $as_dir in #(((
6726 *) as_dir=$as_dir/ ;;
6728 for ac_exec_ext in '' $ac_executable_extensions; do
6729 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6730 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6731 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6740 RANLIB=$ac_cv_prog_RANLIB
6741 if test -n "$RANLIB"; then
6742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6743 printf "%s\n" "$RANLIB" >&6; }
6745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746 printf "%s\n" "no" >&6; }
6751 if test -z "$ac_cv_prog_RANLIB"; then
6752 ac_ct_RANLIB=$RANLIB
6753 # Extract the first word of "ranlib", so it can be a program name with args.
6754 set dummy ranlib; ac_word=$2
6755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6756 printf %s "checking for $ac_word... " >&6; }
6757 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6759 printf %s "(cached) " >&6
6761 if test -n "$ac_ct_RANLIB"; then
6762 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6768 case $as_dir in #(((
6771 *) as_dir=$as_dir/ ;;
6773 for ac_exec_ext in '' $ac_executable_extensions; do
6774 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6775 ac_cv_prog_ac_ct_RANLIB="ranlib"
6776 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6785 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6786 if test -n "$ac_ct_RANLIB"; then
6787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6788 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6791 printf "%s\n" "no" >&6; }
6794 if test "x$ac_ct_RANLIB" = x; then
6797 case $cross_compiling:$ac_tool_warned in
6799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6800 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6801 ac_tool_warned=yes ;;
6803 RANLIB=$ac_ct_RANLIB
6806 RANLIB="$ac_cv_prog_RANLIB"
6813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6814 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6815 if test ${ac_cv_sys_largefile_source+y}
6817 printf %s "(cached) " >&6
6820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6821 /* end confdefs.h. */
6822 #include <sys/types.h> /* for off_t */
6827 int (*fp) (FILE *, off_t, int) = fseeko;
6828 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6833 if ac_fn_c_try_link "$LINENO"
6835 ac_cv_sys_largefile_source=no; break
6837 rm -f core conftest.err conftest.$ac_objext \
6838 conftest$ac_exeext conftest.$ac_ext
6839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6840 /* end confdefs.h. */
6841 #define _LARGEFILE_SOURCE 1
6842 #include <sys/types.h> /* for off_t */
6847 int (*fp) (FILE *, off_t, int) = fseeko;
6848 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6853 if ac_fn_c_try_link "$LINENO"
6855 ac_cv_sys_largefile_source=1; break
6857 rm -f core conftest.err conftest.$ac_objext \
6858 conftest$ac_exeext conftest.$ac_ext
6859 ac_cv_sys_largefile_source=unknown
6863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6864 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
6865 case $ac_cv_sys_largefile_source in #(
6868 printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
6873 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6874 # in glibc 2.1.3, but that breaks too many other things.
6875 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6876 if test $ac_cv_sys_largefile_source != unknown; then
6878 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
6882 # Make sure we can run config.sub.
6883 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6887 printf %s "checking build system type... " >&6; }
6888 if test ${ac_cv_build+y}
6890 printf %s "(cached) " >&6
6892 ac_build_alias=$build_alias
6893 test "x$ac_build_alias" = x &&
6894 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6895 test "x$ac_build_alias" = x &&
6896 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6897 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6898 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6902 printf "%s\n" "$ac_cv_build" >&6; }
6903 case $ac_cv_build in
6905 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6908 ac_save_IFS=$IFS; IFS='-'
6914 # Remember, the first character of IFS is used to create $*,
6915 # except with old shells:
6918 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6922 printf %s "checking host system type... " >&6; }
6923 if test ${ac_cv_host+y}
6925 printf %s "(cached) " >&6
6927 if test "x$host_alias" = x; then
6928 ac_cv_host=$ac_cv_build
6930 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6931 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6936 printf "%s\n" "$ac_cv_host" >&6; }
6939 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6942 ac_save_IFS=$IFS; IFS='-'
6948 # Remember, the first character of IFS is used to create $*,
6949 # except with old shells:
6952 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6958 # IEEE behaviour is the default on all CPUs except Alpha and SH
6959 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6960 # and the GCC 4.1.2 manual).
6963 # On Alpha systems, a compiler option provides the behaviour.
6964 # See the ieee(3) manual page, also available at
6965 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6966 if test -n "$GCC"; then
6967 # GCC has the option -mieee.
6968 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6969 CPPFLAGS="$CPPFLAGS -mieee"
6971 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6972 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6973 CPPFLAGS="$CPPFLAGS -ieee"
6977 if test -n "$GCC"; then
6978 # GCC has the option -mieee.
6979 CPPFLAGS="$CPPFLAGS -mieee"
6984 # Check whether --enable-largefile was given.
6985 if test ${enable_largefile+y}
6987 enableval=$enable_largefile;
6990 if test "$enable_largefile" != no; then
6992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6993 printf %s "checking for special C compiler options needed for large files... " >&6; }
6994 if test ${ac_cv_sys_largefile_CC+y}
6996 printf %s "(cached) " >&6
6998 ac_cv_sys_largefile_CC=no
6999 if test "$GCC" != yes; then
7002 # IRIX 6.2 and later do not support large files by default,
7003 # so use the C compiler's -n32 option if that helps.
7004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7005 /* end confdefs.h. */
7006 #include <sys/types.h>
7007 /* Check that off_t can represent 2**63 - 1 correctly.
7008 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7009 since some C++ compilers masquerading as C compilers
7010 incorrectly reject 9223372036854775807. */
7011 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7012 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7013 && LARGE_OFF_T % 2147483647 == 1)
7023 if ac_fn_c_try_compile "$LINENO"
7027 rm -f core conftest.err conftest.$ac_objext
7029 if ac_fn_c_try_compile "$LINENO"
7031 ac_cv_sys_largefile_CC=' -n32'; break
7033 rm -f core conftest.err conftest.$ac_objext
7037 rm -f conftest.$ac_ext
7040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7041 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
7042 if test "$ac_cv_sys_largefile_CC" != no; then
7043 CC=$CC$ac_cv_sys_largefile_CC
7046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7047 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7048 if test ${ac_cv_sys_file_offset_bits+y}
7050 printf %s "(cached) " >&6
7053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7054 /* end confdefs.h. */
7055 #include <sys/types.h>
7056 /* Check that off_t can represent 2**63 - 1 correctly.
7057 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7058 since some C++ compilers masquerading as C compilers
7059 incorrectly reject 9223372036854775807. */
7060 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7061 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7062 && LARGE_OFF_T % 2147483647 == 1)
7072 if ac_fn_c_try_compile "$LINENO"
7074 ac_cv_sys_file_offset_bits=no; break
7076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078 /* end confdefs.h. */
7079 #define _FILE_OFFSET_BITS 64
7080 #include <sys/types.h>
7081 /* Check that off_t can represent 2**63 - 1 correctly.
7082 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7083 since some C++ compilers masquerading as C compilers
7084 incorrectly reject 9223372036854775807. */
7085 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7086 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7087 && LARGE_OFF_T % 2147483647 == 1)
7097 if ac_fn_c_try_compile "$LINENO"
7099 ac_cv_sys_file_offset_bits=64; break
7101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7102 ac_cv_sys_file_offset_bits=unknown
7106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7107 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
7108 case $ac_cv_sys_file_offset_bits in #(
7111 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
7115 if test $ac_cv_sys_file_offset_bits = unknown; then
7116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7117 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7118 if test ${ac_cv_sys_large_files+y}
7120 printf %s "(cached) " >&6
7123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7124 /* end confdefs.h. */
7125 #include <sys/types.h>
7126 /* Check that off_t can represent 2**63 - 1 correctly.
7127 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7128 since some C++ compilers masquerading as C compilers
7129 incorrectly reject 9223372036854775807. */
7130 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7131 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7132 && LARGE_OFF_T % 2147483647 == 1)
7142 if ac_fn_c_try_compile "$LINENO"
7144 ac_cv_sys_large_files=no; break
7146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7148 /* end confdefs.h. */
7149 #define _LARGE_FILES 1
7150 #include <sys/types.h>
7151 /* Check that off_t can represent 2**63 - 1 correctly.
7152 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7153 since some C++ compilers masquerading as C compilers
7154 incorrectly reject 9223372036854775807. */
7155 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7156 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7157 && LARGE_OFF_T % 2147483647 == 1)
7167 if ac_fn_c_try_compile "$LINENO"
7169 ac_cv_sys_large_files=1; break
7171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7172 ac_cv_sys_large_files=unknown
7176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7177 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7178 case $ac_cv_sys_large_files in #(
7181 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
7188 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7197 # Check whether --enable-threads was given.
7198 if test ${enable_threads+y}
7200 enableval=$enable_threads; gl_use_threads=$enableval
7202 if test -n "$gl_use_threads_default"; then
7203 gl_use_threads="$gl_use_threads_default"
7206 osf*) gl_use_threads=no ;;
7209 1.[0-5].*) gl_use_threads=no ;;
7210 *) gl_use_threads=yes ;;
7213 *) gl_use_threads=yes ;;
7219 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7220 # For using <pthread.h>:
7223 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7224 # groks <pthread.h>. cc also understands the flag -pthread, but
7225 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7226 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7227 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7228 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7229 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7232 # Some systems optimize for single-threaded programs by default, and
7233 # need special flags to disable these optimizations. For example, the
7234 # definition of 'errno' in <errno.h>.
7236 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7237 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7246 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
7253 # Pre-early section.
7258 # Code from module absolute-header:
7259 # Code from module alloca-opt:
7260 # Code from module announce-gen:
7261 # Code from module assure:
7262 # Code from module at-internal:
7263 # Code from module calloc:
7264 # Code from module calloc-gnu:
7265 # Code from module calloc-posix:
7266 # Code from module chdir:
7267 # Code from module chdir-long:
7268 # Code from module clock-time:
7269 # Code from module cloexec:
7270 # Code from module close:
7271 # Code from module closedir:
7272 # Code from module dirent:
7273 # Code from module dirent-safer:
7274 # Code from module dirfd:
7275 # Code from module dirname-lgpl:
7276 # Code from module do-release-commit-and-tag:
7277 # Code from module dosname:
7278 # Code from module double-slash-root:
7279 # Code from module dup:
7280 # Code from module dup2:
7281 # Code from module errno:
7282 # Code from module error:
7283 # Code from module exitfail:
7284 # Code from module extensions:
7285 # Code from module extern-inline:
7286 # Code from module fchdir:
7287 # Code from module fclose:
7288 # Code from module fcntl:
7289 # Code from module fcntl-h:
7290 # Code from module fcntl-safer:
7291 # Code from module fd-hook:
7292 # Code from module fd-safer-flag:
7293 # Code from module fdatasync:
7294 # Code from module fdl:
7295 # Code from module fdopendir:
7296 # Code from module fflush:
7298 # Code from module filename:
7299 # Code from module filenamecat-lgpl:
7300 # Code from module float:
7301 # Code from module fpieee:
7303 # Code from module fprintf-posix:
7304 # Code from module fpucw:
7305 # Code from module fpurge:
7306 # Code from module freading:
7307 # Code from module frexp-nolibm:
7308 # Code from module frexpl-nolibm:
7309 # Code from module fseek:
7310 # Code from module fseeko:
7312 # Code from module fseterr:
7313 # Code from module fstat:
7314 # Code from module fstatat:
7315 # Code from module fsync:
7316 # Code from module ftell:
7317 # Code from module ftello:
7319 # Code from module gendocs:
7320 # Code from module getcwd-lgpl:
7321 # Code from module getdtablesize:
7322 # Code from module getopt-gnu:
7323 # Code from module getopt-posix:
7324 # Code from module getprogname:
7325 # Code from module gettext-h:
7326 # Code from module gettime:
7327 # Code from module gettimeofday:
7328 # Code from module git-version-gen:
7329 # Code from module gitlog-to-changelog:
7330 # Code from module gnu-make:
7331 # Code from module gnu-web-doc-update:
7332 # Code from module gnumakefile:
7333 # Code from module gnupload:
7334 # Code from module havelib:
7335 # Code from module host-cpu-c-abi:
7336 # Code from module ignore-value:
7337 # Code from module include_next:
7338 # Code from module intprops:
7339 # Code from module isnand-nolibm:
7340 # Code from module isnanf-nolibm:
7341 # Code from module isnanl-nolibm:
7342 # Code from module largefile:
7344 # Code from module lib-ignore:
7345 # Code from module limits-h:
7346 # Code from module localtime-buffer:
7347 # Code from module lock:
7348 # Code from module lseek:
7349 # Code from module lstat:
7350 # Code from module maintainer-makefile:
7351 # Code from module malloc-gnu:
7352 # Code from module malloc-posix:
7353 # Code from module malloca:
7354 # Code from module manywarnings:
7355 # Code from module math:
7356 # Code from module memchr:
7357 # Code from module mempcpy:
7358 # Code from module memrchr:
7359 # Code from module msvc-inval:
7360 # Code from module msvc-nothrow:
7361 # Code from module multiarch:
7362 # Code from module nocrash:
7363 # Code from module open:
7364 # Code from module openat:
7365 # Code from module openat-die:
7366 # Code from module openat-h:
7367 # Code from module openat-safer:
7368 # Code from module opendir:
7369 # Code from module pathmax:
7370 # Code from module perror:
7371 # Code from module printf-frexp:
7372 # Code from module printf-frexpl:
7373 # Code from module printf-posix:
7374 # Code from module printf-safe:
7375 # Code from module readdir:
7376 # Code from module readme-release:
7377 # Code from module realloc-gnu:
7378 # Code from module realloc-posix:
7379 # Code from module rmdir:
7380 # Code from module save-cwd:
7381 # Code from module savedir:
7382 # Code from module signbit:
7383 # Code from module size_max:
7384 # Code from module snippet/_Noreturn:
7385 # Code from module snippet/arg-nonnull:
7386 # Code from module snippet/c++defs:
7387 # Code from module snippet/unused-parameter:
7388 # Code from module snippet/warn-on-use:
7389 # Code from module ssize_t:
7390 # Code from module stat:
7391 # Code from module stat-time:
7392 # Code from module statat:
7393 # Code from module stdbool:
7394 # Code from module stddef:
7395 # Code from module stdint:
7396 # Code from module stdio:
7397 # Code from module stdlib:
7398 # Code from module stdnoreturn:
7399 # Code from module stpcpy:
7400 # Code from module strdup-posix:
7401 # Code from module strerror:
7402 # Code from module strerror-override:
7403 # Code from module strerror_r-posix:
7404 # Code from module string:
7405 # Code from module sys_stat:
7406 # Code from module sys_time:
7407 # Code from module sys_types:
7408 # Code from module threadlib:
7412 # Code from module time:
7413 # Code from module timespec:
7414 # Code from module unistd:
7415 # Code from module unistd-safer:
7416 # Code from module unlink:
7417 # Code from module unlinkat:
7418 # Code from module update-copyright:
7419 # Code from module useless-if-before-free:
7420 # Code from module utime:
7421 # Code from module utime-h:
7422 # Code from module utimens:
7423 # Code from module vasnprintf:
7424 # Code from module vc-list-files:
7425 # Code from module verify:
7426 # Code from module vfprintf-posix:
7427 # Code from module warnings:
7428 # Code from module wchar:
7429 # Code from module xalloc:
7430 # Code from module xalloc-die:
7431 # Code from module xalloc-oversized:
7432 # Code from module xsize:
7433 # Code from module year2038:
7435 # Code from module yesno:
7443 LIBC_FATAL_STDERR_=1
7444 export LIBC_FATAL_STDERR_
7446 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7447 if test "x$ac_cv_type_size_t" = xyes
7452 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
7456 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7457 # for constant arguments. Useless!
7458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7459 printf %s "checking for working alloca.h... " >&6; }
7460 if test ${ac_cv_working_alloca_h+y}
7462 printf %s "(cached) " >&6
7464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7465 /* end confdefs.h. */
7470 char *p = (char *) alloca (2 * sizeof (int));
7476 if ac_fn_c_try_link "$LINENO"
7478 ac_cv_working_alloca_h=yes
7480 ac_cv_working_alloca_h=no
7482 rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
7485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7486 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7487 if test $ac_cv_working_alloca_h = yes; then
7489 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7494 printf %s "checking for alloca... " >&6; }
7495 if test ${ac_cv_func_alloca_works+y}
7497 printf %s "(cached) " >&6
7499 if test $ac_cv_working_alloca_h = yes; then
7500 ac_cv_func_alloca_works=yes
7502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7503 /* end confdefs.h. */
7508 # define alloca __builtin_alloca
7509 # elif defined _MSC_VER
7510 # include <malloc.h>
7511 # define alloca _alloca
7516 void *alloca (size_t);
7523 char *p = (char *) alloca (1);
7529 if ac_fn_c_try_link "$LINENO"
7531 ac_cv_func_alloca_works=yes
7533 ac_cv_func_alloca_works=no
7535 rm -f core conftest.err conftest.$ac_objext \
7536 conftest$ac_exeext conftest.$ac_ext
7538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7539 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7542 if test $ac_cv_func_alloca_works = yes; then
7544 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7547 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7548 # that cause trouble. Some versions do not even contain alloca or
7549 # contain a buggy version. If you still want to use their alloca,
7550 # use ar to extract alloca.o from them instead of compiling alloca.c.
7556 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7558 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7562 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7563 if test ${ac_cv_os_cray+y}
7565 printf %s "(cached) " >&6
7567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7568 /* end confdefs.h. */
7569 #if defined CRAY && ! defined CRAY2
7576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7577 $EGREP "webecray" >/dev/null 2>&1
7586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7587 printf "%s\n" "$ac_cv_os_cray" >&6; }
7588 if test $ac_cv_os_cray = yes; then
7589 for ac_func in _getb67 GETB67 getb67; do
7590 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7591 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7592 if eval test \"x\$"$as_ac_var"\" = x"yes"
7595 printf "%s\n" "#define CRAY_STACKSEG_END $ac_func" >>confdefs.h
7603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7604 printf %s "checking stack direction for C alloca... " >&6; }
7605 if test ${ac_cv_c_stack_direction+y}
7607 printf %s "(cached) " >&6
7609 if test "$cross_compiling" = yes
7611 ac_cv_c_stack_direction=0
7613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7614 /* end confdefs.h. */
7615 $ac_includes_default
7617 find_stack_direction (int *addr, int depth)
7622 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7623 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7628 main (int argc, char **argv)
7630 return find_stack_direction (0, argc + !argv + 20) < 0;
7633 if ac_fn_c_try_run "$LINENO"
7635 ac_cv_c_stack_direction=1
7637 ac_cv_c_stack_direction=-1
7639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7640 conftest.$ac_objext conftest.beam conftest.$ac_ext
7644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7645 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7646 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
7654 GNULIB_CALLOC_POSIX=0;
7655 GNULIB_CANONICALIZE_FILE_NAME=0;
7656 GNULIB_GETLOADAVG=0;
7659 GNULIB_MALLOC_POSIX=0;
7666 GNULIB_POSIX_OPENPT=0;
7673 GNULIB_REALLOCARRAY=0;
7674 GNULIB_REALLOC_POSIX=0;
7677 GNULIB_SECURE_GETENV=0;
7682 GNULIB_SYSTEM_POSIX=0;
7688 HAVE_CANONICALIZE_FILE_NAME=1;
7689 HAVE_DECL_GETLOADAVG=1;
7692 HAVE_DECL_INITSTATE=1;
7698 HAVE_POSIX_OPENPT=1;
7705 HAVE_REALLOCARRAY=1;
7708 HAVE_SECURE_GETENV=1;
7711 HAVE_DECL_SETSTATE=1;
7715 HAVE_STRUCT_RANDOM_DATA=1;
7716 HAVE_SYS_LOADAVG_H=0;
7718 HAVE_DECL_UNSETENV=1;
7720 REPLACE_CANONICALIZE_FILE_NAME=0;
7725 REPLACE_PTSNAME_R=0;
7737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7738 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7739 if test ${gl_cv_func_malloc_posix+y}
7741 printf %s "(cached) " >&6
7744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7745 /* end confdefs.h. */
7750 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7758 if ac_fn_c_try_compile "$LINENO"
7760 gl_cv_func_malloc_posix=yes
7762 gl_cv_func_malloc_posix=no
7764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7768 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
7778 GNULIB_EUIDACCESS=0;
7786 GNULIB_GETDOMAINNAME=0;
7787 GNULIB_GETDTABLESIZE=0;
7789 GNULIB_GETHOSTNAME=0;
7791 GNULIB_GETLOGIN_R=0;
7792 GNULIB_GETPAGESIZE=0;
7793 GNULIB_GETUSERSHELL=0;
7794 GNULIB_GROUP_MEMBER=0;
7806 GNULIB_READLINKAT=0;
7808 GNULIB_SETHOSTNAME=0;
7814 GNULIB_UNISTD_H_NONBLOCKING=0;
7815 GNULIB_UNISTD_H_SIGPIPE=0;
7830 HAVE_GETDTABLESIZE=1;
7835 HAVE_GROUP_MEMBER=1;
7852 HAVE_DECL_ENVIRON=1;
7854 HAVE_DECL_FDATASYNC=1;
7855 HAVE_DECL_GETDOMAINNAME=1;
7856 HAVE_DECL_GETLOGIN=1;
7857 HAVE_DECL_GETLOGIN_R=1;
7858 HAVE_DECL_GETPAGESIZE=1;
7859 HAVE_DECL_GETUSERSHELL=1;
7860 HAVE_DECL_SETHOSTNAME=1;
7861 HAVE_DECL_TTYNAME_R=1;
7868 REPLACE_FACCESSAT=0;
7870 REPLACE_FTRUNCATE=0;
7872 REPLACE_GETDOMAINNAME=0;
7873 REPLACE_GETDTABLESIZE=0;
7874 REPLACE_GETLOGIN_R=0;
7875 REPLACE_GETGROUPS=0;
7876 REPLACE_GETPAGESIZE=0;
7886 REPLACE_READLINKAT=0;
7890 REPLACE_SYMLINKAT=0;
7892 REPLACE_TTYNAME_R=0;
7897 UNISTD_H_HAVE_WINSOCK2_H=0;
7898 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7906 for ac_item in $ac_func_c_list
7908 if test $ac_func; then
7909 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
7910 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
7911 echo "#define $ac_item 1" >> confdefs.h
7920 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7921 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7923 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7926 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7946 HAVE_DECL_FDOPENDIR=1;
7953 REPLACE_FDOPENDIR=0;
7957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7958 printf %s "checking whether the preprocessor supports include_next... " >&6; }
7959 if test ${gl_cv_have_include_next+y}
7961 printf %s "(cached) " >&6
7963 rm -rf conftestd1a conftestd1b conftestd2
7964 mkdir conftestd1a conftestd1b conftestd2
7965 cat <<EOF > conftestd1a/conftest.h
7966 #define DEFINED_IN_CONFTESTD1
7967 #include_next <conftest.h>
7968 #ifdef DEFINED_IN_CONFTESTD2
7971 #error "include_next doesn't work"
7974 cat <<EOF > conftestd1b/conftest.h
7975 #define DEFINED_IN_CONFTESTD1
7977 #include_next <conftest.h>
7978 #ifdef DEFINED_IN_CONFTESTD2
7981 #error "include_next doesn't work"
7984 cat <<EOF > conftestd2/conftest.h
7985 #ifndef DEFINED_IN_CONFTESTD1
7986 #error "include_next test doesn't work"
7988 #define DEFINED_IN_CONFTESTD2
7990 gl_save_CPPFLAGS="$CPPFLAGS"
7991 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7993 /* end confdefs.h. */
7994 #include <conftest.h>
7996 if ac_fn_c_try_compile "$LINENO"
7998 gl_cv_have_include_next=yes
8000 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
8001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8002 /* end confdefs.h. */
8003 #include <conftest.h>
8005 if ac_fn_c_try_compile "$LINENO"
8007 gl_cv_have_include_next=buggy
8009 gl_cv_have_include_next=no
8011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8015 CPPFLAGS="$gl_save_CPPFLAGS"
8016 rm -rf conftestd1a conftestd1b conftestd2
8019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8020 printf "%s\n" "$gl_cv_have_include_next" >&6; }
8021 PRAGMA_SYSTEM_HEADER=
8022 if test $gl_cv_have_include_next = yes; then
8023 INCLUDE_NEXT=include_next
8024 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8025 if test -n "$GCC"; then
8026 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8029 if test $gl_cv_have_include_next = buggy; then
8030 INCLUDE_NEXT=include
8031 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8033 INCLUDE_NEXT=include
8034 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
8041 printf %s "checking whether system header files limit the line length... " >&6; }
8042 if test ${gl_cv_pragma_columns+y}
8044 printf %s "(cached) " >&6
8046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8047 /* end confdefs.h. */
8054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8055 $EGREP "choke me" >/dev/null 2>&1
8057 gl_cv_pragma_columns=yes
8059 gl_cv_pragma_columns=no
8065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
8066 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
8067 if test $gl_cv_pragma_columns = yes; then
8068 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
8076 # The Clang compiler raises a warning for an undeclared identifier that matches
8077 # a compiler builtin function. All extant Clang versions are affected, as of
8078 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
8079 # C and Objective C languages, but Clang does report an error under C++ and
8082 # Passing -fno-builtin to the compiler would suppress this problem. That
8083 # strategy would have the advantage of being insensitive to stray warnings, but
8084 # it would make tests less realistic.
8085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
8086 printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
8087 if test ${ac_cv_c_decl_report+y}
8089 printf %s "(cached) " >&6
8091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8092 /* end confdefs.h. */
8102 if ac_fn_c_try_compile "$LINENO"
8104 if test -s conftest.err
8106 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
8107 # valid AC_CHECK_DECL input. No library function is consistently available
8108 # on freestanding implementations, so test against a dummy declaration.
8109 # Include always-available headers on the off chance that they somehow
8111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8112 /* end confdefs.h. */
8117 extern void ac_decl (int, char *);
8122 (void) ac_decl ((int) 0, (char *) 0);
8132 if ac_fn_c_try_compile "$LINENO"
8134 if test -s conftest.err
8136 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8137 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8138 as_fn_error $? "cannot detect from compiler exit status or warnings
8139 See \`config.log' for more details" "$LINENO" 5; }
8141 ac_cv_c_decl_report=warning
8144 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8145 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8146 as_fn_error $? "cannot compile a simple declaration test
8147 See \`config.log' for more details" "$LINENO" 5; }
8149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8151 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8152 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8153 as_fn_error $? "compiler does not report undeclared identifiers
8154 See \`config.log' for more details" "$LINENO" 5; }
8157 ac_cv_c_decl_report=error
8159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
8162 printf "%s\n" "$ac_cv_c_decl_report" >&6; }
8164 case $ac_cv_c_decl_report in
8165 warning) ac_c_decl_warn_flag=yes ;;
8166 *) ac_c_decl_warn_flag= ;;
8171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8172 printf %s "checking whether // is distinct from /... " >&6; }
8173 if test ${gl_cv_double_slash_root+y}
8175 printf %s "(cached) " >&6
8177 if test x"$cross_compiling" = xyes ; then
8178 # When cross-compiling, there is no way to tell whether // is special
8179 # short of a list of hosts. However, the only known hosts to date
8180 # that have a distinct // are Apollo DomainOS (too old to port to),
8181 # Cygwin, and z/OS. If anyone knows of another system for which // has
8182 # special semantics and is distinct from /, please report it to
8183 # <bug-gnulib@gnu.org>.
8185 *-cygwin | i370-ibm-openedition)
8186 gl_cv_double_slash_root=yes ;;
8188 # Be optimistic and assume that / and // are the same when we
8190 gl_cv_double_slash_root='unknown, assuming no' ;;
8193 set x `ls -di / // 2>/dev/null`
8194 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8195 gl_cv_double_slash_root=no
8197 gl_cv_double_slash_root=yes
8201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8202 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
8203 if test "$gl_cv_double_slash_root" = yes; then
8205 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8212 printf %s "checking for complete errno.h... " >&6; }
8213 if test ${gl_cv_header_errno_h_complete+y}
8215 printf %s "(cached) " >&6
8218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8219 /* end confdefs.h. */
8222 #if !defined ETXTBSY
8231 #if !defined ENOLINK
8237 #if !defined EMULTIHOP
8240 #if !defined EBADMSG
8243 #if !defined EOVERFLOW
8246 #if !defined ENOTSUP
8249 #if !defined ENETRESET
8252 #if !defined ECONNABORTED
8261 #if !defined ECANCELED
8264 #if !defined EOWNERDEAD
8267 #if !defined ENOTRECOVERABLE
8275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8276 $EGREP "booboo" >/dev/null 2>&1
8278 gl_cv_header_errno_h_complete=no
8280 gl_cv_header_errno_h_complete=yes
8286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8287 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
8288 if test $gl_cv_header_errno_h_complete = yes; then
8299 if test $gl_cv_have_include_next = yes; then
8300 gl_cv_next_errno_h='<'errno.h'>'
8302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8303 printf %s "checking absolute name of <errno.h>... " >&6; }
8304 if test ${gl_cv_next_errno_h+y}
8306 printf %s "(cached) " >&6
8311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8312 /* end confdefs.h. */
8316 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8317 *) gl_absname_cpp="$ac_cpp" ;;
8322 gl_dirsep_regex='[/\\]'
8325 gl_dirsep_regex='\/'
8328 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8329 gl_header_literal_regex=`echo 'errno.h' \
8330 | sed -e "$gl_make_literal_regex_sed"`
8331 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8332 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8338 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8339 sed -n "$gl_absolute_header_sed"`
8341 gl_header=$gl_cv_absolute_errno_h
8342 gl_cv_next_errno_h='"'$gl_header'"'
8346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8347 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
8349 NEXT_ERRNO_H=$gl_cv_next_errno_h
8351 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8352 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8353 gl_next_as_first_directive='<'errno.h'>'
8355 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8356 gl_next_as_first_directive=$gl_cv_next_errno_h
8358 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8366 if test -n "$ERRNO_H"; then
8367 GL_GENERATE_ERRNO_H_TRUE=
8368 GL_GENERATE_ERRNO_H_FALSE='#'
8370 GL_GENERATE_ERRNO_H_TRUE='#'
8371 GL_GENERATE_ERRNO_H_FALSE=
8375 if test -n "$ERRNO_H"; then
8376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8377 printf %s "checking for EMULTIHOP value... " >&6; }
8378 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
8380 printf %s "(cached) " >&6
8383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8384 /* end confdefs.h. */
8392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8393 $EGREP "yes" >/dev/null 2>&1
8395 gl_cv_header_errno_h_EMULTIHOP=yes
8397 gl_cv_header_errno_h_EMULTIHOP=no
8401 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8403 /* end confdefs.h. */
8405 #define _XOPEN_SOURCE_EXTENDED 1
8412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8413 $EGREP "yes" >/dev/null 2>&1
8415 gl_cv_header_errno_h_EMULTIHOP=hidden
8419 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8420 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8421 #define _XOPEN_SOURCE_EXTENDED 1
8423 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8436 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8437 case $gl_cv_header_errno_h_EMULTIHOP in
8439 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8442 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8450 if test -n "$ERRNO_H"; then
8451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8452 printf %s "checking for ENOLINK value... " >&6; }
8453 if test ${gl_cv_header_errno_h_ENOLINK+y}
8455 printf %s "(cached) " >&6
8458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8459 /* end confdefs.h. */
8467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8468 $EGREP "yes" >/dev/null 2>&1
8470 gl_cv_header_errno_h_ENOLINK=yes
8472 gl_cv_header_errno_h_ENOLINK=no
8476 if test $gl_cv_header_errno_h_ENOLINK = no; then
8477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8478 /* end confdefs.h. */
8480 #define _XOPEN_SOURCE_EXTENDED 1
8487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8488 $EGREP "yes" >/dev/null 2>&1
8490 gl_cv_header_errno_h_ENOLINK=hidden
8494 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8495 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8496 #define _XOPEN_SOURCE_EXTENDED 1
8498 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8511 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
8512 case $gl_cv_header_errno_h_ENOLINK in
8514 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8517 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8525 if test -n "$ERRNO_H"; then
8526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8527 printf %s "checking for EOVERFLOW value... " >&6; }
8528 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
8530 printf %s "(cached) " >&6
8533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8534 /* end confdefs.h. */
8542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8543 $EGREP "yes" >/dev/null 2>&1
8545 gl_cv_header_errno_h_EOVERFLOW=yes
8547 gl_cv_header_errno_h_EOVERFLOW=no
8551 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8553 /* end confdefs.h. */
8555 #define _XOPEN_SOURCE_EXTENDED 1
8562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8563 $EGREP "yes" >/dev/null 2>&1
8565 gl_cv_header_errno_h_EOVERFLOW=hidden
8569 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8570 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8571 #define _XOPEN_SOURCE_EXTENDED 1
8573 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8586 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8587 case $gl_cv_header_errno_h_EOVERFLOW in
8589 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8592 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8600 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8601 if test "x$ac_cv_have_decl_strerror_r" = xyes
8608 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
8613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8614 printf %s "checking whether strerror_r returns char *... " >&6; }
8615 if test ${ac_cv_func_strerror_r_char_p+y}
8617 printf %s "(cached) " >&6
8620 ac_cv_func_strerror_r_char_p=no
8621 if test $ac_cv_have_decl_strerror_r = yes; then
8622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8623 /* end confdefs.h. */
8624 $ac_includes_default
8630 char x = *strerror_r (0, buf, sizeof buf);
8631 char *p = strerror_r (0, buf, sizeof buf);
8638 if ac_fn_c_try_compile "$LINENO"
8640 ac_cv_func_strerror_r_char_p=yes
8642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8644 # strerror_r is not declared. Choose between
8645 # systems that have relatively inaccessible declarations for the
8646 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8647 # former has a strerror_r that returns char*, while the latter
8648 # has a strerror_r that returns `int'.
8649 # This test should segfault on the DEC system.
8650 if test "$cross_compiling" = yes
8654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8655 /* end confdefs.h. */
8656 $ac_includes_default
8657 extern char *strerror_r ();
8662 char x = *strerror_r (0, buf, sizeof buf);
8663 return ! isalpha (x);
8668 if ac_fn_c_try_run "$LINENO"
8670 ac_cv_func_strerror_r_char_p=yes
8672 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8673 conftest.$ac_objext conftest.beam conftest.$ac_ext
8679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8680 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
8681 if test $ac_cv_func_strerror_r_char_p = yes; then
8683 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8688 XGETTEXT_EXTRA_OPTIONS=
8693 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8694 if test "x$ac_cv_have_decl_fchdir" = xyes
8701 printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h
8712 GNULIB_FPRINTF_POSIX=0;
8728 GNULIB_OBSTACK_PRINTF=0;
8729 GNULIB_OBSTACK_PRINTF_POSIX=0;
8734 GNULIB_PRINTF_POSIX=0;
8743 GNULIB_SPRINTF_POSIX=0;
8744 GNULIB_STDIO_H_NONBLOCKING=0;
8745 GNULIB_STDIO_H_SIGPIPE=0;
8752 GNULIB_VFPRINTF_POSIX=0;
8754 GNULIB_VPRINTF_POSIX=0;
8756 GNULIB_VSPRINTF_POSIX=0;
8760 HAVE_DECL_GETDELIM=1;
8761 HAVE_DECL_GETLINE=1;
8762 HAVE_DECL_OBSTACK_PRINTF=1;
8763 HAVE_DECL_SNPRINTF=1;
8764 HAVE_DECL_VSNPRINTF=1;
8787 REPLACE_OBSTACK_PRINTF=0;
8796 REPLACE_STDIO_READ_FUNCS=0;
8797 REPLACE_STDIO_WRITE_FUNCS=0;
8799 REPLACE_VASPRINTF=0;
8803 REPLACE_VSNPRINTF=0;
8808 GNULIB_NONBLOCKING=0;
8824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8825 printf %s "checking for working fcntl.h... " >&6; }
8826 if test ${gl_cv_header_working_fcntl_h+y}
8828 printf %s "(cached) " >&6
8830 if test "$cross_compiling" = yes
8833 # Guess 'no' on native Windows.
8834 mingw*) gl_cv_header_working_fcntl_h='no' ;;
8835 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
8839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8840 /* end confdefs.h. */
8841 #include <sys/types.h>
8842 #include <sys/stat.h>
8844 # include <unistd.h>
8845 #else /* on Windows with MSVC */
8847 # include <stdlib.h>
8848 # defined sleep(n) _sleep ((n) * 1000)
8855 #define O_NOFOLLOW 0
8857 static int const constants[] =
8859 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8860 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8867 int result = !constants;
8870 static char const sym[] = "conftest.sym";
8871 if (symlink ("/dev/null", sym) != 0)
8875 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8882 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8886 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8897 static char const file[] = "confdefs.h";
8898 int fd = open (file, O_RDONLY | O_NOATIME);
8904 if (fstat (fd, &st0) != 0)
8910 if (read (fd, &c, 1) != 1)
8914 if (close (fd) != 0)
8919 if (stat (file, &st1) != 0)
8922 if (st0.st_atime != st1.st_atime)
8934 if ac_fn_c_try_run "$LINENO"
8936 gl_cv_header_working_fcntl_h=yes
8939 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8940 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8941 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8942 *) gl_cv_header_working_fcntl_h='no';;
8945 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8946 conftest.$ac_objext conftest.beam conftest.$ac_ext
8951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8952 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
8954 case $gl_cv_header_working_fcntl_h in #(
8955 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8959 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
8962 case $gl_cv_header_working_fcntl_h in #(
8963 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8967 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
8970 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8971 if test "x$ac_cv_type_pid_t" = xyes
8976 printf "%s\n" "#define pid_t int" >>confdefs.h
8980 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8981 if test "x$ac_cv_type_mode_t" = xyes
8986 printf "%s\n" "#define mode_t int" >>confdefs.h
8992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8993 printf %s "checking for promoted mode_t type... " >&6; }
8994 if test ${gl_cv_promoted_mode_t+y}
8996 printf %s "(cached) " >&6
8999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9000 /* end confdefs.h. */
9001 #include <sys/types.h>
9005 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
9010 if ac_fn_c_try_compile "$LINENO"
9012 gl_cv_promoted_mode_t='int'
9014 gl_cv_promoted_mode_t='mode_t'
9016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
9020 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
9022 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
9025 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
9026 if test "x$ac_cv_have_decl_fdatasync" = xyes
9033 printf "%s\n" "#define HAVE_DECL_FDATASYNC $ac_have_decl" >>confdefs.h
9037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
9038 printf %s "checking for stdint.h... " >&6; }
9039 if test ${gl_cv_header_stdint_h+y}
9041 printf %s "(cached) " >&6
9043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044 /* end confdefs.h. */
9045 #include <sys/types.h>
9050 uintmax_t i = (uintmax_t) -1; return !i;
9055 if ac_fn_c_try_compile "$LINENO"
9057 gl_cv_header_stdint_h=yes
9059 gl_cv_header_stdint_h=no
9061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
9064 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
9065 if test $gl_cv_header_stdint_h = yes; then
9067 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
9072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
9073 printf %s "checking for inttypes.h... " >&6; }
9074 if test ${gl_cv_header_inttypes_h+y}
9076 printf %s "(cached) " >&6
9078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9079 /* end confdefs.h. */
9081 #include <sys/types.h>
9082 #include <inttypes.h>
9087 uintmax_t i = (uintmax_t) -1; return !i;
9092 if ac_fn_c_try_compile "$LINENO"
9094 gl_cv_header_inttypes_h=yes
9096 gl_cv_header_inttypes_h=no
9098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
9101 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
9102 if test $gl_cv_header_inttypes_h = yes; then
9104 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
9112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
9113 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
9114 if test ${gl_cv_func_printf_sizes_c99+y}
9116 printf %s "(cached) " >&6
9119 if test "$cross_compiling" = yes
9123 # Guess yes on glibc systems.
9124 *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
9125 # Guess yes on FreeBSD >= 5.
9126 freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
9127 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9128 # Guess yes on Mac OS X >= 10.3.
9129 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
9130 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
9131 # Guess yes on OpenBSD >= 3.9.
9132 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
9133 gl_cv_func_printf_sizes_c99="guessing no";;
9134 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9135 # Guess yes on Solaris >= 2.10.
9136 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9137 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
9138 # Guess yes on NetBSD >= 3.
9139 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9140 gl_cv_func_printf_sizes_c99="guessing no";;
9141 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9142 # Guess yes on MSVC, no on mingw.
9143 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9144 /* end confdefs.h. */
9151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9152 $EGREP "Known" >/dev/null 2>&1
9154 gl_cv_func_printf_sizes_c99="guessing yes"
9156 gl_cv_func_printf_sizes_c99="guessing no"
9161 # If we don't know, assume the worst.
9162 *) gl_cv_func_printf_sizes_c99="guessing no";;
9166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9167 /* end confdefs.h. */
9172 #include <sys/types.h>
9173 #if HAVE_STDINT_H_WITH_UINTMAX
9174 # include <stdint.h>
9176 #if HAVE_INTTYPES_H_WITH_UINTMAX
9177 # include <inttypes.h>
9179 static char buf[100];
9183 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
9185 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
9186 || strcmp (buf, "12345671 33") != 0)
9192 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
9193 || strcmp (buf, "12345672 33") != 0)
9196 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
9197 || strcmp (buf, "12345673 33") != 0)
9200 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
9201 || strcmp (buf, "1.5 33") != 0)
9206 if ac_fn_c_try_run "$LINENO"
9208 gl_cv_func_printf_sizes_c99=yes
9210 gl_cv_func_printf_sizes_c99=no
9212 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9213 conftest.$ac_objext conftest.beam conftest.$ac_ext
9218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
9219 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
9223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
9224 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
9225 if test ${gl_cv_func_printf_long_double+y}
9227 printf %s "(cached) " >&6
9230 if test "$cross_compiling" = yes
9233 beos*) gl_cv_func_printf_long_double="guessing no";;
9234 # Guess yes on MSVC, no on mingw.
9235 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9236 /* end confdefs.h. */
9243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9244 $EGREP "Known" >/dev/null 2>&1
9246 gl_cv_func_printf_long_double="guessing yes"
9248 gl_cv_func_printf_long_double="guessing no"
9253 *) gl_cv_func_printf_long_double="guessing yes";;
9257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9258 /* end confdefs.h. */
9262 static char buf[10000];
9267 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
9268 || strcmp (buf, "1.750000 33") != 0)
9271 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
9272 || strcmp (buf, "1.750000e+00 33") != 0)
9275 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
9276 || strcmp (buf, "1.75 33") != 0)
9281 if ac_fn_c_try_run "$LINENO"
9283 gl_cv_func_printf_long_double=yes
9285 gl_cv_func_printf_long_double=no
9287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9288 conftest.$ac_objext conftest.beam conftest.$ac_ext
9293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
9294 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
9298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
9299 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
9300 if test ${gl_cv_func_printf_infinite+y}
9302 printf %s "(cached) " >&6
9305 if test "$cross_compiling" = yes
9309 # Guess yes on glibc systems.
9310 *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";;
9311 # Guess yes on FreeBSD >= 6.
9312 freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
9313 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
9314 # Guess yes on Mac OS X >= 10.3.
9315 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
9316 darwin*) gl_cv_func_printf_infinite="guessing yes";;
9317 # Guess yes on HP-UX >= 11.
9318 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
9319 hpux*) gl_cv_func_printf_infinite="guessing yes";;
9320 # Guess yes on NetBSD >= 3.
9321 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9322 gl_cv_func_printf_infinite="guessing no";;
9323 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
9324 # Guess yes on BeOS.
9325 beos*) gl_cv_func_printf_infinite="guessing yes";;
9326 # Guess yes on MSVC, no on mingw.
9327 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9328 /* end confdefs.h. */
9335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9336 $EGREP "Known" >/dev/null 2>&1
9338 gl_cv_func_printf_infinite="guessing yes"
9340 gl_cv_func_printf_infinite="guessing no"
9345 # If we don't know, assume the worst.
9346 *) gl_cv_func_printf_infinite="guessing no";;
9350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9351 /* end confdefs.h. */
9356 strisnan (const char *string, size_t start_index, size_t end_index)
9358 if (start_index < end_index)
9360 if (string[start_index] == '-')
9362 if (start_index + 3 <= end_index
9363 && memcmp (string + start_index, "nan", 3) == 0)
9366 if (start_index == end_index
9367 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9376 static double plus_zero = 0.0;
9377 double minus_zero = - plus_zero;
9378 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
9380 static char buf[10000];
9381 static double zero = 0.0;
9385 if (sprintf (buf, "%f", 1.0 / zero) < 0
9386 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9388 if (sprintf (buf, "%f", -1.0 / zero) < 0
9389 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9391 if (sprintf (buf, "%f", zero / zero) < 0
9392 || !strisnan (buf, 0, strlen (buf)))
9394 if (sprintf (buf, "%e", 1.0 / zero) < 0
9395 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9397 if (sprintf (buf, "%e", -1.0 / zero) < 0
9398 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9400 if (sprintf (buf, "%e", zero / zero) < 0
9401 || !strisnan (buf, 0, strlen (buf)))
9403 if (sprintf (buf, "%g", 1.0 / zero) < 0
9404 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9406 if (sprintf (buf, "%g", -1.0 / zero) < 0
9407 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9409 if (sprintf (buf, "%g", zero / zero) < 0
9410 || !strisnan (buf, 0, strlen (buf)))
9412 /* This test fails on HP-UX 10.20. */
9413 if (have_minus_zero ())
9414 if (sprintf (buf, "%g", - zero) < 0
9415 || strcmp (buf, "-0") != 0)
9420 if ac_fn_c_try_run "$LINENO"
9422 gl_cv_func_printf_infinite=yes
9424 gl_cv_func_printf_infinite=no
9426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9427 conftest.$ac_objext conftest.beam conftest.$ac_ext
9432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
9433 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
9436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9437 printf %s "checking whether byte ordering is bigendian... " >&6; }
9438 if test ${ac_cv_c_bigendian+y}
9440 printf %s "(cached) " >&6
9442 ac_cv_c_bigendian=unknown
9443 # See if we're dealing with a universal compiler.
9444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9445 /* end confdefs.h. */
9446 #ifndef __APPLE_CC__
9447 not a universal capable compiler
9452 if ac_fn_c_try_compile "$LINENO"
9455 # Check for potential -arch flags. It is not universal unless
9456 # there are at least two -arch flags with different values.
9459 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9460 if test -n "$ac_prev"; then
9462 i?86 | x86_64 | ppc | ppc64)
9463 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9466 ac_cv_c_bigendian=universal
9472 elif test "x$ac_word" = "x-arch"; then
9477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9478 if test $ac_cv_c_bigendian = unknown; then
9479 # See if sys/param.h defines the BYTE_ORDER macro.
9480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9481 /* end confdefs.h. */
9482 #include <sys/types.h>
9483 #include <sys/param.h>
9488 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9489 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9498 if ac_fn_c_try_compile "$LINENO"
9500 # It does; now see whether it defined to BIG_ENDIAN or not.
9501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9502 /* end confdefs.h. */
9503 #include <sys/types.h>
9504 #include <sys/param.h>
9509 #if BYTE_ORDER != BIG_ENDIAN
9517 if ac_fn_c_try_compile "$LINENO"
9519 ac_cv_c_bigendian=yes
9521 ac_cv_c_bigendian=no
9523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9527 if test $ac_cv_c_bigendian = unknown; then
9528 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9530 /* end confdefs.h. */
9536 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9544 if ac_fn_c_try_compile "$LINENO"
9546 # It does; now see whether it defined to _BIG_ENDIAN or not.
9547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9548 /* end confdefs.h. */
9562 if ac_fn_c_try_compile "$LINENO"
9564 ac_cv_c_bigendian=yes
9566 ac_cv_c_bigendian=no
9568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9572 if test $ac_cv_c_bigendian = unknown; then
9573 # Compile a test program.
9574 if test "$cross_compiling" = yes
9576 # Try to guess by grepping values from an object file.
9577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9578 /* end confdefs.h. */
9579 short int ascii_mm[] =
9580 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9581 short int ascii_ii[] =
9582 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9583 int use_ascii (int i) {
9584 return ascii_mm[i] + ascii_ii[i];
9586 short int ebcdic_ii[] =
9587 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9588 short int ebcdic_mm[] =
9589 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9590 int use_ebcdic (int i) {
9591 return ebcdic_mm[i] + ebcdic_ii[i];
9598 return use_ascii (foo) == use_ebcdic (foo);
9603 if ac_fn_c_try_compile "$LINENO"
9605 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9606 ac_cv_c_bigendian=yes
9608 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9609 if test "$ac_cv_c_bigendian" = unknown; then
9610 ac_cv_c_bigendian=no
9612 # finding both strings is unlikely to happen, but who knows?
9613 ac_cv_c_bigendian=unknown
9617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9620 /* end confdefs.h. */
9621 $ac_includes_default
9626 /* Are we little or big endian? From Harbison&Steele. */
9630 char c[sizeof (long int)];
9633 return u.c[sizeof (long int) - 1] == 1;
9639 if ac_fn_c_try_run "$LINENO"
9641 ac_cv_c_bigendian=no
9643 ac_cv_c_bigendian=yes
9645 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9646 conftest.$ac_objext conftest.beam conftest.$ac_ext
9651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9652 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
9653 case $ac_cv_c_bigendian in #(
9655 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
9661 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9665 as_fn_error $? "unknown endianness
9666 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9672 printf %s "checking whether long double and double are the same... " >&6; }
9673 if test ${gl_cv_long_double_equals_double+y}
9675 printf %s "(cached) " >&6
9677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678 /* end confdefs.h. */
9683 typedef int check[sizeof (long double) == sizeof (double)
9684 && LDBL_MANT_DIG == DBL_MANT_DIG
9685 && LDBL_MAX_EXP == DBL_MAX_EXP
9686 && LDBL_MIN_EXP == DBL_MIN_EXP
9693 if ac_fn_c_try_compile "$LINENO"
9695 gl_cv_long_double_equals_double=yes
9697 gl_cv_long_double_equals_double=no
9699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9703 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
9704 if test $gl_cv_long_double_equals_double = yes; then
9706 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9708 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9710 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9719 if test -n "$gl_printf_safe"; then
9721 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9724 case "$gl_cv_func_printf_long_double" in
9726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9727 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
9728 if test ${gl_cv_func_printf_infinite_long_double+y}
9730 printf %s "(cached) " >&6
9733 if test "$cross_compiling" = yes
9736 # Guess no on ia64, x86_64, i386.
9737 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9740 # Guess yes on glibc systems.
9741 *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9742 # Guess yes on FreeBSD >= 6.
9743 freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
9744 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9745 # Guess yes on HP-UX >= 11.
9746 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9747 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9748 # Guess yes on MSVC, no on mingw.
9749 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9750 /* end confdefs.h. */
9757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9758 $EGREP "Known" >/dev/null 2>&1
9760 gl_cv_func_printf_infinite_long_double="guessing yes"
9762 gl_cv_func_printf_infinite_long_double="guessing no"
9767 # If we don't know, assume the worst.
9768 *) gl_cv_func_printf_infinite_long_double="guessing no";;
9774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775 /* end confdefs.h. */
9779 #if defined __MACH__ && defined __APPLE__
9780 /* Avoid a crash on Mac OS X. */
9781 #include <mach/mach.h>
9782 #include <mach/mach_error.h>
9783 #include <mach/thread_status.h>
9784 #include <mach/exception.h>
9785 #include <mach/task.h>
9786 #include <pthread.h>
9787 /* The exception port on which our thread listens. */
9788 static mach_port_t our_exception_port;
9789 /* The main function of the thread listening for exceptions of type
9792 mach_exception_thread (void *arg)
9794 /* Buffer for a message to be received. */
9796 mach_msg_header_t head;
9797 mach_msg_body_t msgh_body;
9800 mach_msg_return_t retval;
9801 /* Wait for a message on the exception port. */
9802 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9803 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9804 if (retval != MACH_MSG_SUCCESS)
9811 mach_port_t self = mach_task_self ();
9812 /* Allocate a port on which the thread shall listen for exceptions. */
9813 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9815 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9816 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9817 MACH_MSG_TYPE_MAKE_SEND)
9819 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9821 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9822 /* Create the thread listening on the exception port. */
9823 pthread_attr_t attr;
9825 if (pthread_attr_init (&attr) == 0
9826 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9827 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9828 pthread_attr_destroy (&attr);
9829 /* Replace the exception port info for these exceptions with our own.
9830 Note that we replace the exception port for the entire task, not only
9831 for a particular thread. This has the effect that when our exception
9832 port gets the message, the thread specific exception port has already
9833 been asked, and we don't need to bother about it.
9834 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9835 task_set_exception_ports (self, mask, our_exception_port,
9836 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9841 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9842 /* Avoid a crash on native Windows. */
9843 #define WIN32_LEAN_AND_MEAN
9844 #include <windows.h>
9845 #include <winerror.h>
9847 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9849 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9851 case EXCEPTION_ACCESS_VIOLATION:
9852 case EXCEPTION_IN_PAGE_ERROR:
9853 case EXCEPTION_STACK_OVERFLOW:
9854 case EXCEPTION_GUARD_PAGE:
9855 case EXCEPTION_PRIV_INSTRUCTION:
9856 case EXCEPTION_ILLEGAL_INSTRUCTION:
9857 case EXCEPTION_DATATYPE_MISALIGNMENT:
9858 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9859 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9862 return EXCEPTION_CONTINUE_SEARCH;
9867 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9870 /* Avoid a crash on POSIX systems. */
9873 /* A POSIX signal handler. */
9875 exception_handler (int sig)
9883 signal (SIGSEGV, exception_handler);
9886 signal (SIGBUS, exception_handler);
9895 strisnan (const char *string, size_t start_index, size_t end_index)
9897 if (start_index < end_index)
9899 if (string[start_index] == '-')
9901 if (start_index + 3 <= end_index
9902 && memcmp (string + start_index, "nan", 3) == 0)
9905 if (start_index == end_index
9906 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9912 static char buf[10000];
9913 static long double zeroL = 0.0L;
9918 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9919 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9921 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9922 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9924 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9925 || !strisnan (buf, 0, strlen (buf)))
9927 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9928 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9930 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9931 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9933 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9934 || !strisnan (buf, 0, strlen (buf)))
9936 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9937 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9939 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9940 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9942 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9943 || !strisnan (buf, 0, strlen (buf)))
9945 #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
9946 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9947 of 'unsigned int' words. */
9948 # ifdef WORDS_BIGENDIAN
9949 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9950 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9951 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
9952 (unsigned int) (mantlo) << 16 \
9955 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9956 { mantlo, manthi, exponent }
9959 static union { unsigned int word[4]; long double value; } x =
9960 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
9961 if (sprintf (buf, "%Lf", x.value) < 0
9962 || !strisnan (buf, 0, strlen (buf)))
9964 if (sprintf (buf, "%Le", x.value) < 0
9965 || !strisnan (buf, 0, strlen (buf)))
9967 if (sprintf (buf, "%Lg", x.value) < 0
9968 || !strisnan (buf, 0, strlen (buf)))
9972 /* Signalling NaN. */
9973 static union { unsigned int word[4]; long double value; } x =
9974 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
9975 if (sprintf (buf, "%Lf", x.value) < 0
9976 || !strisnan (buf, 0, strlen (buf)))
9978 if (sprintf (buf, "%Le", x.value) < 0
9979 || !strisnan (buf, 0, strlen (buf)))
9981 if (sprintf (buf, "%Lg", x.value) < 0
9982 || !strisnan (buf, 0, strlen (buf)))
9986 static union { unsigned int word[4]; long double value; } x =
9987 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
9988 if (sprintf (buf, "%Lf", x.value) <= 0)
9990 if (sprintf (buf, "%Le", x.value) <= 0)
9992 if (sprintf (buf, "%Lg", x.value) <= 0)
9995 { /* Pseudo-Infinity. */
9996 static union { unsigned int word[4]; long double value; } x =
9997 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
9998 if (sprintf (buf, "%Lf", x.value) <= 0)
10000 if (sprintf (buf, "%Le", x.value) <= 0)
10002 if (sprintf (buf, "%Lg", x.value) <= 0)
10005 { /* Pseudo-Zero. */
10006 static union { unsigned int word[4]; long double value; } x =
10007 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
10008 if (sprintf (buf, "%Lf", x.value) <= 0)
10010 if (sprintf (buf, "%Le", x.value) <= 0)
10012 if (sprintf (buf, "%Lg", x.value) <= 0)
10015 { /* Unnormalized number. */
10016 static union { unsigned int word[4]; long double value; } x =
10017 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
10018 if (sprintf (buf, "%Lf", x.value) <= 0)
10020 if (sprintf (buf, "%Le", x.value) <= 0)
10022 if (sprintf (buf, "%Lg", x.value) <= 0)
10025 { /* Pseudo-Denormal. */
10026 static union { unsigned int word[4]; long double value; } x =
10027 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
10028 if (sprintf (buf, "%Lf", x.value) <= 0)
10030 if (sprintf (buf, "%Le", x.value) <= 0)
10032 if (sprintf (buf, "%Lg", x.value) <= 0)
10039 if ac_fn_c_try_run "$LINENO"
10041 gl_cv_func_printf_infinite_long_double=yes
10043 gl_cv_func_printf_infinite_long_double=no
10045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10046 conftest.$ac_objext conftest.beam conftest.$ac_ext
10051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
10052 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
10055 gl_cv_func_printf_infinite_long_double="irrelevant"
10061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
10062 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
10063 if test ${gl_cv_func_printf_directive_a+y}
10065 printf %s "(cached) " >&6
10068 if test "$cross_compiling" = yes
10072 # Guess yes on glibc >= 2.5 systems.
10074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10075 /* end confdefs.h. */
10077 #include <features.h>
10078 #ifdef __GNU_LIBRARY__
10079 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
10085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10086 $EGREP "BZ2908" >/dev/null 2>&1
10088 gl_cv_func_printf_directive_a="guessing yes"
10090 gl_cv_func_printf_directive_a="guessing no"
10095 # Guess no on native Windows.
10096 mingw*) gl_cv_func_printf_directive_a="guessing no";;
10097 # If we don't know, assume the worst.
10098 *) gl_cv_func_printf_directive_a="guessing no";;
10102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10103 /* end confdefs.h. */
10106 #include <string.h>
10107 static char buf[100];
10108 static double zero = 0.0;
10112 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
10113 || (strcmp (buf, "0x1.922p+1 33") != 0
10114 && strcmp (buf, "0x3.244p+0 33") != 0
10115 && strcmp (buf, "0x6.488p-1 33") != 0
10116 && strcmp (buf, "0xc.91p-2 33") != 0))
10118 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
10119 || (strcmp (buf, "-0X1.922P+1 33") != 0
10120 && strcmp (buf, "-0X3.244P+0 33") != 0
10121 && strcmp (buf, "-0X6.488P-1 33") != 0
10122 && strcmp (buf, "-0XC.91P-2 33") != 0))
10124 /* This catches a FreeBSD 6.1 bug: it doesn't round. */
10125 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
10126 || (strcmp (buf, "0x1.83p+0 33") != 0
10127 && strcmp (buf, "0x3.05p-1 33") != 0
10128 && strcmp (buf, "0x6.0ap-2 33") != 0
10129 && strcmp (buf, "0xc.14p-3 33") != 0))
10131 /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
10132 if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
10133 || (strcmp (buf, "0x2p+0 33") != 0
10134 && strcmp (buf, "0x3p-1 33") != 0
10135 && strcmp (buf, "0x6p-2 33") != 0
10136 && strcmp (buf, "0xcp-3 33") != 0))
10138 /* This catches a FreeBSD 6.1 bug. See
10139 <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
10140 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
10143 /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
10144 if (sprintf (buf, "%.1a", 1.999) < 0
10145 || (strcmp (buf, "0x1.0p+1") != 0
10146 && strcmp (buf, "0x2.0p+0") != 0
10147 && strcmp (buf, "0x4.0p-1") != 0
10148 && strcmp (buf, "0x8.0p-2") != 0))
10150 /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
10151 glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
10152 if (sprintf (buf, "%.1La", 1.999L) < 0
10153 || (strcmp (buf, "0x1.0p+1") != 0
10154 && strcmp (buf, "0x2.0p+0") != 0
10155 && strcmp (buf, "0x4.0p-1") != 0
10156 && strcmp (buf, "0x8.0p-2") != 0))
10161 if ac_fn_c_try_run "$LINENO"
10163 gl_cv_func_printf_directive_a=yes
10165 gl_cv_func_printf_directive_a=no
10167 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10168 conftest.$ac_objext conftest.beam conftest.$ac_ext
10173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
10174 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
10178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
10179 printf %s "checking whether printf supports the 'F' directive... " >&6; }
10180 if test ${gl_cv_func_printf_directive_f+y}
10182 printf %s "(cached) " >&6
10185 if test "$cross_compiling" = yes
10189 # Guess yes on glibc systems.
10190 *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";;
10191 # Guess yes on FreeBSD >= 6.
10192 freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
10193 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
10194 # Guess yes on Mac OS X >= 10.3.
10195 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
10196 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
10197 # Guess yes on Solaris >= 2.10.
10198 solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
10199 solaris*) gl_cv_func_printf_directive_f="guessing no";;
10200 # Guess yes on MSVC, no on mingw.
10201 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10202 /* end confdefs.h. */
10209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10210 $EGREP "Known" >/dev/null 2>&1
10212 gl_cv_func_printf_directive_f="guessing yes"
10214 gl_cv_func_printf_directive_f="guessing no"
10219 # If we don't know, assume the worst.
10220 *) gl_cv_func_printf_directive_f="guessing no";;
10224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10225 /* end confdefs.h. */
10228 #include <string.h>
10229 static char buf[100];
10230 static double zero = 0.0;
10234 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
10235 || strcmp (buf, "1234567.000000 33") != 0)
10237 if (sprintf (buf, "%F", 1.0 / zero) < 0
10238 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
10240 /* This catches a Cygwin 1.5.x bug. */
10241 if (sprintf (buf, "%.F", 1234.0) < 0
10242 || strcmp (buf, "1234") != 0)
10247 if ac_fn_c_try_run "$LINENO"
10249 gl_cv_func_printf_directive_f=yes
10251 gl_cv_func_printf_directive_f=no
10253 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10254 conftest.$ac_objext conftest.beam conftest.$ac_ext
10259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
10260 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
10264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
10265 printf %s "checking whether printf supports the 'n' directive... " >&6; }
10266 if test ${gl_cv_func_printf_directive_n+y}
10268 printf %s "(cached) " >&6
10271 if test "$cross_compiling" = yes
10274 # Guess no on native Windows.
10275 mingw*) gl_cv_func_printf_directive_n="guessing no";;
10276 *) gl_cv_func_printf_directive_n="guessing yes";;
10280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10281 /* end confdefs.h. */
10284 #include <stdlib.h>
10285 #include <string.h>
10287 /* See page about "Parameter Validation" on msdn.microsoft.com. */
10289 invalid_parameter_handler (const wchar_t *expression,
10290 const wchar_t *function,
10291 const wchar_t *file, unsigned int line,
10297 static char fmtstring[10];
10298 static char buf[100];
10303 _set_invalid_parameter_handler (invalid_parameter_handler);
10305 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
10306 support %n in format strings in read-only memory but not in writable
10308 strcpy (fmtstring, "%d %n");
10309 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
10310 || strcmp (buf, "123 ") != 0
10316 if ac_fn_c_try_run "$LINENO"
10318 gl_cv_func_printf_directive_n=yes
10320 gl_cv_func_printf_directive_n=no
10322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10323 conftest.$ac_objext conftest.beam conftest.$ac_ext
10328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
10329 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
10333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
10334 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
10335 if test ${gl_cv_func_printf_directive_ls+y}
10337 printf %s "(cached) " >&6
10340 if test "$cross_compiling" = yes
10344 openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
10345 irix*) gl_cv_func_printf_directive_ls="guessing no";;
10346 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
10347 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
10348 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
10349 # Guess yes on native Windows.
10350 mingw*) gl_cv_func_printf_directive_ls="guessing yes";;
10351 *) gl_cv_func_printf_directive_ls="guessing yes";;
10355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10356 /* end confdefs.h. */
10358 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10360 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10361 included before <wchar.h>. */
10362 #include <stddef.h>
10366 #include <string.h>
10371 /* Test whether %ls works at all.
10372 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
10375 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
10377 if (sprintf (buf, "%ls", wstring) < 0
10378 || strcmp (buf, "abc") != 0)
10381 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
10382 assertion failure inside libc), but not on OpenBSD 4.0. */
10384 static const wchar_t wstring[] = { 'a', 0 };
10386 if (sprintf (buf, "%ls", wstring) < 0
10387 || strcmp (buf, "a") != 0)
10390 /* Test whether precisions in %ls are supported as specified in ISO C 99
10392 "If a precision is specified, no more than that many bytes are written
10393 (including shift sequences, if any), and the array shall contain a
10394 null wide character if, to equal the multibyte character sequence
10395 length given by the precision, the function would need to access a
10396 wide character one past the end of the array."
10397 This test fails on Solaris 10. */
10399 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
10401 if (sprintf (buf, "%.2ls", wstring) < 0
10402 || strcmp (buf, "ab") != 0)
10408 if ac_fn_c_try_run "$LINENO"
10410 gl_cv_func_printf_directive_ls=yes
10412 gl_cv_func_printf_directive_ls=no
10414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10415 conftest.$ac_objext conftest.beam conftest.$ac_ext
10420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
10421 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
10425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
10426 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
10427 if test ${gl_cv_func_printf_positions+y}
10429 printf %s "(cached) " >&6
10432 if test "$cross_compiling" = yes
10436 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
10437 gl_cv_func_printf_positions="guessing no";;
10438 beos*) gl_cv_func_printf_positions="guessing no";;
10439 # Guess no on native Windows.
10440 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
10441 *) gl_cv_func_printf_positions="guessing yes";;
10445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10446 /* end confdefs.h. */
10449 #include <string.h>
10450 /* The string "%2$d %1$d", with dollar characters protected from the shell's
10451 dollar expansion (possibly an autoconf bug). */
10452 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
10453 static char buf[100];
10456 sprintf (buf, format, 33, 55);
10457 return (strcmp (buf, "55 33") != 0);
10460 if ac_fn_c_try_run "$LINENO"
10462 gl_cv_func_printf_positions=yes
10464 gl_cv_func_printf_positions=no
10466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10467 conftest.$ac_objext conftest.beam conftest.$ac_ext
10472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
10473 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
10477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
10478 printf %s "checking whether printf supports the grouping flag... " >&6; }
10479 if test ${gl_cv_func_printf_flag_grouping+y}
10481 printf %s "(cached) " >&6
10484 if test "$cross_compiling" = yes
10488 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
10489 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
10490 # Guess no on native Windows.
10491 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
10492 *) gl_cv_func_printf_flag_grouping="guessing yes";;
10496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10497 /* end confdefs.h. */
10500 #include <string.h>
10501 static char buf[100];
10504 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
10505 || buf[strlen (buf) - 1] != '9')
10510 if ac_fn_c_try_run "$LINENO"
10512 gl_cv_func_printf_flag_grouping=yes
10514 gl_cv_func_printf_flag_grouping=no
10516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10517 conftest.$ac_objext conftest.beam conftest.$ac_ext
10522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
10523 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
10527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
10528 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
10529 if test ${gl_cv_func_printf_flag_leftadjust+y}
10531 printf %s "(cached) " >&6
10534 if test "$cross_compiling" = yes
10538 # Guess yes on HP-UX 11.
10539 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10540 # Guess no on HP-UX 10 and older.
10541 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
10542 # Guess yes on native Windows.
10543 mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10544 # Guess yes otherwise.
10545 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10550 /* end confdefs.h. */
10553 #include <string.h>
10554 static char buf[100];
10557 /* Check that a '-' flag is not annihilated by a negative width. */
10558 if (sprintf (buf, "a%-*sc", -3, "b") < 0
10559 || strcmp (buf, "ab c") != 0)
10564 if ac_fn_c_try_run "$LINENO"
10566 gl_cv_func_printf_flag_leftadjust=yes
10568 gl_cv_func_printf_flag_leftadjust=no
10570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10571 conftest.$ac_objext conftest.beam conftest.$ac_ext
10576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10577 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
10581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10582 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
10583 if test ${gl_cv_func_printf_flag_zero+y}
10585 printf %s "(cached) " >&6
10588 if test "$cross_compiling" = yes
10592 # Guess yes on glibc systems.
10593 *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10594 # Guess yes on BeOS.
10595 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
10596 # Guess no on native Windows.
10597 mingw*) gl_cv_func_printf_flag_zero="guessing no";;
10598 # If we don't know, assume the worst.
10599 *) gl_cv_func_printf_flag_zero="guessing no";;
10603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10604 /* end confdefs.h. */
10607 #include <string.h>
10608 static char buf[100];
10609 static double zero = 0.0;
10612 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10613 || (strcmp (buf, " inf") != 0
10614 && strcmp (buf, " infinity") != 0))
10619 if ac_fn_c_try_run "$LINENO"
10621 gl_cv_func_printf_flag_zero=yes
10623 gl_cv_func_printf_flag_zero=no
10625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10626 conftest.$ac_objext conftest.beam conftest.$ac_ext
10631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10632 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
10636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10637 printf %s "checking whether printf supports large precisions... " >&6; }
10638 if test ${gl_cv_func_printf_precision+y}
10640 printf %s "(cached) " >&6
10643 if test "$cross_compiling" = yes
10647 # Guess no only on Solaris, native Windows, and BeOS systems.
10648 solaris*) gl_cv_func_printf_precision="guessing no" ;;
10649 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10650 beos*) gl_cv_func_printf_precision="guessing no" ;;
10651 *) gl_cv_func_printf_precision="guessing yes" ;;
10655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10656 /* end confdefs.h. */
10659 #include <string.h>
10660 static char buf[5000];
10665 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
10668 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10670 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10672 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10675 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10681 if ac_fn_c_try_run "$LINENO"
10683 gl_cv_func_printf_precision=yes
10685 gl_cv_func_printf_precision=no
10687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10688 conftest.$ac_objext conftest.beam conftest.$ac_ext
10693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10694 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
10697 gl_cv_c_multiarch=no
10698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10699 /* end confdefs.h. */
10700 #ifndef __APPLE_CC__
10701 not a universal capable compiler
10706 if ac_fn_c_try_compile "$LINENO"
10711 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10712 if test -n "$prev"; then
10714 i?86 | x86_64 | ppc | ppc64)
10715 if test -z "$arch" || test "$arch" = "$word"; then
10718 gl_cv_c_multiarch=yes
10724 if test "x$word" = "x-arch"; then
10731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10732 if test $gl_cv_c_multiarch = yes; then
10733 APPLE_UNIVERSAL_BUILD=1
10735 APPLE_UNIVERSAL_BUILD=0
10742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10743 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
10744 if test ${gl_cv_func_printf_enomem+y}
10746 printf %s "(cached) " >&6
10749 gl_cv_func_printf_enomem="guessing no"
10750 if test "$cross_compiling" = no; then
10751 if test $APPLE_UNIVERSAL_BUILD = 0; then
10752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10753 /* end confdefs.h. */
10756 #include <stdlib.h>
10757 #if defined __MACH__ && defined __APPLE__
10758 /* Avoid a crash on Mac OS X. */
10759 #include <mach/mach.h>
10760 #include <mach/mach_error.h>
10761 #include <mach/thread_status.h>
10762 #include <mach/exception.h>
10763 #include <mach/task.h>
10764 #include <pthread.h>
10765 /* The exception port on which our thread listens. */
10766 static mach_port_t our_exception_port;
10767 /* The main function of the thread listening for exceptions of type
10770 mach_exception_thread (void *arg)
10772 /* Buffer for a message to be received. */
10774 mach_msg_header_t head;
10775 mach_msg_body_t msgh_body;
10778 mach_msg_return_t retval;
10779 /* Wait for a message on the exception port. */
10780 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10781 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10782 if (retval != MACH_MSG_SUCCESS)
10787 nocrash_init (void)
10789 mach_port_t self = mach_task_self ();
10790 /* Allocate a port on which the thread shall listen for exceptions. */
10791 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10793 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
10794 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10795 MACH_MSG_TYPE_MAKE_SEND)
10797 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
10799 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10800 /* Create the thread listening on the exception port. */
10801 pthread_attr_t attr;
10803 if (pthread_attr_init (&attr) == 0
10804 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10805 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10806 pthread_attr_destroy (&attr);
10807 /* Replace the exception port info for these exceptions with our own.
10808 Note that we replace the exception port for the entire task, not only
10809 for a particular thread. This has the effect that when our exception
10810 port gets the message, the thread specific exception port has already
10811 been asked, and we don't need to bother about it.
10812 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
10813 task_set_exception_ports (self, mask, our_exception_port,
10814 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10819 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10820 /* Avoid a crash on native Windows. */
10821 #define WIN32_LEAN_AND_MEAN
10822 #include <windows.h>
10823 #include <winerror.h>
10825 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10827 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10829 case EXCEPTION_ACCESS_VIOLATION:
10830 case EXCEPTION_IN_PAGE_ERROR:
10831 case EXCEPTION_STACK_OVERFLOW:
10832 case EXCEPTION_GUARD_PAGE:
10833 case EXCEPTION_PRIV_INSTRUCTION:
10834 case EXCEPTION_ILLEGAL_INSTRUCTION:
10835 case EXCEPTION_DATATYPE_MISALIGNMENT:
10836 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10837 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10840 return EXCEPTION_CONTINUE_SEARCH;
10843 nocrash_init (void)
10845 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10848 /* Avoid a crash on POSIX systems. */
10849 #include <signal.h>
10850 #include <unistd.h>
10851 /* A POSIX signal handler. */
10853 exception_handler (int sig)
10858 nocrash_init (void)
10861 signal (SIGSEGV, exception_handler);
10864 signal (SIGBUS, exception_handler);
10870 #include <sys/types.h>
10871 #include <sys/time.h>
10872 #include <sys/resource.h>
10876 struct rlimit limit;
10879 /* Some printf implementations allocate temporary space with malloc. */
10880 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
10882 if (getrlimit (RLIMIT_DATA, &limit) < 0)
10884 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10885 limit.rlim_max = 5000000;
10886 limit.rlim_cur = limit.rlim_max;
10887 if (setrlimit (RLIMIT_DATA, &limit) < 0)
10890 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
10892 if (getrlimit (RLIMIT_AS, &limit) < 0)
10894 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10895 limit.rlim_max = 5000000;
10896 limit.rlim_cur = limit.rlim_max;
10897 if (setrlimit (RLIMIT_AS, &limit) < 0)
10900 /* Some printf implementations allocate temporary space on the stack. */
10901 #ifdef RLIMIT_STACK
10902 if (getrlimit (RLIMIT_STACK, &limit) < 0)
10904 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10905 limit.rlim_max = 5000000;
10906 limit.rlim_cur = limit.rlim_max;
10907 if (setrlimit (RLIMIT_STACK, &limit) < 0)
10910 ret = printf ("%.5000000f", 1.0);
10911 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10915 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10916 (eval $ac_link) 2>&5
10918 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10919 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10922 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
10923 if test $result != 0 && test $result != 77; then result=1; fi
10925 ) >/dev/null 2>/dev/null
10927 0) gl_cv_func_printf_enomem="yes" ;;
10928 77) gl_cv_func_printf_enomem="guessing no" ;;
10929 *) gl_cv_func_printf_enomem="no" ;;
10932 gl_cv_func_printf_enomem="guessing no"
10936 gl_cv_func_printf_enomem="guessing no"
10939 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10941 # Guess yes on glibc systems.
10942 *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";;
10943 # Guess yes on Solaris.
10944 solaris*) gl_cv_func_printf_enomem="guessing yes";;
10945 # Guess yes on AIX.
10946 aix*) gl_cv_func_printf_enomem="guessing yes";;
10947 # Guess yes on HP-UX/hppa.
10948 hpux*) case "$host_cpu" in
10949 hppa*) gl_cv_func_printf_enomem="guessing yes";;
10950 *) gl_cv_func_printf_enomem="guessing no";;
10953 # Guess yes on IRIX.
10954 irix*) gl_cv_func_printf_enomem="guessing yes";;
10955 # Guess yes on OSF/1.
10956 osf*) gl_cv_func_printf_enomem="guessing yes";;
10957 # Guess yes on BeOS.
10958 beos*) gl_cv_func_printf_enomem="guessing yes";;
10959 # Guess yes on Haiku.
10960 haiku*) gl_cv_func_printf_enomem="guessing yes";;
10961 # If we don't know, assume the worst.
10962 *) gl_cv_func_printf_enomem="guessing no";;
10967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
10968 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
10972 case "$gl_cv_func_printf_long_double" in
10977 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
10984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10985 printf %s "checking for unsigned long long int... " >&6; }
10986 if test ${ac_cv_type_unsigned_long_long_int+y}
10988 printf %s "(cached) " >&6
10990 ac_cv_type_unsigned_long_long_int=yes
10991 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10993 /* end confdefs.h. */
10995 /* For now, do not test the preprocessor; as of 2007 there are too many
10996 implementations with broken preprocessors. Perhaps this can
10997 be revisited in 2012. In the meantime, code should not expect
10998 #if to work with literals wider than 32 bits. */
10999 /* Test literals. */
11000 long long int ll = 9223372036854775807ll;
11001 long long int nll = -9223372036854775807LL;
11002 unsigned long long int ull = 18446744073709551615ULL;
11003 /* Test constant expressions. */
11004 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11006 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11012 /* Test availability of runtime routines for shift and division. */
11013 long long int llmax = 9223372036854775807ll;
11014 unsigned long long int ullmax = 18446744073709551615ull;
11015 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11016 | (llmax / ll) | (llmax % ll)
11017 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11018 | (ullmax / ull) | (ullmax % ull));
11024 if ac_fn_c_try_link "$LINENO"
11028 ac_cv_type_unsigned_long_long_int=no
11030 rm -f core conftest.err conftest.$ac_objext \
11031 conftest$ac_exeext conftest.$ac_ext
11034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11035 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
11036 if test $ac_cv_type_unsigned_long_long_int = yes; then
11038 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11045 printf %s "checking for long long int... " >&6; }
11046 if test ${ac_cv_type_long_long_int+y}
11048 printf %s "(cached) " >&6
11050 ac_cv_type_long_long_int=yes
11051 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11052 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11053 if test $ac_cv_type_long_long_int = yes; then
11054 if test "$cross_compiling" = yes
11058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11059 /* end confdefs.h. */
11060 #include <limits.h>
11063 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11064 # define LLONG_MAX (HALF - 1 + HALF)
11069 long long int n = 1;
11073 long long int m = n << i;
11076 if (LLONG_MAX / 2 < m)
11084 if ac_fn_c_try_run "$LINENO"
11088 ac_cv_type_long_long_int=no
11090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11091 conftest.$ac_objext conftest.beam conftest.$ac_ext
11097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11098 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
11099 if test $ac_cv_type_long_long_int = yes; then
11101 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
11107 printf %s "checking for wchar_t... " >&6; }
11108 if test ${gt_cv_c_wchar_t+y}
11110 printf %s "(cached) " >&6
11112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11113 /* end confdefs.h. */
11114 #include <stddef.h>
11115 wchar_t foo = (wchar_t)'\0';
11124 if ac_fn_c_try_compile "$LINENO"
11126 gt_cv_c_wchar_t=yes
11130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
11133 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
11134 if test $gt_cv_c_wchar_t = yes; then
11136 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
11141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11142 printf %s "checking for wint_t... " >&6; }
11143 if test ${gt_cv_c_wint_t+y}
11145 printf %s "(cached) " >&6
11147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11148 /* end confdefs.h. */
11150 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11152 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11153 before <wchar.h>. */
11154 #include <stddef.h>
11158 wint_t foo = (wchar_t)'\0';
11167 if ac_fn_c_try_compile "$LINENO"
11173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11176 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
11177 if test $gt_cv_c_wint_t = yes; then
11179 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
11182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
11183 printf %s "checking whether wint_t is too small... " >&6; }
11184 if test ${gl_cv_type_wint_t_too_small+y}
11186 printf %s "(cached) " >&6
11188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11189 /* end confdefs.h. */
11191 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11193 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11194 included before <wchar.h>. */
11195 #if !(defined __GLIBC__ && !defined __UCLIBC__)
11196 # include <stddef.h>
11197 # include <stdio.h>
11201 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
11211 if ac_fn_c_try_compile "$LINENO"
11213 gl_cv_type_wint_t_too_small=no
11215 gl_cv_type_wint_t_too_small=yes
11217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
11220 printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; }
11221 if test $gl_cv_type_wint_t_too_small = yes; then
11222 GNULIB_OVERRIDES_WINT_T=1
11224 GNULIB_OVERRIDES_WINT_T=0
11227 GNULIB_OVERRIDES_WINT_T=0
11234 if test $ac_cv_header_features_h = yes; then
11244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
11245 printf %s "checking for intmax_t... " >&6; }
11246 if test ${gt_cv_c_intmax_t+y}
11248 printf %s "(cached) " >&6
11250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11251 /* end confdefs.h. */
11253 #include <stddef.h>
11254 #include <stdlib.h>
11255 #if HAVE_STDINT_H_WITH_UINTMAX
11256 #include <stdint.h>
11258 #if HAVE_INTTYPES_H_WITH_UINTMAX
11259 #include <inttypes.h>
11265 intmax_t x = -1; return !x;
11270 if ac_fn_c_try_compile "$LINENO"
11272 gt_cv_c_intmax_t=yes
11274 gt_cv_c_intmax_t=no
11276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
11279 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
11280 if test $gt_cv_c_intmax_t = yes; then
11282 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
11286 test $ac_cv_type_long_long_int = yes \
11287 && ac_type='long long' \
11290 printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
11295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11296 printf %s "checking where to find the exponent in a 'double'... " >&6; }
11297 if test ${gl_cv_cc_double_expbit0+y}
11299 printf %s "(cached) " >&6
11302 if test "$cross_compiling" = yes
11305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11306 /* end confdefs.h. */
11308 #if defined arm || defined __arm || defined __arm__
11313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11314 $EGREP "mixed_endianness" >/dev/null 2>&1
11316 gl_cv_cc_double_expbit0="unknown"
11320 if test ${ac_cv_c_bigendian+y}
11322 printf %s "(cached) " >&6
11324 ac_cv_c_bigendian=unknown
11325 # See if we're dealing with a universal compiler.
11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327 /* end confdefs.h. */
11328 #ifndef __APPLE_CC__
11329 not a universal capable compiler
11334 if ac_fn_c_try_compile "$LINENO"
11337 # Check for potential -arch flags. It is not universal unless
11338 # there are at least two -arch flags with different values.
11341 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11342 if test -n "$ac_prev"; then
11344 i?86 | x86_64 | ppc | ppc64)
11345 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11348 ac_cv_c_bigendian=universal
11354 elif test "x$ac_word" = "x-arch"; then
11359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11360 if test $ac_cv_c_bigendian = unknown; then
11361 # See if sys/param.h defines the BYTE_ORDER macro.
11362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11363 /* end confdefs.h. */
11364 #include <sys/types.h>
11365 #include <sys/param.h>
11370 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11371 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11373 bogus endian macros
11380 if ac_fn_c_try_compile "$LINENO"
11382 # It does; now see whether it defined to BIG_ENDIAN or not.
11383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11384 /* end confdefs.h. */
11385 #include <sys/types.h>
11386 #include <sys/param.h>
11391 #if BYTE_ORDER != BIG_ENDIAN
11399 if ac_fn_c_try_compile "$LINENO"
11401 ac_cv_c_bigendian=yes
11403 ac_cv_c_bigendian=no
11405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11409 if test $ac_cv_c_bigendian = unknown; then
11410 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11412 /* end confdefs.h. */
11413 #include <limits.h>
11418 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11419 bogus endian macros
11426 if ac_fn_c_try_compile "$LINENO"
11428 # It does; now see whether it defined to _BIG_ENDIAN or not.
11429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11430 /* end confdefs.h. */
11431 #include <limits.h>
11436 #ifndef _BIG_ENDIAN
11444 if ac_fn_c_try_compile "$LINENO"
11446 ac_cv_c_bigendian=yes
11448 ac_cv_c_bigendian=no
11450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11454 if test $ac_cv_c_bigendian = unknown; then
11455 # Compile a test program.
11456 if test "$cross_compiling" = yes
11458 # Try to guess by grepping values from an object file.
11459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460 /* end confdefs.h. */
11461 short int ascii_mm[] =
11462 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11463 short int ascii_ii[] =
11464 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11465 int use_ascii (int i) {
11466 return ascii_mm[i] + ascii_ii[i];
11468 short int ebcdic_ii[] =
11469 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11470 short int ebcdic_mm[] =
11471 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11472 int use_ebcdic (int i) {
11473 return ebcdic_mm[i] + ebcdic_ii[i];
11480 return use_ascii (foo) == use_ebcdic (foo);
11485 if ac_fn_c_try_compile "$LINENO"
11487 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11488 ac_cv_c_bigendian=yes
11490 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11491 if test "$ac_cv_c_bigendian" = unknown; then
11492 ac_cv_c_bigendian=no
11494 # finding both strings is unlikely to happen, but who knows?
11495 ac_cv_c_bigendian=unknown
11499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11502 /* end confdefs.h. */
11503 $ac_includes_default
11508 /* Are we little or big endian? From Harbison&Steele. */
11512 char c[sizeof (long int)];
11515 return u.c[sizeof (long int) - 1] == 1;
11521 if ac_fn_c_try_run "$LINENO"
11523 ac_cv_c_bigendian=no
11525 ac_cv_c_bigendian=yes
11527 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11528 conftest.$ac_objext conftest.beam conftest.$ac_ext
11534 case $ac_cv_c_bigendian in #(
11536 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
11538 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
11541 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11545 gl_cv_cc_double_expbit0="unknown" ;;
11554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11555 /* end confdefs.h. */
11558 #include <stddef.h>
11560 #include <string.h>
11562 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11563 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11564 static unsigned int ored_words[NWORDS];
11565 static unsigned int anded_words[NWORDS];
11566 static void add_to_ored_words (double x)
11570 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11571 memset (&m, 0, sizeof (memory_double));
11573 for (i = 0; i < NWORDS; i++)
11575 ored_words[i] |= m.word[i];
11576 anded_words[i] &= m.word[i];
11582 FILE *fp = fopen ("conftest.out", "w");
11585 for (j = 0; j < NWORDS; j++)
11586 anded_words[j] = ~ (unsigned int) 0;
11587 add_to_ored_words (0.25);
11588 add_to_ored_words (0.5);
11589 add_to_ored_words (1.0);
11590 add_to_ored_words (2.0);
11591 add_to_ored_words (4.0);
11592 /* Remove bits that are common (e.g. if representation of the first mantissa
11593 bit is explicit). */
11594 for (j = 0; j < NWORDS; j++)
11595 ored_words[j] &= ~anded_words[j];
11596 /* Now find the nonzero word. */
11597 for (j = 0; j < NWORDS; j++)
11598 if (ored_words[j] != 0)
11603 for (i = j + 1; i < NWORDS; i++)
11604 if (ored_words[i] != 0)
11606 fprintf (fp, "unknown");
11607 return (fclose (fp) != 0);
11610 if ((ored_words[j] >> i) & 1)
11612 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11613 return (fclose (fp) != 0);
11616 fprintf (fp, "unknown");
11617 return (fclose (fp) != 0);
11621 if ac_fn_c_try_run "$LINENO"
11623 gl_cv_cc_double_expbit0=`cat conftest.out`
11625 gl_cv_cc_double_expbit0="unknown"
11627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11628 conftest.$ac_objext conftest.beam conftest.$ac_ext
11634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11635 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
11636 case "$gl_cv_cc_double_expbit0" in
11638 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11639 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
11641 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
11644 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
11656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11657 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
11658 if test ${gl_cv_func_snprintf_retval_c99+y}
11660 printf %s "(cached) " >&6
11663 if test "$cross_compiling" = yes
11666 # Guess yes on glibc systems.
11667 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11668 # Guess yes on FreeBSD >= 5.
11669 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
11670 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11671 # Guess yes on Mac OS X >= 10.3.
11672 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
11673 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11674 # Guess yes on OpenBSD >= 3.9.
11675 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11676 gl_cv_func_snprintf_retval_c99="guessing no";;
11677 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11678 # Guess yes on Solaris >= 2.10.
11679 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11680 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
11681 # Guess yes on AIX >= 4.
11682 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
11683 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11684 # Guess yes on NetBSD >= 3.
11685 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11686 gl_cv_func_snprintf_retval_c99="guessing no";;
11687 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11688 # Guess yes on BeOS.
11689 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11690 # Guess yes on MSVC, no on mingw.
11691 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11692 /* end confdefs.h. */
11699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11700 $EGREP "Known" >/dev/null 2>&1
11702 gl_cv_func_snprintf_retval_c99="guessing yes"
11704 gl_cv_func_snprintf_retval_c99="guessing no"
11709 # If we don't know, assume the worst.
11710 *) gl_cv_func_snprintf_retval_c99="guessing no";;
11714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11715 /* end confdefs.h. */
11718 #include <string.h>
11720 # define my_snprintf snprintf
11722 # include <stdarg.h>
11723 static int my_snprintf (char *buf, int size, const char *format, ...)
11727 va_start (args, format);
11728 ret = vsnprintf (buf, size, format, args);
11733 static char buf[100];
11736 strcpy (buf, "ABCDEF");
11737 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11739 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11741 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11746 if ac_fn_c_try_run "$LINENO"
11748 gl_cv_func_snprintf_retval_c99=yes
11750 gl_cv_func_snprintf_retval_c99=no
11752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11753 conftest.$ac_objext conftest.beam conftest.$ac_ext
11758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11759 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
11766 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11767 if test "x$ac_cv_func_snprintf" = xyes
11769 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
11772 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
11773 if test "x$ac_cv_func_strnlen" = xyes
11775 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
11778 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
11779 if test "x$ac_cv_func_wcslen" = xyes
11781 printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
11784 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
11785 if test "x$ac_cv_func_wcsnlen" = xyes
11787 printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
11790 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
11791 if test "x$ac_cv_func_mbrtowc" = xyes
11793 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
11796 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
11797 if test "x$ac_cv_func_wcrtomb" = xyes
11799 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
11803 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11805 if test "x$ac_cv_have_decl__snprintf" = xyes
11812 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
11816 case "$gl_cv_func_snprintf_retval_c99" in
11819 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11842 GNULIB_COPYSIGNF=0;
11843 GNULIB_COPYSIGNL=0;
11902 GNULIB_REMAINDER=0;
11903 GNULIB_REMAINDERF=0;
11904 GNULIB_REMAINDERL=0;
11990 HAVE_DECL_COPYSIGNF=1;
11996 HAVE_DECL_EXPM1L=1;
11997 HAVE_DECL_FLOORF=1;
11998 HAVE_DECL_FLOORL=1;
11999 HAVE_DECL_FREXPL=1;
12000 HAVE_DECL_LDEXPL=1;
12002 HAVE_DECL_LOG10L=1;
12007 HAVE_DECL_REMAINDER=1;
12008 HAVE_DECL_REMAINDERL=1;
12011 HAVE_DECL_ROUNDF=1;
12012 HAVE_DECL_ROUNDL=1;
12017 HAVE_DECL_TRUNCF=1;
12018 HAVE_DECL_TRUNCL=1;
12048 REPLACE_HUGE_VAL=0;
12055 REPLACE_ISFINITE=0;
12078 REPLACE_REMAINDER=0;
12079 REPLACE_REMAINDERF=0;
12080 REPLACE_REMAINDERL=0;
12085 REPLACE_SIGNBIT_USING_GCC=0;
12097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
12098 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
12099 if test ${gl_cv_func_frexp_no_libm+y}
12101 printf %s "(cached) " >&6
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h. */
12111 int e; return frexp (x, &e) > 0;
12116 if ac_fn_c_try_link "$LINENO"
12118 gl_cv_func_frexp_no_libm=yes
12120 gl_cv_func_frexp_no_libm=no
12122 rm -f core conftest.err conftest.$ac_objext \
12123 conftest$ac_exeext conftest.$ac_ext
12126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
12127 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
12129 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
12130 if test "x$ac_cv_have_decl_alarm" = xyes
12137 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
12140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
12141 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
12142 if test ${gl_cv_var_stdin_large_offset+y}
12144 printf %s "(cached) " >&6
12146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12147 /* end confdefs.h. */
12152 #if defined __SL64 && defined __SCLE /* cygwin */
12153 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
12154 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
12155 it is easier to do a version check than building a runtime test. */
12156 # include <cygwin/version.h>
12157 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
12165 if ac_fn_c_try_link "$LINENO"
12167 gl_cv_var_stdin_large_offset=yes
12169 gl_cv_var_stdin_large_offset=no
12171 rm -f core conftest.err conftest.$ac_objext \
12172 conftest$ac_exeext conftest.$ac_ext
12174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
12175 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
12183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
12184 printf %s "checking for 64-bit off_t... " >&6; }
12185 if test ${gl_cv_type_off_t_64+y}
12187 printf %s "(cached) " >&6
12189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190 /* end confdefs.h. */
12191 #include <sys/types.h>
12192 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
12202 if ac_fn_c_try_compile "$LINENO"
12204 gl_cv_type_off_t_64=yes
12206 gl_cv_type_off_t_64=no
12208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
12212 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
12213 if test $gl_cv_type_off_t_64 = no; then
12214 WINDOWS_64_BIT_OFF_T=1
12216 WINDOWS_64_BIT_OFF_T=0
12218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
12219 printf %s "checking for 64-bit st_size... " >&6; }
12220 if test ${gl_cv_member_st_size_64+y}
12222 printf %s "(cached) " >&6
12224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12225 /* end confdefs.h. */
12226 #include <sys/types.h>
12228 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
12238 if ac_fn_c_try_compile "$LINENO"
12240 gl_cv_member_st_size_64=yes
12242 gl_cv_member_st_size_64=no
12244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
12248 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
12249 if test $gl_cv_member_st_size_64 = no; then
12250 WINDOWS_64_BIT_ST_SIZE=1
12252 WINDOWS_64_BIT_ST_SIZE=0
12256 WINDOWS_64_BIT_OFF_T=0
12257 WINDOWS_64_BIT_ST_SIZE=0
12269 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
12281 if test $gl_cv_have_include_next = yes; then
12282 gl_cv_next_sys_types_h='<'sys/types.h'>'
12284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12285 printf %s "checking absolute name of <sys/types.h>... " >&6; }
12286 if test ${gl_cv_next_sys_types_h+y}
12288 printf %s "(cached) " >&6
12293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12294 /* end confdefs.h. */
12295 #include <sys/types.h>
12298 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12299 *) gl_absname_cpp="$ac_cpp" ;;
12304 gl_dirsep_regex='[/\\]'
12307 gl_dirsep_regex='\/'
12310 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12311 gl_header_literal_regex=`echo 'sys/types.h' \
12312 | sed -e "$gl_make_literal_regex_sed"`
12313 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12314 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12320 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12321 sed -n "$gl_absolute_header_sed"`
12323 gl_header=$gl_cv_absolute_sys_types_h
12324 gl_cv_next_sys_types_h='"'$gl_header'"'
12328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12329 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
12331 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12333 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12334 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12335 gl_next_as_first_directive='<'sys/types.h'>'
12337 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12338 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12340 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12353 WINDOWS_STAT_INODES=0
12357 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
12358 if test "x$ac_cv_have_decl_fseeko" = xyes
12365 printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
12375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
12376 printf %s "checking for fseeko... " >&6; }
12377 if test ${gl_cv_func_fseeko+y}
12379 printf %s "(cached) " >&6
12382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12383 /* end confdefs.h. */
12389 fseeko (stdin, 0, 0);
12394 if ac_fn_c_try_link "$LINENO"
12396 gl_cv_func_fseeko=yes
12398 gl_cv_func_fseeko=no
12400 rm -f core conftest.err conftest.$ac_objext \
12401 conftest$ac_exeext conftest.$ac_ext
12404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
12405 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
12408 if test $ac_cv_have_decl_fseeko = no; then
12412 if test $gl_cv_func_fseeko = no; then
12415 if test $WINDOWS_64_BIT_OFF_T = 1; then
12418 if test $gl_cv_var_stdin_large_offset = no; then
12424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
12425 printf %s "checking whether fflush works on input streams... " >&6; }
12426 if test ${gl_cv_func_fflush_stdin+y}
12428 printf %s "(cached) " >&6
12430 echo hello world > conftest.txt
12431 if test "$cross_compiling" = yes
12434 # Guess no on native Windows.
12435 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
12436 *) gl_cv_func_fflush_stdin=cross ;;
12440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12441 /* end confdefs.h. */
12445 # include <unistd.h>
12446 #else /* on Windows with MSVC */
12453 FILE *f = fopen ("conftest.txt", "r");
12460 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
12461 { fclose (f); return 2; }
12462 /* For deterministic results, ensure f read a bigger buffer. */
12463 if (lseek (fd, 0, SEEK_CUR) == 5)
12464 { fclose (f); return 3; }
12465 /* POSIX requires fflush-fseek to set file offset of fd. This fails
12466 on BSD systems and on mingw. */
12467 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
12468 { fclose (f); return 4; }
12469 if (lseek (fd, 0, SEEK_CUR) != 5)
12470 { fclose (f); return 5; }
12471 /* Verify behaviour of fflush after ungetc. See
12472 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
12473 /* Verify behaviour of fflush after a backup ungetc. This fails on
12478 if (fgetc (f) != c)
12479 { fclose (f); return 6; }
12480 /* Verify behaviour of fflush after a non-backup ungetc. This fails
12481 on glibc 2.8 and on BSD systems. */
12485 if (fgetc (f) != c)
12486 { fclose (f); return 7; }
12494 if ac_fn_c_try_run "$LINENO"
12496 gl_cv_func_fflush_stdin=yes
12498 gl_cv_func_fflush_stdin=no
12500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12501 conftest.$ac_objext conftest.beam conftest.$ac_ext
12507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
12508 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
12509 case "$gl_cv_func_fflush_stdin" in
12510 *yes) gl_func_fflush_stdin=1 ;;
12511 *no) gl_func_fflush_stdin=0 ;;
12512 *) gl_func_fflush_stdin='(-1)' ;;
12515 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
12518 case "$gl_cv_func_fflush_stdin" in
12520 *) REPLACE_FSEEKO=1 ;;
12539 GNULIB_UTIMENSAT=0;
12540 GNULIB_OVERRIDES_STRUCT_STAT=0;
12554 REPLACE_FUTIMENS=0;
12560 REPLACE_UTIMENSAT=0;
12562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12563 printf %s "checking whether stat file-mode macros are broken... " >&6; }
12564 if test ${ac_cv_header_stat_broken+y}
12566 printf %s "(cached) " >&6
12568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12569 /* end confdefs.h. */
12570 #include <sys/types.h>
12571 #include <sys/stat.h>
12573 #if defined S_ISBLK && defined S_IFDIR
12574 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12577 #if defined S_ISBLK && defined S_IFCHR
12578 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12581 #if defined S_ISLNK && defined S_IFREG
12582 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12585 #if defined S_ISSOCK && defined S_IFREG
12586 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12590 if ac_fn_c_try_compile "$LINENO"
12592 ac_cv_header_stat_broken=no
12594 ac_cv_header_stat_broken=yes
12596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12599 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
12600 if test $ac_cv_header_stat_broken = yes; then
12602 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12620 if test $gl_cv_have_include_next = yes; then
12621 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12624 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
12625 if test ${gl_cv_next_sys_stat_h+y}
12627 printf %s "(cached) " >&6
12630 if test $ac_cv_header_sys_stat_h = yes; then
12635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12636 /* end confdefs.h. */
12637 #include <sys/stat.h>
12640 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12641 *) gl_absname_cpp="$ac_cpp" ;;
12646 gl_dirsep_regex='[/\\]'
12649 gl_dirsep_regex='\/'
12652 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12653 gl_header_literal_regex=`echo 'sys/stat.h' \
12654 | sed -e "$gl_make_literal_regex_sed"`
12655 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12656 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12662 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12663 sed -n "$gl_absolute_header_sed"`
12665 gl_header=$gl_cv_absolute_sys_stat_h
12666 gl_cv_next_sys_stat_h='"'$gl_header'"'
12668 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12674 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
12676 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12678 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12679 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12680 gl_next_as_first_directive='<'sys/stat.h'>'
12682 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12683 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12685 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12694 WINDOWS_STAT_TIMESPEC=0
12703 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12704 #include <sys/stat.h>
12706 if test "x$ac_cv_type_nlink_t" = xyes
12711 printf "%s\n" "#define nlink_t int" >>confdefs.h
12719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
12720 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
12721 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
12723 printf %s "(cached) " >&6
12725 rm -f conftest.sym conftest.file
12726 echo >conftest.file
12727 if test "$cross_compiling" = yes
12731 # Guess yes on glibc systems.
12732 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
12734 # Guess no on native Windows.
12735 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
12737 # If we don't know, assume the worst.
12738 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
12742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743 /* end confdefs.h. */
12744 $ac_includes_default
12749 if (symlink ("conftest.file", "conftest.sym") != 0)
12751 /* Linux will dereference the symlink and fail, as required by
12752 POSIX. That is better in the sense that it means we will not
12753 have to compile and use the lstat wrapper. */
12754 return lstat ("conftest.sym/", &sbuf) == 0;
12760 if ac_fn_c_try_run "$LINENO"
12762 gl_cv_func_lstat_dereferences_slashed_symlink=yes
12764 gl_cv_func_lstat_dereferences_slashed_symlink=no
12766 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12767 conftest.$ac_objext conftest.beam conftest.$ac_ext
12770 rm -f conftest.sym conftest.file
12773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
12774 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12775 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
12778 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
12785 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12786 if test "x$ac_cv_have_decl_ftello" = xyes
12793 printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
12804 if test $ac_cv_have_decl_ftello = no; then
12808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12809 printf %s "checking for ftello... " >&6; }
12810 if test ${gl_cv_func_ftello+y}
12812 printf %s "(cached) " >&6
12815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816 /* end confdefs.h. */
12826 if ac_fn_c_try_link "$LINENO"
12828 gl_cv_func_ftello=yes
12830 gl_cv_func_ftello=no
12832 rm -f core conftest.err conftest.$ac_objext \
12833 conftest$ac_exeext conftest.$ac_ext
12836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12837 printf "%s\n" "$gl_cv_func_ftello" >&6; }
12838 if test $gl_cv_func_ftello = no; then
12841 if test $WINDOWS_64_BIT_OFF_T = 1; then
12844 if test $gl_cv_var_stdin_large_offset = no; then
12847 if test $REPLACE_FTELLO = 0; then
12849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12850 printf %s "checking whether ftello works... " >&6; }
12851 if test ${gl_cv_func_ftello_works+y}
12853 printf %s "(cached) " >&6
12857 # Guess no on Solaris.
12858 solaris*) gl_cv_func_ftello_works="guessing no" ;;
12859 # Guess yes on native Windows.
12860 mingw*) gl_cv_func_ftello_works="guessing yes" ;;
12861 # Guess yes otherwise.
12862 *) gl_cv_func_ftello_works="guessing yes" ;;
12864 if test "$cross_compiling" = yes
12868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12869 /* end confdefs.h. */
12872 #include <stdlib.h>
12873 #include <string.h>
12874 #define TESTFILE "conftest.tmp"
12880 /* Create a file with some contents. */
12881 fp = fopen (TESTFILE, "w");
12884 if (fwrite ("foogarsh", 1, 8, fp) < 8)
12885 { fclose (fp); return 71; }
12889 /* The file's contents is now "foogarsh". */
12891 /* Try writing after reading to EOF. */
12892 fp = fopen (TESTFILE, "r+");
12895 if (fseek (fp, -1, SEEK_END))
12896 { fclose (fp); return 74; }
12897 if (!(getc (fp) == 'h'))
12898 { fclose (fp); return 1; }
12899 if (!(getc (fp) == EOF))
12900 { fclose (fp); return 2; }
12901 if (!(ftell (fp) == 8))
12902 { fclose (fp); return 3; }
12903 if (!(ftell (fp) == 8))
12904 { fclose (fp); return 4; }
12905 if (!(putc ('!', fp) == '!'))
12906 { fclose (fp); return 5; }
12907 if (!(ftell (fp) == 9))
12908 { fclose (fp); return 6; }
12909 if (!(fclose (fp) == 0))
12911 fp = fopen (TESTFILE, "r");
12916 if (!(fread (buf, 1, 10, fp) == 9))
12917 { fclose (fp); return 10; }
12918 if (!(memcmp (buf, "foogarsh!", 9) == 0))
12919 { fclose (fp); return 11; }
12921 if (!(fclose (fp) == 0))
12924 /* The file's contents is now "foogarsh!". */
12929 if ac_fn_c_try_run "$LINENO"
12931 gl_cv_func_ftello_works=yes
12933 gl_cv_func_ftello_works=no
12935 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12936 conftest.$ac_objext conftest.beam conftest.$ac_ext
12941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12942 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
12943 case "$gl_cv_func_ftello_works" in
12948 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12958 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12959 if test ${gl_cv_func_getcwd_null+y}
12961 printf %s "(cached) " >&6
12963 if test "$cross_compiling" = yes
12966 # Guess yes on glibc systems.
12967 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
12968 # Guess yes on Cygwin.
12969 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
12970 # If we don't know, assume the worst.
12971 *) gl_cv_func_getcwd_null="guessing no";;
12975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12976 /* end confdefs.h. */
12978 # include <stdlib.h>
12980 # include <unistd.h>
12981 # else /* on Windows with MSVC */
12982 # include <direct.h>
12992 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12993 /* mingw cwd does not start with '/', but getcwd does allocate.
12994 However, mingw fails to honor non-zero size. */
12996 if (chdir ("/") != 0)
13000 char *f = getcwd (NULL, 0);
13004 { free (f); return 3; }
13006 { free (f); return 4; }
13016 if ac_fn_c_try_run "$LINENO"
13018 gl_cv_func_getcwd_null=yes
13020 gl_cv_func_getcwd_null=no
13022 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13023 conftest.$ac_objext conftest.beam conftest.$ac_ext
13027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
13028 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
13031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
13032 printf %s "checking for getcwd with POSIX signature... " >&6; }
13033 if test ${gl_cv_func_getcwd_posix_signature+y}
13035 printf %s "(cached) " >&6
13037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038 /* end confdefs.h. */
13039 #include <unistd.h>
13047 char *getcwd (char *, size_t);
13054 if ac_fn_c_try_compile "$LINENO"
13056 gl_cv_func_getcwd_posix_signature=yes
13058 gl_cv_func_getcwd_posix_signature=no
13060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
13064 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
13067 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
13068 if test "x$ac_cv_have_decl_getdtablesize" = xyes
13075 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
13091 if test $gl_cv_have_include_next = yes; then
13092 gl_cv_next_getopt_h='<'getopt.h'>'
13094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
13095 printf %s "checking absolute name of <getopt.h>... " >&6; }
13096 if test ${gl_cv_next_getopt_h+y}
13098 printf %s "(cached) " >&6
13101 if test $ac_cv_header_getopt_h = yes; then
13106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107 /* end confdefs.h. */
13108 #include <getopt.h>
13111 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13112 *) gl_absname_cpp="$ac_cpp" ;;
13117 gl_dirsep_regex='[/\\]'
13120 gl_dirsep_regex='\/'
13123 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13124 gl_header_literal_regex=`echo 'getopt.h' \
13125 | sed -e "$gl_make_literal_regex_sed"`
13126 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13127 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13133 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13134 sed -n "$gl_absolute_header_sed"`
13136 gl_header=$gl_cv_absolute_getopt_h
13137 gl_cv_next_getopt_h='"'$gl_header'"'
13139 gl_cv_next_getopt_h='<'getopt.h'>'
13144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
13145 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
13147 NEXT_GETOPT_H=$gl_cv_next_getopt_h
13149 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13150 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13151 gl_next_as_first_directive='<'getopt.h'>'
13153 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13154 gl_next_as_first_directive=$gl_cv_next_getopt_h
13156 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
13161 if test $ac_cv_header_getopt_h = yes; then
13170 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13171 for ac_header in getopt.h
13173 ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
13174 if test "x$ac_cv_header_getopt_h" = xyes
13176 printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
13179 gl_replace_getopt=yes
13185 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13186 for ac_func in getopt_long_only
13188 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
13189 if test "x$ac_cv_func_getopt_long_only" = xyes
13191 printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
13194 gl_replace_getopt=yes
13200 if test -z "$gl_replace_getopt"; then
13201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
13202 printf %s "checking whether getopt is POSIX compatible... " >&6; }
13203 if test ${gl_cv_func_getopt_posix+y}
13205 printf %s "(cached) " >&6
13208 if test $cross_compiling = no; then
13209 if test "$cross_compiling" = yes
13211 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13212 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13213 as_fn_error $? "cannot run test program while cross compiling
13214 See \`config.log' for more details" "$LINENO" 5; }
13216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13217 /* end confdefs.h. */
13219 #include <unistd.h>
13220 #include <stdlib.h>
13221 #include <string.h>
13226 static char program[] = "program";
13227 static char a[] = "-a";
13228 static char foo[] = "foo";
13229 static char bar[] = "bar";
13230 char *argv[] = { program, a, foo, bar, NULL };
13233 c = getopt (4, argv, "ab");
13236 c = getopt (4, argv, "ab");
13239 if (!(optind == 2))
13245 if ac_fn_c_try_run "$LINENO"
13247 gl_cv_func_getopt_posix=maybe
13249 gl_cv_func_getopt_posix=no
13251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13252 conftest.$ac_objext conftest.beam conftest.$ac_ext
13255 if test $gl_cv_func_getopt_posix = maybe; then
13256 if test "$cross_compiling" = yes
13258 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13259 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13260 as_fn_error $? "cannot run test program while cross compiling
13261 See \`config.log' for more details" "$LINENO" 5; }
13263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13264 /* end confdefs.h. */
13266 #include <unistd.h>
13267 #include <stdlib.h>
13268 #include <string.h>
13273 static char program[] = "program";
13274 static char donald[] = "donald";
13275 static char p[] = "-p";
13276 static char billy[] = "billy";
13277 static char duck[] = "duck";
13278 static char a[] = "-a";
13279 static char bar[] = "bar";
13280 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
13283 c = getopt (7, argv, "+abp:q:");
13286 if (!(strcmp (argv[0], "program") == 0))
13288 if (!(strcmp (argv[1], "donald") == 0))
13290 if (!(strcmp (argv[2], "-p") == 0))
13292 if (!(strcmp (argv[3], "billy") == 0))
13294 if (!(strcmp (argv[4], "duck") == 0))
13296 if (!(strcmp (argv[5], "-a") == 0))
13298 if (!(strcmp (argv[6], "bar") == 0))
13300 if (!(optind == 1))
13306 if ac_fn_c_try_run "$LINENO"
13308 gl_cv_func_getopt_posix=maybe
13310 gl_cv_func_getopt_posix=no
13312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13313 conftest.$ac_objext conftest.beam conftest.$ac_ext
13317 if test $gl_cv_func_getopt_posix = maybe; then
13318 if test "$cross_compiling" = yes
13320 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13321 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13322 as_fn_error $? "cannot run test program while cross compiling
13323 See \`config.log' for more details" "$LINENO" 5; }
13325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13326 /* end confdefs.h. */
13328 #include <unistd.h>
13329 #include <stdlib.h>
13330 #include <string.h>
13335 static char program[] = "program";
13336 static char ab[] = "-ab";
13337 char *argv[3] = { program, ab, NULL };
13338 if (getopt (2, argv, "ab:") != 'a')
13340 if (getopt (2, argv, "ab:") != '?')
13350 if ac_fn_c_try_run "$LINENO"
13352 gl_cv_func_getopt_posix=yes
13354 gl_cv_func_getopt_posix=no
13356 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13357 conftest.$ac_objext conftest.beam conftest.$ac_ext
13363 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
13364 *) gl_cv_func_getopt_posix="guessing yes";;
13369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
13370 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
13371 case "$gl_cv_func_getopt_posix" in
13372 *no) gl_replace_getopt=yes ;;
13376 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
13378 printf %s "checking for working GNU getopt function... " >&6; }
13379 if test ${gl_cv_func_getopt_gnu+y}
13381 printf %s "(cached) " >&6
13383 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
13384 # optstring is necessary for programs like m4 that have POSIX-mandated
13385 # semantics for supporting options interspersed with files.
13386 # Also, since getopt_long is a GNU extension, we require optind=0.
13387 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
13388 # so take care to revert to the correct (non-)export state.
13389 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
13390 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
13391 xx) gl_had_POSIXLY_CORRECT=exported ;;
13392 x) gl_had_POSIXLY_CORRECT=yes ;;
13393 *) gl_had_POSIXLY_CORRECT= ;;
13396 export POSIXLY_CORRECT
13397 if test "$cross_compiling" = yes
13399 gl_cv_func_getopt_gnu="guessing no"
13402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13403 /* end confdefs.h. */
13404 #include <getopt.h>
13405 #include <stddef.h>
13406 #include <string.h>
13408 #include <stdlib.h>
13409 #if defined __MACH__ && defined __APPLE__
13410 /* Avoid a crash on Mac OS X. */
13411 #include <mach/mach.h>
13412 #include <mach/mach_error.h>
13413 #include <mach/thread_status.h>
13414 #include <mach/exception.h>
13415 #include <mach/task.h>
13416 #include <pthread.h>
13417 /* The exception port on which our thread listens. */
13418 static mach_port_t our_exception_port;
13419 /* The main function of the thread listening for exceptions of type
13422 mach_exception_thread (void *arg)
13424 /* Buffer for a message to be received. */
13426 mach_msg_header_t head;
13427 mach_msg_body_t msgh_body;
13430 mach_msg_return_t retval;
13431 /* Wait for a message on the exception port. */
13432 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
13433 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
13434 if (retval != MACH_MSG_SUCCESS)
13439 nocrash_init (void)
13441 mach_port_t self = mach_task_self ();
13442 /* Allocate a port on which the thread shall listen for exceptions. */
13443 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
13445 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
13446 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
13447 MACH_MSG_TYPE_MAKE_SEND)
13449 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
13451 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
13452 /* Create the thread listening on the exception port. */
13453 pthread_attr_t attr;
13455 if (pthread_attr_init (&attr) == 0
13456 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
13457 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
13458 pthread_attr_destroy (&attr);
13459 /* Replace the exception port info for these exceptions with our own.
13460 Note that we replace the exception port for the entire task, not only
13461 for a particular thread. This has the effect that when our exception
13462 port gets the message, the thread specific exception port has already
13463 been asked, and we don't need to bother about it.
13464 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
13465 task_set_exception_ports (self, mask, our_exception_port,
13466 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
13471 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13472 /* Avoid a crash on native Windows. */
13473 #define WIN32_LEAN_AND_MEAN
13474 #include <windows.h>
13475 #include <winerror.h>
13477 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
13479 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
13481 case EXCEPTION_ACCESS_VIOLATION:
13482 case EXCEPTION_IN_PAGE_ERROR:
13483 case EXCEPTION_STACK_OVERFLOW:
13484 case EXCEPTION_GUARD_PAGE:
13485 case EXCEPTION_PRIV_INSTRUCTION:
13486 case EXCEPTION_ILLEGAL_INSTRUCTION:
13487 case EXCEPTION_DATATYPE_MISALIGNMENT:
13488 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
13489 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
13492 return EXCEPTION_CONTINUE_SEARCH;
13495 nocrash_init (void)
13497 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
13500 /* Avoid a crash on POSIX systems. */
13501 #include <signal.h>
13502 #include <unistd.h>
13503 /* A POSIX signal handler. */
13505 exception_handler (int sig)
13510 nocrash_init (void)
13513 signal (SIGSEGV, exception_handler);
13516 signal (SIGBUS, exception_handler);
13530 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
13531 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
13532 OSF/1 5.1, Solaris 10. */
13534 static char conftest[] = "conftest";
13535 static char plus[] = "-+";
13536 char *argv[3] = { conftest, plus, NULL };
13538 if (getopt (2, argv, "+a") != '?')
13541 /* This code succeeds on glibc 2.8, mingw,
13542 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
13543 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
13545 static char program[] = "program";
13546 static char p[] = "-p";
13547 static char foo[] = "foo";
13548 static char bar[] = "bar";
13549 char *argv[] = { program, p, foo, bar, NULL };
13552 if (getopt (4, argv, "p::") != 'p')
13554 else if (optarg != NULL)
13556 else if (getopt (4, argv, "p::") != -1)
13558 else if (optind != 2)
13561 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
13563 static char program[] = "program";
13564 static char foo[] = "foo";
13565 static char p[] = "-p";
13566 char *argv[] = { program, foo, p, NULL };
13568 if (getopt (3, argv, "-p") != 1)
13570 else if (getopt (3, argv, "-p") != 'p')
13573 /* This code fails on glibc 2.11. */
13575 static char program[] = "program";
13576 static char b[] = "-b";
13577 static char a[] = "-a";
13578 char *argv[] = { program, b, a, NULL };
13579 optind = opterr = 0;
13580 if (getopt (3, argv, "+:a:b") != 'b')
13582 else if (getopt (3, argv, "+:a:b") != ':')
13585 /* This code dumps core on glibc 2.14. */
13587 static char program[] = "program";
13588 static char w[] = "-W";
13589 static char dummy[] = "dummy";
13590 char *argv[] = { program, w, dummy, NULL };
13591 optind = opterr = 1;
13592 if (getopt (3, argv, "W;") != 'W')
13601 if ac_fn_c_try_run "$LINENO"
13603 gl_cv_func_getopt_gnu=yes
13605 gl_cv_func_getopt_gnu=no
13607 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13608 conftest.$ac_objext conftest.beam conftest.$ac_ext
13611 case $gl_had_POSIXLY_CORRECT in
13613 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
13614 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
13618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
13619 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
13620 if test "$gl_cv_func_getopt_gnu" != yes; then
13621 gl_replace_getopt=yes
13623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
13624 printf %s "checking for working GNU getopt_long function... " >&6; }
13625 if test ${gl_cv_func_getopt_long_gnu+y}
13627 printf %s "(cached) " >&6
13629 if test "$cross_compiling" = yes
13632 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
13633 *) gl_cv_func_getopt_long_gnu="guessing yes";;
13637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13638 /* end confdefs.h. */
13639 #include <getopt.h>
13640 #include <stddef.h>
13641 #include <string.h>
13646 static const struct option long_options[] =
13648 { "xtremely-",no_argument, NULL, 1003 },
13649 { "xtra", no_argument, NULL, 1001 },
13650 { "xtreme", no_argument, NULL, 1002 },
13651 { "xtremely", no_argument, NULL, 1003 },
13652 { NULL, 0, NULL, 0 }
13654 /* This code fails on OpenBSD 5.0. */
13656 static char program[] = "program";
13657 static char xtremel[] = "--xtremel";
13658 char *argv[] = { program, xtremel, NULL };
13660 optind = 1; opterr = 0;
13661 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
13670 if ac_fn_c_try_run "$LINENO"
13672 gl_cv_func_getopt_long_gnu=yes
13674 gl_cv_func_getopt_long_gnu=no
13676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13677 conftest.$ac_objext conftest.beam conftest.$ac_ext
13682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
13683 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
13684 case "$gl_cv_func_getopt_long_gnu" in
13686 *) gl_replace_getopt=yes ;;
13698 GNULIB_GETTIMEOFDAY=0;
13699 HAVE_GETTIMEOFDAY=1;
13700 HAVE_STRUCT_TIMEVAL=1;
13702 REPLACE_GETTIMEOFDAY=0;
13703 REPLACE_STRUCT_TIMEVAL=0;
13705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13706 printf %s "checking for C/C++ restrict keyword... " >&6; }
13707 if test ${ac_cv_c_restrict+y}
13709 printf %s "(cached) " >&6
13711 ac_cv_c_restrict=no
13712 # The order here caters to the fact that C++ does not require restrict.
13713 for ac_kw in __restrict __restrict__ _Restrict restrict; do
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715 /* end confdefs.h. */
13716 typedef int *int_ptr;
13717 int foo (int_ptr $ac_kw ip) { return ip[0]; }
13718 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
13719 int bar (int ip[$ac_kw]) { return ip[0]; }
13727 return foo (t) + bar (t);
13733 if ac_fn_c_try_compile "$LINENO"
13735 ac_cv_c_restrict=$ac_kw
13737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13738 test "$ac_cv_c_restrict" != no && break
13742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
13743 printf "%s\n" "$ac_cv_c_restrict" >&6; }
13745 case $ac_cv_c_restrict in
13747 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
13749 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
13767 if test $gl_cv_have_include_next = yes; then
13768 gl_cv_next_sys_time_h='<'sys/time.h'>'
13770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13771 printf %s "checking absolute name of <sys/time.h>... " >&6; }
13772 if test ${gl_cv_next_sys_time_h+y}
13774 printf %s "(cached) " >&6
13777 if test $ac_cv_header_sys_time_h = yes; then
13782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13783 /* end confdefs.h. */
13784 #include <sys/time.h>
13787 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13788 *) gl_absname_cpp="$ac_cpp" ;;
13793 gl_dirsep_regex='[/\\]'
13796 gl_dirsep_regex='\/'
13799 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13800 gl_header_literal_regex=`echo 'sys/time.h' \
13801 | sed -e "$gl_make_literal_regex_sed"`
13802 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13803 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13809 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13810 sed -n "$gl_absolute_header_sed"`
13812 gl_header=$gl_cv_absolute_sys_time_h
13813 gl_cv_next_sys_time_h='"'$gl_header'"'
13815 gl_cv_next_sys_time_h='<'sys/time.h'>'
13820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13821 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
13823 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13825 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13826 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13827 gl_next_as_first_directive='<'sys/time.h'>'
13829 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13830 gl_next_as_first_directive=$gl_cv_next_sys_time_h
13832 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13838 if test $ac_cv_header_sys_time_h != yes; then
13846 if test $ac_cv_header_sys_socket_h != yes; then
13847 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13848 if test "x$ac_cv_header_winsock2_h" = xyes
13850 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
13855 if test "$ac_cv_header_winsock2_h" = yes; then
13857 UNISTD_H_HAVE_WINSOCK2_H=1
13858 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13865 printf %s "checking for struct timeval... " >&6; }
13866 if test ${gl_cv_sys_struct_timeval+y}
13868 printf %s "(cached) " >&6
13870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871 /* end confdefs.h. */
13872 #if HAVE_SYS_TIME_H
13873 #include <sys/time.h>
13876 #if HAVE_WINSOCK2_H
13877 # include <winsock2.h>
13883 static struct timeval x; x.tv_sec = x.tv_usec;
13888 if ac_fn_c_try_compile "$LINENO"
13890 gl_cv_sys_struct_timeval=yes
13892 gl_cv_sys_struct_timeval=no
13894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13898 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
13899 if test $gl_cv_sys_struct_timeval != yes; then
13900 HAVE_STRUCT_TIMEVAL=0
13902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13903 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13904 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
13906 printf %s "(cached) " >&6
13908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13909 /* end confdefs.h. */
13910 #if HAVE_SYS_TIME_H
13911 #include <sys/time.h>
13914 #if HAVE_WINSOCK2_H
13915 # include <winsock2.h>
13921 static struct timeval x;
13922 typedef int verify_tv_sec_type[
13923 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13930 if ac_fn_c_try_compile "$LINENO"
13932 gl_cv_sys_struct_timeval_tv_sec=yes
13934 gl_cv_sys_struct_timeval_tv_sec=no
13936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13940 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13941 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13942 REPLACE_STRUCT_TIMEVAL=1
13952 NEED_LOCALTIME_BUFFER=0
13957 GNULIB_LOCALTIME=0;
13958 GNULIB_NANOSLEEP=0;
13965 HAVE_DECL_LOCALTIME_R=1;
13971 REPLACE_CTIME=GNULIB_PORTCHECK;
13972 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
13973 REPLACE_MKTIME=GNULIB_PORTCHECK;
13974 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
13975 REPLACE_STRFTIME=GNULIB_PORTCHECK;
13976 REPLACE_TIMEGM=GNULIB_PORTCHECK;
13977 REPLACE_TZSET=GNULIB_PORTCHECK;
13979 : ${GNULIB_GETTIMEOFDAY=0};
13981 REPLACE_LOCALTIME=0;
13984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13985 /* end confdefs.h. */
13992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13993 $EGREP "MicrosoftCompiler" >/dev/null 2>&1
13996 gl_c_asm_opt='-c -Fa'
14009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
14010 printf %s "checking host CPU and C ABI... " >&6; }
14011 if test ${gl_cv_host_cpu_c_abi+y}
14013 printf %s "(cached) " >&6
14015 case "$host_cpu" in
14018 gl_cv_host_cpu_c_abi=i386
14022 # On x86_64 systems, the C compiler may be generating code in one of
14024 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
14025 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
14026 # with native Windows (mingw, MSVC).
14027 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
14028 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
14029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14030 /* end confdefs.h. */
14031 #if (defined __x86_64__ || defined __amd64__ \
14032 || defined _M_X64 || defined _M_AMD64)
14039 if ac_fn_c_try_compile "$LINENO"
14041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042 /* end confdefs.h. */
14043 #if defined __ILP32__ || defined _ILP32
14050 if ac_fn_c_try_compile "$LINENO"
14052 gl_cv_host_cpu_c_abi=x86_64-x32
14054 gl_cv_host_cpu_c_abi=x86_64
14056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14058 gl_cv_host_cpu_c_abi=i386
14060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14063 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
14064 gl_cv_host_cpu_c_abi=alpha
14068 # Assume arm with EABI.
14069 # On arm64 systems, the C compiler may be generating code in one of
14071 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
14072 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
14073 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
14074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14075 /* end confdefs.h. */
14083 if ac_fn_c_try_compile "$LINENO"
14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086 /* end confdefs.h. */
14087 #if defined __ILP32__ || defined _ILP32
14094 if ac_fn_c_try_compile "$LINENO"
14096 gl_cv_host_cpu_c_abi=arm64-ilp32
14098 gl_cv_host_cpu_c_abi=arm64
14100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14102 # Don't distinguish little-endian and big-endian arm, since they
14103 # don't require different machine code for simple operations and
14104 # since the user can distinguish them through the preprocessor
14105 # defines __ARMEL__ vs. __ARMEB__.
14106 # But distinguish arm which passes floating-point arguments and
14107 # return values in integer registers (r0, r1, ...) - this is
14108 # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
14109 # passes them in float registers (s0, s1, ...) and double registers
14110 # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
14111 # sets the preprocessor defines __ARM_PCS (for the first case) and
14112 # __ARM_PCS_VFP (for the second case), but older GCC does not.
14113 echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
14114 # Look for a reference to the register d0 in the .s file.
14115 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
14116 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
14117 (eval $ac_try) 2>&5
14119 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14120 test $ac_status = 0; }; } >/dev/null 2>&1
14121 if LC_ALL=C grep -E 'd0,' conftest.$gl_asmext >/dev/null; then
14122 gl_cv_host_cpu_c_abi=armhf
14124 gl_cv_host_cpu_c_abi=arm
14129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14132 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
14133 # On hppa, the C compiler may be generating 32-bit code or 64-bit
14134 # code. In the latter case, it defines _LP64 and __LP64__.
14135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14136 /* end confdefs.h. */
14144 if ac_fn_c_try_compile "$LINENO"
14146 gl_cv_host_cpu_c_abi=hppa64
14148 gl_cv_host_cpu_c_abi=hppa
14150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14154 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
14155 # 32-bit code. In the latter case, it defines _ILP32.
14156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14157 /* end confdefs.h. */
14165 if ac_fn_c_try_compile "$LINENO"
14167 gl_cv_host_cpu_c_abi=ia64-ilp32
14169 gl_cv_host_cpu_c_abi=ia64
14171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14175 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
14177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14178 /* end confdefs.h. */
14179 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
14186 if ac_fn_c_try_compile "$LINENO"
14188 gl_cv_host_cpu_c_abi=mips64
14190 # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
14191 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
14192 # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
14193 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
14194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14195 /* end confdefs.h. */
14196 #if (_MIPS_SIM == _ABIN32)
14203 if ac_fn_c_try_compile "$LINENO"
14205 gl_cv_host_cpu_c_abi=mipsn32
14207 gl_cv_host_cpu_c_abi=mips
14209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14215 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
14216 # No need to distinguish them here; the caller may distinguish
14217 # them based on the OS.
14218 # On powerpc64 systems, the C compiler may still be generating
14219 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
14220 # be generating 64-bit code.
14221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14222 /* end confdefs.h. */
14223 #if defined __powerpc64__ || defined _ARCH_PPC64
14230 if ac_fn_c_try_compile "$LINENO"
14232 # On powerpc64, there are two ABIs on Linux: The AIX compatible
14233 # one and the ELFv2 one. The latter defines _CALL_ELF=2.
14234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14235 /* end confdefs.h. */
14236 #if defined _CALL_ELF && _CALL_ELF == 2
14243 if ac_fn_c_try_compile "$LINENO"
14245 gl_cv_host_cpu_c_abi=powerpc64-elfv2
14247 gl_cv_host_cpu_c_abi=powerpc64
14249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14252 gl_cv_host_cpu_c_abi=powerpc
14254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14258 gl_cv_host_cpu_c_abi=powerpc
14262 # On s390x, the C compiler may be generating 64-bit (= s390x) code
14263 # or 31-bit (= s390) code.
14264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14265 /* end confdefs.h. */
14266 #if defined __LP64__ || defined __s390x__
14273 if ac_fn_c_try_compile "$LINENO"
14275 gl_cv_host_cpu_c_abi=s390x
14277 gl_cv_host_cpu_c_abi=s390
14279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14283 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
14284 # C compiler still generates 32-bit code.
14285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14286 /* end confdefs.h. */
14287 #if defined __sparcv9 || defined __arch64__
14294 if ac_fn_c_try_compile "$LINENO"
14296 gl_cv_host_cpu_c_abi=sparc64
14298 gl_cv_host_cpu_c_abi=sparc
14300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14304 gl_cv_host_cpu_c_abi="$host_cpu"
14309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
14310 printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
14312 HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
14313 HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
14318 # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
14319 # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
14320 # earlier, but KAI C++ 3.2d doesn't like this.
14321 sed -e 's/-/_/g' >> confdefs.h <<EOF
14322 #ifndef __${HOST_CPU}__
14323 #define __${HOST_CPU}__ 1
14325 #ifndef __${HOST_CPU_C_ABI}__
14326 #define __${HOST_CPU_C_ABI}__ 1
14333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
14334 printf %s "checking where to find the exponent in a 'float'... " >&6; }
14335 if test ${gl_cv_cc_float_expbit0+y}
14337 printf %s "(cached) " >&6
14340 if test "$cross_compiling" = yes
14342 gl_cv_cc_float_expbit0="word 0 bit 23"
14344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14345 /* end confdefs.h. */
14348 #include <stddef.h>
14350 #include <string.h>
14352 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14353 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
14354 static unsigned int ored_words[NWORDS];
14355 static unsigned int anded_words[NWORDS];
14356 static void add_to_ored_words (float x)
14360 /* Clear it first, in case
14361 sizeof (float) < sizeof (memory_float). */
14362 memset (&m, 0, sizeof (memory_float));
14364 for (i = 0; i < NWORDS; i++)
14366 ored_words[i] |= m.word[i];
14367 anded_words[i] &= m.word[i];
14373 FILE *fp = fopen ("conftest.out", "w");
14376 for (j = 0; j < NWORDS; j++)
14377 anded_words[j] = ~ (unsigned int) 0;
14378 add_to_ored_words (0.25f);
14379 add_to_ored_words (0.5f);
14380 add_to_ored_words (1.0f);
14381 add_to_ored_words (2.0f);
14382 add_to_ored_words (4.0f);
14383 /* Remove bits that are common (e.g. if representation of the first mantissa
14384 bit is explicit). */
14385 for (j = 0; j < NWORDS; j++)
14386 ored_words[j] &= ~anded_words[j];
14387 /* Now find the nonzero word. */
14388 for (j = 0; j < NWORDS; j++)
14389 if (ored_words[j] != 0)
14394 for (i = j + 1; i < NWORDS; i++)
14395 if (ored_words[i] != 0)
14397 fprintf (fp, "unknown");
14398 return (fclose (fp) != 0);
14401 if ((ored_words[j] >> i) & 1)
14403 fprintf (fp, "word %d bit %d", (int) j, (int) i);
14404 return (fclose (fp) != 0);
14407 fprintf (fp, "unknown");
14408 return (fclose (fp) != 0);
14412 if ac_fn_c_try_run "$LINENO"
14414 gl_cv_cc_float_expbit0=`cat conftest.out`
14416 gl_cv_cc_float_expbit0="unknown"
14418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14419 conftest.$ac_objext conftest.beam conftest.$ac_ext
14425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
14426 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
14427 case "$gl_cv_cc_float_expbit0" in
14429 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14430 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
14432 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
14435 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
14451 if test $gl_cv_have_include_next = yes; then
14452 gl_cv_next_limits_h='<'limits.h'>'
14454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
14455 printf %s "checking absolute name of <limits.h>... " >&6; }
14456 if test ${gl_cv_next_limits_h+y}
14458 printf %s "(cached) " >&6
14461 if test $ac_cv_header_limits_h = yes; then
14466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14467 /* end confdefs.h. */
14468 #include <limits.h>
14471 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14472 *) gl_absname_cpp="$ac_cpp" ;;
14477 gl_dirsep_regex='[/\\]'
14480 gl_dirsep_regex='\/'
14483 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14484 gl_header_literal_regex=`echo 'limits.h' \
14485 | sed -e "$gl_make_literal_regex_sed"`
14486 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14487 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14493 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14494 sed -n "$gl_absolute_header_sed"`
14496 gl_header=$gl_cv_absolute_limits_h
14497 gl_cv_next_limits_h='"'$gl_header'"'
14499 gl_cv_next_limits_h='<'limits.h'>'
14504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
14505 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
14507 NEXT_LIMITS_H=$gl_cv_next_limits_h
14509 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14510 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14511 gl_next_as_first_directive='<'limits.h'>'
14513 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14514 gl_next_as_first_directive=$gl_cv_next_limits_h
14516 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
14522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
14523 printf %s "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
14524 if test ${gl_cv_header_limits_width+y}
14526 printf %s "(cached) " >&6
14528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14529 /* end confdefs.h. */
14530 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
14531 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
14533 #include <limits.h>
14534 int ullw = ULLONG_WIDTH;
14543 if ac_fn_c_try_compile "$LINENO"
14545 gl_cv_header_limits_width=yes
14547 gl_cv_header_limits_width=no
14549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
14552 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
14553 if test "$gl_cv_header_limits_width" = yes; then
14559 if test -n "$LIMITS_H"; then
14560 GL_GENERATE_LIMITS_H_TRUE=
14561 GL_GENERATE_LIMITS_H_FALSE='#'
14563 GL_GENERATE_LIMITS_H_TRUE='#'
14564 GL_GENERATE_LIMITS_H_FALSE=
14569 if test "X$prefix" = "XNONE"; then
14570 acl_final_prefix="$ac_default_prefix"
14572 acl_final_prefix="$prefix"
14574 if test "X$exec_prefix" = "XNONE"; then
14575 acl_final_exec_prefix='${prefix}'
14577 acl_final_exec_prefix="$exec_prefix"
14579 acl_save_prefix="$prefix"
14580 prefix="$acl_final_prefix"
14581 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
14582 prefix="$acl_save_prefix"
14586 # Check whether --with-gnu-ld was given.
14587 if test ${with_gnu_ld+y}
14589 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
14594 # Prepare PATH_SEPARATOR.
14595 # The user is always right.
14596 if test "${PATH_SEPARATOR+set}" != set; then
14597 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
14598 # contains only /bin. Note that ksh looks also at the FPATH variable,
14599 # so we have to set that as well for the test.
14601 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
14602 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
14603 || PATH_SEPARATOR=';'
14607 if test -n "$LD"; then
14608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
14609 printf %s "checking for ld... " >&6; }
14610 elif test "$GCC" = yes; then
14611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
14612 printf %s "checking for ld used by $CC... " >&6; }
14613 elif test "$with_gnu_ld" = yes; then
14614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
14615 printf %s "checking for GNU ld... " >&6; }
14617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
14618 printf %s "checking for non-GNU ld... " >&6; }
14620 if test -n "$LD"; then
14621 # Let the user override the test with a path.
14624 if test ${acl_cv_path_LD+y}
14626 printf %s "(cached) " >&6
14629 acl_cv_path_LD= # Final result of this test
14630 ac_prog=ld # Program to search in $PATH
14631 if test "$GCC" = yes; then
14632 # Check if gcc -print-prog-name=ld gives a path.
14635 # gcc leaves a trailing carriage return which upsets mingw
14636 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
14638 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
14640 case $acl_output in
14641 # Accept absolute paths.
14643 re_direlt='/[^/][^/]*/\.\./'
14644 # Canonicalize the pathname of ld
14645 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
14646 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
14647 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
14649 # Got the pathname. No search in PATH is needed.
14650 acl_cv_path_LD="$acl_output"
14654 # If it fails, then pretend we aren't using GCC.
14657 # If it is relative, then search for the first ld in PATH.
14658 with_gnu_ld=unknown
14662 if test -n "$ac_prog"; then
14663 # Search for $ac_prog in $PATH.
14664 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14665 for ac_dir in $PATH; do
14666 IFS="$acl_save_ifs"
14667 test -z "$ac_dir" && ac_dir=.
14668 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14669 acl_cv_path_LD="$ac_dir/$ac_prog"
14670 # Check to see if the program is GNU ld. I'd rather use --version,
14671 # but apparently some variants of GNU ld only accept -v.
14672 # Break only if it was the GNU/non-GNU ld that we prefer.
14673 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
14674 *GNU* | *'with BFD'*)
14675 test "$with_gnu_ld" != no && break
14678 test "$with_gnu_ld" != yes && break
14683 IFS="$acl_save_ifs"
14687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14688 /* end confdefs.h. */
14689 #if defined __powerpc64__ || defined _ARCH_PPC64
14696 if ac_fn_c_try_compile "$LINENO"
14698 # The compiler produces 64-bit code. Add option '-b64' so that the
14699 # linker groks 64-bit object files.
14700 case "$acl_cv_path_LD " in
14702 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
14706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14710 /* end confdefs.h. */
14711 #if defined __sparcv9 || defined __arch64__
14718 if ac_fn_c_try_compile "$LINENO"
14722 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
14723 # so that the linker groks 32-bit object files.
14724 case "$acl_cv_path_LD " in
14725 *" -m elf32_sparc "*) ;;
14726 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
14730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14736 LD="$acl_cv_path_LD"
14738 if test -n "$LD"; then
14739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
14740 printf "%s\n" "$LD" >&6; }
14742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14743 printf "%s\n" "no" >&6; }
14744 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
14746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
14747 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
14748 if test ${acl_cv_prog_gnu_ld+y}
14750 printf %s "(cached) " >&6
14752 # I'd rather use --version here, but apparently some GNU lds only accept -v.
14753 case `$LD -v 2>&1 </dev/null` in
14754 *GNU* | *'with BFD'*)
14755 acl_cv_prog_gnu_ld=yes
14758 acl_cv_prog_gnu_ld=no
14762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
14763 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
14764 with_gnu_ld=$acl_cv_prog_gnu_ld
14769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
14770 printf %s "checking for shared library run path origin... " >&6; }
14771 if test ${acl_cv_rpath+y}
14773 printf %s "(cached) " >&6
14776 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
14777 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
14779 rm -f ./conftest.sh
14783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
14784 printf "%s\n" "$acl_cv_rpath" >&6; }
14786 acl_libext="$acl_cv_libext"
14787 acl_shlibext="$acl_cv_shlibext"
14788 acl_libname_spec="$acl_cv_libname_spec"
14789 acl_library_names_spec="$acl_cv_library_names_spec"
14790 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
14791 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
14792 acl_hardcode_direct="$acl_cv_hardcode_direct"
14793 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
14794 # Check whether --enable-rpath was given.
14795 if test ${enable_rpath+y}
14797 enableval=$enable_rpath; :
14806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
14807 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
14808 if test ${acl_cv_libdirstems+y}
14810 printf %s "(cached) " >&6
14816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
14817 printf %s "checking for 64-bit host... " >&6; }
14818 if test ${gl_cv_solaris_64bit+y}
14820 printf %s "(cached) " >&6
14822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14823 /* end confdefs.h. */
14831 if ac_fn_c_try_compile "$LINENO"
14833 gl_cv_solaris_64bit=yes
14835 gl_cv_solaris_64bit=no
14837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
14841 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
14842 if test $gl_cv_solaris_64bit = yes; then
14843 acl_libdirstem=lib/64
14844 case "$host_cpu" in
14845 sparc*) acl_libdirstem2=lib/sparcv9 ;;
14846 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
14851 case "$gl_cv_host_cpu_c_abi" in
14852 i386 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | s390 | sparc)
14854 *) # x86_64 | arm64 | hppa64 | ia64 | mips64 | powerpc64* | s390x | sparc64 | ...
14855 searchpath=`(if test -f /usr/bin/gcc \
14856 && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
14857 LC_ALL=C /usr/bin/gcc -print-search-dirs; \
14859 LC_ALL=C $CC -print-search-dirs; \
14861 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
14862 if test -n "$searchpath"; then
14863 acl_save_IFS="${IFS= }"; IFS=":"
14864 for searchdir in $searchpath; do
14865 if test -d "$searchdir"; then
14866 case "$searchdir" in
14867 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
14869 # Better ignore directories of this form. They are misleading.
14871 *) searchdir=`cd "$searchdir" && pwd`
14872 case "$searchdir" in
14873 */lib64 ) acl_libdirstem=lib64 ;;
14878 IFS="$acl_save_IFS"
14884 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
14885 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
14888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
14889 printf "%s\n" "$acl_cv_libdirstems" >&6; }
14890 # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
14891 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
14892 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
14896 gl_threads_api=none
14901 if test "$gl_use_threads" != no; then
14902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14903 printf %s "checking whether imported symbols can be declared weak... " >&6; }
14904 if test ${gl_cv_have_weak+y}
14906 printf %s "(cached) " >&6
14909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14910 /* end confdefs.h. */
14911 extern void xyzzy ();
14921 if ac_fn_c_try_link "$LINENO"
14923 gl_cv_have_weak=maybe
14925 rm -f core conftest.err conftest.$ac_objext \
14926 conftest$ac_exeext conftest.$ac_ext
14927 if test $gl_cv_have_weak = maybe; then
14928 if test "$cross_compiling" = yes
14930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14931 /* end confdefs.h. */
14933 Extensible Linking Format
14937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14938 $EGREP "Extensible Linking Format" >/dev/null 2>&1
14940 gl_cv_have_weak="guessing yes"
14942 gl_cv_have_weak="guessing no"
14948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949 /* end confdefs.h. */
14955 return (fputs == NULL);
14958 if ac_fn_c_try_run "$LINENO"
14960 gl_cv_have_weak=yes
14964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14965 conftest.$ac_objext conftest.beam conftest.$ac_ext
14969 case " $LDFLAGS " in
14970 *" -static "*) gl_cv_have_weak=no ;;
14974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14975 printf "%s\n" "$gl_cv_have_weak" >&6; }
14976 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
14977 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14978 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
14979 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14980 if test "x$ac_cv_header_pthread_h" = xyes
14982 gl_have_pthread_h=yes
14984 gl_have_pthread_h=no
14987 if test "$gl_have_pthread_h" = yes; then
14988 # Other possible tests:
14989 # -lpthreads (FSU threads, PCthreads)
14992 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14993 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14994 # the second one only in libpthread, and lock.c needs it.
14996 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14997 # needs -pthread for some reason. See:
14998 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
15000 for gl_pthread in '' '-pthread'; do
15001 LIBS="$LIBS $gl_pthread"
15002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003 /* end confdefs.h. */
15004 #include <pthread.h>
15006 pthread_mutexattr_t ma;
15011 pthread_mutex_lock (&m);
15012 pthread_mutexattr_init (&ma);
15017 if ac_fn_c_try_link "$LINENO"
15019 gl_have_pthread=yes
15020 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
15021 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
15023 rm -f core conftest.err conftest.$ac_objext \
15024 conftest$ac_exeext conftest.$ac_ext
15026 test -n "$gl_have_pthread" && break
15029 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15030 # since it is defined as a macro on OSF/1.)
15031 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
15032 # The program links fine without libpthread. But it may actually
15033 # need to link with libpthread in order to create multiple threads.
15034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15035 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15036 if test ${ac_cv_lib_pthread_pthread_kill+y}
15038 printf %s "(cached) " >&6
15040 ac_check_lib_save_LIBS=$LIBS
15041 LIBS="-lpthread $LIBS"
15042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15043 /* end confdefs.h. */
15045 /* Override any GCC internal prototype to avoid an error.
15046 Use char because int might match the return type of a GCC
15047 builtin and then its argument prototype would still apply. */
15051 char pthread_kill ();
15055 return pthread_kill ();
15060 if ac_fn_c_try_link "$LINENO"
15062 ac_cv_lib_pthread_pthread_kill=yes
15064 ac_cv_lib_pthread_pthread_kill=no
15066 rm -f core conftest.err conftest.$ac_objext \
15067 conftest$ac_exeext conftest.$ac_ext
15068 LIBS=$ac_check_lib_save_LIBS
15070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15071 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15072 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15074 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15075 # On Solaris and HP-UX, most pthread functions exist also in libc.
15076 # Therefore pthread_in_use() needs to actually try to create a
15077 # thread: pthread_create from libc will fail, whereas
15078 # pthread_create will actually create a thread.
15079 # On Solaris 10 or newer, this test is no longer needed, because
15080 # libc contains the fully functional pthread functions.
15082 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15084 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15090 elif test -z "$gl_have_pthread"; then
15091 # Some library is needed. Try libpthread and libc_r.
15092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15093 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15094 if test ${ac_cv_lib_pthread_pthread_kill+y}
15096 printf %s "(cached) " >&6
15098 ac_check_lib_save_LIBS=$LIBS
15099 LIBS="-lpthread $LIBS"
15100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15101 /* end confdefs.h. */
15103 /* Override any GCC internal prototype to avoid an error.
15104 Use char because int might match the return type of a GCC
15105 builtin and then its argument prototype would still apply. */
15109 char pthread_kill ();
15113 return pthread_kill ();
15118 if ac_fn_c_try_link "$LINENO"
15120 ac_cv_lib_pthread_pthread_kill=yes
15122 ac_cv_lib_pthread_pthread_kill=no
15124 rm -f core conftest.err conftest.$ac_objext \
15125 conftest$ac_exeext conftest.$ac_ext
15126 LIBS=$ac_check_lib_save_LIBS
15128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15129 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15130 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15132 gl_have_pthread=yes
15133 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
15134 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15137 if test -z "$gl_have_pthread"; then
15139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15140 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15141 if test ${ac_cv_lib_c_r_pthread_kill+y}
15143 printf %s "(cached) " >&6
15145 ac_check_lib_save_LIBS=$LIBS
15147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15148 /* end confdefs.h. */
15150 /* Override any GCC internal prototype to avoid an error.
15151 Use char because int might match the return type of a GCC
15152 builtin and then its argument prototype would still apply. */
15156 char pthread_kill ();
15160 return pthread_kill ();
15165 if ac_fn_c_try_link "$LINENO"
15167 ac_cv_lib_c_r_pthread_kill=yes
15169 ac_cv_lib_c_r_pthread_kill=no
15171 rm -f core conftest.err conftest.$ac_objext \
15172 conftest$ac_exeext conftest.$ac_ext
15173 LIBS=$ac_check_lib_save_LIBS
15175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15176 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15177 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15179 gl_have_pthread=yes
15180 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
15181 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
15186 if test -n "$gl_have_pthread"; then
15187 gl_threads_api=posix
15189 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
15191 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15192 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15194 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
15203 if test -z "$gl_have_pthread"; then
15204 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
15205 gl_have_solaristhread=
15206 gl_save_LIBS="$LIBS"
15207 LIBS="$LIBS -lthread"
15208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15209 /* end confdefs.h. */
15211 #include <thread.h>
15222 if ac_fn_c_try_link "$LINENO"
15224 gl_have_solaristhread=yes
15226 rm -f core conftest.err conftest.$ac_objext \
15227 conftest$ac_exeext conftest.$ac_ext
15228 LIBS="$gl_save_LIBS"
15229 if test -n "$gl_have_solaristhread"; then
15230 gl_threads_api=solaris
15232 LTLIBTHREAD=-lthread
15233 LIBMULTITHREAD="$LIBTHREAD"
15234 LTLIBMULTITHREAD="$LTLIBTHREAD"
15236 printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
15238 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15240 printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
15248 if test "$gl_use_threads" = pth; then
15249 gl_save_CPPFLAGS="$CPPFLAGS"
15255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
15256 printf %s "checking how to link with libpth... " >&6; }
15257 if test ${ac_cv_libpth_libs+y}
15259 printf %s "(cached) " >&6
15271 acl_save_prefix="$prefix"
15272 prefix="$acl_final_prefix"
15273 acl_save_exec_prefix="$exec_prefix"
15274 exec_prefix="$acl_final_exec_prefix"
15276 eval additional_includedir=\"$includedir\"
15277 eval additional_libdir=\"$libdir\"
15279 exec_prefix="$acl_save_exec_prefix"
15280 prefix="$acl_save_prefix"
15283 # Check whether --with-libpth-prefix was given.
15284 if test ${with_libpth_prefix+y}
15286 withval=$with_libpth_prefix;
15287 if test "X$withval" = "Xno"; then
15290 if test "X$withval" = "X"; then
15292 acl_save_prefix="$prefix"
15293 prefix="$acl_final_prefix"
15294 acl_save_exec_prefix="$exec_prefix"
15295 exec_prefix="$acl_final_exec_prefix"
15297 eval additional_includedir=\"$includedir\"
15298 eval additional_libdir=\"$libdir\"
15300 exec_prefix="$acl_save_exec_prefix"
15301 prefix="$acl_save_prefix"
15304 additional_includedir="$withval/include"
15305 additional_libdir="$withval/$acl_libdirstem"
15306 if test "$acl_libdirstem2" != "$acl_libdirstem" \
15307 && ! test -d "$withval/$acl_libdirstem"; then
15308 additional_libdir="$withval/$acl_libdirstem2"
15322 names_already_handled=
15323 names_next_round='pth '
15324 while test -n "$names_next_round"; do
15325 names_this_round="$names_next_round"
15327 for name in $names_this_round; do
15329 for n in $names_already_handled; do
15330 if test "$n" = "$name"; then
15331 already_handled=yes
15335 if test -z "$already_handled"; then
15336 names_already_handled="$names_already_handled $name"
15337 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
15338 eval value=\"\$HAVE_LIB$uppername\"
15339 if test -n "$value"; then
15340 if test "$value" = yes; then
15341 eval value=\"\$LIB$uppername\"
15342 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
15343 eval value=\"\$LTLIB$uppername\"
15344 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
15353 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
15354 if test -n "$acl_shlibext"; then
15355 shrext=".$acl_shlibext" # typically: shrext=.so
15359 if test $use_additional = yes; then
15360 dir="$additional_libdir"
15361 if test -n "$acl_shlibext"; then
15362 if test -f "$dir/$libname$shrext"; then
15364 found_so="$dir/$libname$shrext"
15366 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15367 ver=`(cd "$dir" && \
15368 for f in "$libname$shrext".*; do echo "$f"; done \
15369 | sed -e "s,^$libname$shrext\\\\.,," \
15370 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15371 | sed 1q ) 2>/dev/null`
15372 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15374 found_so="$dir/$libname$shrext.$ver"
15377 eval library_names=\"$acl_library_names_spec\"
15378 for f in $library_names; do
15379 if test -f "$dir/$f"; then
15388 if test "X$found_dir" = "X"; then
15389 if test -f "$dir/$libname.$acl_libext"; then
15391 found_a="$dir/$libname.$acl_libext"
15394 if test "X$found_dir" != "X"; then
15395 if test -f "$dir/$libname.la"; then
15396 found_la="$dir/$libname.la"
15400 if test "X$found_dir" = "X"; then
15401 for x in $LDFLAGS $LTLIBPTH; do
15403 acl_save_prefix="$prefix"
15404 prefix="$acl_final_prefix"
15405 acl_save_exec_prefix="$exec_prefix"
15406 exec_prefix="$acl_final_exec_prefix"
15408 exec_prefix="$acl_save_exec_prefix"
15409 prefix="$acl_save_prefix"
15413 dir=`echo "X$x" | sed -e 's/^X-L//'`
15414 if test -n "$acl_shlibext"; then
15415 if test -f "$dir/$libname$shrext"; then
15417 found_so="$dir/$libname$shrext"
15419 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15420 ver=`(cd "$dir" && \
15421 for f in "$libname$shrext".*; do echo "$f"; done \
15422 | sed -e "s,^$libname$shrext\\\\.,," \
15423 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15424 | sed 1q ) 2>/dev/null`
15425 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15427 found_so="$dir/$libname$shrext.$ver"
15430 eval library_names=\"$acl_library_names_spec\"
15431 for f in $library_names; do
15432 if test -f "$dir/$f"; then
15441 if test "X$found_dir" = "X"; then
15442 if test -f "$dir/$libname.$acl_libext"; then
15444 found_a="$dir/$libname.$acl_libext"
15447 if test "X$found_dir" != "X"; then
15448 if test -f "$dir/$libname.la"; then
15449 found_la="$dir/$libname.la"
15454 if test "X$found_dir" != "X"; then
15459 if test "X$found_dir" != "X"; then
15460 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
15461 if test "X$found_so" != "X"; then
15462 if test "$enable_rpath" = no \
15463 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
15464 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
15465 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15468 for x in $ltrpathdirs; do
15469 if test "X$x" = "X$found_dir"; then
15474 if test -z "$haveit"; then
15475 ltrpathdirs="$ltrpathdirs $found_dir"
15477 if test "$acl_hardcode_direct" = yes; then
15478 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15480 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
15481 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15483 for x in $rpathdirs; do
15484 if test "X$x" = "X$found_dir"; then
15489 if test -z "$haveit"; then
15490 rpathdirs="$rpathdirs $found_dir"
15494 for x in $LDFLAGS $LIBPTH; do
15496 acl_save_prefix="$prefix"
15497 prefix="$acl_final_prefix"
15498 acl_save_exec_prefix="$exec_prefix"
15499 exec_prefix="$acl_final_exec_prefix"
15501 exec_prefix="$acl_save_exec_prefix"
15502 prefix="$acl_save_prefix"
15504 if test "X$x" = "X-L$found_dir"; then
15509 if test -z "$haveit"; then
15510 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
15512 if test "$acl_hardcode_minus_L" != no; then
15513 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15515 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15521 if test "X$found_a" != "X"; then
15522 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
15524 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
15527 additional_includedir=
15528 case "$found_dir" in
15529 */$acl_libdirstem | */$acl_libdirstem/)
15530 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
15531 if test "$name" = 'pth'; then
15532 LIBPTH_PREFIX="$basedir"
15534 additional_includedir="$basedir/include"
15536 */$acl_libdirstem2 | */$acl_libdirstem2/)
15537 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
15538 if test "$name" = 'pth'; then
15539 LIBPTH_PREFIX="$basedir"
15541 additional_includedir="$basedir/include"
15544 if test "X$additional_includedir" != "X"; then
15545 if test "X$additional_includedir" != "X/usr/include"; then
15547 if test "X$additional_includedir" = "X/usr/local/include"; then
15548 if test -n "$GCC"; then
15550 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15554 if test -z "$haveit"; then
15555 for x in $CPPFLAGS $INCPTH; do
15557 acl_save_prefix="$prefix"
15558 prefix="$acl_final_prefix"
15559 acl_save_exec_prefix="$exec_prefix"
15560 exec_prefix="$acl_final_exec_prefix"
15562 exec_prefix="$acl_save_exec_prefix"
15563 prefix="$acl_save_prefix"
15565 if test "X$x" = "X-I$additional_includedir"; then
15570 if test -z "$haveit"; then
15571 if test -d "$additional_includedir"; then
15572 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
15578 if test -n "$found_la"; then
15579 save_libdir="$libdir"
15580 case "$found_la" in
15581 */* | *\\*) . "$found_la" ;;
15582 *) . "./$found_la" ;;
15584 libdir="$save_libdir"
15585 for dep in $dependency_libs; do
15588 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15589 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
15590 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
15592 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
15593 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
15594 if test -n "$GCC"; then
15596 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15600 if test -z "$haveit"; then
15602 for x in $LDFLAGS $LIBPTH; do
15604 acl_save_prefix="$prefix"
15605 prefix="$acl_final_prefix"
15606 acl_save_exec_prefix="$exec_prefix"
15607 exec_prefix="$acl_final_exec_prefix"
15609 exec_prefix="$acl_save_exec_prefix"
15610 prefix="$acl_save_prefix"
15612 if test "X$x" = "X-L$additional_libdir"; then
15617 if test -z "$haveit"; then
15618 if test -d "$additional_libdir"; then
15619 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
15623 for x in $LDFLAGS $LTLIBPTH; do
15625 acl_save_prefix="$prefix"
15626 prefix="$acl_final_prefix"
15627 acl_save_exec_prefix="$exec_prefix"
15628 exec_prefix="$acl_final_exec_prefix"
15630 exec_prefix="$acl_save_exec_prefix"
15631 prefix="$acl_save_prefix"
15633 if test "X$x" = "X-L$additional_libdir"; then
15638 if test -z "$haveit"; then
15639 if test -d "$additional_libdir"; then
15640 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
15647 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15648 if test "$enable_rpath" != no; then
15650 for x in $rpathdirs; do
15651 if test "X$x" = "X$dir"; then
15656 if test -z "$haveit"; then
15657 rpathdirs="$rpathdirs $dir"
15660 for x in $ltrpathdirs; do
15661 if test "X$x" = "X$dir"; then
15666 if test -z "$haveit"; then
15667 ltrpathdirs="$ltrpathdirs $dir"
15672 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15675 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15678 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
15679 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
15685 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15686 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
15692 if test "X$rpathdirs" != "X"; then
15693 if test -n "$acl_hardcode_libdir_separator"; then
15695 for found_dir in $rpathdirs; do
15696 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
15698 acl_save_libdir="$libdir"
15700 eval flag=\"$acl_hardcode_libdir_flag_spec\"
15701 libdir="$acl_save_libdir"
15702 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
15704 for found_dir in $rpathdirs; do
15705 acl_save_libdir="$libdir"
15706 libdir="$found_dir"
15707 eval flag=\"$acl_hardcode_libdir_flag_spec\"
15708 libdir="$acl_save_libdir"
15709 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
15713 if test "X$ltrpathdirs" != "X"; then
15714 for found_dir in $ltrpathdirs; do
15715 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
15724 ac_cv_libpth_libs="$LIBPTH"
15725 ac_cv_libpth_ltlibs="$LTLIBPTH"
15726 ac_cv_libpth_cppflags="$INCPTH"
15727 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
15730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
15731 printf "%s\n" "$ac_cv_libpth_libs" >&6; }
15732 LIBPTH="$ac_cv_libpth_libs"
15733 LTLIBPTH="$ac_cv_libpth_ltlibs"
15734 INCPTH="$ac_cv_libpth_cppflags"
15735 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
15737 for element in $INCPTH; do
15739 for x in $CPPFLAGS; do
15741 acl_save_prefix="$prefix"
15742 prefix="$acl_final_prefix"
15743 acl_save_exec_prefix="$exec_prefix"
15744 exec_prefix="$acl_final_exec_prefix"
15746 exec_prefix="$acl_save_exec_prefix"
15747 prefix="$acl_save_prefix"
15749 if test "X$x" = "X$element"; then
15754 if test -z "$haveit"; then
15755 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15767 gl_save_LIBS="$LIBS"
15768 LIBS="$LIBS $LIBPTH"
15769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15770 /* end confdefs.h. */
15780 if ac_fn_c_try_link "$LINENO"
15784 rm -f core conftest.err conftest.$ac_objext \
15785 conftest$ac_exeext conftest.$ac_ext
15786 LIBS="$gl_save_LIBS"
15787 if test -n "$gl_have_pth"; then
15789 LIBTHREAD="$LIBPTH"
15790 LTLIBTHREAD="$LTLIBPTH"
15791 LIBMULTITHREAD="$LIBTHREAD"
15792 LTLIBMULTITHREAD="$LTLIBTHREAD"
15794 printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
15796 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15797 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15799 printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
15806 CPPFLAGS="$gl_save_CPPFLAGS"
15809 if test -z "$gl_have_pthread"; then
15810 case "$gl_use_threads" in
15811 yes | windows | win32) # The 'win32' is for backward compatibility.
15812 if { case "$host_os" in
15817 gl_threads_api=windows
15819 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15827 printf %s "checking for multithread API to use... " >&6; }
15828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15829 printf "%s\n" "$gl_threads_api" >&6; }
15840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
15841 printf %s "checking for a sed that does not truncate output... " >&6; }
15842 if test ${ac_cv_path_SED+y}
15844 printf %s "(cached) " >&6
15846 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15847 for ac_i in 1 2 3 4 5 6 7; do
15848 ac_script="$ac_script$as_nl$ac_script"
15850 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15851 { ac_script=; unset ac_script;}
15852 if test -z "$SED"; then
15853 ac_path_SED_found=false
15854 # Loop through the user's path and test for each of PROGNAME-LIST
15855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15856 for as_dir in $PATH
15859 case $as_dir in #(((
15862 *) as_dir=$as_dir/ ;;
15864 for ac_prog in sed gsed
15866 for ac_exec_ext in '' $ac_executable_extensions; do
15867 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
15868 as_fn_executable_p "$ac_path_SED" || continue
15869 # Check for GNU ac_path_SED and select it if it is found.
15870 # Check for GNU $ac_path_SED
15871 case `"$ac_path_SED" --version 2>&1` in
15873 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15876 printf %s 0123456789 >"conftest.in"
15879 cat "conftest.in" "conftest.in" >"conftest.tmp"
15880 mv "conftest.tmp" "conftest.in"
15881 cp "conftest.in" "conftest.nl"
15882 printf "%s\n" '' >> "conftest.nl"
15883 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15884 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15885 as_fn_arith $ac_count + 1 && ac_count=$as_val
15886 if test $ac_count -gt ${ac_path_SED_max-0}; then
15887 # Best one so far, save it but keep looking for a better one
15888 ac_cv_path_SED="$ac_path_SED"
15889 ac_path_SED_max=$ac_count
15891 # 10*(2^10) chars as input seems more than enough
15892 test $ac_count -gt 10 && break
15894 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15897 $ac_path_SED_found && break 3
15902 if test -z "$ac_cv_path_SED"; then
15903 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15906 ac_cv_path_SED=$SED
15910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15911 printf "%s\n" "$ac_cv_path_SED" >&6; }
15912 SED="$ac_cv_path_SED"
15915 # Autoupdate added the following line to ensure that your configure
15916 # script's behavior did not change. It is probably safe to remove.
15920 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
15921 if test "x$ac_cv_header_stdlib_h" = xyes
15923 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
15927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15928 printf %s "checking for GNU libc compatible malloc... " >&6; }
15929 if test ${ac_cv_func_malloc_0_nonnull+y}
15931 printf %s "(cached) " >&6
15933 if test "$cross_compiling" = yes
15936 # Guess yes on platforms where we know the result.
15937 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
15938 | hpux* | solaris* | cygwin* | mingw*)
15939 ac_cv_func_malloc_0_nonnull=yes ;;
15940 # If we don't know, assume the worst.
15941 *) ac_cv_func_malloc_0_nonnull=no ;;
15945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946 /* end confdefs.h. */
15947 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15948 # include <stdlib.h>
15956 char *p = malloc (0);
15965 if ac_fn_c_try_run "$LINENO"
15967 ac_cv_func_malloc_0_nonnull=yes
15969 ac_cv_func_malloc_0_nonnull=no
15971 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15972 conftest.$ac_objext conftest.beam conftest.$ac_ext
15977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15978 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
15979 if test $ac_cv_func_malloc_0_nonnull = yes
15981 gl_cv_func_malloc_0_nonnull=1
15983 gl_cv_func_malloc_0_nonnull=0
15987 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
15994 GNULIB_EXPLICIT_BZERO=0;
16001 GNULIB_RAWMEMCHR=0;
16004 GNULIB_STRCHRNUL=0;
16012 GNULIB_STRCASESTR=0;
16019 GNULIB_MBSCASECMP=0;
16020 GNULIB_MBSNCASECMP=0;
16021 GNULIB_MBSPCASECMP=0;
16022 GNULIB_MBSCASESTR=0;
16029 GNULIB_STRERROR_R=0;
16030 GNULIB_STRSIGNAL=0;
16031 GNULIB_STRVERSCMP=0;
16033 HAVE_EXPLICIT_BZERO=1;
16037 HAVE_DECL_MEMMEM=1;
16039 HAVE_DECL_MEMRCHR=1;
16044 HAVE_DECL_STRDUP=1;
16045 HAVE_DECL_STRNDUP=1;
16046 HAVE_DECL_STRNLEN=1;
16050 HAVE_DECL_STRTOK_R=1;
16051 HAVE_DECL_STRERROR_R=1;
16052 HAVE_DECL_STRSIGNAL=1;
16057 REPLACE_STRCHRNUL=0;
16063 REPLACE_STRCASESTR=0;
16064 REPLACE_STRTOK_R=0;
16065 REPLACE_STRERROR=0;
16066 REPLACE_STRERROR_R=0;
16067 REPLACE_STRSIGNAL=0;
16068 UNDEFINE_STRTOK_R=0;
16075 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16076 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16077 # irrelevant for anonymous mappings.
16078 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16079 if test "x$ac_cv_func_mmap" = xyes
16087 # Try to allow MAP_ANONYMOUS.
16088 gl_have_mmap_anonymous=no
16089 if test $gl_have_mmap = yes; then
16090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16091 printf %s "checking for MAP_ANONYMOUS... " >&6; }
16092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16093 /* end confdefs.h. */
16095 #include <sys/mman.h>
16096 #ifdef MAP_ANONYMOUS
16097 I cannot identify this map
16101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16102 $EGREP "I cannot identify this map" >/dev/null 2>&1
16104 gl_have_mmap_anonymous=yes
16108 if test $gl_have_mmap_anonymous != yes; then
16109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16110 /* end confdefs.h. */
16112 #include <sys/mman.h>
16114 I cannot identify this map
16118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16119 $EGREP "I cannot identify this map" >/dev/null 2>&1
16122 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16124 gl_have_mmap_anonymous=yes
16129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16130 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
16131 if test $gl_have_mmap_anonymous = yes; then
16133 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16143 if test $HAVE_MEMCHR = 1; then
16144 # Detect platform-specific bugs in some versions of glibc:
16145 # memchr should not dereference anything with length 0
16146 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
16147 # memchr should not dereference overestimated length after a match
16148 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16149 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16150 # Assume that memchr works on platforms that lack mprotect.
16151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16152 printf %s "checking whether memchr works... " >&6; }
16153 if test ${gl_cv_func_memchr_works+y}
16155 printf %s "(cached) " >&6
16157 if test "$cross_compiling" = yes
16160 # Guess yes on native Windows.
16161 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
16162 # Be pessimistic for now.
16163 *) gl_cv_func_memchr_works="guessing no" ;;
16167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16168 /* end confdefs.h. */
16170 #include <string.h>
16171 #if HAVE_SYS_MMAN_H
16172 # include <fcntl.h>
16173 # include <unistd.h>
16174 # include <sys/types.h>
16175 # include <sys/mman.h>
16177 # define MAP_FILE 0
16186 char *fence = NULL;
16187 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16188 # if HAVE_MAP_ANONYMOUS
16189 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16191 # else /* !HAVE_MAP_ANONYMOUS */
16192 const int flags = MAP_FILE | MAP_PRIVATE;
16193 int fd = open ("/dev/zero", O_RDONLY, 0666);
16197 int pagesize = getpagesize ();
16199 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16201 if (two_pages != (char *)(-1)
16202 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16203 fence = two_pages + pagesize;
16208 if (memchr (fence, 0, 0))
16210 strcpy (fence - 9, "12345678");
16211 if (memchr (fence - 9, 0, 79) != fence - 1)
16213 if (memchr (fence - 1, 0, 3) != fence - 1)
16222 if ac_fn_c_try_run "$LINENO"
16224 gl_cv_func_memchr_works=yes
16226 gl_cv_func_memchr_works=no
16228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16229 conftest.$ac_objext conftest.beam conftest.$ac_ext
16234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16235 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
16236 case "$gl_cv_func_memchr_works" in
16238 *) REPLACE_MEMCHR=1 ;;
16242 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16243 if test "x$ac_cv_have_decl_memrchr" = xyes
16250 printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
16256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16257 printf %s "checking for O_CLOEXEC... " >&6; }
16258 if test ${gl_cv_macro_O_CLOEXEC+y}
16260 printf %s "(cached) " >&6
16262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16263 /* end confdefs.h. */
16277 if ac_fn_c_try_compile "$LINENO"
16279 gl_cv_macro_O_CLOEXEC=yes
16281 gl_cv_macro_O_CLOEXEC=no
16283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16286 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
16290 REPLACE_STRERROR_0=0
16291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16292 printf %s "checking whether strerror(0) succeeds... " >&6; }
16293 if test ${gl_cv_func_strerror_0_works+y}
16295 printf %s "(cached) " >&6
16297 if test "$cross_compiling" = yes
16300 # Guess yes on glibc systems.
16301 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16302 # Guess yes on native Windows.
16303 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
16304 # If we don't know, assume the worst.
16305 *) gl_cv_func_strerror_0_works="guessing no" ;;
16309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16310 /* end confdefs.h. */
16311 #include <string.h>
16320 str = strerror (0);
16321 if (!*str) result |= 1;
16322 if (errno) result |= 2;
16323 if (strstr (str, "nknown") || strstr (str, "ndefined"))
16330 if ac_fn_c_try_run "$LINENO"
16332 gl_cv_func_strerror_0_works=yes
16334 gl_cv_func_strerror_0_works=no
16336 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16337 conftest.$ac_objext conftest.beam conftest.$ac_ext
16342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16343 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
16344 case "$gl_cv_func_strerror_0_works" in
16347 REPLACE_STRERROR_0=1
16349 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
16360 if test $ac_cv_func_strerror_r = yes; then
16361 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16363 printf %s "checking for strerror_r with POSIX signature... " >&6; }
16364 if test ${gl_cv_func_strerror_r_posix_signature+y}
16366 printf %s "(cached) " >&6
16368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16369 /* end confdefs.h. */
16370 #include <string.h>
16371 int strerror_r (int, char *, size_t);
16381 if ac_fn_c_try_compile "$LINENO"
16383 gl_cv_func_strerror_r_posix_signature=yes
16385 gl_cv_func_strerror_r_posix_signature=no
16387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16391 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
16392 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16394 printf %s "checking whether strerror_r works... " >&6; }
16395 if test ${gl_cv_func_strerror_r_works+y}
16397 printf %s "(cached) " >&6
16399 if test "$cross_compiling" = yes
16404 aix*) gl_cv_func_strerror_r_works="guessing no";;
16405 # Guess no on HP-UX.
16406 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16407 # Guess no on BSD variants.
16408 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
16409 # Guess yes otherwise.
16410 *) gl_cv_func_strerror_r_works="guessing yes";;
16414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16415 /* end confdefs.h. */
16417 #include <string.h>
16424 if (strerror_r (EACCES, buf, 0) < 0)
16427 if (strerror_r (EACCES, buf, sizeof buf) != 0)
16429 strcpy (buf, "Unknown");
16430 if (strerror_r (0, buf, sizeof buf) != 0)
16434 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16438 if (strerror_r (-3, buf, sizeof buf) < 0)
16450 if ac_fn_c_try_run "$LINENO"
16452 gl_cv_func_strerror_r_works=yes
16454 gl_cv_func_strerror_r_works=no
16456 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16457 conftest.$ac_objext conftest.beam conftest.$ac_ext
16462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16463 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16466 if test $ac_cv_func___xpg_strerror_r = yes; then
16467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16468 printf %s "checking whether __xpg_strerror_r works... " >&6; }
16469 if test ${gl_cv_func_strerror_r_works+y}
16471 printf %s "(cached) " >&6
16473 if test "$cross_compiling" = yes
16475 gl_cv_func_strerror_r_works="guessing no"
16478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16479 /* end confdefs.h. */
16481 #include <string.h>
16486 int __xpg_strerror_r(int, char *, size_t);
16492 char buf[256] = "^";
16494 char *str = strerror (-1);
16495 strcpy (copy, str);
16496 if (__xpg_strerror_r (-2, buf, 1) == 0)
16500 __xpg_strerror_r (-2, buf, 256);
16501 if (strcmp (str, copy))
16509 if ac_fn_c_try_run "$LINENO"
16511 gl_cv_func_strerror_r_works=yes
16513 gl_cv_func_strerror_r_works=no
16515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16516 conftest.$ac_objext conftest.beam conftest.$ac_ext
16521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16522 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16535 if test $ac_cv_have_decl_strerror_r = no; then
16536 HAVE_DECL_STRERROR_R=0
16539 if test $ac_cv_func_strerror_r = yes; then
16540 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16541 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16542 case "$gl_cv_func_strerror_r_works" in
16543 *no) REPLACE_STRERROR_R=1 ;;
16546 REPLACE_STRERROR_R=1
16549 REPLACE_STRERROR_R=1
16568 gl_cv_func_vfprintf_posix=no
16569 case "$gl_cv_func_printf_sizes_c99" in
16571 case "$gl_cv_func_printf_long_double" in
16573 case "$gl_cv_func_printf_infinite" in
16575 case "$gl_cv_func_printf_infinite_long_double" in
16577 case "$gl_cv_func_printf_directive_a" in
16579 case "$gl_cv_func_printf_directive_f" in
16581 case "$gl_cv_func_printf_directive_n" in
16583 case "$gl_cv_func_printf_directive_ls" in
16585 case "$gl_cv_func_printf_positions" in
16587 case "$gl_cv_func_printf_flag_grouping" in
16589 case "$gl_cv_func_printf_flag_leftadjust" in
16591 case "$gl_cv_func_printf_flag_zero" in
16593 case "$gl_cv_func_printf_precision" in
16595 case "$gl_cv_func_printf_enomem" in
16597 # vfprintf exists and is
16598 # already POSIX compliant.
16599 gl_cv_func_vfprintf_posix=yes
16628 if test $gl_cv_func_vfprintf_posix = no; then
16632 case "$gl_cv_func_printf_infinite" in
16637 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
16645 case "$gl_cv_func_printf_long_double" in
16647 case "$gl_cv_func_printf_infinite_long_double" in
16652 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
16661 case "$gl_cv_func_printf_directive_a" in
16666 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
16668 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
16669 if test "x$ac_cv_func_nl_langinfo" = xyes
16671 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
16680 case "$gl_cv_func_printf_directive_f" in
16685 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
16692 case "$gl_cv_func_printf_directive_ls" in
16697 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
16704 case "$gl_cv_func_printf_flag_grouping" in
16709 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
16716 case "$gl_cv_func_printf_flag_leftadjust" in
16721 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
16728 case "$gl_cv_func_printf_flag_zero" in
16733 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
16740 case "$gl_cv_func_printf_precision" in
16745 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
16748 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
16751 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
16758 case "$gl_cv_func_printf_enomem" in
16763 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
16766 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
16769 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
16784 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
16794 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
16804 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
16814 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
16816 if test $ac_cv_func_vasnprintf = yes; then
16818 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
16832 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16833 if test "x$ac_cv_type_ptrdiff_t" = xyes
16838 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
16859 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
16863 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
16871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
16872 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
16873 if test ${gl_cv_prog_as_underscore+y}
16875 printf %s "(cached) " >&6
16877 cat > conftest.c <<EOF
16879 extern "C" int foo (void);
16881 int foo(void) { return 0; }
16883 # Look for the assembly language name in the .s file.
16884 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16885 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16886 (eval $ac_try) 2>&5
16888 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16889 test $ac_status = 0; }; } >/dev/null 2>&1
16890 if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
16891 gl_cv_prog_as_underscore=yes
16893 gl_cv_prog_as_underscore=no
16898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16899 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
16900 if test $gl_cv_prog_as_underscore = yes; then
16901 USER_LABEL_PREFIX=_
16906 printf "%s\n" "#define USER_LABEL_PREFIX $USER_LABEL_PREFIX" >>confdefs.h
16908 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16912 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
16913 if test ${ac_cv_header_stdbool_h+y}
16915 printf %s "(cached) " >&6
16917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16918 /* end confdefs.h. */
16920 #include <stdbool.h>
16925 typedef _Bool Bool;
16927 "error: bool is not defined"
16930 "error: false is not defined"
16933 "error: false is not 0"
16936 "error: true is not defined"
16939 "error: true is not 1"
16943 #ifndef __bool_true_false_are_defined
16944 "error: __bool_true_false_are_defined is not defined"
16947 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16949 char a[true == 1 ? 1 : -1];
16950 char b[false == 0 ? 1 : -1];
16951 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16952 char d[(bool) 0.5 == true ? 1 : -1];
16953 /* See body of main program for 'e'. */
16954 char f[(Bool) 0.0 == false ? 1 : -1];
16956 char h[sizeof (Bool)];
16957 char i[sizeof s.t];
16958 enum { j = false, k = true, l = false * true, m = true * 256 };
16959 /* The following fails for
16960 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16962 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16963 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16964 /* Catch a bug in an HP-UX C compiler. See
16965 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16966 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16977 *pq |= q; *pq |= ! q;
16978 *qq |= q; *qq |= ! q;
16979 /* Refer to every declared value, to avoid compiler optimizations. */
16980 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16981 + !m + !n + !o + !p + !q + !pq + !qq);
16987 if ac_fn_c_try_compile "$LINENO"
16989 ac_cv_header_stdbool_h=yes
16991 ac_cv_header_stdbool_h=no
16993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16996 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
16997 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16998 if test "x$ac_cv_type__Bool" = xyes
17001 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
17009 HAVE_MAX_ALIGN_T=1;
17019 if test $ac_cv_type_long_long_int = yes; then
17020 HAVE_LONG_LONG_INT=1
17022 HAVE_LONG_LONG_INT=0
17026 if test $ac_cv_type_unsigned_long_long_int = yes; then
17027 HAVE_UNSIGNED_LONG_LONG_INT=1
17029 HAVE_UNSIGNED_LONG_LONG_INT=0
17034 if test $ac_cv_header_wchar_h = yes; then
17041 if test $ac_cv_header_inttypes_h = yes; then
17048 if test $ac_cv_header_sys_types_h = yes; then
17064 if test $gl_cv_have_include_next = yes; then
17065 gl_cv_next_stdint_h='<'stdint.h'>'
17067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17068 printf %s "checking absolute name of <stdint.h>... " >&6; }
17069 if test ${gl_cv_next_stdint_h+y}
17071 printf %s "(cached) " >&6
17074 if test $ac_cv_header_stdint_h = yes; then
17079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17080 /* end confdefs.h. */
17081 #include <stdint.h>
17084 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17085 *) gl_absname_cpp="$ac_cpp" ;;
17090 gl_dirsep_regex='[/\\]'
17093 gl_dirsep_regex='\/'
17096 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17097 gl_header_literal_regex=`echo 'stdint.h' \
17098 | sed -e "$gl_make_literal_regex_sed"`
17099 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17100 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17106 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17107 sed -n "$gl_absolute_header_sed"`
17109 gl_header=$gl_cv_absolute_stdint_h
17110 gl_cv_next_stdint_h='"'$gl_header'"'
17112 gl_cv_next_stdint_h='<'stdint.h'>'
17117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17118 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
17120 NEXT_STDINT_H=$gl_cv_next_stdint_h
17122 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17123 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17124 gl_next_as_first_directive='<'stdint.h'>'
17126 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17127 gl_next_as_first_directive=$gl_cv_next_stdint_h
17129 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
17134 if test $ac_cv_header_stdint_h = yes; then
17141 if test $ac_cv_header_stdint_h = yes; then
17142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17143 printf %s "checking whether stdint.h conforms to C99... " >&6; }
17144 if test ${gl_cv_header_working_stdint_h+y}
17146 printf %s "(cached) " >&6
17148 gl_cv_header_working_stdint_h=no
17149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17150 /* end confdefs.h. */
17153 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17154 #define __STDC_CONSTANT_MACROS 1
17155 #define __STDC_LIMIT_MACROS 1
17156 #include <stdint.h>
17157 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
17158 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
17159 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17163 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17164 included before <wchar.h>. */
17165 #include <stddef.h>
17166 #include <signal.h>
17168 # include <stdio.h>
17170 # include <wchar.h>
17175 int8_t a1 = INT8_MAX;
17176 int8_t a1min = INT8_MIN;
17179 int16_t a2 = INT16_MAX;
17180 int16_t a2min = INT16_MIN;
17183 int32_t a3 = INT32_MAX;
17184 int32_t a3min = INT32_MIN;
17187 int64_t a4 = INT64_MAX;
17188 int64_t a4min = INT64_MIN;
17191 uint8_t b1 = UINT8_MAX;
17193 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17196 uint16_t b2 = UINT16_MAX;
17199 uint32_t b3 = UINT32_MAX;
17202 uint64_t b4 = UINT64_MAX;
17204 int_least8_t c1 = INT8_C (0x7f);
17205 int_least8_t c1max = INT_LEAST8_MAX;
17206 int_least8_t c1min = INT_LEAST8_MIN;
17207 int_least16_t c2 = INT16_C (0x7fff);
17208 int_least16_t c2max = INT_LEAST16_MAX;
17209 int_least16_t c2min = INT_LEAST16_MIN;
17210 int_least32_t c3 = INT32_C (0x7fffffff);
17211 int_least32_t c3max = INT_LEAST32_MAX;
17212 int_least32_t c3min = INT_LEAST32_MIN;
17213 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17214 int_least64_t c4max = INT_LEAST64_MAX;
17215 int_least64_t c4min = INT_LEAST64_MIN;
17216 uint_least8_t d1 = UINT8_C (0xff);
17217 uint_least8_t d1max = UINT_LEAST8_MAX;
17218 uint_least16_t d2 = UINT16_C (0xffff);
17219 uint_least16_t d2max = UINT_LEAST16_MAX;
17220 uint_least32_t d3 = UINT32_C (0xffffffff);
17221 uint_least32_t d3max = UINT_LEAST32_MAX;
17222 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17223 uint_least64_t d4max = UINT_LEAST64_MAX;
17224 int_fast8_t e1 = INT_FAST8_MAX;
17225 int_fast8_t e1min = INT_FAST8_MIN;
17226 int_fast16_t e2 = INT_FAST16_MAX;
17227 int_fast16_t e2min = INT_FAST16_MIN;
17228 int_fast32_t e3 = INT_FAST32_MAX;
17229 int_fast32_t e3min = INT_FAST32_MIN;
17230 int_fast64_t e4 = INT_FAST64_MAX;
17231 int_fast64_t e4min = INT_FAST64_MIN;
17232 uint_fast8_t f1 = UINT_FAST8_MAX;
17233 uint_fast16_t f2 = UINT_FAST16_MAX;
17234 uint_fast32_t f3 = UINT_FAST32_MAX;
17235 uint_fast64_t f4 = UINT_FAST64_MAX;
17237 intptr_t g = INTPTR_MAX;
17238 intptr_t gmin = INTPTR_MIN;
17241 uintptr_t h = UINTPTR_MAX;
17243 intmax_t i = INTMAX_MAX;
17244 uintmax_t j = UINTMAX_MAX;
17246 /* Check that SIZE_MAX has the correct type, if possible. */
17247 #if 201112 <= __STDC_VERSION__
17248 int k = _Generic (SIZE_MAX, size_t: 0);
17249 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
17250 || (0x5110 <= __SUNPRO_C && !__STDC__))
17252 extern __typeof__ (SIZE_MAX) k;
17255 #include <limits.h> /* for CHAR_BIT */
17256 #define TYPE_MINIMUM(t) \
17257 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17258 #define TYPE_MAXIMUM(t) \
17259 ((t) ((t) 0 < (t) -1 \
17261 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17264 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17265 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17267 /* Detect bug in FreeBSD 6.0 / ia64. */
17268 int check_SIG_ATOMIC:
17269 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17270 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17272 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17274 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17275 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17277 /* Detect bug in mingw. */
17279 WINT_MIN == TYPE_MINIMUM (wint_t)
17280 && WINT_MAX == TYPE_MAXIMUM (wint_t)
17283 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
17285 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17286 int check_UINT16_C:
17287 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
17289 /* Detect bugs in OpenBSD 3.9 stdint.h. */
17291 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
17294 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17297 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17300 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17302 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17303 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17304 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17305 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17306 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17307 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17308 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17309 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17310 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17311 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17312 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17323 if ac_fn_c_try_compile "$LINENO"
17325 if test "$cross_compiling" = yes
17328 # Guess yes on native Windows.
17329 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
17330 # In general, assume it works.
17331 *) gl_cv_header_working_stdint_h="guessing yes" ;;
17335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336 /* end confdefs.h. */
17339 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17340 #define __STDC_CONSTANT_MACROS 1
17341 #define __STDC_LIMIT_MACROS 1
17342 #include <stdint.h>
17345 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17346 included before <wchar.h>. */
17347 #include <stddef.h>
17348 #include <signal.h>
17350 # include <stdio.h>
17352 # include <wchar.h>
17357 #include <string.h>
17358 #define MVAL(macro) MVAL1(macro)
17359 #define MVAL1(expression) #expression
17360 static const char *macro_values[] =
17394 for (mv = macro_values; *mv != NULL; mv++)
17396 const char *value = *mv;
17397 /* Test whether it looks like a cast expression. */
17398 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17399 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17400 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17401 || strncmp (value, "((int)"/*)*/, 6) == 0
17402 || strncmp (value, "((signed short)"/*)*/, 15) == 0
17403 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17404 return mv - macro_values + 1;
17412 if ac_fn_c_try_run "$LINENO"
17414 gl_cv_header_working_stdint_h=yes
17416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17417 conftest.$ac_objext conftest.beam conftest.$ac_ext
17422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17426 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
17429 HAVE_C99_STDINT_H=0
17430 HAVE_SYS_BITYPES_H=0
17431 HAVE_SYS_INTTYPES_H=0
17433 case "$gl_cv_header_working_stdint_h" in
17435 HAVE_C99_STDINT_H=1
17436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
17437 printf %s "checking whether stdint.h predates C++11... " >&6; }
17438 if test ${gl_cv_header_stdint_predates_cxx11_h+y}
17440 printf %s "(cached) " >&6
17442 gl_cv_header_stdint_predates_cxx11_h=yes
17443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17444 /* end confdefs.h. */
17447 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17448 #include <stdint.h>
17451 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17452 included before <wchar.h>. */
17453 #include <stddef.h>
17454 #include <signal.h>
17456 # include <stdio.h>
17458 # include <wchar.h>
17462 intmax_t im = INTMAX_MAX;
17463 int32_t i32 = INT32_C (0x7fffffff);
17473 if ac_fn_c_try_compile "$LINENO"
17475 gl_cv_header_stdint_predates_cxx11_h=no
17477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
17480 printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
17482 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
17484 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
17487 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
17490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
17491 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
17492 if test ${gl_cv_header_stdint_width+y}
17494 printf %s "(cached) " >&6
17496 gl_cv_header_stdint_width=no
17497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17498 /* end confdefs.h. */
17500 /* Work if build is not clean. */
17501 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
17502 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17503 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17505 #include <stdint.h>
17507 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17508 included before <wchar.h>. */
17509 #include <stddef.h>
17510 #include <signal.h>
17512 # include <stdio.h>
17514 # include <wchar.h>
17517 int iw = UINTMAX_WIDTH;
17527 if ac_fn_c_try_compile "$LINENO"
17529 gl_cv_header_stdint_width=yes
17531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
17534 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
17535 if test "$gl_cv_header_stdint_width" = yes; then
17540 ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
17541 if test "x$ac_cv_header_sys_inttypes_h" = xyes
17543 printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
17546 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
17547 if test "x$ac_cv_header_sys_bitypes_h" = xyes
17549 printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
17553 if test $ac_cv_header_sys_inttypes_h = yes; then
17554 HAVE_SYS_INTTYPES_H=1
17556 if test $ac_cv_header_sys_bitypes_h = yes; then
17557 HAVE_SYS_BITYPES_H=1
17561 if test $APPLE_UNIVERSAL_BUILD = 0; then
17564 for gltype in ptrdiff_t size_t ; do
17565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17566 printf %s "checking for bit size of $gltype... " >&6; }
17567 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17569 printf %s "(cached) " >&6
17571 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17572 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17573 included before <wchar.h>. */
17574 #include <stddef.h>
17575 #include <signal.h>
17577 # include <stdio.h>
17579 # include <wchar.h>
17582 #include <limits.h>"
17589 eval gl_cv_bitsizeof_${gltype}=\$result
17592 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17594 printf "%s\n" "$ac_res" >&6; }
17595 eval result=\$gl_cv_bitsizeof_${gltype}
17596 if test $result = unknown; then
17599 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17600 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17602 eval BITSIZEOF_${GLTYPE}=\$result
17609 for gltype in sig_atomic_t wchar_t wint_t ; do
17610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17611 printf %s "checking for bit size of $gltype... " >&6; }
17612 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17614 printf %s "(cached) " >&6
17616 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17617 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17618 included before <wchar.h>. */
17619 #include <stddef.h>
17620 #include <signal.h>
17622 # include <stdio.h>
17624 # include <wchar.h>
17627 #include <limits.h>"
17634 eval gl_cv_bitsizeof_${gltype}=\$result
17637 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17639 printf "%s\n" "$ac_res" >&6; }
17640 eval result=\$gl_cv_bitsizeof_${gltype}
17641 if test $result = unknown; then
17644 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17645 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17647 eval BITSIZEOF_${GLTYPE}=\$result
17653 for gltype in sig_atomic_t wchar_t wint_t ; do
17654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17655 printf %s "checking whether $gltype is signed... " >&6; }
17656 if eval test \${gl_cv_type_${gltype}_signed+y}
17658 printf %s "(cached) " >&6
17660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17661 /* end confdefs.h. */
17663 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17664 included before <wchar.h>. */
17665 #include <stddef.h>
17666 #include <signal.h>
17668 # include <stdio.h>
17670 # include <wchar.h>
17673 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
17682 if ac_fn_c_try_compile "$LINENO"
17688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17689 eval gl_cv_type_${gltype}_signed=\$result
17692 eval ac_res=\$gl_cv_type_${gltype}_signed
17693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17694 printf "%s\n" "$ac_res" >&6; }
17695 eval result=\$gl_cv_type_${gltype}_signed
17696 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17697 if test "$result" = yes; then
17698 printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
17700 eval HAVE_SIGNED_${GLTYPE}=1
17702 eval HAVE_SIGNED_${GLTYPE}=0
17707 gl_cv_type_ptrdiff_t_signed=yes
17708 gl_cv_type_size_t_signed=no
17709 if test $APPLE_UNIVERSAL_BUILD = 0; then
17712 for gltype in ptrdiff_t size_t ; do
17713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17714 printf %s "checking for $gltype integer literal suffix... " >&6; }
17715 if eval test \${gl_cv_type_${gltype}_suffix+y}
17717 printf %s "(cached) " >&6
17719 eval gl_cv_type_${gltype}_suffix=no
17720 eval result=\$gl_cv_type_${gltype}_signed
17721 if test "$result" = yes; then
17726 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17728 '') gltype1='int';;
17729 l) gltype1='long int';;
17730 ll) gltype1='long long int';;
17731 i64) gltype1='__int64';;
17732 u) gltype1='unsigned int';;
17733 ul) gltype1='unsigned long int';;
17734 ull) gltype1='unsigned long long int';;
17735 ui64)gltype1='unsigned __int64';;
17737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17738 /* end confdefs.h. */
17740 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17741 included before <wchar.h>. */
17742 #include <stddef.h>
17743 #include <signal.h>
17745 # include <stdio.h>
17747 # include <wchar.h>
17750 extern $gltype foo;
17751 extern $gltype1 foo;
17760 if ac_fn_c_try_compile "$LINENO"
17762 eval gl_cv_type_${gltype}_suffix=\$glsuf
17764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17765 eval result=\$gl_cv_type_${gltype}_suffix
17766 test "$result" != no && break
17769 eval ac_res=\$gl_cv_type_${gltype}_suffix
17770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17771 printf "%s\n" "$ac_res" >&6; }
17772 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17773 eval result=\$gl_cv_type_${gltype}_suffix
17774 test "$result" = no && result=
17775 eval ${GLTYPE}_SUFFIX=\$result
17776 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
17784 for gltype in sig_atomic_t wchar_t wint_t ; do
17785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17786 printf %s "checking for $gltype integer literal suffix... " >&6; }
17787 if eval test \${gl_cv_type_${gltype}_suffix+y}
17789 printf %s "(cached) " >&6
17791 eval gl_cv_type_${gltype}_suffix=no
17792 eval result=\$gl_cv_type_${gltype}_signed
17793 if test "$result" = yes; then
17798 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17800 '') gltype1='int';;
17801 l) gltype1='long int';;
17802 ll) gltype1='long long int';;
17803 i64) gltype1='__int64';;
17804 u) gltype1='unsigned int';;
17805 ul) gltype1='unsigned long int';;
17806 ull) gltype1='unsigned long long int';;
17807 ui64)gltype1='unsigned __int64';;
17809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17810 /* end confdefs.h. */
17812 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17813 included before <wchar.h>. */
17814 #include <stddef.h>
17815 #include <signal.h>
17817 # include <stdio.h>
17819 # include <wchar.h>
17822 extern $gltype foo;
17823 extern $gltype1 foo;
17832 if ac_fn_c_try_compile "$LINENO"
17834 eval gl_cv_type_${gltype}_suffix=\$glsuf
17836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17837 eval result=\$gl_cv_type_${gltype}_suffix
17838 test "$result" != no && break
17841 eval ac_res=\$gl_cv_type_${gltype}_suffix
17842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17843 printf "%s\n" "$ac_res" >&6; }
17844 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17845 eval result=\$gl_cv_type_${gltype}_suffix
17846 test "$result" = no && result=
17847 eval ${GLTYPE}_SUFFIX=\$result
17848 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
17854 if test $GNULIB_OVERRIDES_WINT_T = 1; then
17855 BITSIZEOF_WINT_T=32
17862 if test -n "$LIMITS_H"; then
17863 GL_GENERATE_LIMITS_H_TRUE=
17864 GL_GENERATE_LIMITS_H_FALSE='#'
17866 GL_GENERATE_LIMITS_H_TRUE='#'
17867 GL_GENERATE_LIMITS_H_FALSE=
17875 if test -n "$STDINT_H"; then
17876 GL_GENERATE_STDINT_H_TRUE=
17877 GL_GENERATE_STDINT_H_FALSE='#'
17879 GL_GENERATE_STDINT_H_TRUE='#'
17880 GL_GENERATE_STDINT_H_FALSE=
17885 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
17886 if test "x$ac_cv_have_decl_strdup" = xyes
17893 printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
17907 if test $gl_cv_have_include_next = yes; then
17908 gl_cv_next_string_h='<'string.h'>'
17910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17911 printf %s "checking absolute name of <string.h>... " >&6; }
17912 if test ${gl_cv_next_string_h+y}
17914 printf %s "(cached) " >&6
17919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17920 /* end confdefs.h. */
17921 #include <string.h>
17924 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17925 *) gl_absname_cpp="$ac_cpp" ;;
17930 gl_dirsep_regex='[/\\]'
17933 gl_dirsep_regex='\/'
17936 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17937 gl_header_literal_regex=`echo 'string.h' \
17938 | sed -e "$gl_make_literal_regex_sed"`
17939 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17940 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17946 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17947 sed -n "$gl_absolute_header_sed"`
17949 gl_header=$gl_cv_absolute_string_h
17950 gl_cv_next_string_h='"'$gl_header'"'
17954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17955 printf "%s\n" "$gl_cv_next_string_h" >&6; }
17957 NEXT_STRING_H=$gl_cv_next_string_h
17959 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17960 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17961 gl_next_as_first_directive='<'string.h'>'
17963 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17964 gl_next_as_first_directive=$gl_cv_next_string_h
17966 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17977 printf %s "checking for struct timespec in <time.h>... " >&6; }
17978 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
17980 printf %s "(cached) " >&6
17982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17983 /* end confdefs.h. */
17989 static struct timespec x; x.tv_sec = x.tv_nsec;
17994 if ac_fn_c_try_compile "$LINENO"
17996 gl_cv_sys_struct_timespec_in_time_h=yes
17998 gl_cv_sys_struct_timespec_in_time_h=no
18000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
18003 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
18005 TIME_H_DEFINES_STRUCT_TIMESPEC=0
18006 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
18007 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
18008 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
18009 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
18010 TIME_H_DEFINES_STRUCT_TIMESPEC=1
18012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
18013 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
18014 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
18016 printf %s "(cached) " >&6
18018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18019 /* end confdefs.h. */
18020 #include <sys/time.h>
18025 static struct timespec x; x.tv_sec = x.tv_nsec;
18030 if ac_fn_c_try_compile "$LINENO"
18032 gl_cv_sys_struct_timespec_in_sys_time_h=yes
18034 gl_cv_sys_struct_timespec_in_sys_time_h=no
18036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
18039 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
18040 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
18041 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
18043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
18044 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
18045 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
18047 printf %s "(cached) " >&6
18049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18050 /* end confdefs.h. */
18051 #include <pthread.h>
18056 static struct timespec x; x.tv_sec = x.tv_nsec;
18061 if ac_fn_c_try_compile "$LINENO"
18063 gl_cv_sys_struct_timespec_in_pthread_h=yes
18065 gl_cv_sys_struct_timespec_in_pthread_h=no
18067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
18070 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
18071 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
18072 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
18074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
18075 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
18076 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
18078 printf %s "(cached) " >&6
18080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18081 /* end confdefs.h. */
18082 #include <unistd.h>
18087 static struct timespec x; x.tv_sec = x.tv_nsec;
18092 if ac_fn_c_try_compile "$LINENO"
18094 gl_cv_sys_struct_timespec_in_unistd_h=yes
18096 gl_cv_sys_struct_timespec_in_unistd_h=no
18098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
18101 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
18102 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
18103 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
18124 if test $gl_cv_have_include_next = yes; then
18125 gl_cv_next_time_h='<'time.h'>'
18127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
18128 printf %s "checking absolute name of <time.h>... " >&6; }
18129 if test ${gl_cv_next_time_h+y}
18131 printf %s "(cached) " >&6
18136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18137 /* end confdefs.h. */
18141 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18142 *) gl_absname_cpp="$ac_cpp" ;;
18147 gl_dirsep_regex='[/\\]'
18150 gl_dirsep_regex='\/'
18153 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18154 gl_header_literal_regex=`echo 'time.h' \
18155 | sed -e "$gl_make_literal_regex_sed"`
18156 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18157 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18163 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18164 sed -n "$gl_absolute_header_sed"`
18166 gl_header=$gl_cv_absolute_time_h
18167 gl_cv_next_time_h='"'$gl_header'"'
18171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
18172 printf "%s\n" "$gl_cv_next_time_h" >&6; }
18174 NEXT_TIME_H=$gl_cv_next_time_h
18176 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18177 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18178 gl_next_as_first_directive='<'time.h'>'
18180 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18181 gl_next_as_first_directive=$gl_cv_next_time_h
18183 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
18200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
18201 printf %s "checking whether the utimes function works... " >&6; }
18202 if test ${gl_cv_func_working_utimes+y}
18204 printf %s "(cached) " >&6
18206 if test "$cross_compiling" = yes
18209 # Guess no on native Windows.
18210 mingw*) gl_cv_func_working_utimes="guessing no" ;;
18211 *) gl_cv_func_working_utimes="guessing no" ;;
18215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18216 /* end confdefs.h. */
18218 #include <sys/types.h>
18219 #include <sys/stat.h>
18221 #include <sys/time.h>
18223 #include <unistd.h>
18224 #include <stdlib.h>
18230 inorder (time_t a, time_t b, time_t c)
18232 return a <= b && b <= c;
18239 char const *file = "conftest.utimes";
18240 /* On OS/2, file timestamps must be on or after 1980 in local time,
18241 with an even number of seconds. */
18242 static struct timeval timeval[2] = {{315620000 + 10, 10},
18243 {315620000 + 1000000, 999998}};
18245 /* Test whether utimes() essentially works. */
18248 FILE *f = fopen (file, "w");
18251 else if (fclose (f) != 0)
18253 else if (utimes (file, timeval) != 0)
18255 else if (lstat (file, &sbuf) != 0)
18257 else if (!(sbuf.st_atime == timeval[0].tv_sec
18258 && sbuf.st_mtime == timeval[1].tv_sec))
18260 if (unlink (file) != 0)
18264 /* Test whether utimes() with a NULL argument sets the file's timestamp
18265 to the current time. Use 'fstat' as well as 'time' to
18266 determine the "current" time, to accommodate NFS file systems
18267 if there is a time skew between the host and the NFS server. */
18269 int fd = open (file, O_WRONLY|O_CREAT, 0644);
18275 struct stat st0, st1, st2;
18276 if (time (&t0) == (time_t) -1)
18278 else if (fstat (fd, &st0) != 0)
18280 else if (utimes (file, timeval) != 0
18281 && (errno != EACCES
18282 /* OS/2 kLIBC utimes fails on opened files. */
18284 || utimes (file, timeval) != 0
18285 || (fd = open (file, O_WRONLY)) < 0))
18287 else if (utimes (file, NULL) != 0
18288 && (errno != EACCES
18289 /* OS/2 kLIBC utimes fails on opened files. */
18291 || utimes (file, NULL) != 0
18292 || (fd = open (file, O_WRONLY)) < 0))
18294 else if (fstat (fd, &st1) != 0)
18296 else if (write (fd, "\n", 1) != 1)
18298 else if (fstat (fd, &st2) != 0)
18300 else if (time (&t2) == (time_t) -1)
18304 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
18305 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
18306 if (! (st1.st_atime == st1.st_mtime))
18308 if (! (m_ok_POSIX || m_ok_NFS))
18311 if (close (fd) != 0)
18314 if (unlink (file) != 0)
18318 /* Test whether utimes() with a NULL argument works on read-only files. */
18320 int fd = open (file, O_WRONLY|O_CREAT, 0444);
18323 else if (close (fd) != 0)
18325 else if (utimes (file, NULL) != 0)
18327 if (unlink (file) != 0)
18335 if ac_fn_c_try_run "$LINENO"
18337 gl_cv_func_working_utimes=yes
18339 gl_cv_func_working_utimes=no
18341 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18342 conftest.$ac_objext conftest.beam conftest.$ac_ext
18347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
18348 printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
18350 case "$gl_cv_func_working_utimes" in
18353 printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
18369 GNULIB_MBSRTOWCS=0;
18370 GNULIB_MBSNRTOWCS=0;
18372 GNULIB_WCSRTOMBS=0;
18373 GNULIB_WCSNRTOMBS=0;
18390 GNULIB_WCSCASECMP=0;
18391 GNULIB_WCSNCASECMP=0;
18429 HAVE_WCSNCASECMP=1;
18443 HAVE_DECL_WCWIDTH=1;
18444 REPLACE_MBSTATE_T=0;
18450 REPLACE_MBSRTOWCS=0;
18451 REPLACE_MBSNRTOWCS=0;
18453 REPLACE_WCSRTOMBS=0;
18454 REPLACE_WCSNRTOMBS=0;
18456 REPLACE_WCSWIDTH=0;
18457 REPLACE_WCSFTIME=0;
18460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
18461 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
18462 if test ${gl_cv_header_wchar_h_correct_inline+y}
18464 printf %s "(cached) " >&6
18466 gl_cv_header_wchar_h_correct_inline=yes
18467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18468 /* end confdefs.h. */
18470 #define wcstod renamed_wcstod
18471 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18473 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18474 included before <wchar.h>. */
18475 #include <stddef.h>
18479 extern int zero (void);
18480 int main () { return zero(); }
18483 save_ac_compile="$ac_compile"
18484 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
18485 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18486 (eval $ac_compile) 2>&5
18488 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18489 test $ac_status = 0; }; then
18490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18491 /* end confdefs.h. */
18493 #define wcstod renamed_wcstod
18494 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18496 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18497 included before <wchar.h>. */
18498 #include <stddef.h>
18502 int zero (void) { return 0; }
18505 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
18506 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18507 (eval $ac_compile) 2>&5
18509 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18510 test $ac_status = 0; }; then
18511 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
18514 gl_cv_header_wchar_h_correct_inline=no
18518 ac_compile="$save_ac_compile"
18519 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
18522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
18523 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
18524 if test $gl_cv_header_wchar_h_correct_inline = no; then
18525 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
18526 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
18527 C99 mode. You have four options:
18528 - Add the flag -fgnu89-inline to CC and reconfigure, or
18529 - Fix your include files, using parts of
18530 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
18531 - Use a gcc version older than 4.3, or
18532 - Don't use the flags -std=c99 or -std=gnu99.
18533 Configuration aborted." "$LINENO" 5
18539 if test $ac_cv_header_crtdefs_h = yes; then
18547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t" >&5
18548 printf %s "checking for 64-bit time_t... " >&6; }
18549 if test ${gl_cv_type_time_t_64+y}
18551 printf %s "(cached) " >&6
18553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18554 /* end confdefs.h. */
18556 int verify_time_t_size[sizeof (time_t) >= 8 ? 1 : -1];
18566 if ac_fn_c_try_compile "$LINENO"
18568 gl_cv_type_time_t_64=yes
18570 gl_cv_type_time_t_64=no
18572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_64" >&5
18576 printf "%s\n" "$gl_cv_type_time_t_64" >&6; }
18577 if test $gl_cv_type_time_t_64 = no; then
18578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18579 /* end confdefs.h. */
18580 #ifdef _USE_32BIT_TIME_T
18587 if ac_fn_c_try_compile "$LINENO"
18589 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18590 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18591 as_fn_error $? "This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.
18592 See \`config.log' for more details" "$LINENO" 5; }
18594 # If TIME_T_32_BIT_OK is "no" (the default) and not cross-compiling
18595 # and 'touch' works with a large timestamp, then evidently 64-bit time_t
18596 # is desired and supported, so fail and ask the builder to fix the
18597 # problem. Otherwise, just warn the builder.
18598 if test "${TIME_T_32_BIT_OK-no}" = no \
18599 && test $cross_compiling = no \
18600 && TZ=UTC0 touch -t 210602070628.16 conftest.time 2>/dev/null; then
18601 rm -f conftest.time
18602 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18603 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18604 as_fn_error $? "This package requires a 64-bit 'time_t' type, which your system appears to support. You might try configuring with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'. To build with a 32-bit time_t anyway (not recommended), configure with 'TIME_T_32_BIT_OK=yes'.
18605 See \`config.log' for more details" "$LINENO" 5; }
18607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&5
18608 printf "%s\n" "$as_me: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&2;}
18612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18617 GL_COND_LIBTOOL_TRUE=
18618 GL_COND_LIBTOOL_FALSE='#'
18620 GL_COND_LIBTOOL_TRUE='#'
18621 GL_COND_LIBTOOL_FALSE=
18624 gl_cond_libtool=false
18637 gl_source_base='lib'
18640 if test $ac_cv_func_alloca_works = no; then
18644 # Define an additional variable used in the Makefile substitution.
18645 if test $ac_cv_working_alloca_h = yes; then
18646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
18647 printf %s "checking for alloca as a compiler built-in... " >&6; }
18648 if test ${gl_cv_rpl_alloca+y}
18650 printf %s "(cached) " >&6
18653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18654 /* end confdefs.h. */
18656 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
18661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18662 $EGREP "Need own alloca" >/dev/null 2>&1
18664 gl_cv_rpl_alloca=yes
18666 gl_cv_rpl_alloca=no
18672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
18673 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
18674 if test $gl_cv_rpl_alloca = yes; then
18676 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
18686 if test -n "$ALLOCA_H"; then
18687 GL_GENERATE_ALLOCA_H_TRUE=
18688 GL_GENERATE_ALLOCA_H_FALSE='#'
18690 GL_GENERATE_ALLOCA_H_TRUE='#'
18691 GL_GENERATE_ALLOCA_H_FALSE=
18703 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
18708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
18709 printf %s "checking for GNU libc compatible calloc... " >&6; }
18710 if test ${ac_cv_func_calloc_0_nonnull+y}
18712 printf %s "(cached) " >&6
18714 if test "$cross_compiling" = yes
18717 # Guess yes on glibc systems.
18718 *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
18719 # Guess yes on native Windows.
18720 mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
18721 # If we don't know, assume the worst.
18722 *) ac_cv_func_calloc_0_nonnull="guessing no" ;;
18726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18727 /* end confdefs.h. */
18728 $ac_includes_default
18733 char *p = calloc (0, 0);
18737 p = calloc ((size_t) -1 / 8 + 1, 8);
18747 if ac_fn_c_try_run "$LINENO"
18749 ac_cv_func_calloc_0_nonnull=yes
18751 ac_cv_func_calloc_0_nonnull=no
18753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18754 conftest.$ac_objext conftest.beam conftest.$ac_ext
18758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
18759 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
18760 case "$ac_cv_func_calloc_0_nonnull" in
18763 printf "%s\n" "#define HAVE_CALLOC_GNU 1" >>confdefs.h
18767 printf "%s\n" "#define HAVE_CALLOC_GNU 0" >>confdefs.h
18775 if test $REPLACE_CALLOC = 1; then
18784 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
18789 printf "%s\n" "#define GNULIB_CALLOC_GNU 1" >>confdefs.h
18795 if test $gl_cv_func_malloc_posix = yes; then
18797 printf "%s\n" "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
18803 if test $REPLACE_CALLOC = 1; then
18812 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
18820 GNULIB_CALLOC_POSIX=1
18826 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
18841 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
18847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
18848 printf %s "checking whether this system has an arbitrary file name length limit... " >&6; }
18849 if test ${gl_cv_have_arbitrary_file_name_length_limit+y}
18851 printf %s "(cached) " >&6
18853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18854 /* end confdefs.h. */
18856 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
18858 # include <unistd.h>
18860 #include <limits.h>
18861 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18862 # include <sys/param.h>
18864 #if !defined PATH_MAX && defined MAXPATHLEN
18865 # define PATH_MAX MAXPATHLEN
18869 # define PATH_MAX 1024
18871 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18873 # define PATH_MAX 260
18877 have_arbitrary_file_name_length_limit
18880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18881 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
18883 gl_cv_have_arbitrary_file_name_length_limit=yes
18885 gl_cv_have_arbitrary_file_name_length_limit=no
18890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
18891 printf "%s\n" "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
18893 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
18902 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
18909 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
18910 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
18912 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
18913 # programs in the package would end up linked with that potentially-shared
18914 # library, inducing unnecessary run-time overhead.
18917 gl_saved_libs=$LIBS
18918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18919 printf %s "checking for library containing clock_gettime... " >&6; }
18920 if test ${ac_cv_search_clock_gettime+y}
18922 printf %s "(cached) " >&6
18924 ac_func_search_save_LIBS=$LIBS
18925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18926 /* end confdefs.h. */
18928 /* Override any GCC internal prototype to avoid an error.
18929 Use char because int might match the return type of a GCC
18930 builtin and then its argument prototype would still apply. */
18934 char clock_gettime ();
18938 return clock_gettime ();
18943 for ac_lib in '' rt posix4
18945 if test -z "$ac_lib"; then
18946 ac_res="none required"
18949 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18951 if ac_fn_c_try_link "$LINENO"
18953 ac_cv_search_clock_gettime=$ac_res
18955 rm -f core conftest.err conftest.$ac_objext \
18957 if test ${ac_cv_search_clock_gettime+y}
18962 if test ${ac_cv_search_clock_gettime+y}
18966 ac_cv_search_clock_gettime=no
18968 rm conftest.$ac_ext
18969 LIBS=$ac_func_search_save_LIBS
18971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18972 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
18973 ac_res=$ac_cv_search_clock_gettime
18974 if test "$ac_res" != no
18976 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18977 test "$ac_cv_search_clock_gettime" = "none required" ||
18978 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
18981 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
18982 if test "x$ac_cv_func_clock_gettime" = xyes
18984 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
18987 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
18988 if test "x$ac_cv_func_clock_settime" = xyes
18990 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
18994 LIBS=$gl_saved_libs
18998 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
19005 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19014 if test $ac_cv_header_sys_socket_h != yes; then
19015 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19016 if test "x$ac_cv_header_winsock2_h" = xyes
19018 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19023 if test "$ac_cv_header_winsock2_h" = yes; then
19025 UNISTD_H_HAVE_WINSOCK2_H=1
19026 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19032 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
19037 if test $REPLACE_CLOSE = 0; then
19041 if test $ac_cv_func_fchdir = no; then
19045 if test $HAVE_FCHDIR = 0; then
19051 if test $REPLACE_CLOSE = 1; then
19060 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
19074 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
19081 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
19082 if test "x$ac_cv_func_closedir" = xyes
19084 printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
19088 if test $ac_cv_func_closedir = no; then
19095 if test $ac_cv_func_fchdir = no; then
19099 if test $HAVE_FCHDIR = 0; then
19100 if test $HAVE_CLOSEDIR = 1; then
19105 case $host_os,$HAVE_CLOSEDIR in
19107 REPLACE_CLOSEDIR=1;;
19110 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
19119 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
19133 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
19149 if test $gl_cv_have_include_next = yes; then
19150 gl_cv_next_dirent_h='<'dirent.h'>'
19152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
19153 printf %s "checking absolute name of <dirent.h>... " >&6; }
19154 if test ${gl_cv_next_dirent_h+y}
19156 printf %s "(cached) " >&6
19159 if test $ac_cv_header_dirent_h = yes; then
19164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19165 /* end confdefs.h. */
19166 #include <dirent.h>
19169 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19170 *) gl_absname_cpp="$ac_cpp" ;;
19175 gl_dirsep_regex='[/\\]'
19178 gl_dirsep_regex='\/'
19181 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19182 gl_header_literal_regex=`echo 'dirent.h' \
19183 | sed -e "$gl_make_literal_regex_sed"`
19184 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19185 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19191 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19192 sed -n "$gl_absolute_header_sed"`
19194 gl_header=$gl_cv_absolute_dirent_h
19195 gl_cv_next_dirent_h='"'$gl_header'"'
19197 gl_cv_next_dirent_h='<'dirent.h'>'
19202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
19203 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
19205 NEXT_DIRENT_H=$gl_cv_next_dirent_h
19207 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19208 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19209 gl_next_as_first_directive='<'dirent.h'>'
19211 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19212 gl_next_as_first_directive=$gl_cv_next_dirent_h
19214 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
19219 if test $ac_cv_header_dirent_h = yes; then
19233 printf "%s\n" "#define GNULIB_DIRENT_SAFER 1" >>confdefs.h
19241 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
19242 if test "x$ac_cv_func_dirfd" = xyes
19244 printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
19248 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
19249 #include <dirent.h>
19251 if test "x$ac_cv_have_decl_dirfd" = xyes
19258 printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
19260 if test $ac_cv_have_decl_dirfd = no; then
19264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
19265 printf %s "checking whether dirfd is a macro... " >&6; }
19266 if test ${gl_cv_func_dirfd_macro+y}
19268 printf %s "(cached) " >&6
19270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19271 /* end confdefs.h. */
19273 #include <sys/types.h>
19274 #include <dirent.h>
19276 dirent_header_defines_dirfd
19279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19280 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
19282 gl_cv_func_dirfd_macro=yes
19284 gl_cv_func_dirfd_macro=no
19289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
19290 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
19292 # Use the replacement if we have no function or macro with that name,
19293 # or if OS/2 kLIBC whose dirfd() does not work.
19294 # Replace only if the system declares dirfd already.
19295 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
19296 no,no,*,yes | *,*,os2*,yes)
19299 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
19303 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
19304 || test $REPLACE_DIRFD = 1; then
19313 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
19316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
19317 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
19318 if test ${gl_cv_sys_dir_fd_member_name+y}
19320 printf %s "(cached) " >&6
19323 dirfd_save_CFLAGS=$CFLAGS
19324 for ac_expr in d_fd dd_fd; do
19326 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
19327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19328 /* end confdefs.h. */
19330 #include <sys/types.h>
19331 #include <dirent.h>
19335 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
19340 if ac_fn_c_try_compile "$LINENO"
19345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19346 CFLAGS=$dirfd_save_CFLAGS
19347 test "$dir_fd_found" = yes && break
19349 test "$dir_fd_found" = yes || ac_expr=no_such_member
19351 gl_cv_sys_dir_fd_member_name=$ac_expr
19355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
19356 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
19357 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
19359 printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
19376 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
19386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
19387 printf %s "checking whether // is distinct from /... " >&6; }
19388 if test ${gl_cv_double_slash_root+y}
19390 printf %s "(cached) " >&6
19392 if test x"$cross_compiling" = xyes ; then
19393 # When cross-compiling, there is no way to tell whether // is special
19394 # short of a list of hosts. However, the only known hosts to date
19395 # that have a distinct // are Apollo DomainOS (too old to port to),
19396 # Cygwin, and z/OS. If anyone knows of another system for which // has
19397 # special semantics and is distinct from /, please report it to
19398 # <bug-gnulib@gnu.org>.
19400 *-cygwin | i370-ibm-openedition)
19401 gl_cv_double_slash_root=yes ;;
19403 # Be optimistic and assume that / and // are the same when we
19405 gl_cv_double_slash_root='unknown, assuming no' ;;
19408 set x `ls -di / // 2>/dev/null`
19409 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
19410 gl_cv_double_slash_root=no
19412 gl_cv_double_slash_root=yes
19416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
19417 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
19418 if test "$gl_cv_double_slash_root" = yes; then
19420 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
19428 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19436 if test $ac_cv_func_fchdir = no; then
19440 if test $HAVE_FCHDIR = 0; then
19444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
19445 printf %s "checking whether dup works... " >&6; }
19446 if test ${gl_cv_func_dup_works+y}
19448 printf %s "(cached) " >&6
19450 if test "$cross_compiling" = yes
19453 # Guess no on native Windows.
19454 mingw*) gl_cv_func_dup_works="guessing no" ;;
19455 *) gl_cv_func_dup_works="guessing yes" ;;
19459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19460 /* end confdefs.h. */
19461 #include <unistd.h>
19467 /* On OS/2 kLIBC, dup does not work on a directory fd. */
19468 int fd = open (".", O_RDONLY);
19469 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
19476 if ac_fn_c_try_run "$LINENO"
19478 gl_cv_func_dup_works=yes
19480 gl_cv_func_dup_works=no
19482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19483 conftest.$ac_objext conftest.beam conftest.$ac_ext
19488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
19489 printf "%s\n" "$gl_cv_func_dup_works" >&6; }
19490 case "$gl_cv_func_dup_works" in
19497 if test $REPLACE_DUP = 1; then
19506 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
19521 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
19530 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
19533 if test $HAVE_DUP2 = 1; then
19534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19535 printf %s "checking whether dup2 works... " >&6; }
19536 if test ${gl_cv_func_dup2_works+y}
19538 printf %s "(cached) " >&6
19540 if test "$cross_compiling" = yes
19543 mingw*) # on this platform, dup2 always returns 0 for success
19544 gl_cv_func_dup2_works="guessing no" ;;
19545 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19546 gl_cv_func_dup2_works="guessing no" ;;
19548 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
19550 gl_cv_func_dup2_works="guessing no" ;;
19551 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19552 gl_cv_func_dup2_works="guessing no" ;;
19553 *-android*) # implemented using dup3(), which fails if oldfd == newfd
19554 gl_cv_func_dup2_works="guessing no" ;;
19555 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
19556 gl_cv_func_dup2_works="guessing no" ;;
19557 *) gl_cv_func_dup2_works="guessing yes" ;;
19560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19561 /* end confdefs.h. */
19565 #include <limits.h>
19566 #include <sys/resource.h>
19567 #include <unistd.h>
19568 #ifndef RLIM_SAVED_CUR
19569 # define RLIM_SAVED_CUR RLIM_INFINITY
19571 #ifndef RLIM_SAVED_MAX
19572 # define RLIM_SAVED_MAX RLIM_INFINITY
19579 int bad_fd = INT_MAX;
19580 struct rlimit rlim;
19581 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19582 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19583 && rlim.rlim_cur != RLIM_INFINITY
19584 && rlim.rlim_cur != RLIM_SAVED_MAX
19585 && rlim.rlim_cur != RLIM_SAVED_CUR)
19586 bad_fd = rlim.rlim_cur;
19588 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19591 if (dup2 (1, 1) != 1)
19594 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19598 if (dup2 (0, 0) != -1)
19600 /* Many gnulib modules require POSIX conformance of EBADF. */
19601 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
19603 /* Flush out some cygwin core dumps. */
19604 if (dup2 (2, -1) != -1 || errno != EBADF)
19608 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
19610 int fd = open (".", O_RDONLY);
19613 else if (dup2 (fd, fd + 1) == -1)
19624 if ac_fn_c_try_run "$LINENO"
19626 gl_cv_func_dup2_works=yes
19628 gl_cv_func_dup2_works=no
19630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19631 conftest.$ac_objext conftest.beam conftest.$ac_ext
19636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19637 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
19638 case "$gl_cv_func_dup2_works" in
19642 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
19643 if test "x$ac_cv_func_setdtablesize" = xyes
19645 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
19656 if test $ac_cv_func_fchdir = no; then
19660 if test $HAVE_FCHDIR = 0; then
19661 if test $HAVE_DUP2 = 1; then
19667 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
19676 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
19691 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
19697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
19698 printf %s "checking for error_at_line... " >&6; }
19699 if test ${ac_cv_lib_error_at_line+y}
19701 printf %s "(cached) " >&6
19703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19704 /* end confdefs.h. */
19709 error_at_line (0, 0, "", 0, "an error occurred");
19714 if ac_fn_c_try_link "$LINENO"
19716 ac_cv_lib_error_at_line=yes
19718 ac_cv_lib_error_at_line=no
19720 rm -f core conftest.err conftest.$ac_objext \
19721 conftest$ac_exeext conftest.$ac_ext
19723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
19724 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
19726 if test $ac_cv_lib_error_at_line = no; then
19735 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
19744 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
19748 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
19756 if test $ac_cv_have_decl_fchdir = no; then
19761 if test $HAVE_FCHDIR = 0; then
19770 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
19774 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
19776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
19777 printf %s "checking whether open can visit directories... " >&6; }
19778 if test ${gl_cv_func_open_directory_works+y}
19780 printf %s "(cached) " >&6
19782 if test "$cross_compiling" = yes
19785 # Guess yes on glibc systems.
19786 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
19787 # Guess no on native Windows.
19788 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
19789 # If we don't know, assume the worst.
19790 *) gl_cv_func_open_directory_works="guessing no" ;;
19794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19795 /* end confdefs.h. */
19801 return open(".", O_RDONLY) < 0;
19806 if ac_fn_c_try_run "$LINENO"
19808 gl_cv_func_open_directory_works=yes
19810 gl_cv_func_open_directory_works=no
19812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19813 conftest.$ac_objext conftest.beam conftest.$ac_ext
19817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
19818 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
19819 case "$gl_cv_func_open_directory_works" in
19823 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
19840 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
19850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19851 printf %s "checking whether fflush works on input streams... " >&6; }
19852 if test ${gl_cv_func_fflush_stdin+y}
19854 printf %s "(cached) " >&6
19856 echo hello world > conftest.txt
19857 if test "$cross_compiling" = yes
19860 # Guess no on native Windows.
19861 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
19862 *) gl_cv_func_fflush_stdin=cross ;;
19866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19867 /* end confdefs.h. */
19871 # include <unistd.h>
19872 #else /* on Windows with MSVC */
19879 FILE *f = fopen ("conftest.txt", "r");
19886 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19887 { fclose (f); return 2; }
19888 /* For deterministic results, ensure f read a bigger buffer. */
19889 if (lseek (fd, 0, SEEK_CUR) == 5)
19890 { fclose (f); return 3; }
19891 /* POSIX requires fflush-fseek to set file offset of fd. This fails
19892 on BSD systems and on mingw. */
19893 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19894 { fclose (f); return 4; }
19895 if (lseek (fd, 0, SEEK_CUR) != 5)
19896 { fclose (f); return 5; }
19897 /* Verify behaviour of fflush after ungetc. See
19898 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
19899 /* Verify behaviour of fflush after a backup ungetc. This fails on
19904 if (fgetc (f) != c)
19905 { fclose (f); return 6; }
19906 /* Verify behaviour of fflush after a non-backup ungetc. This fails
19907 on glibc 2.8 and on BSD systems. */
19911 if (fgetc (f) != c)
19912 { fclose (f); return 7; }
19920 if ac_fn_c_try_run "$LINENO"
19922 gl_cv_func_fflush_stdin=yes
19924 gl_cv_func_fflush_stdin=no
19926 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19927 conftest.$ac_objext conftest.beam conftest.$ac_ext
19933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19934 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
19935 case "$gl_cv_func_fflush_stdin" in
19936 *yes) gl_func_fflush_stdin=1 ;;
19937 *no) gl_func_fflush_stdin=0 ;;
19938 *) gl_func_fflush_stdin='(-1)' ;;
19941 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
19944 case "$gl_cv_func_fflush_stdin" in
19946 *) REPLACE_FCLOSE=1 ;;
19950 if test $REPLACE_CLOSE = 1; then
19955 openedition) REPLACE_FCLOSE=1 ;;
19958 if test $REPLACE_FCLOSE = 1; then
19967 gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
19981 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
19990 if test $ac_cv_func_fcntl = no; then
19994 if test $ac_cv_func_fcntl = no; then
20001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
20002 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
20003 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
20005 printf %s "(cached) " >&6
20007 if test "$cross_compiling" = yes
20010 aix* | cygwin* | haiku*)
20011 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
20012 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
20015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20016 /* end confdefs.h. */
20019 #include <limits.h>
20020 #include <sys/resource.h>
20021 #include <unistd.h>
20022 #ifndef RLIM_SAVED_CUR
20023 # define RLIM_SAVED_CUR RLIM_INFINITY
20025 #ifndef RLIM_SAVED_MAX
20026 # define RLIM_SAVED_MAX RLIM_INFINITY
20033 int bad_fd = INT_MAX;
20034 struct rlimit rlim;
20035 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
20036 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
20037 && rlim.rlim_cur != RLIM_INFINITY
20038 && rlim.rlim_cur != RLIM_SAVED_MAX
20039 && rlim.rlim_cur != RLIM_SAVED_CUR)
20040 bad_fd = rlim.rlim_cur;
20041 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
20042 if (errno != EINVAL) result |= 2;
20043 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
20044 if (errno != EINVAL) result |= 8;
20045 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
20048 fd = open (".", O_RDONLY);
20051 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
20061 if ac_fn_c_try_run "$LINENO"
20063 gl_cv_func_fcntl_f_dupfd_works=yes
20065 gl_cv_func_fcntl_f_dupfd_works=no
20067 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20068 conftest.$ac_objext conftest.beam conftest.$ac_ext
20072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
20073 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
20074 case $gl_cv_func_fcntl_f_dupfd_works in
20079 if test $ac_cv_func_fcntl = no; then
20086 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
20090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
20091 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
20092 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
20094 printf %s "(cached) " >&6
20096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20097 /* end confdefs.h. */
20100 #ifndef F_DUPFD_CLOEXEC
20112 if ac_fn_c_try_compile "$LINENO"
20114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20115 /* end confdefs.h. */
20118 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
20119 it to support the semantics on older kernels that failed with EINVAL. */
20131 if ac_fn_c_try_compile "$LINENO"
20133 gl_cv_func_fcntl_f_dupfd_cloexec=yes
20135 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
20137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20139 gl_cv_func_fcntl_f_dupfd_cloexec=no
20141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
20144 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
20145 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
20149 if test $ac_cv_func_fcntl = no; then
20161 if test $ac_cv_func_fchdir = no; then
20165 if test $HAVE_FCHDIR = 0; then
20169 if test $ac_cv_func_fcntl = no; then
20178 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
20187 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20201 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
20216 if test $gl_cv_have_include_next = yes; then
20217 gl_cv_next_fcntl_h='<'fcntl.h'>'
20219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20220 printf %s "checking absolute name of <fcntl.h>... " >&6; }
20221 if test ${gl_cv_next_fcntl_h+y}
20223 printf %s "(cached) " >&6
20228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20229 /* end confdefs.h. */
20233 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20234 *) gl_absname_cpp="$ac_cpp" ;;
20239 gl_dirsep_regex='[/\\]'
20242 gl_dirsep_regex='\/'
20245 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20246 gl_header_literal_regex=`echo 'fcntl.h' \
20247 | sed -e "$gl_make_literal_regex_sed"`
20248 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20249 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20255 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20256 sed -n "$gl_absolute_header_sed"`
20258 gl_header=$gl_cv_absolute_fcntl_h
20259 gl_cv_next_fcntl_h='"'$gl_header'"'
20263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20264 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
20266 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20268 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20269 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20270 gl_next_as_first_directive='<'fcntl.h'>'
20272 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20273 gl_next_as_first_directive=$gl_cv_next_fcntl_h
20275 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20292 printf "%s\n" "#define GNULIB_FCNTL_SAFER 1" >>confdefs.h
20297 printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
20307 if test $ac_cv_have_decl_fdatasync = no; then
20308 HAVE_DECL_FDATASYNC=0
20309 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
20310 if test "x$ac_cv_func_fdatasync" = xyes
20312 printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
20316 if test $ac_cv_func_fdatasync = no; then
20320 gl_saved_libs=$LIBS
20321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
20322 printf %s "checking for library containing fdatasync... " >&6; }
20323 if test ${ac_cv_search_fdatasync+y}
20325 printf %s "(cached) " >&6
20327 ac_func_search_save_LIBS=$LIBS
20328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20329 /* end confdefs.h. */
20331 /* Override any GCC internal prototype to avoid an error.
20332 Use char because int might match the return type of a GCC
20333 builtin and then its argument prototype would still apply. */
20341 return fdatasync ();
20346 for ac_lib in '' rt posix4
20348 if test -z "$ac_lib"; then
20349 ac_res="none required"
20352 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20354 if ac_fn_c_try_link "$LINENO"
20356 ac_cv_search_fdatasync=$ac_res
20358 rm -f core conftest.err conftest.$ac_objext \
20360 if test ${ac_cv_search_fdatasync+y}
20365 if test ${ac_cv_search_fdatasync+y}
20369 ac_cv_search_fdatasync=no
20371 rm conftest.$ac_ext
20372 LIBS=$ac_func_search_save_LIBS
20374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
20375 printf "%s\n" "$ac_cv_search_fdatasync" >&6; }
20376 ac_res=$ac_cv_search_fdatasync
20377 if test "$ac_res" != no
20379 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20380 test "$ac_cv_search_fdatasync" = "none required" ||
20381 LIB_FDATASYNC=$ac_cv_search_fdatasync
20384 LIBS=$gl_saved_libs
20387 if test $HAVE_FDATASYNC = 0; then
20396 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
20410 printf "%s\n" "#define GNULIB_TEST_FDATASYNC 1" >>confdefs.h
20419 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
20420 #include <dirent.h>
20423 if test "x$ac_cv_have_decl_fdopendir" = xyes
20430 printf "%s\n" "#define HAVE_DECL_FDOPENDIR $ac_have_decl" >>confdefs.h
20431 if test $ac_have_decl = 1
20435 HAVE_DECL_FDOPENDIR=0
20439 if test $ac_cv_func_fdopendir = no; then
20442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
20443 printf %s "checking whether fdopendir works... " >&6; }
20444 if test ${gl_cv_func_fdopendir_works+y}
20446 printf %s "(cached) " >&6
20448 if test "$cross_compiling" = yes
20451 # Guess yes on glibc systems.
20452 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
20453 # If we don't know, assume the worst.
20454 *) gl_cv_func_fdopendir_works="guessing no" ;;
20458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20459 /* end confdefs.h. */
20461 #include <dirent.h>
20463 #include <unistd.h>
20464 #if !HAVE_DECL_FDOPENDIR
20466 # ifdef __cplusplus
20469 DIR *fdopendir (int);
20476 int fd = open ("conftest.c", O_RDONLY);
20477 if (fd < 0) result |= 1;
20478 if (fdopendir (fd)) result |= 2;
20479 if (close (fd)) result |= 4;
20485 if ac_fn_c_try_run "$LINENO"
20487 gl_cv_func_fdopendir_works=yes
20489 gl_cv_func_fdopendir_works=no
20491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20492 conftest.$ac_objext conftest.beam conftest.$ac_ext
20496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
20497 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
20498 case "$gl_cv_func_fdopendir_works" in
20501 REPLACE_FDOPENDIR=1
20506 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
20515 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
20529 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
20535 printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h
20542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20543 printf %s "checking whether fflush works on input streams... " >&6; }
20544 if test ${gl_cv_func_fflush_stdin+y}
20546 printf %s "(cached) " >&6
20548 echo hello world > conftest.txt
20549 if test "$cross_compiling" = yes
20552 # Guess no on native Windows.
20553 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
20554 *) gl_cv_func_fflush_stdin=cross ;;
20558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20559 /* end confdefs.h. */
20563 # include <unistd.h>
20564 #else /* on Windows with MSVC */
20571 FILE *f = fopen ("conftest.txt", "r");
20578 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20579 { fclose (f); return 2; }
20580 /* For deterministic results, ensure f read a bigger buffer. */
20581 if (lseek (fd, 0, SEEK_CUR) == 5)
20582 { fclose (f); return 3; }
20583 /* POSIX requires fflush-fseek to set file offset of fd. This fails
20584 on BSD systems and on mingw. */
20585 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20586 { fclose (f); return 4; }
20587 if (lseek (fd, 0, SEEK_CUR) != 5)
20588 { fclose (f); return 5; }
20589 /* Verify behaviour of fflush after ungetc. See
20590 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
20591 /* Verify behaviour of fflush after a backup ungetc. This fails on
20596 if (fgetc (f) != c)
20597 { fclose (f); return 6; }
20598 /* Verify behaviour of fflush after a non-backup ungetc. This fails
20599 on glibc 2.8 and on BSD systems. */
20603 if (fgetc (f) != c)
20604 { fclose (f); return 7; }
20612 if ac_fn_c_try_run "$LINENO"
20614 gl_cv_func_fflush_stdin=yes
20616 gl_cv_func_fflush_stdin=no
20618 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20619 conftest.$ac_objext conftest.beam conftest.$ac_ext
20625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20626 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
20627 case "$gl_cv_func_fflush_stdin" in
20628 *yes) gl_func_fflush_stdin=1 ;;
20629 *no) gl_func_fflush_stdin=0 ;;
20630 *) gl_func_fflush_stdin='(-1)' ;;
20633 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
20636 case "$gl_cv_func_fflush_stdin" in
20638 *) REPLACE_FFLUSH=1 ;;
20641 if test $REPLACE_FFLUSH = 1; then
20650 gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
20656 printf "%s\n" "#define GNULIB_FFLUSH 1" >>confdefs.h
20670 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
20681 REPLACE_FLOAT_LDBL=0
20683 aix* | beos* | openbsd* | mirbsd* | irix*)
20686 freebsd* | dragonfly*)
20687 case "$host_cpu" in
20692 # On x86_64 systems, the C compiler may still be generating
20694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20695 /* end confdefs.h. */
20696 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
20703 if ac_fn_c_try_compile "$LINENO"
20709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20714 case "$host_cpu" in
20722 aix* | freebsd* | dragonfly* | linux*)
20723 if test -n "$FLOAT_H"; then
20724 REPLACE_FLOAT_LDBL=1
20730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20731 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
20732 if test ${gl_cv_func_itold_works+y}
20734 printf %s "(cached) " >&6
20737 if test "$cross_compiling" = yes
20741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20742 /* end confdefs.h. */
20743 #if defined __LP64__ || defined __arch64__
20750 if ac_fn_c_try_compile "$LINENO"
20752 gl_cv_func_itold_works="guessing no"
20754 gl_cv_func_itold_works="guessing yes"
20756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20758 # Guess yes on native Windows.
20759 mingw*) gl_cv_func_itold_works="guessing yes" ;;
20760 *) gl_cv_func_itold_works="guessing yes" ;;
20764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20765 /* end confdefs.h. */
20768 volatile long double ld;
20777 if ac_fn_c_try_run "$LINENO"
20779 gl_cv_func_itold_works=yes
20781 gl_cv_func_itold_works=no
20783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20784 conftest.$ac_objext conftest.beam conftest.$ac_ext
20789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20790 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
20791 case "$gl_cv_func_itold_works" in
20798 if test -n "$FLOAT_H"; then
20807 if test $gl_cv_have_include_next = yes; then
20808 gl_cv_next_float_h='<'float.h'>'
20810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20811 printf %s "checking absolute name of <float.h>... " >&6; }
20812 if test ${gl_cv_next_float_h+y}
20814 printf %s "(cached) " >&6
20819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20820 /* end confdefs.h. */
20824 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20825 *) gl_absname_cpp="$ac_cpp" ;;
20830 gl_dirsep_regex='[/\\]'
20833 gl_dirsep_regex='\/'
20836 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20837 gl_header_literal_regex=`echo 'float.h' \
20838 | sed -e "$gl_make_literal_regex_sed"`
20839 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20840 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20846 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20847 sed -n "$gl_absolute_header_sed"`
20849 gl_header=$gl_cv_absolute_float_h
20850 gl_cv_next_float_h='"'$gl_header'"'
20854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20855 printf "%s\n" "$gl_cv_next_float_h" >&6; }
20857 NEXT_FLOAT_H=$gl_cv_next_float_h
20859 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20860 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20861 gl_next_as_first_directive='<'float.h'>'
20863 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20864 gl_next_as_first_directive=$gl_cv_next_float_h
20866 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
20873 if test -n "$FLOAT_H"; then
20874 GL_GENERATE_FLOAT_H_TRUE=
20875 GL_GENERATE_FLOAT_H_FALSE='#'
20877 GL_GENERATE_FLOAT_H_TRUE='#'
20878 GL_GENERATE_FLOAT_H_FALSE=
20883 if test $REPLACE_FLOAT_LDBL = 1; then
20892 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
20895 if test $REPLACE_ITOLD = 1; then
20904 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
20922 gl_cv_func_fprintf_posix=no
20923 case "$gl_cv_func_printf_sizes_c99" in
20925 case "$gl_cv_func_printf_long_double" in
20927 case "$gl_cv_func_printf_infinite" in
20929 case "$gl_cv_func_printf_infinite_long_double" in
20931 case "$gl_cv_func_printf_directive_a" in
20933 case "$gl_cv_func_printf_directive_f" in
20935 case "$gl_cv_func_printf_directive_n" in
20937 case "$gl_cv_func_printf_directive_ls" in
20939 case "$gl_cv_func_printf_positions" in
20941 case "$gl_cv_func_printf_flag_grouping" in
20943 case "$gl_cv_func_printf_flag_leftadjust" in
20945 case "$gl_cv_func_printf_flag_zero" in
20947 case "$gl_cv_func_printf_precision" in
20949 case "$gl_cv_func_printf_enomem" in
20951 # fprintf exists and is
20952 # already POSIX compliant.
20953 gl_cv_func_fprintf_posix=yes
20982 if test $gl_cv_func_fprintf_posix = no; then
20986 case "$gl_cv_func_printf_infinite" in
20991 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
20999 case "$gl_cv_func_printf_long_double" in
21001 case "$gl_cv_func_printf_infinite_long_double" in
21006 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
21015 case "$gl_cv_func_printf_directive_a" in
21020 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
21022 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
21023 if test "x$ac_cv_func_nl_langinfo" = xyes
21025 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
21034 case "$gl_cv_func_printf_directive_f" in
21039 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
21046 case "$gl_cv_func_printf_directive_ls" in
21051 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
21058 case "$gl_cv_func_printf_flag_grouping" in
21063 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
21070 case "$gl_cv_func_printf_flag_leftadjust" in
21075 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
21082 case "$gl_cv_func_printf_flag_zero" in
21087 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
21094 case "$gl_cv_func_printf_precision" in
21099 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
21102 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
21105 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
21112 case "$gl_cv_func_printf_enomem" in
21117 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
21120 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
21123 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
21138 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
21148 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
21158 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
21168 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
21170 if test $ac_cv_func_vasnprintf = yes; then
21172 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
21186 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
21187 if test "x$ac_cv_type_ptrdiff_t" = xyes
21192 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
21213 gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
21217 printf "%s\n" "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
21228 GNULIB_FPRINTF_POSIX=1
21234 printf "%s\n" "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
21242 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
21244 if test "x$ac_cv_have_decl_fpurge" = xyes
21251 printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
21253 if test "x$ac_cv_func_fpurge" = xyes; then
21255 # Detect BSD bug. Only cygwin 1.7 is known to be immune.
21256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
21257 printf %s "checking whether fpurge works... " >&6; }
21258 if test ${gl_cv_func_fpurge_works+y}
21260 printf %s "(cached) " >&6
21262 if test "$cross_compiling" = yes
21264 gl_cv_func_fpurge_works='guessing no'
21266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21267 /* end confdefs.h. */
21273 FILE *f = fopen ("conftest.txt", "w+");
21276 if (fputc ('a', f) != 'a')
21277 { fclose (f); return 2; }
21279 if (fgetc (f) != 'a')
21280 { fclose (f); return 3; }
21281 if (fgetc (f) != EOF)
21282 { fclose (f); return 4; }
21283 if (fpurge (f) != 0)
21284 { fclose (f); return 5; }
21285 if (putc ('b', f) != 'b')
21286 { fclose (f); return 6; }
21287 if (fclose (f) != 0)
21289 if ((f = fopen ("conftest.txt", "r")) == NULL)
21291 if (fgetc (f) != 'a')
21292 { fclose (f); return 9; }
21293 if (fgetc (f) != 'b')
21294 { fclose (f); return 10; }
21295 if (fgetc (f) != EOF)
21296 { fclose (f); return 11; }
21297 if (fclose (f) != 0)
21299 if (remove ("conftest.txt") != 0)
21307 if ac_fn_c_try_run "$LINENO"
21309 gl_cv_func_fpurge_works=yes
21311 gl_cv_func_fpurge_works=no
21313 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21314 conftest.$ac_objext conftest.beam conftest.$ac_ext
21318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
21319 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
21320 if test "x$gl_cv_func_fpurge_works" != xyes; then
21326 if test "x$ac_cv_have_decl_fpurge" = xno; then
21330 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
21339 gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
21353 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
21363 if test $gl_cv_func_frexp_no_libm = yes; then
21367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
21368 printf %s "checking whether frexp works... " >&6; }
21369 if test ${gl_cv_func_frexp_works+y}
21371 printf %s "(cached) " >&6
21374 if test "$cross_compiling" = yes
21377 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
21378 mingw*) # Guess yes with MSVC, no with mingw.
21379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21380 /* end confdefs.h. */
21387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21388 $EGREP "Good" >/dev/null 2>&1
21390 gl_cv_func_frexp_works="guessing yes"
21392 gl_cv_func_frexp_works="guessing no"
21397 *) gl_cv_func_frexp_works="guessing yes" ;;
21401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21402 /* end confdefs.h. */
21406 #include <string.h>
21407 #if HAVE_DECL_ALARM
21408 # include <signal.h>
21409 # include <unistd.h>
21411 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
21412 ICC 10.0 has a bug when optimizing the expression -zero.
21413 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
21414 to PowerPC on Mac OS X 10.5. */
21415 #if defined __hpux || defined __sgi || defined __ICC
21417 compute_minus_zero (void)
21419 return -DBL_MIN * DBL_MIN;
21421 # define minus_zero compute_minus_zero ()
21423 double minus_zero = -0.0;
21431 #if HAVE_DECL_ALARM
21432 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
21433 number. Let the test fail in this case. */
21434 signal (SIGALRM, SIG_DFL);
21437 /* Test on denormalized numbers. */
21438 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
21443 double y = frexp (x, &exp);
21444 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
21445 On NetBSD: y = 0.75. Correct: y = 0.5. */
21449 /* Test on infinite numbers. */
21453 double y = frexp (x, &exp);
21457 /* Test on negative zero. */
21461 double y = frexp (x, &exp);
21462 if (memcmp (&y, &x, sizeof x))
21468 if ac_fn_c_try_run "$LINENO"
21470 gl_cv_func_frexp_works=yes
21472 gl_cv_func_frexp_works=no
21474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21475 conftest.$ac_objext conftest.beam conftest.$ac_ext
21480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
21481 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
21483 case "$gl_cv_func_frexp_works" in
21484 *yes) gl_func_frexp_no_libm=yes ;;
21485 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
21488 gl_func_frexp_no_libm=no
21491 if test $gl_func_frexp_no_libm = yes; then
21493 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
21497 if test $gl_func_frexp_no_libm != yes; then
21506 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
21520 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
21527 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
21529 if test "x$ac_cv_have_decl_frexpl" = xyes
21536 if test $HAVE_DECL_FREXPL = 1; then
21538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
21539 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
21540 if test ${gl_cv_func_frexpl_no_libm+y}
21542 printf %s "(cached) " >&6
21545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21546 /* end confdefs.h. */
21552 int e; return frexpl (x, &e) > 0;
21557 if ac_fn_c_try_link "$LINENO"
21559 gl_cv_func_frexpl_no_libm=yes
21561 gl_cv_func_frexpl_no_libm=no
21563 rm -f core conftest.err conftest.$ac_objext \
21564 conftest$ac_exeext conftest.$ac_ext
21567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
21568 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
21570 if test $gl_cv_func_frexpl_no_libm = yes; then
21573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
21574 printf %s "checking whether frexpl works... " >&6; }
21575 if test ${gl_cv_func_frexpl_works+y}
21577 printf %s "(cached) " >&6
21580 if test "$cross_compiling" = yes
21584 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
21585 gl_cv_func_frexpl_works="guessing no";;
21586 *) gl_cv_func_frexpl_works="guessing yes";;
21590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21591 /* end confdefs.h. */
21595 /* Override the values of <float.h>, like done in float.in.h. */
21596 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
21597 # undef LDBL_MIN_EXP
21598 # define LDBL_MIN_EXP (-16381)
21600 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
21601 # undef LDBL_MIN_EXP
21602 # define LDBL_MIN_EXP (-16381)
21604 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
21605 # undef LDBL_MIN_EXP
21606 # define LDBL_MIN_EXP DBL_MIN_EXP
21608 #if defined __sgi && (LDBL_MANT_DIG >= 106)
21609 # if defined __GNUC__
21610 # undef LDBL_MIN_EXP
21611 # define LDBL_MIN_EXP DBL_MIN_EXP
21618 long double frexpl (long double, int *);
21622 volatile long double x;
21623 /* Test on finite numbers that fails on AIX 5.1. */
21631 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
21632 function returns an invalid (incorrectly normalized) value: it returns
21633 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
21634 but the correct result is
21635 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
21639 long double y = frexpl (x, &exp);
21640 if (!(exp == 1 && y == 0.505L))
21643 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
21644 LDBL_MAX_EXP = 16384.
21645 In the loop end test, we test x against Infinity, rather than comparing
21646 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
21649 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
21660 /* Test on denormalized numbers. */
21663 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
21668 long double y = frexpl (x, &exp);
21669 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
21670 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
21671 if (exp != LDBL_MIN_EXP - 1)
21675 /* Test on infinite numbers. */
21679 long double y = frexpl (x, &exp);
21686 if ac_fn_c_try_run "$LINENO"
21688 gl_cv_func_frexpl_works=yes
21690 gl_cv_func_frexpl_works=no
21692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21693 conftest.$ac_objext conftest.beam conftest.$ac_ext
21698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
21699 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
21701 case "$gl_cv_func_frexpl_works" in
21702 *yes) gl_func_frexpl_no_libm=yes ;;
21703 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
21706 gl_func_frexpl_no_libm=no
21709 if test $gl_func_frexpl_no_libm = yes; then
21711 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
21716 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
21725 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
21739 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
21746 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
21750 if test $REPLACE_FSEEK = 1; then
21759 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
21773 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
21785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
21786 printf %s "checking for fseeko... " >&6; }
21787 if test ${gl_cv_func_fseeko+y}
21789 printf %s "(cached) " >&6
21792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21793 /* end confdefs.h. */
21799 fseeko (stdin, 0, 0);
21804 if ac_fn_c_try_link "$LINENO"
21806 gl_cv_func_fseeko=yes
21808 gl_cv_func_fseeko=no
21810 rm -f core conftest.err conftest.$ac_objext \
21811 conftest$ac_exeext conftest.$ac_ext
21814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
21815 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
21818 if test $ac_cv_have_decl_fseeko = no; then
21822 if test $gl_cv_func_fseeko = no; then
21825 if test $WINDOWS_64_BIT_OFF_T = 1; then
21828 if test $gl_cv_var_stdin_large_offset = no; then
21834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
21835 printf %s "checking whether fflush works on input streams... " >&6; }
21836 if test ${gl_cv_func_fflush_stdin+y}
21838 printf %s "(cached) " >&6
21840 echo hello world > conftest.txt
21841 if test "$cross_compiling" = yes
21844 # Guess no on native Windows.
21845 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
21846 *) gl_cv_func_fflush_stdin=cross ;;
21850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21851 /* end confdefs.h. */
21855 # include <unistd.h>
21856 #else /* on Windows with MSVC */
21863 FILE *f = fopen ("conftest.txt", "r");
21870 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21871 { fclose (f); return 2; }
21872 /* For deterministic results, ensure f read a bigger buffer. */
21873 if (lseek (fd, 0, SEEK_CUR) == 5)
21874 { fclose (f); return 3; }
21875 /* POSIX requires fflush-fseek to set file offset of fd. This fails
21876 on BSD systems and on mingw. */
21877 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21878 { fclose (f); return 4; }
21879 if (lseek (fd, 0, SEEK_CUR) != 5)
21880 { fclose (f); return 5; }
21881 /* Verify behaviour of fflush after ungetc. See
21882 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
21883 /* Verify behaviour of fflush after a backup ungetc. This fails on
21888 if (fgetc (f) != c)
21889 { fclose (f); return 6; }
21890 /* Verify behaviour of fflush after a non-backup ungetc. This fails
21891 on glibc 2.8 and on BSD systems. */
21895 if (fgetc (f) != c)
21896 { fclose (f); return 7; }
21904 if ac_fn_c_try_run "$LINENO"
21906 gl_cv_func_fflush_stdin=yes
21908 gl_cv_func_fflush_stdin=no
21910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21911 conftest.$ac_objext conftest.beam conftest.$ac_ext
21917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21918 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
21919 case "$gl_cv_func_fflush_stdin" in
21920 *yes) gl_func_fflush_stdin=1 ;;
21921 *no) gl_func_fflush_stdin=0 ;;
21922 *) gl_func_fflush_stdin='(-1)' ;;
21925 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
21928 case "$gl_cv_func_fflush_stdin" in
21930 *) REPLACE_FSEEKO=1 ;;
21935 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
21944 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
21947 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
21948 if test "x$ac_cv_func__fseeki64" = xyes
21950 printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
21967 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
21974 if test $ac_cv_func___fseterr = no; then
21983 gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
22000 if test $ac_cv_func_fchdir = no; then
22004 if test $HAVE_FCHDIR = 0; then
22005 case "$gl_cv_func_open_directory_works" in
22014 if test $REPLACE_FSTAT = 1; then
22023 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
22035 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
22055 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
22066 if test $ac_cv_func_fstatat = no; then
22069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
22070 printf %s "checking whether fstatat (..., 0) works... " >&6; }
22071 if test ${gl_cv_func_fstatat_zero_flag+y}
22073 printf %s "(cached) " >&6
22075 if test "$cross_compiling" = yes
22078 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
22079 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
22083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22084 /* end confdefs.h. */
22087 #include <sys/stat.h>
22092 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
22096 if ac_fn_c_try_run "$LINENO"
22098 gl_cv_func_fstatat_zero_flag=yes
22100 gl_cv_func_fstatat_zero_flag=no
22102 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22103 conftest.$ac_objext conftest.beam conftest.$ac_ext
22108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
22109 printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
22111 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
22113 *) REPLACE_FSTATAT=1 ;;
22118 REPLACE_FSTATAT=1 ;;
22121 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
22124 printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
22130 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
22139 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
22153 printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
22160 if test $ac_cv_func_fsync = no; then
22164 if test $HAVE_FSYNC = 0; then
22173 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
22188 printf "%s\n" "#define GNULIB_TEST_FSYNC 1" >>confdefs.h
22195 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22199 if test $REPLACE_FTELL = 1; then
22208 gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
22222 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
22235 if test $ac_cv_have_decl_ftello = no; then
22239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
22240 printf %s "checking for ftello... " >&6; }
22241 if test ${gl_cv_func_ftello+y}
22243 printf %s "(cached) " >&6
22246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22247 /* end confdefs.h. */
22257 if ac_fn_c_try_link "$LINENO"
22259 gl_cv_func_ftello=yes
22261 gl_cv_func_ftello=no
22263 rm -f core conftest.err conftest.$ac_objext \
22264 conftest$ac_exeext conftest.$ac_ext
22267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
22268 printf "%s\n" "$gl_cv_func_ftello" >&6; }
22269 if test $gl_cv_func_ftello = no; then
22272 if test $WINDOWS_64_BIT_OFF_T = 1; then
22275 if test $gl_cv_var_stdin_large_offset = no; then
22278 if test $REPLACE_FTELLO = 0; then
22280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
22281 printf %s "checking whether ftello works... " >&6; }
22282 if test ${gl_cv_func_ftello_works+y}
22284 printf %s "(cached) " >&6
22288 # Guess no on Solaris.
22289 solaris*) gl_cv_func_ftello_works="guessing no" ;;
22290 # Guess yes on native Windows.
22291 mingw*) gl_cv_func_ftello_works="guessing yes" ;;
22292 # Guess yes otherwise.
22293 *) gl_cv_func_ftello_works="guessing yes" ;;
22295 if test "$cross_compiling" = yes
22299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22300 /* end confdefs.h. */
22303 #include <stdlib.h>
22304 #include <string.h>
22305 #define TESTFILE "conftest.tmp"
22311 /* Create a file with some contents. */
22312 fp = fopen (TESTFILE, "w");
22315 if (fwrite ("foogarsh", 1, 8, fp) < 8)
22316 { fclose (fp); return 71; }
22320 /* The file's contents is now "foogarsh". */
22322 /* Try writing after reading to EOF. */
22323 fp = fopen (TESTFILE, "r+");
22326 if (fseek (fp, -1, SEEK_END))
22327 { fclose (fp); return 74; }
22328 if (!(getc (fp) == 'h'))
22329 { fclose (fp); return 1; }
22330 if (!(getc (fp) == EOF))
22331 { fclose (fp); return 2; }
22332 if (!(ftell (fp) == 8))
22333 { fclose (fp); return 3; }
22334 if (!(ftell (fp) == 8))
22335 { fclose (fp); return 4; }
22336 if (!(putc ('!', fp) == '!'))
22337 { fclose (fp); return 5; }
22338 if (!(ftell (fp) == 9))
22339 { fclose (fp); return 6; }
22340 if (!(fclose (fp) == 0))
22342 fp = fopen (TESTFILE, "r");
22347 if (!(fread (buf, 1, 10, fp) == 9))
22348 { fclose (fp); return 10; }
22349 if (!(memcmp (buf, "foogarsh!", 9) == 0))
22350 { fclose (fp); return 11; }
22352 if (!(fclose (fp) == 0))
22355 /* The file's contents is now "foogarsh!". */
22360 if ac_fn_c_try_run "$LINENO"
22362 gl_cv_func_ftello_works=yes
22364 gl_cv_func_ftello_works=no
22366 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22367 conftest.$ac_objext conftest.beam conftest.$ac_ext
22372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
22373 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
22374 case "$gl_cv_func_ftello_works" in
22379 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
22386 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22395 gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
22398 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
22399 if test "x$ac_cv_func__ftelli64" = xyes
22401 printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
22418 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
22427 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
22434 if test $REPLACE_GETCWD = 1; then
22443 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
22457 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
22466 if test $ac_cv_func_getdtablesize = yes &&
22467 test $ac_cv_have_decl_getdtablesize = yes; then
22468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
22469 printf %s "checking whether getdtablesize works... " >&6; }
22470 if test ${gl_cv_func_getdtablesize_works+y}
22472 printf %s "(cached) " >&6
22475 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
22477 if test "$cross_compiling" = yes
22480 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
22481 gl_cv_func_getdtablesize_works="guessing no" ;;
22482 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
22486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22487 /* end confdefs.h. */
22489 #include <unistd.h>
22493 int size = getdtablesize();
22494 if (dup2 (0, getdtablesize()) != -1)
22496 if (size != getdtablesize())
22503 if ac_fn_c_try_run "$LINENO"
22505 gl_cv_func_getdtablesize_works=yes
22507 gl_cv_func_getdtablesize_works=no
22509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22510 conftest.$ac_objext conftest.beam conftest.$ac_ext
22517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
22518 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
22519 case "$gl_cv_func_getdtablesize_works" in
22520 *yes | "no (limitation)") ;;
22521 *) REPLACE_GETDTABLESIZE=1 ;;
22524 HAVE_GETDTABLESIZE=0
22527 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
22536 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
22545 GNULIB_GETDTABLESIZE=1
22551 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
22565 if test -n "$gl_replace_getopt"; then
22569 if test $REPLACE_GETOPT = 1; then
22572 if test $ac_cv_header_sys_cdefs_h = yes; then
22580 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22583 GETOPT_CDEFS_H=getopt-cdefs.h
22589 if test $REPLACE_GETOPT = 1; then
22598 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22608 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22610 GNULIB_GL_UNISTD_H_GETOPT=1
22617 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
22619 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
22626 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
22627 if test $ac_have_decl = 1
22632 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
22634 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
22641 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
22642 if test $ac_have_decl = 1
22647 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
22649 if test "x$ac_cv_have_decl___argv" = xyes
22656 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
22657 if test $ac_have_decl = 1
22663 # Incur the cost of this test only if none of the above worked.
22664 if test $ac_found = 0; then
22665 # On OpenBSD 5.1, using the global __progname variable appears to be
22666 # the only way to implement getprogname.
22667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
22668 printf %s "checking whether __progname is defined in default libraries... " >&6; }
22669 if test ${gl_cv_var___progname+y}
22671 printf %s "(cached) " >&6
22674 gl_cv_var___progname=
22675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22676 /* end confdefs.h. */
22677 extern char *__progname;
22681 return *__progname;
22687 if ac_fn_c_try_link "$LINENO"
22689 gl_cv_var___progname=yes
22692 rm -f core conftest.err conftest.$ac_objext \
22693 conftest$ac_exeext conftest.$ac_ext
22697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
22698 printf "%s\n" "$gl_cv_var___progname" >&6; }
22699 if test "$gl_cv_var___progname" = yes; then
22701 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
22720 gl_gettimeofday_timezone=void
22721 if test $ac_cv_func_gettimeofday != yes; then
22722 HAVE_GETTIMEOFDAY=0
22728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
22729 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
22730 if test ${gl_cv_func_gettimeofday_clobber+y}
22732 printf %s "(cached) " >&6
22734 if test "$cross_compiling" = yes
22736 # When cross-compiling:
22738 # Guess all is fine on glibc systems.
22739 *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
22740 # Guess no on native Windows.
22741 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
22742 # If we don't know, assume the worst.
22743 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
22747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22748 /* end confdefs.h. */
22749 #include <string.h>
22750 #include <sys/time.h>
22752 #include <stdlib.h>
22760 struct tm saved_lt;
22762 lt = localtime (&t);
22764 gettimeofday (&tv, NULL);
22765 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
22771 if ac_fn_c_try_run "$LINENO"
22773 gl_cv_func_gettimeofday_clobber=no
22775 gl_cv_func_gettimeofday_clobber=yes
22777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22778 conftest.$ac_objext conftest.beam conftest.$ac_ext
22782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
22783 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
22785 case "$gl_cv_func_gettimeofday_clobber" in
22787 REPLACE_GETTIMEOFDAY=1
22789 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
22794 NEED_LOCALTIME_BUFFER=1
22796 REPLACE_LOCALTIME=1
22801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22802 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
22803 if test ${gl_cv_func_gettimeofday_posix_signature+y}
22805 printf %s "(cached) " >&6
22807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22808 /* end confdefs.h. */
22809 #include <sys/time.h>
22811 int gettimeofday (struct timeval *restrict, void *restrict);
22816 /* glibc uses struct timezone * rather than the POSIX void *
22817 if _GNU_SOURCE is defined. However, since the only portable
22818 use of gettimeofday uses NULL as the second parameter, and
22819 since the glibc definition is actually more typesafe, it is
22820 not worth wrapping this to get a compliant signature. */
22821 int (*f) (struct timeval *restrict, void *restrict)
22824 return !(x | c.tv_sec | c.tv_usec);
22830 if ac_fn_c_try_compile "$LINENO"
22832 gl_cv_func_gettimeofday_posix_signature=yes
22834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22835 /* end confdefs.h. */
22836 #include <sys/time.h>
22837 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
22847 if ac_fn_c_try_compile "$LINENO"
22849 gl_cv_func_gettimeofday_posix_signature=almost
22851 gl_cv_func_gettimeofday_posix_signature=no
22853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22858 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22859 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22860 gl_gettimeofday_timezone='struct timezone'
22861 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22862 REPLACE_GETTIMEOFDAY=1
22864 if test $REPLACE_STRUCT_TIMEVAL = 1; then
22865 REPLACE_GETTIMEOFDAY=1
22868 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
22872 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
22875 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
22884 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
22893 GNULIB_GETTIMEOFDAY=1
22899 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
22904 if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
22913 # Autoconf 2.61a.99 and earlier don't support linking a file only
22914 # in VPATH builds. But since GNUmakefile is for maintainer use
22915 # only, it does not matter if we skip the link with older autoconf.
22916 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
22917 # builds, so use a shell variable to bypass this.
22918 GNUmakefile=GNUmakefile
22919 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
22924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
22925 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
22926 if test ${gl_cv_func_isnand_no_libm+y}
22928 printf %s "(cached) " >&6
22931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22932 /* end confdefs.h. */
22936 # define isnand(x) __builtin_isnan ((double)(x))
22939 # define isnand(x) isnan ((double)(x))
22950 if ac_fn_c_try_link "$LINENO"
22952 gl_cv_func_isnand_no_libm=yes
22954 gl_cv_func_isnand_no_libm=no
22956 rm -f core conftest.err conftest.$ac_objext \
22957 conftest$ac_exeext conftest.$ac_ext
22960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
22961 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
22963 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
22964 if test $gl_cv_func_isnand_no_libm = yes; then
22966 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
22970 if test $gl_func_isnand_no_libm != yes; then
22979 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
22987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
22988 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
22989 if test ${gl_cv_func_isnanf_no_libm+y}
22991 printf %s "(cached) " >&6
22994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22995 /* end confdefs.h. */
22999 # define isnanf(x) __builtin_isnanf ((float)(x))
23000 #elif defined isnan
23002 # define isnanf(x) isnan ((float)(x))
23013 if ac_fn_c_try_link "$LINENO"
23015 gl_cv_func_isnanf_no_libm=yes
23017 gl_cv_func_isnanf_no_libm=no
23019 rm -f core conftest.err conftest.$ac_objext \
23020 conftest$ac_exeext conftest.$ac_ext
23023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
23024 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
23026 if test $gl_cv_func_isnanf_no_libm = yes; then
23030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
23031 printf %s "checking whether isnan(float) works... " >&6; }
23032 if test ${gl_cv_func_isnanf_works+y}
23034 printf %s "(cached) " >&6
23037 if test "$cross_compiling" = yes
23040 irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
23041 mingw*) # Guess yes on mingw, no on MSVC.
23042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23043 /* end confdefs.h. */
23050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23051 $EGREP "Known" >/dev/null 2>&1
23053 gl_cv_func_isnanf_works="guessing yes"
23055 gl_cv_func_isnanf_works="guessing no"
23060 *) gl_cv_func_isnanf_works="guessing yes" ;;
23064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23065 /* end confdefs.h. */
23070 # define isnanf(x) __builtin_isnanf ((float)(x))
23071 #elif defined isnan
23073 # define isnanf(x) isnan ((float)(x))
23075 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
23080 static float zero = 0.0f;
23081 return zero / zero;
23084 # define NaN() (0.0f / 0.0f)
23087 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23088 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
23093 if (isnanf (1.0f / 0.0f))
23096 if (!isnanf (NaN ()))
23099 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
23100 /* The isnanf function should be immune against changes in the sign bit and
23101 in the mantissa bits. The xor operation twiddles a bit that can only be
23102 a sign bit or a mantissa bit. */
23103 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
23108 /* Set the bits below the exponent to 01111...111. */
23109 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
23110 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
23111 if (!isnanf (m.value))
23119 if ac_fn_c_try_run "$LINENO"
23121 gl_cv_func_isnanf_works=yes
23123 gl_cv_func_isnanf_works=no
23125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23126 conftest.$ac_objext conftest.beam conftest.$ac_ext
23131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
23132 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
23135 if test $gl_cv_func_isnanf_no_libm = yes \
23136 && { case "$gl_cv_func_isnanf_works" in
23141 gl_func_isnanf_no_libm=yes
23143 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
23146 gl_func_isnanf_no_libm=no
23149 if test $gl_func_isnanf_no_libm != yes; then
23158 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
23162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
23163 printf %s "checking where to find the exponent in a 'float'... " >&6; }
23164 if test ${gl_cv_cc_float_expbit0+y}
23166 printf %s "(cached) " >&6
23169 if test "$cross_compiling" = yes
23171 gl_cv_cc_float_expbit0="word 0 bit 23"
23173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23174 /* end confdefs.h. */
23177 #include <stddef.h>
23179 #include <string.h>
23181 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23182 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
23183 static unsigned int ored_words[NWORDS];
23184 static unsigned int anded_words[NWORDS];
23185 static void add_to_ored_words (float x)
23189 /* Clear it first, in case
23190 sizeof (float) < sizeof (memory_float). */
23191 memset (&m, 0, sizeof (memory_float));
23193 for (i = 0; i < NWORDS; i++)
23195 ored_words[i] |= m.word[i];
23196 anded_words[i] &= m.word[i];
23202 FILE *fp = fopen ("conftest.out", "w");
23205 for (j = 0; j < NWORDS; j++)
23206 anded_words[j] = ~ (unsigned int) 0;
23207 add_to_ored_words (0.25f);
23208 add_to_ored_words (0.5f);
23209 add_to_ored_words (1.0f);
23210 add_to_ored_words (2.0f);
23211 add_to_ored_words (4.0f);
23212 /* Remove bits that are common (e.g. if representation of the first mantissa
23213 bit is explicit). */
23214 for (j = 0; j < NWORDS; j++)
23215 ored_words[j] &= ~anded_words[j];
23216 /* Now find the nonzero word. */
23217 for (j = 0; j < NWORDS; j++)
23218 if (ored_words[j] != 0)
23223 for (i = j + 1; i < NWORDS; i++)
23224 if (ored_words[i] != 0)
23226 fprintf (fp, "unknown");
23227 return (fclose (fp) != 0);
23230 if ((ored_words[j] >> i) & 1)
23232 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23233 return (fclose (fp) != 0);
23236 fprintf (fp, "unknown");
23237 return (fclose (fp) != 0);
23241 if ac_fn_c_try_run "$LINENO"
23243 gl_cv_cc_float_expbit0=`cat conftest.out`
23245 gl_cv_cc_float_expbit0="unknown"
23247 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23248 conftest.$ac_objext conftest.beam conftest.$ac_ext
23254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
23255 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
23256 case "$gl_cv_cc_float_expbit0" in
23258 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23259 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
23261 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
23264 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
23273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
23274 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
23275 if test ${gl_cv_func_isnanl_no_libm+y}
23277 printf %s "(cached) " >&6
23280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23281 /* end confdefs.h. */
23285 # define isnanl(x) __builtin_isnanl ((long double)(x))
23286 #elif defined isnan
23288 # define isnanl(x) isnan ((long double)(x))
23299 if ac_fn_c_try_link "$LINENO"
23301 gl_cv_func_isnanl_no_libm=yes
23303 gl_cv_func_isnanl_no_libm=no
23305 rm -f core conftest.err conftest.$ac_objext \
23306 conftest$ac_exeext conftest.$ac_ext
23309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
23310 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
23312 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
23313 if test $gl_func_isnanl_no_libm = yes; then
23318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
23319 printf %s "checking whether isnanl works... " >&6; }
23320 if test ${gl_cv_func_isnanl_works+y}
23322 printf %s "(cached) " >&6
23325 if test "$cross_compiling" = yes
23328 mingw*) # Guess yes on mingw, no on MSVC.
23329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23330 /* end confdefs.h. */
23337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23338 $EGREP "Known" >/dev/null 2>&1
23340 gl_cv_func_isnanl_works="guessing yes"
23342 gl_cv_func_isnanl_works="guessing no"
23347 *) gl_cv_func_isnanl_works="guessing yes" ;;
23351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23352 /* end confdefs.h. */
23355 #include <limits.h>
23359 # define isnanl(x) __builtin_isnanl ((long double)(x))
23360 #elif defined isnan
23362 # define isnanl(x) isnan ((long double)(x))
23365 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23366 typedef union { unsigned int word[NWORDS]; long double value; }
23367 memory_long_double;
23368 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
23369 runtime type conversion. */
23371 static long double NaNl ()
23374 return zero / zero;
23377 # define NaNl() (0.0L / 0.0L)
23383 if (!isnanl (NaNl ()))
23387 memory_long_double m;
23390 /* The isnanl function should be immune against changes in the sign bit and
23391 in the mantissa bits. The xor operation twiddles a bit that can only be
23392 a sign bit or a mantissa bit (since the exponent never extends to
23395 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
23396 for (i = 0; i < NWORDS; i++)
23398 if (!isnanl (m.value))
23402 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
23403 /* Representation of an 80-bit 'long double' as an initializer for a sequence
23404 of 'unsigned int' words. */
23405 # ifdef WORDS_BIGENDIAN
23406 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23407 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
23408 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
23409 (unsigned int) (mantlo) << 16 \
23412 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23413 { mantlo, manthi, exponent }
23416 static memory_long_double x =
23417 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
23418 if (!isnanl (x.value))
23422 /* Signalling NaN. */
23423 static memory_long_double x =
23424 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
23425 if (!isnanl (x.value))
23428 /* isnanl should return something even for noncanonical values. */
23429 { /* Pseudo-NaN. */
23430 static memory_long_double x =
23431 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
23432 if (isnanl (x.value) && !isnanl (x.value))
23435 { /* Pseudo-Infinity. */
23436 static memory_long_double x =
23437 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
23438 if (isnanl (x.value) && !isnanl (x.value))
23441 { /* Pseudo-Zero. */
23442 static memory_long_double x =
23443 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
23444 if (isnanl (x.value) && !isnanl (x.value))
23447 { /* Unnormalized number. */
23448 static memory_long_double x =
23449 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23450 if (isnanl (x.value) && !isnanl (x.value))
23453 { /* Pseudo-Denormal. */
23454 static memory_long_double x =
23455 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23456 if (isnanl (x.value) && !isnanl (x.value))
23464 if ac_fn_c_try_run "$LINENO"
23466 gl_cv_func_isnanl_works=yes
23468 gl_cv_func_isnanl_works=no
23470 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23471 conftest.$ac_objext conftest.beam conftest.$ac_ext
23476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23477 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
23479 case "$gl_cv_func_isnanl_works" in
23481 *) gl_func_isnanl_no_libm=no ;;
23484 if test $gl_func_isnanl_no_libm = yes; then
23486 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23490 if test $gl_func_isnanl_no_libm != yes; then
23499 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
23504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23505 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
23506 if test ${gl_cv_cc_long_double_expbit0+y}
23508 printf %s "(cached) " >&6
23511 if test "$cross_compiling" = yes
23514 gl_cv_cc_long_double_expbit0="unknown"
23516 mingw*) # On native Windows (little-endian), we know the result
23517 # in two cases: mingw, MSVC.
23518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23519 /* end confdefs.h. */
23526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23527 $EGREP "Known" >/dev/null 2>&1
23529 gl_cv_cc_long_double_expbit0="word 2 bit 0"
23533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23534 /* end confdefs.h. */
23541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23542 $EGREP "Known" >/dev/null 2>&1
23544 gl_cv_cc_long_double_expbit0="word 1 bit 20"
23552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23553 /* end confdefs.h. */
23556 #include <stddef.h>
23558 #include <string.h>
23560 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23561 typedef union { long double value; unsigned int word[NWORDS]; }
23562 memory_long_double;
23563 static unsigned int ored_words[NWORDS];
23564 static unsigned int anded_words[NWORDS];
23565 static void add_to_ored_words (long double x)
23567 memory_long_double m;
23569 /* Clear it first, in case
23570 sizeof (long double) < sizeof (memory_long_double). */
23571 memset (&m, 0, sizeof (memory_long_double));
23573 for (i = 0; i < NWORDS; i++)
23575 ored_words[i] |= m.word[i];
23576 anded_words[i] &= m.word[i];
23582 FILE *fp = fopen ("conftest.out", "w");
23585 for (j = 0; j < NWORDS; j++)
23586 anded_words[j] = ~ (unsigned int) 0;
23587 add_to_ored_words (0.25L);
23588 add_to_ored_words (0.5L);
23589 add_to_ored_words (1.0L);
23590 add_to_ored_words (2.0L);
23591 add_to_ored_words (4.0L);
23592 /* Remove bits that are common (e.g. if representation of the first mantissa
23593 bit is explicit). */
23594 for (j = 0; j < NWORDS; j++)
23595 ored_words[j] &= ~anded_words[j];
23596 /* Now find the nonzero word. */
23597 for (j = 0; j < NWORDS; j++)
23598 if (ored_words[j] != 0)
23603 for (i = j + 1; i < NWORDS; i++)
23604 if (ored_words[i] != 0)
23606 fprintf (fp, "unknown");
23607 return (fclose (fp) != 0);
23610 if ((ored_words[j] >> i) & 1)
23612 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23613 return (fclose (fp) != 0);
23616 fprintf (fp, "unknown");
23617 return (fclose (fp) != 0);
23621 if ac_fn_c_try_run "$LINENO"
23623 gl_cv_cc_long_double_expbit0=`cat conftest.out`
23625 gl_cv_cc_long_double_expbit0="unknown"
23627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23628 conftest.$ac_objext conftest.beam conftest.$ac_ext
23634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23635 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
23636 case "$gl_cv_cc_long_double_expbit0" in
23638 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23639 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23641 printf "%s\n" "#define LDBL_EXPBIT0_WORD $word" >>confdefs.h
23644 printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h
23654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
23655 printf %s "checking for C compiler flag to ignore unused libraries... " >&6; }
23656 if test ${gl_cv_prog_c_ignore_unused_libraries+y}
23658 printf %s "(cached) " >&6
23660 gl_cv_prog_c_ignore_unused_libraries=none
23661 gl_saved_ldflags=$LDFLAGS
23662 gl_saved_libs=$LIBS
23663 # Link with -lm to detect binutils 2.16 bug with --as-needed; see
23664 # <https://lists.gnu.org/r/bug-gnulib/2006-06/msg00131.html>.
23666 # Use long option sequences like '-z ignore' to test for the feature,
23667 # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
23668 # GCC + binutils likes '-Wl,--as-needed'.
23669 # GCC + Solaris ld likes '-Wl,-z,ignore'.
23670 # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
23671 # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
23672 # native cc issues annoying warnings and then ignores it,
23673 # which would cause us to incorrectly conclude that it worked.
23674 for gl_flags in '-Wl,--as-needed' \
23679 LDFLAGS="$gl_flags $LDFLAGS"
23680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23681 /* end confdefs.h. */
23691 if ac_fn_c_try_link "$LINENO"
23693 gl_cv_prog_c_ignore_unused_libraries=$gl_flags
23695 rm -f core conftest.err conftest.$ac_objext \
23696 conftest$ac_exeext conftest.$ac_ext
23697 LDFLAGS=$gl_saved_ldflags
23698 test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
23701 LIBS=$gl_saved_libs
23704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
23705 printf "%s\n" "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
23706 IGNORE_UNUSED_LIBRARIES_CFLAGS=
23707 if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
23708 IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
23722 gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
23726 if test "$gl_threads_api" = posix; then
23727 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23728 # pthread_rwlock_* functions.
23730 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23732 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
23736 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23740 if $has_rwlock; then
23743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23744 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23745 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
23747 printf %s "(cached) " >&6
23750 LIBS="$LIBS $LIBMULTITHREAD"
23751 if test "$cross_compiling" = yes
23753 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
23755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23756 /* end confdefs.h. */
23759 #include <pthread.h>
23760 #include <stdlib.h>
23761 #include <unistd.h>
23763 #define SUCCEED() exit (0)
23764 #define FAILURE() exit (1)
23765 #define UNEXPECTED(n) (exit (10 + (n)))
23767 /* The main thread creates the waiting writer and the requesting reader threads
23768 in the default way; this guarantees that they have the same priority.
23769 We can reuse the main thread as first reader thread. */
23771 static pthread_rwlock_t lock;
23772 static pthread_t reader1;
23773 static pthread_t writer;
23774 static pthread_t reader2;
23775 static pthread_t timer;
23776 /* Used to pass control from writer to reader2 and from reader2 to timer,
23777 as in a relay race.
23778 Passing control from one running thread to another running thread
23779 is most likely faster than to create the second thread. */
23780 static pthread_mutex_t baton;
23783 timer_func (void *ignored)
23785 /* Step 13 (can be before or after step 12):
23786 The timer thread takes the baton, then waits a moment to make sure
23787 it can tell whether the second reader thread is blocked at step 12. */
23788 if (pthread_mutex_lock (&baton))
23791 /* By the time we get here, it's clear that the second reader thread is
23792 blocked at step 12. This is the desired behaviour. */
23797 reader2_func (void *ignored)
23801 /* Step 8 (can be before or after step 7):
23802 The second reader thread takes the baton, then waits a moment to make sure
23803 the writer thread has reached step 7. */
23804 if (pthread_mutex_lock (&baton))
23807 /* Step 9: The second reader thread requests the lock. */
23808 err = pthread_rwlock_tryrdlock (&lock);
23811 else if (err != EBUSY)
23813 /* Step 10: Launch a timer, to test whether the next call blocks. */
23814 if (pthread_create (&timer, NULL, timer_func, NULL))
23816 /* Step 11: Release the baton. */
23817 if (pthread_mutex_unlock (&baton))
23819 /* Step 12: The second reader thread requests the lock. */
23820 err = pthread_rwlock_rdlock (&lock);
23828 writer_func (void *ignored)
23830 /* Step 4: Take the baton, so that the second reader thread does not go ahead
23832 if (pthread_mutex_lock (&baton))
23834 /* Step 5: Create the second reader thread. */
23835 if (pthread_create (&reader2, NULL, reader2_func, NULL))
23837 /* Step 6: Release the baton. */
23838 if (pthread_mutex_unlock (&baton))
23840 /* Step 7: The writer thread requests the lock. */
23841 if (pthread_rwlock_wrlock (&lock))
23849 reader1 = pthread_self ();
23851 /* Step 1: The main thread initializes the lock and the baton. */
23852 if (pthread_rwlock_init (&lock, NULL))
23854 if (pthread_mutex_init (&baton, NULL))
23856 /* Step 2: The main thread acquires the lock as a reader. */
23857 if (pthread_rwlock_rdlock (&lock))
23859 /* Step 3: Create the writer thread. */
23860 if (pthread_create (&writer, NULL, writer_func, NULL))
23862 /* Job done. Go to sleep. */
23870 if ac_fn_c_try_run "$LINENO"
23872 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
23874 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
23876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23877 conftest.$ac_objext conftest.beam conftest.$ac_ext
23883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
23884 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
23885 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
23888 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
23894 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
23895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23896 /* end confdefs.h. */
23898 #include <pthread.h>
23903 #if __FreeBSD__ == 4
23904 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
23905 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
23906 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
23907 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
23909 int x = (int)PTHREAD_MUTEX_RECURSIVE;
23917 if ac_fn_c_try_compile "$LINENO"
23920 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
23923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23929 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
23938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
23939 printf %s "checking whether lseek detects pipes... " >&6; }
23940 if test ${gl_cv_func_lseek_pipe+y}
23942 printf %s "(cached) " >&6
23946 gl_cv_func_lseek_pipe=no
23949 if test $cross_compiling = no; then
23950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23951 /* end confdefs.h. */
23953 #include <sys/types.h> /* for off_t */
23954 #include <stdio.h> /* for SEEK_CUR */
23956 # include <unistd.h>
23957 #else /* on Windows with MSVC */
23965 /* Exit with success only if stdin is seekable. */
23966 return lseek (0, (off_t)0, SEEK_CUR) < 0;
23972 if ac_fn_c_try_link "$LINENO"
23974 if test -s conftest$ac_exeext \
23975 && ./conftest$ac_exeext < conftest.$ac_ext \
23976 && test 1 = "`echo hi \
23977 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
23978 gl_cv_func_lseek_pipe=yes
23980 gl_cv_func_lseek_pipe=no
23984 gl_cv_func_lseek_pipe=no
23986 rm -f core conftest.err conftest.$ac_objext \
23987 conftest$ac_exeext conftest.$ac_ext
23989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23990 /* end confdefs.h. */
23992 #if defined __BEOS__
23993 /* BeOS mistakenly return 0 when trying to seek on pipes. */
23997 if ac_fn_c_try_compile "$LINENO"
23999 gl_cv_func_lseek_pipe=yes
24001 gl_cv_func_lseek_pipe=no
24003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
24010 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
24011 if test $gl_cv_func_lseek_pipe = no; then
24014 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
24019 if test $WINDOWS_64_BIT_OFF_T = 1; then
24023 if test $REPLACE_LSEEK = 1; then
24032 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
24046 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
24054 if test $ac_cv_func_lstat = yes; then
24056 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
24065 if test $REPLACE_LSTAT = 1; then
24074 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24089 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
24098 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24099 if test "x$ac_cv_header_stdlib_h" = xyes
24101 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
24105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
24106 printf %s "checking for GNU libc compatible malloc... " >&6; }
24107 if test ${ac_cv_func_malloc_0_nonnull+y}
24109 printf %s "(cached) " >&6
24111 if test "$cross_compiling" = yes
24114 # Guess yes on platforms where we know the result.
24115 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
24116 | hpux* | solaris* | cygwin* | mingw*)
24117 ac_cv_func_malloc_0_nonnull=yes ;;
24118 # If we don't know, assume the worst.
24119 *) ac_cv_func_malloc_0_nonnull=no ;;
24123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24124 /* end confdefs.h. */
24125 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
24126 # include <stdlib.h>
24134 char *p = malloc (0);
24143 if ac_fn_c_try_run "$LINENO"
24145 ac_cv_func_malloc_0_nonnull=yes
24147 ac_cv_func_malloc_0_nonnull=no
24149 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24150 conftest.$ac_objext conftest.beam conftest.$ac_ext
24155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
24156 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
24157 if test $ac_cv_func_malloc_0_nonnull = yes
24160 printf "%s\n" "#define HAVE_MALLOC_GNU 1" >>confdefs.h
24163 printf "%s\n" "#define HAVE_MALLOC_GNU 0" >>confdefs.h
24170 if test $REPLACE_MALLOC = 1; then
24179 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24184 printf "%s\n" "#define GNULIB_MALLOC_GNU 1" >>confdefs.h
24190 if test $gl_cv_func_malloc_posix = yes; then
24192 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
24198 if test $REPLACE_MALLOC = 1; then
24207 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24215 GNULIB_MALLOC_POSIX=1
24221 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
24240 if test $gl_cv_have_include_next = yes; then
24241 gl_cv_next_math_h='<'math.h'>'
24243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
24244 printf %s "checking absolute name of <math.h>... " >&6; }
24245 if test ${gl_cv_next_math_h+y}
24247 printf %s "(cached) " >&6
24250 if test $ac_cv_header_math_h = yes; then
24255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24256 /* end confdefs.h. */
24260 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24261 *) gl_absname_cpp="$ac_cpp" ;;
24266 gl_dirsep_regex='[/\\]'
24269 gl_dirsep_regex='\/'
24272 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24273 gl_header_literal_regex=`echo 'math.h' \
24274 | sed -e "$gl_make_literal_regex_sed"`
24275 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24276 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24282 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24283 sed -n "$gl_absolute_header_sed"`
24285 gl_header=$gl_cv_absolute_math_h
24286 gl_cv_next_math_h='"'$gl_header'"'
24288 gl_cv_next_math_h='<'math.h'>'
24293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
24294 printf "%s\n" "$gl_cv_next_math_h" >&6; }
24296 NEXT_MATH_H=$gl_cv_next_math_h
24298 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24299 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24300 gl_next_as_first_directive='<'math.h'>'
24302 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24303 gl_next_as_first_directive=$gl_cv_next_math_h
24305 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
24311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
24312 printf %s "checking whether NAN macro works... " >&6; }
24313 if test ${gl_cv_header_math_nan_works+y}
24315 printf %s "(cached) " >&6
24317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24318 /* end confdefs.h. */
24323 /* Solaris 10 has a broken definition of NAN. Other platforms
24324 fail to provide NAN, or provide it only in C99 mode; this
24325 test only needs to fail when NAN is provided but wrong. */
24335 if ac_fn_c_try_compile "$LINENO"
24337 gl_cv_header_math_nan_works=yes
24339 gl_cv_header_math_nan_works=no
24341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
24344 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
24345 if test $gl_cv_header_math_nan_works = no; then
24348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
24349 printf %s "checking whether HUGE_VAL works... " >&6; }
24350 if test ${gl_cv_header_math_huge_val_works+y}
24352 printf %s "(cached) " >&6
24354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24355 /* end confdefs.h. */
24360 /* Solaris 10 has a broken definition of HUGE_VAL. */
24361 double d = HUGE_VAL;
24367 if ac_fn_c_try_compile "$LINENO"
24369 gl_cv_header_math_huge_val_works=yes
24371 gl_cv_header_math_huge_val_works=no
24373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
24376 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
24377 if test $gl_cv_header_math_huge_val_works = no; then
24384 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
24393 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
24396 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
24397 if test "x$ac_cv_header_bp_sym_h" = xyes
24399 printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
24416 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
24426 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
24427 if test "x$ac_cv_func_mempcpy" = xyes
24429 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
24433 if test $ac_cv_func_mempcpy = no; then
24437 if test $HAVE_MEMPCPY = 0; then
24446 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
24463 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
24472 if test $ac_cv_have_decl_memrchr = no; then
24473 HAVE_DECL_MEMRCHR=0
24476 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24477 if test "x$ac_cv_func_memrchr" = xyes
24479 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
24484 if test $ac_cv_func_memrchr = no; then
24493 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24508 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
24513 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24522 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
24526 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24535 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
24540 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
24553 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
24556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
24557 printf %s "checking whether open recognizes a trailing slash... " >&6; }
24558 if test ${gl_cv_func_open_slash+y}
24560 printf %s "(cached) " >&6
24562 # Assume that if we have lstat, we can also check symlinks.
24563 if test $ac_cv_func_lstat = yes; then
24565 ln -s conftest.tmp conftest.lnk
24567 if test "$cross_compiling" = yes
24571 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
24572 gl_cv_func_open_slash="guessing no" ;;
24574 gl_cv_func_open_slash="guessing yes" ;;
24578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24579 /* end confdefs.h. */
24583 # include <unistd.h>
24589 if (open ("conftest.lnk/", O_RDONLY) != -1)
24592 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
24597 if ac_fn_c_try_run "$LINENO"
24599 gl_cv_func_open_slash=yes
24601 gl_cv_func_open_slash=no
24603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24604 conftest.$ac_objext conftest.beam conftest.$ac_ext
24607 rm -f conftest.sl conftest.tmp conftest.lnk
24610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
24611 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
24612 case "$gl_cv_func_open_slash" in
24615 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
24623 if test $REPLACE_OPEN = 0; then
24627 if test $ac_cv_func_fchdir = no; then
24631 if test $HAVE_FCHDIR = 0; then
24638 if test $REPLACE_OPEN = 1; then
24647 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
24665 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
24675 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
24679 # Solaris 10 lacks O_CLOEXEC.
24680 # Solaris 9 has *at functions, but uniformly mishandles trailing
24681 # slash in all of them.
24689 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
24698 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
24707 printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h
24720 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
24729 printf "%s\n" "#define GNULIB_OPENAT_SAFER 1" >>confdefs.h
24735 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
24736 if test "x$ac_cv_func_opendir" = xyes
24738 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
24742 if test $ac_cv_func_opendir = no; then
24749 if test $ac_cv_func_fchdir = no; then
24753 if test $HAVE_FCHDIR = 0; then
24754 if test $HAVE_OPENDIR = 1; then
24759 case $host_os,$HAVE_OPENDIR in
24761 REPLACE_OPENDIR=1;;
24764 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
24773 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
24787 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
24799 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
24802 case ${gl_cv_func_strerror_r_works-unset} in
24804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
24805 printf %s "checking whether perror matches strerror... " >&6; }
24806 if test ${gl_cv_func_perror_works+y}
24808 printf %s "(cached) " >&6
24810 if test "$cross_compiling" = yes
24813 # Guess yes on native Windows.
24814 mingw*) gl_cv_func_perror_works="guessing yes" ;;
24815 # Otherwise guess no.
24816 *) gl_cv_func_perror_works="guessing no" ;;
24820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24821 /* end confdefs.h. */
24824 #include <stdlib.h>
24825 #include <string.h>
24830 char *str = strerror (-1);
24831 if (!getenv("CONFTEST_OUTPUT")) return 0;
24832 if (!str) str = "";
24842 if ac_fn_c_try_run "$LINENO"
24844 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
24845 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
24846 gl_cv_func_perror_works=yes
24848 gl_cv_func_perror_works=no
24850 rm -rf conftest.txt1 conftest.txt2
24852 gl_cv_func_perror_works=no
24854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24855 conftest.$ac_objext conftest.beam conftest.$ac_ext
24860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
24861 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
24862 case "$gl_cv_func_perror_works" in
24864 *) REPLACE_PERROR=1 ;;
24872 if test $REPLACE_PERROR = 1; then
24881 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
24895 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
24901 if test $gl_cv_func_frexp_no_libm = yes; then
24905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
24906 printf %s "checking whether frexp works... " >&6; }
24907 if test ${gl_cv_func_frexp_works+y}
24909 printf %s "(cached) " >&6
24912 if test "$cross_compiling" = yes
24915 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
24916 mingw*) # Guess yes with MSVC, no with mingw.
24917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24918 /* end confdefs.h. */
24925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24926 $EGREP "Good" >/dev/null 2>&1
24928 gl_cv_func_frexp_works="guessing yes"
24930 gl_cv_func_frexp_works="guessing no"
24935 *) gl_cv_func_frexp_works="guessing yes" ;;
24939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24940 /* end confdefs.h. */
24944 #include <string.h>
24945 #if HAVE_DECL_ALARM
24946 # include <signal.h>
24947 # include <unistd.h>
24949 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24950 ICC 10.0 has a bug when optimizing the expression -zero.
24951 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
24952 to PowerPC on Mac OS X 10.5. */
24953 #if defined __hpux || defined __sgi || defined __ICC
24955 compute_minus_zero (void)
24957 return -DBL_MIN * DBL_MIN;
24959 # define minus_zero compute_minus_zero ()
24961 double minus_zero = -0.0;
24969 #if HAVE_DECL_ALARM
24970 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
24971 number. Let the test fail in this case. */
24972 signal (SIGALRM, SIG_DFL);
24975 /* Test on denormalized numbers. */
24976 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
24981 double y = frexp (x, &exp);
24982 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
24983 On NetBSD: y = 0.75. Correct: y = 0.5. */
24987 /* Test on infinite numbers. */
24991 double y = frexp (x, &exp);
24995 /* Test on negative zero. */
24999 double y = frexp (x, &exp);
25000 if (memcmp (&y, &x, sizeof x))
25006 if ac_fn_c_try_run "$LINENO"
25008 gl_cv_func_frexp_works=yes
25010 gl_cv_func_frexp_works=no
25012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25013 conftest.$ac_objext conftest.beam conftest.$ac_ext
25018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
25019 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
25021 case "$gl_cv_func_frexp_works" in
25024 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
25030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
25031 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
25032 if test ${gl_cv_func_ldexp_no_libm+y}
25034 printf %s "(cached) " >&6
25037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25038 /* end confdefs.h. */
25045 return ldexp (x, y) < 1;
25050 if ac_fn_c_try_link "$LINENO"
25052 gl_cv_func_ldexp_no_libm=yes
25054 gl_cv_func_ldexp_no_libm=no
25056 rm -f core conftest.err conftest.$ac_objext \
25057 conftest$ac_exeext conftest.$ac_ext
25060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
25061 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
25062 if test $gl_cv_func_ldexp_no_libm = yes; then
25064 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
25073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
25074 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
25075 if test ${gl_cv_func_frexpl_no_libm+y}
25077 printf %s "(cached) " >&6
25080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25081 /* end confdefs.h. */
25087 int e; return frexpl (x, &e) > 0;
25092 if ac_fn_c_try_link "$LINENO"
25094 gl_cv_func_frexpl_no_libm=yes
25096 gl_cv_func_frexpl_no_libm=no
25098 rm -f core conftest.err conftest.$ac_objext \
25099 conftest$ac_exeext conftest.$ac_ext
25102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
25103 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
25105 if test $gl_cv_func_frexpl_no_libm = yes; then
25108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
25109 printf %s "checking whether frexpl works... " >&6; }
25110 if test ${gl_cv_func_frexpl_works+y}
25112 printf %s "(cached) " >&6
25115 if test "$cross_compiling" = yes
25119 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
25120 gl_cv_func_frexpl_works="guessing no";;
25121 *) gl_cv_func_frexpl_works="guessing yes";;
25125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25126 /* end confdefs.h. */
25130 /* Override the values of <float.h>, like done in float.in.h. */
25131 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
25132 # undef LDBL_MIN_EXP
25133 # define LDBL_MIN_EXP (-16381)
25135 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
25136 # undef LDBL_MIN_EXP
25137 # define LDBL_MIN_EXP (-16381)
25139 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
25140 # undef LDBL_MIN_EXP
25141 # define LDBL_MIN_EXP DBL_MIN_EXP
25143 #if defined __sgi && (LDBL_MANT_DIG >= 106)
25144 # if defined __GNUC__
25145 # undef LDBL_MIN_EXP
25146 # define LDBL_MIN_EXP DBL_MIN_EXP
25153 long double frexpl (long double, int *);
25157 volatile long double x;
25158 /* Test on finite numbers that fails on AIX 5.1. */
25166 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
25167 function returns an invalid (incorrectly normalized) value: it returns
25168 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
25169 but the correct result is
25170 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
25174 long double y = frexpl (x, &exp);
25175 if (!(exp == 1 && y == 0.505L))
25178 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
25179 LDBL_MAX_EXP = 16384.
25180 In the loop end test, we test x against Infinity, rather than comparing
25181 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
25184 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
25195 /* Test on denormalized numbers. */
25198 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
25203 long double y = frexpl (x, &exp);
25204 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
25205 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
25206 if (exp != LDBL_MIN_EXP - 1)
25210 /* Test on infinite numbers. */
25214 long double y = frexpl (x, &exp);
25221 if ac_fn_c_try_run "$LINENO"
25223 gl_cv_func_frexpl_works=yes
25225 gl_cv_func_frexpl_works=no
25227 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25228 conftest.$ac_objext conftest.beam conftest.$ac_ext
25233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
25234 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
25236 case "$gl_cv_func_frexpl_works" in
25237 *yes) gl_func_frexpl_no_libm=yes ;;
25238 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
25241 gl_func_frexpl_no_libm=no
25244 if test $gl_func_frexpl_no_libm = yes; then
25246 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
25248 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
25250 if test "x$ac_cv_have_decl_frexpl" = xyes
25260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
25261 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
25262 if test ${gl_cv_func_ldexpl_no_libm+y}
25264 printf %s "(cached) " >&6
25267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25268 /* end confdefs.h. */
25274 return ldexpl (x, -1) > 0;
25279 if ac_fn_c_try_link "$LINENO"
25281 gl_cv_func_ldexpl_no_libm=yes
25283 gl_cv_func_ldexpl_no_libm=no
25285 rm -f core conftest.err conftest.$ac_objext \
25286 conftest$ac_exeext conftest.$ac_ext
25289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
25290 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
25292 if test $gl_cv_func_ldexpl_no_libm = yes; then
25295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
25296 printf %s "checking whether ldexpl works... " >&6; }
25297 if test ${gl_cv_func_ldexpl_works+y}
25299 printf %s "(cached) " >&6
25302 if test "$cross_compiling" = yes
25306 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
25307 # Guess yes on native Windows.
25308 mingw*) gl_cv_func_ldexpl_works="guessing yes" ;;
25309 *) gl_cv_func_ldexpl_works="guessing yes" ;;
25313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25314 /* end confdefs.h. */
25321 long double ldexpl (long double, int);
25326 volatile long double x = 1.0;
25327 volatile long double y = ldexpl (x, -1);
25332 volatile long double x = 1.73205L;
25333 volatile long double y = ldexpl (x, 0);
25340 if ac_fn_c_try_run "$LINENO"
25342 gl_cv_func_ldexpl_works=yes
25344 gl_cv_func_ldexpl_works=no
25346 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25347 conftest.$ac_objext conftest.beam conftest.$ac_ext
25352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
25353 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
25355 case "$gl_cv_func_ldexpl_works" in
25358 printf "%s\n" "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
25360 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
25362 if test "x$ac_cv_have_decl_ldexpl" = xyes
25375 if test $gl_cv_func_vfprintf_posix = no; then
25387 gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
25391 printf "%s\n" "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
25402 GNULIB_PRINTF_POSIX=1
25408 printf "%s\n" "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
25416 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
25417 if test "x$ac_cv_func_readdir" = xyes
25419 printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
25423 if test $ac_cv_func_readdir = no; then
25427 if test $HAVE_READDIR = 0; then
25436 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
25450 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
25457 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
25458 if test "x$ac_cv_header_stdlib_h" = xyes
25460 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
25464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
25465 printf %s "checking for GNU libc compatible realloc... " >&6; }
25466 if test ${ac_cv_func_realloc_0_nonnull+y}
25468 printf %s "(cached) " >&6
25470 if test "$cross_compiling" = yes
25473 # Guess yes on platforms where we know the result.
25474 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
25475 | hpux* | solaris* | cygwin* | mingw*)
25476 ac_cv_func_realloc_0_nonnull=yes ;;
25477 # If we don't know, assume the worst.
25478 *) ac_cv_func_realloc_0_nonnull=no ;;
25482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25483 /* end confdefs.h. */
25484 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
25485 # include <stdlib.h>
25493 char *p = realloc (0, 0);
25502 if ac_fn_c_try_run "$LINENO"
25504 ac_cv_func_realloc_0_nonnull=yes
25506 ac_cv_func_realloc_0_nonnull=no
25508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25509 conftest.$ac_objext conftest.beam conftest.$ac_ext
25514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
25515 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
25516 if test $ac_cv_func_realloc_0_nonnull = yes
25519 printf "%s\n" "#define HAVE_REALLOC_GNU 1" >>confdefs.h
25522 printf "%s\n" "#define HAVE_REALLOC_GNU 0" >>confdefs.h
25529 if test $REPLACE_REALLOC = 1; then
25538 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
25543 printf "%s\n" "#define GNULIB_REALLOC_GNU 1" >>confdefs.h
25549 if test $gl_cv_func_malloc_posix = yes; then
25551 printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
25557 if test $REPLACE_REALLOC = 1; then
25566 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
25574 GNULIB_REALLOC_POSIX=1
25580 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
25587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
25588 printf %s "checking whether rmdir works... " >&6; }
25589 if test ${gl_cv_func_rmdir_works+y}
25591 printf %s "(cached) " >&6
25594 touch conftest.file
25595 if test "$cross_compiling" = yes
25598 # Guess yes on glibc systems.
25599 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
25600 # Guess no on native Windows.
25601 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
25602 # If we don't know, assume the worst.
25603 *) gl_cv_func_rmdir_works="guessing no" ;;
25607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25608 /* end confdefs.h. */
25612 # include <unistd.h>
25613 #else /* on Windows with MSVC */
25614 # include <direct.h>
25621 if (!rmdir ("conftest.file/"))
25623 else if (errno != ENOTDIR)
25625 if (!rmdir ("conftest.dir/./"))
25633 if ac_fn_c_try_run "$LINENO"
25635 gl_cv_func_rmdir_works=yes
25637 gl_cv_func_rmdir_works=no
25639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25640 conftest.$ac_objext conftest.beam conftest.$ac_ext
25643 rm -rf conftest.dir conftest.file
25645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
25646 printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
25647 case "$gl_cv_func_rmdir_works" in
25654 if test $REPLACE_RMDIR = 1; then
25663 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
25677 printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
25689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
25690 printf %s "checking for signbit macro... " >&6; }
25691 if test ${gl_cv_func_signbit+y}
25693 printf %s "(cached) " >&6
25696 if test "$cross_compiling" = yes
25699 # Guess yes on glibc systems.
25700 *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
25701 # Guess yes on native Windows.
25702 mingw*) gl_cv_func_signbit="guessing yes" ;;
25703 # If we don't know, assume the worst.
25704 *) gl_cv_func_signbit="guessing no" ;;
25708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25709 /* end confdefs.h. */
25712 /* If signbit is defined as a function, don't use it, since calling it for
25713 'float' or 'long double' arguments would involve conversions.
25714 If signbit is not declared at all but exists as a library function, don't
25715 use it, since the prototype may not match.
25716 If signbit is not declared at all but exists as a compiler built-in, don't
25717 use it, since it's preferable to use __builtin_signbit* (no warnings,
25718 no conversions). */
25720 # error "signbit should be a macro"
25722 #include <string.h>
25724 /* Global variables.
25725 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
25726 but cannot constant-fold __builtin_signbitl (variable). */
25732 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
25733 So we use -p0f and -p0d instead. */
25738 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
25739 So we use another constant expression instead.
25740 But that expression does not work on other platforms, such as when
25741 cross-compiling to PowerPC on Mac OS X 10.5. */
25742 long double p0l = 0.0L;
25743 #if defined __hpux || defined __sgi
25744 long double m0l = -LDBL_MIN * LDBL_MIN;
25746 long double m0l = -p0l;
25749 if (signbit (vf)) /* link check */
25752 float plus_inf = 1.0f / p0f;
25753 float minus_inf = -1.0f / p0f;
25754 if (!(!signbit (255.0f)
25755 && signbit (-255.0f)
25757 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
25758 && !signbit (plus_inf)
25759 && signbit (minus_inf)))
25762 if (signbit (vd)) /* link check */
25765 double plus_inf = 1.0 / p0d;
25766 double minus_inf = -1.0 / p0d;
25767 if (!(!signbit (255.0)
25768 && signbit (-255.0)
25770 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
25771 && !signbit (plus_inf)
25772 && signbit (minus_inf)))
25775 if (signbit (vl)) /* link check */
25778 long double plus_inf = 1.0L / p0l;
25779 long double minus_inf = -1.0L / p0l;
25780 if (signbit (255.0L))
25782 if (!signbit (-255.0L))
25786 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
25788 if (signbit (plus_inf))
25790 if (!signbit (minus_inf))
25798 if ac_fn_c_try_run "$LINENO"
25800 gl_cv_func_signbit=yes
25802 gl_cv_func_signbit=no
25804 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25805 conftest.$ac_objext conftest.beam conftest.$ac_ext
25810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
25811 printf "%s\n" "$gl_cv_func_signbit" >&6; }
25812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
25813 printf %s "checking for signbit compiler built-ins... " >&6; }
25814 if test ${gl_cv_func_signbit_gcc+y}
25816 printf %s "(cached) " >&6
25819 if test "$cross_compiling" = yes
25822 # Guess yes on glibc systems.
25823 *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
25824 # Guess yes on mingw, no on MSVC.
25825 mingw*) if test -n "$GCC"; then
25826 gl_cv_func_signbit_gcc="guessing yes"
25828 gl_cv_func_signbit_gcc="guessing no"
25831 # If we don't know, assume the worst.
25832 *) gl_cv_func_signbit_gcc="guessing no" ;;
25836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25837 /* end confdefs.h. */
25840 # define signbit(x) \
25841 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
25842 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
25843 __builtin_signbitf (x))
25845 # error "signbit should be three compiler built-ins"
25847 #include <string.h>
25849 /* Global variables.
25850 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
25851 but cannot constant-fold __builtin_signbitl (variable). */
25857 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
25858 So we use -p0f and -p0d instead. */
25863 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
25864 So we use another constant expression instead.
25865 But that expression does not work on other platforms, such as when
25866 cross-compiling to PowerPC on Mac OS X 10.5. */
25867 long double p0l = 0.0L;
25868 #if defined __hpux || defined __sgi
25869 long double m0l = -LDBL_MIN * LDBL_MIN;
25871 long double m0l = -p0l;
25874 if (signbit (vf)) /* link check */
25877 float plus_inf = 1.0f / p0f;
25878 float minus_inf = -1.0f / p0f;
25879 if (!(!signbit (255.0f)
25880 && signbit (-255.0f)
25882 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
25883 && !signbit (plus_inf)
25884 && signbit (minus_inf)))
25887 if (signbit (vd)) /* link check */
25890 double plus_inf = 1.0 / p0d;
25891 double minus_inf = -1.0 / p0d;
25892 if (!(!signbit (255.0)
25893 && signbit (-255.0)
25895 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
25896 && !signbit (plus_inf)
25897 && signbit (minus_inf)))
25900 if (signbit (vl)) /* link check */
25903 long double plus_inf = 1.0L / p0l;
25904 long double minus_inf = -1.0L / p0l;
25905 if (signbit (255.0L))
25907 if (!signbit (-255.0L))
25911 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
25913 if (signbit (plus_inf))
25915 if (!signbit (minus_inf))
25923 if ac_fn_c_try_run "$LINENO"
25925 gl_cv_func_signbit_gcc=yes
25927 gl_cv_func_signbit_gcc=no
25929 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25930 conftest.$ac_objext conftest.beam conftest.$ac_ext
25935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
25936 printf "%s\n" "$gl_cv_func_signbit_gcc" >&6; }
25937 case "$gl_cv_func_signbit_gcc" in
25939 REPLACE_SIGNBIT_USING_GCC=1
25942 case "$gl_cv_func_signbit" in
25948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
25949 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
25950 if test ${gl_cv_cc_float_signbit+y}
25952 printf %s "(cached) " >&6
25955 if test "$cross_compiling" = yes
25958 gl_cv_cc_float_signbit="unknown"
25961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25962 /* end confdefs.h. */
25964 #include <stddef.h>
25967 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25968 typedef union { float value; unsigned int word[NWORDS]; }
25970 static memory_float plus = { 1.0f };
25971 static memory_float minus = { -1.0f };
25976 FILE *fp = fopen ("conftest.out", "w");
25979 /* Find the different bit. */
25981 for (j = 0; j < NWORDS; j++)
25983 unsigned int x = plus.word[j] ^ minus.word[j];
25984 if ((x & (x - 1)) || (x && m))
25986 /* More than one bit difference. */
25987 fprintf (fp, "unknown");
25999 /* No difference. */
26000 fprintf (fp, "unknown");
26004 /* Now m = plus.word[k] ^ ~minus.word[k]. */
26005 if (plus.word[k] & ~minus.word[k])
26007 /* Oh? The sign bit is set in the positive and cleared in the negative
26009 fprintf (fp, "unknown");
26016 fprintf (fp, "word %d bit %d", (int) k, (int) i);
26017 if (fclose (fp) != 0)
26023 if ac_fn_c_try_run "$LINENO"
26025 gl_cv_cc_float_signbit=`cat conftest.out`
26027 gl_cv_cc_float_signbit="unknown"
26029 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26030 conftest.$ac_objext conftest.beam conftest.$ac_ext
26036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
26037 printf "%s\n" "$gl_cv_cc_float_signbit" >&6; }
26038 case "$gl_cv_cc_float_signbit" in
26040 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26041 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
26043 printf "%s\n" "#define FLT_SIGNBIT_WORD $word" >>confdefs.h
26046 printf "%s\n" "#define FLT_SIGNBIT_BIT $bit" >>confdefs.h
26054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
26055 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
26056 if test ${gl_cv_cc_double_signbit+y}
26058 printf %s "(cached) " >&6
26061 if test "$cross_compiling" = yes
26064 gl_cv_cc_double_signbit="unknown"
26067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26068 /* end confdefs.h. */
26070 #include <stddef.h>
26073 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26074 typedef union { double value; unsigned int word[NWORDS]; }
26076 static memory_float plus = { 1.0 };
26077 static memory_float minus = { -1.0 };
26082 FILE *fp = fopen ("conftest.out", "w");
26085 /* Find the different bit. */
26087 for (j = 0; j < NWORDS; j++)
26089 unsigned int x = plus.word[j] ^ minus.word[j];
26090 if ((x & (x - 1)) || (x && m))
26092 /* More than one bit difference. */
26093 fprintf (fp, "unknown");
26105 /* No difference. */
26106 fprintf (fp, "unknown");
26110 /* Now m = plus.word[k] ^ ~minus.word[k]. */
26111 if (plus.word[k] & ~minus.word[k])
26113 /* Oh? The sign bit is set in the positive and cleared in the negative
26115 fprintf (fp, "unknown");
26122 fprintf (fp, "word %d bit %d", (int) k, (int) i);
26123 if (fclose (fp) != 0)
26129 if ac_fn_c_try_run "$LINENO"
26131 gl_cv_cc_double_signbit=`cat conftest.out`
26133 gl_cv_cc_double_signbit="unknown"
26135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26136 conftest.$ac_objext conftest.beam conftest.$ac_ext
26142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
26143 printf "%s\n" "$gl_cv_cc_double_signbit" >&6; }
26144 case "$gl_cv_cc_double_signbit" in
26146 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26147 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
26149 printf "%s\n" "#define DBL_SIGNBIT_WORD $word" >>confdefs.h
26152 printf "%s\n" "#define DBL_SIGNBIT_BIT $bit" >>confdefs.h
26160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
26161 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
26162 if test ${gl_cv_cc_long_double_signbit+y}
26164 printf %s "(cached) " >&6
26167 if test "$cross_compiling" = yes
26170 gl_cv_cc_long_double_signbit="unknown"
26173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26174 /* end confdefs.h. */
26176 #include <stddef.h>
26179 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26180 typedef union { long double value; unsigned int word[NWORDS]; }
26182 static memory_float plus = { 1.0L };
26183 static memory_float minus = { -1.0L };
26188 FILE *fp = fopen ("conftest.out", "w");
26191 /* Find the different bit. */
26193 for (j = 0; j < NWORDS; j++)
26195 unsigned int x = plus.word[j] ^ minus.word[j];
26196 if ((x & (x - 1)) || (x && m))
26198 /* More than one bit difference. */
26199 fprintf (fp, "unknown");
26211 /* No difference. */
26212 fprintf (fp, "unknown");
26216 /* Now m = plus.word[k] ^ ~minus.word[k]. */
26217 if (plus.word[k] & ~minus.word[k])
26219 /* Oh? The sign bit is set in the positive and cleared in the negative
26221 fprintf (fp, "unknown");
26228 fprintf (fp, "word %d bit %d", (int) k, (int) i);
26229 if (fclose (fp) != 0)
26235 if ac_fn_c_try_run "$LINENO"
26237 gl_cv_cc_long_double_signbit=`cat conftest.out`
26239 gl_cv_cc_long_double_signbit="unknown"
26241 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26242 conftest.$ac_objext conftest.beam conftest.$ac_ext
26248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
26249 printf "%s\n" "$gl_cv_cc_long_double_signbit" >&6; }
26250 case "$gl_cv_cc_long_double_signbit" in
26252 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26253 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
26255 printf "%s\n" "#define LDBL_SIGNBIT_WORD $word" >>confdefs.h
26258 printf "%s\n" "#define LDBL_SIGNBIT_BIT $bit" >>confdefs.h
26264 if test "$gl_cv_cc_float_signbit" = unknown; then
26265 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
26267 if test "x$ac_cv_have_decl_copysignf" = xyes
26274 printf "%s\n" "#define HAVE_DECL_COPYSIGNF $ac_have_decl" >>confdefs.h
26276 if test "$ac_cv_have_decl_copysignf" = yes; then
26277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
26278 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
26279 if test ${gl_cv_func_copysignf_no_libm+y}
26281 printf %s "(cached) " >&6
26284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26285 /* end confdefs.h. */
26291 return copysignf (x, y) < 0;
26296 if ac_fn_c_try_link "$LINENO"
26298 gl_cv_func_copysignf_no_libm=yes
26300 gl_cv_func_copysignf_no_libm=no
26302 rm -f core conftest.err conftest.$ac_objext \
26303 conftest$ac_exeext conftest.$ac_ext
26306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
26307 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
26308 if test $gl_cv_func_copysignf_no_libm = yes; then
26310 printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
26315 if test "$gl_cv_cc_double_signbit" = unknown; then
26316 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
26318 if test "x$ac_cv_have_decl_copysign" = xyes
26325 printf "%s\n" "#define HAVE_DECL_COPYSIGN $ac_have_decl" >>confdefs.h
26327 if test "$ac_cv_have_decl_copysign" = yes; then
26328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
26329 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
26330 if test ${gl_cv_func_copysign_no_libm+y}
26332 printf %s "(cached) " >&6
26335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26336 /* end confdefs.h. */
26342 return copysign (x, y) < 0;
26347 if ac_fn_c_try_link "$LINENO"
26349 gl_cv_func_copysign_no_libm=yes
26351 gl_cv_func_copysign_no_libm=no
26353 rm -f core conftest.err conftest.$ac_objext \
26354 conftest$ac_exeext conftest.$ac_ext
26357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
26358 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
26359 if test $gl_cv_func_copysign_no_libm = yes; then
26361 printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
26366 if test "$gl_cv_cc_long_double_signbit" = unknown; then
26367 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
26369 if test "x$ac_cv_have_decl_copysignl" = xyes
26376 printf "%s\n" "#define HAVE_DECL_COPYSIGNL $ac_have_decl" >>confdefs.h
26378 if test "$ac_cv_have_decl_copysignl" = yes; then
26379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
26380 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
26381 if test ${gl_cv_func_copysignl_no_libm+y}
26383 printf %s "(cached) " >&6
26386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26387 /* end confdefs.h. */
26393 return copysignl (x, y) < 0;
26398 if ac_fn_c_try_link "$LINENO"
26400 gl_cv_func_copysignl_no_libm=yes
26402 gl_cv_func_copysignl_no_libm=no
26404 rm -f core conftest.err conftest.$ac_objext \
26405 conftest$ac_exeext conftest.$ac_ext
26408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
26409 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
26410 if test $gl_cv_func_copysignl_no_libm = yes; then
26412 printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
26422 if test $REPLACE_SIGNBIT = 1; then
26431 gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
26441 gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
26451 gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
26465 printf "%s\n" "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
26470 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
26471 if test "x$ac_cv_header_stdint_h" = xyes
26473 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
26477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
26478 printf %s "checking for SIZE_MAX... " >&6; }
26479 if test ${gl_cv_size_max+y}
26481 printf %s "(cached) " >&6
26485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26486 /* end confdefs.h. */
26488 #include <limits.h>
26490 #include <stdint.h>
26497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26498 $EGREP "Found it" >/dev/null 2>&1
26504 if test -z "$gl_cv_size_max"; then
26505 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
26506 #include <limits.h>"
26510 size_t_bits_minus_1=
26513 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
26520 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
26521 if test $fits_in_uint = 1; then
26522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26523 /* end confdefs.h. */
26524 #include <stddef.h>
26526 extern unsigned long foo;
26536 if ac_fn_c_try_compile "$LINENO"
26540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26542 if test $fits_in_uint = 1; then
26543 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
26545 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
26548 gl_cv_size_max='((size_t)~(size_t)0)'
26553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
26554 printf "%s\n" "$gl_cv_size_max" >&6; }
26555 if test "$gl_cv_size_max" != yes; then
26557 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
26563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26564 printf %s "checking for ssize_t... " >&6; }
26565 if test ${gt_cv_ssize_t+y}
26567 printf %s "(cached) " >&6
26569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26570 /* end confdefs.h. */
26571 #include <sys/types.h>
26575 int x = sizeof (ssize_t *) + sizeof (ssize_t);
26581 if ac_fn_c_try_compile "$LINENO"
26587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26590 printf "%s\n" "$gt_cv_ssize_t" >&6; }
26591 if test $gt_cv_ssize_t = no; then
26593 printf "%s\n" "#define ssize_t int" >>confdefs.h
26606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
26607 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
26608 if test ${gl_cv_func_stat_file_slash+y}
26610 printf %s "(cached) " >&6
26613 # Assume that if we have lstat, we can also check symlinks.
26614 if test $ac_cv_func_lstat = yes; then
26615 ln -s conftest.tmp conftest.lnk
26617 if test "$cross_compiling" = yes
26620 # Guess yes on glibc systems.
26621 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
26622 # If we don't know, assume the worst.
26623 *) gl_cv_func_stat_file_slash="guessing no" ;;
26627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26628 /* end confdefs.h. */
26629 #include <sys/stat.h>
26636 if (!stat ("conftest.tmp/", &st))
26639 if (!stat ("conftest.lnk/", &st))
26648 if ac_fn_c_try_run "$LINENO"
26650 gl_cv_func_stat_file_slash=yes
26652 gl_cv_func_stat_file_slash=no
26654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26655 conftest.$ac_objext conftest.beam conftest.$ac_ext
26658 rm -f conftest.tmp conftest.lnk
26660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
26661 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
26662 case $gl_cv_func_stat_file_slash in
26666 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
26676 if test $REPLACE_STAT = 1; then
26685 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
26697 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
26717 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
26725 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
26726 #include <sys/stat.h>
26728 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
26731 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
26733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26734 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26735 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
26737 printf %s "(cached) " >&6
26739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26740 /* end confdefs.h. */
26742 #include <sys/types.h>
26743 #include <sys/stat.h>
26744 #if HAVE_SYS_TIME_H
26745 # include <sys/time.h>
26748 struct timespec ts;
26761 if ac_fn_c_try_compile "$LINENO"
26763 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
26765 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
26767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26770 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26771 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
26773 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
26777 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
26778 #include <sys/stat.h>
26780 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
26783 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
26787 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26788 #include <sys/stat.h>
26790 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
26793 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
26797 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
26798 #include <sys/stat.h>
26800 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
26803 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
26818 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
26819 #include <sys/stat.h>
26821 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
26824 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
26828 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26829 #include <sys/stat.h>
26831 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
26834 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
26838 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
26839 #include <sys/stat.h>
26841 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
26844 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
26856 printf "%s\n" "#define GNULIB_STATAT 1" >>confdefs.h
26861 # Define two additional variables used in the Makefile substitution.
26863 if test "$ac_cv_header_stdbool_h" = yes; then
26866 STDBOOL_H='stdbool.h'
26869 if test -n "$STDBOOL_H"; then
26870 GL_GENERATE_STDBOOL_H_TRUE=
26871 GL_GENERATE_STDBOOL_H_FALSE='#'
26873 GL_GENERATE_STDBOOL_H_TRUE='#'
26874 GL_GENERATE_STDBOOL_H_FALSE=
26878 if test "$ac_cv_type__Bool" = yes; then
26889 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
26892 if test "x$ac_cv_type_max_align_t" = xyes
26896 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
26899 if test $gt_cv_c_wchar_t = no; then
26903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26904 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
26905 if test ${gl_cv_decl_null_works+y}
26907 printf %s "(cached) " >&6
26909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26910 /* end confdefs.h. */
26911 #include <stddef.h>
26912 int test[2 * (sizeof NULL == sizeof (void *)) -1];
26922 if ac_fn_c_try_compile "$LINENO"
26924 gl_cv_decl_null_works=yes
26926 gl_cv_decl_null_works=no
26928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26931 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
26932 if test $gl_cv_decl_null_works = no; then
26937 if test -n "$STDDEF_H"; then
26938 GL_GENERATE_STDDEF_H_TRUE=
26939 GL_GENERATE_STDDEF_H_FALSE='#'
26941 GL_GENERATE_STDDEF_H_TRUE='#'
26942 GL_GENERATE_STDDEF_H_FALSE=
26945 if test -n "$STDDEF_H"; then
26954 if test $gl_cv_have_include_next = yes; then
26955 gl_cv_next_stddef_h='<'stddef.h'>'
26957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26958 printf %s "checking absolute name of <stddef.h>... " >&6; }
26959 if test ${gl_cv_next_stddef_h+y}
26961 printf %s "(cached) " >&6
26966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26967 /* end confdefs.h. */
26968 #include <stddef.h>
26971 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26972 *) gl_absname_cpp="$ac_cpp" ;;
26977 gl_dirsep_regex='[/\\]'
26980 gl_dirsep_regex='\/'
26983 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26984 gl_header_literal_regex=`echo 'stddef.h' \
26985 | sed -e "$gl_make_literal_regex_sed"`
26986 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26987 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26993 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26994 sed -n "$gl_absolute_header_sed"`
26996 gl_header=$gl_cv_absolute_stddef_h
26997 gl_cv_next_stddef_h='"'$gl_header'"'
27001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27002 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
27004 NEXT_STDDEF_H=$gl_cv_next_stddef_h
27006 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27007 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27008 gl_next_as_first_directive='<'stddef.h'>'
27010 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27011 gl_next_as_first_directive=$gl_cv_next_stddef_h
27013 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27023 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27034 if test $gl_cv_have_include_next = yes; then
27035 gl_cv_next_stdio_h='<'stdio.h'>'
27037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
27038 printf %s "checking absolute name of <stdio.h>... " >&6; }
27039 if test ${gl_cv_next_stdio_h+y}
27041 printf %s "(cached) " >&6
27046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27047 /* end confdefs.h. */
27051 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27052 *) gl_absname_cpp="$ac_cpp" ;;
27057 gl_dirsep_regex='[/\\]'
27060 gl_dirsep_regex='\/'
27063 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27064 gl_header_literal_regex=`echo 'stdio.h' \
27065 | sed -e "$gl_make_literal_regex_sed"`
27066 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27067 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27073 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27074 sed -n "$gl_absolute_header_sed"`
27076 gl_header=$gl_cv_absolute_stdio_h
27077 gl_cv_next_stdio_h='"'$gl_header'"'
27081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
27082 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
27084 NEXT_STDIO_H=$gl_cv_next_stdio_h
27086 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27087 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27088 gl_next_as_first_directive='<'stdio.h'>'
27090 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27091 gl_next_as_first_directive=$gl_cv_next_stdio_h
27093 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
27099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
27100 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
27101 if test ${gl_cv_func_printf_attribute_flavor+y}
27103 printf %s "(cached) " >&6
27105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27106 /* end confdefs.h. */
27108 #define __STDC_FORMAT_MACROS 1
27110 #include <inttypes.h>
27111 /* For non-mingw systems, compilation will trivially succeed.
27112 For mingw, compilation will succeed for older mingw (system
27113 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
27114 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
27115 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
27116 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
27127 if ac_fn_c_try_compile "$LINENO"
27129 gl_cv_func_printf_attribute_flavor=system
27131 gl_cv_func_printf_attribute_flavor=gnu
27133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
27136 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
27137 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
27139 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
27146 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
27152 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
27187 if test $gl_cv_have_include_next = yes; then
27188 gl_cv_next_stdlib_h='<'stdlib.h'>'
27190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
27191 printf %s "checking absolute name of <stdlib.h>... " >&6; }
27192 if test ${gl_cv_next_stdlib_h+y}
27194 printf %s "(cached) " >&6
27199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27200 /* end confdefs.h. */
27201 #include <stdlib.h>
27204 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27205 *) gl_absname_cpp="$ac_cpp" ;;
27210 gl_dirsep_regex='[/\\]'
27213 gl_dirsep_regex='\/'
27216 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27217 gl_header_literal_regex=`echo 'stdlib.h' \
27218 | sed -e "$gl_make_literal_regex_sed"`
27219 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27220 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27226 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27227 sed -n "$gl_absolute_header_sed"`
27229 gl_header=$gl_cv_absolute_stdlib_h
27230 gl_cv_next_stdlib_h='"'$gl_header'"'
27234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
27235 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
27237 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
27239 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27240 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27241 gl_next_as_first_directive='<'stdlib.h'>'
27243 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27244 gl_next_as_first_directive=$gl_cv_next_stdlib_h
27246 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
27258 STDNORETURN_H='stdnoreturn.h'
27261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
27262 printf %s "checking for working stdnoreturn.h... " >&6; }
27263 if test ${gl_cv_header_working_stdnoreturn_h+y}
27265 printf %s "(cached) " >&6
27267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27268 /* end confdefs.h. */
27269 #include <stdlib.h>
27270 #include <stdnoreturn.h>
27271 /* Do not check for 'noreturn' after the return type.
27272 C11 allows it, but it's rarely done that way
27273 and circa-2012 bleeding-edge GCC rejects it when given
27274 -Werror=old-style-declaration. */
27275 noreturn void foo1 (void) { exit (0); }
27276 _Noreturn void foo2 (void) { exit (0); }
27277 int testit (int argc, char **argv)
27281 (argv[0][0] ? foo1 : foo2) ();
27292 if ac_fn_c_try_compile "$LINENO"
27294 gl_cv_header_working_stdnoreturn_h=yes
27296 gl_cv_header_working_stdnoreturn_h=no
27298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
27301 printf "%s\n" "$gl_cv_header_working_stdnoreturn_h" >&6; }
27302 if test $gl_cv_header_working_stdnoreturn_h = yes; then
27305 STDNORETURN_H='stdnoreturn.h'
27310 if test -n "$STDNORETURN_H"; then
27311 GL_GENERATE_STDNORETURN_H_TRUE=
27312 GL_GENERATE_STDNORETURN_H_FALSE='#'
27314 GL_GENERATE_STDNORETURN_H_TRUE='#'
27315 GL_GENERATE_STDNORETURN_H_FALSE=
27325 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
27326 if test "x$ac_cv_func_stpcpy" = xyes
27328 printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
27332 if test $ac_cv_func_stpcpy = no; then
27336 if test $HAVE_STPCPY = 0; then
27345 gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
27362 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
27370 if test $ac_cv_func_strdup = yes; then
27371 if test $gl_cv_func_malloc_posix != yes; then
27376 if test $ac_cv_have_decl_strdup = no; then
27380 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
27389 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
27404 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
27415 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
27417 printf %s "checking for working strerror function... " >&6; }
27418 if test ${gl_cv_func_working_strerror+y}
27420 printf %s "(cached) " >&6
27422 if test "$cross_compiling" = yes
27425 # Guess yes on glibc systems.
27426 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
27427 # If we don't know, assume the worst.
27428 *) gl_cv_func_working_strerror="guessing no" ;;
27432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27433 /* end confdefs.h. */
27434 #include <string.h>
27439 if (!*strerror (-2)) return 1;
27444 if ac_fn_c_try_run "$LINENO"
27446 gl_cv_func_working_strerror=yes
27448 gl_cv_func_working_strerror=no
27450 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27451 conftest.$ac_objext conftest.beam conftest.$ac_ext
27456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
27457 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
27458 case "$gl_cv_func_working_strerror" in
27465 case "$gl_cv_func_strerror_r_works" in
27466 *no) REPLACE_STRERROR=1 ;;
27473 if test $REPLACE_STRERROR = 1; then
27482 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
27487 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
27501 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
27507 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
27516 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
27522 if test $ac_cv_header_sys_socket_h != yes; then
27523 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27524 if test "x$ac_cv_header_winsock2_h" = xyes
27526 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
27531 if test "$ac_cv_header_winsock2_h" = yes; then
27533 UNISTD_H_HAVE_WINSOCK2_H=1
27534 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27548 if test $ac_cv_have_decl_strerror_r = no; then
27549 HAVE_DECL_STRERROR_R=0
27552 if test $ac_cv_func_strerror_r = yes; then
27553 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27554 if test $gl_cv_func_strerror_r_posix_signature = yes; then
27555 case "$gl_cv_func_strerror_r_works" in
27556 *no) REPLACE_STRERROR_R=1 ;;
27559 REPLACE_STRERROR_R=1
27562 REPLACE_STRERROR_R=1
27566 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
27575 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
27588 GNULIB_STRERROR_R=1
27594 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
27600 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX 1" >>confdefs.h
27620 if test $gl_cv_have_include_next = yes; then
27621 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27624 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
27625 if test ${gl_cv_next_sys_stat_h+y}
27627 printf %s "(cached) " >&6
27630 if test $ac_cv_header_sys_stat_h = yes; then
27635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27636 /* end confdefs.h. */
27637 #include <sys/stat.h>
27640 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27641 *) gl_absname_cpp="$ac_cpp" ;;
27646 gl_dirsep_regex='[/\\]'
27649 gl_dirsep_regex='\/'
27652 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27653 gl_header_literal_regex=`echo 'sys/stat.h' \
27654 | sed -e "$gl_make_literal_regex_sed"`
27655 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27656 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27662 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27663 sed -n "$gl_absolute_header_sed"`
27665 gl_header=$gl_cv_absolute_sys_stat_h
27666 gl_cv_next_sys_stat_h='"'$gl_header'"'
27668 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27674 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
27676 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
27678 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27679 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27680 gl_next_as_first_directive='<'sys/stat.h'>'
27682 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27683 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27685 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
27694 WINDOWS_STAT_TIMESPEC=0
27703 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27704 #include <sys/stat.h>
27706 if test "x$ac_cv_type_nlink_t" = xyes
27711 printf "%s\n" "#define nlink_t int" >>confdefs.h
27745 if test $gl_cv_have_include_next = yes; then
27746 gl_cv_next_unistd_h='<'unistd.h'>'
27748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27749 printf %s "checking absolute name of <unistd.h>... " >&6; }
27750 if test ${gl_cv_next_unistd_h+y}
27752 printf %s "(cached) " >&6
27755 if test $ac_cv_header_unistd_h = yes; then
27760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27761 /* end confdefs.h. */
27762 #include <unistd.h>
27765 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27766 *) gl_absname_cpp="$ac_cpp" ;;
27771 gl_dirsep_regex='[/\\]'
27774 gl_dirsep_regex='\/'
27777 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27778 gl_header_literal_regex=`echo 'unistd.h' \
27779 | sed -e "$gl_make_literal_regex_sed"`
27780 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27781 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27787 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27788 sed -n "$gl_absolute_header_sed"`
27790 gl_header=$gl_cv_absolute_unistd_h
27791 gl_cv_next_unistd_h='"'$gl_header'"'
27793 gl_cv_next_unistd_h='<'unistd.h'>'
27798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27799 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
27801 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27803 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27804 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27805 gl_next_as_first_directive='<'unistd.h'>'
27807 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27808 gl_next_as_first_directive=$gl_cv_next_unistd_h
27810 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27815 if test $ac_cv_header_unistd_h = yes; then
27836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
27837 printf %s "checking whether unlink honors trailing slashes... " >&6; }
27838 if test ${gl_cv_func_unlink_honors_slashes+y}
27840 printf %s "(cached) " >&6
27842 touch conftest.file
27843 # Assume that if we have lstat, we can also check symlinks.
27844 if test $ac_cv_func_lstat = yes; then
27845 ln -s conftest.file conftest.lnk
27847 if test "$cross_compiling" = yes
27850 # Guess yes on glibc systems.
27851 *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
27852 # Guess no on native Windows.
27853 mingw*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
27854 # If we don't know, assume the worst.
27855 *) gl_cv_func_unlink_honors_slashes="guessing no" ;;
27859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27860 /* end confdefs.h. */
27862 # include <unistd.h>
27863 #else /* on Windows with MSVC */
27872 if (!unlink ("conftest.file/"))
27874 else if (errno != ENOTDIR)
27877 if (!unlink ("conftest.lnk/"))
27879 else if (errno != ENOTDIR)
27888 if ac_fn_c_try_run "$LINENO"
27890 gl_cv_func_unlink_honors_slashes=yes
27892 gl_cv_func_unlink_honors_slashes=no
27894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27895 conftest.$ac_objext conftest.beam conftest.$ac_ext
27898 rm -f conftest.file conftest.lnk
27900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
27901 printf "%s\n" "$gl_cv_func_unlink_honors_slashes" >&6; }
27902 case "$gl_cv_func_unlink_honors_slashes" in
27908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
27909 printf %s "checking whether unlink of a parent directory fails as it should... " >&6; }
27910 if test ${gl_cv_func_unlink_parent_fails+y}
27912 printf %s "(cached) " >&6
27917 # Use the mktemp program if available. If not available, hide the error
27919 tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
27920 test -n "$tmp" && test -d "$tmp"
27923 # Use a simple mkdir command. It is guaranteed to fail if the directory
27924 # already exists. $RANDOM is bash specific and expands to empty in shells
27925 # other than bash, ksh and zsh. Its use does not increase security;
27926 # rather, it minimizes the probability of failure in a very cluttered /tmp
27928 tmp=/tmp/gt$$-$RANDOM
27929 (umask 077 && mkdir "$tmp")
27931 mkdir "$tmp/subdir"
27932 GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
27933 export GL_SUBDIR_FOR_UNLINK
27934 if test "$cross_compiling" = yes
27936 # If we don't know, assume the worst.
27937 gl_cv_func_unlink_parent_fails="guessing no"
27940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27941 /* end confdefs.h. */
27943 #include <stdlib.h>
27945 # include <unistd.h>
27946 #else /* on Windows with MSVC */
27947 # include <direct.h>
27953 if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
27955 else if (unlink ("..") == 0)
27961 if ac_fn_c_try_run "$LINENO"
27963 gl_cv_func_unlink_parent_fails=yes
27965 gl_cv_func_unlink_parent_fails=no
27967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27968 conftest.$ac_objext conftest.beam conftest.$ac_ext
27971 unset GL_SUBDIR_FOR_UNLINK
27974 gl_cv_func_unlink_parent_fails="guessing no"
27978 gl_cv_func_unlink_parent_fails="guessing yes"
27983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
27984 printf "%s\n" "$gl_cv_func_unlink_parent_fails" >&6; }
27985 case "$gl_cv_func_unlink_parent_fails" in
27989 printf "%s\n" "#define UNLINK_PARENT_BUG 1" >>confdefs.h
27994 if test $REPLACE_UNLINK = 1; then
28003 gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
28017 printf "%s\n" "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
28027 if test $ac_cv_func_unlinkat = no; then
28030 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
28032 # Solaris 9 has *at functions, but uniformly mishandles trailing
28033 # slash in all of them.
28037 # GNU/Hurd has unlinkat, but it has the same bug as unlink.
28038 # Darwin has unlinkat, but it has the same UNLINK_PARENT_BUG.
28039 if test $REPLACE_UNLINK = 1; then
28046 if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
28055 gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
28069 printf "%s\n" "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
28077 if test $ac_cv_func_utime = no; then
28087 if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then
28096 gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext"
28111 printf "%s\n" "#define GNULIB_TEST_UTIME 1" >>confdefs.h
28128 if test $gl_cv_have_include_next = yes; then
28129 gl_cv_next_utime_h='<'utime.h'>'
28131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5
28132 printf %s "checking absolute name of <utime.h>... " >&6; }
28133 if test ${gl_cv_next_utime_h+y}
28135 printf %s "(cached) " >&6
28138 if test $ac_cv_header_utime_h = yes; then
28143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28144 /* end confdefs.h. */
28148 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28149 *) gl_absname_cpp="$ac_cpp" ;;
28154 gl_dirsep_regex='[/\\]'
28157 gl_dirsep_regex='\/'
28160 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28161 gl_header_literal_regex=`echo 'utime.h' \
28162 | sed -e "$gl_make_literal_regex_sed"`
28163 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28164 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28170 gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28171 sed -n "$gl_absolute_header_sed"`
28173 gl_header=$gl_cv_absolute_utime_h
28174 gl_cv_next_utime_h='"'$gl_header'"'
28176 gl_cv_next_utime_h='<'utime.h'>'
28181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5
28182 printf "%s\n" "$gl_cv_next_utime_h" >&6; }
28184 NEXT_UTIME_H=$gl_cv_next_utime_h
28186 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28187 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28188 gl_next_as_first_directive='<'utime.h'>'
28190 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28191 gl_next_as_first_directive=$gl_cv_next_utime_h
28193 NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive
28199 if test $ac_cv_header_utime_h = yes; then
28207 if test $ac_cv_header_utime_h != yes; then
28211 mingw*) UTIME_H=utime.h
28216 if test -n "$UTIME_H"; then
28217 GL_GENERATE_UTIME_H_TRUE=
28218 GL_GENERATE_UTIME_H_FALSE='#'
28220 GL_GENERATE_UTIME_H_TRUE='#'
28221 GL_GENERATE_UTIME_H_FALSE=
28232 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
28233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
28234 printf %s "checking whether futimesat handles NULL file... " >&6; }
28235 if test ${gl_cv_func_futimesat_works+y}
28237 printf %s "(cached) " >&6
28239 touch conftest.file
28240 if test "$cross_compiling" = yes
28243 # Guess yes on glibc systems.
28244 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
28245 # If we don't know, assume the worst.
28246 *) gl_cv_func_futimesat_works="guessing no" ;;
28250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28251 /* end confdefs.h. */
28253 #include <stddef.h>
28254 #include <sys/times.h>
28260 int fd = open ("conftest.file", O_RDWR);
28261 if (fd < 0) return 1;
28262 if (futimesat (fd, NULL, NULL)) return 2;
28268 if ac_fn_c_try_run "$LINENO"
28270 gl_cv_func_futimesat_works=yes
28272 gl_cv_func_futimesat_works=no
28274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28275 conftest.$ac_objext conftest.beam conftest.$ac_ext
28278 rm -f conftest.file
28280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
28281 printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
28282 case "$gl_cv_func_futimesat_works" in
28286 printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
28294 if test $ac_cv_func_vasnprintf = no; then
28305 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
28315 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
28325 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
28335 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
28337 if test $ac_cv_func_vasnprintf = yes; then
28339 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28353 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28354 if test "x$ac_cv_type_ptrdiff_t" = xyes
28359 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
28387 gl_cv_func_vfprintf_posix=no
28388 case "$gl_cv_func_printf_sizes_c99" in
28390 case "$gl_cv_func_printf_long_double" in
28392 case "$gl_cv_func_printf_infinite" in
28394 case "$gl_cv_func_printf_infinite_long_double" in
28396 case "$gl_cv_func_printf_directive_a" in
28398 case "$gl_cv_func_printf_directive_f" in
28400 case "$gl_cv_func_printf_directive_n" in
28402 case "$gl_cv_func_printf_directive_ls" in
28404 case "$gl_cv_func_printf_positions" in
28406 case "$gl_cv_func_printf_flag_grouping" in
28408 case "$gl_cv_func_printf_flag_leftadjust" in
28410 case "$gl_cv_func_printf_flag_zero" in
28412 case "$gl_cv_func_printf_precision" in
28414 case "$gl_cv_func_printf_enomem" in
28416 # vfprintf exists and is
28417 # already POSIX compliant.
28418 gl_cv_func_vfprintf_posix=yes
28447 if test $gl_cv_func_vfprintf_posix = no; then
28451 case "$gl_cv_func_printf_infinite" in
28456 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
28464 case "$gl_cv_func_printf_long_double" in
28466 case "$gl_cv_func_printf_infinite_long_double" in
28471 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
28480 case "$gl_cv_func_printf_directive_a" in
28485 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
28487 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
28488 if test "x$ac_cv_func_nl_langinfo" = xyes
28490 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
28499 case "$gl_cv_func_printf_directive_f" in
28504 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
28511 case "$gl_cv_func_printf_directive_ls" in
28516 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
28523 case "$gl_cv_func_printf_flag_grouping" in
28528 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
28535 case "$gl_cv_func_printf_flag_leftadjust" in
28540 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
28547 case "$gl_cv_func_printf_flag_zero" in
28552 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
28559 case "$gl_cv_func_printf_precision" in
28564 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
28567 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
28570 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28577 case "$gl_cv_func_printf_enomem" in
28582 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
28585 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
28588 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28603 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
28613 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
28623 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
28633 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
28635 if test $ac_cv_func_vasnprintf = yes; then
28637 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28651 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28652 if test "x$ac_cv_type_ptrdiff_t" = xyes
28657 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
28678 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
28682 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
28693 GNULIB_VFPRINTF_POSIX=1
28699 printf "%s\n" "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
28715 if test $gl_cv_have_include_next = yes; then
28716 gl_cv_next_wchar_h='<'wchar.h'>'
28718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
28719 printf %s "checking absolute name of <wchar.h>... " >&6; }
28720 if test ${gl_cv_next_wchar_h+y}
28722 printf %s "(cached) " >&6
28725 if test $ac_cv_header_wchar_h = yes; then
28730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28731 /* end confdefs.h. */
28735 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28736 *) gl_absname_cpp="$ac_cpp" ;;
28741 gl_dirsep_regex='[/\\]'
28744 gl_dirsep_regex='\/'
28747 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28748 gl_header_literal_regex=`echo 'wchar.h' \
28749 | sed -e "$gl_make_literal_regex_sed"`
28750 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28751 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28757 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28758 sed -n "$gl_absolute_header_sed"`
28760 gl_header=$gl_cv_absolute_wchar_h
28761 gl_cv_next_wchar_h='"'$gl_header'"'
28763 gl_cv_next_wchar_h='<'wchar.h'>'
28768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
28769 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
28771 NEXT_WCHAR_H=$gl_cv_next_wchar_h
28773 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28774 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28775 gl_next_as_first_directive='<'wchar.h'>'
28777 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28778 gl_next_as_first_directive=$gl_cv_next_wchar_h
28780 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
28785 if test $ac_cv_header_wchar_h = yes; then
28795 if test $gt_cv_c_wint_t = yes; then
28809 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
28810 if test "x$ac_cv_header_stdint_h" = xyes
28812 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
28821 # End of code from modules
28842 gl_source_base='tests'
28843 gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
28845 gl_module_indicator_condition=$gltests_WITNESS
28855 LIBGZIP_LIBDEPS="$gl_libdeps"
28857 LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
28861 # Check whether --enable-gcc-warnings was given.
28862 if test ${enable_gcc_warnings+y}
28864 enableval=$enable_gcc_warnings; case $enableval in
28866 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
28868 gl_gcc_warnings=$enableval
28870 if test -d "$srcdir"/.git; then
28871 gl_gcc_warnings=yes
28879 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
28880 # ------------------------------------------------
28881 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
28882 # Otherwise, run RUN-IF-NOT-FOUND.
28885 if test "$gl_gcc_warnings" = yes; then
28888 ac_cpp='$CPP $CPPFLAGS'
28889 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28890 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28891 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
28895 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
28896 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
28898 printf %s "(cached) " >&6
28901 gl_save_compiler_FLAGS="$CFLAGS"
28902 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
28903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28904 /* end confdefs.h. */
28914 if ac_fn_c_try_link "$LINENO"
28916 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
28918 gl_cv_warn_c__Werror__Wunknown_warning_option=no
28920 rm -f core conftest.err conftest.$ac_objext \
28921 conftest$ac_exeext conftest.$ac_ext
28922 CFLAGS="$gl_save_compiler_FLAGS"
28925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
28926 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
28927 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
28929 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
28931 gl_unknown_warnings_are_errors=
28935 ac_cpp='$CPP $CPPFLAGS'
28936 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28937 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28938 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
28944 printf %s "checking whether C compiler handles -Werror... " >&6; }
28945 if test ${gl_cv_warn_c__Werror+y}
28947 printf %s "(cached) " >&6
28950 gl_save_compiler_FLAGS="$CFLAGS"
28951 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
28952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28953 /* end confdefs.h. */
28963 if ac_fn_c_try_link "$LINENO"
28965 gl_cv_warn_c__Werror=yes
28967 gl_cv_warn_c__Werror=no
28969 rm -f core conftest.err conftest.$ac_objext \
28970 conftest$ac_exeext conftest.$ac_ext
28971 CFLAGS="$gl_save_compiler_FLAGS"
28974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
28975 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
28976 if test "x$gl_cv_warn_c__Werror" = xyes
28978 as_fn_append WERROR_CFLAGS " -Werror"
28985 # This, $nw, is the list of warnings we disable.
28986 nw="$nw -Wdeclaration-after-statement" # too useful to forbid
28987 nw="$nw -Waggregate-return" # anachronistic
28988 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
28989 nw="$nw -Wc++-compat" # We don't care about C++ compilers
28990 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
28991 nw="$nw -Wtraditional" # Warns on #elif which we use often
28992 nw="$nw -Wcast-qual" # Too many warnings for now
28993 nw="$nw -Wconversion" # Too many warnings for now
28994 nw="$nw -Wduplicated-branches" # Too many false alarms
28995 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
28996 nw="$nw -Wsign-conversion" # Too many warnings for now
28997 nw="$nw -Wtraditional-conversion" # Too many warnings for now
28998 nw="$nw -Wunreachable-code" # Too many warnings for now
28999 nw="$nw -Wpadded" # Our structs are not padded
29000 nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat
29001 nw="$nw -Wlogical-op" # any use of fwrite provokes this
29002 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
29003 nw="$nw -Wvla" # warnings in gettext.h
29004 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
29005 nw="$nw -Wswitch-enum" # Too many warnings for now
29006 nw="$nw -Wswitch-default" # Too many warnings for now
29007 nw="$nw -Wstack-protector" # not worth working around
29008 # things I might fix soon:
29009 nw="$nw -Wfloat-equal" # sort.c, seq.c
29010 nw="$nw -Wmissing-format-attribute" # copy.c
29011 nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
29012 nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
29014 # Warnings that gzip runs afoul of but coreutils does not.
29015 nw="$nw -Wold-style-definition"
29017 nw="$nw -Wstrict-overflow"
29019 # Using -Wstrict-overflow is a pain, but the alternative is worse.
29020 # For an example, see the code that provoked this report:
29021 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
29022 # Code like that still infloops with gcc-4.6.0 and -O2. Scary indeed.
29026 ac_cpp='$CPP $CPPFLAGS'
29027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29033 if test -n "$GCC"; then
29035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
29036 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
29037 if test ${gl_cv_cc_nomfi_supported+y}
29039 printf %s "(cached) " >&6
29042 gl_save_CFLAGS="$CFLAGS"
29043 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
29044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29045 /* end confdefs.h. */
29055 if ac_fn_c_try_compile "$LINENO"
29057 gl_cv_cc_nomfi_supported=yes
29059 gl_cv_cc_nomfi_supported=no
29061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29062 CFLAGS="$gl_save_CFLAGS"
29065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
29066 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
29068 if test "$gl_cv_cc_nomfi_supported" = yes; then
29069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
29070 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
29071 if test ${gl_cv_cc_nomfi_needed+y}
29073 printf %s "(cached) " >&6
29076 gl_save_CFLAGS="$CFLAGS"
29077 CFLAGS="$CFLAGS -W -Werror"
29078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29079 /* end confdefs.h. */
29082 typedef struct { int a; int b; } s_t;
29095 if ac_fn_c_try_compile "$LINENO"
29097 gl_cv_cc_nomfi_needed=no
29099 gl_cv_cc_nomfi_needed=yes
29101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29102 CFLAGS="$gl_save_CFLAGS"
29106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
29107 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
29110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
29111 printf %s "checking whether -Wuninitialized is supported... " >&6; }
29112 if test ${gl_cv_cc_uninitialized_supported+y}
29114 printf %s "(cached) " >&6
29117 gl_save_CFLAGS="$CFLAGS"
29118 CFLAGS="$CFLAGS -Werror -Wuninitialized"
29119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29120 /* end confdefs.h. */
29130 if ac_fn_c_try_compile "$LINENO"
29132 gl_cv_cc_uninitialized_supported=yes
29134 gl_cv_cc_uninitialized_supported=no
29136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29137 CFLAGS="$gl_save_CFLAGS"
29140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
29141 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
29145 # List all gcc warning categories.
29146 # To compare this list to your installed GCC's, run this Bash command:
29149 # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
29150 # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
29151 # grep -v -x -F -f <(
29152 # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
29155 for gl_manywarn_item in -fno-common \
29159 -Waggressive-loop-optimizations \
29162 -Wbad-function-cast \
29165 -Wbuiltin-declaration-mismatch \
29166 -Wbuiltin-macro-redefined \
29168 -Wchar-subscripts \
29173 -Wcoverage-mismatch \
29178 -Wdeprecated-declarations \
29179 -Wdesignated-init \
29180 -Wdisabled-optimization \
29181 -Wdiscarded-array-qualifiers \
29182 -Wdiscarded-qualifiers \
29184 -Wdouble-promotion \
29185 -Wduplicated-branches \
29186 -Wduplicated-cond \
29187 -Wduplicate-decl-specifier \
29191 -Wexpansion-to-defined \
29193 -Wformat-contains-nul \
29194 -Wformat-extra-args \
29195 -Wformat-nonliteral \
29196 -Wformat-security \
29197 -Wformat-signedness \
29199 -Wformat-zero-length \
29201 -Wfree-nonheap-object \
29203 -Wignored-attributes \
29204 -Wignored-qualifiers \
29206 -Wimplicit-function-declaration \
29208 -Wincompatible-pointer-types \
29212 -Wint-in-bool-context \
29213 -Wint-to-pointer-cast \
29214 -Winvalid-memory-model \
29216 -Wjump-misses-init \
29217 -Wlogical-not-parentheses \
29220 -Wmaybe-uninitialized \
29221 -Wmemset-elt-size \
29222 -Wmemset-transposed-args \
29223 -Wmisleading-indentation \
29225 -Wmissing-declarations \
29226 -Wmissing-field-initializers \
29227 -Wmissing-include-dirs \
29228 -Wmissing-parameter-type \
29229 -Wmissing-prototypes \
29234 -Wnonnull-compare \
29235 -Wnull-dereference \
29237 -Wold-style-declaration \
29238 -Wold-style-definition \
29241 -Woverlength-strings \
29244 -Wpacked-bitfield-compat \
29247 -Wpointer-compare \
29249 -Wpointer-to-int-cast \
29253 -Wreturn-local-addr \
29255 -Wscalar-storage-order \
29258 -Wshift-count-negative \
29259 -Wshift-count-overflow \
29260 -Wshift-negative-value \
29261 -Wsizeof-array-argument \
29262 -Wsizeof-pointer-memaccess \
29263 -Wstack-protector \
29264 -Wstrict-aliasing \
29265 -Wstrict-overflow \
29266 -Wstrict-prototypes \
29267 -Wsuggest-attribute=const \
29268 -Wsuggest-attribute=format \
29269 -Wsuggest-attribute=noreturn \
29270 -Wsuggest-attribute=pure \
29271 -Wsuggest-final-methods \
29272 -Wsuggest-final-types \
29276 -Wswitch-unreachable \
29279 -Wtautological-compare \
29284 -Wunknown-pragmas \
29285 -Wunsafe-loop-optimizations \
29287 -Wunused-but-set-parameter \
29288 -Wunused-but-set-variable \
29289 -Wunused-function \
29291 -Wunused-local-typedefs \
29293 -Wunused-parameter \
29296 -Wunused-variable \
29298 -Wvariadic-macros \
29299 -Wvector-operation-performance \
29301 -Wvolatile-register-var \
29305 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
29308 # gcc --help=warnings outputs an unusual form for these options; list
29309 # them here so that the above 'comm' command doesn't report a false match.
29310 # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
29311 # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
29312 # the only platforms where it does not fit in a long, so make that
29314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5
29315 printf %s "checking max safe object size... " >&6; }
29316 if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
29318 : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max" "#include <limits.h>
29319 #include <stddef.h>
29320 #include <stdint.h>
29325 gl_alloc_max=2147483647
29328 case $gl_alloc_max in
29329 -1) gl_alloc_max=9223372036854775807;;
29331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5
29332 printf "%s\n" "$gl_alloc_max" >&6; }
29333 gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
29334 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
29335 gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
29336 gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
29337 gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
29338 gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
29339 gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
29340 gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
29341 gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
29342 gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
29344 # These are needed for older GCC versions.
29345 if test -n "$GCC"; then
29346 case `($CC --version) 2>/dev/null` in
29347 'gcc (GCC) '[0-3].* | \
29348 'gcc (GCC) '4.[0-7].*)
29349 gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
29350 gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
29355 # Disable specific options as needed.
29356 if test "$gl_cv_cc_nomfi_needed" = yes; then
29357 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
29360 if test "$gl_cv_cc_uninitialized_supported" = no; then
29361 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
29364 ws=$gl_manywarn_set
29367 ac_cpp='$CPP $CPPFLAGS'
29368 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29369 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29379 *" $gl_warn_item "*)
29382 gl_warn_set="$gl_warn_set $gl_warn_item"
29391 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
29393 case $gl_positive in
29394 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
29396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
29397 printf %s "checking whether C compiler handles $w... " >&6; }
29398 if eval test \${$as_gl_Warn+y}
29400 printf %s "(cached) " >&6
29403 gl_save_compiler_FLAGS="$CFLAGS"
29404 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
29405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29406 /* end confdefs.h. */
29416 if ac_fn_c_try_link "$LINENO"
29418 eval "$as_gl_Warn=yes"
29420 eval "$as_gl_Warn=no"
29422 rm -f core conftest.err conftest.$ac_objext \
29423 conftest$ac_exeext conftest.$ac_ext
29424 CFLAGS="$gl_save_compiler_FLAGS"
29427 eval ac_res=\$$as_gl_Warn
29428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29429 printf "%s\n" "$ac_res" >&6; }
29430 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
29432 as_fn_append WARN_CFLAGS " $w"
29439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
29440 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
29441 if test ${gl_cv_warn_c__Wno_sign_compare+y}
29443 printf %s "(cached) " >&6
29446 gl_save_compiler_FLAGS="$CFLAGS"
29447 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
29448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29449 /* end confdefs.h. */
29459 if ac_fn_c_try_link "$LINENO"
29461 gl_cv_warn_c__Wno_sign_compare=yes
29463 gl_cv_warn_c__Wno_sign_compare=no
29465 rm -f core conftest.err conftest.$ac_objext \
29466 conftest$ac_exeext conftest.$ac_ext
29467 CFLAGS="$gl_save_compiler_FLAGS"
29470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
29471 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
29472 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
29474 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
29477 # Too many warnings for now
29480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
29481 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
29482 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
29484 printf %s "(cached) " >&6
29487 gl_save_compiler_FLAGS="$CFLAGS"
29488 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
29489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29490 /* end confdefs.h. */
29500 if ac_fn_c_try_link "$LINENO"
29502 gl_cv_warn_c__Wno_unused_parameter=yes
29504 gl_cv_warn_c__Wno_unused_parameter=no
29506 rm -f core conftest.err conftest.$ac_objext \
29507 conftest$ac_exeext conftest.$ac_ext
29508 CFLAGS="$gl_save_compiler_FLAGS"
29511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
29512 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
29513 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
29515 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
29518 # Too many warnings for now
29521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5
29522 printf %s "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; }
29523 if test ${gl_cv_warn_c__Wsuggest_attribute_const+y}
29525 printf %s "(cached) " >&6
29528 gl_save_compiler_FLAGS="$CFLAGS"
29529 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=const"
29530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29531 /* end confdefs.h. */
29541 if ac_fn_c_try_link "$LINENO"
29543 gl_cv_warn_c__Wsuggest_attribute_const=yes
29545 gl_cv_warn_c__Wsuggest_attribute_const=no
29547 rm -f core conftest.err conftest.$ac_objext \
29548 conftest$ac_exeext conftest.$ac_ext
29549 CFLAGS="$gl_save_compiler_FLAGS"
29552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_const" >&5
29553 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_const" >&6; }
29554 if test "x$gl_cv_warn_c__Wsuggest_attribute_const" = xyes
29556 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=const"
29562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=noreturn" >&5
29563 printf %s "checking whether C compiler handles -Wsuggest-attribute=noreturn... " >&6; }
29564 if test ${gl_cv_warn_c__Wsuggest_attribute_noreturn+y}
29566 printf %s "(cached) " >&6
29569 gl_save_compiler_FLAGS="$CFLAGS"
29570 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=noreturn"
29571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29572 /* end confdefs.h. */
29582 if ac_fn_c_try_link "$LINENO"
29584 gl_cv_warn_c__Wsuggest_attribute_noreturn=yes
29586 gl_cv_warn_c__Wsuggest_attribute_noreturn=no
29588 rm -f core conftest.err conftest.$ac_objext \
29589 conftest$ac_exeext conftest.$ac_ext
29590 CFLAGS="$gl_save_compiler_FLAGS"
29593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_noreturn" >&5
29594 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_noreturn" >&6; }
29595 if test "x$gl_cv_warn_c__Wsuggest_attribute_noreturn" = xyes
29597 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
29603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
29604 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
29605 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
29607 printf %s "(cached) " >&6
29610 gl_save_compiler_FLAGS="$CFLAGS"
29611 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
29612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29613 /* end confdefs.h. */
29623 if ac_fn_c_try_link "$LINENO"
29625 gl_cv_warn_c__Wno_format_nonliteral=yes
29627 gl_cv_warn_c__Wno_format_nonliteral=no
29629 rm -f core conftest.err conftest.$ac_objext \
29630 conftest$ac_exeext conftest.$ac_ext
29631 CFLAGS="$gl_save_compiler_FLAGS"
29634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
29635 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
29636 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
29638 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
29643 # Enable this warning only with gcc-4.7 and newer. With 4.6.2 20111027,
29644 # it suggests test.c's advance function may be pure, even though it
29645 # increments a global variable. Oops.
29646 # Normally we'd write code to test for the precise failure, but that
29647 # requires a relatively large input to make gcc exhibit the failure.
29648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29649 /* end confdefs.h. */
29651 #if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
29654 # error "your version of gcc is older than 4.7"
29666 if ac_fn_c_try_cpp "$LINENO"
29670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5
29671 printf %s "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; }
29672 if test ${gl_cv_warn_c__Wsuggest_attribute_pure+y}
29674 printf %s "(cached) " >&6
29677 gl_save_compiler_FLAGS="$CFLAGS"
29678 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=pure"
29679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29680 /* end confdefs.h. */
29690 if ac_fn_c_try_link "$LINENO"
29692 gl_cv_warn_c__Wsuggest_attribute_pure=yes
29694 gl_cv_warn_c__Wsuggest_attribute_pure=no
29696 rm -f core conftest.err conftest.$ac_objext \
29697 conftest$ac_exeext conftest.$ac_ext
29698 CFLAGS="$gl_save_compiler_FLAGS"
29701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_pure" >&5
29702 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_pure" >&6; }
29703 if test "x$gl_cv_warn_c__Wsuggest_attribute_pure" = xyes
29705 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=pure"
29710 rm -f conftest.err conftest.i conftest.$ac_ext
29714 # In spite of excluding -Wlogical-op above, it is enabled, as of
29715 # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
29718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
29719 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
29720 if test ${gl_cv_warn_c__Wno_logical_op+y}
29722 printf %s "(cached) " >&6
29725 gl_save_compiler_FLAGS="$CFLAGS"
29726 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
29727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29728 /* end confdefs.h. */
29738 if ac_fn_c_try_link "$LINENO"
29740 gl_cv_warn_c__Wno_logical_op=yes
29742 gl_cv_warn_c__Wno_logical_op=no
29744 rm -f core conftest.err conftest.$ac_objext \
29745 conftest$ac_exeext conftest.$ac_ext
29746 CFLAGS="$gl_save_compiler_FLAGS"
29749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
29750 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
29751 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes
29753 as_fn_append WARN_CFLAGS " -Wno-logical-op"
29760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
29761 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
29762 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
29764 printf %s "(cached) " >&6
29767 gl_save_compiler_FLAGS="$CFLAGS"
29768 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
29769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29770 /* end confdefs.h. */
29780 if ac_fn_c_try_link "$LINENO"
29782 gl_cv_warn_c__fdiagnostics_show_option=yes
29784 gl_cv_warn_c__fdiagnostics_show_option=no
29786 rm -f core conftest.err conftest.$ac_objext \
29787 conftest$ac_exeext conftest.$ac_ext
29788 CFLAGS="$gl_save_compiler_FLAGS"
29791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
29792 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
29793 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
29795 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
29801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
29802 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
29803 if test ${gl_cv_warn_c__funit_at_a_time+y}
29805 printf %s "(cached) " >&6
29808 gl_save_compiler_FLAGS="$CFLAGS"
29809 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
29810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29811 /* end confdefs.h. */
29821 if ac_fn_c_try_link "$LINENO"
29823 gl_cv_warn_c__funit_at_a_time=yes
29825 gl_cv_warn_c__funit_at_a_time=no
29827 rm -f core conftest.err conftest.$ac_objext \
29828 conftest$ac_exeext conftest.$ac_ext
29829 CFLAGS="$gl_save_compiler_FLAGS"
29832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
29833 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
29834 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
29836 as_fn_append WARN_CFLAGS " -funit-at-a-time"
29844 printf "%s\n" "#define lint 1" >>confdefs.h
29848 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
29851 # We use a slightly smaller set of warning options for lib/.
29852 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
29854 nw="$nw -Wstrict-overflow"
29855 nw="$nw -Wuninitialized"
29856 nw="$nw -Wunused-macros"
29857 nw="$nw -Wmissing-prototypes"
29858 nw="$nw -Wold-style-definition"
29861 set x $WARN_CFLAGS; shift
29865 *" $gl_warn_item "*)
29868 gl_warn_set="$gl_warn_set $gl_warn_item"
29872 GNULIB_WARN_CFLAGS=$gl_warn_set
29877 # cc -E produces incorrect asm files on SVR4, so postprocess it.
29878 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
29881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
29882 printf %s "checking for underline in external names... " >&6; }
29883 if test ${gzip_cv_underline+y}
29885 printf %s "(cached) " >&6
29887 gzip_cv_underline=yes
29888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29889 /* end confdefs.h. */
29890 int foo() {return 0;}
29899 if ac_fn_c_try_compile "$LINENO"
29901 $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
29902 gzip_cv_underline=no
29904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
29907 printf "%s\n" "$gzip_cv_underline" >&6; }
29909 if test $gzip_cv_underline = no; then
29910 ASCPPFLAGS='-DNO_UNDERLINE'
29915 # Try to assemble match.S.
29916 # "gcc -E match.s" ignores -E, so we must use _match.S.
29917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
29918 printf %s "checking for an assembler syntax supported by this package... " >&6; }
29919 if test ${gzip_cv_assembler+y}
29921 printf %s "(cached) " >&6
29923 gzip_cv_assembler=no
29927 if cp $srcdir/lib/match.c _match.S &&
29928 eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
29929 eval "$ASCPPPOST < _match.i > match_.s"; then
29930 if test ! -s match_.s || grep error < match_.s > /dev/null; then
29932 elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
29933 test -f match_.$OBJEXT; then
29934 rm -f match_.$OBJEXT
29935 gzip_cv_assembler=yes
29936 if echo 'void foo (void) {}' > conftest.c &&
29937 eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
29938 grep '\.note\.GNU-stack' conftest.s >/dev/null &&
29939 eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
29940 test -f match_.$OBJEXT; then
29941 gzip_cv_assembler='yes, with -Wa,--noexecstack'
29945 rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
29948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
29949 printf "%s\n" "$gzip_cv_assembler" >&6; }
29950 if test "$gzip_cv_assembler" != no; then
29952 printf "%s\n" "#define ASMV /**/" >>confdefs.h
29954 case " $LIBOBJS " in
29955 *" match.$ac_objext "* ) ;;
29956 *) LIBOBJS="$LIBOBJS match.$ac_objext"
29961 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
29962 ASFLAGS_config='-Wa,--noexecstack'
29968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
29969 printf %s "checking for library containing strerror... " >&6; }
29970 if test ${ac_cv_search_strerror+y}
29972 printf %s "(cached) " >&6
29974 ac_func_search_save_LIBS=$LIBS
29975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29976 /* end confdefs.h. */
29978 /* Override any GCC internal prototype to avoid an error.
29979 Use char because int might match the return type of a GCC
29980 builtin and then its argument prototype would still apply. */
29988 return strerror ();
29993 for ac_lib in '' cposix
29995 if test -z "$ac_lib"; then
29996 ac_res="none required"
29999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
30001 if ac_fn_c_try_link "$LINENO"
30003 ac_cv_search_strerror=$ac_res
30005 rm -f core conftest.err conftest.$ac_objext \
30007 if test ${ac_cv_search_strerror+y}
30012 if test ${ac_cv_search_strerror+y}
30016 ac_cv_search_strerror=no
30018 rm conftest.$ac_ext
30019 LIBS=$ac_func_search_save_LIBS
30021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
30022 printf "%s\n" "$ac_cv_search_strerror" >&6; }
30023 ac_res=$ac_cv_search_strerror
30024 if test "$ac_res" != no
30026 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
30031 printf %s "checking for an ANSI C-conforming const... " >&6; }
30032 if test ${ac_cv_c_const+y}
30034 printf %s "(cached) " >&6
30036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30037 /* end confdefs.h. */
30043 #ifndef __cplusplus
30044 /* Ultrix mips cc rejects this sort of thing. */
30045 typedef int charset[2];
30046 const charset cs = { 0, 0 };
30047 /* SunOS 4.1.1 cc rejects this. */
30048 char const *const *pcpcc;
30050 /* NEC SVR4.0.2 mips cc rejects this. */
30051 struct point {int x, y;};
30052 static struct point const zero = {0,0};
30053 /* IBM XL C 1.02.0.0 rejects this.
30054 It does not let you subtract one const X* pointer from another in
30055 an arm of an if-expression whose if-part is not a constant
30057 const char *g = "string";
30058 pcpcc = &g + (g ? g-g : 0);
30059 /* HPUX 7.0 cc rejects these. */
30061 ppc = (char**) pcpcc;
30062 pcpcc = (char const *const *) ppc;
30063 { /* SCO 3.2v4 cc rejects this sort of thing. */
30066 char const *s = 0 ? (char *) 0 : (char const *) 0;
30071 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
30072 int x[] = {25, 17};
30073 const int *foo = &x[0];
30076 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
30077 typedef const int *iptr;
30081 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
30082 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
30083 struct s { int j; const int *ap[3]; } bx;
30084 struct s *b = &bx; b->j = 5;
30086 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
30087 const int foo = 10;
30088 if (!foo) return 0;
30090 return !cs[0] && !zero.x;
30097 if ac_fn_c_try_compile "$LINENO"
30103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
30106 printf "%s\n" "$ac_cv_c_const" >&6; }
30107 if test $ac_cv_c_const = no; then
30109 printf "%s\n" "#define const /**/" >>confdefs.h
30113 # Autoupdate added the following line to ensure that your configure
30114 # script's behavior did not change. It is probably safe to remove.
30125 ac_header_dirent=no
30126 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
30127 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
30128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
30129 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
30130 if eval test \${$as_ac_Header+y}
30132 printf %s "(cached) " >&6
30134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30135 /* end confdefs.h. */
30136 #include <sys/types.h>
30148 if ac_fn_c_try_compile "$LINENO"
30150 eval "$as_ac_Header=yes"
30152 eval "$as_ac_Header=no"
30154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30156 eval ac_res=\$$as_ac_Header
30157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30158 printf "%s\n" "$ac_res" >&6; }
30159 if eval test \"x\$"$as_ac_Header"\" = x"yes"
30161 cat >>confdefs.h <<_ACEOF
30162 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
30165 ac_header_dirent=$ac_hdr; break
30169 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
30170 if test $ac_header_dirent = dirent.h; then
30171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
30172 printf %s "checking for library containing opendir... " >&6; }
30173 if test ${ac_cv_search_opendir+y}
30175 printf %s "(cached) " >&6
30177 ac_func_search_save_LIBS=$LIBS
30178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30179 /* end confdefs.h. */
30181 /* Override any GCC internal prototype to avoid an error.
30182 Use char because int might match the return type of a GCC
30183 builtin and then its argument prototype would still apply. */
30196 for ac_lib in '' dir
30198 if test -z "$ac_lib"; then
30199 ac_res="none required"
30202 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
30204 if ac_fn_c_try_link "$LINENO"
30206 ac_cv_search_opendir=$ac_res
30208 rm -f core conftest.err conftest.$ac_objext \
30210 if test ${ac_cv_search_opendir+y}
30215 if test ${ac_cv_search_opendir+y}
30219 ac_cv_search_opendir=no
30221 rm conftest.$ac_ext
30222 LIBS=$ac_func_search_save_LIBS
30224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
30225 printf "%s\n" "$ac_cv_search_opendir" >&6; }
30226 ac_res=$ac_cv_search_opendir
30227 if test "$ac_res" != no
30229 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
30235 printf %s "checking for library containing opendir... " >&6; }
30236 if test ${ac_cv_search_opendir+y}
30238 printf %s "(cached) " >&6
30240 ac_func_search_save_LIBS=$LIBS
30241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30242 /* end confdefs.h. */
30244 /* Override any GCC internal prototype to avoid an error.
30245 Use char because int might match the return type of a GCC
30246 builtin and then its argument prototype would still apply. */
30261 if test -z "$ac_lib"; then
30262 ac_res="none required"
30265 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
30267 if ac_fn_c_try_link "$LINENO"
30269 ac_cv_search_opendir=$ac_res
30271 rm -f core conftest.err conftest.$ac_objext \
30273 if test ${ac_cv_search_opendir+y}
30278 if test ${ac_cv_search_opendir+y}
30282 ac_cv_search_opendir=no
30284 rm conftest.$ac_ext
30285 LIBS=$ac_func_search_save_LIBS
30287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
30288 printf "%s\n" "$ac_cv_search_opendir" >&6; }
30289 ac_res=$ac_cv_search_opendir
30290 if test "$ac_res" != no
30292 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
30299 printf %s "checking return type of signal handlers... " >&6; }
30300 if test ${ac_cv_type_signal+y}
30302 printf %s "(cached) " >&6
30304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30305 /* end confdefs.h. */
30306 #include <sys/types.h>
30307 #include <signal.h>
30312 return *(signal (0, 0)) (0) == 1;
30317 if ac_fn_c_try_compile "$LINENO"
30319 ac_cv_type_signal=int
30321 ac_cv_type_signal=void
30323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
30326 printf "%s\n" "$ac_cv_type_signal" >&6; }
30328 printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h
30331 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
30332 if test "x$ac_cv_type_size_t" = xyes
30337 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
30341 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
30342 if test "x$ac_cv_type_off_t" = xyes
30347 printf "%s\n" "#define off_t long int" >>confdefs.h
30352 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
30354 cat >confcache <<\_ACEOF
30355 # This file is a shell script that caches the results of configure
30356 # tests run on this system so they can be shared between configure
30357 # scripts and configure runs, see configure's option --config-cache.
30358 # It is not useful on other systems. If it contains results you don't
30359 # want to keep, you may remove or edit it.
30361 # config.status only pays attention to the cache file if you give it
30362 # the --recheck option to rerun configure.
30364 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30365 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30366 # following values.
30370 # The following way of writing the cache mishandles newlines in values,
30371 # but we know of no workaround that is simple, portable, and efficient.
30372 # So, we kill variables containing newlines.
30373 # Ultrix sh set writes to stderr and can't be redirected directly,
30374 # and sets the high bit in the cache file unless we assign to the vars.
30376 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30377 eval ac_val=\$$ac_var
30381 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30382 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30385 _ | IFS | as_nl) ;; #(
30386 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30387 *) { eval $ac_var=; unset $ac_var;} ;;
30393 case $as_nl`(ac_space=' '; set) 2>&1` in #(
30394 *${as_nl}ac_space=\ *)
30395 # `set' does not quote correctly, so add quotes: double-quote
30396 # substitution turns \\\\ into \\, and sed turns \\ into \.
30399 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30402 # `set' quotes correctly as required by POSIX, so do not add quotes.
30403 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30412 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
30414 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30416 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30417 if test -w "$cache_file"; then
30418 if test "x$cache_file" != "x/dev/null"; then
30419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30420 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
30421 if test ! -f "$cache_file" || test -h "$cache_file"; then
30422 cat confcache >"$cache_file"
30424 case $cache_file in #(
30426 mv -f confcache "$cache_file"$$ &&
30427 mv -f "$cache_file"$$ "$cache_file" ;; #(
30429 mv -f confcache "$cache_file" ;;
30434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30435 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
30440 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30441 # Let make expand exec_prefix.
30442 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30444 DEFS=-DHAVE_CONFIG_H
30449 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30450 # 1. Remove the extension, and $U if already installed.
30451 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30452 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
30453 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
30454 # will be set to the directory where LIBOBJS objects are built.
30455 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30456 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30458 LIBOBJS=$ac_libobjs
30460 LTLIBOBJS=$ac_ltlibobjs
30463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30464 printf %s "checking that generated files are newer than configure... " >&6; }
30465 if test -n "$am_sleep_pid"; then
30466 # Hide warnings about reused PIDs.
30467 wait $am_sleep_pid 2>/dev/null
30469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
30470 printf "%s\n" "done" >&6; }
30471 if test -n "$EXEEXT"; then
30473 am__EXEEXT_FALSE='#'
30475 am__EXEEXT_TRUE='#'
30479 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30480 as_fn_error $? "conditional \"AMDEP\" was never defined.
30481 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30483 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30484 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30485 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30487 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
30488 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
30489 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30491 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
30492 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
30493 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30495 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
30496 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
30497 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30499 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
30500 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
30501 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30505 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
30506 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
30507 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30509 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
30510 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
30511 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30513 CONFIG_INCLUDE=lib/config.h
30515 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
30516 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
30517 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30519 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
30520 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
30521 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30523 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
30524 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
30525 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30527 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
30528 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
30529 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30531 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
30532 as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
30533 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30535 if test -z "${GL_GENERATE_UTIME_H_TRUE}" && test -z "${GL_GENERATE_UTIME_H_FALSE}"; then
30536 as_fn_error $? "conditional \"GL_GENERATE_UTIME_H\" was never defined.
30537 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30542 if test -n "$gl_LIBOBJS"; then
30543 # Remove the extension.
30544 sed_drop_objext='s/\.o$//;s/\.obj$//'
30545 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
30546 gl_libobjs="$gl_libobjs $i.$ac_objext"
30547 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
30550 gl_LIBOBJS=$gl_libobjs
30552 gl_LTLIBOBJS=$gl_ltlibobjs
30558 if test -n "$gltests_LIBOBJS"; then
30559 # Remove the extension.
30560 sed_drop_objext='s/\.o$//;s/\.obj$//'
30561 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
30562 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
30563 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
30566 gltests_LIBOBJS=$gltests_libobjs
30568 gltests_LTLIBOBJS=$gltests_ltlibobjs
30572 : "${CONFIG_STATUS=./config.status}"
30574 ac_clean_files_save=$ac_clean_files
30575 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30577 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
30579 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30581 # Generated by $as_me.
30582 # Run this file to recreate the current configuration.
30583 # Compiler output produced by configure, useful for debugging
30584 # configure, is in config.log if it exists.
30587 ac_cs_recheck=false
30590 SHELL=\${CONFIG_SHELL-$SHELL}
30593 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30594 ## -------------------- ##
30595 ## M4sh Initialization. ##
30596 ## -------------------- ##
30598 # Be more Bourne compatible
30599 DUALCASE=1; export DUALCASE # for MKS sh
30600 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
30604 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30605 # is contrary to our usage. Disable this feature.
30606 alias -g '${1+"$@"}'='"$@"'
30607 setopt NO_GLOB_SUBST
30609 case `(set -o) 2>/dev/null` in #(
30618 # The user is always right.
30619 if ${PATH_SEPARATOR+false} :; then
30621 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30622 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30629 # We need space, tab and new line, in precisely that order. Quoting is
30630 # there to prevent editors from complaining about space-tab.
30631 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30632 # splitting by setting IFS to empty value.)
30638 # Find who we are. Look in the path if we contain no directory separator.
30641 *[\\/]* ) as_myself=$0 ;;
30642 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30643 for as_dir in $PATH
30646 case $as_dir in #(((
30649 *) as_dir=$as_dir/ ;;
30651 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
30657 # We did not find ourselves, most probably we were run as `sh COMMAND'
30658 # in which case we are not to be found in the path.
30659 if test "x$as_myself" = x; then
30662 if test ! -f "$as_myself"; then
30663 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30667 # Unset variables that we do not need and which cause bugs (e.g. in
30668 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
30669 # suppresses any "Segmentation fault" message there. '((' could
30670 # trigger a bug in pdksh 5.2.14.
30671 for as_var in BASH_ENV ENV MAIL MAILPATH
30672 do eval test \${$as_var+y} \
30673 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30686 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30689 # as_fn_error STATUS ERROR [LINENO LOG_FD]
30690 # ----------------------------------------
30691 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30692 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30693 # script with STATUS, using 1 if that was 0.
30696 as_status=$1; test $as_status -eq 0 && as_status=1
30698 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30699 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30701 printf "%s\n" "$as_me: error: $2" >&2
30702 as_fn_exit $as_status
30706 # as_fn_set_status STATUS
30707 # -----------------------
30708 # Set $? to STATUS, without forking.
30709 as_fn_set_status ()
30712 } # as_fn_set_status
30714 # as_fn_exit STATUS
30715 # -----------------
30716 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30720 as_fn_set_status $1
30726 # Portably unset VAR.
30729 { eval $1=; unset $1;}
30731 as_unset=as_fn_unset
30732 # as_fn_append VAR VALUE
30733 # ----------------------
30734 # Append the text in VALUE to the end of the definition contained in VAR. Take
30735 # advantage of any shell optimizations that allow amortized linear growth over
30736 # repeated appends, instead of the typical quadratic growth present in naive
30738 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
30740 eval 'as_fn_append ()
30751 # as_fn_arith ARG...
30752 # ------------------
30753 # Perform arithmetic evaluation on the ARGs, and store the result in the
30754 # global $as_val. Take advantage of shells that can avoid forks. The arguments
30755 # must be portable across $(()) and expr.
30756 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
30758 eval 'as_fn_arith ()
30765 as_val=`expr "$@" || test $? -eq 1`
30770 if expr a : '\(a\)' >/dev/null 2>&1 &&
30771 test "X`expr 00001 : '.*\(...\)'`" = X001; then
30777 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30778 as_basename=basename
30783 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30789 as_me=`$as_basename -- "$0" ||
30790 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30791 X"$0" : 'X\(//\)$' \| \
30792 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30793 printf "%s\n" X/"$0" |
30794 sed '/^.*\/\([^/][^/]*\)\/*$/{
30808 # Avoid depending upon Character Ranges.
30809 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30810 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30811 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30812 as_cr_digits='0123456789'
30813 as_cr_alnum=$as_cr_Letters$as_cr_digits
30815 ECHO_C= ECHO_N= ECHO_T=
30816 case `echo -n x` in #(((((
30818 case `echo 'xy\c'` in
30819 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
30821 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
30828 rm -f conf$$ conf$$.exe conf$$.file
30829 if test -d conf$$.dir; then
30830 rm -f conf$$.dir/conf$$.file
30833 mkdir conf$$.dir 2>/dev/null
30835 if (echo >conf$$.file) 2>/dev/null; then
30836 if ln -s conf$$.file conf$$ 2>/dev/null; then
30838 # ... but there are two gotchas:
30839 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30840 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30841 # In both cases, we have to default to `cp -pR'.
30842 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30844 elif ln conf$$.file conf$$ 2>/dev/null; then
30852 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30853 rmdir conf$$.dir 2>/dev/null
30858 # Create "$as_dir" as a directory, including parents if necessary.
30863 -*) as_dir=./$as_dir;;
30865 test -d "$as_dir" || eval $as_mkdir_p || {
30869 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30870 *) as_qdir=$as_dir;;
30872 as_dirs="'$as_qdir' $as_dirs"
30873 as_dir=`$as_dirname -- "$as_dir" ||
30874 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30875 X"$as_dir" : 'X\(//\)[^/]' \| \
30876 X"$as_dir" : 'X\(//\)$' \| \
30877 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30878 printf "%s\n" X"$as_dir" |
30879 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30883 /^X\(\/\/\)[^/].*/{
30896 test -d "$as_dir" && break
30898 test -z "$as_dirs" || eval "mkdir $as_dirs"
30899 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
30903 if mkdir -p . 2>/dev/null; then
30904 as_mkdir_p='mkdir -p "$as_dir"'
30906 test -d ./-p && rmdir ./-p
30911 # as_fn_executable_p FILE
30912 # -----------------------
30913 # Test if FILE is an executable regular file.
30914 as_fn_executable_p ()
30916 test -f "$1" && test -x "$1"
30917 } # as_fn_executable_p
30918 as_test_x='test -x'
30919 as_executable_p=as_fn_executable_p
30921 # Sed expression to map a string onto a valid CPP name.
30922 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30924 # Sed expression to map a string onto a valid variable name.
30925 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30929 ## ----------------------------------- ##
30930 ## Main body of $CONFIG_STATUS script. ##
30931 ## ----------------------------------- ##
30933 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
30935 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30936 # Save the log message, to keep $0 and so on meaningful, and to
30937 # report actual input values of CONFIG_FILES etc. instead of their
30938 # values after options handling.
30940 This file was extended by gzip $as_me 1.9, which was
30941 generated by GNU Autoconf 2.69.193-8974. Invocation command line was
30943 CONFIG_FILES = $CONFIG_FILES
30944 CONFIG_HEADERS = $CONFIG_HEADERS
30945 CONFIG_LINKS = $CONFIG_LINKS
30946 CONFIG_COMMANDS = $CONFIG_COMMANDS
30949 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30954 case $ac_config_files in *"
30955 "*) set x $ac_config_files; shift; ac_config_files=$*;;
30958 case $ac_config_headers in *"
30959 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30963 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30964 # Files that config.status was made for.
30965 config_files="$ac_config_files"
30966 config_headers="$ac_config_headers"
30967 config_links="$ac_config_links"
30968 config_commands="$ac_config_commands"
30972 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30974 \`$as_me' instantiates files and other configuration actions
30975 from templates according to the current configuration. Unless the files
30976 and actions are specified as TAGs, all are instantiated by default.
30978 Usage: $0 [OPTION]... [TAG]...
30980 -h, --help print this help, then exit
30981 -V, --version print version number and configuration settings, then exit
30982 --config print configuration, then exit
30983 -q, --quiet, --silent
30984 do not print progress messages
30985 -d, --debug don't remove temporary files
30986 --recheck update $as_me by reconfiguring in the same conditions
30987 --file=FILE[:TEMPLATE]
30988 instantiate the configuration file FILE
30989 --header=FILE[:TEMPLATE]
30990 instantiate the configuration header FILE
30992 Configuration files:
30995 Configuration headers:
30998 Configuration links:
31001 Configuration commands:
31004 Report bugs to <bug-gzip@gnu.org>."
31007 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31008 ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31010 gzip config.status 1.9
31011 configured by $0, generated by GNU Autoconf 2.69.193-8974,
31012 with options \\"\$ac_cs_config\\"
31014 Copyright (C) 2017 Free Software Foundation, Inc.
31015 This config.status script is free software; the Free Software Foundation
31016 gives unlimited permission to copy, distribute and modify it."
31023 test -n "\$AWK" || AWK=awk
31026 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31027 # The default lists apply if the user does not specify any file.
31033 ac_option=`expr "X$1" : 'X\([^=]*\)='`
31034 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31038 ac_option=`expr "X$1" : 'X\([^=]*\)='`
31050 # Handling of the options.
31051 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31053 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31054 printf "%s\n" "$ac_cs_version"; exit ;;
31055 --config | --confi | --conf | --con | --co | --c )
31056 printf "%s\n" "$ac_cs_config"; exit ;;
31057 --debug | --debu | --deb | --de | --d | -d )
31059 --file | --fil | --fi | --f )
31062 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31063 '') as_fn_error $? "missing file argument" ;;
31065 as_fn_append CONFIG_FILES " '$ac_optarg'"
31066 ac_need_defaults=false;;
31067 --header | --heade | --head | --hea )
31070 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31072 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31073 ac_need_defaults=false;;
31075 # Conflict between --help and --header
31076 as_fn_error $? "ambiguous option: \`$1'
31077 Try \`$0 --help' for more information.";;
31078 --help | --hel | -h )
31079 printf "%s\n" "$ac_cs_usage"; exit ;;
31080 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31081 | -silent | --silent | --silen | --sile | --sil | --si | --s)
31084 # This is an error.
31085 -*) as_fn_error $? "unrecognized option: \`$1'
31086 Try \`$0 --help' for more information." ;;
31088 *) as_fn_append ac_config_targets " $1"
31089 ac_need_defaults=false ;;
31095 ac_configure_extra_args=
31097 if $ac_cs_silent; then
31099 ac_configure_extra_args="$ac_configure_extra_args --silent"
31103 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31104 if \$ac_cs_recheck; then
31105 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31107 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
31108 CONFIG_SHELL='$SHELL'
31109 export CONFIG_SHELL
31114 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31118 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31119 ## Running $as_me. ##
31121 printf "%s\n" "$ac_log"
31125 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31129 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
31130 GNUmakefile=$GNUmakefile
31134 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31136 # Handling of arguments.
31137 for ac_config_target in $ac_config_targets
31139 case $ac_config_target in
31140 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
31141 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
31142 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
31143 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
31144 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
31145 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
31146 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
31148 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31153 # If the user did not use the arguments to specify the items to instantiate,
31154 # then the envvar interface is used. Set only those that are not.
31155 # We use the long form for the default assignment because of an extremely
31156 # bizarre bug on SunOS 4.1.3.
31157 if $ac_need_defaults; then
31158 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
31159 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
31160 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
31161 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
31164 # Have a temporary directory for convenience. Make it in the build tree
31165 # simply because there is no reason against having it here, and in addition,
31166 # creating and moving files from /tmp can sometimes cause problems.
31167 # Hook for its removal unless debugging.
31168 # Note that there is a small window in which the directory will not be cleaned:
31169 # after its creation but before its name has been assigned to `$tmp'.
31173 trap 'exit_status=$?
31174 : "${ac_tmp:=$tmp}"
31175 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31177 trap 'as_fn_exit 1' 1 2 13 15
31179 # Create a (secure) tmp directory for tmp files.
31182 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31186 tmp=./conf$$-$RANDOM
31187 (umask 077 && mkdir "$tmp")
31188 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31191 # Set up the scripts for CONFIG_FILES section.
31192 # No need to generate them if there are no CONFIG_FILES.
31193 # This happens for instance with `./config.status config.h'.
31194 if test -n "$CONFIG_FILES"; then
31197 ac_cr=`echo X | tr X '\015'`
31198 # On cygwin, bash can eat \r inside `` if the user requested igncr.
31199 # But we know of no other shell where ac_cr would be empty at this
31200 # point, so we can use a bashism as a fallback.
31201 if test "x$ac_cr" = x; then
31202 eval ac_cr=\$\'\\r\'
31204 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31205 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31208 ac_cs_awk_cr=$ac_cr
31211 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
31216 echo "cat >conf$$subs.awk <<_ACEOF" &&
31217 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31219 } >conf$$subs.sh ||
31220 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31221 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31223 for ac_last_try in false false false false false :; do
31224 . ./conf$$subs.sh ||
31225 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31227 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31228 if test $ac_delim_n = $ac_delim_num; then
31230 elif $ac_last_try; then
31231 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31233 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31236 rm -f conf$$subs.sh
31238 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31239 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31243 s/^/S["/; s/!.*/"]=/
31253 s/\(.\{148\}\)..*/\1/
31255 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31260 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31267 s/\(.\{148\}\)..*/\1/
31269 s/["\\]/\\&/g; s/^/"/; s/$/"/
31273 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31278 ' <conf$$subs.awk | sed '
31283 ' >>$CONFIG_STATUS || ac_write_fail=1
31284 rm -f conf$$subs.awk
31285 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31287 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31288 for (key in S) S_is_set[key] = 1
31294 nfields = split(line, field, "@")
31296 len = length(field[1])
31297 for (i = 2; i < nfields; i++) {
31299 keylen = length(key)
31300 if (S_is_set[key]) {
31302 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31303 len += length(value) + length(field[++i])
31314 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31315 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31316 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31319 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31320 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31323 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31324 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31325 # trailing colons and then remove the whole line if VPATH becomes empty
31326 # (actually we leave an empty line to preserve line numbers).
31327 if test "x$srcdir" = x.; then
31328 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
31346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31347 fi # test -n "$CONFIG_FILES"
31349 # Set up the scripts for CONFIG_HEADERS section.
31350 # No need to generate them if there are no CONFIG_HEADERS.
31351 # This happens for instance with `./config.status Makefile'.
31352 if test -n "$CONFIG_HEADERS"; then
31353 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31357 # Transform confdefs.h into an awk script `defines.awk', embedded as
31358 # here-document in config.status, that substitutes the proper values into
31359 # config.h.in to produce config.h.
31361 # Create a delimiter string that does not exist in confdefs.h, to ease
31362 # handling of long lines.
31364 for ac_last_try in false false :; do
31365 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31366 if test -z "$ac_tt"; then
31368 elif $ac_last_try; then
31369 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31371 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31375 # For the awk script, D is an array of macro values keyed by name,
31376 # likewise P contains macro parameters if any. Preserve backslash
31377 # newline sequences.
31379 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31381 s/.\{148\}/&'"$ac_delim"'/g
31384 s/^[ ]*#[ ]*define[ ][ ]*/ /
31391 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31393 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
31397 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31398 D["\1"]=" \3\\\\\\n"\\/p
31400 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31405 s/.\{148\}/&'"$ac_delim"'/g
31410 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31413 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31415 ' <confdefs.h | sed '
31416 s/'"$ac_delim"'/"\\\
31417 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31419 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31420 for (key in D) D_is_set[key] = 1
31423 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31425 split(line, arg, " ")
31426 if (arg[1] == "#") {
31430 defundef = substr(arg[1], 2)
31433 split(mac1, mac2, "(") #)
31435 prefix = substr(line, 1, index(line, defundef) - 1)
31436 if (D_is_set[macro]) {
31437 # Preserve the white space surrounding the "#".
31438 print prefix "define", macro P[macro] D[macro]
31441 # Replace #undef with comments. This is necessary, for example,
31442 # in the case of _POSIX_SOURCE, which is predefined and required
31443 # on some systems where configure will not decide to define it.
31444 if (defundef == "undef") {
31445 print "/*", prefix defundef, macro, "*/"
31453 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31454 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
31455 fi # test -n "$CONFIG_HEADERS"
31458 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
31463 :[FHLC]) ac_mode=$ac_tag; continue;;
31465 case $ac_mode$ac_tag in
31467 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
31468 :[FH]-) ac_tag=-:-;;
31469 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31486 -) ac_f="$ac_tmp/stdin";;
31487 *) # Look for the file first in the build tree, then in the source tree
31488 # (if the path is not absolute). The absolute path cannot be DOS-style,
31489 # because $ac_f cannot contain `:'.
31493 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31495 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
31497 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31498 as_fn_append ac_file_inputs " '$ac_f'"
31501 # Let's still pretend it is `configure' which instantiates (i.e., don't
31502 # use $as_me), people would be surprised to read:
31503 # /* config.h. Generated by config.status. */
31504 configure_input='Generated from '`
31505 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31507 if test x"$ac_file" != x-; then
31508 configure_input="$ac_file. $configure_input"
31509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
31510 printf "%s\n" "$as_me: creating $ac_file" >&6;}
31512 # Neutralize special characters interpreted by sed in replacement strings.
31513 case $configure_input in #(
31514 *\&* | *\|* | *\\* )
31515 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
31516 sed 's/[\\\\&|]/\\\\&/g'`;; #(
31517 *) ac_sed_conf_input=$configure_input;;
31521 *:-:* | *:-) cat >"$ac_tmp/stdin" \
31522 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
31527 ac_dir=`$as_dirname -- "$ac_file" ||
31528 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31529 X"$ac_file" : 'X\(//\)[^/]' \| \
31530 X"$ac_file" : 'X\(//\)$' \| \
31531 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31532 printf "%s\n" X"$ac_file" |
31533 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31537 /^X\(\/\/\)[^/].*/{
31550 as_dir="$ac_dir"; as_fn_mkdir_p
31554 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31556 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
31557 # A ".." for each directory in $ac_dir_suffix.
31558 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31559 case $ac_top_builddir_sub in
31560 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31561 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31564 ac_abs_top_builddir=$ac_pwd
31565 ac_abs_builddir=$ac_pwd$ac_dir_suffix
31566 # for backward compatibility:
31567 ac_top_builddir=$ac_top_build_prefix
31570 .) # We are building in place.
31572 ac_top_srcdir=$ac_top_builddir_sub
31573 ac_abs_top_srcdir=$ac_pwd ;;
31574 [\\/]* | ?:[\\/]* ) # Absolute name.
31575 ac_srcdir=$srcdir$ac_dir_suffix;
31576 ac_top_srcdir=$srcdir
31577 ac_abs_top_srcdir=$srcdir ;;
31578 *) # Relative name.
31579 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31580 ac_top_srcdir=$ac_top_build_prefix$srcdir
31581 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31583 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31593 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31594 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
31596 ac_MKDIR_P=$MKDIR_P
31598 [\\/$]* | ?:[\\/]* ) ;;
31599 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
31603 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31604 # If the template does not know about datarootdir, expand it.
31605 # FIXME: This hack should be removed a few years after 2.60.
31606 ac_datarootdir_hack=; ac_datarootdir_seen=
31617 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31618 *datarootdir*) ac_datarootdir_seen=yes;;
31619 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31621 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31623 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31624 ac_datarootdir_hack='
31625 s&@datadir@&$datadir&g
31626 s&@docdir@&$docdir&g
31627 s&@infodir@&$infodir&g
31628 s&@localedir@&$localedir&g
31629 s&@mandir@&$mandir&g
31630 s&\\\${datarootdir}&$datarootdir&g' ;;
31634 # Neutralize VPATH when `$srcdir' = `.'.
31635 # Shell code in configure.ac might set extrasub.
31636 # FIXME: do we really want to maintain this feature?
31637 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31638 ac_sed_extra="$ac_vpsub
31641 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31643 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31644 s|@configure_input@|$ac_sed_conf_input|;t t
31645 s&@top_builddir@&$ac_top_builddir_sub&;t t
31646 s&@top_build_prefix@&$ac_top_build_prefix&;t t
31647 s&@srcdir@&$ac_srcdir&;t t
31648 s&@abs_srcdir@&$ac_abs_srcdir&;t t
31649 s&@top_srcdir@&$ac_top_srcdir&;t t
31650 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31651 s&@builddir@&$ac_builddir&;t t
31652 s&@abs_builddir@&$ac_abs_builddir&;t t
31653 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31654 s&@INSTALL@&$ac_INSTALL&;t t
31655 s&@MKDIR_P@&$ac_MKDIR_P&;t t
31656 $ac_datarootdir_hack
31658 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
31659 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31661 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31662 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
31663 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
31664 "$ac_tmp/out"`; test -z "$ac_out"; } &&
31665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31666 which seems to be undefined. Please make sure it is defined" >&5
31667 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31668 which seems to be undefined. Please make sure it is defined" >&2;}
31670 rm -f "$ac_tmp/stdin"
31672 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
31673 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
31675 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31681 if test x"$ac_file" != x-; then
31683 printf "%s\n" "/* $configure_input */" \
31684 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
31685 } >"$ac_tmp/config.h" \
31686 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31687 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
31688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
31689 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
31692 mv "$ac_tmp/config.h" "$ac_file" \
31693 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31696 printf "%s\n" "/* $configure_input */" \
31697 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
31698 || as_fn_error $? "could not create -" "$LINENO" 5
31700 # Compute "$ac_file"'s index in $config_headers.
31703 for _am_header in $config_headers :; do
31704 case $_am_header in
31705 $_am_arg | $_am_arg:* )
31708 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
31711 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
31712 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31713 X"$_am_arg" : 'X\(//\)[^/]' \| \
31714 X"$_am_arg" : 'X\(//\)$' \| \
31715 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
31716 printf "%s\n" X"$_am_arg" |
31717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31721 /^X\(\/\/\)[^/].*/{
31733 s/.*/./; q'`/stamp-h$_am_stamp_count
31740 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
31743 # Prefer the file from the source tree if names are identical.
31744 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
31745 ac_source=$srcdir/$ac_source
31748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
31749 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
31751 if test ! -r "$ac_source"; then
31752 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
31756 # Try a relative symlink, then a hard link, then a copy.
31758 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
31759 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
31761 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
31762 ln "$ac_source" "$ac_file" 2>/dev/null ||
31763 cp -p "$ac_source" "$ac_file" ||
31764 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
31767 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
31768 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
31773 case $ac_file$ac_mode in
31774 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
31775 # Older Autoconf quotes --file arguments for eval, but not when files
31776 # are listed without --file. Let's play safe and only enable the eval
31777 # if we detect the quoting.
31778 # TODO: see whether this extra hack can be removed once we start
31779 # requiring Autoconf 2.70 or later.
31780 case $CONFIG_FILES in #(
31782 eval set x "$CONFIG_FILES" ;; #(
31784 set x $CONFIG_FILES ;; #(
31789 # Used to flag and report bootstrapping failures.
31793 # Strip MF so we end up with the name of the file.
31794 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
31795 # Check whether this is an Automake generated Makefile which includes
31796 # dependency-tracking related rules and includes.
31797 # Grep'ing the whole file directly is not great: AIX grep has a line
31798 # limit of 2048, but all sed's we know have understand at least 4000.
31799 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
31801 am_dirpart=`$as_dirname -- "$am_mf" ||
31802 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31803 X"$am_mf" : 'X\(//\)[^/]' \| \
31804 X"$am_mf" : 'X\(//\)$' \| \
31805 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
31806 printf "%s\n" X"$am_mf" |
31807 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31811 /^X\(\/\/\)[^/].*/{
31824 am_filepart=`$as_basename -- "$am_mf" ||
31825 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
31826 X"$am_mf" : 'X\(//\)$' \| \
31827 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
31828 printf "%s\n" X/"$am_mf" |
31829 sed '/^.*\/\([^/][^/]*\)\/*$/{
31842 { echo "$as_me:$LINENO: cd "$am_dirpart" \
31843 && sed -e '/# am--include-marker/d' "$am_filepart" \
31844 | $MAKE -f - am--depfiles" >&5
31845 (cd "$am_dirpart" \
31846 && sed -e '/# am--include-marker/d' "$am_filepart" \
31847 | $MAKE -f - am--depfiles) >&5 2>&5
31849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
31850 (exit $ac_status); } || am_rc=$?
31852 if test $am_rc -ne 0; then
31853 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31854 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
31855 as_fn_error $? "Something went wrong bootstrapping makefile fragments
31856 for automatic dependency tracking. Try re-running configure with the
31857 '--disable-dependency-tracking' option to at least be able to build
31858 the package (albeit without support for automatic dependency tracking).
31859 See \`config.log' for more details" "$LINENO" 5; }
31861 { am_dirpart=; unset am_dirpart;}
31862 { am_filepart=; unset am_filepart;}
31863 { am_mf=; unset am_mf;}
31864 { am_rc=; unset am_rc;}
31865 rm -f conftest-deps.mk
31875 ac_clean_files=$ac_clean_files_save
31877 test $ac_write_fail = 0 ||
31878 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
31881 # configure is writing to config.log, and then calls config.status.
31882 # config.status does its own redirection, appending to config.log.
31883 # Unfortunately, on DOS this fails, as config.log is still kept open
31884 # by configure, so config.status won't be able to write to it; its
31885 # output is simply discarded. So we exec the FD to /dev/null,
31886 # effectively closing config.log, so it can be properly (re)opened and
31887 # appended to by config.status. When coming back to configure, we
31888 # need to make the FD available again.
31889 if test "$no_create" != yes; then
31891 ac_config_status_args=
31892 test "$silent" = yes &&
31893 ac_config_status_args="$ac_config_status_args --quiet"
31895 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31897 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31898 # would make configure fail if this is the last instruction.
31899 $ac_cs_success || as_fn_exit 1
31901 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31903 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}