2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.147-5ad35 for gzip 1.8.
5 # Report bugs to <bug-gzip@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2015 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.8'
569 PACKAGE_STRING='gzip 1.8'
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 gl_getopt_required=POSIX
604 ac_subst_vars='gltests_LTLIBOBJS
623 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
717 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
719 UNISTD_H_DEFINES_STRUCT_TIMESPEC
720 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
721 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
722 TIME_H_DEFINES_STRUCT_TIMESPEC
723 NEXT_AS_FIRST_DIRECTIVE_TIME_H
734 HAVE_DECL_LOCALTIME_R
741 NEXT_AS_FIRST_DIRECTIVE_STRING_H
743 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
745 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
747 GL_GENERATE_STDINT_H_FALSE
748 GL_GENERATE_STDINT_H_TRUE
757 HAVE_SIGNED_SIG_ATOMIC_T
760 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
859 NEXT_AS_FIRST_DIRECTIVE_MATH_H
869 IGNORE_UNUSED_LIBRARIES_CFLAGS
872 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
874 REPLACE_STRUCT_TIMEVAL
883 GNULIB_GL_UNISTD_H_GETOPT
886 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
888 WINDOWS_64_BIT_ST_SIZE
889 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
925 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
931 REPLACE_SIGNBIT_USING_GCC
1000 HAVE_DECL_REMAINDERL
1182 APPLE_UNIVERSAL_BUILD
1183 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1185 GL_GENERATE_FLOAT_H_FALSE
1186 GL_GENERATE_FLOAT_H_TRUE
1188 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1191 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1209 REPLACE_STDIO_WRITE_FUNCS
1210 REPLACE_STDIO_READ_FUNCS
1219 REPLACE_OBSTACK_PRINTF
1244 HAVE_DECL_OBSTACK_PRINTF
1250 GNULIB_VSPRINTF_POSIX
1252 GNULIB_VPRINTF_POSIX
1254 GNULIB_VFPRINTF_POSIX
1261 GNULIB_STDIO_H_SIGPIPE
1262 GNULIB_STDIO_H_NONBLOCKING
1263 GNULIB_SPRINTF_POSIX
1277 GNULIB_OBSTACK_PRINTF_POSIX
1278 GNULIB_OBSTACK_PRINTF
1294 GNULIB_FPRINTF_POSIX
1309 GL_GENERATE_ERRNO_H_FALSE
1310 GL_GENERATE_ERRNO_H_TRUE
1312 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1315 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1318 PRAGMA_SYSTEM_HEADER
1319 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1343 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1345 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1346 UNISTD_H_HAVE_WINSOCK2_H
1369 REPLACE_GETDTABLESIZE
1370 REPLACE_GETDOMAINNAME
1381 HAVE_DECL_SETHOSTNAME
1382 HAVE_DECL_GETUSERSHELL
1383 HAVE_DECL_GETPAGESIZE
1384 HAVE_DECL_GETLOGIN_R
1385 HAVE_DECL_GETDOMAINNAME
1424 GNULIB_UNISTD_H_SIGPIPE
1425 GNULIB_UNISTD_H_NONBLOCKING
1451 GNULIB_GETDTABLESIZE
1452 GNULIB_GETDOMAINNAME
1482 REPLACE_CANONICALIZE_FILE_NAME
1487 HAVE_STRUCT_RANDOM_DATA
1509 HAVE_DECL_GETLOADAVG
1510 HAVE_CANONICALIZE_FILE_NAME
1521 GNULIB_SECURE_GETENV
1524 GNULIB_REALLOC_POSIX
1542 GNULIB_CANONICALIZE_FILE_NAME
1546 GL_GENERATE_ALLOCA_H_FALSE
1547 GL_GENERATE_ALLOCA_H_TRUE
1550 GL_COND_LIBTOOL_FALSE
1551 GL_COND_LIBTOOL_TRUE
1586 AM_DEFAULT_VERBOSITY
1595 INSTALL_STRIP_PROGRAM
1639 program_transform_name
1653 enable_option_checking
1655 enable_dependency_tracking
1663 ac_precious_vars='build_alias
1674 # Initialize some variables set by options.
1676 ac_init_version=false
1677 ac_unrecognized_opts=
1678 ac_unrecognized_sep=
1679 # The variables have the same names as the options, with
1680 # dashes changed to underlines.
1681 cache_file=/dev/null
1688 program_transform_name=s,x,x,
1696 # Installation directory options.
1697 # These are left unexpanded so users can "make install exec_prefix=/foo"
1698 # and all the variables that are supposed to be based on exec_prefix
1699 # by default will actually change.
1700 # Use braces instead of parens because sh, perl, etc. also accept them.
1701 # (The list follows the same order as the GNU Coding Standards.)
1702 bindir='${exec_prefix}/bin'
1703 sbindir='${exec_prefix}/sbin'
1704 libexecdir='${exec_prefix}/libexec'
1705 datarootdir='${prefix}/share'
1706 datadir='${datarootdir}'
1707 sysconfdir='${prefix}/etc'
1708 sharedstatedir='${prefix}/com'
1709 localstatedir='${prefix}/var'
1710 runstatedir='${localstatedir}/run'
1711 includedir='${prefix}/include'
1712 oldincludedir='/usr/include'
1713 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1714 infodir='${datarootdir}/info'
1719 libdir='${exec_prefix}/lib'
1720 localedir='${datarootdir}/locale'
1721 mandir='${datarootdir}/man'
1727 # If the previous option needs an argument, assign it.
1728 if test -n "$ac_prev"; then
1729 eval $ac_prev=\$ac_option
1735 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1740 # Accept the important Cygnus configure options, so we can diagnose typos.
1742 case $ac_dashdash$ac_option in
1746 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1748 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1749 bindir=$ac_optarg ;;
1751 -build | --build | --buil | --bui | --bu)
1752 ac_prev=build_alias ;;
1753 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1754 build_alias=$ac_optarg ;;
1756 -cache-file | --cache-file | --cache-fil | --cache-fi \
1757 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1758 ac_prev=cache_file ;;
1759 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1760 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1761 cache_file=$ac_optarg ;;
1763 --config-cache | -C)
1764 cache_file=config.cache ;;
1766 -datadir | --datadir | --datadi | --datad)
1768 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1769 datadir=$ac_optarg ;;
1771 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1772 | --dataroo | --dataro | --datar)
1773 ac_prev=datarootdir ;;
1774 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1775 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1776 datarootdir=$ac_optarg ;;
1778 -disable-* | --disable-*)
1779 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1780 # Reject names that are not valid shell variable names.
1781 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1782 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1783 ac_useropt_orig=$ac_useropt
1784 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1785 case $ac_user_opts in
1787 "enable_$ac_useropt"
1789 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1790 ac_unrecognized_sep=', ';;
1792 eval enable_$ac_useropt=no ;;
1794 -docdir | --docdir | --docdi | --doc | --do)
1796 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1797 docdir=$ac_optarg ;;
1799 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1801 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1802 dvidir=$ac_optarg ;;
1804 -enable-* | --enable-*)
1805 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1806 # Reject names that are not valid shell variable names.
1807 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1808 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1809 ac_useropt_orig=$ac_useropt
1810 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1811 case $ac_user_opts in
1813 "enable_$ac_useropt"
1815 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1816 ac_unrecognized_sep=', ';;
1818 eval enable_$ac_useropt=\$ac_optarg ;;
1820 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1821 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1822 | --exec | --exe | --ex)
1823 ac_prev=exec_prefix ;;
1824 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1825 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1826 | --exec=* | --exe=* | --ex=*)
1827 exec_prefix=$ac_optarg ;;
1829 -gas | --gas | --ga | --g)
1830 # Obsolete; use --with-gas.
1833 -help | --help | --hel | --he | -h)
1834 ac_init_help=long ;;
1835 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1836 ac_init_help=recursive ;;
1837 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1838 ac_init_help=short ;;
1840 -host | --host | --hos | --ho)
1841 ac_prev=host_alias ;;
1842 -host=* | --host=* | --hos=* | --ho=*)
1843 host_alias=$ac_optarg ;;
1845 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1847 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1849 htmldir=$ac_optarg ;;
1851 -includedir | --includedir | --includedi | --included | --include \
1852 | --includ | --inclu | --incl | --inc)
1853 ac_prev=includedir ;;
1854 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1855 | --includ=* | --inclu=* | --incl=* | --inc=*)
1856 includedir=$ac_optarg ;;
1858 -infodir | --infodir | --infodi | --infod | --info | --inf)
1860 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1861 infodir=$ac_optarg ;;
1863 -libdir | --libdir | --libdi | --libd)
1865 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1866 libdir=$ac_optarg ;;
1868 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1869 | --libexe | --libex | --libe)
1870 ac_prev=libexecdir ;;
1871 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1872 | --libexe=* | --libex=* | --libe=*)
1873 libexecdir=$ac_optarg ;;
1875 -localedir | --localedir | --localedi | --localed | --locale)
1876 ac_prev=localedir ;;
1877 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1878 localedir=$ac_optarg ;;
1880 -localstatedir | --localstatedir | --localstatedi | --localstated \
1881 | --localstate | --localstat | --localsta | --localst | --locals)
1882 ac_prev=localstatedir ;;
1883 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1884 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1885 localstatedir=$ac_optarg ;;
1887 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1889 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1890 mandir=$ac_optarg ;;
1892 -nfp | --nfp | --nf)
1893 # Obsolete; use --without-fp.
1896 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1897 | --no-cr | --no-c | -n)
1900 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1901 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1904 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1905 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1906 | --oldin | --oldi | --old | --ol | --o)
1907 ac_prev=oldincludedir ;;
1908 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1909 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1910 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1911 oldincludedir=$ac_optarg ;;
1913 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1915 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1916 prefix=$ac_optarg ;;
1918 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1919 | --program-pre | --program-pr | --program-p)
1920 ac_prev=program_prefix ;;
1921 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1922 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1923 program_prefix=$ac_optarg ;;
1925 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1926 | --program-suf | --program-su | --program-s)
1927 ac_prev=program_suffix ;;
1928 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1929 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1930 program_suffix=$ac_optarg ;;
1932 -program-transform-name | --program-transform-name \
1933 | --program-transform-nam | --program-transform-na \
1934 | --program-transform-n | --program-transform- \
1935 | --program-transform | --program-transfor \
1936 | --program-transfo | --program-transf \
1937 | --program-trans | --program-tran \
1938 | --progr-tra | --program-tr | --program-t)
1939 ac_prev=program_transform_name ;;
1940 -program-transform-name=* | --program-transform-name=* \
1941 | --program-transform-nam=* | --program-transform-na=* \
1942 | --program-transform-n=* | --program-transform-=* \
1943 | --program-transform=* | --program-transfor=* \
1944 | --program-transfo=* | --program-transf=* \
1945 | --program-trans=* | --program-tran=* \
1946 | --progr-tra=* | --program-tr=* | --program-t=*)
1947 program_transform_name=$ac_optarg ;;
1949 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1951 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1952 pdfdir=$ac_optarg ;;
1954 -psdir | --psdir | --psdi | --psd | --ps)
1956 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1959 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1960 | -silent | --silent | --silen | --sile | --sil)
1963 -runstatedir | --runstatedir | --runstatedi | --runstated \
1964 | --runstate | --runstat | --runsta | --runst | --runs \
1965 | --run | --ru | --r)
1966 ac_prev=runstatedir ;;
1967 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1968 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1969 | --run=* | --ru=* | --r=*)
1970 runstatedir=$ac_optarg ;;
1972 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1974 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1976 sbindir=$ac_optarg ;;
1978 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1979 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1980 | --sharedst | --shareds | --shared | --share | --shar \
1982 ac_prev=sharedstatedir ;;
1983 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1984 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1985 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1987 sharedstatedir=$ac_optarg ;;
1989 -site | --site | --sit)
1991 -site=* | --site=* | --sit=*)
1994 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1996 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1997 srcdir=$ac_optarg ;;
1999 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2000 | --syscon | --sysco | --sysc | --sys | --sy)
2001 ac_prev=sysconfdir ;;
2002 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2003 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2004 sysconfdir=$ac_optarg ;;
2006 -target | --target | --targe | --targ | --tar | --ta | --t)
2007 ac_prev=target_alias ;;
2008 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2009 target_alias=$ac_optarg ;;
2011 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2014 -version | --version | --versio | --versi | --vers | -V)
2015 ac_init_version=: ;;
2018 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2019 # Reject names that are not valid shell variable names.
2020 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2021 as_fn_error $? "invalid package name: \`$ac_useropt'"
2022 ac_useropt_orig=$ac_useropt
2023 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2024 case $ac_user_opts in
2028 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2029 ac_unrecognized_sep=', ';;
2031 eval with_$ac_useropt=\$ac_optarg ;;
2033 -without-* | --without-*)
2034 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2035 # Reject names that are not valid shell variable names.
2036 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2037 as_fn_error $? "invalid package name: \`$ac_useropt'"
2038 ac_useropt_orig=$ac_useropt
2039 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2040 case $ac_user_opts in
2044 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2045 ac_unrecognized_sep=', ';;
2047 eval with_$ac_useropt=no ;;
2050 # Obsolete; use --with-x.
2053 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2054 | --x-incl | --x-inc | --x-in | --x-i)
2055 ac_prev=x_includes ;;
2056 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2057 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2058 x_includes=$ac_optarg ;;
2060 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2061 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2062 ac_prev=x_libraries ;;
2063 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2064 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2065 x_libraries=$ac_optarg ;;
2067 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2068 Try \`$0 --help' for more information"
2072 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2073 # Reject names that are not valid shell variable names.
2074 case $ac_envvar in #(
2075 '' | [0-9]* | *[!_$as_cr_alnum]* )
2076 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2078 eval $ac_envvar=\$ac_optarg
2079 export $ac_envvar ;;
2082 # FIXME: should be removed in autoconf 3.0.
2083 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2084 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2085 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2086 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2092 if test -n "$ac_prev"; then
2093 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2094 as_fn_error $? "missing argument to $ac_option"
2097 if test -n "$ac_unrecognized_opts"; then
2098 case $enable_option_checking in
2100 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2101 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2105 # Check all directory arguments for consistency.
2106 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2107 datadir sysconfdir sharedstatedir localstatedir includedir \
2108 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2109 libdir localedir mandir runstatedir
2111 eval ac_val=\$$ac_var
2112 # Remove trailing slashes.
2115 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2116 eval $ac_var=\$ac_val;;
2118 # Be sure to have absolute directory names.
2120 [\\/$]* | ?:[\\/]* ) continue;;
2121 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2123 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2126 # There might be people who depend on the old broken behavior: `$host'
2127 # used to hold the argument of --host etc.
2128 # FIXME: To remove some day.
2131 target=$target_alias
2133 # FIXME: To remove some day.
2134 if test "x$host_alias" != x; then
2135 if test "x$build_alias" = x; then
2136 cross_compiling=maybe
2137 elif test "x$build_alias" != "x$host_alias"; then
2143 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2145 test "$silent" = yes && exec 6>/dev/null
2148 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2149 ac_ls_di=`ls -di .` &&
2150 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2151 as_fn_error $? "working directory cannot be determined"
2152 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2153 as_fn_error $? "pwd does not report name of working directory"
2156 # Find the source files, if location was not specified.
2157 if test -z "$srcdir"; then
2158 ac_srcdir_defaulted=yes
2159 # Try the directory containing this script, then the parent directory.
2160 ac_confdir=`$as_dirname -- "$as_myself" ||
2161 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2162 X"$as_myself" : 'X\(//\)[^/]' \| \
2163 X"$as_myself" : 'X\(//\)$' \| \
2164 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2165 printf "%s\n" X"$as_myself" |
2166 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2184 if test ! -r "$srcdir/$ac_unique_file"; then
2188 ac_srcdir_defaulted=no
2190 if test ! -r "$srcdir/$ac_unique_file"; then
2191 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2192 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2194 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2196 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2198 # When building in place, set srcdir=.
2199 if test "$ac_abs_confdir" = "$ac_pwd"; then
2202 # Remove unnecessary trailing slashes from srcdir.
2203 # Double slashes in file names in object file debugging info
2204 # mess up M-x gdb in Emacs.
2206 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2208 for ac_var in $ac_precious_vars; do
2209 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2210 eval ac_env_${ac_var}_value=\$${ac_var}
2211 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2212 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2216 # Report the --help message.
2218 if test "$ac_init_help" = "long"; then
2219 # Omit some internal or obsolete options to make the list less imposing.
2220 # This message is too long to be a string in the A/UX 3.1 sh.
2222 \`configure' configures gzip 1.8 to adapt to many kinds of systems.
2224 Usage: $0 [OPTION]... [VAR=VALUE]...
2226 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2227 VAR=VALUE. See below for descriptions of some of the useful variables.
2229 Defaults for the options are specified in brackets.
2232 -h, --help display this help and exit
2233 --help=short display options specific to this package
2234 --help=recursive display the short help of all the included packages
2235 -V, --version display version information and exit
2236 -q, --quiet, --silent do not print \`checking ...' messages
2237 --cache-file=FILE cache test results in FILE [disabled]
2238 -C, --config-cache alias for \`--cache-file=config.cache'
2239 -n, --no-create do not create output files
2240 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2242 Installation directories:
2243 --prefix=PREFIX install architecture-independent files in PREFIX
2244 [$ac_default_prefix]
2245 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2248 By default, \`make install' will install all the files in
2249 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2250 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2251 for instance \`--prefix=\$HOME'.
2253 For better control, use the options below.
2255 Fine tuning of the installation directories:
2256 --bindir=DIR user executables [EPREFIX/bin]
2257 --sbindir=DIR system admin executables [EPREFIX/sbin]
2258 --libexecdir=DIR program executables [EPREFIX/libexec]
2259 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2260 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2261 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2262 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2263 --libdir=DIR object code libraries [EPREFIX/lib]
2264 --includedir=DIR C header files [PREFIX/include]
2265 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2266 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2267 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2268 --infodir=DIR info documentation [DATAROOTDIR/info]
2269 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2270 --mandir=DIR man documentation [DATAROOTDIR/man]
2271 --docdir=DIR documentation root [DATAROOTDIR/doc/gzip]
2272 --htmldir=DIR html documentation [DOCDIR]
2273 --dvidir=DIR dvi documentation [DOCDIR]
2274 --pdfdir=DIR pdf documentation [DOCDIR]
2275 --psdir=DIR ps documentation [DOCDIR]
2281 --program-prefix=PREFIX prepend PREFIX to installed program names
2282 --program-suffix=SUFFIX append SUFFIX to installed program names
2283 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2286 --build=BUILD configure for building on BUILD [guessed]
2287 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2291 if test -n "$ac_init_help"; then
2292 case $ac_init_help in
2293 short | recursive ) echo "Configuration of gzip 1.8:";;
2298 --disable-option-checking ignore unrecognized --enable/--with options
2299 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2300 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2301 --enable-silent-rules less verbose build output (undo: "make V=1")
2302 --disable-silent-rules verbose build output (undo: "make V=0")
2303 --enable-dependency-tracking
2304 do not reject slow dependency extractors
2305 --disable-dependency-tracking
2306 speeds up one-time build
2307 --disable-largefile omit support for large files
2308 --enable-threads={posix|solaris|pth|windows}
2309 specify multithreading API
2310 --disable-threads build without multithread safety
2311 --disable-rpath do not hardcode runtime library paths
2312 --enable-gcc-warnings turn on many GCC warnings (for developers; best with
2316 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2317 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2318 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2319 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2320 --without-libpth-prefix don't search for libpth in includedir and libdir
2322 Some influential environment variables:
2323 CC C compiler command
2324 CFLAGS C compiler flags
2325 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2326 nonstandard directory <lib dir>
2327 LIBS libraries to pass to the linker, e.g. -l<library>
2328 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2329 you have headers in a nonstandard directory <include dir>
2332 Use these variables to override the choices made by `configure' or to help
2333 it to find libraries and programs with nonstandard names/locations.
2335 Report bugs to <bug-gzip@gnu.org>.
2340 if test "$ac_init_help" = "recursive"; then
2341 # If there are subdirs, report their specific --help.
2342 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2343 test -d "$ac_dir" ||
2344 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2349 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2351 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2352 # A ".." for each directory in $ac_dir_suffix.
2353 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2354 case $ac_top_builddir_sub in
2355 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2356 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2359 ac_abs_top_builddir=$ac_pwd
2360 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2361 # for backward compatibility:
2362 ac_top_builddir=$ac_top_build_prefix
2365 .) # We are building in place.
2367 ac_top_srcdir=$ac_top_builddir_sub
2368 ac_abs_top_srcdir=$ac_pwd ;;
2369 [\\/]* | ?:[\\/]* ) # Absolute name.
2370 ac_srcdir=$srcdir$ac_dir_suffix;
2371 ac_top_srcdir=$srcdir
2372 ac_abs_top_srcdir=$srcdir ;;
2374 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2375 ac_top_srcdir=$ac_top_build_prefix$srcdir
2376 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2378 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2380 cd "$ac_dir" || { ac_status=$?; continue; }
2381 # Check for guested configure.
2382 if test -f "$ac_srcdir/configure.gnu"; then
2384 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2385 elif test -f "$ac_srcdir/configure"; then
2387 $SHELL "$ac_srcdir/configure" --help=recursive
2389 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2391 cd "$ac_pwd" || { ac_status=$?; break; }
2395 test -n "$ac_init_help" && exit $ac_status
2396 if $ac_init_version; then
2399 generated by GNU Autoconf 2.69.147-5ad35
2401 Copyright (C) 2015 Free Software Foundation, Inc.
2402 This configure script is free software; the Free Software Foundation
2403 gives unlimited permission to copy, distribute and modify it.
2408 ## ------------------------ ##
2409 ## Autoconf initialization. ##
2410 ## ------------------------ ##
2412 # ac_fn_c_try_compile LINENO
2413 # --------------------------
2414 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2415 ac_fn_c_try_compile ()
2417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418 rm -f conftest.$ac_objext
2419 if { { ac_try="$ac_compile"
2421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422 *) ac_try_echo=$ac_try;;
2424 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425 printf "%s\n" "$ac_try_echo"; } >&5
2426 (eval "$ac_compile") 2>conftest.err
2428 if test -s conftest.err; then
2429 grep -v '^ *+' conftest.err >conftest.er1
2430 cat conftest.er1 >&5
2431 mv -f conftest.er1 conftest.err
2433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2434 test $ac_status = 0; } && {
2435 test -z "$ac_c_werror_flag" ||
2436 test ! -s conftest.err
2437 } && test -s conftest.$ac_objext
2441 printf "%s\n" "$as_me: failed program was:" >&5
2442 sed 's/^/| /' conftest.$ac_ext >&5
2446 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2447 as_fn_set_status $ac_retval
2449 } # ac_fn_c_try_compile
2451 # ac_fn_c_try_cpp LINENO
2452 # ----------------------
2453 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2456 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457 if { { ac_try="$ac_cpp conftest.$ac_ext"
2459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2460 *) ac_try_echo=$ac_try;;
2462 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2463 printf "%s\n" "$ac_try_echo"; } >&5
2464 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2466 if test -s conftest.err; then
2467 grep -v '^ *+' conftest.err >conftest.er1
2468 cat conftest.er1 >&5
2469 mv -f conftest.er1 conftest.err
2471 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2472 test $ac_status = 0; } > conftest.i && {
2473 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2474 test ! -s conftest.err
2479 printf "%s\n" "$as_me: failed program was:" >&5
2480 sed 's/^/| /' conftest.$ac_ext >&5
2484 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2485 as_fn_set_status $ac_retval
2489 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2490 # -------------------------------------------------------
2491 # Tests whether HEADER exists and can be compiled using the include files in
2492 # INCLUDES, setting the cache variable VAR accordingly.
2493 ac_fn_c_check_header_compile ()
2495 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2497 printf %s "checking for $2... " >&6; }
2498 if eval test \${$3+y}
2500 printf %s "(cached) " >&6
2502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2503 /* end confdefs.h. */
2507 if ac_fn_c_try_compile "$LINENO"
2513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2517 printf "%s\n" "$ac_res" >&6; }
2518 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2520 } # ac_fn_c_check_header_compile
2522 # ac_fn_c_try_link LINENO
2523 # -----------------------
2524 # Try to link conftest.$ac_ext, and return whether this succeeded.
2527 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528 rm -f conftest.$ac_objext conftest$ac_exeext
2529 if { { ac_try="$ac_link"
2531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532 *) ac_try_echo=$ac_try;;
2534 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535 printf "%s\n" "$ac_try_echo"; } >&5
2536 (eval "$ac_link") 2>conftest.err
2538 if test -s conftest.err; then
2539 grep -v '^ *+' conftest.err >conftest.er1
2540 cat conftest.er1 >&5
2541 mv -f conftest.er1 conftest.err
2543 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2544 test $ac_status = 0; } && {
2545 test -z "$ac_c_werror_flag" ||
2546 test ! -s conftest.err
2547 } && test -s conftest$ac_exeext && {
2548 test "$cross_compiling" = yes ||
2549 test -x conftest$ac_exeext
2554 printf "%s\n" "$as_me: failed program was:" >&5
2555 sed 's/^/| /' conftest.$ac_ext >&5
2559 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2560 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2561 # interfere with the next link command; also delete a directory that is
2562 # left behind by Apple's compiler. We do this before executing the actions.
2563 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2564 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2565 as_fn_set_status $ac_retval
2567 } # ac_fn_c_try_link
2569 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2570 # -------------------------------------------
2571 # Tests whether TYPE exists after having included INCLUDES, setting cache
2572 # variable VAR accordingly.
2573 ac_fn_c_check_type ()
2575 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2577 printf %s "checking for $2... " >&6; }
2578 if eval test \${$3+y}
2580 printf %s "(cached) " >&6
2583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2584 /* end confdefs.h. */
2595 if ac_fn_c_try_compile "$LINENO"
2597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2598 /* end confdefs.h. */
2609 if ac_fn_c_try_compile "$LINENO"
2615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621 printf "%s\n" "$ac_res" >&6; }
2622 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2624 } # ac_fn_c_check_type
2626 # ac_fn_c_check_func LINENO FUNC VAR
2627 # ----------------------------------
2628 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2629 ac_fn_c_check_func ()
2631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2633 printf %s "checking for $2... " >&6; }
2634 if eval test \${$3+y}
2636 printf %s "(cached) " >&6
2638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2639 /* end confdefs.h. */
2640 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2641 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2642 #define $2 innocuous_$2
2644 /* System header to define __stub macros and hopefully few prototypes,
2645 which can conflict with char $2 (); below. */
2650 /* Override any GCC internal prototype to avoid an error.
2651 Use char because int might match the return type of a GCC
2652 builtin and then its argument prototype would still apply. */
2657 /* The GNU C library defines this for functions which it implements
2658 to always fail with ENOSYS. Some functions are actually named
2659 something starting with __ and the normal name is an alias. */
2660 #if defined __stub_$2 || defined __stub___$2
2672 if ac_fn_c_try_link "$LINENO"
2678 rm -f core conftest.err conftest.$ac_objext \
2679 conftest$ac_exeext 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_func
2688 # ac_fn_c_try_run LINENO
2689 # ----------------------
2690 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2691 # executables *can* be run.
2694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2695 if { { ac_try="$ac_link"
2697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698 *) ac_try_echo=$ac_try;;
2700 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701 printf "%s\n" "$ac_try_echo"; } >&5
2702 (eval "$ac_link") 2>&5
2704 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2706 { { case "(($ac_try" in
2707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2708 *) ac_try_echo=$ac_try;;
2710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2711 printf "%s\n" "$ac_try_echo"; } >&5
2712 (eval "$ac_try") 2>&5
2714 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2715 test $ac_status = 0; }; }
2719 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2720 printf "%s\n" "$as_me: failed program was:" >&5
2721 sed 's/^/| /' conftest.$ac_ext >&5
2723 ac_retval=$ac_status
2725 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2726 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2727 as_fn_set_status $ac_retval
2731 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2732 # ---------------------------------------------
2733 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2735 ac_fn_c_check_decl ()
2737 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2739 as_decl_name=`echo $2|sed 's/ *(.*//'`
2740 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2742 printf %s "checking whether $as_decl_name is declared... " >&6; }
2743 if eval test \${$3+y}
2745 printf %s "(cached) " >&6
2747 ac_save_werror_flag=$ac_c_werror_flag
2748 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2750 /* end confdefs.h. */
2755 #ifndef $as_decl_name
2757 (void) $as_decl_use;
2759 (void) $as_decl_name;
2767 if ac_fn_c_try_compile "$LINENO"
2773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2777 printf "%s\n" "$ac_res" >&6; }
2778 ac_c_werror_flag=$ac_save_werror_flag
2779 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2781 } # ac_fn_c_check_decl
2783 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2784 # --------------------------------------------
2785 # Tries to find the compile-time value of EXPR in a program that includes
2786 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2788 ac_fn_c_compute_int ()
2790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2791 if test "$cross_compiling" = yes; then
2792 # Depending upon the size, compute the lo and hi bounds.
2793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794 /* end confdefs.h. */
2799 static int test_array [1 - 2 * !(($2) >= 0)];
2801 return test_array [0];
2807 if ac_fn_c_try_compile "$LINENO"
2811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812 /* end confdefs.h. */
2817 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2819 return test_array [0];
2825 if ac_fn_c_try_compile "$LINENO"
2827 ac_hi=$ac_mid; break
2829 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2830 if test $ac_lo -le $ac_mid; then
2834 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2840 /* end confdefs.h. */
2845 static int test_array [1 - 2 * !(($2) < 0)];
2847 return test_array [0];
2853 if ac_fn_c_try_compile "$LINENO"
2857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858 /* end confdefs.h. */
2863 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2865 return test_array [0];
2871 if ac_fn_c_try_compile "$LINENO"
2873 ac_lo=$ac_mid; break
2875 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2876 if test $ac_mid -le $ac_hi; then
2880 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2890 # Binary search between lo and hi bounds.
2891 while test "x$ac_lo" != "x$ac_hi"; do
2892 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2894 /* end confdefs.h. */
2899 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2901 return test_array [0];
2907 if ac_fn_c_try_compile "$LINENO"
2911 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2916 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2921 /* end confdefs.h. */
2923 static long int longval () { return $2; }
2924 static unsigned long int ulongval () { return $2; }
2931 FILE *f = fopen ("conftest.val", "w");
2936 long int i = longval ();
2939 fprintf (f, "%ld", i);
2943 unsigned long int i = ulongval ();
2946 fprintf (f, "%lu", i);
2948 /* Do not output a trailing newline, as this causes \r\n confusion
2949 on some platforms. */
2950 return ferror (f) || fclose (f) != 0;
2956 if ac_fn_c_try_run "$LINENO"
2958 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2963 conftest.$ac_objext conftest.beam conftest.$ac_ext
2967 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2968 as_fn_set_status $ac_retval
2970 } # ac_fn_c_compute_int
2972 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2973 # ----------------------------------------------------
2974 # Tries to find if the field MEMBER exists in type AGGR, after including
2975 # INCLUDES, setting cache variable VAR accordingly.
2976 ac_fn_c_check_member ()
2978 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2980 printf %s "checking for $2.$3... " >&6; }
2981 if eval test \${$4+y}
2983 printf %s "(cached) " >&6
2985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2986 /* end confdefs.h. */
2998 if ac_fn_c_try_compile "$LINENO"
3002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3003 /* end confdefs.h. */
3009 if (sizeof ac_aggr.$3)
3015 if ac_fn_c_try_compile "$LINENO"
3021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3027 printf "%s\n" "$ac_res" >&6; }
3028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3030 } # ac_fn_c_check_member
3031 cat >config.log <<_ACEOF
3032 This file contains any messages produced by compilers while
3033 running configure, to aid debugging if configure makes a mistake.
3035 It was created by gzip $as_me 1.8, which was
3036 generated by GNU Autoconf 2.69.147-5ad35. Invocation command line was
3048 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3049 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3050 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3051 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3052 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3054 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3055 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3057 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3058 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3059 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3060 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3061 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3062 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3063 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071 case $as_dir in #(((
3074 *) as_dir=$as_dir/ ;;
3076 printf "%s\n" "PATH: $as_dir"
3092 # Keep a trace of the command line.
3093 # Strip out --no-create and --no-recursion so they do not pile up.
3094 # Strip out --silent because we don't want to record it for future runs.
3095 # Also quote any args containing shell meta-characters.
3096 # Make two passes to allow for proper duplicate-argument suppression.
3100 ac_must_keep_next=false
3106 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3107 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3108 | -silent | --silent | --silen | --sile | --sil)
3111 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3114 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3116 as_fn_append ac_configure_args1 " '$ac_arg'"
3117 if test $ac_must_keep_next = true; then
3118 ac_must_keep_next=false # Got value, back to normal.
3121 *=* | --config-cache | -C | -disable-* | --disable-* \
3122 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3123 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3124 | -with-* | --with-* | -without-* | --without-* | --x)
3125 case "$ac_configure_args0 " in
3126 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3129 -* ) ac_must_keep_next=true ;;
3132 as_fn_append ac_configure_args " '$ac_arg'"
3137 { ac_configure_args0=; unset ac_configure_args0;}
3138 { ac_configure_args1=; unset ac_configure_args1;}
3140 # When interrupted or exit'd, cleanup temporary files, and complete
3141 # config.log. We remove comments because anyway the quotes in there
3142 # would cause problems or look ugly.
3143 # WARNING: Use '\'' to represent an apostrophe within the trap.
3144 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3145 trap 'exit_status=$?
3148 # Save into config.log some information that might help in debugging.
3152 printf "%s\n" "## ---------------- ##
3153 ## Cache variables. ##
3154 ## ---------------- ##"
3156 # The following way of writing the cache mishandles newlines in values,
3158 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3159 eval ac_val=\$$ac_var
3163 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3164 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3167 _ | IFS | as_nl) ;; #(
3168 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3169 *) { eval $ac_var=; unset $ac_var;} ;;
3174 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3175 *${as_nl}ac_space=\ *)
3177 "s/'\''/'\''\\\\'\'''\''/g;
3178 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3181 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3188 printf "%s\n" "## ----------------- ##
3189 ## Output variables. ##
3190 ## ----------------- ##"
3192 for ac_var in $ac_subst_vars
3194 eval ac_val=\$$ac_var
3196 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3198 printf "%s\n" "$ac_var='\''$ac_val'\''"
3202 if test -n "$ac_subst_files"; then
3203 printf "%s\n" "## ------------------- ##
3204 ## File substitutions. ##
3205 ## ------------------- ##"
3207 for ac_var in $ac_subst_files
3209 eval ac_val=\$$ac_var
3211 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3213 printf "%s\n" "$ac_var='\''$ac_val'\''"
3218 if test -s confdefs.h; then
3219 printf "%s\n" "## ----------- ##
3226 test "$ac_signal" != 0 &&
3227 printf "%s\n" "$as_me: caught signal $ac_signal"
3228 printf "%s\n" "$as_me: exit $exit_status"
3230 rm -f core *.core core.conftest.* &&
3231 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3234 for ac_signal in 1 2 13 15; do
3235 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3239 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3240 rm -f -r conftest* confdefs.h
3242 printf "%s\n" "/* confdefs.h */" > confdefs.h
3244 # Predefined preprocessor variables.
3246 cat >>confdefs.h <<_ACEOF
3247 #define PACKAGE_NAME "$PACKAGE_NAME"
3250 cat >>confdefs.h <<_ACEOF
3251 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3254 cat >>confdefs.h <<_ACEOF
3255 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3258 cat >>confdefs.h <<_ACEOF
3259 #define PACKAGE_STRING "$PACKAGE_STRING"
3262 cat >>confdefs.h <<_ACEOF
3263 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3266 cat >>confdefs.h <<_ACEOF
3267 #define PACKAGE_URL "$PACKAGE_URL"
3271 # Let the site file select an alternate cache file if it wants to.
3272 # Prefer an explicitly selected file to automatically selected ones.
3275 if test -n "$CONFIG_SITE"; then
3276 # We do not want a PATH search for config.site.
3277 case $CONFIG_SITE in #((
3278 -*) ac_site_file1=./$CONFIG_SITE;;
3279 */*) ac_site_file1=$CONFIG_SITE;;
3280 *) ac_site_file1=./$CONFIG_SITE;;
3282 elif test "x$prefix" != xNONE; then
3283 ac_site_file1=$prefix/share/config.site
3284 ac_site_file2=$prefix/etc/config.site
3286 ac_site_file1=$ac_default_prefix/share/config.site
3287 ac_site_file2=$ac_default_prefix/etc/config.site
3289 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3291 test "x$ac_site_file" = xNONE && continue
3292 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3294 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3295 sed 's/^/| /' "$ac_site_file" >&5
3297 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3298 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3299 as_fn_error $? "failed to load site script $ac_site_file
3300 See \`config.log' for more details" "$LINENO" 5; }
3304 if test -r "$cache_file"; then
3305 # Some versions of bash will fail to source /dev/null (special files
3306 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3307 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3309 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3311 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3312 *) . "./$cache_file";;
3316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3317 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3321 as_fn_append ac_header_list " sys/types.h"
3322 as_fn_append ac_header_list " sys/stat.h"
3323 as_fn_append ac_header_list " strings.h"
3324 as_fn_append ac_header_list " inttypes.h"
3325 as_fn_append ac_header_list " stdint.h"
3326 as_fn_append ac_header_list " unistd.h"
3327 as_fn_append ac_header_list " sys/param.h"
3328 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3329 as_fn_append ac_header_list " sys/socket.h"
3330 as_fn_append ac_func_list " fchdir"
3331 as_fn_append ac_header_list " dirent.h"
3332 as_fn_append ac_func_list " fdopendir"
3333 as_fn_append ac_func_list " strerror_r"
3334 as_fn_append ac_func_list " fcntl"
3335 as_fn_append ac_func_list " symlink"
3336 as_fn_append ac_func_list " mempcpy"
3337 as_fn_append ac_func_list " vasnprintf"
3338 as_fn_append ac_header_list " features.h"
3339 as_fn_append ac_func_list " snprintf"
3340 as_fn_append ac_func_list " fpurge"
3341 as_fn_append ac_func_list " __fpurge"
3342 as_fn_append ac_func_list " __freading"
3343 as_fn_append ac_func_list " __fseterr"
3344 as_fn_append ac_func_list " fstatat"
3345 as_fn_append ac_func_list " fsync"
3346 as_fn_append ac_func_list " getdtablesize"
3347 gl_getopt_required=GNU
3348 as_fn_append ac_header_list " getopt.h"
3349 as_fn_append ac_func_list " gettimeofday"
3350 as_fn_append ac_func_list " nanotime"
3351 as_fn_append ac_header_list " sys/time.h"
3352 as_fn_append ac_func_list " lstat"
3353 as_fn_append ac_header_list " math.h"
3354 as_fn_append ac_header_list " sys/mman.h"
3355 as_fn_append ac_func_list " mprotect"
3356 as_fn_append ac_func_list " openat"
3357 as_fn_append ac_func_list " __xpg_strerror_r"
3359 as_fn_append ac_header_list " wchar.h"
3360 as_fn_append ac_func_list " strdup"
3361 as_fn_append ac_func_list " catgets"
3362 as_fn_append ac_func_list " pipe"
3363 as_fn_append ac_func_list " unlinkat"
3364 as_fn_append ac_header_list " utime.h"
3365 as_fn_append ac_func_list " futimes"
3366 as_fn_append ac_func_list " futimesat"
3367 as_fn_append ac_func_list " futimens"
3368 as_fn_append ac_func_list " utimensat"
3369 as_fn_append ac_func_list " lutimes"
3370 as_fn_append ac_header_list " fcntl.h"
3371 as_fn_append ac_header_list " limits.h"
3372 as_fn_append ac_header_list " memory.h"
3373 as_fn_append ac_header_list " time.h"
3374 as_fn_append ac_func_list " chown"
3375 as_fn_append ac_func_list " fchmod"
3376 as_fn_append ac_func_list " fchown"
3377 as_fn_append ac_func_list " siginterrupt"
3378 # Check that the precious variables saved in the cache have kept the same
3380 ac_cache_corrupted=false
3381 for ac_var in $ac_precious_vars; do
3382 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3383 eval ac_new_set=\$ac_env_${ac_var}_set
3384 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3385 eval ac_new_val=\$ac_env_${ac_var}_value
3386 case $ac_old_set,$ac_new_set in
3388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3389 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3390 ac_cache_corrupted=: ;;
3392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3393 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3394 ac_cache_corrupted=: ;;
3397 if test "x$ac_old_val" != "x$ac_new_val"; then
3398 # differences in whitespace do not lead to failure.
3399 ac_old_val_w=`echo x $ac_old_val`
3400 ac_new_val_w=`echo x $ac_new_val`
3401 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3403 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3404 ac_cache_corrupted=:
3406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3407 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3408 eval $ac_var=\$ac_old_val
3410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3411 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3413 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
3416 # Pass precious variables to config.status.
3417 if test "$ac_new_set" = set; then
3419 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3420 *) ac_arg=$ac_var=$ac_new_val ;;
3422 case " $ac_configure_args " in
3423 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3424 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3428 if $ac_cache_corrupted; then
3429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3432 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3433 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3435 ## -------------------- ##
3436 ## Main body of script. ##
3437 ## -------------------- ##
3440 ac_cpp='$CPP $CPPFLAGS'
3441 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3442 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3449 for ac_dir in build-aux "$srcdir"/build-aux
3451 if test -f "$ac_dir/install-sh"; then
3453 ac_install_sh="$ac_aux_dir/install-sh -c"
3455 elif test -f "$ac_dir/install.sh"; then
3457 ac_install_sh="$ac_aux_dir/install.sh -c"
3459 elif test -f "$ac_dir/shtool"; then
3461 ac_install_sh="$ac_aux_dir/shtool install -c"
3465 if test -z "$ac_aux_dir"; then
3466 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3469 # These three variables are undocumented and unsupported,
3470 # and are intended to be withdrawn in a future Autoconf release.
3471 # They can cause serious problems if a builder's source tree is in a directory
3472 # whose full name contains unusual characters.
3473 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3474 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3475 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3479 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3481 am__api_version='1.99a'
3483 # Find a good install program. We prefer a C program (faster),
3484 # so one script is as good as another. But avoid the broken or
3485 # incompatible versions:
3486 # SysV /etc/install, /usr/sbin/install
3487 # SunOS /usr/etc/install
3488 # IRIX /sbin/install
3490 # AmigaOS /C/install, which installs bootblocks on floppy discs
3491 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3492 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3493 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3494 # OS/2's system install, which has a completely different semantic
3495 # ./install, which can be erroneously created by make from ./install.sh.
3496 # Reject install programs that cannot install multiple files.
3497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3498 printf %s "checking for a BSD-compatible install... " >&6; }
3499 if test -z "$INSTALL"; then
3500 if test ${ac_cv_path_install+y}
3502 printf %s "(cached) " >&6
3504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3508 case $as_dir in #(((
3511 *) as_dir=$as_dir/ ;;
3513 # Account for fact that we put trailing slashes in our PATH walk.
3516 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3517 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3520 # OSF1 and SCO ODT 3.0 have their own names for install.
3521 # Don't use installbsd from OSF since it installs stuff as root
3523 for ac_prog in ginstall scoinst install; do
3524 for ac_exec_ext in '' $ac_executable_extensions; do
3525 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3526 if test $ac_prog = install &&
3527 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3528 # AIX install. It has an incompatible calling convention.
3530 elif test $ac_prog = install &&
3531 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3532 # program-specific install script used by HP pwplus--don't use.
3535 rm -rf conftest.one conftest.two conftest.dir
3536 echo one > conftest.one
3537 echo two > conftest.two
3539 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3540 test -s conftest.one && test -s conftest.two &&
3541 test -s conftest.dir/conftest.one &&
3542 test -s conftest.dir/conftest.two
3544 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3557 rm -rf conftest.one conftest.two conftest.dir
3560 if test ${ac_cv_path_install+y}; then
3561 INSTALL=$ac_cv_path_install
3563 # As a last resort, use the slow shell script. Don't cache a
3564 # value for INSTALL within a source directory, because that will
3565 # break other packages using the cache if that directory is
3566 # removed, or if the value is a relative name.
3567 INSTALL=$ac_install_sh
3570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3571 printf "%s\n" "$INSTALL" >&6; }
3573 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3574 # It thinks the first close brace ends the variable substitution.
3575 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3577 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3579 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3582 printf %s "checking whether build environment is sane... " >&6; }
3583 # Reject unsafe characters in $srcdir or the absolute working directory
3584 # name. Accept space and tab only in the latter.
3588 *[\\\"\#\$\&\'\`$am_lf]*)
3589 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3592 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3593 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3596 # Do 'set' in a subshell so we don't clobber the current shell's
3597 # arguments. Must try -L first in case configure is actually a
3598 # symlink; some systems play weird games with the mod time of symlinks
3599 # (eg FreeBSD returns the mod time of the symlink's containing
3603 for am_try in 1 2; do
3604 echo "timestamp, slept: $am_has_slept" > conftest.file
3605 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3606 if test "$*" = "X"; then
3608 set X `ls -t "$srcdir/configure" conftest.file`
3610 if test "$*" != "X $srcdir/configure conftest.file" \
3611 && test "$*" != "X conftest.file $srcdir/configure"; then
3613 # If neither matched, then we have a broken ls. This can happen
3614 # if, for instance, CONFIG_SHELL is bash and it inherits a
3615 # broken ls alias from the environment. This has actually
3616 # happened. Such a system could not be considered "sane".
3617 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3618 alias in your environment" "$LINENO" 5
3620 if test "$2" = conftest.file || test $am_try -eq 2; then
3627 test "$2" = conftest.file
3633 as_fn_error $? "newly created file is older than distributed files!
3634 Check your system clock" "$LINENO" 5
3636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3637 printf "%s\n" "yes" >&6; }
3638 # If we didn't sleep, we still need to ensure time stamps of config.status and
3639 # generated files are strictly newer.
3641 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3648 test "$program_prefix" != NONE &&
3649 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3650 # Use a double $ so make ignores it.
3651 test "$program_suffix" != NONE &&
3652 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3653 # Double any \ or $.
3654 # By default was `s,x,x', remove it if useless.
3655 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3656 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3658 # Expand $ac_aux_dir to an absolute path.
3659 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3661 if test x"${MISSING+set}" != xset; then
3664 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3666 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3669 # Use eval to expand $SHELL
3670 if eval "$MISSING --is-lightweight"; then
3671 am_missing_run="$MISSING "
3674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3675 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3678 if test x"${install_sh+set}" != xset; then
3681 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3683 install_sh="\${SHELL} $am_aux_dir/install-sh"
3687 # Installed binaries are usually stripped using 'strip' when the user
3688 # run "make install-strip". However 'strip' might not be the right
3689 # tool to use in cross-compilation environments, therefore Automake
3690 # will honor the 'STRIP' environment variable to overrule this program.
3691 if test "$cross_compiling" != no; then
3692 if test -n "$ac_tool_prefix"; then
3693 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3694 set dummy ${ac_tool_prefix}strip; ac_word=$2
3695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3696 printf %s "checking for $ac_word... " >&6; }
3697 if test ${ac_cv_prog_STRIP+y}
3699 printf %s "(cached) " >&6
3701 if test -n "$STRIP"; then
3702 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3708 case $as_dir in #(((
3711 *) as_dir=$as_dir/ ;;
3713 for ac_exec_ext in '' $ac_executable_extensions; do
3714 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3715 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3716 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3725 STRIP=$ac_cv_prog_STRIP
3726 if test -n "$STRIP"; then
3727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3728 printf "%s\n" "$STRIP" >&6; }
3730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3731 printf "%s\n" "no" >&6; }
3736 if test -z "$ac_cv_prog_STRIP"; then
3738 # Extract the first word of "strip", so it can be a program name with args.
3739 set dummy strip; ac_word=$2
3740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3741 printf %s "checking for $ac_word... " >&6; }
3742 if test ${ac_cv_prog_ac_ct_STRIP+y}
3744 printf %s "(cached) " >&6
3746 if test -n "$ac_ct_STRIP"; then
3747 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3753 case $as_dir in #(((
3756 *) as_dir=$as_dir/ ;;
3758 for ac_exec_ext in '' $ac_executable_extensions; do
3759 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3760 ac_cv_prog_ac_ct_STRIP="strip"
3761 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3770 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3771 if test -n "$ac_ct_STRIP"; then
3772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3773 printf "%s\n" "$ac_ct_STRIP" >&6; }
3775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3776 printf "%s\n" "no" >&6; }
3779 if test "x$ac_ct_STRIP" = x; then
3782 case $cross_compiling:$ac_tool_warned in
3784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3785 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3786 ac_tool_warned=yes ;;
3791 STRIP="$ac_cv_prog_STRIP"
3795 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3798 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3799 if test -z "$MKDIR_P"; then
3800 if test ${ac_cv_path_mkdir+y}
3802 printf %s "(cached) " >&6
3804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3805 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3808 case $as_dir in #(((
3811 *) as_dir=$as_dir/ ;;
3813 for ac_prog in mkdir gmkdir; do
3814 for ac_exec_ext in '' $ac_executable_extensions; do
3815 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3816 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3817 'mkdir ('*'coreutils) '* | \
3819 'mkdir (fileutils) '4.1*)
3820 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3830 test -d ./--version && rmdir ./--version
3831 if test ${ac_cv_path_mkdir+y}; then
3832 MKDIR_P="$ac_cv_path_mkdir -p"
3834 # As a last resort, use the slow shell script. Don't cache a
3835 # value for MKDIR_P within a source directory, because that will
3836 # break other packages using the cache if that directory is
3837 # removed, or if the value is a relative name.
3838 MKDIR_P="$ac_install_sh -d"
3841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3842 printf "%s\n" "$MKDIR_P" >&6; }
3844 for ac_prog in gawk mawk nawk awk
3846 # Extract the first word of "$ac_prog", so it can be a program name with args.
3847 set dummy $ac_prog; ac_word=$2
3848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3849 printf %s "checking for $ac_word... " >&6; }
3850 if test ${ac_cv_prog_AWK+y}
3852 printf %s "(cached) " >&6
3854 if test -n "$AWK"; then
3855 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3861 case $as_dir in #(((
3864 *) as_dir=$as_dir/ ;;
3866 for ac_exec_ext in '' $ac_executable_extensions; do
3867 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3868 ac_cv_prog_AWK="$ac_prog"
3869 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3879 if test -n "$AWK"; then
3880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3881 printf "%s\n" "$AWK" >&6; }
3883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3884 printf "%s\n" "no" >&6; }
3888 test -n "$AWK" && break
3891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3892 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3894 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3895 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3897 printf %s "(cached) " >&6
3899 cat >conftest.make <<\_ACEOF
3902 @echo '@@@%%%=$(MAKE)=@@@%%%'
3904 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3905 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3907 eval ac_cv_prog_make_${ac_make}_set=yes;;
3909 eval ac_cv_prog_make_${ac_make}_set=no;;
3913 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3915 printf "%s\n" "yes" >&6; }
3918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3919 printf "%s\n" "no" >&6; }
3920 SET_MAKE="MAKE=${MAKE-make}"
3923 # Check whether --enable-silent-rules was given.
3924 if test ${enable_silent_rules+y}
3926 enableval=$enable_silent_rules;
3929 case $enable_silent_rules in # (((
3930 yes) AM_DEFAULT_VERBOSITY=0;;
3931 no) AM_DEFAULT_VERBOSITY=1;;
3932 *) AM_DEFAULT_VERBOSITY=1;;
3934 am_make=${MAKE-make}
3935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3936 printf %s "checking whether $am_make supports nested variables... " >&6; }
3937 if test ${am_cv_make_support_nested_variables+y}
3939 printf %s "(cached) " >&6
3941 if printf "%s\n" 'TRUE=$(BAR$(V))
3947 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3948 am_cv_make_support_nested_variables=yes
3950 am_cv_make_support_nested_variables=no
3953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3954 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3955 if test $am_cv_make_support_nested_variables = yes; then
3957 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3959 AM_V=$AM_DEFAULT_VERBOSITY
3960 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3964 mkdir_p='$(MKDIR_P)'
3965 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3966 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3967 # is not polluted with repeated "-I."
3968 am__isrc=' -I$(srcdir)'
3969 # test to see if srcdir already configured
3970 if test -f $srcdir/config.status; then
3971 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3975 # test whether we have cygpath
3976 if test -z "$CYGPATH_W"; then
3977 if (cygpath --version) >/dev/null 2>/dev/null; then
3978 CYGPATH_W='cygpath -w'
3985 # Define the identity of the package.
3990 cat >>confdefs.h <<_ACEOF
3991 #define PACKAGE "$PACKAGE"
3995 cat >>confdefs.h <<_ACEOF
3996 #define VERSION "$VERSION"
3999 # Some tools Automake needs.
4001 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4004 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4007 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4010 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4013 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4015 # We need awk for the "check" target (and possibly the TAP driver). The
4016 # system "awk" is bad on some platforms.
4017 # Always define AMTAR for backward compatibility. Yes, it's still used
4018 # in the wild :-( We should find a proper way to deprecate it ...
4022 # We'll loop over all known methods to create a tar archive until one works.
4023 _am_tools='gnutar pax cpio none'
4025 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4032 # POSIX will say in a future version that running "rm -f" with no argument
4033 # is OK; and we want to be able to make that assumption in our Makefile
4034 # recipes. So use an aggressive probe to check that the usage we want is
4035 # actually supported "in the wild" to an acceptable degree.
4036 # See automake bug#10828.
4037 # To make any issue more visible, cause the running configure to be aborted
4038 # by default if the 'rm' program in use doesn't match our expectations; the
4039 # user can still override this though.
4040 if rm -f && rm -fr && rm -rf; then : OK; else
4044 Your 'rm' program seems unable to run without file operands specified
4045 on the command line, even when the '-f' option is present. This is contrary
4046 to the behaviour of most rm programs out there, and not conforming with
4047 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4049 Please tell bug-automake@gnu.org about your system, including the value
4050 of your $PATH and any error possibly output before this message. This
4051 can help us improve future automake versions.
4054 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4055 echo 'Configuration will proceed anyway, since you have set the' >&2
4056 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4060 Aborting the configuration process, to ensure you take notice of the issue.
4062 You can download and install GNU coreutils to get an 'rm' implementation
4063 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4065 If you want to complete the configuration process using your problematic
4066 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4067 to "yes", and re-run configure.
4070 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4074 # Check whether --enable-silent-rules was given.
4075 if test ${enable_silent_rules+y}
4077 enableval=$enable_silent_rules;
4080 case $enable_silent_rules in # (((
4081 yes) AM_DEFAULT_VERBOSITY=0;;
4082 no) AM_DEFAULT_VERBOSITY=1;;
4083 *) AM_DEFAULT_VERBOSITY=0;;
4085 am_make=${MAKE-make}
4086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4087 printf %s "checking whether $am_make supports nested variables... " >&6; }
4088 if test ${am_cv_make_support_nested_variables+y}
4090 printf %s "(cached) " >&6
4092 if printf "%s\n" 'TRUE=$(BAR$(V))
4098 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4099 am_cv_make_support_nested_variables=yes
4101 am_cv_make_support_nested_variables=no
4104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4105 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4106 if test $am_cv_make_support_nested_variables = yes; then
4108 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4110 AM_V=$AM_DEFAULT_VERBOSITY
4111 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4114 # make --enable-silent-rules the default.
4123 ac_config_commands="$ac_config_commands depfiles"
4125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4126 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4127 cat > confinc.mk << 'END'
4129 @echo this is the am__doit target >confinc.out
4134 # BSD make does it like this.
4135 echo '.include "confinc.mk" # ignored' > confmf.BSD
4136 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4137 echo 'include confinc.mk # ignored' > confmf.GNU
4139 for s in GNU BSD; do
4140 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4141 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144 (exit $ac_status); }
4145 case $?:`cat confinc.out 2>/dev/null` in #(
4146 '0:this is the am__doit target') :
4149 am__include='.include' am__quote='"' ;; #(
4151 am__include='include' am__quote='' ;;
4156 if test "$am__include" != "#"; then
4157 _am_result="yes ($s style)"
4161 rm -f confinc.* confmf.*
4162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4163 printf "%s\n" "${_am_result}" >&6; }
4165 # Check whether --enable-dependency-tracking was given.
4166 if test ${enable_dependency_tracking+y}
4168 enableval=$enable_dependency_tracking;
4171 if test "x$enable_dependency_tracking" != xno; then
4172 am_depcomp="$ac_aux_dir/depcomp"
4176 if test "x$enable_dependency_tracking" != xno; then
4186 ac_cpp='$CPP $CPPFLAGS'
4187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4190 if test -n "$ac_tool_prefix"; then
4191 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4192 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4194 printf %s "checking for $ac_word... " >&6; }
4195 if test ${ac_cv_prog_CC+y}
4197 printf %s "(cached) " >&6
4199 if test -n "$CC"; then
4200 ac_cv_prog_CC="$CC" # Let the user override the test.
4202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4206 case $as_dir in #(((
4209 *) as_dir=$as_dir/ ;;
4211 for ac_exec_ext in '' $ac_executable_extensions; do
4212 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4213 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4214 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4224 if test -n "$CC"; then
4225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4226 printf "%s\n" "$CC" >&6; }
4228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4229 printf "%s\n" "no" >&6; }
4234 if test -z "$ac_cv_prog_CC"; then
4236 # Extract the first word of "gcc", so it can be a program name with args.
4237 set dummy gcc; ac_word=$2
4238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4239 printf %s "checking for $ac_word... " >&6; }
4240 if test ${ac_cv_prog_ac_ct_CC+y}
4242 printf %s "(cached) " >&6
4244 if test -n "$ac_ct_CC"; then
4245 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4251 case $as_dir in #(((
4254 *) as_dir=$as_dir/ ;;
4256 for ac_exec_ext in '' $ac_executable_extensions; do
4257 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4258 ac_cv_prog_ac_ct_CC="gcc"
4259 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4268 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4269 if test -n "$ac_ct_CC"; then
4270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4271 printf "%s\n" "$ac_ct_CC" >&6; }
4273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4274 printf "%s\n" "no" >&6; }
4277 if test "x$ac_ct_CC" = x; then
4280 case $cross_compiling:$ac_tool_warned in
4282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4283 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4284 ac_tool_warned=yes ;;
4292 if test -z "$CC"; then
4293 if test -n "$ac_tool_prefix"; then
4294 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4295 set dummy ${ac_tool_prefix}cc; ac_word=$2
4296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4297 printf %s "checking for $ac_word... " >&6; }
4298 if test ${ac_cv_prog_CC+y}
4300 printf %s "(cached) " >&6
4302 if test -n "$CC"; then
4303 ac_cv_prog_CC="$CC" # Let the user override the test.
4305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4309 case $as_dir in #(((
4312 *) as_dir=$as_dir/ ;;
4314 for ac_exec_ext in '' $ac_executable_extensions; do
4315 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4316 ac_cv_prog_CC="${ac_tool_prefix}cc"
4317 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4327 if test -n "$CC"; then
4328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4329 printf "%s\n" "$CC" >&6; }
4331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4332 printf "%s\n" "no" >&6; }
4338 if test -z "$CC"; then
4339 # Extract the first word of "cc", so it can be a program name with args.
4340 set dummy cc; ac_word=$2
4341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4342 printf %s "checking for $ac_word... " >&6; }
4343 if test ${ac_cv_prog_CC+y}
4345 printf %s "(cached) " >&6
4347 if test -n "$CC"; then
4348 ac_cv_prog_CC="$CC" # Let the user override the test.
4351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4355 case $as_dir in #(((
4358 *) as_dir=$as_dir/ ;;
4360 for ac_exec_ext in '' $ac_executable_extensions; do
4361 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4362 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4363 ac_prog_rejected=yes
4367 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4374 if test $ac_prog_rejected = yes; then
4375 # We found a bogon in the path, so make sure we never use it.
4376 set dummy $ac_cv_prog_CC
4378 if test $# != 0; then
4379 # We chose a different compiler from the bogus one.
4380 # However, it has the same basename, so the bogon will be chosen
4381 # first if we set CC to just the basename; use the full file name.
4383 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4389 if test -n "$CC"; then
4390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4391 printf "%s\n" "$CC" >&6; }
4393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394 printf "%s\n" "no" >&6; }
4399 if test -z "$CC"; then
4400 if test -n "$ac_tool_prefix"; then
4401 for ac_prog in cl.exe
4403 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4404 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4406 printf %s "checking for $ac_word... " >&6; }
4407 if test ${ac_cv_prog_CC+y}
4409 printf %s "(cached) " >&6
4411 if test -n "$CC"; then
4412 ac_cv_prog_CC="$CC" # Let the user override the test.
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4418 case $as_dir in #(((
4421 *) as_dir=$as_dir/ ;;
4423 for ac_exec_ext in '' $ac_executable_extensions; do
4424 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4425 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4426 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4436 if test -n "$CC"; then
4437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4438 printf "%s\n" "$CC" >&6; }
4440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4441 printf "%s\n" "no" >&6; }
4445 test -n "$CC" && break
4448 if test -z "$CC"; then
4450 for ac_prog in cl.exe
4452 # Extract the first word of "$ac_prog", so it can be a program name with args.
4453 set dummy $ac_prog; ac_word=$2
4454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4455 printf %s "checking for $ac_word... " >&6; }
4456 if test ${ac_cv_prog_ac_ct_CC+y}
4458 printf %s "(cached) " >&6
4460 if test -n "$ac_ct_CC"; then
4461 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4467 case $as_dir in #(((
4470 *) as_dir=$as_dir/ ;;
4472 for ac_exec_ext in '' $ac_executable_extensions; do
4473 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4474 ac_cv_prog_ac_ct_CC="$ac_prog"
4475 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4484 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4485 if test -n "$ac_ct_CC"; then
4486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4487 printf "%s\n" "$ac_ct_CC" >&6; }
4489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4490 printf "%s\n" "no" >&6; }
4494 test -n "$ac_ct_CC" && break
4497 if test "x$ac_ct_CC" = x; then
4500 case $cross_compiling:$ac_tool_warned in
4502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4503 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4504 ac_tool_warned=yes ;;
4513 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4514 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4515 as_fn_error $? "no acceptable C compiler found in \$PATH
4516 See \`config.log' for more details" "$LINENO" 5; }
4518 # Provide some information about the compiler.
4519 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4522 for ac_option in --version -v -V -qversion -version; do
4523 { { ac_try="$ac_compiler $ac_option >&5"
4525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4526 *) ac_try_echo=$ac_try;;
4528 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4529 printf "%s\n" "$ac_try_echo"; } >&5
4530 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4532 if test -s conftest.err; then
4534 ... rest of stderr output deleted ...
4535 10q' conftest.err >conftest.er1
4536 cat conftest.er1 >&5
4538 rm -f conftest.er1 conftest.err
4539 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4540 test $ac_status = 0; }
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544 /* end confdefs.h. */
4554 ac_clean_files_save=$ac_clean_files
4555 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4556 # Try to create an executable without -o first, disregard a.out.
4557 # It will help us diagnose broken compilers, and finding out an intuition
4559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4560 printf %s "checking whether the C compiler works... " >&6; }
4561 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4563 # The possible output files:
4564 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4567 for ac_file in $ac_files
4570 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4571 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4576 if { { ac_try="$ac_link_default"
4578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4579 *) ac_try_echo=$ac_try;;
4581 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4582 printf "%s\n" "$ac_try_echo"; } >&5
4583 (eval "$ac_link_default") 2>&5
4585 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4586 test $ac_status = 0; }
4588 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4589 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4590 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4591 # so that the user can short-circuit this test for compilers unknown to
4593 for ac_file in $ac_files ''
4595 test -f "$ac_file" || continue
4597 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4600 # We found the default executable, but exeext='' is most
4604 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4606 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4608 # We set ac_cv_exeext here because the later test for it is not
4609 # safe: cross compilers may not add the suffix if given an `-o'
4610 # argument, so we may need to know it at that point already.
4611 # Even if this section looks crufty: it has the advantage of
4618 test "$ac_cv_exeext" = no && ac_cv_exeext=
4623 if test -z "$ac_file"
4625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4626 printf "%s\n" "no" >&6; }
4627 printf "%s\n" "$as_me: failed program was:" >&5
4628 sed 's/^/| /' conftest.$ac_ext >&5
4630 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4631 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4632 as_fn_error 77 "C compiler cannot create executables
4633 See \`config.log' for more details" "$LINENO" 5; }
4635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4636 printf "%s\n" "yes" >&6; }
4638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4639 printf %s "checking for C compiler default output file name... " >&6; }
4640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4641 printf "%s\n" "$ac_file" >&6; }
4642 ac_exeext=$ac_cv_exeext
4644 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4645 ac_clean_files=$ac_clean_files_save
4646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4647 printf %s "checking for suffix of executables... " >&6; }
4648 if { { ac_try="$ac_link"
4650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4651 *) ac_try_echo=$ac_try;;
4653 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4654 printf "%s\n" "$ac_try_echo"; } >&5
4655 (eval "$ac_link") 2>&5
4657 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4658 test $ac_status = 0; }
4660 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4661 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4662 # work properly (i.e., refer to `conftest.exe'), while it won't with
4664 for ac_file in conftest.exe conftest conftest.*; do
4665 test -f "$ac_file" || continue
4667 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4668 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4674 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4675 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4676 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4677 See \`config.log' for more details" "$LINENO" 5; }
4679 rm -f conftest conftest$ac_cv_exeext
4680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4681 printf "%s\n" "$ac_cv_exeext" >&6; }
4683 rm -f conftest.$ac_ext
4684 EXEEXT=$ac_cv_exeext
4686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687 /* end confdefs.h. */
4692 FILE *f = fopen ("conftest.out", "w");
4693 return ferror (f) || fclose (f) != 0;
4699 ac_clean_files="$ac_clean_files conftest.out"
4700 # Check that the compiler produces executables we can run. If not, either
4701 # the compiler is broken, or we cross compile.
4702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4703 printf %s "checking whether we are cross compiling... " >&6; }
4704 if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
4706 elif test "$cross_compiling" != yes; then
4707 { { ac_try="$ac_link"
4709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4710 *) ac_try_echo=$ac_try;;
4712 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4713 printf "%s\n" "$ac_try_echo"; } >&5
4714 (eval "$ac_link") 2>&5
4716 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4717 test $ac_status = 0; }
4718 if { ac_try='./conftest$ac_cv_exeext'
4719 { { case "(($ac_try" in
4720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4721 *) ac_try_echo=$ac_try;;
4723 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4724 printf "%s\n" "$ac_try_echo"; } >&5
4725 (eval "$ac_try") 2>&5
4727 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4728 test $ac_status = 0; }; }; then
4731 if test "$cross_compiling" = maybe; then
4734 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4735 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4736 as_fn_error $? "cannot run C compiled programs.
4737 If you meant to cross compile, use \`--host'.
4738 See \`config.log' for more details" "$LINENO" 5; }
4742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4743 printf "%s\n" "$cross_compiling" >&6; }
4745 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4746 ac_clean_files=$ac_clean_files_save
4747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4748 printf %s "checking for suffix of object files... " >&6; }
4749 if test ${ac_cv_objext+y}
4751 printf %s "(cached) " >&6
4753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754 /* end confdefs.h. */
4764 rm -f conftest.o conftest.obj
4765 if { { ac_try="$ac_compile"
4767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4768 *) ac_try_echo=$ac_try;;
4770 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4771 printf "%s\n" "$ac_try_echo"; } >&5
4772 (eval "$ac_compile") 2>&5
4774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4775 test $ac_status = 0; }
4777 for ac_file in conftest.o conftest.obj conftest.*; do
4778 test -f "$ac_file" || continue;
4780 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4781 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4786 printf "%s\n" "$as_me: failed program was:" >&5
4787 sed 's/^/| /' conftest.$ac_ext >&5
4789 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4790 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4791 as_fn_error $? "cannot compute suffix of object files: cannot compile
4792 See \`config.log' for more details" "$LINENO" 5; }
4794 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4797 printf "%s\n" "$ac_cv_objext" >&6; }
4798 OBJEXT=$ac_cv_objext
4800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4801 printf %s "checking whether the compiler supports GNU C... " >&6; }
4802 if test ${ac_cv_c_compiler_gnu+y}
4804 printf %s "(cached) " >&6
4806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807 /* end confdefs.h. */
4820 if ac_fn_c_try_compile "$LINENO"
4826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4831 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4832 if test $ac_compiler_gnu = yes; then
4837 ac_test_CFLAGS=${CFLAGS+y}
4838 ac_save_CFLAGS=$CFLAGS
4839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4840 printf %s "checking whether $CC accepts -g... " >&6; }
4841 if test ${ac_cv_prog_cc_g+y}
4843 printf %s "(cached) " >&6
4845 ac_save_c_werror_flag=$ac_c_werror_flag
4846 ac_c_werror_flag=yes
4849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4850 /* end confdefs.h. */
4860 if ac_fn_c_try_compile "$LINENO"
4865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4866 /* end confdefs.h. */
4876 if ac_fn_c_try_compile "$LINENO"
4880 ac_c_werror_flag=$ac_save_c_werror_flag
4882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4883 /* end confdefs.h. */
4893 if ac_fn_c_try_compile "$LINENO"
4897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4902 ac_c_werror_flag=$ac_save_c_werror_flag
4904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4905 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4906 if test $ac_test_CFLAGS; then
4907 CFLAGS=$ac_save_CFLAGS
4908 elif test $ac_cv_prog_cc_g = yes; then
4909 if test "$GCC" = yes; then
4915 if test "$GCC" = yes; then
4921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4922 printf %s "checking for $CC option to enable C11 features... " >&6; }
4923 if test ${ac_cv_prog_cc_c11+y}
4925 printf %s "(cached) " >&6
4927 ac_cv_prog_cc_c11=no
4929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4930 /* end confdefs.h. */
4932 #include <stdbool.h>
4937 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4938 #define debug(...) fprintf (stderr, __VA_ARGS__)
4939 #define showlist(...) puts (#__VA_ARGS__)
4940 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4942 test_varargs_macros (void)
4947 debug ("X = %d\n", x);
4948 showlist (The first, second, and third items.);
4949 report (x>y, "x is %d but y is %d", x, y);
4952 // Check long long types.
4953 #define BIG64 18446744073709551615ull
4954 #define BIG32 4294967295ul
4955 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4957 your preprocessor is broken;
4961 your preprocessor is broken;
4963 static long long int bignum = -9223372036854775807LL;
4964 static unsigned long long int ubignum = BIG64;
4966 struct incomplete_array
4974 const wchar_t *name;
4978 typedef const char *ccp;
4981 test_restrict (ccp restrict text)
4983 // See if C++-style comments work.
4984 // Iterate through items via the restricted pointer.
4985 // Also check for declarations in for loops.
4986 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4991 // Check varargs and va_copy.
4993 test_varargs (const char *format, ...)
4996 va_start (args, format);
4998 va_copy (args_copy, args);
5000 const char *str = "";
5009 str = va_arg (args_copy, const char *);
5012 number = va_arg (args_copy, int);
5015 fnumber = va_arg (args_copy, double);
5024 return *str && number && fnumber;
5027 char _Alignas (double) aligned_as_double;
5028 char _Alignas (0) no_special_alignment;
5029 extern char aligned_as_int;
5030 char _Alignas (0) _Alignas (int) aligned_as_int;
5035 int_alignment = _Alignof (int),
5036 int_array_alignment = _Alignof (int[100]),
5037 char_alignment = _Alignof (char)
5039 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5042 int _Noreturn does_not_return (void) { for (;;) continue; }
5044 // Check _Static_assert.
5045 struct test_static_assert
5048 _Static_assert (sizeof (int) <= sizeof (long int),
5049 "_Static_assert does not work in struct");
5053 // Check UTF-8 literals.
5054 #define u8 syntax error!
5055 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5057 // Check duplicate typedefs.
5058 typedef long *long_ptr;
5059 typedef long int *long_ptr;
5060 typedef long_ptr long_ptr;
5062 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5066 struct { int i; int j; };
5067 struct { int k; long int l; } w;
5077 _Bool success = false;
5080 if (test_restrict ("String literal") == 0)
5082 char *restrict newvar = "Another string";
5085 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5086 test_varargs_macros ();
5088 // Check flexible array members.
5089 struct incomplete_array *ia =
5090 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5092 for (int i = 0; i < ia->datasize; ++i)
5093 ia->data[i] = i * 1.234;
5095 // Check named initializers.
5096 struct named_init ni = {
5098 .name = L"Test wide string",
5099 .average = 543.34343,
5104 int dynamic_array[ni.number];
5105 dynamic_array[ni.number - 1] = 543;
5107 // work around unused variable warnings
5108 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5109 || dynamic_array[ni.number - 1] != 543);
5113 _Static_assert (&v1.i == &v1.w.k, "Anonymous union alignment botch");
5119 for ac_arg in '' -std=gnu11
5121 CC="$ac_save_CC $ac_arg"
5122 if ac_fn_c_try_compile "$LINENO"
5124 ac_cv_prog_cc_c11=$ac_arg
5126 rm -f core conftest.err conftest.$ac_objext
5127 test "x$ac_cv_prog_cc_c11" != "xno" && break
5129 rm -f conftest.$ac_ext
5134 ac_prog_cc_stdc_options=
5135 case "x$ac_cv_prog_cc_c11" in
5137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5138 printf "%s\n" "none needed" >&6; } ;;
5140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5141 printf "%s\n" "unsupported" >&6; } ;;
5143 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5144 CC=$CC$ac_prog_cc_stdc_options
5145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5146 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5148 if test "x$ac_cv_prog_cc_c11" != xno
5151 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5154 printf %s "checking for $CC option to enable C99 features... " >&6; }
5155 if test ${ac_cv_prog_cc_c99+y}
5157 printf %s "(cached) " >&6
5159 ac_cv_prog_cc_c99=no
5161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5162 /* end confdefs.h. */
5164 #include <stdbool.h>
5169 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5170 #define debug(...) fprintf (stderr, __VA_ARGS__)
5171 #define showlist(...) puts (#__VA_ARGS__)
5172 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5174 test_varargs_macros (void)
5179 debug ("X = %d\n", x);
5180 showlist (The first, second, and third items.);
5181 report (x>y, "x is %d but y is %d", x, y);
5184 // Check long long types.
5185 #define BIG64 18446744073709551615ull
5186 #define BIG32 4294967295ul
5187 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5189 your preprocessor is broken;
5193 your preprocessor is broken;
5195 static long long int bignum = -9223372036854775807LL;
5196 static unsigned long long int ubignum = BIG64;
5198 struct incomplete_array
5206 const wchar_t *name;
5210 typedef const char *ccp;
5213 test_restrict (ccp restrict text)
5215 // See if C++-style comments work.
5216 // Iterate through items via the restricted pointer.
5217 // Also check for declarations in for loops.
5218 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5223 // Check varargs and va_copy.
5225 test_varargs (const char *format, ...)
5228 va_start (args, format);
5230 va_copy (args_copy, args);
5232 const char *str = "";
5241 str = va_arg (args_copy, const char *);
5244 number = va_arg (args_copy, int);
5247 fnumber = va_arg (args_copy, double);
5256 return *str && number && fnumber;
5263 _Bool success = false;
5266 if (test_restrict ("String literal") == 0)
5268 char *restrict newvar = "Another string";
5271 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5272 test_varargs_macros ();
5274 // Check flexible array members.
5275 struct incomplete_array *ia =
5276 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5278 for (int i = 0; i < ia->datasize; ++i)
5279 ia->data[i] = i * 1.234;
5281 // Check named initializers.
5282 struct named_init ni = {
5284 .name = L"Test wide string",
5285 .average = 543.34343,
5290 int dynamic_array[ni.number];
5291 dynamic_array[ni.number - 1] = 543;
5293 // work around unused variable warnings
5294 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5295 || dynamic_array[ni.number - 1] != 543);
5301 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5303 CC="$ac_save_CC $ac_arg"
5304 if ac_fn_c_try_compile "$LINENO"
5306 ac_cv_prog_cc_c99=$ac_arg
5308 rm -f core conftest.err conftest.$ac_objext
5309 test "x$ac_cv_prog_cc_c99" != "xno" && break
5311 rm -f conftest.$ac_ext
5316 ac_prog_cc_stdc_options=
5317 case "x$ac_cv_prog_cc_c99" in
5319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5320 printf "%s\n" "none needed" >&6; } ;;
5322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5323 printf "%s\n" "unsupported" >&6; } ;;
5325 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5326 CC=$CC$ac_prog_cc_stdc_options
5327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5328 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5330 if test "x$ac_cv_prog_cc_c99" != xno
5333 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5336 printf %s "checking for $CC option to enable C89 features... " >&6; }
5337 if test ${ac_cv_prog_cc_c89+y}
5339 printf %s "(cached) " >&6
5341 ac_cv_prog_cc_c89=no
5343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5344 /* end confdefs.h. */
5348 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5349 struct buf { int x; };
5350 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5351 static char *e (p, i)
5357 static char *f (char * (*g) (char **, int), char **p, ...)
5362 s = g (p, va_arg (v,int));
5367 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5368 function prototypes and stuff, but not '\xHH' hex character constants.
5369 These don't provoke an error unfortunately, instead are silently treated
5370 as 'x'. The following induces an error, until -std is added to get
5371 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5372 array size at least. It's necessary to write '\x00'==0 to get something
5373 that's true only with -std. */
5374 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5376 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5377 inside strings and character constants. */
5379 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5381 int test (int i, double x);
5382 struct s1 {int (*f) (int a);};
5383 struct s2 {int (*f) (double a);};
5384 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5390 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5395 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5396 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5398 CC="$ac_save_CC $ac_arg"
5399 if ac_fn_c_try_compile "$LINENO"
5401 ac_cv_prog_cc_c89=$ac_arg
5403 rm -f core conftest.err conftest.$ac_objext
5404 test "x$ac_cv_prog_cc_c89" != "xno" && break
5406 rm -f conftest.$ac_ext
5411 ac_prog_cc_stdc_options=
5412 case "x$ac_cv_prog_cc_c89" in
5414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5415 printf "%s\n" "none needed" >&6; } ;;
5417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5418 printf "%s\n" "unsupported" >&6; } ;;
5420 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5421 CC=$CC$ac_prog_cc_stdc_options
5422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5423 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5425 if test "x$ac_cv_prog_cc_c89" != xno
5428 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5431 ac_cv_prog_cc_stdc=no
5439 ac_cpp='$CPP $CPPFLAGS'
5440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5445 ac_cpp='$CPP $CPPFLAGS'
5446 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5447 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5448 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5450 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5451 if test ${am_cv_prog_cc_c_o+y}
5453 printf %s "(cached) " >&6
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5456 /* end confdefs.h. */
5466 # Make sure it works both with $CC and with simple cc.
5467 # Following AC_PROG_CC_C_O, we do the test twice because some
5468 # compilers refuse to overwrite an existing .o file with -o,
5469 # though they will create one.
5470 am_cv_prog_cc_c_o=yes
5472 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5473 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5476 (exit $ac_status); } \
5477 && test -f conftest2.$ac_objext; then
5480 am_cv_prog_cc_c_o=no
5484 rm -f core conftest*
5487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5488 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5489 if test "$am_cv_prog_cc_c_o" != yes; then
5490 # Losing compiler, so override with the script.
5491 # FIXME: It is wrong to rewrite CC.
5492 # But if we don't then we get into trouble of one sort or another.
5493 # A longer-term fix would be to have automake use am__CC in this case,
5494 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5495 CC="$am_aux_dir/compile $CC"
5498 ac_cpp='$CPP $CPPFLAGS'
5499 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5500 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5501 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5504 depcc="$CC" am_compiler_list=
5506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5507 printf %s "checking dependency style of $depcc... " >&6; }
5508 if test ${am_cv_CC_dependencies_compiler_type+y}
5510 printf %s "(cached) " >&6
5512 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5513 # We make a subdir and do the tests there. Otherwise we can end up
5514 # making bogus files that we don't know about and never remove. For
5515 # instance it was reported that on HP-UX the gcc test will end up
5516 # making a dummy file named 'D' -- because '-MD' means "put the output
5520 # Copy depcomp to subdir because otherwise we won't find it if we're
5521 # using a relative directory.
5522 cp "$am_depcomp" conftest.dir
5524 # We will build objects and dependencies in a subdirectory because
5525 # it helps to detect inapplicable dependency modes. For instance
5526 # both Tru64's cc and ICC support -MD to output dependencies as a
5527 # side effect of compilation, but ICC will put the dependencies in
5528 # the current directory while Tru64 will put them in the object
5532 am_cv_CC_dependencies_compiler_type=none
5533 if test "$am_compiler_list" = ""; then
5534 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5537 case " $depcc " in #(
5538 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5541 for depmode in $am_compiler_list; do
5542 # Setup a source with many dependencies, because some compilers
5543 # like to wrap large dependency lists on column 80 (with \), and
5544 # we should not choose a depcomp mode which is confused by this.
5546 # We need to recreate these files for each test, as the compiler may
5547 # overwrite some of them when testing with obscure command lines.
5548 # This happens at least with the AIX C compiler.
5550 for i in 1 2 3 4 5 6; do
5551 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5552 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5553 # Solaris 10 /bin/sh.
5554 echo '/* dummy */' > sub/conftst$i.h
5556 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5558 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5559 # mode. It turns out that the SunPro C++ compiler does not properly
5560 # handle '-M -o', and we need to detect this. Also, some Intel
5561 # versions had trouble with output in subdirs.
5562 am__obj=sub/conftest.${OBJEXT-o}
5563 am__minus_obj="-o $am__obj"
5566 # This depmode causes a compiler race in universal mode.
5567 test "$am__universal" = false || continue
5570 # After this tag, mechanisms are not by side-effect, so they'll
5571 # only be used when explicitly requested.
5572 if test "x$enable_dependency_tracking" = xyes; then
5578 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5579 # This compiler won't grok '-c -o', but also, the minuso test has
5580 # not run yet. These depmodes are late enough in the game, and
5581 # so weak that their functioning should not be impacted.
5582 am__obj=conftest.${OBJEXT-o}
5587 if depmode=$depmode \
5588 source=sub/conftest.c object=$am__obj \
5589 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5590 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5591 >/dev/null 2>conftest.err &&
5592 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5593 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5594 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5595 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5596 # icc doesn't choke on unknown options, it will just issue warnings
5597 # or remarks (even with -Werror). So we grep stderr for any message
5598 # that says an option was ignored or not supported.
5599 # When given -MP, icc 7.0 and 7.1 complain thusly:
5600 # icc: Command line warning: ignoring option '-M'; no argument required
5601 # The diagnosis changed in icc 8.0:
5602 # icc: Command line remark: option '-MP' not supported
5603 if (grep 'ignoring option' conftest.err ||
5604 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5605 am_cv_CC_dependencies_compiler_type=$depmode
5614 am_cv_CC_dependencies_compiler_type=none
5618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5619 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5620 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5623 test "x$enable_dependency_tracking" != xno \
5624 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5626 am__fastdepCC_FALSE='#'
5628 am__fastdepCC_TRUE='#'
5629 am__fastdepCC_FALSE=
5636 ac_cpp='$CPP $CPPFLAGS'
5637 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5638 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5639 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5641 printf %s "checking how to run the C preprocessor... " >&6; }
5642 # On Suns, sometimes $CPP names a directory.
5643 if test -n "$CPP" && test -d "$CPP"; then
5646 if test -z "$CPP"; then
5647 if test ${ac_cv_prog_CPP+y}
5649 printf %s "(cached) " >&6
5651 # Double quotes because CPP needs to be expanded
5652 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5655 for ac_c_preproc_warn_flag in '' yes
5657 # Use a header file that comes with gcc, so configuring glibc
5658 # with a fresh cross-compiler works.
5659 # On the NeXT, cc -E runs the code through the compiler's parser,
5660 # not just through cpp. "Syntax error" is here to catch this case.
5661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5662 /* end confdefs.h. */
5666 if ac_fn_c_try_cpp "$LINENO"
5670 # Broken: fails on valid input.
5673 rm -f conftest.err conftest.i conftest.$ac_ext
5675 # OK, works on sane cases. Now check whether nonexistent headers
5676 # can be detected and how.
5677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5678 /* end confdefs.h. */
5679 #include <ac_nonexistent.h>
5681 if ac_fn_c_try_cpp "$LINENO"
5683 # Broken: success on invalid input.
5686 # Passes both tests.
5690 rm -f conftest.err conftest.i conftest.$ac_ext
5693 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5694 rm -f conftest.i conftest.err conftest.$ac_ext
5708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5709 printf "%s\n" "$CPP" >&6; }
5711 for ac_c_preproc_warn_flag in '' yes
5713 # Use a header file that comes with gcc, so configuring glibc
5714 # with a fresh cross-compiler works.
5715 # On the NeXT, cc -E runs the code through the compiler's parser,
5716 # not just through cpp. "Syntax error" is here to catch this case.
5717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5718 /* end confdefs.h. */
5722 if ac_fn_c_try_cpp "$LINENO"
5726 # Broken: fails on valid input.
5729 rm -f conftest.err conftest.i conftest.$ac_ext
5731 # OK, works on sane cases. Now check whether nonexistent headers
5732 # can be detected and how.
5733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5734 /* end confdefs.h. */
5735 #include <ac_nonexistent.h>
5737 if ac_fn_c_try_cpp "$LINENO"
5739 # Broken: success on invalid input.
5742 # Passes both tests.
5746 rm -f conftest.err conftest.i conftest.$ac_ext
5749 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5750 rm -f conftest.i conftest.err conftest.$ac_ext
5755 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5756 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5757 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5758 See \`config.log' for more details" "$LINENO" 5; }
5762 ac_cpp='$CPP $CPPFLAGS'
5763 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5764 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5765 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5768 printf %s "checking for grep that handles long lines and -e... " >&6; }
5769 if test ${ac_cv_path_GREP+y}
5771 printf %s "(cached) " >&6
5773 if test -z "$GREP"; then
5774 ac_path_GREP_found=false
5775 # Loop through the user's path and test for each of PROGNAME-LIST
5776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5777 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5780 case $as_dir in #(((
5783 *) as_dir=$as_dir/ ;;
5785 for ac_prog in grep ggrep
5787 for ac_exec_ext in '' $ac_executable_extensions; do
5788 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5789 as_fn_executable_p "$ac_path_GREP" || continue
5790 # Check for GNU ac_path_GREP and select it if it is found.
5791 # Check for GNU $ac_path_GREP
5792 case `"$ac_path_GREP" --version 2>&1` in
5794 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5797 printf %s 0123456789 >"conftest.in"
5800 cat "conftest.in" "conftest.in" >"conftest.tmp"
5801 mv "conftest.tmp" "conftest.in"
5802 cp "conftest.in" "conftest.nl"
5803 printf "%s\n" 'GREP' >> "conftest.nl"
5804 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5805 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5806 as_fn_arith $ac_count + 1 && ac_count=$as_val
5807 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5808 # Best one so far, save it but keep looking for a better one
5809 ac_cv_path_GREP="$ac_path_GREP"
5810 ac_path_GREP_max=$ac_count
5812 # 10*(2^10) chars as input seems more than enough
5813 test $ac_count -gt 10 && break
5815 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5818 $ac_path_GREP_found && break 3
5823 if test -z "$ac_cv_path_GREP"; then
5824 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5827 ac_cv_path_GREP=$GREP
5831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5832 printf "%s\n" "$ac_cv_path_GREP" >&6; }
5833 GREP="$ac_cv_path_GREP"
5836 if test -n "$ac_tool_prefix"; then
5837 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5838 set dummy ${ac_tool_prefix}nm; ac_word=$2
5839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840 printf %s "checking for $ac_word... " >&6; }
5841 if test ${ac_cv_prog_NM+y}
5843 printf %s "(cached) " >&6
5845 if test -n "$NM"; then
5846 ac_cv_prog_NM="$NM" # Let the user override the test.
5848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5852 case $as_dir in #(((
5855 *) as_dir=$as_dir/ ;;
5857 for ac_exec_ext in '' $ac_executable_extensions; do
5858 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5859 ac_cv_prog_NM="${ac_tool_prefix}nm"
5860 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5870 if test -n "$NM"; then
5871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
5872 printf "%s\n" "$NM" >&6; }
5874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5875 printf "%s\n" "no" >&6; }
5880 if test -z "$ac_cv_prog_NM"; then
5882 # Extract the first word of "nm", so it can be a program name with args.
5883 set dummy nm; ac_word=$2
5884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5885 printf %s "checking for $ac_word... " >&6; }
5886 if test ${ac_cv_prog_ac_ct_NM+y}
5888 printf %s "(cached) " >&6
5890 if test -n "$ac_ct_NM"; then
5891 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897 case $as_dir in #(((
5900 *) as_dir=$as_dir/ ;;
5902 for ac_exec_ext in '' $ac_executable_extensions; do
5903 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5904 ac_cv_prog_ac_ct_NM="nm"
5905 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5914 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5915 if test -n "$ac_ct_NM"; then
5916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
5917 printf "%s\n" "$ac_ct_NM" >&6; }
5919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920 printf "%s\n" "no" >&6; }
5923 if test "x$ac_ct_NM" = x; then
5926 case $cross_compiling:$ac_tool_warned in
5928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5929 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5930 ac_tool_warned=yes ;;
5938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5939 printf %s "checking whether ln -s works... " >&6; }
5941 if test "$LN_S" = "ln -s"; then
5942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5943 printf "%s\n" "yes" >&6; }
5945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5946 printf "%s\n" "no, using $LN_S" >&6; }
5949 if test -n "$ac_tool_prefix"; then
5950 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5951 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953 printf %s "checking for $ac_word... " >&6; }
5954 if test ${ac_cv_prog_RANLIB+y}
5956 printf %s "(cached) " >&6
5958 if test -n "$RANLIB"; then
5959 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5965 case $as_dir in #(((
5968 *) as_dir=$as_dir/ ;;
5970 for ac_exec_ext in '' $ac_executable_extensions; do
5971 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5972 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5973 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5982 RANLIB=$ac_cv_prog_RANLIB
5983 if test -n "$RANLIB"; then
5984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5985 printf "%s\n" "$RANLIB" >&6; }
5987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988 printf "%s\n" "no" >&6; }
5993 if test -z "$ac_cv_prog_RANLIB"; then
5994 ac_ct_RANLIB=$RANLIB
5995 # Extract the first word of "ranlib", so it can be a program name with args.
5996 set dummy ranlib; ac_word=$2
5997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998 printf %s "checking for $ac_word... " >&6; }
5999 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6001 printf %s "(cached) " >&6
6003 if test -n "$ac_ct_RANLIB"; then
6004 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6010 case $as_dir in #(((
6013 *) as_dir=$as_dir/ ;;
6015 for ac_exec_ext in '' $ac_executable_extensions; do
6016 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6017 ac_cv_prog_ac_ct_RANLIB="ranlib"
6018 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6027 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6028 if test -n "$ac_ct_RANLIB"; then
6029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6030 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033 printf "%s\n" "no" >&6; }
6036 if test "x$ac_ct_RANLIB" = x; then
6039 case $cross_compiling:$ac_tool_warned in
6041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6042 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6043 ac_tool_warned=yes ;;
6045 RANLIB=$ac_ct_RANLIB
6048 RANLIB="$ac_cv_prog_RANLIB"
6051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
6052 printf %s "checking for a POSIX-compliant shell... " >&6; }
6053 if test ${ac_cv_path_shell+y}
6055 printf %s "(cached) " >&6
6058 # Test the noclobber option, using the portable POSIX.2 syntax.
6062 >|conftest.c || exit
6063 !>conftest.c || exit
6064 # Test that $(...) works.
6065 test "$(expr 3 + 4)" -eq 7 || exit
6067 # Solaris 11 /bin/sh (AT&T Research) 93u 2011-02-08 has a file
6068 # descriptor bug that breaks zgrep and is hard to test for
6069 # directly. At some point $(...) is reading a pipe from the
6070 # subshell, but the pipe is also open in the parent shell, so
6071 # the read deadlocks. Prefer some other shell if available.
6072 ac_maybe_solaris_sh_bug='test "${.sh.version}"'
6079 if ("$SHELL" -c "$ac_command") 2>/dev/null; then
6080 "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null ||
6081 ac_cv_path_shell=$SHELL
6085 case $ac_cv_path_shell in
6087 # Prefer shells that are more likely to be installed in the
6088 # same place on all hosts of this platform. Therefore, prefer
6089 # shells in /bin and /usr/bin to shells in the installer's
6090 # PATH. Also, loop through PATH first and then through
6091 # shells, since less-"nice" shells in /bin and /usr/bin are
6092 # more likely to be installed than "nicer" shells elsewhere.
6093 ac_break_if_good_shell=:
6094 as_save_IFS=$IFS; IFS=:
6095 for as_dir in /bin /usr/bin $PATH
6100 for ac_base in sh bash ksh sh5; do
6102 if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
6103 if "$as_dir/$ac_base" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null
6105 test "$ac_cv_path_shell" = no
6107 ac_break_if_good_shell=break
6109 fi && ac_cv_path_shell=$as_dir/$ac_base
6110 $ac_break_if_good_shell
6113 $ac_break_if_good_shell
6120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
6121 printf "%s\n" "$ac_cv_path_shell" >&6; }
6122 SHELL=$ac_cv_path_shell
6123 if test "$SHELL" = no; then
6125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
6126 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
6128 if "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null; then
6129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it may have file descriptor bugs" >&5
6130 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it may have file descriptor bugs" >&2;}
6136 for ac_header in $ac_header_list
6138 as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
6139 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6141 if eval test \"x\$"$as_ac_Header"\" = x"yes"
6143 cat >>confdefs.h <<_ACEOF
6144 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
6161 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
6163 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
6165 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6168 ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6169 if test "x$ac_cv_header_minix_config_h" = xyes
6176 if test "$MINIX" = yes; then
6178 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6181 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6184 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6187 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6193 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6194 if test ${ac_cv_safe_to_define___extensions__+y}
6196 printf %s "(cached) " >&6
6198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6199 /* end confdefs.h. */
6201 # define __EXTENSIONS__ 1
6202 $ac_includes_default
6211 if ac_fn_c_try_compile "$LINENO"
6213 ac_cv_safe_to_define___extensions__=yes
6215 ac_cv_safe_to_define___extensions__=no
6217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6220 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6221 test $ac_cv_safe_to_define___extensions__ = yes &&
6222 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6224 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6226 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6228 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6230 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
6232 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6234 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6237 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6238 if test ${ac_cv_should_define__xopen_source+y}
6240 printf %s "(cached) " >&6
6242 ac_cv_should_define__xopen_source=no
6243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6244 /* end confdefs.h. */
6256 if ac_fn_c_try_compile "$LINENO"
6260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6261 /* end confdefs.h. */
6263 #define _XOPEN_SOURCE 500
6274 if ac_fn_c_try_compile "$LINENO"
6276 ac_cv_should_define__xopen_source=yes
6278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6283 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6284 test $ac_cv_should_define__xopen_source = yes &&
6285 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6296 printf %s "checking for egrep... " >&6; }
6297 if test ${ac_cv_path_EGREP+y}
6299 printf %s "(cached) " >&6
6301 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6302 then ac_cv_path_EGREP="$GREP -E"
6304 if test -z "$EGREP"; then
6305 ac_path_EGREP_found=false
6306 # Loop through the user's path and test for each of PROGNAME-LIST
6307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6311 case $as_dir in #(((
6314 *) as_dir=$as_dir/ ;;
6316 for ac_prog in egrep
6318 for ac_exec_ext in '' $ac_executable_extensions; do
6319 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6320 as_fn_executable_p "$ac_path_EGREP" || continue
6321 # Check for GNU ac_path_EGREP and select it if it is found.
6322 # Check for GNU $ac_path_EGREP
6323 case `"$ac_path_EGREP" --version 2>&1` in
6325 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6328 printf %s 0123456789 >"conftest.in"
6331 cat "conftest.in" "conftest.in" >"conftest.tmp"
6332 mv "conftest.tmp" "conftest.in"
6333 cp "conftest.in" "conftest.nl"
6334 printf "%s\n" 'EGREP' >> "conftest.nl"
6335 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6336 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6337 as_fn_arith $ac_count + 1 && ac_count=$as_val
6338 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6339 # Best one so far, save it but keep looking for a better one
6340 ac_cv_path_EGREP="$ac_path_EGREP"
6341 ac_path_EGREP_max=$ac_count
6343 # 10*(2^10) chars as input seems more than enough
6344 test $ac_count -gt 10 && break
6346 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6349 $ac_path_EGREP_found && break 3
6354 if test -z "$ac_cv_path_EGREP"; then
6355 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6358 ac_cv_path_EGREP=$EGREP
6363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6364 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6365 EGREP="$ac_cv_path_EGREP"
6371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6372 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6373 if test ${gl_cv_c_amsterdam_compiler+y}
6375 printf %s "(cached) " >&6
6378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6379 /* end confdefs.h. */
6386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6387 $EGREP "Amsterdam" >/dev/null 2>&1
6389 gl_cv_c_amsterdam_compiler=yes
6391 gl_cv_c_amsterdam_compiler=no
6397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6398 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6400 if test $gl_cv_c_amsterdam_compiler = yes; then
6401 if test -z "$AR"; then
6404 if test -z "$ARFLAGS"; then
6408 if test -n "$ac_tool_prefix"; then
6409 for ac_prog in ar lib "link -lib"
6411 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6412 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6414 printf %s "checking for $ac_word... " >&6; }
6415 if test ${ac_cv_prog_AR+y}
6417 printf %s "(cached) " >&6
6419 if test -n "$AR"; then
6420 ac_cv_prog_AR="$AR" # Let the user override the test.
6422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426 case $as_dir in #(((
6429 *) as_dir=$as_dir/ ;;
6431 for ac_exec_ext in '' $ac_executable_extensions; do
6432 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6433 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6434 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6444 if test -n "$AR"; then
6445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6446 printf "%s\n" "$AR" >&6; }
6448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449 printf "%s\n" "no" >&6; }
6453 test -n "$AR" && break
6456 if test -z "$AR"; then
6458 for ac_prog in ar lib "link -lib"
6460 # Extract the first word of "$ac_prog", so it can be a program name with args.
6461 set dummy $ac_prog; ac_word=$2
6462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6463 printf %s "checking for $ac_word... " >&6; }
6464 if test ${ac_cv_prog_ac_ct_AR+y}
6466 printf %s "(cached) " >&6
6468 if test -n "$ac_ct_AR"; then
6469 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6475 case $as_dir in #(((
6478 *) as_dir=$as_dir/ ;;
6480 for ac_exec_ext in '' $ac_executable_extensions; do
6481 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6482 ac_cv_prog_ac_ct_AR="$ac_prog"
6483 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6492 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6493 if test -n "$ac_ct_AR"; then
6494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6495 printf "%s\n" "$ac_ct_AR" >&6; }
6497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498 printf "%s\n" "no" >&6; }
6502 test -n "$ac_ct_AR" && break
6505 if test "x$ac_ct_AR" = x; then
6508 case $cross_compiling:$ac_tool_warned in
6510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6511 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6512 ac_tool_warned=yes ;;
6520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6521 printf %s "checking the archiver ($AR) interface... " >&6; }
6522 if test ${am_cv_ar_interface+y}
6524 printf %s "(cached) " >&6
6527 ac_cpp='$CPP $CPPFLAGS'
6528 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6529 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6530 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6532 am_cv_ar_interface=ar
6533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h. */
6535 int some_variable = 0;
6537 if ac_fn_c_try_compile "$LINENO"
6539 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6540 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6541 (eval $am_ar_try) 2>&5
6543 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6544 test $ac_status = 0; }
6545 if test "$ac_status" -eq 0; then
6546 am_cv_ar_interface=ar
6548 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6549 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6550 (eval $am_ar_try) 2>&5
6552 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6553 test $ac_status = 0; }
6554 if test "$ac_status" -eq 0; then
6555 am_cv_ar_interface=lib
6557 am_cv_ar_interface=unknown
6560 rm -f conftest.lib libconftest.a
6563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6565 ac_cpp='$CPP $CPPFLAGS'
6566 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6567 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6568 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6572 printf "%s\n" "$am_cv_ar_interface" >&6; }
6574 case $am_cv_ar_interface in
6578 # Microsoft lib, so override with the ar-lib wrapper script.
6579 # FIXME: It is wrong to rewrite AR.
6580 # But if we don't then we get into trouble of one sort or another.
6581 # A longer-term fix would be to have automake use am__AR in this case,
6582 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6584 AR="$am_aux_dir/ar-lib $AR"
6587 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6593 if test -n "$ac_tool_prefix"; then
6594 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6595 set dummy ${ac_tool_prefix}ar; ac_word=$2
6596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597 printf %s "checking for $ac_word... " >&6; }
6598 if test ${ac_cv_prog_AR+y}
6600 printf %s "(cached) " >&6
6602 if test -n "$AR"; then
6603 ac_cv_prog_AR="$AR" # Let the user override the test.
6605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6609 case $as_dir in #(((
6612 *) as_dir=$as_dir/ ;;
6614 for ac_exec_ext in '' $ac_executable_extensions; do
6615 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6616 ac_cv_prog_AR="${ac_tool_prefix}ar"
6617 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6627 if test -n "$AR"; then
6628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6629 printf "%s\n" "$AR" >&6; }
6631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632 printf "%s\n" "no" >&6; }
6637 if test -z "$ac_cv_prog_AR"; then
6639 # Extract the first word of "ar", so it can be a program name with args.
6640 set dummy ar; ac_word=$2
6641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642 printf %s "checking for $ac_word... " >&6; }
6643 if test ${ac_cv_prog_ac_ct_AR+y}
6645 printf %s "(cached) " >&6
6647 if test -n "$ac_ct_AR"; then
6648 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6654 case $as_dir in #(((
6657 *) as_dir=$as_dir/ ;;
6659 for ac_exec_ext in '' $ac_executable_extensions; do
6660 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6661 ac_cv_prog_ac_ct_AR="ar"
6662 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6671 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6672 if test -n "$ac_ct_AR"; then
6673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6674 printf "%s\n" "$ac_ct_AR" >&6; }
6676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677 printf "%s\n" "no" >&6; }
6680 if test "x$ac_ct_AR" = x; then
6683 case $cross_compiling:$ac_tool_warned in
6685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6686 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6687 ac_tool_warned=yes ;;
6695 if test -z "$ARFLAGS"; then
6701 if test -z "$RANLIB"; then
6702 if test $gl_cv_c_amsterdam_compiler = yes; then
6705 if test -n "$ac_tool_prefix"; then
6706 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6707 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709 printf %s "checking for $ac_word... " >&6; }
6710 if test ${ac_cv_prog_RANLIB+y}
6712 printf %s "(cached) " >&6
6714 if test -n "$RANLIB"; then
6715 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6721 case $as_dir in #(((
6724 *) as_dir=$as_dir/ ;;
6726 for ac_exec_ext in '' $ac_executable_extensions; do
6727 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6728 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6729 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6738 RANLIB=$ac_cv_prog_RANLIB
6739 if test -n "$RANLIB"; then
6740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6741 printf "%s\n" "$RANLIB" >&6; }
6743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744 printf "%s\n" "no" >&6; }
6749 if test -z "$ac_cv_prog_RANLIB"; then
6750 ac_ct_RANLIB=$RANLIB
6751 # Extract the first word of "ranlib", so it can be a program name with args.
6752 set dummy ranlib; ac_word=$2
6753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6754 printf %s "checking for $ac_word... " >&6; }
6755 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6757 printf %s "(cached) " >&6
6759 if test -n "$ac_ct_RANLIB"; then
6760 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6766 case $as_dir in #(((
6769 *) as_dir=$as_dir/ ;;
6771 for ac_exec_ext in '' $ac_executable_extensions; do
6772 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6773 ac_cv_prog_ac_ct_RANLIB="ranlib"
6774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6783 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6784 if test -n "$ac_ct_RANLIB"; then
6785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6786 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6789 printf "%s\n" "no" >&6; }
6792 if test "x$ac_ct_RANLIB" = x; then
6795 case $cross_compiling:$ac_tool_warned in
6797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6798 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6799 ac_tool_warned=yes ;;
6801 RANLIB=$ac_ct_RANLIB
6804 RANLIB="$ac_cv_prog_RANLIB"
6811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6812 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6813 if test ${ac_cv_sys_largefile_source+y}
6815 printf %s "(cached) " >&6
6818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6819 /* end confdefs.h. */
6820 #include <sys/types.h> /* for off_t */
6825 int (*fp) (FILE *, off_t, int) = fseeko;
6826 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6831 if ac_fn_c_try_link "$LINENO"
6833 ac_cv_sys_largefile_source=no; break
6835 rm -f core conftest.err conftest.$ac_objext \
6836 conftest$ac_exeext conftest.$ac_ext
6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838 /* end confdefs.h. */
6839 #define _LARGEFILE_SOURCE 1
6840 #include <sys/types.h> /* for off_t */
6845 int (*fp) (FILE *, off_t, int) = fseeko;
6846 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6851 if ac_fn_c_try_link "$LINENO"
6853 ac_cv_sys_largefile_source=1; break
6855 rm -f core conftest.err conftest.$ac_objext \
6856 conftest$ac_exeext conftest.$ac_ext
6857 ac_cv_sys_largefile_source=unknown
6861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6862 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
6863 case $ac_cv_sys_largefile_source in #(
6866 cat >>confdefs.h <<_ACEOF
6867 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
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 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
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 cat >>confdefs.h <<_ACEOF
7112 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7117 if test $ac_cv_sys_file_offset_bits = unknown; then
7118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7119 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7120 if test ${ac_cv_sys_large_files+y}
7122 printf %s "(cached) " >&6
7125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7126 /* end confdefs.h. */
7127 #include <sys/types.h>
7128 /* Check that off_t can represent 2**63 - 1 correctly.
7129 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7130 since some C++ compilers masquerading as C compilers
7131 incorrectly reject 9223372036854775807. */
7132 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7133 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7134 && LARGE_OFF_T % 2147483647 == 1)
7144 if ac_fn_c_try_compile "$LINENO"
7146 ac_cv_sys_large_files=no; break
7148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7150 /* end confdefs.h. */
7151 #define _LARGE_FILES 1
7152 #include <sys/types.h>
7153 /* Check that off_t can represent 2**63 - 1 correctly.
7154 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7155 since some C++ compilers masquerading as C compilers
7156 incorrectly reject 9223372036854775807. */
7157 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7158 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7159 && LARGE_OFF_T % 2147483647 == 1)
7169 if ac_fn_c_try_compile "$LINENO"
7171 ac_cv_sys_large_files=1; break
7173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7174 ac_cv_sys_large_files=unknown
7178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7179 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7180 case $ac_cv_sys_large_files in #(
7183 cat >>confdefs.h <<_ACEOF
7184 #define _LARGE_FILES $ac_cv_sys_large_files
7192 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7201 # Check whether --enable-threads was given.
7202 if test ${enable_threads+y}
7204 enableval=$enable_threads; gl_use_threads=$enableval
7206 if test -n "$gl_use_threads_default"; then
7207 gl_use_threads="$gl_use_threads_default"
7210 osf*) gl_use_threads=no ;;
7213 1.[0-5].*) gl_use_threads=no ;;
7214 *) gl_use_threads=yes ;;
7217 *) gl_use_threads=yes ;;
7223 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7224 # For using <pthread.h>:
7227 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7228 # groks <pthread.h>. cc also understands the flag -pthread, but
7229 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7230 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7231 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7232 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7233 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7236 # Some systems optimize for single-threaded programs by default, and
7237 # need special flags to disable these optimizations. For example, the
7238 # definition of 'errno' in <errno.h>.
7240 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7241 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7247 # Pre-early section.
7252 # Code from module absolute-header:
7253 # Code from module alloca-opt:
7254 # Code from module announce-gen:
7255 # Code from module assure:
7256 # Code from module at-internal:
7257 # Code from module calloc:
7258 # Code from module calloc-gnu:
7259 # Code from module calloc-posix:
7260 # Code from module chdir:
7261 # Code from module chdir-long:
7262 # Code from module clock-time:
7263 # Code from module cloexec:
7264 # Code from module close:
7265 # Code from module closedir:
7266 # Code from module dirent:
7267 # Code from module dirent-safer:
7268 # Code from module dirfd:
7269 # Code from module dirname-lgpl:
7270 # Code from module do-release-commit-and-tag:
7271 # Code from module dosname:
7272 # Code from module double-slash-root:
7273 # Code from module dup:
7274 # Code from module dup2:
7275 # Code from module errno:
7276 # Code from module error:
7277 # Code from module exitfail:
7278 # Code from module extensions:
7279 # Code from module extern-inline:
7280 # Code from module fchdir:
7281 # Code from module fclose:
7282 # Code from module fcntl:
7283 # Code from module fcntl-h:
7284 # Code from module fcntl-safer:
7285 # Code from module fd-hook:
7286 # Code from module fdatasync:
7287 # Code from module fdl:
7288 # Code from module fdopendir:
7289 # Code from module fflush:
7291 # Code from module filename:
7292 # Code from module filenamecat-lgpl:
7293 # Code from module float:
7294 # Code from module fpieee:
7296 # Code from module fprintf-posix:
7297 # Code from module fpucw:
7298 # Code from module fpurge:
7299 # Code from module freading:
7300 # Code from module frexp-nolibm:
7301 # Code from module frexpl-nolibm:
7302 # Code from module fseek:
7303 # Code from module fseeko:
7305 # Code from module fseterr:
7306 # Code from module fstat:
7307 # Code from module fstatat:
7308 # Code from module fsync:
7309 # Code from module ftell:
7310 # Code from module ftello:
7312 # Code from module gendocs:
7313 # Code from module getcwd-lgpl:
7314 # Code from module getdtablesize:
7315 # Code from module getopt-gnu:
7316 # Code from module getopt-posix:
7317 # Code from module gettext-h:
7318 # Code from module gettime:
7319 # Code from module gettimeofday:
7320 # Code from module git-version-gen:
7321 # Code from module gitlog-to-changelog:
7322 # Code from module gnu-make:
7323 # Code from module gnu-web-doc-update:
7324 # Code from module gnumakefile:
7325 # Code from module gnupload:
7326 # Code from module havelib:
7327 # Code from module ignore-value:
7328 # Code from module include_next:
7329 # Code from module intprops:
7330 # Code from module isnand-nolibm:
7331 # Code from module isnanf-nolibm:
7332 # Code from module isnanl-nolibm:
7333 # Code from module largefile:
7335 # Code from module lib-ignore:
7336 # Code from module lock:
7337 # Code from module lseek:
7338 # Code from module lstat:
7339 # Code from module maintainer-makefile:
7340 # Code from module malloc-gnu:
7341 # Code from module malloc-posix:
7342 # Code from module manywarnings:
7343 # Code from module math:
7344 # Code from module memchr:
7345 # Code from module mempcpy:
7346 # Code from module memrchr:
7347 # Code from module msvc-inval:
7348 # Code from module msvc-nothrow:
7349 # Code from module multiarch:
7350 # Code from module nocrash:
7351 # Code from module open:
7352 # Code from module openat:
7353 # Code from module openat-die:
7354 # Code from module openat-h:
7355 # Code from module openat-safer:
7356 # Code from module opendir:
7357 # Code from module pathmax:
7358 # Code from module perror:
7359 # Code from module printf-frexp:
7360 # Code from module printf-frexpl:
7361 # Code from module printf-posix:
7362 # Code from module printf-safe:
7363 # Code from module readdir:
7364 # Code from module readme-release:
7365 # Code from module realloc-gnu:
7366 # Code from module realloc-posix:
7367 # Code from module rmdir:
7368 # Code from module save-cwd:
7369 # Code from module savedir:
7370 # Code from module signbit:
7371 # Code from module size_max:
7372 # Code from module snippet/_Noreturn:
7373 # Code from module snippet/arg-nonnull:
7374 # Code from module snippet/c++defs:
7375 # Code from module snippet/unused-parameter:
7376 # Code from module snippet/warn-on-use:
7377 # Code from module ssize_t:
7378 # Code from module stat:
7379 # Code from module stat-time:
7380 # Code from module statat:
7381 # Code from module stdbool:
7382 # Code from module stddef:
7383 # Code from module stdint:
7384 # Code from module stdio:
7385 # Code from module stdlib:
7386 # Code from module stpcpy:
7387 # Code from module strdup-posix:
7388 # Code from module strerror:
7389 # Code from module strerror-override:
7390 # Code from module strerror_r-posix:
7391 # Code from module string:
7392 # Code from module sys_stat:
7393 # Code from module sys_time:
7394 # Code from module sys_types:
7395 # Code from module threadlib:
7399 # Code from module time:
7400 # Code from module timespec:
7401 # Code from module unistd:
7402 # Code from module unistd-safer:
7403 # Code from module unlink:
7404 # Code from module unlinkat:
7405 # Code from module update-copyright:
7406 # Code from module useless-if-before-free:
7407 # Code from module utimens:
7408 # Code from module vasnprintf:
7409 # Code from module vc-list-files:
7410 # Code from module verify:
7411 # Code from module vfprintf-posix:
7412 # Code from module warnings:
7413 # Code from module wchar:
7414 # Code from module xalloc:
7415 # Code from module xalloc-die:
7416 # Code from module xalloc-oversized:
7417 # Code from module xsize:
7418 # Code from module yesno:
7426 LIBC_FATAL_STDERR_=1
7427 export LIBC_FATAL_STDERR_
7429 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7430 if test "x$ac_cv_type_size_t" = xyes
7435 cat >>confdefs.h <<_ACEOF
7436 #define size_t unsigned int
7441 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7442 # for constant arguments. Useless!
7443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7444 printf %s "checking for working alloca.h... " >&6; }
7445 if test ${ac_cv_working_alloca_h+y}
7447 printf %s "(cached) " >&6
7449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7450 /* end confdefs.h. */
7455 char *p = (char *) alloca (2 * sizeof (int));
7461 if ac_fn_c_try_link "$LINENO"
7463 ac_cv_working_alloca_h=yes
7465 ac_cv_working_alloca_h=no
7467 rm -f core conftest.err conftest.$ac_objext \
7468 conftest$ac_exeext conftest.$ac_ext
7470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7471 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7472 if test $ac_cv_working_alloca_h = yes; then
7474 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7479 printf %s "checking for alloca... " >&6; }
7480 if test ${ac_cv_func_alloca_works+y}
7482 printf %s "(cached) " >&6
7484 if test $ac_cv_working_alloca_h = yes; then
7485 ac_cv_func_alloca_works=yes
7487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7488 /* end confdefs.h. */
7493 # define alloca __builtin_alloca
7494 # elif defined _MSC_VER
7495 # include <malloc.h>
7496 # define alloca _alloca
7501 void *alloca (size_t);
7508 char *p = (char *) alloca (1);
7514 if ac_fn_c_try_link "$LINENO"
7516 ac_cv_func_alloca_works=yes
7518 ac_cv_func_alloca_works=no
7520 rm -f core conftest.err conftest.$ac_objext \
7521 conftest$ac_exeext conftest.$ac_ext
7523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7524 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7527 if test $ac_cv_func_alloca_works = yes; then
7529 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7532 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7533 # that cause trouble. Some versions do not even contain alloca or
7534 # contain a buggy version. If you still want to use their alloca,
7535 # use ar to extract alloca.o from them instead of compiling alloca.c.
7541 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7543 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7547 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7548 if test ${ac_cv_os_cray+y}
7550 printf %s "(cached) " >&6
7552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7553 /* end confdefs.h. */
7554 #if defined CRAY && ! defined CRAY2
7561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7562 $EGREP "webecray" >/dev/null 2>&1
7571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7572 printf "%s\n" "$ac_cv_os_cray" >&6; }
7573 if test $ac_cv_os_cray = yes; then
7574 for ac_func in _getb67 GETB67 getb67; do
7575 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7576 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7577 if eval test \"x\$"$as_ac_var"\" = x"yes"
7580 cat >>confdefs.h <<_ACEOF
7581 #define CRAY_STACKSEG_END $ac_func
7590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7591 printf %s "checking stack direction for C alloca... " >&6; }
7592 if test ${ac_cv_c_stack_direction+y}
7594 printf %s "(cached) " >&6
7596 if test "$cross_compiling" = yes
7598 ac_cv_c_stack_direction=0
7600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7601 /* end confdefs.h. */
7602 $ac_includes_default
7604 find_stack_direction (int *addr, int depth)
7609 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7610 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7615 main (int argc, char **argv)
7617 return find_stack_direction (0, argc + !argv + 20) < 0;
7620 if ac_fn_c_try_run "$LINENO"
7622 ac_cv_c_stack_direction=1
7624 ac_cv_c_stack_direction=-1
7626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7627 conftest.$ac_objext conftest.beam conftest.$ac_ext
7631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7632 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7633 cat >>confdefs.h <<_ACEOF
7634 #define STACK_DIRECTION $ac_cv_c_stack_direction
7643 GNULIB_CALLOC_POSIX=0;
7644 GNULIB_CANONICALIZE_FILE_NAME=0;
7645 GNULIB_GETLOADAVG=0;
7648 GNULIB_MALLOC_POSIX=0;
7655 GNULIB_POSIX_OPENPT=0;
7662 GNULIB_REALLOC_POSIX=0;
7665 GNULIB_SECURE_GETENV=0;
7670 GNULIB_SYSTEM_POSIX=0;
7676 HAVE_CANONICALIZE_FILE_NAME=1;
7677 HAVE_DECL_GETLOADAVG=1;
7685 HAVE_POSIX_OPENPT=1;
7693 HAVE_SECURE_GETENV=1;
7699 HAVE_STRUCT_RANDOM_DATA=1;
7700 HAVE_SYS_LOADAVG_H=0;
7702 HAVE_DECL_UNSETENV=1;
7704 REPLACE_CANONICALIZE_FILE_NAME=0;
7709 REPLACE_PTSNAME_R=0;
7721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7722 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7723 if test ${gl_cv_func_malloc_posix+y}
7725 printf %s "(cached) " >&6
7728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7729 /* end confdefs.h. */
7734 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7742 if ac_fn_c_try_compile "$LINENO"
7744 gl_cv_func_malloc_posix=yes
7746 gl_cv_func_malloc_posix=no
7748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7752 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
7762 GNULIB_EUIDACCESS=0;
7770 GNULIB_GETDOMAINNAME=0;
7771 GNULIB_GETDTABLESIZE=0;
7773 GNULIB_GETHOSTNAME=0;
7775 GNULIB_GETLOGIN_R=0;
7776 GNULIB_GETPAGESIZE=0;
7777 GNULIB_GETUSERSHELL=0;
7778 GNULIB_GROUP_MEMBER=0;
7790 GNULIB_READLINKAT=0;
7792 GNULIB_SETHOSTNAME=0;
7797 GNULIB_UNISTD_H_NONBLOCKING=0;
7798 GNULIB_UNISTD_H_SIGPIPE=0;
7813 HAVE_GETDTABLESIZE=1;
7818 HAVE_GROUP_MEMBER=1;
7834 HAVE_DECL_ENVIRON=1;
7836 HAVE_DECL_FDATASYNC=1;
7837 HAVE_DECL_GETDOMAINNAME=1;
7838 HAVE_DECL_GETLOGIN_R=1;
7839 HAVE_DECL_GETPAGESIZE=1;
7840 HAVE_DECL_GETUSERSHELL=1;
7841 HAVE_DECL_SETHOSTNAME=1;
7842 HAVE_DECL_TTYNAME_R=1;
7850 REPLACE_FTRUNCATE=0;
7852 REPLACE_GETDOMAINNAME=0;
7853 REPLACE_GETDTABLESIZE=0;
7854 REPLACE_GETLOGIN_R=0;
7855 REPLACE_GETGROUPS=0;
7856 REPLACE_GETPAGESIZE=0;
7866 REPLACE_READLINKAT=0;
7870 REPLACE_SYMLINKAT=0;
7871 REPLACE_TTYNAME_R=0;
7876 UNISTD_H_HAVE_WINSOCK2_H=0;
7877 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7888 for ac_func in $ac_func_list
7890 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7891 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7892 if eval test \"x\$"$as_ac_var"\" = x"yes"
7894 cat >>confdefs.h <<_ACEOF
7895 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
7905 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7906 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7908 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7911 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7933 HAVE_DECL_FDOPENDIR=1;
7940 REPLACE_FDOPENDIR=0;
7944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7945 printf %s "checking whether the preprocessor supports include_next... " >&6; }
7946 if test ${gl_cv_have_include_next+y}
7948 printf %s "(cached) " >&6
7950 rm -rf conftestd1a conftestd1b conftestd2
7951 mkdir conftestd1a conftestd1b conftestd2
7952 cat <<EOF > conftestd1a/conftest.h
7953 #define DEFINED_IN_CONFTESTD1
7954 #include_next <conftest.h>
7955 #ifdef DEFINED_IN_CONFTESTD2
7958 #error "include_next doesn't work"
7961 cat <<EOF > conftestd1b/conftest.h
7962 #define DEFINED_IN_CONFTESTD1
7964 #include_next <conftest.h>
7965 #ifdef DEFINED_IN_CONFTESTD2
7968 #error "include_next doesn't work"
7971 cat <<EOF > conftestd2/conftest.h
7972 #ifndef DEFINED_IN_CONFTESTD1
7973 #error "include_next test doesn't work"
7975 #define DEFINED_IN_CONFTESTD2
7977 gl_save_CPPFLAGS="$CPPFLAGS"
7978 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7980 /* end confdefs.h. */
7981 #include <conftest.h>
7983 if ac_fn_c_try_compile "$LINENO"
7985 gl_cv_have_include_next=yes
7987 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7989 /* end confdefs.h. */
7990 #include <conftest.h>
7992 if ac_fn_c_try_compile "$LINENO"
7994 gl_cv_have_include_next=buggy
7996 gl_cv_have_include_next=no
7998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8002 CPPFLAGS="$gl_save_CPPFLAGS"
8003 rm -rf conftestd1a conftestd1b conftestd2
8006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8007 printf "%s\n" "$gl_cv_have_include_next" >&6; }
8008 PRAGMA_SYSTEM_HEADER=
8009 if test $gl_cv_have_include_next = yes; then
8010 INCLUDE_NEXT=include_next
8011 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8012 if test -n "$GCC"; then
8013 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8016 if test $gl_cv_have_include_next = buggy; then
8017 INCLUDE_NEXT=include
8018 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8020 INCLUDE_NEXT=include
8021 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
8028 printf %s "checking whether system header files limit the line length... " >&6; }
8029 if test ${gl_cv_pragma_columns+y}
8031 printf %s "(cached) " >&6
8033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8034 /* end confdefs.h. */
8041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8042 $EGREP "choke me" >/dev/null 2>&1
8044 gl_cv_pragma_columns=yes
8046 gl_cv_pragma_columns=no
8052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
8053 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
8054 if test $gl_cv_pragma_columns = yes; then
8055 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
8065 # The Clang compiler raises a warning for an undeclared identifier that matches
8066 # a compiler builtin function. All extant Clang versions are affected, as of
8067 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
8068 # C and Objective C languages, but Clang does report an error under C++ and
8071 # Passing -fno-builtin to the compiler would suppress this problem. That
8072 # strategy would have the advantage of being insensitive to stray warnings, but
8073 # it would make tests less realistic.
8074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
8075 printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
8076 if test ${ac_cv_c_decl_report+y}
8078 printf %s "(cached) " >&6
8080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8081 /* end confdefs.h. */
8091 if ac_fn_c_try_compile "$LINENO"
8093 if test -s conftest.err
8095 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
8096 # valid AC_CHECK_DECL input. No library function is consistently available
8097 # on freestanding implementations, so test against a dummy declaration.
8098 # Include always-available headers on the off chance that they somehow
8100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8101 /* end confdefs.h. */
8106 extern void ac_decl (int, char *);
8111 (void) ac_decl ((int) 0, (char *) 0);
8121 if ac_fn_c_try_compile "$LINENO"
8123 if test -s conftest.err
8125 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8126 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8127 as_fn_error $? "cannot detect from compiler exit status or warnings
8128 See \`config.log' for more details" "$LINENO" 5; }
8130 ac_cv_c_decl_report=warning
8133 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8134 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8135 as_fn_error $? "cannot compile a simple declaration test
8136 See \`config.log' for more details" "$LINENO" 5; }
8138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8140 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8141 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8142 as_fn_error $? "compiler does not report undeclared identifiers
8143 See \`config.log' for more details" "$LINENO" 5; }
8146 ac_cv_c_decl_report=error
8148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
8151 printf "%s\n" "$ac_cv_c_decl_report" >&6; }
8153 case $ac_cv_c_decl_report in
8154 warning) ac_c_decl_warn_flag=yes ;;
8155 *) ac_c_decl_warn_flag= ;;
8160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8161 printf %s "checking whether // is distinct from /... " >&6; }
8162 if test ${gl_cv_double_slash_root+y}
8164 printf %s "(cached) " >&6
8166 if test x"$cross_compiling" = xyes ; then
8167 # When cross-compiling, there is no way to tell whether // is special
8168 # short of a list of hosts. However, the only known hosts to date
8169 # that have a distinct // are Apollo DomainOS (too old to port to),
8170 # Cygwin, and z/OS. If anyone knows of another system for which // has
8171 # special semantics and is distinct from /, please report it to
8172 # <bug-gnulib@gnu.org>.
8174 *-cygwin | i370-ibm-openedition)
8175 gl_cv_double_slash_root=yes ;;
8177 # Be optimistic and assume that / and // are the same when we
8179 gl_cv_double_slash_root='unknown, assuming no' ;;
8182 set x `ls -di / // 2>/dev/null`
8183 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8184 gl_cv_double_slash_root=no
8186 gl_cv_double_slash_root=yes
8190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8191 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
8192 if test "$gl_cv_double_slash_root" = yes; then
8194 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8201 printf %s "checking for complete errno.h... " >&6; }
8202 if test ${gl_cv_header_errno_h_complete+y}
8204 printf %s "(cached) " >&6
8207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8208 /* end confdefs.h. */
8211 #if !defined ETXTBSY
8220 #if !defined ENOLINK
8226 #if !defined EMULTIHOP
8229 #if !defined EBADMSG
8232 #if !defined EOVERFLOW
8235 #if !defined ENOTSUP
8238 #if !defined ENETRESET
8241 #if !defined ECONNABORTED
8250 #if !defined ECANCELED
8253 #if !defined EOWNERDEAD
8256 #if !defined ENOTRECOVERABLE
8264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8265 $EGREP "booboo" >/dev/null 2>&1
8267 gl_cv_header_errno_h_complete=no
8269 gl_cv_header_errno_h_complete=yes
8275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8276 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
8277 if test $gl_cv_header_errno_h_complete = yes; then
8288 if test $gl_cv_have_include_next = yes; then
8289 gl_cv_next_errno_h='<'errno.h'>'
8291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8292 printf %s "checking absolute name of <errno.h>... " >&6; }
8293 if test ${gl_cv_next_errno_h+y}
8295 printf %s "(cached) " >&6
8300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8301 /* end confdefs.h. */
8305 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8306 *) gl_absname_cpp="$ac_cpp" ;;
8311 gl_dirsep_regex='[/\\]'
8314 gl_dirsep_regex='\/'
8317 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8318 gl_header_literal_regex=`echo 'errno.h' \
8319 | sed -e "$gl_make_literal_regex_sed"`
8320 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8321 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8327 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8328 sed -n "$gl_absolute_header_sed"`
8330 gl_header=$gl_cv_absolute_errno_h
8331 gl_cv_next_errno_h='"'$gl_header'"'
8335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8336 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
8338 NEXT_ERRNO_H=$gl_cv_next_errno_h
8340 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8341 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8342 gl_next_as_first_directive='<'errno.h'>'
8344 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8345 gl_next_as_first_directive=$gl_cv_next_errno_h
8347 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8355 if test -n "$ERRNO_H"; then
8356 GL_GENERATE_ERRNO_H_TRUE=
8357 GL_GENERATE_ERRNO_H_FALSE='#'
8359 GL_GENERATE_ERRNO_H_TRUE='#'
8360 GL_GENERATE_ERRNO_H_FALSE=
8364 if test -n "$ERRNO_H"; then
8365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8366 printf %s "checking for EMULTIHOP value... " >&6; }
8367 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
8369 printf %s "(cached) " >&6
8372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8373 /* end confdefs.h. */
8381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8382 $EGREP "yes" >/dev/null 2>&1
8384 gl_cv_header_errno_h_EMULTIHOP=yes
8386 gl_cv_header_errno_h_EMULTIHOP=no
8390 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8392 /* end confdefs.h. */
8394 #define _XOPEN_SOURCE_EXTENDED 1
8401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8402 $EGREP "yes" >/dev/null 2>&1
8404 gl_cv_header_errno_h_EMULTIHOP=hidden
8408 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8409 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8410 #define _XOPEN_SOURCE_EXTENDED 1
8412 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8425 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8426 case $gl_cv_header_errno_h_EMULTIHOP in
8428 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8431 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8439 if test -n "$ERRNO_H"; then
8440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8441 printf %s "checking for ENOLINK value... " >&6; }
8442 if test ${gl_cv_header_errno_h_ENOLINK+y}
8444 printf %s "(cached) " >&6
8447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8448 /* end confdefs.h. */
8456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8457 $EGREP "yes" >/dev/null 2>&1
8459 gl_cv_header_errno_h_ENOLINK=yes
8461 gl_cv_header_errno_h_ENOLINK=no
8465 if test $gl_cv_header_errno_h_ENOLINK = no; then
8466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8467 /* end confdefs.h. */
8469 #define _XOPEN_SOURCE_EXTENDED 1
8476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8477 $EGREP "yes" >/dev/null 2>&1
8479 gl_cv_header_errno_h_ENOLINK=hidden
8483 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8484 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8485 #define _XOPEN_SOURCE_EXTENDED 1
8487 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8500 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
8501 case $gl_cv_header_errno_h_ENOLINK in
8503 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8506 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8514 if test -n "$ERRNO_H"; then
8515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8516 printf %s "checking for EOVERFLOW value... " >&6; }
8517 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
8519 printf %s "(cached) " >&6
8522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8523 /* end confdefs.h. */
8531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8532 $EGREP "yes" >/dev/null 2>&1
8534 gl_cv_header_errno_h_EOVERFLOW=yes
8536 gl_cv_header_errno_h_EOVERFLOW=no
8540 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8542 /* end confdefs.h. */
8544 #define _XOPEN_SOURCE_EXTENDED 1
8551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8552 $EGREP "yes" >/dev/null 2>&1
8554 gl_cv_header_errno_h_EOVERFLOW=hidden
8558 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8559 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8560 #define _XOPEN_SOURCE_EXTENDED 1
8562 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8575 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8576 case $gl_cv_header_errno_h_EOVERFLOW in
8578 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8581 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8589 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8590 if test "x$ac_cv_have_decl_strerror_r" = xyes
8597 cat >>confdefs.h <<_ACEOF
8598 #define HAVE_DECL_STRERROR_R $ac_have_decl
8605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8606 printf %s "checking whether strerror_r returns char *... " >&6; }
8607 if test ${ac_cv_func_strerror_r_char_p+y}
8609 printf %s "(cached) " >&6
8612 ac_cv_func_strerror_r_char_p=no
8613 if test $ac_cv_have_decl_strerror_r = yes; then
8614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8615 /* end confdefs.h. */
8616 $ac_includes_default
8622 char x = *strerror_r (0, buf, sizeof buf);
8623 char *p = strerror_r (0, buf, sizeof buf);
8630 if ac_fn_c_try_compile "$LINENO"
8632 ac_cv_func_strerror_r_char_p=yes
8634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8636 # strerror_r is not declared. Choose between
8637 # systems that have relatively inaccessible declarations for the
8638 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8639 # former has a strerror_r that returns char*, while the latter
8640 # has a strerror_r that returns `int'.
8641 # This test should segfault on the DEC system.
8642 if test "$cross_compiling" = yes
8646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8647 /* end confdefs.h. */
8648 $ac_includes_default
8649 extern char *strerror_r ();
8654 char x = *strerror_r (0, buf, sizeof buf);
8655 return ! isalpha (x);
8660 if ac_fn_c_try_run "$LINENO"
8662 ac_cv_func_strerror_r_char_p=yes
8664 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8665 conftest.$ac_objext conftest.beam conftest.$ac_ext
8671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8672 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
8673 if test $ac_cv_func_strerror_r_char_p = yes; then
8675 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8682 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8683 if test "x$ac_cv_have_decl_fchdir" = xyes
8690 cat >>confdefs.h <<_ACEOF
8691 #define HAVE_DECL_FCHDIR $ac_have_decl
8703 GNULIB_FPRINTF_POSIX=0;
8719 GNULIB_OBSTACK_PRINTF=0;
8720 GNULIB_OBSTACK_PRINTF_POSIX=0;
8725 GNULIB_PRINTF_POSIX=0;
8734 GNULIB_SPRINTF_POSIX=0;
8735 GNULIB_STDIO_H_NONBLOCKING=0;
8736 GNULIB_STDIO_H_SIGPIPE=0;
8743 GNULIB_VFPRINTF_POSIX=0;
8745 GNULIB_VPRINTF_POSIX=0;
8747 GNULIB_VSPRINTF_POSIX=0;
8751 HAVE_DECL_GETDELIM=1;
8752 HAVE_DECL_GETLINE=1;
8753 HAVE_DECL_OBSTACK_PRINTF=1;
8754 HAVE_DECL_SNPRINTF=1;
8755 HAVE_DECL_VSNPRINTF=1;
8778 REPLACE_OBSTACK_PRINTF=0;
8787 REPLACE_STDIO_READ_FUNCS=0;
8788 REPLACE_STDIO_WRITE_FUNCS=0;
8790 REPLACE_VASPRINTF=0;
8794 REPLACE_VSNPRINTF=0;
8799 GNULIB_NONBLOCKING=0;
8817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8818 printf %s "checking for working fcntl.h... " >&6; }
8819 if test ${gl_cv_header_working_fcntl_h+y}
8821 printf %s "(cached) " >&6
8823 if test "$cross_compiling" = yes
8825 gl_cv_header_working_fcntl_h=cross-compiling
8827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8828 /* end confdefs.h. */
8829 #include <sys/types.h>
8830 #include <sys/stat.h>
8832 # include <unistd.h>
8833 #else /* on Windows with MSVC */
8835 # include <stdlib.h>
8836 # defined sleep(n) _sleep ((n) * 1000)
8843 #define O_NOFOLLOW 0
8845 static int const constants[] =
8847 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8848 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8855 int result = !constants;
8858 static char const sym[] = "conftest.sym";
8859 if (symlink ("/dev/null", sym) != 0)
8863 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8870 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8874 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8885 static char const file[] = "confdefs.h";
8886 int fd = open (file, O_RDONLY | O_NOATIME);
8892 if (fstat (fd, &st0) != 0)
8898 if (read (fd, &c, 1) != 1)
8902 if (close (fd) != 0)
8907 if (stat (file, &st1) != 0)
8910 if (st0.st_atime != st1.st_atime)
8922 if ac_fn_c_try_run "$LINENO"
8924 gl_cv_header_working_fcntl_h=yes
8927 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8928 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8929 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8930 *) gl_cv_header_working_fcntl_h='no';;
8933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8934 conftest.$ac_objext conftest.beam conftest.$ac_ext
8938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8939 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
8941 case $gl_cv_header_working_fcntl_h in #(
8942 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8946 cat >>confdefs.h <<_ACEOF
8947 #define HAVE_WORKING_O_NOATIME $ac_val
8951 case $gl_cv_header_working_fcntl_h in #(
8952 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8956 cat >>confdefs.h <<_ACEOF
8957 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8961 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8962 if test "x$ac_cv_type_pid_t" = xyes
8967 cat >>confdefs.h <<_ACEOF
8973 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8974 if test "x$ac_cv_type_mode_t" = xyes
8979 cat >>confdefs.h <<_ACEOF
8987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8988 printf %s "checking for promoted mode_t type... " >&6; }
8989 if test ${gl_cv_promoted_mode_t+y}
8991 printf %s "(cached) " >&6
8994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8995 /* end confdefs.h. */
8996 #include <sys/types.h>
9000 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
9005 if ac_fn_c_try_compile "$LINENO"
9007 gl_cv_promoted_mode_t='int'
9009 gl_cv_promoted_mode_t='mode_t'
9011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
9015 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
9017 cat >>confdefs.h <<_ACEOF
9018 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
9022 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
9023 if test "x$ac_cv_have_decl_fdatasync" = xyes
9030 cat >>confdefs.h <<_ACEOF
9031 #define HAVE_DECL_FDATASYNC $ac_have_decl
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 cat >>confdefs.h <<_ACEOF
9068 #define HAVE_STDINT_H_WITH_UINTMAX 1
9074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
9075 printf %s "checking for inttypes.h... " >&6; }
9076 if test ${gl_cv_header_inttypes_h+y}
9078 printf %s "(cached) " >&6
9080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9081 /* end confdefs.h. */
9083 #include <sys/types.h>
9084 #include <inttypes.h>
9089 uintmax_t i = (uintmax_t) -1; return !i;
9094 if ac_fn_c_try_compile "$LINENO"
9096 gl_cv_header_inttypes_h=yes
9098 gl_cv_header_inttypes_h=no
9100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
9103 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
9104 if test $gl_cv_header_inttypes_h = yes; then
9106 cat >>confdefs.h <<_ACEOF
9107 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
9116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
9117 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
9118 if test ${gl_cv_func_printf_sizes_c99+y}
9120 printf %s "(cached) " >&6
9123 if test "$cross_compiling" = yes
9127 # Guess yes on glibc systems.
9128 *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
9129 # Guess yes on FreeBSD >= 5.
9130 freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
9131 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9132 # Guess yes on Mac OS X >= 10.3.
9133 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
9134 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
9135 # Guess yes on OpenBSD >= 3.9.
9136 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
9137 gl_cv_func_printf_sizes_c99="guessing no";;
9138 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9139 # Guess yes on Solaris >= 2.10.
9140 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9141 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
9142 # Guess yes on NetBSD >= 3.
9143 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9144 gl_cv_func_printf_sizes_c99="guessing no";;
9145 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9146 # If we don't know, assume the worst.
9147 *) gl_cv_func_printf_sizes_c99="guessing no";;
9151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9152 /* end confdefs.h. */
9157 #include <sys/types.h>
9158 #if HAVE_STDINT_H_WITH_UINTMAX
9159 # include <stdint.h>
9161 #if HAVE_INTTYPES_H_WITH_UINTMAX
9162 # include <inttypes.h>
9164 static char buf[100];
9168 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
9170 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
9171 || strcmp (buf, "12345671 33") != 0)
9175 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
9176 || strcmp (buf, "12345672 33") != 0)
9179 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
9180 || strcmp (buf, "12345673 33") != 0)
9183 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
9184 || strcmp (buf, "1.5 33") != 0)
9189 if ac_fn_c_try_run "$LINENO"
9191 gl_cv_func_printf_sizes_c99=yes
9193 gl_cv_func_printf_sizes_c99=no
9195 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9196 conftest.$ac_objext conftest.beam conftest.$ac_ext
9201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
9202 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
9206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
9207 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
9208 if test ${gl_cv_func_printf_long_double+y}
9210 printf %s "(cached) " >&6
9213 if test "$cross_compiling" = yes
9217 beos*) gl_cv_func_printf_long_double="guessing no";;
9218 mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
9219 *) gl_cv_func_printf_long_double="guessing yes";;
9223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9224 /* end confdefs.h. */
9228 static char buf[10000];
9233 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
9234 || strcmp (buf, "1.750000 33") != 0)
9237 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
9238 || strcmp (buf, "1.750000e+00 33") != 0)
9241 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
9242 || strcmp (buf, "1.75 33") != 0)
9247 if ac_fn_c_try_run "$LINENO"
9249 gl_cv_func_printf_long_double=yes
9251 gl_cv_func_printf_long_double=no
9253 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9254 conftest.$ac_objext conftest.beam conftest.$ac_ext
9259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
9260 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
9264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
9265 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
9266 if test ${gl_cv_func_printf_infinite+y}
9268 printf %s "(cached) " >&6
9271 if test "$cross_compiling" = yes
9275 # Guess yes on glibc systems.
9276 *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
9277 # Guess yes on FreeBSD >= 6.
9278 freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
9279 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
9280 # Guess yes on Mac OS X >= 10.3.
9281 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
9282 darwin*) gl_cv_func_printf_infinite="guessing yes";;
9283 # Guess yes on HP-UX >= 11.
9284 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
9285 hpux*) gl_cv_func_printf_infinite="guessing yes";;
9286 # Guess yes on NetBSD >= 3.
9287 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9288 gl_cv_func_printf_infinite="guessing no";;
9289 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
9290 # Guess yes on BeOS.
9291 beos*) gl_cv_func_printf_infinite="guessing yes";;
9292 # If we don't know, assume the worst.
9293 *) gl_cv_func_printf_infinite="guessing no";;
9297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9298 /* end confdefs.h. */
9303 strisnan (const char *string, size_t start_index, size_t end_index)
9305 if (start_index < end_index)
9307 if (string[start_index] == '-')
9309 if (start_index + 3 <= end_index
9310 && memcmp (string + start_index, "nan", 3) == 0)
9313 if (start_index == end_index
9314 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9323 static double plus_zero = 0.0;
9324 double minus_zero = - plus_zero;
9325 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
9327 static char buf[10000];
9328 static double zero = 0.0;
9332 if (sprintf (buf, "%f", 1.0 / zero) < 0
9333 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9335 if (sprintf (buf, "%f", -1.0 / zero) < 0
9336 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9338 if (sprintf (buf, "%f", zero / zero) < 0
9339 || !strisnan (buf, 0, strlen (buf)))
9341 if (sprintf (buf, "%e", 1.0 / zero) < 0
9342 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9344 if (sprintf (buf, "%e", -1.0 / zero) < 0
9345 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9347 if (sprintf (buf, "%e", zero / zero) < 0
9348 || !strisnan (buf, 0, strlen (buf)))
9350 if (sprintf (buf, "%g", 1.0 / zero) < 0
9351 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9353 if (sprintf (buf, "%g", -1.0 / zero) < 0
9354 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9356 if (sprintf (buf, "%g", zero / zero) < 0
9357 || !strisnan (buf, 0, strlen (buf)))
9359 /* This test fails on HP-UX 10.20. */
9360 if (have_minus_zero ())
9361 if (sprintf (buf, "%g", - zero) < 0
9362 || strcmp (buf, "-0") != 0)
9367 if ac_fn_c_try_run "$LINENO"
9369 gl_cv_func_printf_infinite=yes
9371 gl_cv_func_printf_infinite=no
9373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9374 conftest.$ac_objext conftest.beam conftest.$ac_ext
9379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
9380 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
9383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9384 printf %s "checking whether byte ordering is bigendian... " >&6; }
9385 if test ${ac_cv_c_bigendian+y}
9387 printf %s "(cached) " >&6
9389 ac_cv_c_bigendian=unknown
9390 # See if we're dealing with a universal compiler.
9391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9392 /* end confdefs.h. */
9393 #ifndef __APPLE_CC__
9394 not a universal capable compiler
9399 if ac_fn_c_try_compile "$LINENO"
9402 # Check for potential -arch flags. It is not universal unless
9403 # there are at least two -arch flags with different values.
9406 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9407 if test -n "$ac_prev"; then
9409 i?86 | x86_64 | ppc | ppc64)
9410 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9413 ac_cv_c_bigendian=universal
9419 elif test "x$ac_word" = "x-arch"; then
9424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9425 if test $ac_cv_c_bigendian = unknown; then
9426 # See if sys/param.h defines the BYTE_ORDER macro.
9427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9428 /* end confdefs.h. */
9429 #include <sys/types.h>
9430 #include <sys/param.h>
9435 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9436 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9445 if ac_fn_c_try_compile "$LINENO"
9447 # It does; now see whether it defined to BIG_ENDIAN or not.
9448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9449 /* end confdefs.h. */
9450 #include <sys/types.h>
9451 #include <sys/param.h>
9456 #if BYTE_ORDER != BIG_ENDIAN
9464 if ac_fn_c_try_compile "$LINENO"
9466 ac_cv_c_bigendian=yes
9468 ac_cv_c_bigendian=no
9470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9474 if test $ac_cv_c_bigendian = unknown; then
9475 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9477 /* end confdefs.h. */
9483 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9491 if ac_fn_c_try_compile "$LINENO"
9493 # It does; now see whether it defined to _BIG_ENDIAN or not.
9494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9495 /* end confdefs.h. */
9509 if ac_fn_c_try_compile "$LINENO"
9511 ac_cv_c_bigendian=yes
9513 ac_cv_c_bigendian=no
9515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9519 if test $ac_cv_c_bigendian = unknown; then
9520 # Compile a test program.
9521 if test "$cross_compiling" = yes
9523 # Try to guess by grepping values from an object file.
9524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9525 /* end confdefs.h. */
9526 short int ascii_mm[] =
9527 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9528 short int ascii_ii[] =
9529 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9530 int use_ascii (int i) {
9531 return ascii_mm[i] + ascii_ii[i];
9533 short int ebcdic_ii[] =
9534 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9535 short int ebcdic_mm[] =
9536 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9537 int use_ebcdic (int i) {
9538 return ebcdic_mm[i] + ebcdic_ii[i];
9545 return use_ascii (foo) == use_ebcdic (foo);
9550 if ac_fn_c_try_compile "$LINENO"
9552 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9553 ac_cv_c_bigendian=yes
9555 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9556 if test "$ac_cv_c_bigendian" = unknown; then
9557 ac_cv_c_bigendian=no
9559 # finding both strings is unlikely to happen, but who knows?
9560 ac_cv_c_bigendian=unknown
9564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9567 /* end confdefs.h. */
9568 $ac_includes_default
9573 /* Are we little or big endian? From Harbison&Steele. */
9577 char c[sizeof (long int)];
9580 return u.c[sizeof (long int) - 1] == 1;
9586 if ac_fn_c_try_run "$LINENO"
9588 ac_cv_c_bigendian=no
9590 ac_cv_c_bigendian=yes
9592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9593 conftest.$ac_objext conftest.beam conftest.$ac_ext
9598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9599 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
9600 case $ac_cv_c_bigendian in #(
9602 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
9608 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9612 as_fn_error $? "unknown endianness
9613 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9619 printf %s "checking whether long double and double are the same... " >&6; }
9620 if test ${gl_cv_long_double_equals_double+y}
9622 printf %s "(cached) " >&6
9624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9625 /* end confdefs.h. */
9630 typedef int check[sizeof (long double) == sizeof (double)
9631 && LDBL_MANT_DIG == DBL_MANT_DIG
9632 && LDBL_MAX_EXP == DBL_MAX_EXP
9633 && LDBL_MIN_EXP == DBL_MIN_EXP
9640 if ac_fn_c_try_compile "$LINENO"
9642 gl_cv_long_double_equals_double=yes
9644 gl_cv_long_double_equals_double=no
9646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9650 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
9651 if test $gl_cv_long_double_equals_double = yes; then
9653 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9655 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9657 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9666 if test -n "$gl_printf_safe"; then
9668 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9671 case "$gl_cv_func_printf_long_double" in
9673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9674 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
9675 if test ${gl_cv_func_printf_infinite_long_double+y}
9677 printf %s "(cached) " >&6
9680 if test "$cross_compiling" = yes
9684 # Guess no on ia64, x86_64, i386.
9685 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9688 # Guess yes on glibc systems.
9689 *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9690 # Guess yes on FreeBSD >= 6.
9691 freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
9692 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9693 # Guess yes on HP-UX >= 11.
9694 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9695 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9696 # If we don't know, assume the worst.
9697 *) gl_cv_func_printf_infinite_long_double="guessing no";;
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9704 /* end confdefs.h. */
9708 #if defined __MACH__ && defined __APPLE__
9709 /* Avoid a crash on Mac OS X. */
9710 #include <mach/mach.h>
9711 #include <mach/mach_error.h>
9712 #include <mach/thread_status.h>
9713 #include <mach/exception.h>
9714 #include <mach/task.h>
9715 #include <pthread.h>
9716 /* The exception port on which our thread listens. */
9717 static mach_port_t our_exception_port;
9718 /* The main function of the thread listening for exceptions of type
9721 mach_exception_thread (void *arg)
9723 /* Buffer for a message to be received. */
9725 mach_msg_header_t head;
9726 mach_msg_body_t msgh_body;
9729 mach_msg_return_t retval;
9730 /* Wait for a message on the exception port. */
9731 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9732 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9733 if (retval != MACH_MSG_SUCCESS)
9740 mach_port_t self = mach_task_self ();
9741 /* Allocate a port on which the thread shall listen for exceptions. */
9742 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9744 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9745 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9746 MACH_MSG_TYPE_MAKE_SEND)
9748 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9750 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9751 /* Create the thread listening on the exception port. */
9752 pthread_attr_t attr;
9754 if (pthread_attr_init (&attr) == 0
9755 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9756 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9757 pthread_attr_destroy (&attr);
9758 /* Replace the exception port info for these exceptions with our own.
9759 Note that we replace the exception port for the entire task, not only
9760 for a particular thread. This has the effect that when our exception
9761 port gets the message, the thread specific exception port has already
9762 been asked, and we don't need to bother about it.
9763 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9764 task_set_exception_ports (self, mask, our_exception_port,
9765 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9770 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9771 /* Avoid a crash on native Windows. */
9772 #define WIN32_LEAN_AND_MEAN
9773 #include <windows.h>
9774 #include <winerror.h>
9776 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9778 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9780 case EXCEPTION_ACCESS_VIOLATION:
9781 case EXCEPTION_IN_PAGE_ERROR:
9782 case EXCEPTION_STACK_OVERFLOW:
9783 case EXCEPTION_GUARD_PAGE:
9784 case EXCEPTION_PRIV_INSTRUCTION:
9785 case EXCEPTION_ILLEGAL_INSTRUCTION:
9786 case EXCEPTION_DATATYPE_MISALIGNMENT:
9787 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9788 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9791 return EXCEPTION_CONTINUE_SEARCH;
9796 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9799 /* Avoid a crash on POSIX systems. */
9801 /* A POSIX signal handler. */
9803 exception_handler (int sig)
9811 signal (SIGSEGV, exception_handler);
9814 signal (SIGBUS, exception_handler);
9823 strisnan (const char *string, size_t start_index, size_t end_index)
9825 if (start_index < end_index)
9827 if (string[start_index] == '-')
9829 if (start_index + 3 <= end_index
9830 && memcmp (string + start_index, "nan", 3) == 0)
9833 if (start_index == end_index
9834 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9840 static char buf[10000];
9841 static long double zeroL = 0.0L;
9846 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9847 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9849 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9850 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9852 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9853 || !strisnan (buf, 0, strlen (buf)))
9855 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9856 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9858 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9859 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9861 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9862 || !strisnan (buf, 0, strlen (buf)))
9864 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9865 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9867 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9868 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9870 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9871 || !strisnan (buf, 0, strlen (buf)))
9873 #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
9874 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9875 of 'unsigned int' words. */
9876 # ifdef WORDS_BIGENDIAN
9877 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9878 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9879 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
9880 (unsigned int) (mantlo) << 16 \
9883 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9884 { mantlo, manthi, exponent }
9887 static union { unsigned int word[4]; long double value; } x =
9888 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
9889 if (sprintf (buf, "%Lf", x.value) < 0
9890 || !strisnan (buf, 0, strlen (buf)))
9892 if (sprintf (buf, "%Le", x.value) < 0
9893 || !strisnan (buf, 0, strlen (buf)))
9895 if (sprintf (buf, "%Lg", x.value) < 0
9896 || !strisnan (buf, 0, strlen (buf)))
9900 /* Signalling NaN. */
9901 static union { unsigned int word[4]; long double value; } x =
9902 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
9903 if (sprintf (buf, "%Lf", x.value) < 0
9904 || !strisnan (buf, 0, strlen (buf)))
9906 if (sprintf (buf, "%Le", x.value) < 0
9907 || !strisnan (buf, 0, strlen (buf)))
9909 if (sprintf (buf, "%Lg", x.value) < 0
9910 || !strisnan (buf, 0, strlen (buf)))
9914 static union { unsigned int word[4]; long double value; } x =
9915 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
9916 if (sprintf (buf, "%Lf", x.value) <= 0)
9918 if (sprintf (buf, "%Le", x.value) <= 0)
9920 if (sprintf (buf, "%Lg", x.value) <= 0)
9923 { /* Pseudo-Infinity. */
9924 static union { unsigned int word[4]; long double value; } x =
9925 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
9926 if (sprintf (buf, "%Lf", x.value) <= 0)
9928 if (sprintf (buf, "%Le", x.value) <= 0)
9930 if (sprintf (buf, "%Lg", x.value) <= 0)
9933 { /* Pseudo-Zero. */
9934 static union { unsigned int word[4]; long double value; } x =
9935 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
9936 if (sprintf (buf, "%Lf", x.value) <= 0)
9938 if (sprintf (buf, "%Le", x.value) <= 0)
9940 if (sprintf (buf, "%Lg", x.value) <= 0)
9943 { /* Unnormalized number. */
9944 static union { unsigned int word[4]; long double value; } x =
9945 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
9946 if (sprintf (buf, "%Lf", x.value) <= 0)
9948 if (sprintf (buf, "%Le", x.value) <= 0)
9950 if (sprintf (buf, "%Lg", x.value) <= 0)
9953 { /* Pseudo-Denormal. */
9954 static union { unsigned int word[4]; long double value; } x =
9955 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
9956 if (sprintf (buf, "%Lf", x.value) <= 0)
9958 if (sprintf (buf, "%Le", x.value) <= 0)
9960 if (sprintf (buf, "%Lg", x.value) <= 0)
9967 if ac_fn_c_try_run "$LINENO"
9969 gl_cv_func_printf_infinite_long_double=yes
9971 gl_cv_func_printf_infinite_long_double=no
9973 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9974 conftest.$ac_objext conftest.beam conftest.$ac_ext
9979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
9980 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
9983 gl_cv_func_printf_infinite_long_double="irrelevant"
9989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
9990 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
9991 if test ${gl_cv_func_printf_directive_a+y}
9993 printf %s "(cached) " >&6
9996 if test "$cross_compiling" = yes
10000 # Guess yes on glibc >= 2.5 systems.
10002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10003 /* end confdefs.h. */
10005 #include <features.h>
10006 #ifdef __GNU_LIBRARY__
10007 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
10013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10014 $EGREP "BZ2908" >/dev/null 2>&1
10016 gl_cv_func_printf_directive_a="guessing yes"
10018 gl_cv_func_printf_directive_a="guessing no"
10023 # If we don't know, assume the worst.
10024 *) gl_cv_func_printf_directive_a="guessing no";;
10028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10029 /* end confdefs.h. */
10032 #include <string.h>
10033 static char buf[100];
10034 static double zero = 0.0;
10038 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
10039 || (strcmp (buf, "0x1.922p+1 33") != 0
10040 && strcmp (buf, "0x3.244p+0 33") != 0
10041 && strcmp (buf, "0x6.488p-1 33") != 0
10042 && strcmp (buf, "0xc.91p-2 33") != 0))
10044 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
10045 || (strcmp (buf, "-0X1.922P+1 33") != 0
10046 && strcmp (buf, "-0X3.244P+0 33") != 0
10047 && strcmp (buf, "-0X6.488P-1 33") != 0
10048 && strcmp (buf, "-0XC.91P-2 33") != 0))
10050 /* This catches a FreeBSD 6.1 bug: it doesn't round. */
10051 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
10052 || (strcmp (buf, "0x1.83p+0 33") != 0
10053 && strcmp (buf, "0x3.05p-1 33") != 0
10054 && strcmp (buf, "0x6.0ap-2 33") != 0
10055 && strcmp (buf, "0xc.14p-3 33") != 0))
10057 /* This catches a FreeBSD 6.1 bug. See
10058 <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
10059 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
10062 /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
10063 if (sprintf (buf, "%.1a", 1.999) < 0
10064 || (strcmp (buf, "0x1.0p+1") != 0
10065 && strcmp (buf, "0x2.0p+0") != 0
10066 && strcmp (buf, "0x4.0p-1") != 0
10067 && strcmp (buf, "0x8.0p-2") != 0))
10069 /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
10070 glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
10071 if (sprintf (buf, "%.1La", 1.999L) < 0
10072 || (strcmp (buf, "0x1.0p+1") != 0
10073 && strcmp (buf, "0x2.0p+0") != 0
10074 && strcmp (buf, "0x4.0p-1") != 0
10075 && strcmp (buf, "0x8.0p-2") != 0))
10080 if ac_fn_c_try_run "$LINENO"
10082 gl_cv_func_printf_directive_a=yes
10084 gl_cv_func_printf_directive_a=no
10086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10087 conftest.$ac_objext conftest.beam conftest.$ac_ext
10092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
10093 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
10097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
10098 printf %s "checking whether printf supports the 'F' directive... " >&6; }
10099 if test ${gl_cv_func_printf_directive_f+y}
10101 printf %s "(cached) " >&6
10104 if test "$cross_compiling" = yes
10108 # Guess yes on glibc systems.
10109 *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
10110 # Guess yes on FreeBSD >= 6.
10111 freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
10112 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
10113 # Guess yes on Mac OS X >= 10.3.
10114 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
10115 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
10116 # Guess yes on Solaris >= 2.10.
10117 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
10118 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
10119 # If we don't know, assume the worst.
10120 *) gl_cv_func_printf_directive_f="guessing no";;
10124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h. */
10128 #include <string.h>
10129 static char buf[100];
10130 static double zero = 0.0;
10134 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
10135 || strcmp (buf, "1234567.000000 33") != 0)
10137 if (sprintf (buf, "%F", 1.0 / zero) < 0
10138 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
10140 /* This catches a Cygwin 1.5.x bug. */
10141 if (sprintf (buf, "%.F", 1234.0) < 0
10142 || strcmp (buf, "1234") != 0)
10147 if ac_fn_c_try_run "$LINENO"
10149 gl_cv_func_printf_directive_f=yes
10151 gl_cv_func_printf_directive_f=no
10153 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10154 conftest.$ac_objext conftest.beam conftest.$ac_ext
10159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
10160 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
10164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
10165 printf %s "checking whether printf supports the 'n' directive... " >&6; }
10166 if test ${gl_cv_func_printf_directive_n+y}
10168 printf %s "(cached) " >&6
10171 if test "$cross_compiling" = yes
10175 mingw*) gl_cv_func_printf_directive_n="guessing no";;
10176 *) gl_cv_func_printf_directive_n="guessing yes";;
10180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10181 /* end confdefs.h. */
10184 #include <stdlib.h>
10185 #include <string.h>
10187 /* See page about "Parameter Validation" on msdn.microsoft.com. */
10189 invalid_parameter_handler (const wchar_t *expression,
10190 const wchar_t *function,
10191 const wchar_t *file, unsigned int line,
10197 static char fmtstring[10];
10198 static char buf[100];
10203 _set_invalid_parameter_handler (invalid_parameter_handler);
10205 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
10206 support %n in format strings in read-only memory but not in writable
10208 strcpy (fmtstring, "%d %n");
10209 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
10210 || strcmp (buf, "123 ") != 0
10216 if ac_fn_c_try_run "$LINENO"
10218 gl_cv_func_printf_directive_n=yes
10220 gl_cv_func_printf_directive_n=no
10222 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10223 conftest.$ac_objext conftest.beam conftest.$ac_ext
10228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
10229 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
10233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
10234 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
10235 if test ${gl_cv_func_printf_directive_ls+y}
10237 printf %s "(cached) " >&6
10240 if test "$cross_compiling" = yes
10244 openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
10245 irix*) gl_cv_func_printf_directive_ls="guessing no";;
10246 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
10247 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
10248 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
10249 *) gl_cv_func_printf_directive_ls="guessing yes";;
10253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10254 /* end confdefs.h. */
10256 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10258 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10259 included before <wchar.h>. */
10260 #include <stddef.h>
10264 #include <string.h>
10269 /* Test whether %ls works at all.
10270 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
10273 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
10275 if (sprintf (buf, "%ls", wstring) < 0
10276 || strcmp (buf, "abc") != 0)
10279 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
10280 assertion failure inside libc), but not on OpenBSD 4.0. */
10282 static const wchar_t wstring[] = { 'a', 0 };
10284 if (sprintf (buf, "%ls", wstring) < 0
10285 || strcmp (buf, "a") != 0)
10288 /* Test whether precisions in %ls are supported as specified in ISO C 99
10290 "If a precision is specified, no more than that many bytes are written
10291 (including shift sequences, if any), and the array shall contain a
10292 null wide character if, to equal the multibyte character sequence
10293 length given by the precision, the function would need to access a
10294 wide character one past the end of the array."
10295 This test fails on Solaris 10. */
10297 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
10299 if (sprintf (buf, "%.2ls", wstring) < 0
10300 || strcmp (buf, "ab") != 0)
10306 if ac_fn_c_try_run "$LINENO"
10308 gl_cv_func_printf_directive_ls=yes
10310 gl_cv_func_printf_directive_ls=no
10312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10313 conftest.$ac_objext conftest.beam conftest.$ac_ext
10318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
10319 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
10323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
10324 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
10325 if test ${gl_cv_func_printf_positions+y}
10327 printf %s "(cached) " >&6
10330 if test "$cross_compiling" = yes
10334 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
10335 gl_cv_func_printf_positions="guessing no";;
10336 beos*) gl_cv_func_printf_positions="guessing no";;
10337 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
10338 *) gl_cv_func_printf_positions="guessing yes";;
10342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10343 /* end confdefs.h. */
10346 #include <string.h>
10347 /* The string "%2$d %1$d", with dollar characters protected from the shell's
10348 dollar expansion (possibly an autoconf bug). */
10349 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
10350 static char buf[100];
10353 sprintf (buf, format, 33, 55);
10354 return (strcmp (buf, "55 33") != 0);
10357 if ac_fn_c_try_run "$LINENO"
10359 gl_cv_func_printf_positions=yes
10361 gl_cv_func_printf_positions=no
10363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10364 conftest.$ac_objext conftest.beam conftest.$ac_ext
10369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
10370 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
10374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
10375 printf %s "checking whether printf supports the grouping flag... " >&6; }
10376 if test ${gl_cv_func_printf_flag_grouping+y}
10378 printf %s "(cached) " >&6
10381 if test "$cross_compiling" = yes
10385 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
10386 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
10387 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
10388 *) gl_cv_func_printf_flag_grouping="guessing yes";;
10392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10393 /* end confdefs.h. */
10396 #include <string.h>
10397 static char buf[100];
10400 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
10401 || buf[strlen (buf) - 1] != '9')
10406 if ac_fn_c_try_run "$LINENO"
10408 gl_cv_func_printf_flag_grouping=yes
10410 gl_cv_func_printf_flag_grouping=no
10412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10413 conftest.$ac_objext conftest.beam conftest.$ac_ext
10418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
10419 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
10423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
10424 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
10425 if test ${gl_cv_func_printf_flag_leftadjust+y}
10427 printf %s "(cached) " >&6
10430 if test "$cross_compiling" = yes
10434 # Guess yes on HP-UX 11.
10435 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10436 # Guess no on HP-UX 10 and older.
10437 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
10438 # Guess yes otherwise.
10439 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10444 /* end confdefs.h. */
10447 #include <string.h>
10448 static char buf[100];
10451 /* Check that a '-' flag is not annihilated by a negative width. */
10452 if (sprintf (buf, "a%-*sc", -3, "b") < 0
10453 || strcmp (buf, "ab c") != 0)
10458 if ac_fn_c_try_run "$LINENO"
10460 gl_cv_func_printf_flag_leftadjust=yes
10462 gl_cv_func_printf_flag_leftadjust=no
10464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10465 conftest.$ac_objext conftest.beam conftest.$ac_ext
10470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10471 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
10475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10476 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
10477 if test ${gl_cv_func_printf_flag_zero+y}
10479 printf %s "(cached) " >&6
10482 if test "$cross_compiling" = yes
10486 # Guess yes on glibc systems.
10487 *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10488 # Guess yes on BeOS.
10489 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
10490 # If we don't know, assume the worst.
10491 *) gl_cv_func_printf_flag_zero="guessing no";;
10495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h. */
10499 #include <string.h>
10500 static char buf[100];
10501 static double zero = 0.0;
10504 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10505 || (strcmp (buf, " inf") != 0
10506 && strcmp (buf, " infinity") != 0))
10511 if ac_fn_c_try_run "$LINENO"
10513 gl_cv_func_printf_flag_zero=yes
10515 gl_cv_func_printf_flag_zero=no
10517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10518 conftest.$ac_objext conftest.beam conftest.$ac_ext
10523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10524 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
10528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10529 printf %s "checking whether printf supports large precisions... " >&6; }
10530 if test ${gl_cv_func_printf_precision+y}
10532 printf %s "(cached) " >&6
10535 if test "$cross_compiling" = yes
10539 # Guess no only on Solaris, native Windows, and BeOS systems.
10540 solaris*) gl_cv_func_printf_precision="guessing no" ;;
10541 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10542 beos*) gl_cv_func_printf_precision="guessing no" ;;
10543 *) gl_cv_func_printf_precision="guessing yes" ;;
10547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10548 /* end confdefs.h. */
10551 #include <string.h>
10552 static char buf[5000];
10557 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
10560 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10562 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10564 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10567 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10573 if ac_fn_c_try_run "$LINENO"
10575 gl_cv_func_printf_precision=yes
10577 gl_cv_func_printf_precision=no
10579 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10580 conftest.$ac_objext conftest.beam conftest.$ac_ext
10585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10586 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
10589 gl_cv_c_multiarch=no
10590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10591 /* end confdefs.h. */
10592 #ifndef __APPLE_CC__
10593 not a universal capable compiler
10598 if ac_fn_c_try_compile "$LINENO"
10603 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10604 if test -n "$prev"; then
10606 i?86 | x86_64 | ppc | ppc64)
10607 if test -z "$arch" || test "$arch" = "$word"; then
10610 gl_cv_c_multiarch=yes
10616 if test "x$word" = "x-arch"; then
10623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10624 if test $gl_cv_c_multiarch = yes; then
10625 APPLE_UNIVERSAL_BUILD=1
10627 APPLE_UNIVERSAL_BUILD=0
10634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10635 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
10636 if test ${gl_cv_func_printf_enomem+y}
10638 printf %s "(cached) " >&6
10641 gl_cv_func_printf_enomem="guessing no"
10642 if test "$cross_compiling" = no; then
10643 if test $APPLE_UNIVERSAL_BUILD = 0; then
10644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10645 /* end confdefs.h. */
10648 #include <stdlib.h>
10649 #if defined __MACH__ && defined __APPLE__
10650 /* Avoid a crash on Mac OS X. */
10651 #include <mach/mach.h>
10652 #include <mach/mach_error.h>
10653 #include <mach/thread_status.h>
10654 #include <mach/exception.h>
10655 #include <mach/task.h>
10656 #include <pthread.h>
10657 /* The exception port on which our thread listens. */
10658 static mach_port_t our_exception_port;
10659 /* The main function of the thread listening for exceptions of type
10662 mach_exception_thread (void *arg)
10664 /* Buffer for a message to be received. */
10666 mach_msg_header_t head;
10667 mach_msg_body_t msgh_body;
10670 mach_msg_return_t retval;
10671 /* Wait for a message on the exception port. */
10672 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10673 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10674 if (retval != MACH_MSG_SUCCESS)
10679 nocrash_init (void)
10681 mach_port_t self = mach_task_self ();
10682 /* Allocate a port on which the thread shall listen for exceptions. */
10683 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10685 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
10686 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10687 MACH_MSG_TYPE_MAKE_SEND)
10689 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
10691 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10692 /* Create the thread listening on the exception port. */
10693 pthread_attr_t attr;
10695 if (pthread_attr_init (&attr) == 0
10696 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10697 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10698 pthread_attr_destroy (&attr);
10699 /* Replace the exception port info for these exceptions with our own.
10700 Note that we replace the exception port for the entire task, not only
10701 for a particular thread. This has the effect that when our exception
10702 port gets the message, the thread specific exception port has already
10703 been asked, and we don't need to bother about it.
10704 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
10705 task_set_exception_ports (self, mask, our_exception_port,
10706 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10711 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10712 /* Avoid a crash on native Windows. */
10713 #define WIN32_LEAN_AND_MEAN
10714 #include <windows.h>
10715 #include <winerror.h>
10717 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10719 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10721 case EXCEPTION_ACCESS_VIOLATION:
10722 case EXCEPTION_IN_PAGE_ERROR:
10723 case EXCEPTION_STACK_OVERFLOW:
10724 case EXCEPTION_GUARD_PAGE:
10725 case EXCEPTION_PRIV_INSTRUCTION:
10726 case EXCEPTION_ILLEGAL_INSTRUCTION:
10727 case EXCEPTION_DATATYPE_MISALIGNMENT:
10728 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10729 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10732 return EXCEPTION_CONTINUE_SEARCH;
10735 nocrash_init (void)
10737 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10740 /* Avoid a crash on POSIX systems. */
10741 #include <signal.h>
10742 /* A POSIX signal handler. */
10744 exception_handler (int sig)
10749 nocrash_init (void)
10752 signal (SIGSEGV, exception_handler);
10755 signal (SIGBUS, exception_handler);
10761 #include <sys/types.h>
10762 #include <sys/time.h>
10763 #include <sys/resource.h>
10767 struct rlimit limit;
10770 /* Some printf implementations allocate temporary space with malloc. */
10771 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
10773 if (getrlimit (RLIMIT_DATA, &limit) < 0)
10775 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10776 limit.rlim_max = 5000000;
10777 limit.rlim_cur = limit.rlim_max;
10778 if (setrlimit (RLIMIT_DATA, &limit) < 0)
10781 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
10783 if (getrlimit (RLIMIT_AS, &limit) < 0)
10785 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10786 limit.rlim_max = 5000000;
10787 limit.rlim_cur = limit.rlim_max;
10788 if (setrlimit (RLIMIT_AS, &limit) < 0)
10791 /* Some printf implementations allocate temporary space on the stack. */
10792 #ifdef RLIMIT_STACK
10793 if (getrlimit (RLIMIT_STACK, &limit) < 0)
10795 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10796 limit.rlim_max = 5000000;
10797 limit.rlim_cur = limit.rlim_max;
10798 if (setrlimit (RLIMIT_STACK, &limit) < 0)
10801 ret = printf ("%.5000000f", 1.0);
10802 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10806 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10807 (eval $ac_link) 2>&5
10809 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10810 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10813 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
10814 if test $result != 0 && test $result != 77; then result=1; fi
10816 ) >/dev/null 2>/dev/null
10818 0) gl_cv_func_printf_enomem="yes" ;;
10819 77) gl_cv_func_printf_enomem="guessing no" ;;
10820 *) gl_cv_func_printf_enomem="no" ;;
10823 gl_cv_func_printf_enomem="guessing no"
10827 gl_cv_func_printf_enomem="guessing no"
10830 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10832 # Guess yes on glibc systems.
10833 *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
10834 # Guess yes on Solaris.
10835 solaris*) gl_cv_func_printf_enomem="guessing yes";;
10836 # Guess yes on AIX.
10837 aix*) gl_cv_func_printf_enomem="guessing yes";;
10838 # Guess yes on HP-UX/hppa.
10839 hpux*) case "$host_cpu" in
10840 hppa*) gl_cv_func_printf_enomem="guessing yes";;
10841 *) gl_cv_func_printf_enomem="guessing no";;
10844 # Guess yes on IRIX.
10845 irix*) gl_cv_func_printf_enomem="guessing yes";;
10846 # Guess yes on OSF/1.
10847 osf*) gl_cv_func_printf_enomem="guessing yes";;
10848 # Guess yes on BeOS.
10849 beos*) gl_cv_func_printf_enomem="guessing yes";;
10850 # Guess yes on Haiku.
10851 haiku*) gl_cv_func_printf_enomem="guessing yes";;
10852 # If we don't know, assume the worst.
10853 *) gl_cv_func_printf_enomem="guessing no";;
10858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
10859 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
10863 case "$gl_cv_func_printf_long_double" in
10868 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
10876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10877 printf %s "checking for unsigned long long int... " >&6; }
10878 if test ${ac_cv_type_unsigned_long_long_int+y}
10880 printf %s "(cached) " >&6
10882 ac_cv_type_unsigned_long_long_int=yes
10883 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10885 /* end confdefs.h. */
10887 /* For now, do not test the preprocessor; as of 2007 there are too many
10888 implementations with broken preprocessors. Perhaps this can
10889 be revisited in 2012. In the meantime, code should not expect
10890 #if to work with literals wider than 32 bits. */
10891 /* Test literals. */
10892 long long int ll = 9223372036854775807ll;
10893 long long int nll = -9223372036854775807LL;
10894 unsigned long long int ull = 18446744073709551615ULL;
10895 /* Test constant expressions. */
10896 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10898 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10904 /* Test availability of runtime routines for shift and division. */
10905 long long int llmax = 9223372036854775807ll;
10906 unsigned long long int ullmax = 18446744073709551615ull;
10907 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10908 | (llmax / ll) | (llmax % ll)
10909 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10910 | (ullmax / ull) | (ullmax % ull));
10916 if ac_fn_c_try_link "$LINENO"
10920 ac_cv_type_unsigned_long_long_int=no
10922 rm -f core conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
10926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10927 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
10928 if test $ac_cv_type_unsigned_long_long_int = yes; then
10930 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10937 printf %s "checking for long long int... " >&6; }
10938 if test ${ac_cv_type_long_long_int+y}
10940 printf %s "(cached) " >&6
10942 ac_cv_type_long_long_int=yes
10943 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10944 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10945 if test $ac_cv_type_long_long_int = yes; then
10946 if test "$cross_compiling" = yes
10950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10951 /* end confdefs.h. */
10952 #include <limits.h>
10955 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10956 # define LLONG_MAX (HALF - 1 + HALF)
10961 long long int n = 1;
10965 long long int m = n << i;
10968 if (LLONG_MAX / 2 < m)
10976 if ac_fn_c_try_run "$LINENO"
10980 ac_cv_type_long_long_int=no
10982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10983 conftest.$ac_objext conftest.beam conftest.$ac_ext
10989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10990 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
10991 if test $ac_cv_type_long_long_int = yes; then
10993 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10999 printf %s "checking for wchar_t... " >&6; }
11000 if test ${gt_cv_c_wchar_t+y}
11002 printf %s "(cached) " >&6
11004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11005 /* end confdefs.h. */
11006 #include <stddef.h>
11007 wchar_t foo = (wchar_t)'\0';
11016 if ac_fn_c_try_compile "$LINENO"
11018 gt_cv_c_wchar_t=yes
11022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
11025 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
11026 if test $gt_cv_c_wchar_t = yes; then
11028 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
11033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11034 printf %s "checking for wint_t... " >&6; }
11035 if test ${gt_cv_c_wint_t+y}
11037 printf %s "(cached) " >&6
11039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11040 /* end confdefs.h. */
11042 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11044 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11045 before <wchar.h>. */
11046 #include <stddef.h>
11050 wint_t foo = (wchar_t)'\0';
11059 if ac_fn_c_try_compile "$LINENO"
11065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11068 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
11069 if test $gt_cv_c_wint_t = yes; then
11071 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
11079 if test $ac_cv_header_features_h = yes; then
11089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
11090 printf %s "checking for intmax_t... " >&6; }
11091 if test ${gt_cv_c_intmax_t+y}
11093 printf %s "(cached) " >&6
11095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11096 /* end confdefs.h. */
11098 #include <stddef.h>
11099 #include <stdlib.h>
11100 #if HAVE_STDINT_H_WITH_UINTMAX
11101 #include <stdint.h>
11103 #if HAVE_INTTYPES_H_WITH_UINTMAX
11104 #include <inttypes.h>
11110 intmax_t x = -1; return !x;
11115 if ac_fn_c_try_compile "$LINENO"
11117 gt_cv_c_intmax_t=yes
11119 gt_cv_c_intmax_t=no
11121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
11124 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
11125 if test $gt_cv_c_intmax_t = yes; then
11127 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
11131 test $ac_cv_type_long_long_int = yes \
11132 && ac_type='long long' \
11135 cat >>confdefs.h <<_ACEOF
11136 #define intmax_t $ac_type
11142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11143 printf %s "checking where to find the exponent in a 'double'... " >&6; }
11144 if test ${gl_cv_cc_double_expbit0+y}
11146 printf %s "(cached) " >&6
11149 if test "$cross_compiling" = yes
11152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11153 /* end confdefs.h. */
11155 #if defined arm || defined __arm || defined __arm__
11160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11161 $EGREP "mixed_endianness" >/dev/null 2>&1
11163 gl_cv_cc_double_expbit0="unknown"
11167 if test ${ac_cv_c_bigendian+y}
11169 printf %s "(cached) " >&6
11171 ac_cv_c_bigendian=unknown
11172 # See if we're dealing with a universal compiler.
11173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174 /* end confdefs.h. */
11175 #ifndef __APPLE_CC__
11176 not a universal capable compiler
11181 if ac_fn_c_try_compile "$LINENO"
11184 # Check for potential -arch flags. It is not universal unless
11185 # there are at least two -arch flags with different values.
11188 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11189 if test -n "$ac_prev"; then
11191 i?86 | x86_64 | ppc | ppc64)
11192 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11195 ac_cv_c_bigendian=universal
11201 elif test "x$ac_word" = "x-arch"; then
11206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11207 if test $ac_cv_c_bigendian = unknown; then
11208 # See if sys/param.h defines the BYTE_ORDER macro.
11209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11210 /* end confdefs.h. */
11211 #include <sys/types.h>
11212 #include <sys/param.h>
11217 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11218 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11220 bogus endian macros
11227 if ac_fn_c_try_compile "$LINENO"
11229 # It does; now see whether it defined to BIG_ENDIAN or not.
11230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11231 /* end confdefs.h. */
11232 #include <sys/types.h>
11233 #include <sys/param.h>
11238 #if BYTE_ORDER != BIG_ENDIAN
11246 if ac_fn_c_try_compile "$LINENO"
11248 ac_cv_c_bigendian=yes
11250 ac_cv_c_bigendian=no
11252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11256 if test $ac_cv_c_bigendian = unknown; then
11257 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11259 /* end confdefs.h. */
11260 #include <limits.h>
11265 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11266 bogus endian macros
11273 if ac_fn_c_try_compile "$LINENO"
11275 # It does; now see whether it defined to _BIG_ENDIAN or not.
11276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11277 /* end confdefs.h. */
11278 #include <limits.h>
11283 #ifndef _BIG_ENDIAN
11291 if ac_fn_c_try_compile "$LINENO"
11293 ac_cv_c_bigendian=yes
11295 ac_cv_c_bigendian=no
11297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11301 if test $ac_cv_c_bigendian = unknown; then
11302 # Compile a test program.
11303 if test "$cross_compiling" = yes
11305 # Try to guess by grepping values from an object file.
11306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11307 /* end confdefs.h. */
11308 short int ascii_mm[] =
11309 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11310 short int ascii_ii[] =
11311 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11312 int use_ascii (int i) {
11313 return ascii_mm[i] + ascii_ii[i];
11315 short int ebcdic_ii[] =
11316 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11317 short int ebcdic_mm[] =
11318 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11319 int use_ebcdic (int i) {
11320 return ebcdic_mm[i] + ebcdic_ii[i];
11327 return use_ascii (foo) == use_ebcdic (foo);
11332 if ac_fn_c_try_compile "$LINENO"
11334 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11335 ac_cv_c_bigendian=yes
11337 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11338 if test "$ac_cv_c_bigendian" = unknown; then
11339 ac_cv_c_bigendian=no
11341 # finding both strings is unlikely to happen, but who knows?
11342 ac_cv_c_bigendian=unknown
11346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11349 /* end confdefs.h. */
11350 $ac_includes_default
11355 /* Are we little or big endian? From Harbison&Steele. */
11359 char c[sizeof (long int)];
11362 return u.c[sizeof (long int) - 1] == 1;
11368 if ac_fn_c_try_run "$LINENO"
11370 ac_cv_c_bigendian=no
11372 ac_cv_c_bigendian=yes
11374 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11375 conftest.$ac_objext conftest.beam conftest.$ac_ext
11381 case $ac_cv_c_bigendian in #(
11383 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
11385 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
11388 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11392 gl_cv_cc_double_expbit0="unknown" ;;
11401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11402 /* end confdefs.h. */
11405 #include <stddef.h>
11407 #include <string.h>
11409 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11410 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11411 static unsigned int ored_words[NWORDS];
11412 static unsigned int anded_words[NWORDS];
11413 static void add_to_ored_words (double x)
11417 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11418 memset (&m, 0, sizeof (memory_double));
11420 for (i = 0; i < NWORDS; i++)
11422 ored_words[i] |= m.word[i];
11423 anded_words[i] &= m.word[i];
11429 FILE *fp = fopen ("conftest.out", "w");
11432 for (j = 0; j < NWORDS; j++)
11433 anded_words[j] = ~ (unsigned int) 0;
11434 add_to_ored_words (0.25);
11435 add_to_ored_words (0.5);
11436 add_to_ored_words (1.0);
11437 add_to_ored_words (2.0);
11438 add_to_ored_words (4.0);
11439 /* Remove bits that are common (e.g. if representation of the first mantissa
11440 bit is explicit). */
11441 for (j = 0; j < NWORDS; j++)
11442 ored_words[j] &= ~anded_words[j];
11443 /* Now find the nonzero word. */
11444 for (j = 0; j < NWORDS; j++)
11445 if (ored_words[j] != 0)
11450 for (i = j + 1; i < NWORDS; i++)
11451 if (ored_words[i] != 0)
11453 fprintf (fp, "unknown");
11454 return (fclose (fp) != 0);
11457 if ((ored_words[j] >> i) & 1)
11459 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11460 return (fclose (fp) != 0);
11463 fprintf (fp, "unknown");
11464 return (fclose (fp) != 0);
11468 if ac_fn_c_try_run "$LINENO"
11470 gl_cv_cc_double_expbit0=`cat conftest.out`
11472 gl_cv_cc_double_expbit0="unknown"
11474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11475 conftest.$ac_objext conftest.beam conftest.$ac_ext
11481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11482 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
11483 case "$gl_cv_cc_double_expbit0" in
11485 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11486 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
11488 cat >>confdefs.h <<_ACEOF
11489 #define DBL_EXPBIT0_WORD $word
11493 cat >>confdefs.h <<_ACEOF
11494 #define DBL_EXPBIT0_BIT $bit
11508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11509 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
11510 if test ${gl_cv_func_snprintf_retval_c99+y}
11512 printf %s "(cached) " >&6
11515 if test "$cross_compiling" = yes
11519 # Guess yes on glibc systems.
11520 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11521 # Guess yes on FreeBSD >= 5.
11522 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
11523 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11524 # Guess yes on Mac OS X >= 10.3.
11525 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
11526 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11527 # Guess yes on OpenBSD >= 3.9.
11528 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11529 gl_cv_func_snprintf_retval_c99="guessing no";;
11530 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11531 # Guess yes on Solaris >= 2.10.
11532 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11533 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
11534 # Guess yes on AIX >= 4.
11535 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
11536 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11537 # Guess yes on NetBSD >= 3.
11538 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11539 gl_cv_func_snprintf_retval_c99="guessing no";;
11540 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11541 # Guess yes on BeOS.
11542 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11543 # If we don't know, assume the worst.
11544 *) gl_cv_func_snprintf_retval_c99="guessing no";;
11548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11549 /* end confdefs.h. */
11552 #include <string.h>
11554 # define my_snprintf snprintf
11556 # include <stdarg.h>
11557 static int my_snprintf (char *buf, int size, const char *format, ...)
11561 va_start (args, format);
11562 ret = vsnprintf (buf, size, format, args);
11567 static char buf[100];
11570 strcpy (buf, "ABCDEF");
11571 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11573 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11575 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11580 if ac_fn_c_try_run "$LINENO"
11582 gl_cv_func_snprintf_retval_c99=yes
11584 gl_cv_func_snprintf_retval_c99=no
11586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11587 conftest.$ac_objext conftest.beam conftest.$ac_ext
11592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11593 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
11600 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
11602 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
11603 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11604 if eval test \"x\$"$as_ac_var"\" = x"yes"
11606 cat >>confdefs.h <<_ACEOF
11607 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
11613 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11615 if test "x$ac_cv_have_decl__snprintf" = xyes
11622 cat >>confdefs.h <<_ACEOF
11623 #define HAVE_DECL__SNPRINTF $ac_have_decl
11628 case "$gl_cv_func_snprintf_retval_c99" in
11631 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11657 GNULIB_COPYSIGNF=0;
11658 GNULIB_COPYSIGNL=0;
11717 GNULIB_REMAINDER=0;
11718 GNULIB_REMAINDERF=0;
11719 GNULIB_REMAINDERL=0;
11805 HAVE_DECL_COPYSIGNF=1;
11811 HAVE_DECL_EXPM1L=1;
11812 HAVE_DECL_FLOORF=1;
11813 HAVE_DECL_FLOORL=1;
11814 HAVE_DECL_FREXPL=1;
11815 HAVE_DECL_LDEXPL=1;
11817 HAVE_DECL_LOG10L=1;
11822 HAVE_DECL_REMAINDER=1;
11823 HAVE_DECL_REMAINDERL=1;
11826 HAVE_DECL_ROUNDF=1;
11827 HAVE_DECL_ROUNDL=1;
11832 HAVE_DECL_TRUNCF=1;
11833 HAVE_DECL_TRUNCL=1;
11856 REPLACE_HUGE_VAL=0;
11862 REPLACE_ISFINITE=0;
11885 REPLACE_REMAINDER=0;
11886 REPLACE_REMAINDERF=0;
11887 REPLACE_REMAINDERL=0;
11892 REPLACE_SIGNBIT_USING_GCC=0;
11899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11900 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
11901 if test ${gl_cv_func_frexp_no_libm+y}
11903 printf %s "(cached) " >&6
11906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11907 /* end confdefs.h. */
11913 int e; return frexp (x, &e) > 0;
11918 if ac_fn_c_try_link "$LINENO"
11920 gl_cv_func_frexp_no_libm=yes
11922 gl_cv_func_frexp_no_libm=no
11924 rm -f core conftest.err conftest.$ac_objext \
11925 conftest$ac_exeext conftest.$ac_ext
11928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11929 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
11931 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
11932 if test "x$ac_cv_have_decl_alarm" = xyes
11939 cat >>confdefs.h <<_ACEOF
11940 #define HAVE_DECL_ALARM $ac_have_decl
11944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11945 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
11946 if test ${gl_cv_var_stdin_large_offset+y}
11948 printf %s "(cached) " >&6
11950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11951 /* end confdefs.h. */
11956 #if defined __SL64 && defined __SCLE /* cygwin */
11957 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11958 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
11959 it is easier to do a version check than building a runtime test. */
11960 # include <cygwin/version.h>
11961 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11969 if ac_fn_c_try_link "$LINENO"
11971 gl_cv_var_stdin_large_offset=yes
11973 gl_cv_var_stdin_large_offset=no
11975 rm -f core conftest.err conftest.$ac_objext \
11976 conftest$ac_exeext conftest.$ac_ext
11978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11979 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
11987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11988 printf %s "checking for 64-bit off_t... " >&6; }
11989 if test ${gl_cv_type_off_t_64+y}
11991 printf %s "(cached) " >&6
11993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994 /* end confdefs.h. */
11995 #include <sys/types.h>
11996 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
12006 if ac_fn_c_try_compile "$LINENO"
12008 gl_cv_type_off_t_64=yes
12010 gl_cv_type_off_t_64=no
12012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
12016 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
12017 if test $gl_cv_type_off_t_64 = no; then
12018 WINDOWS_64_BIT_OFF_T=1
12020 WINDOWS_64_BIT_OFF_T=0
12022 WINDOWS_64_BIT_ST_SIZE=1
12025 WINDOWS_64_BIT_OFF_T=0
12026 WINDOWS_64_BIT_ST_SIZE=0
12046 if test $gl_cv_have_include_next = yes; then
12047 gl_cv_next_sys_types_h='<'sys/types.h'>'
12049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12050 printf %s "checking absolute name of <sys/types.h>... " >&6; }
12051 if test ${gl_cv_next_sys_types_h+y}
12053 printf %s "(cached) " >&6
12058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12059 /* end confdefs.h. */
12060 #include <sys/types.h>
12063 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12064 *) gl_absname_cpp="$ac_cpp" ;;
12069 gl_dirsep_regex='[/\\]'
12072 gl_dirsep_regex='\/'
12075 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12076 gl_header_literal_regex=`echo 'sys/types.h' \
12077 | sed -e "$gl_make_literal_regex_sed"`
12078 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12079 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12085 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12086 sed -n "$gl_absolute_header_sed"`
12088 gl_header=$gl_cv_absolute_sys_types_h
12089 gl_cv_next_sys_types_h='"'$gl_header'"'
12093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12094 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
12096 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12098 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12100 gl_next_as_first_directive='<'sys/types.h'>'
12102 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12103 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12105 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12117 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
12118 if test "x$ac_cv_have_decl_fseeko" = xyes
12125 cat >>confdefs.h <<_ACEOF
12126 #define HAVE_DECL_FSEEKO $ac_have_decl
12137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
12138 printf %s "checking for fseeko... " >&6; }
12139 if test ${gl_cv_func_fseeko+y}
12141 printf %s "(cached) " >&6
12144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12145 /* end confdefs.h. */
12151 fseeko (stdin, 0, 0);
12156 if ac_fn_c_try_link "$LINENO"
12158 gl_cv_func_fseeko=yes
12160 gl_cv_func_fseeko=no
12162 rm -f core conftest.err conftest.$ac_objext \
12163 conftest$ac_exeext conftest.$ac_ext
12166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
12167 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
12170 if test $ac_cv_have_decl_fseeko = no; then
12174 if test $gl_cv_func_fseeko = no; then
12177 if test $WINDOWS_64_BIT_OFF_T = 1; then
12180 if test $gl_cv_var_stdin_large_offset = no; then
12186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
12187 printf %s "checking whether fflush works on input streams... " >&6; }
12188 if test ${gl_cv_func_fflush_stdin+y}
12190 printf %s "(cached) " >&6
12192 echo hello world > conftest.txt
12193 if test "$cross_compiling" = yes
12195 gl_cv_func_fflush_stdin=cross
12197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12198 /* end confdefs.h. */
12202 # include <unistd.h>
12203 #else /* on Windows with MSVC */
12210 FILE *f = fopen ("conftest.txt", "r");
12217 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
12219 /* For deterministic results, ensure f read a bigger buffer. */
12220 if (lseek (fd, 0, SEEK_CUR) == 5)
12222 /* POSIX requires fflush-fseek to set file offset of fd. This fails
12223 on BSD systems and on mingw. */
12224 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
12226 if (lseek (fd, 0, SEEK_CUR) != 5)
12228 /* Verify behaviour of fflush after ungetc. See
12229 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
12230 /* Verify behaviour of fflush after a backup ungetc. This fails on
12235 if (fgetc (f) != c)
12237 /* Verify behaviour of fflush after a non-backup ungetc. This fails
12238 on glibc 2.8 and on BSD systems. */
12242 if (fgetc (f) != c)
12250 if ac_fn_c_try_run "$LINENO"
12252 gl_cv_func_fflush_stdin=yes
12254 gl_cv_func_fflush_stdin=no
12256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12257 conftest.$ac_objext conftest.beam conftest.$ac_ext
12263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
12264 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
12265 case $gl_cv_func_fflush_stdin in
12266 yes) gl_func_fflush_stdin=1 ;;
12267 no) gl_func_fflush_stdin=0 ;;
12268 *) gl_func_fflush_stdin='(-1)' ;;
12271 cat >>confdefs.h <<_ACEOF
12272 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
12276 if test $gl_cv_func_fflush_stdin != yes; then
12297 GNULIB_UTIMENSAT=0;
12311 REPLACE_FUTIMENS=0;
12317 REPLACE_UTIMENSAT=0;
12319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12320 printf %s "checking whether stat file-mode macros are broken... " >&6; }
12321 if test ${ac_cv_header_stat_broken+y}
12323 printf %s "(cached) " >&6
12325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12326 /* end confdefs.h. */
12327 #include <sys/types.h>
12328 #include <sys/stat.h>
12330 #if defined S_ISBLK && defined S_IFDIR
12331 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12334 #if defined S_ISBLK && defined S_IFCHR
12335 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12338 #if defined S_ISLNK && defined S_IFREG
12339 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12342 #if defined S_ISSOCK && defined S_IFREG
12343 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12347 if ac_fn_c_try_compile "$LINENO"
12349 ac_cv_header_stat_broken=no
12351 ac_cv_header_stat_broken=yes
12353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12356 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
12357 if test $ac_cv_header_stat_broken = yes; then
12359 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12377 if test $gl_cv_have_include_next = yes; then
12378 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12381 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
12382 if test ${gl_cv_next_sys_stat_h+y}
12384 printf %s "(cached) " >&6
12387 if test $ac_cv_header_sys_stat_h = yes; then
12392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12393 /* end confdefs.h. */
12394 #include <sys/stat.h>
12397 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12398 *) gl_absname_cpp="$ac_cpp" ;;
12403 gl_dirsep_regex='[/\\]'
12406 gl_dirsep_regex='\/'
12409 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12410 gl_header_literal_regex=`echo 'sys/stat.h' \
12411 | sed -e "$gl_make_literal_regex_sed"`
12412 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12413 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12419 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12420 sed -n "$gl_absolute_header_sed"`
12422 gl_header=$gl_cv_absolute_sys_stat_h
12423 gl_cv_next_sys_stat_h='"'$gl_header'"'
12425 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12431 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
12433 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12435 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12436 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12437 gl_next_as_first_directive='<'sys/stat.h'>'
12439 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12440 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12442 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12454 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
12456 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
12460 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12461 #include <sys/stat.h>
12463 if test "x$ac_cv_type_nlink_t" = xyes
12468 printf "%s\n" "#define nlink_t int" >>confdefs.h
12476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
12477 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
12478 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
12480 printf %s "(cached) " >&6
12482 rm -f conftest.sym conftest.file
12483 echo >conftest.file
12484 if test "$cross_compiling" = yes
12488 # Guess yes on glibc systems.
12489 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
12491 # If we don't know, assume the worst.
12492 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
12496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12497 /* end confdefs.h. */
12498 $ac_includes_default
12503 if (symlink ("conftest.file", "conftest.sym") != 0)
12505 /* Linux will dereference the symlink and fail, as required by
12506 POSIX. That is better in the sense that it means we will not
12507 have to compile and use the lstat wrapper. */
12508 return lstat ("conftest.sym/", &sbuf) == 0;
12514 if ac_fn_c_try_run "$LINENO"
12516 gl_cv_func_lstat_dereferences_slashed_symlink=yes
12518 gl_cv_func_lstat_dereferences_slashed_symlink=no
12520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12521 conftest.$ac_objext conftest.beam conftest.$ac_ext
12524 rm -f conftest.sym conftest.file
12527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
12528 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12529 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
12532 cat >>confdefs.h <<_ACEOF
12533 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
12543 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12544 if test "x$ac_cv_have_decl_ftello" = xyes
12551 cat >>confdefs.h <<_ACEOF
12552 #define HAVE_DECL_FTELLO $ac_have_decl
12564 if test $ac_cv_have_decl_ftello = no; then
12568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12569 printf %s "checking for ftello... " >&6; }
12570 if test ${gl_cv_func_ftello+y}
12572 printf %s "(cached) " >&6
12575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12576 /* end confdefs.h. */
12586 if ac_fn_c_try_link "$LINENO"
12588 gl_cv_func_ftello=yes
12590 gl_cv_func_ftello=no
12592 rm -f core conftest.err conftest.$ac_objext \
12593 conftest$ac_exeext conftest.$ac_ext
12596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12597 printf "%s\n" "$gl_cv_func_ftello" >&6; }
12598 if test $gl_cv_func_ftello = no; then
12601 if test $WINDOWS_64_BIT_OFF_T = 1; then
12604 if test $gl_cv_var_stdin_large_offset = no; then
12607 if test $REPLACE_FTELLO = 0; then
12609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12610 printf %s "checking whether ftello works... " >&6; }
12611 if test ${gl_cv_func_ftello_works+y}
12613 printf %s "(cached) " >&6
12617 # Guess no on Solaris.
12618 solaris*) gl_cv_func_ftello_works="guessing no" ;;
12619 # Guess yes otherwise.
12620 *) gl_cv_func_ftello_works="guessing yes" ;;
12622 if test "$cross_compiling" = yes
12626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12627 /* end confdefs.h. */
12630 #include <stdlib.h>
12631 #include <string.h>
12632 #define TESTFILE "conftest.tmp"
12638 /* Create a file with some contents. */
12639 fp = fopen (TESTFILE, "w");
12642 if (fwrite ("foogarsh", 1, 8, fp) < 8)
12647 /* The file's contents is now "foogarsh". */
12649 /* Try writing after reading to EOF. */
12650 fp = fopen (TESTFILE, "r+");
12653 if (fseek (fp, -1, SEEK_END))
12655 if (!(getc (fp) == 'h'))
12657 if (!(getc (fp) == EOF))
12659 if (!(ftell (fp) == 8))
12661 if (!(ftell (fp) == 8))
12663 if (!(putc ('!', fp) == '!'))
12665 if (!(ftell (fp) == 9))
12667 if (!(fclose (fp) == 0))
12669 fp = fopen (TESTFILE, "r");
12674 if (!(fread (buf, 1, 10, fp) == 9))
12676 if (!(memcmp (buf, "foogarsh!", 9) == 0))
12679 if (!(fclose (fp) == 0))
12682 /* The file's contents is now "foogarsh!". */
12687 if ac_fn_c_try_run "$LINENO"
12689 gl_cv_func_ftello_works=yes
12691 gl_cv_func_ftello_works=no
12693 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12694 conftest.$ac_objext conftest.beam conftest.$ac_ext
12699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12700 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
12701 case "$gl_cv_func_ftello_works" in
12706 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12716 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12717 if test ${gl_cv_func_getcwd_null+y}
12719 printf %s "(cached) " >&6
12721 if test "$cross_compiling" = yes
12724 # Guess yes on glibc systems.
12725 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
12726 # Guess yes on Cygwin.
12727 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
12728 # If we don't know, assume the worst.
12729 *) gl_cv_func_getcwd_null="guessing no";;
12733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12734 /* end confdefs.h. */
12736 # include <stdlib.h>
12738 # include <unistd.h>
12739 # else /* on Windows with MSVC */
12740 # include <direct.h>
12750 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12751 /* mingw cwd does not start with '/', but getcwd does allocate.
12752 However, mingw fails to honor non-zero size. */
12754 if (chdir ("/") != 0)
12758 char *f = getcwd (NULL, 0);
12774 if ac_fn_c_try_run "$LINENO"
12776 gl_cv_func_getcwd_null=yes
12778 gl_cv_func_getcwd_null=no
12780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12781 conftest.$ac_objext conftest.beam conftest.$ac_ext
12785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12786 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
12789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
12790 printf %s "checking for getcwd with POSIX signature... " >&6; }
12791 if test ${gl_cv_func_getcwd_posix_signature+y}
12793 printf %s "(cached) " >&6
12795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12796 /* end confdefs.h. */
12797 #include <unistd.h>
12805 char *getcwd (char *, size_t);
12812 if ac_fn_c_try_compile "$LINENO"
12814 gl_cv_func_getcwd_posix_signature=yes
12816 gl_cv_func_getcwd_posix_signature=no
12818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
12822 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
12826 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
12827 if test "x$ac_cv_have_decl_getdtablesize" = xyes
12834 cat >>confdefs.h <<_ACEOF
12835 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
12853 if test $gl_cv_have_include_next = yes; then
12854 gl_cv_next_getopt_h='<'getopt.h'>'
12856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12857 printf %s "checking absolute name of <getopt.h>... " >&6; }
12858 if test ${gl_cv_next_getopt_h+y}
12860 printf %s "(cached) " >&6
12863 if test $ac_cv_header_getopt_h = yes; then
12868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12869 /* end confdefs.h. */
12870 #include <getopt.h>
12873 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12874 *) gl_absname_cpp="$ac_cpp" ;;
12879 gl_dirsep_regex='[/\\]'
12882 gl_dirsep_regex='\/'
12885 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12886 gl_header_literal_regex=`echo 'getopt.h' \
12887 | sed -e "$gl_make_literal_regex_sed"`
12888 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12889 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12895 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12896 sed -n "$gl_absolute_header_sed"`
12898 gl_header=$gl_cv_absolute_getopt_h
12899 gl_cv_next_getopt_h='"'$gl_header'"'
12901 gl_cv_next_getopt_h='<'getopt.h'>'
12906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12907 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
12909 NEXT_GETOPT_H=$gl_cv_next_getopt_h
12911 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12912 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12913 gl_next_as_first_directive='<'getopt.h'>'
12915 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12916 gl_next_as_first_directive=$gl_cv_next_getopt_h
12918 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12923 if test $ac_cv_header_getopt_h = yes; then
12932 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12933 for ac_header in getopt.h
12935 ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12936 if test "x$ac_cv_header_getopt_h" = xyes
12938 cat >>confdefs.h <<_ACEOF
12939 #define HAVE_GETOPT_H 1
12943 gl_replace_getopt=yes
12949 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12950 for ac_func in getopt_long_only
12952 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12953 if test "x$ac_cv_func_getopt_long_only" = xyes
12955 cat >>confdefs.h <<_ACEOF
12956 #define HAVE_GETOPT_LONG_ONLY 1
12960 gl_replace_getopt=yes
12966 if test -z "$gl_replace_getopt"; then
12967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12968 printf %s "checking whether getopt is POSIX compatible... " >&6; }
12969 if test ${gl_cv_func_getopt_posix+y}
12971 printf %s "(cached) " >&6
12974 if test $cross_compiling = no; then
12975 if test "$cross_compiling" = yes
12977 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12978 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12979 as_fn_error $? "cannot run test program while cross compiling
12980 See \`config.log' for more details" "$LINENO" 5; }
12982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h. */
12985 #include <unistd.h>
12986 #include <stdlib.h>
12987 #include <string.h>
12992 static char program[] = "program";
12993 static char a[] = "-a";
12994 static char foo[] = "foo";
12995 static char bar[] = "bar";
12996 char *argv[] = { program, a, foo, bar, NULL };
12999 c = getopt (4, argv, "ab");
13002 c = getopt (4, argv, "ab");
13005 if (!(optind == 2))
13011 if ac_fn_c_try_run "$LINENO"
13013 gl_cv_func_getopt_posix=maybe
13015 gl_cv_func_getopt_posix=no
13017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13018 conftest.$ac_objext conftest.beam conftest.$ac_ext
13021 if test $gl_cv_func_getopt_posix = maybe; then
13022 if test "$cross_compiling" = yes
13024 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13025 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13026 as_fn_error $? "cannot run test program while cross compiling
13027 See \`config.log' for more details" "$LINENO" 5; }
13029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13030 /* end confdefs.h. */
13032 #include <unistd.h>
13033 #include <stdlib.h>
13034 #include <string.h>
13039 static char program[] = "program";
13040 static char donald[] = "donald";
13041 static char p[] = "-p";
13042 static char billy[] = "billy";
13043 static char duck[] = "duck";
13044 static char a[] = "-a";
13045 static char bar[] = "bar";
13046 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
13049 c = getopt (7, argv, "+abp:q:");
13052 if (!(strcmp (argv[0], "program") == 0))
13054 if (!(strcmp (argv[1], "donald") == 0))
13056 if (!(strcmp (argv[2], "-p") == 0))
13058 if (!(strcmp (argv[3], "billy") == 0))
13060 if (!(strcmp (argv[4], "duck") == 0))
13062 if (!(strcmp (argv[5], "-a") == 0))
13064 if (!(strcmp (argv[6], "bar") == 0))
13066 if (!(optind == 1))
13072 if ac_fn_c_try_run "$LINENO"
13074 gl_cv_func_getopt_posix=maybe
13076 gl_cv_func_getopt_posix=no
13078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13079 conftest.$ac_objext conftest.beam conftest.$ac_ext
13083 if test $gl_cv_func_getopt_posix = maybe; then
13084 if test "$cross_compiling" = yes
13086 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13087 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13088 as_fn_error $? "cannot run test program while cross compiling
13089 See \`config.log' for more details" "$LINENO" 5; }
13091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13092 /* end confdefs.h. */
13094 #include <unistd.h>
13095 #include <stdlib.h>
13096 #include <string.h>
13101 static char program[] = "program";
13102 static char ab[] = "-ab";
13103 char *argv[3] = { program, ab, NULL };
13104 if (getopt (2, argv, "ab:") != 'a')
13106 if (getopt (2, argv, "ab:") != '?')
13116 if ac_fn_c_try_run "$LINENO"
13118 gl_cv_func_getopt_posix=yes
13120 gl_cv_func_getopt_posix=no
13122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13123 conftest.$ac_objext conftest.beam conftest.$ac_ext
13129 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
13130 *) gl_cv_func_getopt_posix="guessing yes";;
13135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
13136 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
13137 case "$gl_cv_func_getopt_posix" in
13138 *no) gl_replace_getopt=yes ;;
13142 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
13144 printf %s "checking for working GNU getopt function... " >&6; }
13145 if test ${gl_cv_func_getopt_gnu+y}
13147 printf %s "(cached) " >&6
13149 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
13150 # optstring is necessary for programs like m4 that have POSIX-mandated
13151 # semantics for supporting options interspersed with files.
13152 # Also, since getopt_long is a GNU extension, we require optind=0.
13153 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
13154 # so take care to revert to the correct (non-)export state.
13155 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
13156 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
13157 xx) gl_had_POSIXLY_CORRECT=exported ;;
13158 x) gl_had_POSIXLY_CORRECT=yes ;;
13159 *) gl_had_POSIXLY_CORRECT= ;;
13162 export POSIXLY_CORRECT
13163 if test "$cross_compiling" = yes
13165 gl_cv_func_getopt_gnu="guessing no"
13168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13169 /* end confdefs.h. */
13170 #include <getopt.h>
13171 #include <stddef.h>
13172 #include <string.h>
13174 #include <stdlib.h>
13175 #if defined __MACH__ && defined __APPLE__
13176 /* Avoid a crash on Mac OS X. */
13177 #include <mach/mach.h>
13178 #include <mach/mach_error.h>
13179 #include <mach/thread_status.h>
13180 #include <mach/exception.h>
13181 #include <mach/task.h>
13182 #include <pthread.h>
13183 /* The exception port on which our thread listens. */
13184 static mach_port_t our_exception_port;
13185 /* The main function of the thread listening for exceptions of type
13188 mach_exception_thread (void *arg)
13190 /* Buffer for a message to be received. */
13192 mach_msg_header_t head;
13193 mach_msg_body_t msgh_body;
13196 mach_msg_return_t retval;
13197 /* Wait for a message on the exception port. */
13198 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
13199 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
13200 if (retval != MACH_MSG_SUCCESS)
13205 nocrash_init (void)
13207 mach_port_t self = mach_task_self ();
13208 /* Allocate a port on which the thread shall listen for exceptions. */
13209 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
13211 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
13212 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
13213 MACH_MSG_TYPE_MAKE_SEND)
13215 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
13217 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
13218 /* Create the thread listening on the exception port. */
13219 pthread_attr_t attr;
13221 if (pthread_attr_init (&attr) == 0
13222 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
13223 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
13224 pthread_attr_destroy (&attr);
13225 /* Replace the exception port info for these exceptions with our own.
13226 Note that we replace the exception port for the entire task, not only
13227 for a particular thread. This has the effect that when our exception
13228 port gets the message, the thread specific exception port has already
13229 been asked, and we don't need to bother about it.
13230 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
13231 task_set_exception_ports (self, mask, our_exception_port,
13232 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
13237 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13238 /* Avoid a crash on native Windows. */
13239 #define WIN32_LEAN_AND_MEAN
13240 #include <windows.h>
13241 #include <winerror.h>
13243 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
13245 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
13247 case EXCEPTION_ACCESS_VIOLATION:
13248 case EXCEPTION_IN_PAGE_ERROR:
13249 case EXCEPTION_STACK_OVERFLOW:
13250 case EXCEPTION_GUARD_PAGE:
13251 case EXCEPTION_PRIV_INSTRUCTION:
13252 case EXCEPTION_ILLEGAL_INSTRUCTION:
13253 case EXCEPTION_DATATYPE_MISALIGNMENT:
13254 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
13255 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
13258 return EXCEPTION_CONTINUE_SEARCH;
13261 nocrash_init (void)
13263 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
13266 /* Avoid a crash on POSIX systems. */
13267 #include <signal.h>
13268 /* A POSIX signal handler. */
13270 exception_handler (int sig)
13275 nocrash_init (void)
13278 signal (SIGSEGV, exception_handler);
13281 signal (SIGBUS, exception_handler);
13295 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
13296 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
13297 OSF/1 5.1, Solaris 10. */
13299 static char conftest[] = "conftest";
13300 static char plus[] = "-+";
13301 char *argv[3] = { conftest, plus, NULL };
13303 if (getopt (2, argv, "+a") != '?')
13306 /* This code succeeds on glibc 2.8, mingw,
13307 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
13308 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
13310 static char program[] = "program";
13311 static char p[] = "-p";
13312 static char foo[] = "foo";
13313 static char bar[] = "bar";
13314 char *argv[] = { program, p, foo, bar, NULL };
13317 if (getopt (4, argv, "p::") != 'p')
13319 else if (optarg != NULL)
13321 else if (getopt (4, argv, "p::") != -1)
13323 else if (optind != 2)
13326 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
13328 static char program[] = "program";
13329 static char foo[] = "foo";
13330 static char p[] = "-p";
13331 char *argv[] = { program, foo, p, NULL };
13333 if (getopt (3, argv, "-p") != 1)
13335 else if (getopt (3, argv, "-p") != 'p')
13338 /* This code fails on glibc 2.11. */
13340 static char program[] = "program";
13341 static char b[] = "-b";
13342 static char a[] = "-a";
13343 char *argv[] = { program, b, a, NULL };
13344 optind = opterr = 0;
13345 if (getopt (3, argv, "+:a:b") != 'b')
13347 else if (getopt (3, argv, "+:a:b") != ':')
13350 /* This code dumps core on glibc 2.14. */
13352 static char program[] = "program";
13353 static char w[] = "-W";
13354 static char dummy[] = "dummy";
13355 char *argv[] = { program, w, dummy, NULL };
13356 optind = opterr = 1;
13357 if (getopt (3, argv, "W;") != 'W')
13366 if ac_fn_c_try_run "$LINENO"
13368 gl_cv_func_getopt_gnu=yes
13370 gl_cv_func_getopt_gnu=no
13372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13373 conftest.$ac_objext conftest.beam conftest.$ac_ext
13376 case $gl_had_POSIXLY_CORRECT in
13378 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
13379 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
13383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
13384 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
13385 if test "$gl_cv_func_getopt_gnu" != yes; then
13386 gl_replace_getopt=yes
13388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
13389 printf %s "checking for working GNU getopt_long function... " >&6; }
13390 if test ${gl_cv_func_getopt_long_gnu+y}
13392 printf %s "(cached) " >&6
13394 if test "$cross_compiling" = yes
13397 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
13398 *) gl_cv_func_getopt_long_gnu="guessing yes";;
13402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13403 /* end confdefs.h. */
13404 #include <getopt.h>
13405 #include <stddef.h>
13406 #include <string.h>
13411 static const struct option long_options[] =
13413 { "xtremely-",no_argument, NULL, 1003 },
13414 { "xtra", no_argument, NULL, 1001 },
13415 { "xtreme", no_argument, NULL, 1002 },
13416 { "xtremely", no_argument, NULL, 1003 },
13417 { NULL, 0, NULL, 0 }
13419 /* This code fails on OpenBSD 5.0. */
13421 static char program[] = "program";
13422 static char xtremel[] = "--xtremel";
13423 char *argv[] = { program, xtremel, NULL };
13425 optind = 1; opterr = 0;
13426 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
13435 if ac_fn_c_try_run "$LINENO"
13437 gl_cv_func_getopt_long_gnu=yes
13439 gl_cv_func_getopt_long_gnu=no
13441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13442 conftest.$ac_objext conftest.beam conftest.$ac_ext
13447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
13448 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
13449 case "$gl_cv_func_getopt_long_gnu" in
13451 *) gl_replace_getopt=yes ;;
13462 if test -n "$gl_replace_getopt"; then
13466 if test $REPLACE_GETOPT = 1; then
13470 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
13476 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
13477 if test "x$ac_cv_have_decl_getenv" = xyes
13484 cat >>confdefs.h <<_ACEOF
13485 #define HAVE_DECL_GETENV $ac_have_decl
13493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13494 printf %s "checking for C/C++ restrict keyword... " >&6; }
13495 if test ${ac_cv_c_restrict+y}
13497 printf %s "(cached) " >&6
13499 ac_cv_c_restrict=no
13500 # The order here caters to the fact that C++ does not require restrict.
13501 for ac_kw in __restrict __restrict__ _Restrict restrict; do
13502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13503 /* end confdefs.h. */
13504 typedef int *int_ptr;
13505 int foo (int_ptr $ac_kw ip) { return ip[0]; }
13506 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
13507 int bar (int ip[$ac_kw]) { return ip[0]; }
13515 return foo (t) + bar (t);
13521 if ac_fn_c_try_compile "$LINENO"
13523 ac_cv_c_restrict=$ac_kw
13525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13526 test "$ac_cv_c_restrict" != no && break
13530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
13531 printf "%s\n" "$ac_cv_c_restrict" >&6; }
13533 case $ac_cv_c_restrict in
13535 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
13537 *) cat >>confdefs.h <<_ACEOF
13538 #define restrict $ac_cv_c_restrict
13544 GNULIB_GETTIMEOFDAY=0;
13545 HAVE_GETTIMEOFDAY=1;
13546 HAVE_STRUCT_TIMEVAL=1;
13549 REPLACE_GETTIMEOFDAY=0;
13550 REPLACE_STRUCT_TIMEVAL=0;
13567 if test $gl_cv_have_include_next = yes; then
13568 gl_cv_next_sys_time_h='<'sys/time.h'>'
13570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13571 printf %s "checking absolute name of <sys/time.h>... " >&6; }
13572 if test ${gl_cv_next_sys_time_h+y}
13574 printf %s "(cached) " >&6
13577 if test $ac_cv_header_sys_time_h = yes; then
13582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13583 /* end confdefs.h. */
13584 #include <sys/time.h>
13587 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13588 *) gl_absname_cpp="$ac_cpp" ;;
13593 gl_dirsep_regex='[/\\]'
13596 gl_dirsep_regex='\/'
13599 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13600 gl_header_literal_regex=`echo 'sys/time.h' \
13601 | sed -e "$gl_make_literal_regex_sed"`
13602 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13603 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13609 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13610 sed -n "$gl_absolute_header_sed"`
13612 gl_header=$gl_cv_absolute_sys_time_h
13613 gl_cv_next_sys_time_h='"'$gl_header'"'
13615 gl_cv_next_sys_time_h='<'sys/time.h'>'
13620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13621 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
13623 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13625 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13626 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13627 gl_next_as_first_directive='<'sys/time.h'>'
13629 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13630 gl_next_as_first_directive=$gl_cv_next_sys_time_h
13632 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13638 if test $ac_cv_header_sys_time_h != yes; then
13646 if test $ac_cv_header_sys_socket_h != yes; then
13647 for ac_header in winsock2.h
13649 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13650 if test "x$ac_cv_header_winsock2_h" = xyes
13652 cat >>confdefs.h <<_ACEOF
13653 #define HAVE_WINSOCK2_H 1
13660 if test "$ac_cv_header_winsock2_h" = yes; then
13662 UNISTD_H_HAVE_WINSOCK2_H=1
13663 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13670 printf %s "checking for struct timeval... " >&6; }
13671 if test ${gl_cv_sys_struct_timeval+y}
13673 printf %s "(cached) " >&6
13675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13676 /* end confdefs.h. */
13677 #if HAVE_SYS_TIME_H
13678 #include <sys/time.h>
13681 #if HAVE_WINSOCK2_H
13682 # include <winsock2.h>
13688 static struct timeval x; x.tv_sec = x.tv_usec;
13693 if ac_fn_c_try_compile "$LINENO"
13695 gl_cv_sys_struct_timeval=yes
13697 gl_cv_sys_struct_timeval=no
13699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13703 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
13704 if test $gl_cv_sys_struct_timeval != yes; then
13705 HAVE_STRUCT_TIMEVAL=0
13707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13708 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13709 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
13711 printf %s "(cached) " >&6
13713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13714 /* end confdefs.h. */
13715 #if HAVE_SYS_TIME_H
13716 #include <sys/time.h>
13719 #if HAVE_WINSOCK2_H
13720 # include <winsock2.h>
13726 static struct timeval x;
13727 typedef int verify_tv_sec_type[
13728 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13735 if ac_fn_c_try_compile "$LINENO"
13737 gl_cv_sys_struct_timeval_tv_sec=yes
13739 gl_cv_sys_struct_timeval_tv_sec=no
13741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13745 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13746 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13747 REPLACE_STRUCT_TIMEVAL=1
13757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
13758 printf %s "checking where to find the exponent in a 'float'... " >&6; }
13759 if test ${gl_cv_cc_float_expbit0+y}
13761 printf %s "(cached) " >&6
13764 if test "$cross_compiling" = yes
13766 gl_cv_cc_float_expbit0="word 0 bit 23"
13768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13769 /* end confdefs.h. */
13772 #include <stddef.h>
13774 #include <string.h>
13776 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13777 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13778 static unsigned int ored_words[NWORDS];
13779 static unsigned int anded_words[NWORDS];
13780 static void add_to_ored_words (float x)
13784 /* Clear it first, in case
13785 sizeof (float) < sizeof (memory_float). */
13786 memset (&m, 0, sizeof (memory_float));
13788 for (i = 0; i < NWORDS; i++)
13790 ored_words[i] |= m.word[i];
13791 anded_words[i] &= m.word[i];
13797 FILE *fp = fopen ("conftest.out", "w");
13800 for (j = 0; j < NWORDS; j++)
13801 anded_words[j] = ~ (unsigned int) 0;
13802 add_to_ored_words (0.25f);
13803 add_to_ored_words (0.5f);
13804 add_to_ored_words (1.0f);
13805 add_to_ored_words (2.0f);
13806 add_to_ored_words (4.0f);
13807 /* Remove bits that are common (e.g. if representation of the first mantissa
13808 bit is explicit). */
13809 for (j = 0; j < NWORDS; j++)
13810 ored_words[j] &= ~anded_words[j];
13811 /* Now find the nonzero word. */
13812 for (j = 0; j < NWORDS; j++)
13813 if (ored_words[j] != 0)
13818 for (i = j + 1; i < NWORDS; i++)
13819 if (ored_words[i] != 0)
13821 fprintf (fp, "unknown");
13822 return (fclose (fp) != 0);
13825 if ((ored_words[j] >> i) & 1)
13827 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13828 return (fclose (fp) != 0);
13831 fprintf (fp, "unknown");
13832 return (fclose (fp) != 0);
13836 if ac_fn_c_try_run "$LINENO"
13838 gl_cv_cc_float_expbit0=`cat conftest.out`
13840 gl_cv_cc_float_expbit0="unknown"
13842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13843 conftest.$ac_objext conftest.beam conftest.$ac_ext
13849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13850 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
13851 case "$gl_cv_cc_float_expbit0" in
13853 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13854 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13856 cat >>confdefs.h <<_ACEOF
13857 #define FLT_EXPBIT0_WORD $word
13861 cat >>confdefs.h <<_ACEOF
13862 #define FLT_EXPBIT0_BIT $bit
13869 if test "X$prefix" = "XNONE"; then
13870 acl_final_prefix="$ac_default_prefix"
13872 acl_final_prefix="$prefix"
13874 if test "X$exec_prefix" = "XNONE"; then
13875 acl_final_exec_prefix='${prefix}'
13877 acl_final_exec_prefix="$exec_prefix"
13879 acl_save_prefix="$prefix"
13880 prefix="$acl_final_prefix"
13881 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13882 prefix="$acl_save_prefix"
13886 # Check whether --with-gnu-ld was given.
13887 if test ${with_gnu_ld+y}
13889 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13894 # Prepare PATH_SEPARATOR.
13895 # The user is always right.
13896 if test "${PATH_SEPARATOR+set}" != set; then
13897 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13898 # contains only /bin. Note that ksh looks also at the FPATH variable,
13899 # so we have to set that as well for the test.
13901 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13902 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13903 || PATH_SEPARATOR=';'
13908 if test "$GCC" = yes; then
13909 # Check if gcc -print-prog-name=ld gives a path.
13910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13911 printf %s "checking for ld used by $CC... " >&6; }
13914 # gcc leaves a trailing carriage return which upsets mingw
13915 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13917 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13920 # Accept absolute paths.
13922 re_direlt='/[^/][^/]*/\.\./'
13923 # Canonicalize the pathname of ld
13924 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
13925 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
13926 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
13928 test -z "$LD" && LD="$ac_prog"
13931 # If it fails, then pretend we aren't using GCC.
13935 # If it is relative, then search for the first ld in PATH.
13936 with_gnu_ld=unknown
13939 elif test "$with_gnu_ld" = yes; then
13940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13941 printf %s "checking for GNU ld... " >&6; }
13943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13944 printf %s "checking for non-GNU ld... " >&6; }
13946 if test ${acl_cv_path_LD+y}
13948 printf %s "(cached) " >&6
13950 if test -z "$LD"; then
13951 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13952 for ac_dir in $PATH; do
13953 IFS="$acl_save_ifs"
13954 test -z "$ac_dir" && ac_dir=.
13955 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13956 acl_cv_path_LD="$ac_dir/$ac_prog"
13957 # Check to see if the program is GNU ld. I'd rather use --version,
13958 # but apparently some variants of GNU ld only accept -v.
13959 # Break only if it was the GNU/non-GNU ld that we prefer.
13960 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
13961 *GNU* | *'with BFD'*)
13962 test "$with_gnu_ld" != no && break
13965 test "$with_gnu_ld" != yes && break
13970 IFS="$acl_save_ifs"
13972 acl_cv_path_LD="$LD" # Let the user override the test with a path.
13976 LD="$acl_cv_path_LD"
13977 if test -n "$LD"; then
13978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13979 printf "%s\n" "$LD" >&6; }
13981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13982 printf "%s\n" "no" >&6; }
13984 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13986 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
13987 if test ${acl_cv_prog_gnu_ld+y}
13989 printf %s "(cached) " >&6
13991 # I'd rather use --version here, but apparently some GNU lds only accept -v.
13992 case `$LD -v 2>&1 </dev/null` in
13993 *GNU* | *'with BFD'*)
13994 acl_cv_prog_gnu_ld=yes
13997 acl_cv_prog_gnu_ld=no
14001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
14002 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
14003 with_gnu_ld=$acl_cv_prog_gnu_ld
14008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
14009 printf %s "checking for shared library run path origin... " >&6; }
14010 if test ${acl_cv_rpath+y}
14012 printf %s "(cached) " >&6
14015 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
14016 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
14018 rm -f ./conftest.sh
14022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
14023 printf "%s\n" "$acl_cv_rpath" >&6; }
14025 acl_libext="$acl_cv_libext"
14026 acl_shlibext="$acl_cv_shlibext"
14027 acl_libname_spec="$acl_cv_libname_spec"
14028 acl_library_names_spec="$acl_cv_library_names_spec"
14029 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
14030 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
14031 acl_hardcode_direct="$acl_cv_hardcode_direct"
14032 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
14033 # Check whether --enable-rpath was given.
14034 if test ${enable_rpath+y}
14036 enableval=$enable_rpath; :
14048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
14049 printf %s "checking for 64-bit host... " >&6; }
14050 if test ${gl_cv_solaris_64bit+y}
14052 printf %s "(cached) " >&6
14054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14055 /* end confdefs.h. */
14062 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14063 $EGREP "sixtyfour bits" >/dev/null 2>&1
14065 gl_cv_solaris_64bit=yes
14067 gl_cv_solaris_64bit=no
14073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
14074 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
14075 if test $gl_cv_solaris_64bit = yes; then
14076 acl_libdirstem=lib/64
14077 case "$host_cpu" in
14078 sparc*) acl_libdirstem2=lib/sparcv9 ;;
14079 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
14084 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
14085 if test -n "$searchpath"; then
14086 acl_save_IFS="${IFS= }"; IFS=":"
14087 for searchdir in $searchpath; do
14088 if test -d "$searchdir"; then
14089 case "$searchdir" in
14090 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
14092 # Better ignore directories of this form. They are misleading.
14094 *) searchdir=`cd "$searchdir" && pwd`
14095 case "$searchdir" in
14096 */lib64 ) acl_libdirstem=lib64 ;;
14101 IFS="$acl_save_IFS"
14105 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
14109 gl_threads_api=none
14114 if test "$gl_use_threads" != no; then
14115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14116 printf %s "checking whether imported symbols can be declared weak... " >&6; }
14117 if test ${gl_cv_have_weak+y}
14119 printf %s "(cached) " >&6
14122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14123 /* end confdefs.h. */
14124 extern void xyzzy ();
14134 if ac_fn_c_try_link "$LINENO"
14136 gl_cv_have_weak=maybe
14138 rm -f core conftest.err conftest.$ac_objext \
14139 conftest$ac_exeext conftest.$ac_ext
14140 if test $gl_cv_have_weak = maybe; then
14141 if test "$cross_compiling" = yes
14143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14144 /* end confdefs.h. */
14146 Extensible Linking Format
14150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14151 $EGREP "Extensible Linking Format" >/dev/null 2>&1
14153 gl_cv_have_weak="guessing yes"
14155 gl_cv_have_weak="guessing no"
14161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14162 /* end confdefs.h. */
14168 return (fputs == NULL);
14171 if ac_fn_c_try_run "$LINENO"
14173 gl_cv_have_weak=yes
14177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14178 conftest.$ac_objext conftest.beam conftest.$ac_ext
14184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14185 printf "%s\n" "$gl_cv_have_weak" >&6; }
14186 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
14187 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14188 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
14189 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14190 if test "x$ac_cv_header_pthread_h" = xyes
14192 gl_have_pthread_h=yes
14194 gl_have_pthread_h=no
14197 if test "$gl_have_pthread_h" = yes; then
14198 # Other possible tests:
14199 # -lpthreads (FSU threads, PCthreads)
14202 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14203 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14204 # the second one only in libpthread, and lock.c needs it.
14206 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14207 # needs -pthread for some reason. See:
14208 # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
14210 for gl_pthread in '' '-pthread'; do
14211 LIBS="$LIBS $gl_pthread"
14212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14213 /* end confdefs.h. */
14214 #include <pthread.h>
14216 pthread_mutexattr_t ma;
14221 pthread_mutex_lock (&m);
14222 pthread_mutexattr_init (&ma);
14227 if ac_fn_c_try_link "$LINENO"
14229 gl_have_pthread=yes
14230 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
14231 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
14233 rm -f core conftest.err conftest.$ac_objext \
14234 conftest$ac_exeext conftest.$ac_ext
14236 test -n "$gl_have_pthread" && break
14239 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14240 # since it is defined as a macro on OSF/1.)
14241 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
14242 # The program links fine without libpthread. But it may actually
14243 # need to link with libpthread in order to create multiple threads.
14244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14245 printf %s "checking for pthread_kill in -lpthread... " >&6; }
14246 if test ${ac_cv_lib_pthread_pthread_kill+y}
14248 printf %s "(cached) " >&6
14250 ac_check_lib_save_LIBS=$LIBS
14251 LIBS="-lpthread $LIBS"
14252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14253 /* end confdefs.h. */
14255 /* Override any GCC internal prototype to avoid an error.
14256 Use char because int might match the return type of a GCC
14257 builtin and then its argument prototype would still apply. */
14261 char pthread_kill ();
14265 return pthread_kill ();
14270 if ac_fn_c_try_link "$LINENO"
14272 ac_cv_lib_pthread_pthread_kill=yes
14274 ac_cv_lib_pthread_pthread_kill=no
14276 rm -f core conftest.err conftest.$ac_objext \
14277 conftest$ac_exeext conftest.$ac_ext
14278 LIBS=$ac_check_lib_save_LIBS
14280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14281 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
14282 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
14284 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14285 # On Solaris and HP-UX, most pthread functions exist also in libc.
14286 # Therefore pthread_in_use() needs to actually try to create a
14287 # thread: pthread_create from libc will fail, whereas
14288 # pthread_create will actually create a thread.
14292 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14298 elif test -z "$gl_have_pthread"; then
14299 # Some library is needed. Try libpthread and libc_r.
14300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14301 printf %s "checking for pthread_kill in -lpthread... " >&6; }
14302 if test ${ac_cv_lib_pthread_pthread_kill+y}
14304 printf %s "(cached) " >&6
14306 ac_check_lib_save_LIBS=$LIBS
14307 LIBS="-lpthread $LIBS"
14308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14309 /* end confdefs.h. */
14311 /* Override any GCC internal prototype to avoid an error.
14312 Use char because int might match the return type of a GCC
14313 builtin and then its argument prototype would still apply. */
14317 char pthread_kill ();
14321 return pthread_kill ();
14326 if ac_fn_c_try_link "$LINENO"
14328 ac_cv_lib_pthread_pthread_kill=yes
14330 ac_cv_lib_pthread_pthread_kill=no
14332 rm -f core conftest.err conftest.$ac_objext \
14333 conftest$ac_exeext conftest.$ac_ext
14334 LIBS=$ac_check_lib_save_LIBS
14336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14337 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
14338 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
14340 gl_have_pthread=yes
14341 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
14342 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14345 if test -z "$gl_have_pthread"; then
14347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14348 printf %s "checking for pthread_kill in -lc_r... " >&6; }
14349 if test ${ac_cv_lib_c_r_pthread_kill+y}
14351 printf %s "(cached) " >&6
14353 ac_check_lib_save_LIBS=$LIBS
14355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14356 /* end confdefs.h. */
14358 /* Override any GCC internal prototype to avoid an error.
14359 Use char because int might match the return type of a GCC
14360 builtin and then its argument prototype would still apply. */
14364 char pthread_kill ();
14368 return pthread_kill ();
14373 if ac_fn_c_try_link "$LINENO"
14375 ac_cv_lib_c_r_pthread_kill=yes
14377 ac_cv_lib_c_r_pthread_kill=no
14379 rm -f core conftest.err conftest.$ac_objext \
14380 conftest$ac_exeext conftest.$ac_ext
14381 LIBS=$ac_check_lib_save_LIBS
14383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14384 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
14385 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
14387 gl_have_pthread=yes
14388 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
14389 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
14394 if test -n "$gl_have_pthread"; then
14395 gl_threads_api=posix
14397 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
14399 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14400 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14402 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14411 if test -z "$gl_have_pthread"; then
14412 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
14413 gl_have_solaristhread=
14414 gl_save_LIBS="$LIBS"
14415 LIBS="$LIBS -lthread"
14416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14417 /* end confdefs.h. */
14419 #include <thread.h>
14430 if ac_fn_c_try_link "$LINENO"
14432 gl_have_solaristhread=yes
14434 rm -f core conftest.err conftest.$ac_objext \
14435 conftest$ac_exeext conftest.$ac_ext
14436 LIBS="$gl_save_LIBS"
14437 if test -n "$gl_have_solaristhread"; then
14438 gl_threads_api=solaris
14440 LTLIBTHREAD=-lthread
14441 LIBMULTITHREAD="$LIBTHREAD"
14442 LTLIBMULTITHREAD="$LTLIBTHREAD"
14444 printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
14446 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14448 printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
14456 if test "$gl_use_threads" = pth; then
14457 gl_save_CPPFLAGS="$CPPFLAGS"
14463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
14464 printf %s "checking how to link with libpth... " >&6; }
14465 if test ${ac_cv_libpth_libs+y}
14467 printf %s "(cached) " >&6
14479 acl_save_prefix="$prefix"
14480 prefix="$acl_final_prefix"
14481 acl_save_exec_prefix="$exec_prefix"
14482 exec_prefix="$acl_final_exec_prefix"
14484 eval additional_includedir=\"$includedir\"
14485 eval additional_libdir=\"$libdir\"
14487 exec_prefix="$acl_save_exec_prefix"
14488 prefix="$acl_save_prefix"
14491 # Check whether --with-libpth-prefix was given.
14492 if test ${with_libpth_prefix+y}
14494 withval=$with_libpth_prefix;
14495 if test "X$withval" = "Xno"; then
14498 if test "X$withval" = "X"; then
14500 acl_save_prefix="$prefix"
14501 prefix="$acl_final_prefix"
14502 acl_save_exec_prefix="$exec_prefix"
14503 exec_prefix="$acl_final_exec_prefix"
14505 eval additional_includedir=\"$includedir\"
14506 eval additional_libdir=\"$libdir\"
14508 exec_prefix="$acl_save_exec_prefix"
14509 prefix="$acl_save_prefix"
14512 additional_includedir="$withval/include"
14513 additional_libdir="$withval/$acl_libdirstem"
14514 if test "$acl_libdirstem2" != "$acl_libdirstem" \
14515 && ! test -d "$withval/$acl_libdirstem"; then
14516 additional_libdir="$withval/$acl_libdirstem2"
14530 names_already_handled=
14531 names_next_round='pth '
14532 while test -n "$names_next_round"; do
14533 names_this_round="$names_next_round"
14535 for name in $names_this_round; do
14537 for n in $names_already_handled; do
14538 if test "$n" = "$name"; then
14539 already_handled=yes
14543 if test -z "$already_handled"; then
14544 names_already_handled="$names_already_handled $name"
14545 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14546 eval value=\"\$HAVE_LIB$uppername\"
14547 if test -n "$value"; then
14548 if test "$value" = yes; then
14549 eval value=\"\$LIB$uppername\"
14550 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
14551 eval value=\"\$LTLIB$uppername\"
14552 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
14561 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
14562 if test -n "$acl_shlibext"; then
14563 shrext=".$acl_shlibext" # typically: shrext=.so
14567 if test $use_additional = yes; then
14568 dir="$additional_libdir"
14569 if test -n "$acl_shlibext"; then
14570 if test -f "$dir/$libname$shrext"; then
14572 found_so="$dir/$libname$shrext"
14574 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14575 ver=`(cd "$dir" && \
14576 for f in "$libname$shrext".*; do echo "$f"; done \
14577 | sed -e "s,^$libname$shrext\\\\.,," \
14578 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14579 | sed 1q ) 2>/dev/null`
14580 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14582 found_so="$dir/$libname$shrext.$ver"
14585 eval library_names=\"$acl_library_names_spec\"
14586 for f in $library_names; do
14587 if test -f "$dir/$f"; then
14596 if test "X$found_dir" = "X"; then
14597 if test -f "$dir/$libname.$acl_libext"; then
14599 found_a="$dir/$libname.$acl_libext"
14602 if test "X$found_dir" != "X"; then
14603 if test -f "$dir/$libname.la"; then
14604 found_la="$dir/$libname.la"
14608 if test "X$found_dir" = "X"; then
14609 for x in $LDFLAGS $LTLIBPTH; do
14611 acl_save_prefix="$prefix"
14612 prefix="$acl_final_prefix"
14613 acl_save_exec_prefix="$exec_prefix"
14614 exec_prefix="$acl_final_exec_prefix"
14616 exec_prefix="$acl_save_exec_prefix"
14617 prefix="$acl_save_prefix"
14621 dir=`echo "X$x" | sed -e 's/^X-L//'`
14622 if test -n "$acl_shlibext"; then
14623 if test -f "$dir/$libname$shrext"; then
14625 found_so="$dir/$libname$shrext"
14627 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14628 ver=`(cd "$dir" && \
14629 for f in "$libname$shrext".*; do echo "$f"; done \
14630 | sed -e "s,^$libname$shrext\\\\.,," \
14631 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14632 | sed 1q ) 2>/dev/null`
14633 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14635 found_so="$dir/$libname$shrext.$ver"
14638 eval library_names=\"$acl_library_names_spec\"
14639 for f in $library_names; do
14640 if test -f "$dir/$f"; then
14649 if test "X$found_dir" = "X"; then
14650 if test -f "$dir/$libname.$acl_libext"; then
14652 found_a="$dir/$libname.$acl_libext"
14655 if test "X$found_dir" != "X"; then
14656 if test -f "$dir/$libname.la"; then
14657 found_la="$dir/$libname.la"
14662 if test "X$found_dir" != "X"; then
14667 if test "X$found_dir" != "X"; then
14668 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
14669 if test "X$found_so" != "X"; then
14670 if test "$enable_rpath" = no \
14671 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14672 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14673 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14676 for x in $ltrpathdirs; do
14677 if test "X$x" = "X$found_dir"; then
14682 if test -z "$haveit"; then
14683 ltrpathdirs="$ltrpathdirs $found_dir"
14685 if test "$acl_hardcode_direct" = yes; then
14686 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14688 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14689 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14691 for x in $rpathdirs; do
14692 if test "X$x" = "X$found_dir"; then
14697 if test -z "$haveit"; then
14698 rpathdirs="$rpathdirs $found_dir"
14702 for x in $LDFLAGS $LIBPTH; do
14704 acl_save_prefix="$prefix"
14705 prefix="$acl_final_prefix"
14706 acl_save_exec_prefix="$exec_prefix"
14707 exec_prefix="$acl_final_exec_prefix"
14709 exec_prefix="$acl_save_exec_prefix"
14710 prefix="$acl_save_prefix"
14712 if test "X$x" = "X-L$found_dir"; then
14717 if test -z "$haveit"; then
14718 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
14720 if test "$acl_hardcode_minus_L" != no; then
14721 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14723 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14729 if test "X$found_a" != "X"; then
14730 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
14732 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
14735 additional_includedir=
14736 case "$found_dir" in
14737 */$acl_libdirstem | */$acl_libdirstem/)
14738 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14739 if test "$name" = 'pth'; then
14740 LIBPTH_PREFIX="$basedir"
14742 additional_includedir="$basedir/include"
14744 */$acl_libdirstem2 | */$acl_libdirstem2/)
14745 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14746 if test "$name" = 'pth'; then
14747 LIBPTH_PREFIX="$basedir"
14749 additional_includedir="$basedir/include"
14752 if test "X$additional_includedir" != "X"; then
14753 if test "X$additional_includedir" != "X/usr/include"; then
14755 if test "X$additional_includedir" = "X/usr/local/include"; then
14756 if test -n "$GCC"; then
14758 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14762 if test -z "$haveit"; then
14763 for x in $CPPFLAGS $INCPTH; do
14765 acl_save_prefix="$prefix"
14766 prefix="$acl_final_prefix"
14767 acl_save_exec_prefix="$exec_prefix"
14768 exec_prefix="$acl_final_exec_prefix"
14770 exec_prefix="$acl_save_exec_prefix"
14771 prefix="$acl_save_prefix"
14773 if test "X$x" = "X-I$additional_includedir"; then
14778 if test -z "$haveit"; then
14779 if test -d "$additional_includedir"; then
14780 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
14786 if test -n "$found_la"; then
14787 save_libdir="$libdir"
14788 case "$found_la" in
14789 */* | *\\*) . "$found_la" ;;
14790 *) . "./$found_la" ;;
14792 libdir="$save_libdir"
14793 for dep in $dependency_libs; do
14796 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14797 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14798 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14800 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14801 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14802 if test -n "$GCC"; then
14804 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14808 if test -z "$haveit"; then
14810 for x in $LDFLAGS $LIBPTH; do
14812 acl_save_prefix="$prefix"
14813 prefix="$acl_final_prefix"
14814 acl_save_exec_prefix="$exec_prefix"
14815 exec_prefix="$acl_final_exec_prefix"
14817 exec_prefix="$acl_save_exec_prefix"
14818 prefix="$acl_save_prefix"
14820 if test "X$x" = "X-L$additional_libdir"; then
14825 if test -z "$haveit"; then
14826 if test -d "$additional_libdir"; then
14827 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
14831 for x in $LDFLAGS $LTLIBPTH; do
14833 acl_save_prefix="$prefix"
14834 prefix="$acl_final_prefix"
14835 acl_save_exec_prefix="$exec_prefix"
14836 exec_prefix="$acl_final_exec_prefix"
14838 exec_prefix="$acl_save_exec_prefix"
14839 prefix="$acl_save_prefix"
14841 if test "X$x" = "X-L$additional_libdir"; then
14846 if test -z "$haveit"; then
14847 if test -d "$additional_libdir"; then
14848 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
14855 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14856 if test "$enable_rpath" != no; then
14858 for x in $rpathdirs; do
14859 if test "X$x" = "X$dir"; then
14864 if test -z "$haveit"; then
14865 rpathdirs="$rpathdirs $dir"
14868 for x in $ltrpathdirs; do
14869 if test "X$x" = "X$dir"; then
14874 if test -z "$haveit"; then
14875 ltrpathdirs="$ltrpathdirs $dir"
14880 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14883 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14886 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
14887 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14893 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14894 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14900 if test "X$rpathdirs" != "X"; then
14901 if test -n "$acl_hardcode_libdir_separator"; then
14903 for found_dir in $rpathdirs; do
14904 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14906 acl_save_libdir="$libdir"
14908 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14909 libdir="$acl_save_libdir"
14910 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14912 for found_dir in $rpathdirs; do
14913 acl_save_libdir="$libdir"
14914 libdir="$found_dir"
14915 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14916 libdir="$acl_save_libdir"
14917 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14921 if test "X$ltrpathdirs" != "X"; then
14922 for found_dir in $ltrpathdirs; do
14923 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14932 ac_cv_libpth_libs="$LIBPTH"
14933 ac_cv_libpth_ltlibs="$LTLIBPTH"
14934 ac_cv_libpth_cppflags="$INCPTH"
14935 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14939 printf "%s\n" "$ac_cv_libpth_libs" >&6; }
14940 LIBPTH="$ac_cv_libpth_libs"
14941 LTLIBPTH="$ac_cv_libpth_ltlibs"
14942 INCPTH="$ac_cv_libpth_cppflags"
14943 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14945 for element in $INCPTH; do
14947 for x in $CPPFLAGS; do
14949 acl_save_prefix="$prefix"
14950 prefix="$acl_final_prefix"
14951 acl_save_exec_prefix="$exec_prefix"
14952 exec_prefix="$acl_final_exec_prefix"
14954 exec_prefix="$acl_save_exec_prefix"
14955 prefix="$acl_save_prefix"
14957 if test "X$x" = "X$element"; then
14962 if test -z "$haveit"; then
14963 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14975 gl_save_LIBS="$LIBS"
14976 LIBS="$LIBS $LIBPTH"
14977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14978 /* end confdefs.h. */
14988 if ac_fn_c_try_link "$LINENO"
14992 rm -f core conftest.err conftest.$ac_objext \
14993 conftest$ac_exeext conftest.$ac_ext
14994 LIBS="$gl_save_LIBS"
14995 if test -n "$gl_have_pth"; then
14997 LIBTHREAD="$LIBPTH"
14998 LTLIBTHREAD="$LTLIBPTH"
14999 LIBMULTITHREAD="$LIBTHREAD"
15000 LTLIBMULTITHREAD="$LTLIBTHREAD"
15002 printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
15004 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15005 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15007 printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
15014 CPPFLAGS="$gl_save_CPPFLAGS"
15017 if test -z "$gl_have_pthread"; then
15018 case "$gl_use_threads" in
15019 yes | windows | win32) # The 'win32' is for backward compatibility.
15020 if { case "$host_os" in
15025 gl_threads_api=windows
15027 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15035 printf %s "checking for multithread API to use... " >&6; }
15036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15037 printf "%s\n" "$gl_threads_api" >&6; }
15049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
15050 printf %s "checking for a sed that does not truncate output... " >&6; }
15051 if test ${ac_cv_path_SED+y}
15053 printf %s "(cached) " >&6
15055 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15056 for ac_i in 1 2 3 4 5 6 7; do
15057 ac_script="$ac_script$as_nl$ac_script"
15059 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15060 { ac_script=; unset ac_script;}
15061 if test -z "$SED"; then
15062 ac_path_SED_found=false
15063 # Loop through the user's path and test for each of PROGNAME-LIST
15064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15065 for as_dir in $PATH
15068 case $as_dir in #(((
15071 *) as_dir=$as_dir/ ;;
15073 for ac_prog in sed gsed
15075 for ac_exec_ext in '' $ac_executable_extensions; do
15076 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
15077 as_fn_executable_p "$ac_path_SED" || continue
15078 # Check for GNU ac_path_SED and select it if it is found.
15079 # Check for GNU $ac_path_SED
15080 case `"$ac_path_SED" --version 2>&1` in
15082 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15085 printf %s 0123456789 >"conftest.in"
15088 cat "conftest.in" "conftest.in" >"conftest.tmp"
15089 mv "conftest.tmp" "conftest.in"
15090 cp "conftest.in" "conftest.nl"
15091 printf "%s\n" '' >> "conftest.nl"
15092 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15093 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15094 as_fn_arith $ac_count + 1 && ac_count=$as_val
15095 if test $ac_count -gt ${ac_path_SED_max-0}; then
15096 # Best one so far, save it but keep looking for a better one
15097 ac_cv_path_SED="$ac_path_SED"
15098 ac_path_SED_max=$ac_count
15100 # 10*(2^10) chars as input seems more than enough
15101 test $ac_count -gt 10 && break
15103 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15106 $ac_path_SED_found && break 3
15111 if test -z "$ac_cv_path_SED"; then
15112 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15115 ac_cv_path_SED=$SED
15119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15120 printf "%s\n" "$ac_cv_path_SED" >&6; }
15121 SED="$ac_cv_path_SED"
15124 # Autoupdate added the following line to ensure that your configure
15125 # script's behavior did not change. It is probably safe to remove.
15140 GNULIB_RAWMEMCHR=0;
15143 GNULIB_STRCHRNUL=0;
15151 GNULIB_STRCASESTR=0;
15158 GNULIB_MBSCASECMP=0;
15159 GNULIB_MBSNCASECMP=0;
15160 GNULIB_MBSPCASECMP=0;
15161 GNULIB_MBSCASESTR=0;
15168 GNULIB_STRERROR_R=0;
15169 GNULIB_STRSIGNAL=0;
15170 GNULIB_STRVERSCMP=0;
15175 HAVE_DECL_MEMMEM=1;
15177 HAVE_DECL_MEMRCHR=1;
15182 HAVE_DECL_STRDUP=1;
15183 HAVE_DECL_STRNDUP=1;
15184 HAVE_DECL_STRNLEN=1;
15188 HAVE_DECL_STRTOK_R=1;
15189 HAVE_DECL_STRERROR_R=1;
15190 HAVE_DECL_STRSIGNAL=1;
15197 REPLACE_STRCASESTR=0;
15198 REPLACE_STRCHRNUL=0;
15199 REPLACE_STRERROR=0;
15200 REPLACE_STRERROR_R=0;
15204 REPLACE_STRSIGNAL=0;
15205 REPLACE_STRTOK_R=0;
15206 UNDEFINE_STRTOK_R=0;
15212 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15213 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15214 # irrelevant for anonymous mappings.
15215 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15216 if test "x$ac_cv_func_mmap" = xyes
15224 # Try to allow MAP_ANONYMOUS.
15225 gl_have_mmap_anonymous=no
15226 if test $gl_have_mmap = yes; then
15227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15228 printf %s "checking for MAP_ANONYMOUS... " >&6; }
15229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15230 /* end confdefs.h. */
15232 #include <sys/mman.h>
15233 #ifdef MAP_ANONYMOUS
15234 I cannot identify this map
15238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15239 $EGREP "I cannot identify this map" >/dev/null 2>&1
15241 gl_have_mmap_anonymous=yes
15245 if test $gl_have_mmap_anonymous != yes; then
15246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15247 /* end confdefs.h. */
15249 #include <sys/mman.h>
15251 I cannot identify this map
15255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15256 $EGREP "I cannot identify this map" >/dev/null 2>&1
15259 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15261 gl_have_mmap_anonymous=yes
15266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15267 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
15268 if test $gl_have_mmap_anonymous = yes; then
15270 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15280 if test $HAVE_MEMCHR = 1; then
15281 # Detect platform-specific bugs in some versions of glibc:
15282 # memchr should not dereference anything with length 0
15283 # http://bugzilla.redhat.com/499689
15284 # memchr should not dereference overestimated length after a match
15285 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15286 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15287 # Assume that memchr works on platforms that lack mprotect.
15288 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15289 printf %s "checking whether memchr works... " >&6; }
15290 if test ${gl_cv_func_memchr_works+y}
15292 printf %s "(cached) " >&6
15294 if test "$cross_compiling" = yes
15296 gl_cv_func_memchr_works="guessing no"
15298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15299 /* end confdefs.h. */
15301 #include <string.h>
15302 #if HAVE_SYS_MMAN_H
15303 # include <fcntl.h>
15304 # include <unistd.h>
15305 # include <sys/types.h>
15306 # include <sys/mman.h>
15308 # define MAP_FILE 0
15317 char *fence = NULL;
15318 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15319 # if HAVE_MAP_ANONYMOUS
15320 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15322 # else /* !HAVE_MAP_ANONYMOUS */
15323 const int flags = MAP_FILE | MAP_PRIVATE;
15324 int fd = open ("/dev/zero", O_RDONLY, 0666);
15328 int pagesize = getpagesize ();
15330 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15332 if (two_pages != (char *)(-1)
15333 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15334 fence = two_pages + pagesize;
15339 if (memchr (fence, 0, 0))
15341 strcpy (fence - 9, "12345678");
15342 if (memchr (fence - 9, 0, 79) != fence - 1)
15344 if (memchr (fence - 1, 0, 3) != fence - 1)
15353 if ac_fn_c_try_run "$LINENO"
15355 gl_cv_func_memchr_works=yes
15357 gl_cv_func_memchr_works=no
15359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15360 conftest.$ac_objext conftest.beam conftest.$ac_ext
15364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15365 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
15366 if test "$gl_cv_func_memchr_works" != yes; then
15371 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15372 if test "x$ac_cv_have_decl_memrchr" = xyes
15379 cat >>confdefs.h <<_ACEOF
15380 #define HAVE_DECL_MEMRCHR $ac_have_decl
15389 REPLACE_STRERROR_0=0
15390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15391 printf %s "checking whether strerror(0) succeeds... " >&6; }
15392 if test ${gl_cv_func_strerror_0_works+y}
15394 printf %s "(cached) " >&6
15396 if test "$cross_compiling" = yes
15399 # Guess yes on glibc systems.
15400 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15401 # If we don't know, assume the worst.
15402 *) gl_cv_func_strerror_0_works="guessing no" ;;
15406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15407 /* end confdefs.h. */
15408 #include <string.h>
15417 str = strerror (0);
15418 if (!*str) result |= 1;
15419 if (errno) result |= 2;
15420 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15427 if ac_fn_c_try_run "$LINENO"
15429 gl_cv_func_strerror_0_works=yes
15431 gl_cv_func_strerror_0_works=no
15433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15434 conftest.$ac_objext conftest.beam conftest.$ac_ext
15439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15440 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
15441 case "$gl_cv_func_strerror_0_works" in
15444 REPLACE_STRERROR_0=1
15446 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
15458 if test $ac_cv_func_strerror_r = yes; then
15459 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15461 printf %s "checking for strerror_r with POSIX signature... " >&6; }
15462 if test ${gl_cv_func_strerror_r_posix_signature+y}
15464 printf %s "(cached) " >&6
15466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15467 /* end confdefs.h. */
15468 #include <string.h>
15469 int strerror_r (int, char *, size_t);
15479 if ac_fn_c_try_compile "$LINENO"
15481 gl_cv_func_strerror_r_posix_signature=yes
15483 gl_cv_func_strerror_r_posix_signature=no
15485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15489 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
15490 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15492 printf %s "checking whether strerror_r works... " >&6; }
15493 if test ${gl_cv_func_strerror_r_works+y}
15495 printf %s "(cached) " >&6
15497 if test "$cross_compiling" = yes
15502 aix*) gl_cv_func_strerror_r_works="guessing no";;
15503 # Guess no on HP-UX.
15504 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15505 # Guess no on BSD variants.
15506 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
15507 # Guess yes otherwise.
15508 *) gl_cv_func_strerror_r_works="guessing yes";;
15512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15513 /* end confdefs.h. */
15515 #include <string.h>
15522 if (strerror_r (EACCES, buf, 0) < 0)
15525 if (strerror_r (EACCES, buf, sizeof buf) != 0)
15527 strcpy (buf, "Unknown");
15528 if (strerror_r (0, buf, sizeof buf) != 0)
15532 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15536 if (strerror_r (-3, buf, sizeof buf) < 0)
15548 if ac_fn_c_try_run "$LINENO"
15550 gl_cv_func_strerror_r_works=yes
15552 gl_cv_func_strerror_r_works=no
15554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15555 conftest.$ac_objext conftest.beam conftest.$ac_ext
15560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15561 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
15564 if test $ac_cv_func___xpg_strerror_r = yes; then
15565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15566 printf %s "checking whether __xpg_strerror_r works... " >&6; }
15567 if test ${gl_cv_func_strerror_r_works+y}
15569 printf %s "(cached) " >&6
15571 if test "$cross_compiling" = yes
15573 gl_cv_func_strerror_r_works="guessing no"
15576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15577 /* end confdefs.h. */
15579 #include <string.h>
15584 int __xpg_strerror_r(int, char *, size_t);
15590 char buf[256] = "^";
15592 char *str = strerror (-1);
15593 strcpy (copy, str);
15594 if (__xpg_strerror_r (-2, buf, 1) == 0)
15598 __xpg_strerror_r (-2, buf, 256);
15599 if (strcmp (str, copy))
15607 if ac_fn_c_try_run "$LINENO"
15609 gl_cv_func_strerror_r_works=yes
15611 gl_cv_func_strerror_r_works=no
15613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15614 conftest.$ac_objext conftest.beam conftest.$ac_ext
15619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15620 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
15633 if test $ac_cv_have_decl_strerror_r = no; then
15634 HAVE_DECL_STRERROR_R=0
15637 if test $ac_cv_func_strerror_r = yes; then
15638 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15639 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15640 case "$gl_cv_func_strerror_r_works" in
15641 *no) REPLACE_STRERROR_R=1 ;;
15644 REPLACE_STRERROR_R=1
15647 REPLACE_STRERROR_R=1
15666 gl_cv_func_vfprintf_posix=no
15667 case "$gl_cv_func_printf_sizes_c99" in
15669 case "$gl_cv_func_printf_long_double" in
15671 case "$gl_cv_func_printf_infinite" in
15673 case "$gl_cv_func_printf_infinite_long_double" in
15675 case "$gl_cv_func_printf_directive_a" in
15677 case "$gl_cv_func_printf_directive_f" in
15679 case "$gl_cv_func_printf_directive_n" in
15681 case "$gl_cv_func_printf_directive_ls" in
15683 case "$gl_cv_func_printf_positions" in
15685 case "$gl_cv_func_printf_flag_grouping" in
15687 case "$gl_cv_func_printf_flag_leftadjust" in
15689 case "$gl_cv_func_printf_flag_zero" in
15691 case "$gl_cv_func_printf_precision" in
15693 case "$gl_cv_func_printf_enomem" in
15695 # vfprintf exists and is
15696 # already POSIX compliant.
15697 gl_cv_func_vfprintf_posix=yes
15726 if test $gl_cv_func_vfprintf_posix = no; then
15730 case "$gl_cv_func_printf_infinite" in
15735 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
15743 case "$gl_cv_func_printf_long_double" in
15745 case "$gl_cv_func_printf_infinite_long_double" in
15750 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
15759 case "$gl_cv_func_printf_directive_a" in
15764 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
15766 for ac_func in nl_langinfo
15768 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
15769 if test "x$ac_cv_func_nl_langinfo" = xyes
15771 cat >>confdefs.h <<_ACEOF
15772 #define HAVE_NL_LANGINFO 1
15783 case "$gl_cv_func_printf_directive_f" in
15788 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
15795 case "$gl_cv_func_printf_directive_ls" in
15800 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
15807 case "$gl_cv_func_printf_flag_grouping" in
15812 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
15819 case "$gl_cv_func_printf_flag_leftadjust" in
15824 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
15831 case "$gl_cv_func_printf_flag_zero" in
15836 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
15843 case "$gl_cv_func_printf_precision" in
15848 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
15851 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15854 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15861 case "$gl_cv_func_printf_enomem" in
15866 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
15869 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15872 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15887 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
15897 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
15907 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
15917 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
15919 if test $ac_cv_func_vasnprintf = yes; then
15921 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
15935 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
15936 if test "x$ac_cv_type_ptrdiff_t" = xyes
15941 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
15962 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
15966 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
15973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15974 /* end confdefs.h. */
15981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15982 $EGREP "MicrosoftCompiler" >/dev/null 2>&1
15985 gl_c_asm_opt='-c -Fa'
15997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
15998 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
15999 if test ${gl_cv_prog_as_underscore+y}
16001 printf %s "(cached) " >&6
16003 cat > conftest.c <<EOF
16005 extern "C" int foo (void);
16007 int foo(void) { return 0; }
16009 # Look for the assembly language name in the .s file.
16010 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16011 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16012 (eval $ac_try) 2>&5
16014 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16015 test $ac_status = 0; }; } >/dev/null 2>&1
16016 if LC_ALL=C grep -E '(^|^a-zA-Z0-9_)_foo(^a-zA-Z0-9_|$)' conftest.$gl_asmext >/dev/null; then
16017 gl_cv_prog_as_underscore=yes
16019 gl_cv_prog_as_underscore=no
16024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16025 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
16026 if test $gl_cv_prog_as_underscore = yes; then
16027 USER_LABEL_PREFIX=_
16032 cat >>confdefs.h <<_ACEOF
16033 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
16036 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16040 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
16041 if test ${ac_cv_header_stdbool_h+y}
16043 printf %s "(cached) " >&6
16045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16046 /* end confdefs.h. */
16048 #include <stdbool.h>
16050 "error: bool is not defined"
16053 "error: false is not defined"
16056 "error: false is not 0"
16059 "error: true is not defined"
16062 "error: true is not 1"
16064 #ifndef __bool_true_false_are_defined
16065 "error: __bool_true_false_are_defined is not defined"
16068 struct s { _Bool s: 1; _Bool t; } s;
16070 char a[true == 1 ? 1 : -1];
16071 char b[false == 0 ? 1 : -1];
16072 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16073 char d[(bool) 0.5 == true ? 1 : -1];
16074 /* See body of main program for 'e'. */
16075 char f[(_Bool) 0.0 == false ? 1 : -1];
16077 char h[sizeof (_Bool)];
16078 char i[sizeof s.t];
16079 enum { j = false, k = true, l = false * true, m = true * 256 };
16080 /* The following fails for
16081 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16083 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16084 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16085 /* Catch a bug in an HP-UX C compiler. See
16086 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16087 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
16099 /* Refer to every declared value, to avoid compiler optimizations. */
16100 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16101 + !m + !n + !o + !p + !q + !pq);
16107 if ac_fn_c_try_compile "$LINENO"
16109 ac_cv_header_stdbool_h=yes
16111 ac_cv_header_stdbool_h=no
16113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16116 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
16117 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16118 if test "x$ac_cv_type__Bool" = xyes
16121 cat >>confdefs.h <<_ACEOF
16122 #define HAVE__BOOL 1
16131 HAVE_MAX_ALIGN_T=1;
16139 if test $ac_cv_type_long_long_int = yes; then
16140 HAVE_LONG_LONG_INT=1
16142 HAVE_LONG_LONG_INT=0
16146 if test $ac_cv_type_unsigned_long_long_int = yes; then
16147 HAVE_UNSIGNED_LONG_LONG_INT=1
16149 HAVE_UNSIGNED_LONG_LONG_INT=0
16154 if test $ac_cv_header_wchar_h = yes; then
16161 if test $ac_cv_header_inttypes_h = yes; then
16168 if test $ac_cv_header_sys_types_h = yes; then
16184 if test $gl_cv_have_include_next = yes; then
16185 gl_cv_next_stdint_h='<'stdint.h'>'
16187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
16188 printf %s "checking absolute name of <stdint.h>... " >&6; }
16189 if test ${gl_cv_next_stdint_h+y}
16191 printf %s "(cached) " >&6
16194 if test $ac_cv_header_stdint_h = yes; then
16199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200 /* end confdefs.h. */
16201 #include <stdint.h>
16204 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16205 *) gl_absname_cpp="$ac_cpp" ;;
16210 gl_dirsep_regex='[/\\]'
16213 gl_dirsep_regex='\/'
16216 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16217 gl_header_literal_regex=`echo 'stdint.h' \
16218 | sed -e "$gl_make_literal_regex_sed"`
16219 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16220 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16226 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16227 sed -n "$gl_absolute_header_sed"`
16229 gl_header=$gl_cv_absolute_stdint_h
16230 gl_cv_next_stdint_h='"'$gl_header'"'
16232 gl_cv_next_stdint_h='<'stdint.h'>'
16237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
16238 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
16240 NEXT_STDINT_H=$gl_cv_next_stdint_h
16242 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16243 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16244 gl_next_as_first_directive='<'stdint.h'>'
16246 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16247 gl_next_as_first_directive=$gl_cv_next_stdint_h
16249 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
16254 if test $ac_cv_header_stdint_h = yes; then
16261 if test $ac_cv_header_stdint_h = yes; then
16262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
16263 printf %s "checking whether stdint.h conforms to C99... " >&6; }
16264 if test ${gl_cv_header_working_stdint_h+y}
16266 printf %s "(cached) " >&6
16268 gl_cv_header_working_stdint_h=no
16269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16270 /* end confdefs.h. */
16273 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16274 #define __STDC_CONSTANT_MACROS 1
16275 #define __STDC_LIMIT_MACROS 1
16276 #include <stdint.h>
16277 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
16278 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
16279 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
16283 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16284 included before <wchar.h>. */
16285 #include <stddef.h>
16286 #include <signal.h>
16288 # include <stdio.h>
16290 # include <wchar.h>
16295 int8_t a1 = INT8_MAX;
16296 int8_t a1min = INT8_MIN;
16299 int16_t a2 = INT16_MAX;
16300 int16_t a2min = INT16_MIN;
16303 int32_t a3 = INT32_MAX;
16304 int32_t a3min = INT32_MIN;
16307 int64_t a4 = INT64_MAX;
16308 int64_t a4min = INT64_MIN;
16311 uint8_t b1 = UINT8_MAX;
16313 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
16316 uint16_t b2 = UINT16_MAX;
16319 uint32_t b3 = UINT32_MAX;
16322 uint64_t b4 = UINT64_MAX;
16324 int_least8_t c1 = INT8_C (0x7f);
16325 int_least8_t c1max = INT_LEAST8_MAX;
16326 int_least8_t c1min = INT_LEAST8_MIN;
16327 int_least16_t c2 = INT16_C (0x7fff);
16328 int_least16_t c2max = INT_LEAST16_MAX;
16329 int_least16_t c2min = INT_LEAST16_MIN;
16330 int_least32_t c3 = INT32_C (0x7fffffff);
16331 int_least32_t c3max = INT_LEAST32_MAX;
16332 int_least32_t c3min = INT_LEAST32_MIN;
16333 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
16334 int_least64_t c4max = INT_LEAST64_MAX;
16335 int_least64_t c4min = INT_LEAST64_MIN;
16336 uint_least8_t d1 = UINT8_C (0xff);
16337 uint_least8_t d1max = UINT_LEAST8_MAX;
16338 uint_least16_t d2 = UINT16_C (0xffff);
16339 uint_least16_t d2max = UINT_LEAST16_MAX;
16340 uint_least32_t d3 = UINT32_C (0xffffffff);
16341 uint_least32_t d3max = UINT_LEAST32_MAX;
16342 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
16343 uint_least64_t d4max = UINT_LEAST64_MAX;
16344 int_fast8_t e1 = INT_FAST8_MAX;
16345 int_fast8_t e1min = INT_FAST8_MIN;
16346 int_fast16_t e2 = INT_FAST16_MAX;
16347 int_fast16_t e2min = INT_FAST16_MIN;
16348 int_fast32_t e3 = INT_FAST32_MAX;
16349 int_fast32_t e3min = INT_FAST32_MIN;
16350 int_fast64_t e4 = INT_FAST64_MAX;
16351 int_fast64_t e4min = INT_FAST64_MIN;
16352 uint_fast8_t f1 = UINT_FAST8_MAX;
16353 uint_fast16_t f2 = UINT_FAST16_MAX;
16354 uint_fast32_t f3 = UINT_FAST32_MAX;
16355 uint_fast64_t f4 = UINT_FAST64_MAX;
16357 intptr_t g = INTPTR_MAX;
16358 intptr_t gmin = INTPTR_MIN;
16361 uintptr_t h = UINTPTR_MAX;
16363 intmax_t i = INTMAX_MAX;
16364 uintmax_t j = UINTMAX_MAX;
16366 #include <limits.h> /* for CHAR_BIT */
16367 #define TYPE_MINIMUM(t) \
16368 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16369 #define TYPE_MAXIMUM(t) \
16370 ((t) ((t) 0 < (t) -1 \
16372 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16375 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
16376 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
16378 /* Detect bug in FreeBSD 6.0 / ia64. */
16379 int check_SIG_ATOMIC:
16380 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
16381 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
16383 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
16385 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
16386 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
16388 /* Detect bug in mingw. */
16390 WINT_MIN == TYPE_MINIMUM (wint_t)
16391 && WINT_MAX == TYPE_MAXIMUM (wint_t)
16394 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
16396 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
16397 int check_UINT16_C:
16398 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
16400 /* Detect bugs in OpenBSD 3.9 stdint.h. */
16402 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
16405 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
16408 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
16411 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
16413 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
16414 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
16415 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
16416 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
16417 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
16418 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
16419 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
16420 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
16421 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
16422 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
16423 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
16434 if ac_fn_c_try_compile "$LINENO"
16436 if test "$cross_compiling" = yes
16438 gl_cv_header_working_stdint_h=yes
16441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16442 /* end confdefs.h. */
16445 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16446 #define __STDC_CONSTANT_MACROS 1
16447 #define __STDC_LIMIT_MACROS 1
16448 #include <stdint.h>
16451 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16452 included before <wchar.h>. */
16453 #include <stddef.h>
16454 #include <signal.h>
16456 # include <stdio.h>
16458 # include <wchar.h>
16463 #include <string.h>
16464 #define MVAL(macro) MVAL1(macro)
16465 #define MVAL1(expression) #expression
16466 static const char *macro_values[] =
16500 for (mv = macro_values; *mv != NULL; mv++)
16502 const char *value = *mv;
16503 /* Test whether it looks like a cast expression. */
16504 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
16505 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
16506 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
16507 || strncmp (value, "((int)"/*)*/, 6) == 0
16508 || strncmp (value, "((signed short)"/*)*/, 15) == 0
16509 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
16510 return mv - macro_values + 1;
16518 if ac_fn_c_try_run "$LINENO"
16520 gl_cv_header_working_stdint_h=yes
16522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16523 conftest.$ac_objext conftest.beam conftest.$ac_ext
16528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
16532 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
16534 if test "$gl_cv_header_working_stdint_h" = yes; then
16535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
16536 printf %s "checking whether stdint.h predates C++11... " >&6; }
16537 if test ${gl_cv_header_stdint_predates_cxx11_h+y}
16539 printf %s "(cached) " >&6
16541 gl_cv_header_stdint_predates_cxx11_h=yes
16542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543 /* end confdefs.h. */
16546 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16547 #include <stdint.h>
16550 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16551 included before <wchar.h>. */
16552 #include <stddef.h>
16553 #include <signal.h>
16555 # include <stdio.h>
16557 # include <wchar.h>
16561 intmax_t im = INTMAX_MAX;
16562 int32_t i32 = INT32_C (0x7fffffff);
16572 if ac_fn_c_try_compile "$LINENO"
16574 gl_cv_header_stdint_predates_cxx11_h=no
16576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
16579 printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
16581 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
16583 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
16586 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
16591 for ac_header in sys/inttypes.h sys/bitypes.h
16593 as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
16594 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16595 if eval test \"x\$"$as_ac_Header"\" = x"yes"
16597 cat >>confdefs.h <<_ACEOF
16598 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
16604 if test $ac_cv_header_sys_inttypes_h = yes; then
16605 HAVE_SYS_INTTYPES_H=1
16607 HAVE_SYS_INTTYPES_H=0
16610 if test $ac_cv_header_sys_bitypes_h = yes; then
16611 HAVE_SYS_BITYPES_H=1
16613 HAVE_SYS_BITYPES_H=0
16619 if test $APPLE_UNIVERSAL_BUILD = 0; then
16622 for gltype in ptrdiff_t size_t ; do
16623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16624 printf %s "checking for bit size of $gltype... " >&6; }
16625 if eval test \${gl_cv_bitsizeof_${gltype}+y}
16627 printf %s "(cached) " >&6
16629 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
16630 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16631 included before <wchar.h>. */
16632 #include <stddef.h>
16633 #include <signal.h>
16635 # include <stdio.h>
16637 # include <wchar.h>
16640 #include <limits.h>"
16647 eval gl_cv_bitsizeof_${gltype}=\$result
16650 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16652 printf "%s\n" "$ac_res" >&6; }
16653 eval result=\$gl_cv_bitsizeof_${gltype}
16654 if test $result = unknown; then
16657 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16658 cat >>confdefs.h <<_ACEOF
16659 #define BITSIZEOF_${GLTYPE} $result
16662 eval BITSIZEOF_${GLTYPE}=\$result
16669 for gltype in sig_atomic_t wchar_t wint_t ; do
16670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16671 printf %s "checking for bit size of $gltype... " >&6; }
16672 if eval test \${gl_cv_bitsizeof_${gltype}+y}
16674 printf %s "(cached) " >&6
16676 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
16677 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16678 included before <wchar.h>. */
16679 #include <stddef.h>
16680 #include <signal.h>
16682 # include <stdio.h>
16684 # include <wchar.h>
16687 #include <limits.h>"
16694 eval gl_cv_bitsizeof_${gltype}=\$result
16697 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16699 printf "%s\n" "$ac_res" >&6; }
16700 eval result=\$gl_cv_bitsizeof_${gltype}
16701 if test $result = unknown; then
16704 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16705 cat >>confdefs.h <<_ACEOF
16706 #define BITSIZEOF_${GLTYPE} $result
16709 eval BITSIZEOF_${GLTYPE}=\$result
16715 for gltype in sig_atomic_t wchar_t wint_t ; do
16716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
16717 printf %s "checking whether $gltype is signed... " >&6; }
16718 if eval test \${gl_cv_type_${gltype}_signed+y}
16720 printf %s "(cached) " >&6
16722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16723 /* end confdefs.h. */
16725 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16726 included before <wchar.h>. */
16727 #include <stddef.h>
16728 #include <signal.h>
16730 # include <stdio.h>
16732 # include <wchar.h>
16735 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
16744 if ac_fn_c_try_compile "$LINENO"
16750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16751 eval gl_cv_type_${gltype}_signed=\$result
16754 eval ac_res=\$gl_cv_type_${gltype}_signed
16755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16756 printf "%s\n" "$ac_res" >&6; }
16757 eval result=\$gl_cv_type_${gltype}_signed
16758 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16759 if test "$result" = yes; then
16760 cat >>confdefs.h <<_ACEOF
16761 #define HAVE_SIGNED_${GLTYPE} 1
16764 eval HAVE_SIGNED_${GLTYPE}=1
16766 eval HAVE_SIGNED_${GLTYPE}=0
16771 gl_cv_type_ptrdiff_t_signed=yes
16772 gl_cv_type_size_t_signed=no
16773 if test $APPLE_UNIVERSAL_BUILD = 0; then
16776 for gltype in ptrdiff_t size_t ; do
16777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16778 printf %s "checking for $gltype integer literal suffix... " >&6; }
16779 if eval test \${gl_cv_type_${gltype}_suffix+y}
16781 printf %s "(cached) " >&6
16783 eval gl_cv_type_${gltype}_suffix=no
16784 eval result=\$gl_cv_type_${gltype}_signed
16785 if test "$result" = yes; then
16790 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16792 '') gltype1='int';;
16793 l) gltype1='long int';;
16794 ll) gltype1='long long int';;
16795 i64) gltype1='__int64';;
16796 u) gltype1='unsigned int';;
16797 ul) gltype1='unsigned long int';;
16798 ull) gltype1='unsigned long long int';;
16799 ui64)gltype1='unsigned __int64';;
16801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16802 /* end confdefs.h. */
16804 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16805 included before <wchar.h>. */
16806 #include <stddef.h>
16807 #include <signal.h>
16809 # include <stdio.h>
16811 # include <wchar.h>
16814 extern $gltype foo;
16815 extern $gltype1 foo;
16824 if ac_fn_c_try_compile "$LINENO"
16826 eval gl_cv_type_${gltype}_suffix=\$glsuf
16828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16829 eval result=\$gl_cv_type_${gltype}_suffix
16830 test "$result" != no && break
16833 eval ac_res=\$gl_cv_type_${gltype}_suffix
16834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16835 printf "%s\n" "$ac_res" >&6; }
16836 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16837 eval result=\$gl_cv_type_${gltype}_suffix
16838 test "$result" = no && result=
16839 eval ${GLTYPE}_SUFFIX=\$result
16840 cat >>confdefs.h <<_ACEOF
16841 #define ${GLTYPE}_SUFFIX $result
16850 for gltype in sig_atomic_t wchar_t wint_t ; do
16851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16852 printf %s "checking for $gltype integer literal suffix... " >&6; }
16853 if eval test \${gl_cv_type_${gltype}_suffix+y}
16855 printf %s "(cached) " >&6
16857 eval gl_cv_type_${gltype}_suffix=no
16858 eval result=\$gl_cv_type_${gltype}_signed
16859 if test "$result" = yes; then
16864 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16866 '') gltype1='int';;
16867 l) gltype1='long int';;
16868 ll) gltype1='long long int';;
16869 i64) gltype1='__int64';;
16870 u) gltype1='unsigned int';;
16871 ul) gltype1='unsigned long int';;
16872 ull) gltype1='unsigned long long int';;
16873 ui64)gltype1='unsigned __int64';;
16875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16876 /* end confdefs.h. */
16878 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16879 included before <wchar.h>. */
16880 #include <stddef.h>
16881 #include <signal.h>
16883 # include <stdio.h>
16885 # include <wchar.h>
16888 extern $gltype foo;
16889 extern $gltype1 foo;
16898 if ac_fn_c_try_compile "$LINENO"
16900 eval gl_cv_type_${gltype}_suffix=\$glsuf
16902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16903 eval result=\$gl_cv_type_${gltype}_suffix
16904 test "$result" != no && break
16907 eval ac_res=\$gl_cv_type_${gltype}_suffix
16908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16909 printf "%s\n" "$ac_res" >&6; }
16910 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16911 eval result=\$gl_cv_type_${gltype}_suffix
16912 test "$result" = no && result=
16913 eval ${GLTYPE}_SUFFIX=\$result
16914 cat >>confdefs.h <<_ACEOF
16915 #define ${GLTYPE}_SUFFIX $result
16922 if test $BITSIZEOF_WINT_T -lt 32; then
16923 BITSIZEOF_WINT_T=32
16929 if test -n "$STDINT_H"; then
16930 GL_GENERATE_STDINT_H_TRUE=
16931 GL_GENERATE_STDINT_H_FALSE='#'
16933 GL_GENERATE_STDINT_H_TRUE='#'
16934 GL_GENERATE_STDINT_H_FALSE=
16940 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16941 if test "x$ac_cv_have_decl_strdup" = xyes
16948 cat >>confdefs.h <<_ACEOF
16949 #define HAVE_DECL_STRDUP $ac_have_decl
16965 if test $gl_cv_have_include_next = yes; then
16966 gl_cv_next_string_h='<'string.h'>'
16968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16969 printf %s "checking absolute name of <string.h>... " >&6; }
16970 if test ${gl_cv_next_string_h+y}
16972 printf %s "(cached) " >&6
16977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16978 /* end confdefs.h. */
16979 #include <string.h>
16982 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16983 *) gl_absname_cpp="$ac_cpp" ;;
16988 gl_dirsep_regex='[/\\]'
16991 gl_dirsep_regex='\/'
16994 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16995 gl_header_literal_regex=`echo 'string.h' \
16996 | sed -e "$gl_make_literal_regex_sed"`
16997 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16998 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17004 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17005 sed -n "$gl_absolute_header_sed"`
17007 gl_header=$gl_cv_absolute_string_h
17008 gl_cv_next_string_h='"'$gl_header'"'
17012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17013 printf "%s\n" "$gl_cv_next_string_h" >&6; }
17015 NEXT_STRING_H=$gl_cv_next_string_h
17017 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17018 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17019 gl_next_as_first_directive='<'string.h'>'
17021 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17022 gl_next_as_first_directive=$gl_cv_next_string_h
17024 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17034 GNULIB_NANOSLEEP=0;
17039 HAVE_DECL_LOCALTIME_R=1;
17043 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17044 REPLACE_MKTIME=GNULIB_PORTCHECK;
17045 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17046 REPLACE_TIMEGM=GNULIB_PORTCHECK;
17048 : ${GNULIB_GETTIMEOFDAY=0};
17050 REPLACE_LOCALTIME=0;
17054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17055 printf %s "checking for struct timespec in <time.h>... " >&6; }
17056 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
17058 printf %s "(cached) " >&6
17060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17061 /* end confdefs.h. */
17067 static struct timespec x; x.tv_sec = x.tv_nsec;
17072 if ac_fn_c_try_compile "$LINENO"
17074 gl_cv_sys_struct_timespec_in_time_h=yes
17076 gl_cv_sys_struct_timespec_in_time_h=no
17078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17081 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17083 TIME_H_DEFINES_STRUCT_TIMESPEC=0
17084 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17085 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17086 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17087 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17088 TIME_H_DEFINES_STRUCT_TIMESPEC=1
17090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17091 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
17092 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
17094 printf %s "(cached) " >&6
17096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17097 /* end confdefs.h. */
17098 #include <sys/time.h>
17103 static struct timespec x; x.tv_sec = x.tv_nsec;
17108 if ac_fn_c_try_compile "$LINENO"
17110 gl_cv_sys_struct_timespec_in_sys_time_h=yes
17112 gl_cv_sys_struct_timespec_in_sys_time_h=no
17114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17117 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17118 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17119 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17122 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
17123 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
17125 printf %s "(cached) " >&6
17127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17128 /* end confdefs.h. */
17129 #include <pthread.h>
17134 static struct timespec x; x.tv_sec = x.tv_nsec;
17139 if ac_fn_c_try_compile "$LINENO"
17141 gl_cv_sys_struct_timespec_in_pthread_h=yes
17143 gl_cv_sys_struct_timespec_in_pthread_h=no
17145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17148 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17149 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17150 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17153 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
17154 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
17156 printf %s "(cached) " >&6
17158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17159 /* end confdefs.h. */
17160 #include <unistd.h>
17165 static struct timespec x; x.tv_sec = x.tv_nsec;
17170 if ac_fn_c_try_compile "$LINENO"
17172 gl_cv_sys_struct_timespec_in_unistd_h=yes
17174 gl_cv_sys_struct_timespec_in_unistd_h=no
17176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17179 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17180 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17181 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17202 if test $gl_cv_have_include_next = yes; then
17203 gl_cv_next_time_h='<'time.h'>'
17205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17206 printf %s "checking absolute name of <time.h>... " >&6; }
17207 if test ${gl_cv_next_time_h+y}
17209 printf %s "(cached) " >&6
17214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17215 /* end confdefs.h. */
17219 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17220 *) gl_absname_cpp="$ac_cpp" ;;
17225 gl_dirsep_regex='[/\\]'
17228 gl_dirsep_regex='\/'
17231 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17232 gl_header_literal_regex=`echo 'time.h' \
17233 | sed -e "$gl_make_literal_regex_sed"`
17234 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17235 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17241 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17242 sed -n "$gl_absolute_header_sed"`
17244 gl_header=$gl_cv_absolute_time_h
17245 gl_cv_next_time_h='"'$gl_header'"'
17249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17250 printf "%s\n" "$gl_cv_next_time_h" >&6; }
17252 NEXT_TIME_H=$gl_cv_next_time_h
17254 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17255 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17256 gl_next_as_first_directive='<'time.h'>'
17258 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17259 gl_next_as_first_directive=$gl_cv_next_time_h
17261 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
17274 printf %s "checking whether the utimes function works... " >&6; }
17275 if test ${gl_cv_func_working_utimes+y}
17277 printf %s "(cached) " >&6
17280 if test "$cross_compiling" = yes
17282 gl_cv_func_working_utimes=no
17284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17285 /* end confdefs.h. */
17287 #include <sys/types.h>
17288 #include <sys/stat.h>
17290 #include <sys/time.h>
17292 #include <unistd.h>
17293 #include <stdlib.h>
17299 inorder (time_t a, time_t b, time_t c)
17301 return a <= b && b <= c;
17308 char const *file = "conftest.utimes";
17309 /* On OS/2, file timestamps must be on or after 1980 in local time,
17310 with an even number of seconds. */
17311 static struct timeval timeval[2] = {{315620000 + 10, 10},
17312 {315620000 + 1000000, 999998}};
17314 /* Test whether utimes() essentially works. */
17317 FILE *f = fopen (file, "w");
17320 else if (fclose (f) != 0)
17322 else if (utimes (file, timeval) != 0)
17324 else if (lstat (file, &sbuf) != 0)
17326 else if (!(sbuf.st_atime == timeval[0].tv_sec
17327 && sbuf.st_mtime == timeval[1].tv_sec))
17329 if (unlink (file) != 0)
17333 /* Test whether utimes() with a NULL argument sets the file's timestamp
17334 to the current time. Use 'fstat' as well as 'time' to
17335 determine the "current" time, to accommodate NFS file systems
17336 if there is a time skew between the host and the NFS server. */
17338 int fd = open (file, O_WRONLY|O_CREAT, 0644);
17344 struct stat st0, st1, st2;
17345 if (time (&t0) == (time_t) -1)
17347 else if (fstat (fd, &st0) != 0)
17349 else if (utimes (file, timeval) != 0
17350 && (errno != EACCES
17351 /* OS/2 kLIBC utimes fails on opened files. */
17353 || utimes (file, timeval) != 0
17354 || (fd = open (file, O_WRONLY)) < 0))
17356 else if (utimes (file, NULL) != 0
17357 && (errno != EACCES
17358 /* OS/2 kLIBC utimes fails on opened files. */
17360 || utimes (file, NULL) != 0
17361 || (fd = open (file, O_WRONLY)) < 0))
17363 else if (fstat (fd, &st1) != 0)
17365 else if (write (fd, "\n", 1) != 1)
17367 else if (fstat (fd, &st2) != 0)
17369 else if (time (&t2) == (time_t) -1)
17373 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
17374 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
17375 if (! (st1.st_atime == st1.st_mtime))
17377 if (! (m_ok_POSIX || m_ok_NFS))
17380 if (close (fd) != 0)
17383 if (unlink (file) != 0)
17387 /* Test whether utimes() with a NULL argument works on read-only files. */
17389 int fd = open (file, O_WRONLY|O_CREAT, 0444);
17392 else if (close (fd) != 0)
17394 else if (utimes (file, NULL) != 0)
17396 if (unlink (file) != 0)
17404 if ac_fn_c_try_run "$LINENO"
17406 gl_cv_func_working_utimes=yes
17408 gl_cv_func_working_utimes=no
17410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17411 conftest.$ac_objext conftest.beam conftest.$ac_ext
17415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
17416 printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
17418 if test $gl_cv_func_working_utimes = yes; then
17420 printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
17428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
17429 printf %s "checking for struct utimbuf... " >&6; }
17430 if test ${gl_cv_sys_struct_utimbuf+y}
17432 printf %s "(cached) " >&6
17434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17435 /* end confdefs.h. */
17436 #if HAVE_SYS_TIME_H
17437 #include <sys/time.h>
17440 #ifdef HAVE_UTIME_H
17447 static struct utimbuf x; x.actime = x.modtime;
17452 if ac_fn_c_try_compile "$LINENO"
17454 gl_cv_sys_struct_utimbuf=yes
17456 gl_cv_sys_struct_utimbuf=no
17458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
17461 printf "%s\n" "$gl_cv_sys_struct_utimbuf" >&6; }
17463 if test $gl_cv_sys_struct_utimbuf = yes; then
17465 printf "%s\n" "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
17485 GNULIB_MBSRTOWCS=0;
17486 GNULIB_MBSNRTOWCS=0;
17488 GNULIB_WCSRTOMBS=0;
17489 GNULIB_WCSNRTOMBS=0;
17506 GNULIB_WCSCASECMP=0;
17507 GNULIB_WCSNCASECMP=0;
17544 HAVE_WCSNCASECMP=1;
17557 HAVE_DECL_WCWIDTH=1;
17558 REPLACE_MBSTATE_T=0;
17564 REPLACE_MBSRTOWCS=0;
17565 REPLACE_MBSNRTOWCS=0;
17567 REPLACE_WCSRTOMBS=0;
17568 REPLACE_WCSNRTOMBS=0;
17570 REPLACE_WCSWIDTH=0;
17573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
17574 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
17575 if test ${gl_cv_header_wchar_h_correct_inline+y}
17577 printf %s "(cached) " >&6
17579 gl_cv_header_wchar_h_correct_inline=yes
17580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581 /* end confdefs.h. */
17583 #define wcstod renamed_wcstod
17584 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17586 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17587 included before <wchar.h>. */
17588 #include <stddef.h>
17592 extern int zero (void);
17593 int main () { return zero(); }
17596 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17597 (eval $ac_compile) 2>&5
17599 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17600 test $ac_status = 0; }; then
17601 mv conftest.$ac_objext conftest1.$ac_objext
17602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17603 /* end confdefs.h. */
17605 #define wcstod renamed_wcstod
17606 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17608 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17609 included before <wchar.h>. */
17610 #include <stddef.h>
17614 int zero (void) { return 0; }
17617 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17618 (eval $ac_compile) 2>&5
17620 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17621 test $ac_status = 0; }; then
17622 mv conftest.$ac_objext conftest2.$ac_objext
17623 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
17626 gl_cv_header_wchar_h_correct_inline=no
17630 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
17633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
17634 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
17635 if test $gl_cv_header_wchar_h_correct_inline = no; then
17636 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
17637 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
17638 C99 mode. You have four options:
17639 - Add the flag -fgnu89-inline to CC and reconfigure, or
17640 - Fix your include files, using parts of
17641 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
17642 - Use a gcc version older than 4.3, or
17643 - Don't use the flags -std=c99 or -std=gnu99.
17644 Configuration aborted." "$LINENO" 5
17649 GL_COND_LIBTOOL_TRUE=
17650 GL_COND_LIBTOOL_FALSE='#'
17652 GL_COND_LIBTOOL_TRUE='#'
17653 GL_COND_LIBTOOL_FALSE=
17656 gl_cond_libtool=false
17669 gl_source_base='lib'
17672 if test $ac_cv_func_alloca_works = no; then
17676 # Define an additional variable used in the Makefile substitution.
17677 if test $ac_cv_working_alloca_h = yes; then
17678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17679 printf %s "checking for alloca as a compiler built-in... " >&6; }
17680 if test ${gl_cv_rpl_alloca+y}
17682 printf %s "(cached) " >&6
17685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17686 /* end confdefs.h. */
17688 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17694 $EGREP "Need own alloca" >/dev/null 2>&1
17696 gl_cv_rpl_alloca=yes
17698 gl_cv_rpl_alloca=no
17704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17705 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
17706 if test $gl_cv_rpl_alloca = yes; then
17708 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
17718 if test -n "$ALLOCA_H"; then
17719 GL_GENERATE_ALLOCA_H_TRUE=
17720 GL_GENERATE_ALLOCA_H_FALSE='#'
17722 GL_GENERATE_ALLOCA_H_TRUE='#'
17723 GL_GENERATE_ALLOCA_H_FALSE=
17735 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
17741 printf %s "checking for GNU libc compatible calloc... " >&6; }
17742 if test ${ac_cv_func_calloc_0_nonnull+y}
17744 printf %s "(cached) " >&6
17746 if test "$cross_compiling" = yes
17749 # Guess yes on glibc systems.
17750 *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
17751 # If we don't know, assume the worst.
17752 *) ac_cv_func_calloc_0_nonnull="guessing no" ;;
17756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17757 /* end confdefs.h. */
17758 $ac_includes_default
17763 char *p = calloc (0, 0);
17767 p = calloc ((size_t) -1 / 8 + 1, 8);
17777 if ac_fn_c_try_run "$LINENO"
17779 ac_cv_func_calloc_0_nonnull=yes
17781 ac_cv_func_calloc_0_nonnull=no
17783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17784 conftest.$ac_objext conftest.beam conftest.$ac_ext
17788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
17789 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
17790 case "$ac_cv_func_calloc_0_nonnull" in
17793 printf "%s\n" "#define HAVE_CALLOC_GNU 1" >>confdefs.h
17797 printf "%s\n" "#define HAVE_CALLOC_GNU 0" >>confdefs.h
17805 if test $REPLACE_CALLOC = 1; then
17814 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17819 cat >>confdefs.h <<_ACEOF
17820 #define GNULIB_CALLOC_GNU 1
17827 if test $gl_cv_func_malloc_posix = yes; then
17829 printf "%s\n" "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
17835 if test $REPLACE_CALLOC = 1; then
17844 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17852 GNULIB_CALLOC_POSIX=1
17858 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
17873 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17880 printf %s "checking whether this system has an arbitrary file name length limit... " >&6; }
17881 if test ${gl_cv_have_arbitrary_file_name_length_limit+y}
17883 printf %s "(cached) " >&6
17885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17886 /* end confdefs.h. */
17888 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17890 # include <unistd.h>
17892 #include <limits.h>
17893 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17894 # include <sys/param.h>
17896 #if !defined PATH_MAX && defined MAXPATHLEN
17897 # define PATH_MAX MAXPATHLEN
17901 # define PATH_MAX 1024
17903 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17905 # define PATH_MAX 260
17909 have_arbitrary_file_name_length_limit
17912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17913 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
17915 gl_cv_have_arbitrary_file_name_length_limit=yes
17917 gl_cv_have_arbitrary_file_name_length_limit=no
17922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17923 printf "%s\n" "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17925 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17934 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17941 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17942 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17944 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
17945 # programs in the package would end up linked with that potentially-shared
17946 # library, inducing unnecessary run-time overhead.
17949 gl_saved_libs=$LIBS
17950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17951 printf %s "checking for library containing clock_gettime... " >&6; }
17952 if test ${ac_cv_search_clock_gettime+y}
17954 printf %s "(cached) " >&6
17956 ac_func_search_save_LIBS=$LIBS
17957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17958 /* end confdefs.h. */
17960 /* Override any GCC internal prototype to avoid an error.
17961 Use char because int might match the return type of a GCC
17962 builtin and then its argument prototype would still apply. */
17966 char clock_gettime ();
17970 return clock_gettime ();
17975 for ac_lib in '' rt posix4
17977 if test -z "$ac_lib"; then
17978 ac_res="none required"
17981 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17983 if ac_fn_c_try_link "$LINENO"
17985 ac_cv_search_clock_gettime=$ac_res
17987 rm -f core conftest.err conftest.$ac_objext \
17989 if test ${ac_cv_search_clock_gettime+y}
17994 if test ${ac_cv_search_clock_gettime+y}
17998 ac_cv_search_clock_gettime=no
18000 rm conftest.$ac_ext
18001 LIBS=$ac_func_search_save_LIBS
18003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18004 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
18005 ac_res=$ac_cv_search_clock_gettime
18006 if test "$ac_res" != no
18008 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18009 test "$ac_cv_search_clock_gettime" = "none required" ||
18010 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
18013 for ac_func in clock_gettime clock_settime
18015 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
18016 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18017 if eval test \"x\$"$as_ac_var"\" = x"yes"
18019 cat >>confdefs.h <<_ACEOF
18020 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
18026 LIBS=$gl_saved_libs
18030 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
18036 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18044 if test $ac_cv_header_sys_socket_h != yes; then
18045 for ac_header in winsock2.h
18047 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18048 if test "x$ac_cv_header_winsock2_h" = xyes
18050 cat >>confdefs.h <<_ACEOF
18051 #define HAVE_WINSOCK2_H 1
18058 if test "$ac_cv_header_winsock2_h" = yes; then
18060 UNISTD_H_HAVE_WINSOCK2_H=1
18061 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18067 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
18072 if test $REPLACE_CLOSE = 0; then
18076 if test $ac_cv_func_fchdir = no; then
18080 if test $HAVE_FCHDIR = 0; then
18086 if test $REPLACE_CLOSE = 1; then
18095 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
18109 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
18116 for ac_func in closedir
18118 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
18119 if test "x$ac_cv_func_closedir" = xyes
18121 cat >>confdefs.h <<_ACEOF
18122 #define HAVE_CLOSEDIR 1
18128 if test $ac_cv_func_closedir = no; then
18135 if test $ac_cv_func_fchdir = no; then
18139 if test $HAVE_FCHDIR = 0; then
18140 if test $HAVE_CLOSEDIR = 1; then
18145 case $host_os,$HAVE_CLOSEDIR in
18147 REPLACE_CLOSEDIR=1;;
18150 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
18159 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
18173 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
18189 if test $gl_cv_have_include_next = yes; then
18190 gl_cv_next_dirent_h='<'dirent.h'>'
18192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
18193 printf %s "checking absolute name of <dirent.h>... " >&6; }
18194 if test ${gl_cv_next_dirent_h+y}
18196 printf %s "(cached) " >&6
18199 if test $ac_cv_header_dirent_h = yes; then
18204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18205 /* end confdefs.h. */
18206 #include <dirent.h>
18209 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18210 *) gl_absname_cpp="$ac_cpp" ;;
18215 gl_dirsep_regex='[/\\]'
18218 gl_dirsep_regex='\/'
18221 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18222 gl_header_literal_regex=`echo 'dirent.h' \
18223 | sed -e "$gl_make_literal_regex_sed"`
18224 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18225 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18231 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18232 sed -n "$gl_absolute_header_sed"`
18234 gl_header=$gl_cv_absolute_dirent_h
18235 gl_cv_next_dirent_h='"'$gl_header'"'
18237 gl_cv_next_dirent_h='<'dirent.h'>'
18242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18243 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
18245 NEXT_DIRENT_H=$gl_cv_next_dirent_h
18247 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18248 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18249 gl_next_as_first_directive='<'dirent.h'>'
18251 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18252 gl_next_as_first_directive=$gl_cv_next_dirent_h
18254 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
18259 if test $ac_cv_header_dirent_h = yes; then
18273 cat >>confdefs.h <<_ACEOF
18274 #define GNULIB_DIRENT_SAFER 1
18283 for ac_func in dirfd
18285 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18286 if test "x$ac_cv_func_dirfd" = xyes
18288 cat >>confdefs.h <<_ACEOF
18289 #define HAVE_DIRFD 1
18295 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18296 #include <dirent.h>
18298 if test "x$ac_cv_have_decl_dirfd" = xyes
18305 cat >>confdefs.h <<_ACEOF
18306 #define HAVE_DECL_DIRFD $ac_have_decl
18309 if test $ac_cv_have_decl_dirfd = no; then
18313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18314 printf %s "checking whether dirfd is a macro... " >&6; }
18315 if test ${gl_cv_func_dirfd_macro+y}
18317 printf %s "(cached) " >&6
18319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18320 /* end confdefs.h. */
18322 #include <sys/types.h>
18323 #include <dirent.h>
18325 dirent_header_defines_dirfd
18328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18329 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
18331 gl_cv_func_dirfd_macro=yes
18333 gl_cv_func_dirfd_macro=no
18338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18339 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
18341 # Use the replacement if we have no function or macro with that name,
18342 # or if OS/2 kLIBC whose dirfd() does not work.
18343 # Replace only if the system declares dirfd already.
18344 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
18345 no,no,*,yes | *,*,os2*,yes)
18348 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
18352 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
18353 || test $REPLACE_DIRFD = 1; then
18362 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18366 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18367 if test ${gl_cv_sys_dir_fd_member_name+y}
18369 printf %s "(cached) " >&6
18372 dirfd_save_CFLAGS=$CFLAGS
18373 for ac_expr in d_fd dd_fd; do
18375 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18377 /* end confdefs.h. */
18379 #include <sys/types.h>
18380 #include <dirent.h>
18384 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18389 if ac_fn_c_try_compile "$LINENO"
18394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18395 CFLAGS=$dirfd_save_CFLAGS
18396 test "$dir_fd_found" = yes && break
18398 test "$dir_fd_found" = yes || ac_expr=no_such_member
18400 gl_cv_sys_dir_fd_member_name=$ac_expr
18404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18405 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
18406 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18408 cat >>confdefs.h <<_ACEOF
18409 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18427 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18438 printf %s "checking whether // is distinct from /... " >&6; }
18439 if test ${gl_cv_double_slash_root+y}
18441 printf %s "(cached) " >&6
18443 if test x"$cross_compiling" = xyes ; then
18444 # When cross-compiling, there is no way to tell whether // is special
18445 # short of a list of hosts. However, the only known hosts to date
18446 # that have a distinct // are Apollo DomainOS (too old to port to),
18447 # Cygwin, and z/OS. If anyone knows of another system for which // has
18448 # special semantics and is distinct from /, please report it to
18449 # <bug-gnulib@gnu.org>.
18451 *-cygwin | i370-ibm-openedition)
18452 gl_cv_double_slash_root=yes ;;
18454 # Be optimistic and assume that / and // are the same when we
18456 gl_cv_double_slash_root='unknown, assuming no' ;;
18459 set x `ls -di / // 2>/dev/null`
18460 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18461 gl_cv_double_slash_root=no
18463 gl_cv_double_slash_root=yes
18467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18468 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
18469 if test "$gl_cv_double_slash_root" = yes; then
18471 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18478 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18485 if test $ac_cv_func_fchdir = no; then
18489 if test $HAVE_FCHDIR = 0; then
18493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
18494 printf %s "checking whether dup works... " >&6; }
18495 if test ${gl_cv_func_dup_works+y}
18497 printf %s "(cached) " >&6
18499 if test "$cross_compiling" = yes
18501 gl_cv_func_dup_works='guessing yes'
18503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18504 /* end confdefs.h. */
18505 #include <unistd.h>
18511 /* On OS/2 kLIBC, dup does not work on a directory fd. */
18512 int fd = open (".", O_RDONLY);
18513 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
18520 if ac_fn_c_try_run "$LINENO"
18522 gl_cv_func_dup_works=yes
18524 gl_cv_func_dup_works=no
18526 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18527 conftest.$ac_objext conftest.beam conftest.$ac_ext
18532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
18533 printf "%s\n" "$gl_cv_func_dup_works" >&6; }
18534 case "$gl_cv_func_dup_works" in
18541 if test $REPLACE_DUP = 1; then
18550 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18565 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
18574 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
18577 if test $HAVE_DUP2 = 1; then
18578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18579 printf %s "checking whether dup2 works... " >&6; }
18580 if test ${gl_cv_func_dup2_works+y}
18582 printf %s "(cached) " >&6
18584 if test "$cross_compiling" = yes
18587 mingw*) # on this platform, dup2 always returns 0 for success
18588 gl_cv_func_dup2_works="guessing no" ;;
18589 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18590 gl_cv_func_dup2_works="guessing no" ;;
18592 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
18594 gl_cv_func_dup2_works="guessing no" ;;
18595 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18596 gl_cv_func_dup2_works="guessing no" ;;
18597 *-android*) # implemented using dup3(), which fails if oldfd == newfd
18598 gl_cv_func_dup2_works="guessing no" ;;
18599 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
18600 gl_cv_func_dup2_works="guessing no" ;;
18601 *) gl_cv_func_dup2_works="guessing yes" ;;
18604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18605 /* end confdefs.h. */
18609 #include <limits.h>
18610 #include <sys/resource.h>
18611 #include <unistd.h>
18612 #ifndef RLIM_SAVED_CUR
18613 # define RLIM_SAVED_CUR RLIM_INFINITY
18615 #ifndef RLIM_SAVED_MAX
18616 # define RLIM_SAVED_MAX RLIM_INFINITY
18623 int bad_fd = INT_MAX;
18624 struct rlimit rlim;
18625 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18626 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18627 && rlim.rlim_cur != RLIM_INFINITY
18628 && rlim.rlim_cur != RLIM_SAVED_MAX
18629 && rlim.rlim_cur != RLIM_SAVED_CUR)
18630 bad_fd = rlim.rlim_cur;
18632 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18635 if (dup2 (1, 1) != 1)
18638 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18642 if (dup2 (0, 0) != -1)
18644 /* Many gnulib modules require POSIX conformance of EBADF. */
18645 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
18647 /* Flush out some cygwin core dumps. */
18648 if (dup2 (2, -1) != -1 || errno != EBADF)
18652 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
18654 int fd = open (".", O_RDONLY);
18657 else if (dup2 (fd, fd + 1) == -1)
18668 if ac_fn_c_try_run "$LINENO"
18670 gl_cv_func_dup2_works=yes
18672 gl_cv_func_dup2_works=no
18674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18675 conftest.$ac_objext conftest.beam conftest.$ac_ext
18680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18681 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
18682 case "$gl_cv_func_dup2_works" in
18686 for ac_func in setdtablesize
18688 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
18689 if test "x$ac_cv_func_setdtablesize" = xyes
18691 cat >>confdefs.h <<_ACEOF
18692 #define HAVE_SETDTABLESIZE 1
18705 if test $ac_cv_func_fchdir = no; then
18709 if test $HAVE_FCHDIR = 0; then
18710 if test $HAVE_DUP2 = 1; then
18716 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18725 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18740 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18747 printf %s "checking for error_at_line... " >&6; }
18748 if test ${ac_cv_lib_error_at_line+y}
18750 printf %s "(cached) " >&6
18752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18753 /* end confdefs.h. */
18758 error_at_line (0, 0, "", 0, "an error occurred");
18763 if ac_fn_c_try_link "$LINENO"
18765 ac_cv_lib_error_at_line=yes
18767 ac_cv_lib_error_at_line=no
18769 rm -f core conftest.err conftest.$ac_objext \
18770 conftest$ac_exeext conftest.$ac_ext
18772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18773 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
18775 if test $ac_cv_lib_error_at_line = no; then
18784 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18798 if test $ac_cv_have_decl_fchdir = no; then
18803 if test $HAVE_FCHDIR = 0; then
18812 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18816 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
18818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18819 printf %s "checking whether open can visit directories... " >&6; }
18820 if test ${gl_cv_func_open_directory_works+y}
18822 printf %s "(cached) " >&6
18824 if test "$cross_compiling" = yes
18827 # Guess yes on glibc systems.
18828 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18829 # If we don't know, assume the worst.
18830 *) gl_cv_func_open_directory_works="guessing no" ;;
18834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18835 /* end confdefs.h. */
18841 return open(".", O_RDONLY) < 0;
18846 if ac_fn_c_try_run "$LINENO"
18848 gl_cv_func_open_directory_works=yes
18850 gl_cv_func_open_directory_works=no
18852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18853 conftest.$ac_objext conftest.beam conftest.$ac_ext
18857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18858 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
18859 case "$gl_cv_func_open_directory_works" in
18863 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18880 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
18890 printf %s "checking whether fflush works on input streams... " >&6; }
18891 if test ${gl_cv_func_fflush_stdin+y}
18893 printf %s "(cached) " >&6
18895 echo hello world > conftest.txt
18896 if test "$cross_compiling" = yes
18898 gl_cv_func_fflush_stdin=cross
18900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18901 /* end confdefs.h. */
18905 # include <unistd.h>
18906 #else /* on Windows with MSVC */
18913 FILE *f = fopen ("conftest.txt", "r");
18920 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
18922 /* For deterministic results, ensure f read a bigger buffer. */
18923 if (lseek (fd, 0, SEEK_CUR) == 5)
18925 /* POSIX requires fflush-fseek to set file offset of fd. This fails
18926 on BSD systems and on mingw. */
18927 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
18929 if (lseek (fd, 0, SEEK_CUR) != 5)
18931 /* Verify behaviour of fflush after ungetc. See
18932 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
18933 /* Verify behaviour of fflush after a backup ungetc. This fails on
18938 if (fgetc (f) != c)
18940 /* Verify behaviour of fflush after a non-backup ungetc. This fails
18941 on glibc 2.8 and on BSD systems. */
18945 if (fgetc (f) != c)
18953 if ac_fn_c_try_run "$LINENO"
18955 gl_cv_func_fflush_stdin=yes
18957 gl_cv_func_fflush_stdin=no
18959 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18960 conftest.$ac_objext conftest.beam conftest.$ac_ext
18966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
18967 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
18968 case $gl_cv_func_fflush_stdin in
18969 yes) gl_func_fflush_stdin=1 ;;
18970 no) gl_func_fflush_stdin=0 ;;
18971 *) gl_func_fflush_stdin='(-1)' ;;
18974 cat >>confdefs.h <<_ACEOF
18975 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
18979 if test $gl_cv_func_fflush_stdin != yes; then
18984 if test $REPLACE_CLOSE = 1; then
18988 if test $REPLACE_FCLOSE = 1; then
18997 gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
19011 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
19020 if test $ac_cv_func_fcntl = no; then
19024 if test $ac_cv_func_fcntl = no; then
19031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
19032 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
19033 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
19035 printf %s "(cached) " >&6
19037 if test "$cross_compiling" = yes
19040 aix* | cygwin* | haiku*)
19041 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
19042 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
19045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19046 /* end confdefs.h. */
19049 #include <limits.h>
19050 #include <sys/resource.h>
19051 #include <unistd.h>
19052 #ifndef RLIM_SAVED_CUR
19053 # define RLIM_SAVED_CUR RLIM_INFINITY
19055 #ifndef RLIM_SAVED_MAX
19056 # define RLIM_SAVED_MAX RLIM_INFINITY
19063 int bad_fd = INT_MAX;
19064 struct rlimit rlim;
19065 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19066 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19067 && rlim.rlim_cur != RLIM_INFINITY
19068 && rlim.rlim_cur != RLIM_SAVED_MAX
19069 && rlim.rlim_cur != RLIM_SAVED_CUR)
19070 bad_fd = rlim.rlim_cur;
19071 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
19072 if (errno != EINVAL) result |= 2;
19073 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
19074 if (errno != EINVAL) result |= 8;
19075 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
19078 fd = open (".", O_RDONLY);
19081 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
19091 if ac_fn_c_try_run "$LINENO"
19093 gl_cv_func_fcntl_f_dupfd_works=yes
19095 gl_cv_func_fcntl_f_dupfd_works=no
19097 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19098 conftest.$ac_objext conftest.beam conftest.$ac_ext
19102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
19103 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
19104 case $gl_cv_func_fcntl_f_dupfd_works in
19109 if test $ac_cv_func_fcntl = no; then
19116 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
19120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
19121 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
19122 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
19124 printf %s "(cached) " >&6
19126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19127 /* end confdefs.h. */
19130 #ifndef F_DUPFD_CLOEXEC
19142 if ac_fn_c_try_compile "$LINENO"
19144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19145 /* end confdefs.h. */
19148 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19149 it to support the semantics on older kernels that failed with EINVAL. */
19161 if ac_fn_c_try_compile "$LINENO"
19163 gl_cv_func_fcntl_f_dupfd_cloexec=yes
19165 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
19167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19169 gl_cv_func_fcntl_f_dupfd_cloexec=no
19171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19174 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19175 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
19179 if test $ac_cv_func_fcntl = no; then
19191 if test $ac_cv_func_fchdir = no; then
19195 if test $HAVE_FCHDIR = 0; then
19199 if test $ac_cv_func_fcntl = no; then
19208 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
19217 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
19231 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
19246 if test $gl_cv_have_include_next = yes; then
19247 gl_cv_next_fcntl_h='<'fcntl.h'>'
19249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
19250 printf %s "checking absolute name of <fcntl.h>... " >&6; }
19251 if test ${gl_cv_next_fcntl_h+y}
19253 printf %s "(cached) " >&6
19258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19259 /* end confdefs.h. */
19263 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19264 *) gl_absname_cpp="$ac_cpp" ;;
19269 gl_dirsep_regex='[/\\]'
19272 gl_dirsep_regex='\/'
19275 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19276 gl_header_literal_regex=`echo 'fcntl.h' \
19277 | sed -e "$gl_make_literal_regex_sed"`
19278 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19279 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19285 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19286 sed -n "$gl_absolute_header_sed"`
19288 gl_header=$gl_cv_absolute_fcntl_h
19289 gl_cv_next_fcntl_h='"'$gl_header'"'
19293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
19294 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
19296 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
19298 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19299 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19300 gl_next_as_first_directive='<'fcntl.h'>'
19302 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19303 gl_next_as_first_directive=$gl_cv_next_fcntl_h
19305 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
19322 cat >>confdefs.h <<_ACEOF
19323 #define GNULIB_FCNTL_SAFER 1
19334 if test $ac_cv_have_decl_fdatasync = no; then
19335 HAVE_DECL_FDATASYNC=0
19336 for ac_func in fdatasync
19338 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
19339 if test "x$ac_cv_func_fdatasync" = xyes
19341 cat >>confdefs.h <<_ACEOF
19342 #define HAVE_FDATASYNC 1
19348 if test $ac_cv_func_fdatasync = no; then
19352 gl_saved_libs=$LIBS
19353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
19354 printf %s "checking for library containing fdatasync... " >&6; }
19355 if test ${ac_cv_search_fdatasync+y}
19357 printf %s "(cached) " >&6
19359 ac_func_search_save_LIBS=$LIBS
19360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19361 /* end confdefs.h. */
19363 /* Override any GCC internal prototype to avoid an error.
19364 Use char because int might match the return type of a GCC
19365 builtin and then its argument prototype would still apply. */
19373 return fdatasync ();
19378 for ac_lib in '' rt posix4
19380 if test -z "$ac_lib"; then
19381 ac_res="none required"
19384 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19386 if ac_fn_c_try_link "$LINENO"
19388 ac_cv_search_fdatasync=$ac_res
19390 rm -f core conftest.err conftest.$ac_objext \
19392 if test ${ac_cv_search_fdatasync+y}
19397 if test ${ac_cv_search_fdatasync+y}
19401 ac_cv_search_fdatasync=no
19403 rm conftest.$ac_ext
19404 LIBS=$ac_func_search_save_LIBS
19406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
19407 printf "%s\n" "$ac_cv_search_fdatasync" >&6; }
19408 ac_res=$ac_cv_search_fdatasync
19409 if test "$ac_res" != no
19411 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19412 test "$ac_cv_search_fdatasync" = "none required" ||
19413 LIB_FDATASYNC=$ac_cv_search_fdatasync
19416 LIBS=$gl_saved_libs
19419 if test $HAVE_FDATASYNC = 0; then
19428 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
19442 printf "%s\n" "#define GNULIB_TEST_FDATASYNC 1" >>confdefs.h
19451 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19452 #include <dirent.h>
19455 if test "x$ac_cv_have_decl_fdopendir" = xyes
19462 cat >>confdefs.h <<_ACEOF
19463 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19465 if test $ac_have_decl = 1
19469 HAVE_DECL_FDOPENDIR=0
19473 if test $ac_cv_func_fdopendir = no; then
19476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19477 printf %s "checking whether fdopendir works... " >&6; }
19478 if test ${gl_cv_func_fdopendir_works+y}
19480 printf %s "(cached) " >&6
19482 if test "$cross_compiling" = yes
19485 # Guess yes on glibc systems.
19486 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19487 # If we don't know, assume the worst.
19488 *) gl_cv_func_fdopendir_works="guessing no" ;;
19492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19493 /* end confdefs.h. */
19495 #include <dirent.h>
19497 #include <unistd.h>
19498 #if !HAVE_DECL_FDOPENDIR
19500 # ifdef __cplusplus
19503 DIR *fdopendir (int);
19510 int fd = open ("conftest.c", O_RDONLY);
19511 if (fd < 0) result |= 1;
19512 if (fdopendir (fd)) result |= 2;
19513 if (close (fd)) result |= 4;
19519 if ac_fn_c_try_run "$LINENO"
19521 gl_cv_func_fdopendir_works=yes
19523 gl_cv_func_fdopendir_works=no
19525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19526 conftest.$ac_objext conftest.beam conftest.$ac_ext
19530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19531 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
19532 case "$gl_cv_func_fdopendir_works" in
19535 REPLACE_FDOPENDIR=1
19540 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19549 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19563 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19569 cat >>confdefs.h <<_ACEOF
19570 #define GNULIB_FDOPENDIR 1
19578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19579 printf %s "checking whether fflush works on input streams... " >&6; }
19580 if test ${gl_cv_func_fflush_stdin+y}
19582 printf %s "(cached) " >&6
19584 echo hello world > conftest.txt
19585 if test "$cross_compiling" = yes
19587 gl_cv_func_fflush_stdin=cross
19589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19590 /* end confdefs.h. */
19594 # include <unistd.h>
19595 #else /* on Windows with MSVC */
19602 FILE *f = fopen ("conftest.txt", "r");
19609 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19611 /* For deterministic results, ensure f read a bigger buffer. */
19612 if (lseek (fd, 0, SEEK_CUR) == 5)
19614 /* POSIX requires fflush-fseek to set file offset of fd. This fails
19615 on BSD systems and on mingw. */
19616 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19618 if (lseek (fd, 0, SEEK_CUR) != 5)
19620 /* Verify behaviour of fflush after ungetc. See
19621 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
19622 /* Verify behaviour of fflush after a backup ungetc. This fails on
19627 if (fgetc (f) != c)
19629 /* Verify behaviour of fflush after a non-backup ungetc. This fails
19630 on glibc 2.8 and on BSD systems. */
19634 if (fgetc (f) != c)
19642 if ac_fn_c_try_run "$LINENO"
19644 gl_cv_func_fflush_stdin=yes
19646 gl_cv_func_fflush_stdin=no
19648 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19649 conftest.$ac_objext conftest.beam conftest.$ac_ext
19655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19656 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
19657 case $gl_cv_func_fflush_stdin in
19658 yes) gl_func_fflush_stdin=1 ;;
19659 no) gl_func_fflush_stdin=0 ;;
19660 *) gl_func_fflush_stdin='(-1)' ;;
19663 cat >>confdefs.h <<_ACEOF
19664 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
19668 if test $gl_cv_func_fflush_stdin != yes; then
19672 if test $REPLACE_FFLUSH = 1; then
19681 gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
19687 cat >>confdefs.h <<_ACEOF
19688 #define GNULIB_FFLUSH 1
19703 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
19714 REPLACE_FLOAT_LDBL=0
19716 aix* | beos* | openbsd* | mirbsd* | irix*)
19720 case "$host_cpu" in
19725 # On x86_64 systems, the C compiler may still be generating
19727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19728 /* end confdefs.h. */
19729 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19734 $EGREP "yes" >/dev/null 2>&1
19746 case "$host_cpu" in
19754 aix* | freebsd* | linux*)
19755 if test -n "$FLOAT_H"; then
19756 REPLACE_FLOAT_LDBL=1
19762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19763 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
19764 if test ${gl_cv_func_itold_works+y}
19766 printf %s "(cached) " >&6
19769 if test "$cross_compiling" = yes
19773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19774 /* end confdefs.h. */
19775 #if defined __LP64__ || defined __arch64__
19779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19780 $EGREP "yes" >/dev/null 2>&1
19782 gl_cv_func_itold_works="guessing no"
19784 gl_cv_func_itold_works="guessing yes"
19789 *) gl_cv_func_itold_works="guessing yes" ;;
19793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19794 /* end confdefs.h. */
19797 volatile long double ld;
19806 if ac_fn_c_try_run "$LINENO"
19808 gl_cv_func_itold_works=yes
19810 gl_cv_func_itold_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
19818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19819 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
19820 case "$gl_cv_func_itold_works" in
19827 if test -n "$FLOAT_H"; then
19836 if test $gl_cv_have_include_next = yes; then
19837 gl_cv_next_float_h='<'float.h'>'
19839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19840 printf %s "checking absolute name of <float.h>... " >&6; }
19841 if test ${gl_cv_next_float_h+y}
19843 printf %s "(cached) " >&6
19848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19849 /* end confdefs.h. */
19853 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19854 *) gl_absname_cpp="$ac_cpp" ;;
19859 gl_dirsep_regex='[/\\]'
19862 gl_dirsep_regex='\/'
19865 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19866 gl_header_literal_regex=`echo 'float.h' \
19867 | sed -e "$gl_make_literal_regex_sed"`
19868 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19869 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19875 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19876 sed -n "$gl_absolute_header_sed"`
19878 gl_header=$gl_cv_absolute_float_h
19879 gl_cv_next_float_h='"'$gl_header'"'
19883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19884 printf "%s\n" "$gl_cv_next_float_h" >&6; }
19886 NEXT_FLOAT_H=$gl_cv_next_float_h
19888 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19889 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19890 gl_next_as_first_directive='<'float.h'>'
19892 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19893 gl_next_as_first_directive=$gl_cv_next_float_h
19895 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19902 if test -n "$FLOAT_H"; then
19903 GL_GENERATE_FLOAT_H_TRUE=
19904 GL_GENERATE_FLOAT_H_FALSE='#'
19906 GL_GENERATE_FLOAT_H_TRUE='#'
19907 GL_GENERATE_FLOAT_H_FALSE=
19912 if test $REPLACE_FLOAT_LDBL = 1; then
19921 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19924 if test $REPLACE_ITOLD = 1; then
19933 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19951 gl_cv_func_fprintf_posix=no
19952 case "$gl_cv_func_printf_sizes_c99" in
19954 case "$gl_cv_func_printf_long_double" in
19956 case "$gl_cv_func_printf_infinite" in
19958 case "$gl_cv_func_printf_infinite_long_double" in
19960 case "$gl_cv_func_printf_directive_a" in
19962 case "$gl_cv_func_printf_directive_f" in
19964 case "$gl_cv_func_printf_directive_n" in
19966 case "$gl_cv_func_printf_directive_ls" in
19968 case "$gl_cv_func_printf_positions" in
19970 case "$gl_cv_func_printf_flag_grouping" in
19972 case "$gl_cv_func_printf_flag_leftadjust" in
19974 case "$gl_cv_func_printf_flag_zero" in
19976 case "$gl_cv_func_printf_precision" in
19978 case "$gl_cv_func_printf_enomem" in
19980 # fprintf exists and is
19981 # already POSIX compliant.
19982 gl_cv_func_fprintf_posix=yes
20011 if test $gl_cv_func_fprintf_posix = no; then
20015 case "$gl_cv_func_printf_infinite" in
20020 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
20028 case "$gl_cv_func_printf_long_double" in
20030 case "$gl_cv_func_printf_infinite_long_double" in
20035 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
20044 case "$gl_cv_func_printf_directive_a" in
20049 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
20051 for ac_func in nl_langinfo
20053 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
20054 if test "x$ac_cv_func_nl_langinfo" = xyes
20056 cat >>confdefs.h <<_ACEOF
20057 #define HAVE_NL_LANGINFO 1
20068 case "$gl_cv_func_printf_directive_f" in
20073 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
20080 case "$gl_cv_func_printf_directive_ls" in
20085 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
20092 case "$gl_cv_func_printf_flag_grouping" in
20097 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
20104 case "$gl_cv_func_printf_flag_leftadjust" in
20109 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
20116 case "$gl_cv_func_printf_flag_zero" in
20121 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
20128 case "$gl_cv_func_printf_precision" in
20133 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
20136 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
20139 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
20146 case "$gl_cv_func_printf_enomem" in
20151 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
20154 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
20157 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
20172 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
20182 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
20192 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
20202 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
20204 if test $ac_cv_func_vasnprintf = yes; then
20206 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
20220 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
20221 if test "x$ac_cv_type_ptrdiff_t" = xyes
20226 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
20247 gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
20251 printf "%s\n" "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
20262 GNULIB_FPRINTF_POSIX=1
20268 printf "%s\n" "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
20276 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
20278 if test "x$ac_cv_have_decl_fpurge" = xyes
20285 cat >>confdefs.h <<_ACEOF
20286 #define HAVE_DECL_FPURGE $ac_have_decl
20289 if test "x$ac_cv_func_fpurge" = xyes; then
20291 # Detect BSD bug. Only cygwin 1.7 is known to be immune.
20292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
20293 printf %s "checking whether fpurge works... " >&6; }
20294 if test ${gl_cv_func_fpurge_works+y}
20296 printf %s "(cached) " >&6
20298 if test "$cross_compiling" = yes
20300 gl_cv_func_fpurge_works='guessing no'
20302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20303 /* end confdefs.h. */
20309 FILE *f = fopen ("conftest.txt", "w+");
20311 if (fputc ('a', f) != 'a') return 2;
20313 if (fgetc (f) != 'a') return 3;
20314 if (fgetc (f) != EOF) return 4;
20315 if (fpurge (f) != 0) return 5;
20316 if (putc ('b', f) != 'b') return 6;
20317 if (fclose (f) != 0) return 7;
20318 if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
20319 if (fgetc (f) != 'a') return 9;
20320 if (fgetc (f) != 'b') return 10;
20321 if (fgetc (f) != EOF) return 11;
20322 if (fclose (f) != 0) return 12;
20323 if (remove ("conftest.txt") != 0) return 13;
20329 if ac_fn_c_try_run "$LINENO"
20331 gl_cv_func_fpurge_works=yes
20333 gl_cv_func_fpurge_works=no
20335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20336 conftest.$ac_objext conftest.beam conftest.$ac_ext
20340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
20341 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
20342 if test "x$gl_cv_func_fpurge_works" != xyes; then
20348 if test "x$ac_cv_have_decl_fpurge" = xno; then
20352 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
20361 gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
20375 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
20385 if test $gl_cv_func_frexp_no_libm = yes; then
20389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
20390 printf %s "checking whether frexp works... " >&6; }
20391 if test ${gl_cv_func_frexp_works+y}
20393 printf %s "(cached) " >&6
20396 if test "$cross_compiling" = yes
20399 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
20400 *) gl_cv_func_frexp_works="guessing yes";;
20404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20405 /* end confdefs.h. */
20409 #include <string.h>
20410 #if HAVE_DECL_ALARM
20411 # include <signal.h>
20412 # include <unistd.h>
20414 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
20415 ICC 10.0 has a bug when optimizing the expression -zero.
20416 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
20417 to PowerPC on Mac OS X 10.5. */
20418 #if defined __hpux || defined __sgi || defined __ICC
20420 compute_minus_zero (void)
20422 return -DBL_MIN * DBL_MIN;
20424 # define minus_zero compute_minus_zero ()
20426 double minus_zero = -0.0;
20434 #if HAVE_DECL_ALARM
20435 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
20436 number. Let the test fail in this case. */
20437 signal (SIGALRM, SIG_DFL);
20440 /* Test on denormalized numbers. */
20441 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
20446 double y = frexp (x, &exp);
20447 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
20448 On NetBSD: y = 0.75. Correct: y = 0.5. */
20452 /* Test on infinite numbers. */
20456 double y = frexp (x, &exp);
20460 /* Test on negative zero. */
20464 double y = frexp (x, &exp);
20465 if (memcmp (&y, &x, sizeof x))
20471 if ac_fn_c_try_run "$LINENO"
20473 gl_cv_func_frexp_works=yes
20475 gl_cv_func_frexp_works=no
20477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20478 conftest.$ac_objext conftest.beam conftest.$ac_ext
20483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
20484 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
20486 case "$gl_cv_func_frexp_works" in
20487 *yes) gl_func_frexp_no_libm=yes ;;
20488 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
20491 gl_func_frexp_no_libm=no
20494 if test $gl_func_frexp_no_libm = yes; then
20496 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
20500 if test $gl_func_frexp_no_libm != yes; then
20509 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20523 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20530 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
20532 if test "x$ac_cv_have_decl_frexpl" = xyes
20539 if test $HAVE_DECL_FREXPL = 1; then
20541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
20542 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
20543 if test ${gl_cv_func_frexpl_no_libm+y}
20545 printf %s "(cached) " >&6
20548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20549 /* end confdefs.h. */
20555 int e; return frexpl (x, &e) > 0;
20560 if ac_fn_c_try_link "$LINENO"
20562 gl_cv_func_frexpl_no_libm=yes
20564 gl_cv_func_frexpl_no_libm=no
20566 rm -f core conftest.err conftest.$ac_objext \
20567 conftest$ac_exeext conftest.$ac_ext
20570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
20571 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
20573 if test $gl_cv_func_frexpl_no_libm = yes; then
20576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
20577 printf %s "checking whether frexpl works... " >&6; }
20578 if test ${gl_cv_func_frexpl_works+y}
20580 printf %s "(cached) " >&6
20583 if test "$cross_compiling" = yes
20587 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
20588 gl_cv_func_frexpl_works="guessing no";;
20589 *) gl_cv_func_frexpl_works="guessing yes";;
20593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20594 /* end confdefs.h. */
20598 /* Override the values of <float.h>, like done in float.in.h. */
20599 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
20600 # undef LDBL_MIN_EXP
20601 # define LDBL_MIN_EXP (-16381)
20603 #if defined __i386__ && defined __FreeBSD__
20604 # undef LDBL_MIN_EXP
20605 # define LDBL_MIN_EXP (-16381)
20607 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
20608 # undef LDBL_MIN_EXP
20609 # define LDBL_MIN_EXP DBL_MIN_EXP
20611 #if defined __sgi && (LDBL_MANT_DIG >= 106)
20612 # if defined __GNUC__
20613 # undef LDBL_MIN_EXP
20614 # define LDBL_MIN_EXP DBL_MIN_EXP
20621 long double frexpl (long double, int *);
20625 volatile long double x;
20626 /* Test on finite numbers that fails on AIX 5.1. */
20634 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
20635 function returns an invalid (incorrectly normalized) value: it returns
20636 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
20637 but the correct result is
20638 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
20642 long double y = frexpl (x, &exp);
20643 if (!(exp == 1 && y == 0.505L))
20646 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
20647 LDBL_MAX_EXP = 16384.
20648 In the loop end test, we test x against Infinity, rather than comparing
20649 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
20652 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
20663 /* Test on denormalized numbers. */
20666 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
20671 long double y = frexpl (x, &exp);
20672 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
20673 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
20674 if (exp != LDBL_MIN_EXP - 1)
20678 /* Test on infinite numbers. */
20682 long double y = frexpl (x, &exp);
20689 if ac_fn_c_try_run "$LINENO"
20691 gl_cv_func_frexpl_works=yes
20693 gl_cv_func_frexpl_works=no
20695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20696 conftest.$ac_objext conftest.beam conftest.$ac_ext
20701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
20702 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
20704 case "$gl_cv_func_frexpl_works" in
20705 *yes) gl_func_frexpl_no_libm=yes ;;
20706 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
20709 gl_func_frexpl_no_libm=no
20712 if test $gl_func_frexpl_no_libm = yes; then
20714 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
20719 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
20728 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20742 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20749 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20753 if test $REPLACE_FSEEK = 1; then
20762 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
20776 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
20788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
20789 printf %s "checking for fseeko... " >&6; }
20790 if test ${gl_cv_func_fseeko+y}
20792 printf %s "(cached) " >&6
20795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20796 /* end confdefs.h. */
20802 fseeko (stdin, 0, 0);
20807 if ac_fn_c_try_link "$LINENO"
20809 gl_cv_func_fseeko=yes
20811 gl_cv_func_fseeko=no
20813 rm -f core conftest.err conftest.$ac_objext \
20814 conftest$ac_exeext conftest.$ac_ext
20817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
20818 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
20821 if test $ac_cv_have_decl_fseeko = no; then
20825 if test $gl_cv_func_fseeko = no; then
20828 if test $WINDOWS_64_BIT_OFF_T = 1; then
20831 if test $gl_cv_var_stdin_large_offset = no; then
20837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20838 printf %s "checking whether fflush works on input streams... " >&6; }
20839 if test ${gl_cv_func_fflush_stdin+y}
20841 printf %s "(cached) " >&6
20843 echo hello world > conftest.txt
20844 if test "$cross_compiling" = yes
20846 gl_cv_func_fflush_stdin=cross
20848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20849 /* end confdefs.h. */
20853 # include <unistd.h>
20854 #else /* on Windows with MSVC */
20861 FILE *f = fopen ("conftest.txt", "r");
20868 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20870 /* For deterministic results, ensure f read a bigger buffer. */
20871 if (lseek (fd, 0, SEEK_CUR) == 5)
20873 /* POSIX requires fflush-fseek to set file offset of fd. This fails
20874 on BSD systems and on mingw. */
20875 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20877 if (lseek (fd, 0, SEEK_CUR) != 5)
20879 /* Verify behaviour of fflush after ungetc. See
20880 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
20881 /* Verify behaviour of fflush after a backup ungetc. This fails on
20886 if (fgetc (f) != c)
20888 /* Verify behaviour of fflush after a non-backup ungetc. This fails
20889 on glibc 2.8 and on BSD systems. */
20893 if (fgetc (f) != c)
20901 if ac_fn_c_try_run "$LINENO"
20903 gl_cv_func_fflush_stdin=yes
20905 gl_cv_func_fflush_stdin=no
20907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20908 conftest.$ac_objext conftest.beam conftest.$ac_ext
20914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20915 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
20916 case $gl_cv_func_fflush_stdin in
20917 yes) gl_func_fflush_stdin=1 ;;
20918 no) gl_func_fflush_stdin=0 ;;
20919 *) gl_func_fflush_stdin='(-1)' ;;
20922 cat >>confdefs.h <<_ACEOF
20923 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
20927 if test $gl_cv_func_fflush_stdin != yes; then
20933 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20942 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
20945 for ac_func in _fseeki64
20947 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
20948 if test "x$ac_cv_func__fseeki64" = xyes
20950 cat >>confdefs.h <<_ACEOF
20951 #define HAVE__FSEEKI64 1
20970 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
20977 if test $ac_cv_func___fseterr = no; then
20986 gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
20993 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20998 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
21006 if test $ac_cv_func_fchdir = no; then
21010 if test $HAVE_FCHDIR = 0; then
21011 case "$gl_cv_func_open_directory_works" in
21020 if test $REPLACE_FSTAT = 1; then
21029 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
21044 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
21054 if test $ac_cv_func_fstatat = no; then
21057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
21058 printf %s "checking whether fstatat (..., 0) works... " >&6; }
21059 if test ${gl_cv_func_fstatat_zero_flag+y}
21061 printf %s "(cached) " >&6
21063 if test "$cross_compiling" = yes
21066 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
21067 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
21071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21072 /* end confdefs.h. */
21075 #include <sys/stat.h>
21080 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
21084 if ac_fn_c_try_run "$LINENO"
21086 gl_cv_func_fstatat_zero_flag=yes
21088 gl_cv_func_fstatat_zero_flag=no
21090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21091 conftest.$ac_objext conftest.beam conftest.$ac_ext
21096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
21097 printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
21099 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
21101 *) REPLACE_FSTATAT=1
21102 case $gl_cv_func_fstatat_zero_flag in
21105 printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
21113 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
21122 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
21136 printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
21143 if test $ac_cv_func_fsync = no; then
21147 if test $HAVE_FSYNC = 0; then
21156 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
21171 printf "%s\n" "#define GNULIB_TEST_FSYNC 1" >>confdefs.h
21178 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
21182 if test $REPLACE_FTELL = 1; then
21191 gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
21205 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
21218 if test $ac_cv_have_decl_ftello = no; then
21222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
21223 printf %s "checking for ftello... " >&6; }
21224 if test ${gl_cv_func_ftello+y}
21226 printf %s "(cached) " >&6
21229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21230 /* end confdefs.h. */
21240 if ac_fn_c_try_link "$LINENO"
21242 gl_cv_func_ftello=yes
21244 gl_cv_func_ftello=no
21246 rm -f core conftest.err conftest.$ac_objext \
21247 conftest$ac_exeext conftest.$ac_ext
21250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
21251 printf "%s\n" "$gl_cv_func_ftello" >&6; }
21252 if test $gl_cv_func_ftello = no; then
21255 if test $WINDOWS_64_BIT_OFF_T = 1; then
21258 if test $gl_cv_var_stdin_large_offset = no; then
21261 if test $REPLACE_FTELLO = 0; then
21263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
21264 printf %s "checking whether ftello works... " >&6; }
21265 if test ${gl_cv_func_ftello_works+y}
21267 printf %s "(cached) " >&6
21271 # Guess no on Solaris.
21272 solaris*) gl_cv_func_ftello_works="guessing no" ;;
21273 # Guess yes otherwise.
21274 *) gl_cv_func_ftello_works="guessing yes" ;;
21276 if test "$cross_compiling" = yes
21280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21281 /* end confdefs.h. */
21284 #include <stdlib.h>
21285 #include <string.h>
21286 #define TESTFILE "conftest.tmp"
21292 /* Create a file with some contents. */
21293 fp = fopen (TESTFILE, "w");
21296 if (fwrite ("foogarsh", 1, 8, fp) < 8)
21301 /* The file's contents is now "foogarsh". */
21303 /* Try writing after reading to EOF. */
21304 fp = fopen (TESTFILE, "r+");
21307 if (fseek (fp, -1, SEEK_END))
21309 if (!(getc (fp) == 'h'))
21311 if (!(getc (fp) == EOF))
21313 if (!(ftell (fp) == 8))
21315 if (!(ftell (fp) == 8))
21317 if (!(putc ('!', fp) == '!'))
21319 if (!(ftell (fp) == 9))
21321 if (!(fclose (fp) == 0))
21323 fp = fopen (TESTFILE, "r");
21328 if (!(fread (buf, 1, 10, fp) == 9))
21330 if (!(memcmp (buf, "foogarsh!", 9) == 0))
21333 if (!(fclose (fp) == 0))
21336 /* The file's contents is now "foogarsh!". */
21341 if ac_fn_c_try_run "$LINENO"
21343 gl_cv_func_ftello_works=yes
21345 gl_cv_func_ftello_works=no
21347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21348 conftest.$ac_objext conftest.beam conftest.$ac_ext
21353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
21354 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
21355 case "$gl_cv_func_ftello_works" in
21360 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
21367 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
21376 gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
21379 for ac_func in _ftelli64
21381 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
21382 if test "x$ac_cv_func__ftelli64" = xyes
21384 cat >>confdefs.h <<_ACEOF
21385 #define HAVE__FTELLI64 1
21404 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
21413 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
21420 if test $REPLACE_GETCWD = 1; then
21429 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
21443 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21452 if test $ac_cv_func_getdtablesize = yes &&
21453 test $ac_cv_have_decl_getdtablesize = yes; then
21454 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
21455 # up to an unchangeable hard limit; all other platforms correctly
21456 # require setrlimit before getdtablesize() can report a larger value.
21457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21458 printf %s "checking whether getdtablesize works... " >&6; }
21459 if test ${gl_cv_func_getdtablesize_works+y}
21461 printf %s "(cached) " >&6
21463 if test "$cross_compiling" = yes
21466 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21467 gl_cv_func_getdtablesize_works="guessing no" ;;
21468 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21472 /* end confdefs.h. */
21474 #include <unistd.h>
21478 int size = getdtablesize();
21479 if (dup2 (0, getdtablesize()) != -1)
21481 if (size != getdtablesize())
21488 if ac_fn_c_try_run "$LINENO"
21490 gl_cv_func_getdtablesize_works=yes
21492 gl_cv_func_getdtablesize_works=no
21494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21495 conftest.$ac_objext conftest.beam conftest.$ac_ext
21500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21501 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
21502 case "$gl_cv_func_getdtablesize_works" in
21504 *) REPLACE_GETDTABLESIZE=1 ;;
21507 HAVE_GETDTABLESIZE=0
21510 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
21519 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
21528 GNULIB_GETDTABLESIZE=1
21534 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21543 if test $REPLACE_GETOPT = 1; then
21552 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21562 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21567 GNULIB_GL_UNISTD_H_GETOPT=1
21572 printf "%s\n" "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
21581 if test -n "$gl_replace_getopt"; then
21585 if test $REPLACE_GETOPT = 1; then
21589 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21595 if test $REPLACE_GETOPT = 1; then
21604 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21614 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21619 GNULIB_GL_UNISTD_H_GETOPT=1
21635 gl_gettimeofday_timezone=void
21636 if test $ac_cv_func_gettimeofday != yes; then
21637 HAVE_GETTIMEOFDAY=0
21642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21643 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21644 if test ${gl_cv_func_gettimeofday_clobber+y}
21646 printf %s "(cached) " >&6
21648 if test "$cross_compiling" = yes
21650 # When cross-compiling:
21652 # Guess all is fine on glibc systems.
21653 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21654 # If we don't know, assume the worst.
21655 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21660 /* end confdefs.h. */
21661 #include <string.h>
21662 #include <sys/time.h>
21664 #include <stdlib.h>
21672 struct tm saved_lt;
21674 lt = localtime (&t);
21676 gettimeofday (&tv, NULL);
21677 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21683 if ac_fn_c_try_run "$LINENO"
21685 gl_cv_func_gettimeofday_clobber=no
21687 gl_cv_func_gettimeofday_clobber=yes
21689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21690 conftest.$ac_objext conftest.beam conftest.$ac_ext
21694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21695 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
21697 case "$gl_cv_func_gettimeofday_clobber" in
21699 REPLACE_GETTIMEOFDAY=1
21702 REPLACE_LOCALTIME=1
21705 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21711 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
21712 if test ${gl_cv_func_gettimeofday_posix_signature+y}
21714 printf %s "(cached) " >&6
21716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21717 /* end confdefs.h. */
21718 #include <sys/time.h>
21720 int gettimeofday (struct timeval *restrict, void *restrict);
21725 /* glibc uses struct timezone * rather than the POSIX void *
21726 if _GNU_SOURCE is defined. However, since the only portable
21727 use of gettimeofday uses NULL as the second parameter, and
21728 since the glibc definition is actually more typesafe, it is
21729 not worth wrapping this to get a compliant signature. */
21730 int (*f) (struct timeval *restrict, void *restrict)
21733 return !(x | c.tv_sec | c.tv_usec);
21739 if ac_fn_c_try_compile "$LINENO"
21741 gl_cv_func_gettimeofday_posix_signature=yes
21743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21744 /* end confdefs.h. */
21745 #include <sys/time.h>
21746 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21756 if ac_fn_c_try_compile "$LINENO"
21758 gl_cv_func_gettimeofday_posix_signature=almost
21760 gl_cv_func_gettimeofday_posix_signature=no
21762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21767 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21768 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21769 gl_gettimeofday_timezone='struct timezone'
21770 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21771 REPLACE_GETTIMEOFDAY=1
21773 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21774 REPLACE_GETTIMEOFDAY=1
21779 cat >>confdefs.h <<_ACEOF
21780 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21784 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21793 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21796 for ac_header in sys/timeb.h
21798 ac_fn_c_check_header_compile "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21799 if test "x$ac_cv_header_sys_timeb_h" = xyes
21801 cat >>confdefs.h <<_ACEOF
21802 #define HAVE_SYS_TIMEB_H 1
21808 for ac_func in _ftime
21810 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21811 if test "x$ac_cv_func__ftime" = xyes
21813 cat >>confdefs.h <<_ACEOF
21814 #define HAVE__FTIME 1
21827 GNULIB_GETTIMEOFDAY=1
21833 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21838 if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
21847 # Autoconf 2.61a.99 and earlier don't support linking a file only
21848 # in VPATH builds. But since GNUmakefile is for maintainer use
21849 # only, it does not matter if we skip the link with older autoconf.
21850 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21851 # builds, so use a shell variable to bypass this.
21852 GNUmakefile=GNUmakefile
21853 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
21857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21858 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
21859 if test ${gl_cv_func_isnand_no_libm+y}
21861 printf %s "(cached) " >&6
21864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21865 /* end confdefs.h. */
21869 # define isnand(x) __builtin_isnan ((double)(x))
21872 # define isnand(x) isnan ((double)(x))
21883 if ac_fn_c_try_link "$LINENO"
21885 gl_cv_func_isnand_no_libm=yes
21887 gl_cv_func_isnand_no_libm=no
21889 rm -f core conftest.err conftest.$ac_objext \
21890 conftest$ac_exeext conftest.$ac_ext
21893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21894 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
21896 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21897 if test $gl_cv_func_isnand_no_libm = yes; then
21899 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21903 if test $gl_func_isnand_no_libm != yes; then
21912 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
21921 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
21922 if test ${gl_cv_func_isnanf_no_libm+y}
21924 printf %s "(cached) " >&6
21927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21928 /* end confdefs.h. */
21932 # define isnanf(x) __builtin_isnanf ((float)(x))
21933 #elif defined isnan
21935 # define isnanf(x) isnan ((float)(x))
21946 if ac_fn_c_try_link "$LINENO"
21948 gl_cv_func_isnanf_no_libm=yes
21950 gl_cv_func_isnanf_no_libm=no
21952 rm -f core conftest.err conftest.$ac_objext \
21953 conftest$ac_exeext conftest.$ac_ext
21956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
21957 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
21959 if test $gl_cv_func_isnanf_no_libm = yes; then
21963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
21964 printf %s "checking whether isnan(float) works... " >&6; }
21965 if test ${gl_cv_func_isnanf_works+y}
21967 printf %s "(cached) " >&6
21970 if test "$cross_compiling" = yes
21973 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
21974 *) gl_cv_func_isnanf_works="guessing yes";;
21978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21979 /* end confdefs.h. */
21984 # define isnanf(x) __builtin_isnanf ((float)(x))
21985 #elif defined isnan
21987 # define isnanf(x) isnan ((float)(x))
21989 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
21994 static float zero = 0.0f;
21995 return zero / zero;
21998 # define NaN() (0.0f / 0.0f)
22001 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22002 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
22007 if (isnanf (1.0f / 0.0f))
22010 if (!isnanf (NaN ()))
22013 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
22014 /* The isnanf function should be immune against changes in the sign bit and
22015 in the mantissa bits. The xor operation twiddles a bit that can only be
22016 a sign bit or a mantissa bit. */
22017 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
22022 /* Set the bits below the exponent to 01111...111. */
22023 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
22024 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
22025 if (!isnanf (m.value))
22033 if ac_fn_c_try_run "$LINENO"
22035 gl_cv_func_isnanf_works=yes
22037 gl_cv_func_isnanf_works=no
22039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22040 conftest.$ac_objext conftest.beam conftest.$ac_ext
22045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
22046 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
22049 if test $gl_cv_func_isnanf_no_libm = yes \
22050 && { case "$gl_cv_func_isnanf_works" in
22055 gl_func_isnanf_no_libm=yes
22057 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
22060 gl_func_isnanf_no_libm=no
22063 if test $gl_func_isnanf_no_libm != yes; then
22072 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
22076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
22077 printf %s "checking where to find the exponent in a 'float'... " >&6; }
22078 if test ${gl_cv_cc_float_expbit0+y}
22080 printf %s "(cached) " >&6
22083 if test "$cross_compiling" = yes
22085 gl_cv_cc_float_expbit0="word 0 bit 23"
22087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22088 /* end confdefs.h. */
22091 #include <stddef.h>
22093 #include <string.h>
22095 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22096 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
22097 static unsigned int ored_words[NWORDS];
22098 static unsigned int anded_words[NWORDS];
22099 static void add_to_ored_words (float x)
22103 /* Clear it first, in case
22104 sizeof (float) < sizeof (memory_float). */
22105 memset (&m, 0, sizeof (memory_float));
22107 for (i = 0; i < NWORDS; i++)
22109 ored_words[i] |= m.word[i];
22110 anded_words[i] &= m.word[i];
22116 FILE *fp = fopen ("conftest.out", "w");
22119 for (j = 0; j < NWORDS; j++)
22120 anded_words[j] = ~ (unsigned int) 0;
22121 add_to_ored_words (0.25f);
22122 add_to_ored_words (0.5f);
22123 add_to_ored_words (1.0f);
22124 add_to_ored_words (2.0f);
22125 add_to_ored_words (4.0f);
22126 /* Remove bits that are common (e.g. if representation of the first mantissa
22127 bit is explicit). */
22128 for (j = 0; j < NWORDS; j++)
22129 ored_words[j] &= ~anded_words[j];
22130 /* Now find the nonzero word. */
22131 for (j = 0; j < NWORDS; j++)
22132 if (ored_words[j] != 0)
22137 for (i = j + 1; i < NWORDS; i++)
22138 if (ored_words[i] != 0)
22140 fprintf (fp, "unknown");
22141 return (fclose (fp) != 0);
22144 if ((ored_words[j] >> i) & 1)
22146 fprintf (fp, "word %d bit %d", (int) j, (int) i);
22147 return (fclose (fp) != 0);
22150 fprintf (fp, "unknown");
22151 return (fclose (fp) != 0);
22155 if ac_fn_c_try_run "$LINENO"
22157 gl_cv_cc_float_expbit0=`cat conftest.out`
22159 gl_cv_cc_float_expbit0="unknown"
22161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22162 conftest.$ac_objext conftest.beam conftest.$ac_ext
22168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
22169 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
22170 case "$gl_cv_cc_float_expbit0" in
22172 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
22173 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
22175 cat >>confdefs.h <<_ACEOF
22176 #define FLT_EXPBIT0_WORD $word
22180 cat >>confdefs.h <<_ACEOF
22181 #define FLT_EXPBIT0_BIT $bit
22191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
22192 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
22193 if test ${gl_cv_func_isnanl_no_libm+y}
22195 printf %s "(cached) " >&6
22198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22199 /* end confdefs.h. */
22203 # define isnanl(x) __builtin_isnanl ((long double)(x))
22204 #elif defined isnan
22206 # define isnanl(x) isnan ((long double)(x))
22217 if ac_fn_c_try_link "$LINENO"
22219 gl_cv_func_isnanl_no_libm=yes
22221 gl_cv_func_isnanl_no_libm=no
22223 rm -f core conftest.err conftest.$ac_objext \
22224 conftest$ac_exeext conftest.$ac_ext
22227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
22228 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
22230 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
22231 if test $gl_func_isnanl_no_libm = yes; then
22236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
22237 printf %s "checking whether isnanl works... " >&6; }
22238 if test ${gl_cv_func_isnanl_works+y}
22240 printf %s "(cached) " >&6
22243 if test "$cross_compiling" = yes
22245 gl_cv_func_isnanl_works="guessing yes"
22247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22248 /* end confdefs.h. */
22251 #include <limits.h>
22255 # define isnanl(x) __builtin_isnanl ((long double)(x))
22256 #elif defined isnan
22258 # define isnanl(x) isnan ((long double)(x))
22261 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22262 typedef union { unsigned int word[NWORDS]; long double value; }
22263 memory_long_double;
22264 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
22265 runtime type conversion. */
22267 static long double NaNl ()
22270 return zero / zero;
22273 # define NaNl() (0.0L / 0.0L)
22279 if (!isnanl (NaNl ()))
22283 memory_long_double m;
22286 /* The isnanl function should be immune against changes in the sign bit and
22287 in the mantissa bits. The xor operation twiddles a bit that can only be
22288 a sign bit or a mantissa bit (since the exponent never extends to
22291 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
22292 for (i = 0; i < NWORDS; i++)
22294 if (!isnanl (m.value))
22298 #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
22299 /* Representation of an 80-bit 'long double' as an initializer for a sequence
22300 of 'unsigned int' words. */
22301 # ifdef WORDS_BIGENDIAN
22302 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22303 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
22304 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
22305 (unsigned int) (mantlo) << 16 \
22308 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22309 { mantlo, manthi, exponent }
22312 static memory_long_double x =
22313 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
22314 if (!isnanl (x.value))
22318 /* Signalling NaN. */
22319 static memory_long_double x =
22320 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
22321 if (!isnanl (x.value))
22324 /* isnanl should return something even for noncanonical values. */
22325 { /* Pseudo-NaN. */
22326 static memory_long_double x =
22327 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
22328 if (isnanl (x.value) && !isnanl (x.value))
22331 { /* Pseudo-Infinity. */
22332 static memory_long_double x =
22333 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
22334 if (isnanl (x.value) && !isnanl (x.value))
22337 { /* Pseudo-Zero. */
22338 static memory_long_double x =
22339 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
22340 if (isnanl (x.value) && !isnanl (x.value))
22343 { /* Unnormalized number. */
22344 static memory_long_double x =
22345 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
22346 if (isnanl (x.value) && !isnanl (x.value))
22349 { /* Pseudo-Denormal. */
22350 static memory_long_double x =
22351 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
22352 if (isnanl (x.value) && !isnanl (x.value))
22360 if ac_fn_c_try_run "$LINENO"
22362 gl_cv_func_isnanl_works=yes
22364 gl_cv_func_isnanl_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_isnanl_works" >&5
22373 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
22375 case "$gl_cv_func_isnanl_works" in
22377 *) gl_func_isnanl_no_libm=no ;;
22380 if test $gl_func_isnanl_no_libm = yes; then
22382 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
22386 if test $gl_func_isnanl_no_libm != yes; then
22395 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
22400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
22401 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
22402 if test ${gl_cv_cc_long_double_expbit0+y}
22404 printf %s "(cached) " >&6
22407 if test "$cross_compiling" = yes
22410 gl_cv_cc_long_double_expbit0="unknown"
22413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22414 /* end confdefs.h. */
22417 #include <stddef.h>
22419 #include <string.h>
22421 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22422 typedef union { long double value; unsigned int word[NWORDS]; }
22423 memory_long_double;
22424 static unsigned int ored_words[NWORDS];
22425 static unsigned int anded_words[NWORDS];
22426 static void add_to_ored_words (long double x)
22428 memory_long_double m;
22430 /* Clear it first, in case
22431 sizeof (long double) < sizeof (memory_long_double). */
22432 memset (&m, 0, sizeof (memory_long_double));
22434 for (i = 0; i < NWORDS; i++)
22436 ored_words[i] |= m.word[i];
22437 anded_words[i] &= m.word[i];
22443 FILE *fp = fopen ("conftest.out", "w");
22446 for (j = 0; j < NWORDS; j++)
22447 anded_words[j] = ~ (unsigned int) 0;
22448 add_to_ored_words (0.25L);
22449 add_to_ored_words (0.5L);
22450 add_to_ored_words (1.0L);
22451 add_to_ored_words (2.0L);
22452 add_to_ored_words (4.0L);
22453 /* Remove bits that are common (e.g. if representation of the first mantissa
22454 bit is explicit). */
22455 for (j = 0; j < NWORDS; j++)
22456 ored_words[j] &= ~anded_words[j];
22457 /* Now find the nonzero word. */
22458 for (j = 0; j < NWORDS; j++)
22459 if (ored_words[j] != 0)
22464 for (i = j + 1; i < NWORDS; i++)
22465 if (ored_words[i] != 0)
22467 fprintf (fp, "unknown");
22468 return (fclose (fp) != 0);
22471 if ((ored_words[j] >> i) & 1)
22473 fprintf (fp, "word %d bit %d", (int) j, (int) i);
22474 return (fclose (fp) != 0);
22477 fprintf (fp, "unknown");
22478 return (fclose (fp) != 0);
22482 if ac_fn_c_try_run "$LINENO"
22484 gl_cv_cc_long_double_expbit0=`cat conftest.out`
22486 gl_cv_cc_long_double_expbit0="unknown"
22488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22489 conftest.$ac_objext conftest.beam conftest.$ac_ext
22495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
22496 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
22497 case "$gl_cv_cc_long_double_expbit0" in
22499 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
22500 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
22502 cat >>confdefs.h <<_ACEOF
22503 #define LDBL_EXPBIT0_WORD $word
22507 cat >>confdefs.h <<_ACEOF
22508 #define LDBL_EXPBIT0_BIT $bit
22519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
22520 printf %s "checking for C compiler flag to ignore unused libraries... " >&6; }
22521 if test ${gl_cv_prog_c_ignore_unused_libraries+y}
22523 printf %s "(cached) " >&6
22525 gl_cv_prog_c_ignore_unused_libraries=none
22526 gl_saved_ldflags=$LDFLAGS
22527 gl_saved_libs=$LIBS
22528 # Link with -lm to detect binutils 2.16 bug with --as-needed; see
22529 # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
22531 # Use long option sequences like '-z ignore' to test for the feature,
22532 # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
22533 # GCC + binutils likes '-Wl,--as-needed'.
22534 # GCC + Solaris ld likes '-Wl,-z,ignore'.
22535 # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
22536 # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
22537 # native cc issues annoying warnings and then ignores it,
22538 # which would cause us to incorrectly conclude that it worked.
22539 for gl_flags in '-Wl,--as-needed' \
22544 LDFLAGS="$gl_flags $LDFLAGS"
22545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22546 /* end confdefs.h. */
22556 if ac_fn_c_try_link "$LINENO"
22558 gl_cv_prog_c_ignore_unused_libraries=$gl_flags
22560 rm -f core conftest.err conftest.$ac_objext \
22561 conftest$ac_exeext conftest.$ac_ext
22562 LDFLAGS=$gl_saved_ldflags
22563 test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
22566 LIBS=$gl_saved_libs
22569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
22570 printf "%s\n" "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
22571 IGNORE_UNUSED_LIBRARIES_CFLAGS=
22572 if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
22573 IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
22579 if test "$gl_threads_api" = posix; then
22580 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
22581 # pthread_rwlock_* functions.
22582 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
22584 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
22587 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
22591 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
22592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22593 /* end confdefs.h. */
22595 #include <pthread.h>
22600 #if __FreeBSD__ == 4
22601 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
22602 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
22603 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
22604 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
22606 int x = (int)PTHREAD_MUTEX_RECURSIVE;
22614 if ac_fn_c_try_compile "$LINENO"
22617 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
22620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22626 cat >>confdefs.h <<_ACEOF
22627 #define GNULIB_LOCK 1
22637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22638 printf %s "checking whether lseek detects pipes... " >&6; }
22639 if test ${gl_cv_func_lseek_pipe+y}
22641 printf %s "(cached) " >&6
22645 gl_cv_func_lseek_pipe=no
22648 if test $cross_compiling = no; then
22649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22650 /* end confdefs.h. */
22652 #include <sys/types.h> /* for off_t */
22653 #include <stdio.h> /* for SEEK_CUR */
22655 # include <unistd.h>
22656 #else /* on Windows with MSVC */
22664 /* Exit with success only if stdin is seekable. */
22665 return lseek (0, (off_t)0, SEEK_CUR) < 0;
22671 if ac_fn_c_try_link "$LINENO"
22673 if test -s conftest$ac_exeext \
22674 && ./conftest$ac_exeext < conftest.$ac_ext \
22675 && test 1 = "`echo hi \
22676 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22677 gl_cv_func_lseek_pipe=yes
22679 gl_cv_func_lseek_pipe=no
22683 gl_cv_func_lseek_pipe=no
22685 rm -f core conftest.err conftest.$ac_objext \
22686 conftest$ac_exeext conftest.$ac_ext
22688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22689 /* end confdefs.h. */
22691 #if defined __BEOS__
22692 /* BeOS mistakenly return 0 when trying to seek on pipes. */
22696 if ac_fn_c_try_compile "$LINENO"
22698 gl_cv_func_lseek_pipe=yes
22700 gl_cv_func_lseek_pipe=no
22702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22709 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
22710 if test $gl_cv_func_lseek_pipe = no; then
22713 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22718 if test $WINDOWS_64_BIT_OFF_T = 1; then
22722 if test $REPLACE_LSEEK = 1; then
22731 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22745 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22752 if test $ac_cv_func_lstat = yes; then
22754 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22763 if test $REPLACE_LSTAT = 1; then
22772 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22787 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22796 for ac_header in stdlib.h
22798 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22799 if test "x$ac_cv_header_stdlib_h" = xyes
22801 cat >>confdefs.h <<_ACEOF
22802 #define HAVE_STDLIB_H 1
22808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22809 printf %s "checking for GNU libc compatible malloc... " >&6; }
22810 if test ${ac_cv_func_malloc_0_nonnull+y}
22812 printf %s "(cached) " >&6
22814 if test "$cross_compiling" = yes
22817 # Guess yes on platforms where we know the result.
22818 *-gnu* | freebsd* | netbsd* | openbsd* \
22819 | hpux* | solaris* | cygwin* | mingw*)
22820 ac_cv_func_malloc_0_nonnull=yes ;;
22821 # If we don't know, assume the worst.
22822 *) ac_cv_func_malloc_0_nonnull=no ;;
22826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22827 /* end confdefs.h. */
22828 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22829 # include <stdlib.h>
22837 char *p = malloc (0);
22846 if ac_fn_c_try_run "$LINENO"
22848 ac_cv_func_malloc_0_nonnull=yes
22850 ac_cv_func_malloc_0_nonnull=no
22852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22853 conftest.$ac_objext conftest.beam conftest.$ac_ext
22858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22859 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
22860 if test $ac_cv_func_malloc_0_nonnull = yes
22863 printf "%s\n" "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22866 printf "%s\n" "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22873 if test $REPLACE_MALLOC = 1; then
22882 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22887 cat >>confdefs.h <<_ACEOF
22888 #define GNULIB_MALLOC_GNU 1
22895 if test $gl_cv_func_malloc_posix = yes; then
22897 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22903 if test $REPLACE_MALLOC = 1; then
22912 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22920 GNULIB_MALLOC_POSIX=1
22926 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22941 if test $gl_cv_have_include_next = yes; then
22942 gl_cv_next_math_h='<'math.h'>'
22944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
22945 printf %s "checking absolute name of <math.h>... " >&6; }
22946 if test ${gl_cv_next_math_h+y}
22948 printf %s "(cached) " >&6
22951 if test $ac_cv_header_math_h = yes; then
22956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22957 /* end confdefs.h. */
22961 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22962 *) gl_absname_cpp="$ac_cpp" ;;
22967 gl_dirsep_regex='[/\\]'
22970 gl_dirsep_regex='\/'
22973 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22974 gl_header_literal_regex=`echo 'math.h' \
22975 | sed -e "$gl_make_literal_regex_sed"`
22976 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22977 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22983 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22984 sed -n "$gl_absolute_header_sed"`
22986 gl_header=$gl_cv_absolute_math_h
22987 gl_cv_next_math_h='"'$gl_header'"'
22989 gl_cv_next_math_h='<'math.h'>'
22994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
22995 printf "%s\n" "$gl_cv_next_math_h" >&6; }
22997 NEXT_MATH_H=$gl_cv_next_math_h
22999 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23000 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23001 gl_next_as_first_directive='<'math.h'>'
23003 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23004 gl_next_as_first_directive=$gl_cv_next_math_h
23006 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
23012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
23013 printf %s "checking whether NAN macro works... " >&6; }
23014 if test ${gl_cv_header_math_nan_works+y}
23016 printf %s "(cached) " >&6
23018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23019 /* end confdefs.h. */
23024 /* Solaris 10 has a broken definition of NAN. Other platforms
23025 fail to provide NAN, or provide it only in C99 mode; this
23026 test only needs to fail when NAN is provided but wrong. */
23036 if ac_fn_c_try_compile "$LINENO"
23038 gl_cv_header_math_nan_works=yes
23040 gl_cv_header_math_nan_works=no
23042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
23045 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
23046 if test $gl_cv_header_math_nan_works = no; then
23049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
23050 printf %s "checking whether HUGE_VAL works... " >&6; }
23051 if test ${gl_cv_header_math_huge_val_works+y}
23053 printf %s "(cached) " >&6
23055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23056 /* end confdefs.h. */
23061 /* Solaris 10 has a broken definition of HUGE_VAL. */
23062 double d = HUGE_VAL;
23068 if ac_fn_c_try_compile "$LINENO"
23070 gl_cv_header_math_huge_val_works=yes
23072 gl_cv_header_math_huge_val_works=no
23074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
23077 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
23078 if test $gl_cv_header_math_huge_val_works = no; then
23085 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23094 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23097 for ac_header in bp-sym.h
23099 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23100 if test "x$ac_cv_header_bp_sym_h" = xyes
23102 cat >>confdefs.h <<_ACEOF
23103 #define HAVE_BP_SYM_H 1
23122 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23132 for ac_func in mempcpy
23134 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23135 if test "x$ac_cv_func_mempcpy" = xyes
23137 cat >>confdefs.h <<_ACEOF
23138 #define HAVE_MEMPCPY 1
23144 if test $ac_cv_func_mempcpy = no; then
23148 if test $HAVE_MEMPCPY = 0; then
23157 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23174 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23183 if test $ac_cv_have_decl_memrchr = no; then
23184 HAVE_DECL_MEMRCHR=0
23187 for ac_func in memrchr
23189 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23190 if test "x$ac_cv_func_memrchr" = xyes
23192 cat >>confdefs.h <<_ACEOF
23193 #define HAVE_MEMRCHR 1
23200 if test $ac_cv_func_memrchr = no; then
23209 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23224 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23229 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23238 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
23242 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23251 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
23263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23264 printf %s "checking whether open recognizes a trailing slash... " >&6; }
23265 if test ${gl_cv_func_open_slash+y}
23267 printf %s "(cached) " >&6
23269 # Assume that if we have lstat, we can also check symlinks.
23270 if test $ac_cv_func_lstat = yes; then
23272 ln -s conftest.tmp conftest.lnk
23274 if test "$cross_compiling" = yes
23278 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23279 gl_cv_func_open_slash="guessing no" ;;
23281 gl_cv_func_open_slash="guessing yes" ;;
23285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23286 /* end confdefs.h. */
23290 # include <unistd.h>
23296 if (open ("conftest.lnk/", O_RDONLY) != -1)
23299 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23304 if ac_fn_c_try_run "$LINENO"
23306 gl_cv_func_open_slash=yes
23308 gl_cv_func_open_slash=no
23310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23311 conftest.$ac_objext conftest.beam conftest.$ac_ext
23314 rm -f conftest.sl conftest.tmp conftest.lnk
23317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23318 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
23319 case "$gl_cv_func_open_slash" in
23322 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23330 if test $REPLACE_OPEN = 0; then
23334 if test $ac_cv_func_fchdir = no; then
23338 if test $HAVE_FCHDIR = 0; then
23345 if test $REPLACE_OPEN = 1; then
23354 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
23372 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
23381 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
23385 # Solaris 9 has *at functions, but uniformly mishandles trailing
23386 # slash in all of them.
23394 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
23403 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
23412 cat >>confdefs.h <<_ACEOF
23413 #define GNULIB_OPENAT 1
23427 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
23436 cat >>confdefs.h <<_ACEOF
23437 #define GNULIB_OPENAT_SAFER 1
23444 for ac_func in opendir
23446 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
23447 if test "x$ac_cv_func_opendir" = xyes
23449 cat >>confdefs.h <<_ACEOF
23450 #define HAVE_OPENDIR 1
23456 if test $ac_cv_func_opendir = no; then
23463 if test $ac_cv_func_fchdir = no; then
23467 if test $HAVE_FCHDIR = 0; then
23468 if test $HAVE_OPENDIR = 1; then
23473 case $host_os,$HAVE_OPENDIR in
23475 REPLACE_OPENDIR=1;;
23478 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
23487 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
23501 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
23513 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
23516 case ${gl_cv_func_strerror_r_works-unset} in
23518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
23519 printf %s "checking whether perror matches strerror... " >&6; }
23520 if test ${gl_cv_func_perror_works+y}
23522 printf %s "(cached) " >&6
23524 if test "$cross_compiling" = yes
23526 gl_cv_func_perror_works="guessing no"
23529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23530 /* end confdefs.h. */
23533 #include <stdlib.h>
23534 #include <string.h>
23539 char *str = strerror (-1);
23540 if (!getenv("CONFTEST_OUTPUT")) return 0;
23541 if (!str) str = "";
23551 if ac_fn_c_try_run "$LINENO"
23553 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
23554 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
23555 gl_cv_func_perror_works=yes
23557 gl_cv_func_perror_works=no
23559 rm -rf conftest.txt1 conftest.txt2
23561 gl_cv_func_perror_works=no
23563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23564 conftest.$ac_objext conftest.beam conftest.$ac_ext
23569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
23570 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
23571 if test "$gl_cv_func_perror_works" != yes; then
23580 if test $REPLACE_PERROR = 1; then
23589 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
23603 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
23609 if test $gl_cv_func_frexp_no_libm = yes; then
23613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
23614 printf %s "checking whether frexp works... " >&6; }
23615 if test ${gl_cv_func_frexp_works+y}
23617 printf %s "(cached) " >&6
23620 if test "$cross_compiling" = yes
23623 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
23624 *) gl_cv_func_frexp_works="guessing yes";;
23628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23629 /* end confdefs.h. */
23633 #include <string.h>
23634 #if HAVE_DECL_ALARM
23635 # include <signal.h>
23636 # include <unistd.h>
23638 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
23639 ICC 10.0 has a bug when optimizing the expression -zero.
23640 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
23641 to PowerPC on Mac OS X 10.5. */
23642 #if defined __hpux || defined __sgi || defined __ICC
23644 compute_minus_zero (void)
23646 return -DBL_MIN * DBL_MIN;
23648 # define minus_zero compute_minus_zero ()
23650 double minus_zero = -0.0;
23658 #if HAVE_DECL_ALARM
23659 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
23660 number. Let the test fail in this case. */
23661 signal (SIGALRM, SIG_DFL);
23664 /* Test on denormalized numbers. */
23665 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
23670 double y = frexp (x, &exp);
23671 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
23672 On NetBSD: y = 0.75. Correct: y = 0.5. */
23676 /* Test on infinite numbers. */
23680 double y = frexp (x, &exp);
23684 /* Test on negative zero. */
23688 double y = frexp (x, &exp);
23689 if (memcmp (&y, &x, sizeof x))
23695 if ac_fn_c_try_run "$LINENO"
23697 gl_cv_func_frexp_works=yes
23699 gl_cv_func_frexp_works=no
23701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23702 conftest.$ac_objext conftest.beam conftest.$ac_ext
23707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23708 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
23710 case "$gl_cv_func_frexp_works" in
23713 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
23720 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
23721 if test ${gl_cv_func_ldexp_no_libm+y}
23723 printf %s "(cached) " >&6
23726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23727 /* end confdefs.h. */
23734 return ldexp (x, y) < 1;
23739 if ac_fn_c_try_link "$LINENO"
23741 gl_cv_func_ldexp_no_libm=yes
23743 gl_cv_func_ldexp_no_libm=no
23745 rm -f core conftest.err conftest.$ac_objext \
23746 conftest$ac_exeext conftest.$ac_ext
23749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
23750 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
23751 if test $gl_cv_func_ldexp_no_libm = yes; then
23753 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
23762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
23763 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
23764 if test ${gl_cv_func_frexpl_no_libm+y}
23766 printf %s "(cached) " >&6
23769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23770 /* end confdefs.h. */
23776 int e; return frexpl (x, &e) > 0;
23781 if ac_fn_c_try_link "$LINENO"
23783 gl_cv_func_frexpl_no_libm=yes
23785 gl_cv_func_frexpl_no_libm=no
23787 rm -f core conftest.err conftest.$ac_objext \
23788 conftest$ac_exeext conftest.$ac_ext
23791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
23792 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
23794 if test $gl_cv_func_frexpl_no_libm = yes; then
23797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
23798 printf %s "checking whether frexpl works... " >&6; }
23799 if test ${gl_cv_func_frexpl_works+y}
23801 printf %s "(cached) " >&6
23804 if test "$cross_compiling" = yes
23808 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
23809 gl_cv_func_frexpl_works="guessing no";;
23810 *) gl_cv_func_frexpl_works="guessing yes";;
23814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23815 /* end confdefs.h. */
23819 /* Override the values of <float.h>, like done in float.in.h. */
23820 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
23821 # undef LDBL_MIN_EXP
23822 # define LDBL_MIN_EXP (-16381)
23824 #if defined __i386__ && defined __FreeBSD__
23825 # undef LDBL_MIN_EXP
23826 # define LDBL_MIN_EXP (-16381)
23828 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
23829 # undef LDBL_MIN_EXP
23830 # define LDBL_MIN_EXP DBL_MIN_EXP
23832 #if defined __sgi && (LDBL_MANT_DIG >= 106)
23833 # if defined __GNUC__
23834 # undef LDBL_MIN_EXP
23835 # define LDBL_MIN_EXP DBL_MIN_EXP
23842 long double frexpl (long double, int *);
23846 volatile long double x;
23847 /* Test on finite numbers that fails on AIX 5.1. */
23855 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
23856 function returns an invalid (incorrectly normalized) value: it returns
23857 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
23858 but the correct result is
23859 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
23863 long double y = frexpl (x, &exp);
23864 if (!(exp == 1 && y == 0.505L))
23867 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
23868 LDBL_MAX_EXP = 16384.
23869 In the loop end test, we test x against Infinity, rather than comparing
23870 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
23873 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
23884 /* Test on denormalized numbers. */
23887 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
23892 long double y = frexpl (x, &exp);
23893 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
23894 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
23895 if (exp != LDBL_MIN_EXP - 1)
23899 /* Test on infinite numbers. */
23903 long double y = frexpl (x, &exp);
23910 if ac_fn_c_try_run "$LINENO"
23912 gl_cv_func_frexpl_works=yes
23914 gl_cv_func_frexpl_works=no
23916 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23917 conftest.$ac_objext conftest.beam conftest.$ac_ext
23922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
23923 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
23925 case "$gl_cv_func_frexpl_works" in
23926 *yes) gl_func_frexpl_no_libm=yes ;;
23927 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
23930 gl_func_frexpl_no_libm=no
23933 if test $gl_func_frexpl_no_libm = yes; then
23935 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
23937 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
23939 if test "x$ac_cv_have_decl_frexpl" = xyes
23949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
23950 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
23951 if test ${gl_cv_func_ldexpl_no_libm+y}
23953 printf %s "(cached) " >&6
23956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23957 /* end confdefs.h. */
23963 return ldexpl (x, -1) > 0;
23968 if ac_fn_c_try_link "$LINENO"
23970 gl_cv_func_ldexpl_no_libm=yes
23972 gl_cv_func_ldexpl_no_libm=no
23974 rm -f core conftest.err conftest.$ac_objext \
23975 conftest$ac_exeext conftest.$ac_ext
23978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
23979 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
23981 if test $gl_cv_func_ldexpl_no_libm = yes; then
23984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
23985 printf %s "checking whether ldexpl works... " >&6; }
23986 if test ${gl_cv_func_ldexpl_works+y}
23988 printf %s "(cached) " >&6
23991 if test "$cross_compiling" = yes
23995 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
23996 *) gl_cv_func_ldexpl_works="guessing yes";;
24000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24001 /* end confdefs.h. */
24008 long double ldexpl (long double, int);
24013 volatile long double x = 1.0;
24014 volatile long double y = ldexpl (x, -1);
24019 volatile long double x = 1.73205L;
24020 volatile long double y = ldexpl (x, 0);
24027 if ac_fn_c_try_run "$LINENO"
24029 gl_cv_func_ldexpl_works=yes
24031 gl_cv_func_ldexpl_works=no
24033 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24034 conftest.$ac_objext conftest.beam conftest.$ac_ext
24039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
24040 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
24042 case "$gl_cv_func_ldexpl_works" in
24045 printf "%s\n" "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
24047 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
24049 if test "x$ac_cv_have_decl_ldexpl" = xyes
24062 if test $gl_cv_func_vfprintf_posix = no; then
24074 gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
24078 printf "%s\n" "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
24089 GNULIB_PRINTF_POSIX=1
24095 printf "%s\n" "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
24103 for ac_func in readdir
24105 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
24106 if test "x$ac_cv_func_readdir" = xyes
24108 cat >>confdefs.h <<_ACEOF
24109 #define HAVE_READDIR 1
24115 if test $ac_cv_func_readdir = no; then
24119 if test $HAVE_READDIR = 0; then
24128 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24142 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24149 for ac_header in stdlib.h
24151 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24152 if test "x$ac_cv_header_stdlib_h" = xyes
24154 cat >>confdefs.h <<_ACEOF
24155 #define HAVE_STDLIB_H 1
24161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
24162 printf %s "checking for GNU libc compatible realloc... " >&6; }
24163 if test ${ac_cv_func_realloc_0_nonnull+y}
24165 printf %s "(cached) " >&6
24167 if test "$cross_compiling" = yes
24170 # Guess yes on platforms where we know the result.
24171 *-gnu* | freebsd* | netbsd* | openbsd* \
24172 | hpux* | solaris* | cygwin* | mingw*)
24173 ac_cv_func_realloc_0_nonnull=yes ;;
24174 # If we don't know, assume the worst.
24175 *) ac_cv_func_realloc_0_nonnull=no ;;
24179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24180 /* end confdefs.h. */
24181 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
24182 # include <stdlib.h>
24190 char *p = realloc (0, 0);
24199 if ac_fn_c_try_run "$LINENO"
24201 ac_cv_func_realloc_0_nonnull=yes
24203 ac_cv_func_realloc_0_nonnull=no
24205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24206 conftest.$ac_objext conftest.beam conftest.$ac_ext
24211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
24212 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
24213 if test $ac_cv_func_realloc_0_nonnull = yes
24216 printf "%s\n" "#define HAVE_REALLOC_GNU 1" >>confdefs.h
24219 printf "%s\n" "#define HAVE_REALLOC_GNU 0" >>confdefs.h
24226 if test $REPLACE_REALLOC = 1; then
24235 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24240 cat >>confdefs.h <<_ACEOF
24241 #define GNULIB_REALLOC_GNU 1
24248 if test $gl_cv_func_malloc_posix = yes; then
24250 printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24256 if test $REPLACE_REALLOC = 1; then
24265 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24273 GNULIB_REALLOC_POSIX=1
24279 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24287 printf %s "checking whether rmdir works... " >&6; }
24288 if test ${gl_cv_func_rmdir_works+y}
24290 printf %s "(cached) " >&6
24293 touch conftest.file
24294 if test "$cross_compiling" = yes
24297 # Guess yes on glibc systems.
24298 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
24299 # If we don't know, assume the worst.
24300 *) gl_cv_func_rmdir_works="guessing no" ;;
24304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24305 /* end confdefs.h. */
24309 # include <unistd.h>
24310 #else /* on Windows with MSVC */
24311 # include <direct.h>
24318 if (!rmdir ("conftest.file/"))
24320 else if (errno != ENOTDIR)
24322 if (!rmdir ("conftest.dir/./"))
24330 if ac_fn_c_try_run "$LINENO"
24332 gl_cv_func_rmdir_works=yes
24334 gl_cv_func_rmdir_works=no
24336 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24337 conftest.$ac_objext conftest.beam conftest.$ac_ext
24340 rm -rf conftest.dir conftest.file
24342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24343 printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
24344 case "$gl_cv_func_rmdir_works" in
24351 if test $REPLACE_RMDIR = 1; then
24360 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
24374 printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
24387 printf %s "checking for signbit macro... " >&6; }
24388 if test ${gl_cv_func_signbit+y}
24390 printf %s "(cached) " >&6
24393 if test "$cross_compiling" = yes
24396 # Guess yes on glibc systems.
24397 *-gnu*) gl_cv_func_signbit="guessing yes" ;;
24398 # If we don't know, assume the worst.
24399 *) gl_cv_func_signbit="guessing no" ;;
24403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24404 /* end confdefs.h. */
24407 /* If signbit is defined as a function, don't use it, since calling it for
24408 'float' or 'long double' arguments would involve conversions.
24409 If signbit is not declared at all but exists as a library function, don't
24410 use it, since the prototype may not match.
24411 If signbit is not declared at all but exists as a compiler built-in, don't
24412 use it, since it's preferable to use __builtin_signbit* (no warnings,
24413 no conversions). */
24415 # error "signbit should be a macro"
24417 #include <string.h>
24419 /* Global variables.
24420 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24421 but cannot constant-fold __builtin_signbitl (variable). */
24427 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24428 So we use -p0f and -p0d instead. */
24433 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24434 So we use another constant expression instead.
24435 But that expression does not work on other platforms, such as when
24436 cross-compiling to PowerPC on Mac OS X 10.5. */
24437 long double p0l = 0.0L;
24438 #if defined __hpux || defined __sgi
24439 long double m0l = -LDBL_MIN * LDBL_MIN;
24441 long double m0l = -p0l;
24444 if (signbit (vf)) /* link check */
24447 float plus_inf = 1.0f / p0f;
24448 float minus_inf = -1.0f / p0f;
24449 if (!(!signbit (255.0f)
24450 && signbit (-255.0f)
24452 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24453 && !signbit (plus_inf)
24454 && signbit (minus_inf)))
24457 if (signbit (vd)) /* link check */
24460 double plus_inf = 1.0 / p0d;
24461 double minus_inf = -1.0 / p0d;
24462 if (!(!signbit (255.0)
24463 && signbit (-255.0)
24465 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24466 && !signbit (plus_inf)
24467 && signbit (minus_inf)))
24470 if (signbit (vl)) /* link check */
24473 long double plus_inf = 1.0L / p0l;
24474 long double minus_inf = -1.0L / p0l;
24475 if (signbit (255.0L))
24477 if (!signbit (-255.0L))
24481 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24483 if (signbit (plus_inf))
24485 if (!signbit (minus_inf))
24493 if ac_fn_c_try_run "$LINENO"
24495 gl_cv_func_signbit=yes
24497 gl_cv_func_signbit=no
24499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24500 conftest.$ac_objext conftest.beam conftest.$ac_ext
24505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
24506 printf "%s\n" "$gl_cv_func_signbit" >&6; }
24507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
24508 printf %s "checking for signbit compiler built-ins... " >&6; }
24509 if test ${gl_cv_func_signbit_gcc+y}
24511 printf %s "(cached) " >&6
24514 if test "$cross_compiling" = yes
24517 # Guess yes on glibc systems.
24518 *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
24519 # If we don't know, assume the worst.
24520 *) gl_cv_func_signbit_gcc="guessing no" ;;
24524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24525 /* end confdefs.h. */
24528 # define signbit(x) \
24529 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
24530 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
24531 __builtin_signbitf (x))
24533 # error "signbit should be three compiler built-ins"
24535 #include <string.h>
24537 /* Global variables.
24538 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24539 but cannot constant-fold __builtin_signbitl (variable). */
24545 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24546 So we use -p0f and -p0d instead. */
24551 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24552 So we use another constant expression instead.
24553 But that expression does not work on other platforms, such as when
24554 cross-compiling to PowerPC on Mac OS X 10.5. */
24555 long double p0l = 0.0L;
24556 #if defined __hpux || defined __sgi
24557 long double m0l = -LDBL_MIN * LDBL_MIN;
24559 long double m0l = -p0l;
24562 if (signbit (vf)) /* link check */
24565 float plus_inf = 1.0f / p0f;
24566 float minus_inf = -1.0f / p0f;
24567 if (!(!signbit (255.0f)
24568 && signbit (-255.0f)
24570 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24571 && !signbit (plus_inf)
24572 && signbit (minus_inf)))
24575 if (signbit (vd)) /* link check */
24578 double plus_inf = 1.0 / p0d;
24579 double minus_inf = -1.0 / p0d;
24580 if (!(!signbit (255.0)
24581 && signbit (-255.0)
24583 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24584 && !signbit (plus_inf)
24585 && signbit (minus_inf)))
24588 if (signbit (vl)) /* link check */
24591 long double plus_inf = 1.0L / p0l;
24592 long double minus_inf = -1.0L / p0l;
24593 if (signbit (255.0L))
24595 if (!signbit (-255.0L))
24599 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24601 if (signbit (plus_inf))
24603 if (!signbit (minus_inf))
24611 if ac_fn_c_try_run "$LINENO"
24613 gl_cv_func_signbit_gcc=yes
24615 gl_cv_func_signbit_gcc=no
24617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24618 conftest.$ac_objext conftest.beam conftest.$ac_ext
24623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
24624 printf "%s\n" "$gl_cv_func_signbit_gcc" >&6; }
24625 case "$gl_cv_func_signbit_gcc" in
24627 REPLACE_SIGNBIT_USING_GCC=1
24630 case "$gl_cv_func_signbit" in
24636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
24637 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
24638 if test ${gl_cv_cc_float_signbit+y}
24640 printf %s "(cached) " >&6
24643 if test "$cross_compiling" = yes
24646 gl_cv_cc_float_signbit="unknown"
24649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24650 /* end confdefs.h. */
24652 #include <stddef.h>
24655 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24656 typedef union { float value; unsigned int word[NWORDS]; }
24658 static memory_float plus = { 1.0f };
24659 static memory_float minus = { -1.0f };
24664 FILE *fp = fopen ("conftest.out", "w");
24667 /* Find the different bit. */
24669 for (j = 0; j < NWORDS; j++)
24671 unsigned int x = plus.word[j] ^ minus.word[j];
24672 if ((x & (x - 1)) || (x && m))
24674 /* More than one bit difference. */
24675 fprintf (fp, "unknown");
24686 /* No difference. */
24687 fprintf (fp, "unknown");
24690 /* Now m = plus.word[k] ^ ~minus.word[k]. */
24691 if (plus.word[k] & ~minus.word[k])
24693 /* Oh? The sign bit is set in the positive and cleared in the negative
24695 fprintf (fp, "unknown");
24701 fprintf (fp, "word %d bit %d", (int) k, (int) i);
24702 if (fclose (fp) != 0)
24708 if ac_fn_c_try_run "$LINENO"
24710 gl_cv_cc_float_signbit=`cat conftest.out`
24712 gl_cv_cc_float_signbit="unknown"
24714 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24715 conftest.$ac_objext conftest.beam conftest.$ac_ext
24721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
24722 printf "%s\n" "$gl_cv_cc_float_signbit" >&6; }
24723 case "$gl_cv_cc_float_signbit" in
24725 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24726 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
24728 cat >>confdefs.h <<_ACEOF
24729 #define FLT_SIGNBIT_WORD $word
24733 cat >>confdefs.h <<_ACEOF
24734 #define FLT_SIGNBIT_BIT $bit
24743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
24744 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
24745 if test ${gl_cv_cc_double_signbit+y}
24747 printf %s "(cached) " >&6
24750 if test "$cross_compiling" = yes
24753 gl_cv_cc_double_signbit="unknown"
24756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24757 /* end confdefs.h. */
24759 #include <stddef.h>
24762 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24763 typedef union { double value; unsigned int word[NWORDS]; }
24765 static memory_float plus = { 1.0 };
24766 static memory_float minus = { -1.0 };
24771 FILE *fp = fopen ("conftest.out", "w");
24774 /* Find the different bit. */
24776 for (j = 0; j < NWORDS; j++)
24778 unsigned int x = plus.word[j] ^ minus.word[j];
24779 if ((x & (x - 1)) || (x && m))
24781 /* More than one bit difference. */
24782 fprintf (fp, "unknown");
24793 /* No difference. */
24794 fprintf (fp, "unknown");
24797 /* Now m = plus.word[k] ^ ~minus.word[k]. */
24798 if (plus.word[k] & ~minus.word[k])
24800 /* Oh? The sign bit is set in the positive and cleared in the negative
24802 fprintf (fp, "unknown");
24808 fprintf (fp, "word %d bit %d", (int) k, (int) i);
24809 if (fclose (fp) != 0)
24815 if ac_fn_c_try_run "$LINENO"
24817 gl_cv_cc_double_signbit=`cat conftest.out`
24819 gl_cv_cc_double_signbit="unknown"
24821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24822 conftest.$ac_objext conftest.beam conftest.$ac_ext
24828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
24829 printf "%s\n" "$gl_cv_cc_double_signbit" >&6; }
24830 case "$gl_cv_cc_double_signbit" in
24832 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24833 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
24835 cat >>confdefs.h <<_ACEOF
24836 #define DBL_SIGNBIT_WORD $word
24840 cat >>confdefs.h <<_ACEOF
24841 #define DBL_SIGNBIT_BIT $bit
24850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
24851 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
24852 if test ${gl_cv_cc_long_double_signbit+y}
24854 printf %s "(cached) " >&6
24857 if test "$cross_compiling" = yes
24860 gl_cv_cc_long_double_signbit="unknown"
24863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24864 /* end confdefs.h. */
24866 #include <stddef.h>
24869 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24870 typedef union { long double value; unsigned int word[NWORDS]; }
24872 static memory_float plus = { 1.0L };
24873 static memory_float minus = { -1.0L };
24878 FILE *fp = fopen ("conftest.out", "w");
24881 /* Find the different bit. */
24883 for (j = 0; j < NWORDS; j++)
24885 unsigned int x = plus.word[j] ^ minus.word[j];
24886 if ((x & (x - 1)) || (x && m))
24888 /* More than one bit difference. */
24889 fprintf (fp, "unknown");
24900 /* No difference. */
24901 fprintf (fp, "unknown");
24904 /* Now m = plus.word[k] ^ ~minus.word[k]. */
24905 if (plus.word[k] & ~minus.word[k])
24907 /* Oh? The sign bit is set in the positive and cleared in the negative
24909 fprintf (fp, "unknown");
24915 fprintf (fp, "word %d bit %d", (int) k, (int) i);
24916 if (fclose (fp) != 0)
24922 if ac_fn_c_try_run "$LINENO"
24924 gl_cv_cc_long_double_signbit=`cat conftest.out`
24926 gl_cv_cc_long_double_signbit="unknown"
24928 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24929 conftest.$ac_objext conftest.beam conftest.$ac_ext
24935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
24936 printf "%s\n" "$gl_cv_cc_long_double_signbit" >&6; }
24937 case "$gl_cv_cc_long_double_signbit" in
24939 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24940 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
24942 cat >>confdefs.h <<_ACEOF
24943 #define LDBL_SIGNBIT_WORD $word
24947 cat >>confdefs.h <<_ACEOF
24948 #define LDBL_SIGNBIT_BIT $bit
24955 if test "$gl_cv_cc_float_signbit" = unknown; then
24956 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
24958 if test "x$ac_cv_have_decl_copysignf" = xyes
24965 cat >>confdefs.h <<_ACEOF
24966 #define HAVE_DECL_COPYSIGNF $ac_have_decl
24969 if test "$ac_cv_have_decl_copysignf" = yes; then
24970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
24971 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
24972 if test ${gl_cv_func_copysignf_no_libm+y}
24974 printf %s "(cached) " >&6
24977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24978 /* end confdefs.h. */
24984 return copysignf (x, y) < 0;
24989 if ac_fn_c_try_link "$LINENO"
24991 gl_cv_func_copysignf_no_libm=yes
24993 gl_cv_func_copysignf_no_libm=no
24995 rm -f core conftest.err conftest.$ac_objext \
24996 conftest$ac_exeext conftest.$ac_ext
24999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
25000 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
25001 if test $gl_cv_func_copysignf_no_libm = yes; then
25003 printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
25008 if test "$gl_cv_cc_double_signbit" = unknown; then
25009 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
25011 if test "x$ac_cv_have_decl_copysign" = xyes
25018 cat >>confdefs.h <<_ACEOF
25019 #define HAVE_DECL_COPYSIGN $ac_have_decl
25022 if test "$ac_cv_have_decl_copysign" = yes; then
25023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
25024 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
25025 if test ${gl_cv_func_copysign_no_libm+y}
25027 printf %s "(cached) " >&6
25030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25031 /* end confdefs.h. */
25037 return copysign (x, y) < 0;
25042 if ac_fn_c_try_link "$LINENO"
25044 gl_cv_func_copysign_no_libm=yes
25046 gl_cv_func_copysign_no_libm=no
25048 rm -f core conftest.err conftest.$ac_objext \
25049 conftest$ac_exeext conftest.$ac_ext
25052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
25053 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
25054 if test $gl_cv_func_copysign_no_libm = yes; then
25056 printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
25061 if test "$gl_cv_cc_long_double_signbit" = unknown; then
25062 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
25064 if test "x$ac_cv_have_decl_copysignl" = xyes
25071 cat >>confdefs.h <<_ACEOF
25072 #define HAVE_DECL_COPYSIGNL $ac_have_decl
25075 if test "$ac_cv_have_decl_copysignl" = yes; then
25076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
25077 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
25078 if test ${gl_cv_func_copysignl_no_libm+y}
25080 printf %s "(cached) " >&6
25083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25084 /* end confdefs.h. */
25090 return copysignl (x, y) < 0;
25095 if ac_fn_c_try_link "$LINENO"
25097 gl_cv_func_copysignl_no_libm=yes
25099 gl_cv_func_copysignl_no_libm=no
25101 rm -f core conftest.err conftest.$ac_objext \
25102 conftest$ac_exeext conftest.$ac_ext
25105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
25106 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
25107 if test $gl_cv_func_copysignl_no_libm = yes; then
25109 printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
25119 if test $REPLACE_SIGNBIT = 1; then
25128 gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
25138 gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
25148 gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
25162 printf "%s\n" "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
25167 for ac_header in stdint.h
25169 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
25170 if test "x$ac_cv_header_stdint_h" = xyes
25172 cat >>confdefs.h <<_ACEOF
25173 #define HAVE_STDINT_H 1
25179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
25180 printf %s "checking for SIZE_MAX... " >&6; }
25181 if test ${gl_cv_size_max+y}
25183 printf %s "(cached) " >&6
25187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25188 /* end confdefs.h. */
25190 #include <limits.h>
25192 #include <stdint.h>
25199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25200 $EGREP "Found it" >/dev/null 2>&1
25206 if test -z "$gl_cv_size_max"; then
25207 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
25208 #include <limits.h>"
25212 size_t_bits_minus_1=
25215 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
25222 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
25223 if test $fits_in_uint = 1; then
25224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25225 /* end confdefs.h. */
25226 #include <stddef.h>
25228 extern unsigned long foo;
25238 if ac_fn_c_try_compile "$LINENO"
25242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25244 if test $fits_in_uint = 1; then
25245 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
25247 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
25250 gl_cv_size_max='((size_t)~(size_t)0)'
25255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
25256 printf "%s\n" "$gl_cv_size_max" >&6; }
25257 if test "$gl_cv_size_max" != yes; then
25259 cat >>confdefs.h <<_ACEOF
25260 #define SIZE_MAX $gl_cv_size_max
25267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25268 printf %s "checking for ssize_t... " >&6; }
25269 if test ${gt_cv_ssize_t+y}
25271 printf %s "(cached) " >&6
25273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25274 /* end confdefs.h. */
25275 #include <sys/types.h>
25279 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25285 if ac_fn_c_try_compile "$LINENO"
25291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25294 printf "%s\n" "$gt_cv_ssize_t" >&6; }
25295 if test $gt_cv_ssize_t = no; then
25297 printf "%s\n" "#define ssize_t int" >>confdefs.h
25304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25305 printf %s "checking whether stat handles trailing slashes on directories... " >&6; }
25306 if test ${gl_cv_func_stat_dir_slash+y}
25308 printf %s "(cached) " >&6
25310 if test "$cross_compiling" = yes
25313 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25314 *) gl_cv_func_stat_dir_slash="guessing yes";;
25317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25318 /* end confdefs.h. */
25319 #include <sys/stat.h>
25324 struct stat st; return stat (".", &st) != stat ("./", &st);
25329 if ac_fn_c_try_run "$LINENO"
25331 gl_cv_func_stat_dir_slash=yes
25333 gl_cv_func_stat_dir_slash=no
25335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25336 conftest.$ac_objext conftest.beam conftest.$ac_ext
25340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25341 printf "%s\n" "$gl_cv_func_stat_dir_slash" >&6; }
25342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25343 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
25344 if test ${gl_cv_func_stat_file_slash+y}
25346 printf %s "(cached) " >&6
25349 # Assume that if we have lstat, we can also check symlinks.
25350 if test $ac_cv_func_lstat = yes; then
25351 ln -s conftest.tmp conftest.lnk
25353 if test "$cross_compiling" = yes
25356 # Guess yes on glibc systems.
25357 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25358 # If we don't know, assume the worst.
25359 *) gl_cv_func_stat_file_slash="guessing no" ;;
25363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25364 /* end confdefs.h. */
25365 #include <sys/stat.h>
25372 if (!stat ("conftest.tmp/", &st))
25375 if (!stat ("conftest.lnk/", &st))
25384 if ac_fn_c_try_run "$LINENO"
25386 gl_cv_func_stat_file_slash=yes
25388 gl_cv_func_stat_file_slash=no
25390 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25391 conftest.$ac_objext conftest.beam conftest.$ac_ext
25394 rm -f conftest.tmp conftest.lnk
25396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25397 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
25398 case $gl_cv_func_stat_dir_slash in
25399 *no) REPLACE_STAT=1
25401 printf "%s\n" "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25404 case $gl_cv_func_stat_file_slash in
25405 *no) REPLACE_STAT=1
25407 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25411 if test $REPLACE_STAT = 1; then
25420 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25435 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
25443 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>
25444 #include <sys/stat.h>
25446 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
25449 cat >>confdefs.h <<_ACEOF
25450 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25454 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25455 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
25457 printf %s "(cached) " >&6
25459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25460 /* end confdefs.h. */
25462 #include <sys/types.h>
25463 #include <sys/stat.h>
25464 #if HAVE_SYS_TIME_H
25465 # include <sys/time.h>
25468 struct timespec ts;
25481 if ac_fn_c_try_compile "$LINENO"
25483 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25485 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25490 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25491 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25493 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25497 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>
25498 #include <sys/stat.h>
25500 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
25503 cat >>confdefs.h <<_ACEOF
25504 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25509 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25510 #include <sys/stat.h>
25512 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
25515 cat >>confdefs.h <<_ACEOF
25516 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25521 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>
25522 #include <sys/stat.h>
25524 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
25527 cat >>confdefs.h <<_ACEOF
25528 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25544 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>
25545 #include <sys/stat.h>
25547 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
25550 cat >>confdefs.h <<_ACEOF
25551 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25556 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25557 #include <sys/stat.h>
25559 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
25562 cat >>confdefs.h <<_ACEOF
25563 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25568 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>
25569 #include <sys/stat.h>
25571 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
25574 cat >>confdefs.h <<_ACEOF
25575 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25588 cat >>confdefs.h <<_ACEOF
25589 #define GNULIB_STATAT 1
25595 # Define two additional variables used in the Makefile substitution.
25597 if test "$ac_cv_header_stdbool_h" = yes; then
25600 STDBOOL_H='stdbool.h'
25603 if test -n "$STDBOOL_H"; then
25604 GL_GENERATE_STDBOOL_H_TRUE=
25605 GL_GENERATE_STDBOOL_H_FALSE='#'
25607 GL_GENERATE_STDBOOL_H_TRUE='#'
25608 GL_GENERATE_STDBOOL_H_FALSE=
25612 if test "$ac_cv_type__Bool" = yes; then
25623 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
25626 if test "x$ac_cv_type_max_align_t" = xyes
25630 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
25633 if test $gt_cv_c_wchar_t = no; then
25637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25638 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
25639 if test ${gl_cv_decl_null_works+y}
25641 printf %s "(cached) " >&6
25643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25644 /* end confdefs.h. */
25645 #include <stddef.h>
25646 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25656 if ac_fn_c_try_compile "$LINENO"
25658 gl_cv_decl_null_works=yes
25660 gl_cv_decl_null_works=no
25662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25665 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
25666 if test $gl_cv_decl_null_works = no; then
25671 if test -n "$STDDEF_H"; then
25672 GL_GENERATE_STDDEF_H_TRUE=
25673 GL_GENERATE_STDDEF_H_FALSE='#'
25675 GL_GENERATE_STDDEF_H_TRUE='#'
25676 GL_GENERATE_STDDEF_H_FALSE=
25679 if test -n "$STDDEF_H"; then
25688 if test $gl_cv_have_include_next = yes; then
25689 gl_cv_next_stddef_h='<'stddef.h'>'
25691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25692 printf %s "checking absolute name of <stddef.h>... " >&6; }
25693 if test ${gl_cv_next_stddef_h+y}
25695 printf %s "(cached) " >&6
25700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25701 /* end confdefs.h. */
25702 #include <stddef.h>
25705 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25706 *) gl_absname_cpp="$ac_cpp" ;;
25711 gl_dirsep_regex='[/\\]'
25714 gl_dirsep_regex='\/'
25717 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25718 gl_header_literal_regex=`echo 'stddef.h' \
25719 | sed -e "$gl_make_literal_regex_sed"`
25720 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25721 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25727 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25728 sed -n "$gl_absolute_header_sed"`
25730 gl_header=$gl_cv_absolute_stddef_h
25731 gl_cv_next_stddef_h='"'$gl_header'"'
25735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25736 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
25738 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25740 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25741 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25742 gl_next_as_first_directive='<'stddef.h'>'
25744 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25745 gl_next_as_first_directive=$gl_cv_next_stddef_h
25747 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25767 if test $gl_cv_have_include_next = yes; then
25768 gl_cv_next_stdio_h='<'stdio.h'>'
25770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25771 printf %s "checking absolute name of <stdio.h>... " >&6; }
25772 if test ${gl_cv_next_stdio_h+y}
25774 printf %s "(cached) " >&6
25779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25780 /* end confdefs.h. */
25784 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25785 *) gl_absname_cpp="$ac_cpp" ;;
25790 gl_dirsep_regex='[/\\]'
25793 gl_dirsep_regex='\/'
25796 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25797 gl_header_literal_regex=`echo 'stdio.h' \
25798 | sed -e "$gl_make_literal_regex_sed"`
25799 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25800 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25806 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25807 sed -n "$gl_absolute_header_sed"`
25809 gl_header=$gl_cv_absolute_stdio_h
25810 gl_cv_next_stdio_h='"'$gl_header'"'
25814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25815 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
25817 NEXT_STDIO_H=$gl_cv_next_stdio_h
25819 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25820 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25821 gl_next_as_first_directive='<'stdio.h'>'
25823 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25824 gl_next_as_first_directive=$gl_cv_next_stdio_h
25826 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25833 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
25834 if test ${gl_cv_func_printf_attribute_flavor+y}
25836 printf %s "(cached) " >&6
25838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25839 /* end confdefs.h. */
25841 #define __STDC_FORMAT_MACROS 1
25843 #include <inttypes.h>
25844 /* For non-mingw systems, compilation will trivially succeed.
25845 For mingw, compilation will succeed for older mingw (system
25846 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
25847 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
25848 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25849 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25860 if ac_fn_c_try_compile "$LINENO"
25862 gl_cv_func_printf_attribute_flavor=system
25864 gl_cv_func_printf_attribute_flavor=gnu
25866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25869 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
25870 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25872 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25879 cat >>confdefs.h <<_ACEOF
25880 #define GNULIB_FSCANF 1
25887 cat >>confdefs.h <<_ACEOF
25888 #define GNULIB_SCANF 1
25924 if test $gl_cv_have_include_next = yes; then
25925 gl_cv_next_stdlib_h='<'stdlib.h'>'
25927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25928 printf %s "checking absolute name of <stdlib.h>... " >&6; }
25929 if test ${gl_cv_next_stdlib_h+y}
25931 printf %s "(cached) " >&6
25936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25937 /* end confdefs.h. */
25938 #include <stdlib.h>
25941 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25942 *) gl_absname_cpp="$ac_cpp" ;;
25947 gl_dirsep_regex='[/\\]'
25950 gl_dirsep_regex='\/'
25953 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25954 gl_header_literal_regex=`echo 'stdlib.h' \
25955 | sed -e "$gl_make_literal_regex_sed"`
25956 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25957 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25963 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25964 sed -n "$gl_absolute_header_sed"`
25966 gl_header=$gl_cv_absolute_stdlib_h
25967 gl_cv_next_stdlib_h='"'$gl_header'"'
25971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25972 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
25974 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25976 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25977 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25978 gl_next_as_first_directive='<'stdlib.h'>'
25980 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25981 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25983 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25997 for ac_func in stpcpy
25999 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
26000 if test "x$ac_cv_func_stpcpy" = xyes
26002 cat >>confdefs.h <<_ACEOF
26003 #define HAVE_STPCPY 1
26009 if test $ac_cv_func_stpcpy = no; then
26013 if test $HAVE_STPCPY = 0; then
26022 gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
26039 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
26047 if test $ac_cv_func_strdup = yes; then
26048 if test $gl_cv_func_malloc_posix != yes; then
26053 if test $ac_cv_have_decl_strdup = no; then
26057 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26066 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26081 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26092 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26094 printf %s "checking for working strerror function... " >&6; }
26095 if test ${gl_cv_func_working_strerror+y}
26097 printf %s "(cached) " >&6
26099 if test "$cross_compiling" = yes
26102 # Guess yes on glibc systems.
26103 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26104 # If we don't know, assume the worst.
26105 *) gl_cv_func_working_strerror="guessing no" ;;
26109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26110 /* end confdefs.h. */
26111 #include <string.h>
26116 if (!*strerror (-2)) return 1;
26121 if ac_fn_c_try_run "$LINENO"
26123 gl_cv_func_working_strerror=yes
26125 gl_cv_func_working_strerror=no
26127 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26128 conftest.$ac_objext conftest.beam conftest.$ac_ext
26133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26134 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
26135 case "$gl_cv_func_working_strerror" in
26142 case "$gl_cv_func_strerror_r_works" in
26143 *no) REPLACE_STRERROR=1 ;;
26150 if test $REPLACE_STRERROR = 1; then
26159 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26164 cat >>confdefs.h <<_ACEOF
26165 #define GNULIB_STRERROR 1
26180 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26186 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26195 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26201 if test $ac_cv_header_sys_socket_h != yes; then
26202 for ac_header in winsock2.h
26204 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26205 if test "x$ac_cv_header_winsock2_h" = xyes
26207 cat >>confdefs.h <<_ACEOF
26208 #define HAVE_WINSOCK2_H 1
26215 if test "$ac_cv_header_winsock2_h" = yes; then
26217 UNISTD_H_HAVE_WINSOCK2_H=1
26218 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26232 if test $ac_cv_have_decl_strerror_r = no; then
26233 HAVE_DECL_STRERROR_R=0
26236 if test $ac_cv_func_strerror_r = yes; then
26237 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26238 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26239 case "$gl_cv_func_strerror_r_works" in
26240 *no) REPLACE_STRERROR_R=1 ;;
26243 REPLACE_STRERROR_R=1
26246 REPLACE_STRERROR_R=1
26250 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26259 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26272 GNULIB_STRERROR_R=1
26278 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26299 if test $gl_cv_have_include_next = yes; then
26300 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26303 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
26304 if test ${gl_cv_next_sys_stat_h+y}
26306 printf %s "(cached) " >&6
26309 if test $ac_cv_header_sys_stat_h = yes; then
26314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26315 /* end confdefs.h. */
26316 #include <sys/stat.h>
26319 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26320 *) gl_absname_cpp="$ac_cpp" ;;
26325 gl_dirsep_regex='[/\\]'
26328 gl_dirsep_regex='\/'
26331 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26332 gl_header_literal_regex=`echo 'sys/stat.h' \
26333 | sed -e "$gl_make_literal_regex_sed"`
26334 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26335 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26341 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26342 sed -n "$gl_absolute_header_sed"`
26344 gl_header=$gl_cv_absolute_sys_stat_h
26345 gl_cv_next_sys_stat_h='"'$gl_header'"'
26347 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26353 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
26355 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26357 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26358 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26359 gl_next_as_first_directive='<'sys/stat.h'>'
26361 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26362 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26364 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26376 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26378 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26382 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26383 #include <sys/stat.h>
26385 if test "x$ac_cv_type_nlink_t" = xyes
26390 printf "%s\n" "#define nlink_t int" >>confdefs.h
26424 if test $gl_cv_have_include_next = yes; then
26425 gl_cv_next_unistd_h='<'unistd.h'>'
26427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26428 printf %s "checking absolute name of <unistd.h>... " >&6; }
26429 if test ${gl_cv_next_unistd_h+y}
26431 printf %s "(cached) " >&6
26434 if test $ac_cv_header_unistd_h = yes; then
26439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26440 /* end confdefs.h. */
26441 #include <unistd.h>
26444 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26445 *) gl_absname_cpp="$ac_cpp" ;;
26450 gl_dirsep_regex='[/\\]'
26453 gl_dirsep_regex='\/'
26456 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26457 gl_header_literal_regex=`echo 'unistd.h' \
26458 | sed -e "$gl_make_literal_regex_sed"`
26459 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26460 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26466 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26467 sed -n "$gl_absolute_header_sed"`
26469 gl_header=$gl_cv_absolute_unistd_h
26470 gl_cv_next_unistd_h='"'$gl_header'"'
26472 gl_cv_next_unistd_h='<'unistd.h'>'
26477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26478 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
26480 NEXT_UNISTD_H=$gl_cv_next_unistd_h
26482 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26483 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26484 gl_next_as_first_directive='<'unistd.h'>'
26486 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26487 gl_next_as_first_directive=$gl_cv_next_unistd_h
26489 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26494 if test $ac_cv_header_unistd_h = yes; then
26515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
26516 printf %s "checking whether unlink honors trailing slashes... " >&6; }
26517 if test ${gl_cv_func_unlink_honors_slashes+y}
26519 printf %s "(cached) " >&6
26521 touch conftest.file
26522 # Assume that if we have lstat, we can also check symlinks.
26523 if test $ac_cv_func_lstat = yes; then
26524 ln -s conftest.file conftest.lnk
26526 if test "$cross_compiling" = yes
26529 # Guess yes on glibc systems.
26530 *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
26531 # If we don't know, assume the worst.
26532 *) gl_cv_func_unlink_honors_slashes="guessing no" ;;
26536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26537 /* end confdefs.h. */
26539 # include <unistd.h>
26540 #else /* on Windows with MSVC */
26549 if (!unlink ("conftest.file/"))
26551 else if (errno != ENOTDIR)
26554 if (!unlink ("conftest.lnk/"))
26556 else if (errno != ENOTDIR)
26565 if ac_fn_c_try_run "$LINENO"
26567 gl_cv_func_unlink_honors_slashes=yes
26569 gl_cv_func_unlink_honors_slashes=no
26571 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26572 conftest.$ac_objext conftest.beam conftest.$ac_ext
26575 rm -f conftest.file conftest.lnk
26577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
26578 printf "%s\n" "$gl_cv_func_unlink_honors_slashes" >&6; }
26579 case "$gl_cv_func_unlink_honors_slashes" in
26585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
26586 printf %s "checking whether unlink of a parent directory fails as it should... " >&6; }
26587 if test ${gl_cv_func_unlink_parent_fails+y}
26589 printf %s "(cached) " >&6
26594 # Use the mktemp program if available. If not available, hide the error
26596 tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
26597 test -n "$tmp" && test -d "$tmp"
26600 # Use a simple mkdir command. It is guaranteed to fail if the directory
26601 # already exists. $RANDOM is bash specific and expands to empty in shells
26602 # other than bash, ksh and zsh. Its use does not increase security;
26603 # rather, it minimizes the probability of failure in a very cluttered /tmp
26605 tmp=/tmp/gt$$-$RANDOM
26606 (umask 077 && mkdir "$tmp")
26608 mkdir "$tmp/subdir"
26609 GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
26610 export GL_SUBDIR_FOR_UNLINK
26611 if test "$cross_compiling" = yes
26613 # If we don't know, assume the worst.
26614 gl_cv_func_unlink_parent_fails="guessing no"
26617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26618 /* end confdefs.h. */
26620 #include <stdlib.h>
26622 # include <unistd.h>
26623 #else /* on Windows with MSVC */
26624 # include <direct.h>
26630 if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
26632 else if (unlink ("..") == 0)
26638 if ac_fn_c_try_run "$LINENO"
26640 gl_cv_func_unlink_parent_fails=yes
26642 gl_cv_func_unlink_parent_fails=no
26644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26645 conftest.$ac_objext conftest.beam conftest.$ac_ext
26648 unset GL_SUBDIR_FOR_UNLINK
26651 gl_cv_func_unlink_parent_fails="guessing no"
26655 gl_cv_func_unlink_parent_fails="guessing yes"
26660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
26661 printf "%s\n" "$gl_cv_func_unlink_parent_fails" >&6; }
26662 case "$gl_cv_func_unlink_parent_fails" in
26666 printf "%s\n" "#define UNLINK_PARENT_BUG 1" >>confdefs.h
26671 if test $REPLACE_UNLINK = 1; then
26680 gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
26694 printf "%s\n" "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
26704 if test $ac_cv_func_unlinkat = no; then
26707 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
26709 # Solaris 9 has *at functions, but uniformly mishandles trailing
26710 # slash in all of them.
26714 # GNU/Hurd has unlinkat, but it has the same bug as unlink.
26715 # Darwin has unlinkat, but it has the same UNLINK_PARENT_BUG.
26716 if test $REPLACE_UNLINK = 1; then
26723 if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
26732 gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
26746 printf "%s\n" "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
26756 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26758 printf %s "checking whether futimesat handles NULL file... " >&6; }
26759 if test ${gl_cv_func_futimesat_works+y}
26761 printf %s "(cached) " >&6
26763 touch conftest.file
26764 if test "$cross_compiling" = yes
26767 # Guess yes on glibc systems.
26768 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26769 # If we don't know, assume the worst.
26770 *) gl_cv_func_futimesat_works="guessing no" ;;
26774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26775 /* end confdefs.h. */
26777 #include <stddef.h>
26778 #include <sys/times.h>
26784 int fd = open ("conftest.file", O_RDWR);
26785 if (fd < 0) return 1;
26786 if (futimesat (fd, NULL, NULL)) return 2;
26792 if ac_fn_c_try_run "$LINENO"
26794 gl_cv_func_futimesat_works=yes
26796 gl_cv_func_futimesat_works=no
26798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26799 conftest.$ac_objext conftest.beam conftest.$ac_ext
26802 rm -f conftest.file
26804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26805 printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
26806 case "$gl_cv_func_futimesat_works" in
26810 printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
26818 if test $ac_cv_func_vasnprintf = no; then
26829 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26839 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26849 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26859 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26861 if test $ac_cv_func_vasnprintf = yes; then
26863 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26877 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26878 if test "x$ac_cv_type_ptrdiff_t" = xyes
26883 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
26911 gl_cv_func_vfprintf_posix=no
26912 case "$gl_cv_func_printf_sizes_c99" in
26914 case "$gl_cv_func_printf_long_double" in
26916 case "$gl_cv_func_printf_infinite" in
26918 case "$gl_cv_func_printf_infinite_long_double" in
26920 case "$gl_cv_func_printf_directive_a" in
26922 case "$gl_cv_func_printf_directive_f" in
26924 case "$gl_cv_func_printf_directive_n" in
26926 case "$gl_cv_func_printf_directive_ls" in
26928 case "$gl_cv_func_printf_positions" in
26930 case "$gl_cv_func_printf_flag_grouping" in
26932 case "$gl_cv_func_printf_flag_leftadjust" in
26934 case "$gl_cv_func_printf_flag_zero" in
26936 case "$gl_cv_func_printf_precision" in
26938 case "$gl_cv_func_printf_enomem" in
26940 # vfprintf exists and is
26941 # already POSIX compliant.
26942 gl_cv_func_vfprintf_posix=yes
26971 if test $gl_cv_func_vfprintf_posix = no; then
26975 case "$gl_cv_func_printf_infinite" in
26980 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
26988 case "$gl_cv_func_printf_long_double" in
26990 case "$gl_cv_func_printf_infinite_long_double" in
26995 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
27004 case "$gl_cv_func_printf_directive_a" in
27009 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
27011 for ac_func in nl_langinfo
27013 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
27014 if test "x$ac_cv_func_nl_langinfo" = xyes
27016 cat >>confdefs.h <<_ACEOF
27017 #define HAVE_NL_LANGINFO 1
27028 case "$gl_cv_func_printf_directive_f" in
27033 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
27040 case "$gl_cv_func_printf_directive_ls" in
27045 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
27052 case "$gl_cv_func_printf_flag_grouping" in
27057 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
27064 case "$gl_cv_func_printf_flag_leftadjust" in
27069 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
27076 case "$gl_cv_func_printf_flag_zero" in
27081 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
27088 case "$gl_cv_func_printf_precision" in
27093 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
27096 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
27099 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
27106 case "$gl_cv_func_printf_enomem" in
27111 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
27114 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
27117 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
27132 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
27142 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
27152 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
27162 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
27164 if test $ac_cv_func_vasnprintf = yes; then
27166 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
27180 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
27181 if test "x$ac_cv_type_ptrdiff_t" = xyes
27186 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
27207 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
27211 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
27222 GNULIB_VFPRINTF_POSIX=1
27228 printf "%s\n" "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
27244 if test $gl_cv_have_include_next = yes; then
27245 gl_cv_next_wchar_h='<'wchar.h'>'
27247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27248 printf %s "checking absolute name of <wchar.h>... " >&6; }
27249 if test ${gl_cv_next_wchar_h+y}
27251 printf %s "(cached) " >&6
27254 if test $ac_cv_header_wchar_h = yes; then
27259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27260 /* end confdefs.h. */
27264 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27265 *) gl_absname_cpp="$ac_cpp" ;;
27270 gl_dirsep_regex='[/\\]'
27273 gl_dirsep_regex='\/'
27276 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27277 gl_header_literal_regex=`echo 'wchar.h' \
27278 | sed -e "$gl_make_literal_regex_sed"`
27279 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27280 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27286 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27287 sed -n "$gl_absolute_header_sed"`
27289 gl_header=$gl_cv_absolute_wchar_h
27290 gl_cv_next_wchar_h='"'$gl_header'"'
27292 gl_cv_next_wchar_h='<'wchar.h'>'
27297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27298 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
27300 NEXT_WCHAR_H=$gl_cv_next_wchar_h
27302 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27303 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27304 gl_next_as_first_directive='<'wchar.h'>'
27306 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27307 gl_next_as_first_directive=$gl_cv_next_wchar_h
27309 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27314 if test $ac_cv_header_wchar_h = yes; then
27324 if test $gt_cv_c_wint_t = yes; then
27336 for ac_header in stdint.h
27338 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27339 if test "x$ac_cv_header_stdint_h" = xyes
27341 cat >>confdefs.h <<_ACEOF
27342 #define HAVE_STDINT_H 1
27352 # End of code from modules
27373 gl_source_base='tests'
27374 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
27376 gl_module_indicator_condition=$gltests_WITNESS
27386 LIBGZIP_LIBDEPS="$gl_libdeps"
27388 LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
27392 # Check whether --enable-gcc-warnings was given.
27393 if test ${enable_gcc_warnings+y}
27395 enableval=$enable_gcc_warnings; case $enableval in
27397 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
27399 gl_gcc_warnings=$enableval
27401 if test -d "$srcdir"/.git; then
27402 gl_gcc_warnings=yes
27410 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
27411 # ------------------------------------------------
27412 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
27413 # Otherwise, run RUN-IF-NOT-FOUND.
27416 if test "$gl_gcc_warnings" = yes; then
27417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
27418 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
27419 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
27421 printf %s "(cached) " >&6
27424 gl_save_compiler_FLAGS="$CFLAGS"
27425 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
27426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27427 /* end confdefs.h. */
27437 if ac_fn_c_try_link "$LINENO"
27439 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
27441 gl_cv_warn_c__Werror__Wunknown_warning_option=no
27443 rm -f core conftest.err conftest.$ac_objext \
27444 conftest$ac_exeext conftest.$ac_ext
27445 CFLAGS="$gl_save_compiler_FLAGS"
27448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
27449 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
27450 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
27452 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
27454 gl_unknown_warnings_are_errors=
27458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
27459 printf %s "checking whether C compiler handles -Werror... " >&6; }
27460 if test ${gl_cv_warn_c__Werror+y}
27462 printf %s "(cached) " >&6
27465 gl_save_compiler_FLAGS="$CFLAGS"
27466 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
27467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27468 /* end confdefs.h. */
27478 if ac_fn_c_try_link "$LINENO"
27480 gl_cv_warn_c__Werror=yes
27482 gl_cv_warn_c__Werror=no
27484 rm -f core conftest.err conftest.$ac_objext \
27485 conftest$ac_exeext conftest.$ac_ext
27486 CFLAGS="$gl_save_compiler_FLAGS"
27489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
27490 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
27491 if test "x$gl_cv_warn_c__Werror" = xyes
27493 as_fn_append WERROR_CFLAGS " -Werror"
27500 # This, $nw, is the list of warnings we disable.
27501 nw="$nw -Wdeclaration-after-statement" # too useful to forbid
27502 nw="$nw -Waggregate-return" # anachronistic
27503 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
27504 nw="$nw -Wc++-compat" # We don't care about C++ compilers
27505 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
27506 nw="$nw -Wtraditional" # Warns on #elif which we use often
27507 nw="$nw -Wcast-qual" # Too many warnings for now
27508 nw="$nw -Wconversion" # Too many warnings for now
27509 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
27510 nw="$nw -Wsign-conversion" # Too many warnings for now
27511 nw="$nw -Wtraditional-conversion" # Too many warnings for now
27512 nw="$nw -Wunreachable-code" # Too many warnings for now
27513 nw="$nw -Wpadded" # Our structs are not padded
27514 nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat
27515 nw="$nw -Wlogical-op" # any use of fwrite provokes this
27516 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
27517 nw="$nw -Wvla" # warnings in gettext.h
27518 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
27519 nw="$nw -Wswitch-enum" # Too many warnings for now
27520 nw="$nw -Wswitch-default" # Too many warnings for now
27521 nw="$nw -Wstack-protector" # not worth working around
27522 # things I might fix soon:
27523 nw="$nw -Wfloat-equal" # sort.c, seq.c
27524 nw="$nw -Wmissing-format-attribute" # copy.c
27525 nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
27526 nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
27528 # Warnings that gzip runs afoul of but coreutils does not.
27529 nw="$nw -Wold-style-definition"
27531 nw="$nw -Wstrict-overflow"
27533 # Using -Wstrict-overflow is a pain, but the alternative is worse.
27534 # For an example, see the code that provoked this report:
27535 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
27536 # Code like that still infloops with gcc-4.6.0 and -O2. Scary indeed.
27540 if test -n "$GCC"; then
27542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
27543 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
27544 if test ${gl_cv_cc_nomfi_supported+y}
27546 printf %s "(cached) " >&6
27549 gl_save_CFLAGS="$CFLAGS"
27550 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
27551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27552 /* end confdefs.h. */
27562 if ac_fn_c_try_compile "$LINENO"
27564 gl_cv_cc_nomfi_supported=yes
27566 gl_cv_cc_nomfi_supported=no
27568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27569 CFLAGS="$gl_save_CFLAGS"
27572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
27573 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
27575 if test "$gl_cv_cc_nomfi_supported" = yes; then
27576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
27577 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
27578 if test ${gl_cv_cc_nomfi_needed+y}
27580 printf %s "(cached) " >&6
27583 gl_save_CFLAGS="$CFLAGS"
27584 CFLAGS="$CFLAGS -W -Werror"
27585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27586 /* end confdefs.h. */
27589 typedef struct { int a; int b; } s_t;
27601 if ac_fn_c_try_compile "$LINENO"
27603 gl_cv_cc_nomfi_needed=no
27605 gl_cv_cc_nomfi_needed=yes
27607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27608 CFLAGS="$gl_save_CFLAGS"
27612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
27613 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
27616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
27617 printf %s "checking whether -Wuninitialized is supported... " >&6; }
27618 if test ${gl_cv_cc_uninitialized_supported+y}
27620 printf %s "(cached) " >&6
27623 gl_save_CFLAGS="$CFLAGS"
27624 CFLAGS="$CFLAGS -Werror -Wuninitialized"
27625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27626 /* end confdefs.h. */
27636 if ac_fn_c_try_compile "$LINENO"
27638 gl_cv_cc_uninitialized_supported=yes
27640 gl_cv_cc_uninitialized_supported=no
27642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27643 CFLAGS="$gl_save_CFLAGS"
27646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
27647 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
27651 # List all gcc warning categories.
27652 # To compare this list to your installed GCC's, run this Bash command:
27655 # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
27656 # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
27658 # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
27661 for gl_manywarn_item in \
27665 -Waggressive-loop-optimizations \
27668 -Wbad-function-cast \
27670 -Wbuiltin-macro-redefined \
27672 -Wchar-subscripts \
27677 -Wcoverage-mismatch \
27681 -Wdeprecated-declarations \
27682 -Wdesignated-init \
27683 -Wdisabled-optimization \
27684 -Wdiscarded-array-qualifiers \
27685 -Wdiscarded-qualifiers \
27687 -Wdouble-promotion \
27692 -Wformat-contains-nul \
27693 -Wformat-extra-args \
27694 -Wformat-nonliteral \
27695 -Wformat-security \
27696 -Wformat-signedness \
27698 -Wformat-zero-length \
27699 -Wfree-nonheap-object \
27700 -Wignored-qualifiers \
27702 -Wimplicit-function-declaration \
27704 -Wincompatible-pointer-types \
27708 -Wint-to-pointer-cast \
27709 -Winvalid-memory-model \
27711 -Wjump-misses-init \
27712 -Wlogical-not-parentheses \
27715 -Wmaybe-uninitialized \
27716 -Wmemset-transposed-args \
27718 -Wmissing-declarations \
27719 -Wmissing-field-initializers \
27720 -Wmissing-include-dirs \
27721 -Wmissing-parameter-type \
27722 -Wmissing-prototypes \
27728 -Wold-style-declaration \
27729 -Wold-style-definition \
27732 -Woverlength-strings \
27735 -Wpacked-bitfield-compat \
27739 -Wpointer-to-int-cast \
27741 -Wreturn-local-addr \
27745 -Wshift-count-negative \
27746 -Wshift-count-overflow \
27747 -Wsizeof-array-argument \
27748 -Wsizeof-pointer-memaccess \
27749 -Wstack-protector \
27750 -Wstrict-aliasing \
27751 -Wstrict-overflow \
27752 -Wstrict-prototypes \
27753 -Wsuggest-attribute=const \
27754 -Wsuggest-attribute=format \
27755 -Wsuggest-attribute=noreturn \
27756 -Wsuggest-attribute=pure \
27757 -Wsuggest-final-methods \
27758 -Wsuggest-final-types \
27768 -Wunknown-pragmas \
27769 -Wunsafe-loop-optimizations \
27771 -Wunused-but-set-parameter \
27772 -Wunused-but-set-variable \
27773 -Wunused-function \
27775 -Wunused-local-typedefs \
27777 -Wunused-parameter \
27780 -Wunused-variable \
27782 -Wvariadic-macros \
27783 -Wvector-operation-performance \
27785 -Wvolatile-register-var \
27789 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27792 # gcc --help=warnings outputs an unusual form for these options; list
27793 # them here so that the above 'comm' command doesn't report a false match.
27794 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
27795 gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
27797 # These are needed for older GCC versions.
27798 if test -n "$GCC"; then
27799 case `($CC --version) 2>/dev/null` in
27800 'gcc (GCC) '[0-3].* | \
27801 'gcc (GCC) '4.[0-7].*)
27802 gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
27803 gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
27808 # Disable specific options as needed.
27809 if test "$gl_cv_cc_nomfi_needed" = yes; then
27810 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
27813 if test "$gl_cv_cc_uninitialized_supported" = no; then
27814 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
27817 ws=$gl_manywarn_set
27825 *" $gl_warn_item "*)
27828 gl_warn_set="$gl_warn_set $gl_warn_item"
27836 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
27838 case $gl_positive in
27839 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
27841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
27842 printf %s "checking whether C compiler handles $w... " >&6; }
27843 if eval test \${$as_gl_Warn+y}
27845 printf %s "(cached) " >&6
27848 gl_save_compiler_FLAGS="$CFLAGS"
27849 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
27850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27851 /* end confdefs.h. */
27861 if ac_fn_c_try_link "$LINENO"
27863 eval "$as_gl_Warn=yes"
27865 eval "$as_gl_Warn=no"
27867 rm -f core conftest.err conftest.$ac_objext \
27868 conftest$ac_exeext conftest.$ac_ext
27869 CFLAGS="$gl_save_compiler_FLAGS"
27872 eval ac_res=\$$as_gl_Warn
27873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27874 printf "%s\n" "$ac_res" >&6; }
27875 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
27877 as_fn_append WARN_CFLAGS " $w"
27883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
27884 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
27885 if test ${gl_cv_warn_c__Wno_sign_compare+y}
27887 printf %s "(cached) " >&6
27890 gl_save_compiler_FLAGS="$CFLAGS"
27891 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
27892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27893 /* end confdefs.h. */
27903 if ac_fn_c_try_link "$LINENO"
27905 gl_cv_warn_c__Wno_sign_compare=yes
27907 gl_cv_warn_c__Wno_sign_compare=no
27909 rm -f core conftest.err conftest.$ac_objext \
27910 conftest$ac_exeext conftest.$ac_ext
27911 CFLAGS="$gl_save_compiler_FLAGS"
27914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
27915 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
27916 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
27918 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
27921 # Too many warnings for now
27923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
27924 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
27925 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
27927 printf %s "(cached) " >&6
27930 gl_save_compiler_FLAGS="$CFLAGS"
27931 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
27932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27933 /* end confdefs.h. */
27943 if ac_fn_c_try_link "$LINENO"
27945 gl_cv_warn_c__Wno_unused_parameter=yes
27947 gl_cv_warn_c__Wno_unused_parameter=no
27949 rm -f core conftest.err conftest.$ac_objext \
27950 conftest$ac_exeext conftest.$ac_ext
27951 CFLAGS="$gl_save_compiler_FLAGS"
27954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
27955 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
27956 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
27958 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
27961 # Too many warnings for now
27963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5
27964 printf %s "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; }
27965 if test ${gl_cv_warn_c__Wsuggest_attribute_const+y}
27967 printf %s "(cached) " >&6
27970 gl_save_compiler_FLAGS="$CFLAGS"
27971 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=const"
27972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27973 /* end confdefs.h. */
27983 if ac_fn_c_try_link "$LINENO"
27985 gl_cv_warn_c__Wsuggest_attribute_const=yes
27987 gl_cv_warn_c__Wsuggest_attribute_const=no
27989 rm -f core conftest.err conftest.$ac_objext \
27990 conftest$ac_exeext conftest.$ac_ext
27991 CFLAGS="$gl_save_compiler_FLAGS"
27994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_const" >&5
27995 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_const" >&6; }
27996 if test "x$gl_cv_warn_c__Wsuggest_attribute_const" = xyes
27998 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=const"
28003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=noreturn" >&5
28004 printf %s "checking whether C compiler handles -Wsuggest-attribute=noreturn... " >&6; }
28005 if test ${gl_cv_warn_c__Wsuggest_attribute_noreturn+y}
28007 printf %s "(cached) " >&6
28010 gl_save_compiler_FLAGS="$CFLAGS"
28011 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=noreturn"
28012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28013 /* end confdefs.h. */
28023 if ac_fn_c_try_link "$LINENO"
28025 gl_cv_warn_c__Wsuggest_attribute_noreturn=yes
28027 gl_cv_warn_c__Wsuggest_attribute_noreturn=no
28029 rm -f core conftest.err conftest.$ac_objext \
28030 conftest$ac_exeext conftest.$ac_ext
28031 CFLAGS="$gl_save_compiler_FLAGS"
28034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_noreturn" >&5
28035 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_noreturn" >&6; }
28036 if test "x$gl_cv_warn_c__Wsuggest_attribute_noreturn" = xyes
28038 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
28043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
28044 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
28045 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
28047 printf %s "(cached) " >&6
28050 gl_save_compiler_FLAGS="$CFLAGS"
28051 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
28052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28053 /* end confdefs.h. */
28063 if ac_fn_c_try_link "$LINENO"
28065 gl_cv_warn_c__Wno_format_nonliteral=yes
28067 gl_cv_warn_c__Wno_format_nonliteral=no
28069 rm -f core conftest.err conftest.$ac_objext \
28070 conftest$ac_exeext conftest.$ac_ext
28071 CFLAGS="$gl_save_compiler_FLAGS"
28074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
28075 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
28076 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
28078 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
28083 # Enable this warning only with gcc-4.7 and newer. With 4.6.2 20111027,
28084 # it suggests test.c's advance function may be pure, even though it
28085 # increments a global variable. Oops.
28086 # Normally we'd write code to test for the precise failure, but that
28087 # requires a relatively large input to make gcc exhibit the failure.
28088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28089 /* end confdefs.h. */
28091 #if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
28094 # error "your version of gcc is older than 4.7"
28106 if ac_fn_c_try_cpp "$LINENO"
28109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5
28110 printf %s "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; }
28111 if test ${gl_cv_warn_c__Wsuggest_attribute_pure+y}
28113 printf %s "(cached) " >&6
28116 gl_save_compiler_FLAGS="$CFLAGS"
28117 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=pure"
28118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28119 /* end confdefs.h. */
28129 if ac_fn_c_try_link "$LINENO"
28131 gl_cv_warn_c__Wsuggest_attribute_pure=yes
28133 gl_cv_warn_c__Wsuggest_attribute_pure=no
28135 rm -f core conftest.err conftest.$ac_objext \
28136 conftest$ac_exeext conftest.$ac_ext
28137 CFLAGS="$gl_save_compiler_FLAGS"
28140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_pure" >&5
28141 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_pure" >&6; }
28142 if test "x$gl_cv_warn_c__Wsuggest_attribute_pure" = xyes
28144 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=pure"
28149 rm -f conftest.err conftest.i conftest.$ac_ext
28153 # In spite of excluding -Wlogical-op above, it is enabled, as of
28154 # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
28156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
28157 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
28158 if test ${gl_cv_warn_c__Wno_logical_op+y}
28160 printf %s "(cached) " >&6
28163 gl_save_compiler_FLAGS="$CFLAGS"
28164 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
28165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28166 /* end confdefs.h. */
28176 if ac_fn_c_try_link "$LINENO"
28178 gl_cv_warn_c__Wno_logical_op=yes
28180 gl_cv_warn_c__Wno_logical_op=no
28182 rm -f core conftest.err conftest.$ac_objext \
28183 conftest$ac_exeext conftest.$ac_ext
28184 CFLAGS="$gl_save_compiler_FLAGS"
28187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
28188 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
28189 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes
28191 as_fn_append WARN_CFLAGS " -Wno-logical-op"
28197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
28198 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
28199 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
28201 printf %s "(cached) " >&6
28204 gl_save_compiler_FLAGS="$CFLAGS"
28205 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
28206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28207 /* end confdefs.h. */
28217 if ac_fn_c_try_link "$LINENO"
28219 gl_cv_warn_c__fdiagnostics_show_option=yes
28221 gl_cv_warn_c__fdiagnostics_show_option=no
28223 rm -f core conftest.err conftest.$ac_objext \
28224 conftest$ac_exeext conftest.$ac_ext
28225 CFLAGS="$gl_save_compiler_FLAGS"
28228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
28229 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
28230 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
28232 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
28237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
28238 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
28239 if test ${gl_cv_warn_c__funit_at_a_time+y}
28241 printf %s "(cached) " >&6
28244 gl_save_compiler_FLAGS="$CFLAGS"
28245 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
28246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28247 /* end confdefs.h. */
28257 if ac_fn_c_try_link "$LINENO"
28259 gl_cv_warn_c__funit_at_a_time=yes
28261 gl_cv_warn_c__funit_at_a_time=no
28263 rm -f core conftest.err conftest.$ac_objext \
28264 conftest$ac_exeext conftest.$ac_ext
28265 CFLAGS="$gl_save_compiler_FLAGS"
28268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
28269 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
28270 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
28272 as_fn_append WARN_CFLAGS " -funit-at-a-time"
28280 printf "%s\n" "#define lint 1" >>confdefs.h
28284 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
28287 # We use a slightly smaller set of warning options for lib/.
28288 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
28290 nw="$nw -Wstrict-overflow"
28291 nw="$nw -Wuninitialized"
28292 nw="$nw -Wunused-macros"
28293 nw="$nw -Wmissing-prototypes"
28294 nw="$nw -Wold-style-definition"
28297 set x $WARN_CFLAGS; shift
28301 *" $gl_warn_item "*)
28304 gl_warn_set="$gl_warn_set $gl_warn_item"
28308 GNULIB_WARN_CFLAGS=$gl_warn_set
28313 # cc -E produces incorrect asm files on SVR4, so postprocess it.
28314 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
28317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
28318 printf %s "checking for underline in external names... " >&6; }
28319 if test ${gzip_cv_underline+y}
28321 printf %s "(cached) " >&6
28323 gzip_cv_underline=yes
28324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28325 /* end confdefs.h. */
28326 int foo() {return 0;}
28335 if ac_fn_c_try_compile "$LINENO"
28337 $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
28338 gzip_cv_underline=no
28340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
28343 printf "%s\n" "$gzip_cv_underline" >&6; }
28345 if test $gzip_cv_underline = no; then
28346 ASCPPFLAGS='-DNO_UNDERLINE'
28351 # Try to assemble match.S.
28352 # "gcc -E match.s" ignores -E, so we must use _match.S.
28353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
28354 printf %s "checking for an assembler syntax supported by this package... " >&6; }
28355 if test ${gzip_cv_assembler+y}
28357 printf %s "(cached) " >&6
28359 gzip_cv_assembler=no
28363 if cp $srcdir/lib/match.c _match.S &&
28364 eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
28365 eval "$ASCPPPOST < _match.i > match_.s"; then
28366 if test ! -s match_.s || grep error < match_.s > /dev/null; then
28368 elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
28369 test -f match_.$OBJEXT; then
28370 rm -f match_.$OBJEXT
28371 gzip_cv_assembler=yes
28372 if echo 'void foo (void) {}' > conftest.c &&
28373 eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
28374 grep '\.note\.GNU-stack' conftest.s >/dev/null &&
28375 eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
28376 test -f match_.$OBJEXT; then
28377 gzip_cv_assembler='yes, with -Wa,--noexecstack'
28381 rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
28384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
28385 printf "%s\n" "$gzip_cv_assembler" >&6; }
28386 if test "$gzip_cv_assembler" != no; then
28388 printf "%s\n" "#define ASMV /**/" >>confdefs.h
28390 case " $LIBOBJS " in
28391 *" match.$ac_objext "* ) ;;
28392 *) LIBOBJS="$LIBOBJS match.$ac_objext"
28397 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
28398 ASFLAGS_config='-Wa,--noexecstack'
28404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
28405 printf %s "checking for library containing strerror... " >&6; }
28406 if test ${ac_cv_search_strerror+y}
28408 printf %s "(cached) " >&6
28410 ac_func_search_save_LIBS=$LIBS
28411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28412 /* end confdefs.h. */
28414 /* Override any GCC internal prototype to avoid an error.
28415 Use char because int might match the return type of a GCC
28416 builtin and then its argument prototype would still apply. */
28424 return strerror ();
28429 for ac_lib in '' cposix
28431 if test -z "$ac_lib"; then
28432 ac_res="none required"
28435 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28437 if ac_fn_c_try_link "$LINENO"
28439 ac_cv_search_strerror=$ac_res
28441 rm -f core conftest.err conftest.$ac_objext \
28443 if test ${ac_cv_search_strerror+y}
28448 if test ${ac_cv_search_strerror+y}
28452 ac_cv_search_strerror=no
28454 rm conftest.$ac_ext
28455 LIBS=$ac_func_search_save_LIBS
28457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
28458 printf "%s\n" "$ac_cv_search_strerror" >&6; }
28459 ac_res=$ac_cv_search_strerror
28460 if test "$ac_res" != no
28462 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
28467 printf %s "checking for an ANSI C-conforming const... " >&6; }
28468 if test ${ac_cv_c_const+y}
28470 printf %s "(cached) " >&6
28472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28473 /* end confdefs.h. */
28479 #ifndef __cplusplus
28480 /* Ultrix mips cc rejects this sort of thing. */
28481 typedef int charset[2];
28482 const charset cs = { 0, 0 };
28483 /* SunOS 4.1.1 cc rejects this. */
28484 char const *const *pcpcc;
28486 /* NEC SVR4.0.2 mips cc rejects this. */
28487 struct point {int x, y;};
28488 static struct point const zero = {0,0};
28489 /* IBM XL C 1.02.0.0 rejects this.
28490 It does not let you subtract one const X* pointer from another in
28491 an arm of an if-expression whose if-part is not a constant
28493 const char *g = "string";
28494 pcpcc = &g + (g ? g-g : 0);
28495 /* HPUX 7.0 cc rejects these. */
28497 ppc = (char**) pcpcc;
28498 pcpcc = (char const *const *) ppc;
28499 { /* SCO 3.2v4 cc rejects this sort of thing. */
28502 char const *s = 0 ? (char *) 0 : (char const *) 0;
28507 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
28508 int x[] = {25, 17};
28509 const int *foo = &x[0];
28512 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
28513 typedef const int *iptr;
28517 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
28518 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
28519 struct s { int j; const int *ap[3]; } bx;
28520 struct s *b = &bx; b->j = 5;
28522 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
28523 const int foo = 10;
28524 if (!foo) return 0;
28526 return !cs[0] && !zero.x;
28533 if ac_fn_c_try_compile "$LINENO"
28539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
28542 printf "%s\n" "$ac_cv_c_const" >&6; }
28543 if test $ac_cv_c_const = no; then
28545 printf "%s\n" "#define const /**/" >>confdefs.h
28549 # Autoupdate added the following line to ensure that your configure
28550 # script's behavior did not change. It is probably safe to remove.
28570 ac_header_dirent=no
28571 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
28572 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
28573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
28574 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
28575 if eval test \${$as_ac_Header+y}
28577 printf %s "(cached) " >&6
28579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28580 /* end confdefs.h. */
28581 #include <sys/types.h>
28593 if ac_fn_c_try_compile "$LINENO"
28595 eval "$as_ac_Header=yes"
28597 eval "$as_ac_Header=no"
28599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28601 eval ac_res=\$$as_ac_Header
28602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28603 printf "%s\n" "$ac_res" >&6; }
28604 if eval test \"x\$"$as_ac_Header"\" = x"yes"
28606 cat >>confdefs.h <<_ACEOF
28607 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
28610 ac_header_dirent=$ac_hdr; break
28614 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
28615 if test $ac_header_dirent = dirent.h; then
28616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28617 printf %s "checking for library containing opendir... " >&6; }
28618 if test ${ac_cv_search_opendir+y}
28620 printf %s "(cached) " >&6
28622 ac_func_search_save_LIBS=$LIBS
28623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28624 /* end confdefs.h. */
28626 /* Override any GCC internal prototype to avoid an error.
28627 Use char because int might match the return type of a GCC
28628 builtin and then its argument prototype would still apply. */
28641 for ac_lib in '' dir
28643 if test -z "$ac_lib"; then
28644 ac_res="none required"
28647 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28649 if ac_fn_c_try_link "$LINENO"
28651 ac_cv_search_opendir=$ac_res
28653 rm -f core conftest.err conftest.$ac_objext \
28655 if test ${ac_cv_search_opendir+y}
28660 if test ${ac_cv_search_opendir+y}
28664 ac_cv_search_opendir=no
28666 rm conftest.$ac_ext
28667 LIBS=$ac_func_search_save_LIBS
28669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28670 printf "%s\n" "$ac_cv_search_opendir" >&6; }
28671 ac_res=$ac_cv_search_opendir
28672 if test "$ac_res" != no
28674 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28680 printf %s "checking for library containing opendir... " >&6; }
28681 if test ${ac_cv_search_opendir+y}
28683 printf %s "(cached) " >&6
28685 ac_func_search_save_LIBS=$LIBS
28686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28687 /* end confdefs.h. */
28689 /* Override any GCC internal prototype to avoid an error.
28690 Use char because int might match the return type of a GCC
28691 builtin and then its argument prototype would still apply. */
28706 if test -z "$ac_lib"; then
28707 ac_res="none required"
28710 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28712 if ac_fn_c_try_link "$LINENO"
28714 ac_cv_search_opendir=$ac_res
28716 rm -f core conftest.err conftest.$ac_objext \
28718 if test ${ac_cv_search_opendir+y}
28723 if test ${ac_cv_search_opendir+y}
28727 ac_cv_search_opendir=no
28729 rm conftest.$ac_ext
28730 LIBS=$ac_func_search_save_LIBS
28732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28733 printf "%s\n" "$ac_cv_search_opendir" >&6; }
28734 ac_res=$ac_cv_search_opendir
28735 if test "$ac_res" != no
28737 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
28744 printf %s "checking return type of signal handlers... " >&6; }
28745 if test ${ac_cv_type_signal+y}
28747 printf %s "(cached) " >&6
28749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28750 /* end confdefs.h. */
28751 #include <sys/types.h>
28752 #include <signal.h>
28757 return *(signal (0, 0)) (0) == 1;
28762 if ac_fn_c_try_compile "$LINENO"
28764 ac_cv_type_signal=int
28766 ac_cv_type_signal=void
28768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
28771 printf "%s\n" "$ac_cv_type_signal" >&6; }
28773 cat >>confdefs.h <<_ACEOF
28774 #define RETSIGTYPE $ac_cv_type_signal
28778 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
28779 if test "x$ac_cv_type_size_t" = xyes
28784 cat >>confdefs.h <<_ACEOF
28785 #define size_t unsigned int
28790 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
28791 if test "x$ac_cv_type_off_t" = xyes
28796 cat >>confdefs.h <<_ACEOF
28797 #define off_t long int
28803 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
28805 cat >confcache <<\_ACEOF
28806 # This file is a shell script that caches the results of configure
28807 # tests run on this system so they can be shared between configure
28808 # scripts and configure runs, see configure's option --config-cache.
28809 # It is not useful on other systems. If it contains results you don't
28810 # want to keep, you may remove or edit it.
28812 # config.status only pays attention to the cache file if you give it
28813 # the --recheck option to rerun configure.
28815 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28816 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28817 # following values.
28821 # The following way of writing the cache mishandles newlines in values,
28822 # but we know of no workaround that is simple, portable, and efficient.
28823 # So, we kill variables containing newlines.
28824 # Ultrix sh set writes to stderr and can't be redirected directly,
28825 # and sets the high bit in the cache file unless we assign to the vars.
28827 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28828 eval ac_val=\$$ac_var
28832 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28833 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28836 _ | IFS | as_nl) ;; #(
28837 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28838 *) { eval $ac_var=; unset $ac_var;} ;;
28844 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28845 *${as_nl}ac_space=\ *)
28846 # `set' does not quote correctly, so add quotes: double-quote
28847 # substitution turns \\\\ into \\, and sed turns \\ into \.
28850 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28853 # `set' quotes correctly as required by POSIX, so do not add quotes.
28854 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28863 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
28865 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28867 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28868 if test -w "$cache_file"; then
28869 if test "x$cache_file" != "x/dev/null"; then
28870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28871 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
28872 if test ! -f "$cache_file" || test -h "$cache_file"; then
28873 cat confcache >"$cache_file"
28875 case $cache_file in #(
28877 mv -f confcache "$cache_file"$$ &&
28878 mv -f "$cache_file"$$ "$cache_file" ;; #(
28880 mv -f confcache "$cache_file" ;;
28885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28886 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
28891 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28892 # Let make expand exec_prefix.
28893 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28895 DEFS=-DHAVE_CONFIG_H
28900 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28901 # 1. Remove the extension, and $U if already installed.
28902 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28903 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
28904 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28905 # will be set to the directory where LIBOBJS objects are built.
28906 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28907 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28909 LIBOBJS=$ac_libobjs
28911 LTLIBOBJS=$ac_ltlibobjs
28914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
28915 printf %s "checking that generated files are newer than configure... " >&6; }
28916 if test -n "$am_sleep_pid"; then
28917 # Hide warnings about reused PIDs.
28918 wait $am_sleep_pid 2>/dev/null
28920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
28921 printf "%s\n" "done" >&6; }
28922 if test -n "$EXEEXT"; then
28924 am__EXEEXT_FALSE='#'
28926 am__EXEEXT_TRUE='#'
28930 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
28931 as_fn_error $? "conditional \"AMDEP\" was never defined.
28932 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28934 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
28935 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
28936 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28938 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
28939 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
28940 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28942 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28943 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
28944 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28946 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28947 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28948 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28950 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
28951 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
28952 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28956 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
28957 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
28958 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28960 CONFIG_INCLUDE=lib/config.h
28962 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
28963 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
28964 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28966 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
28967 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
28968 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28970 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
28971 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
28972 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28977 if test -n "$gl_LIBOBJS"; then
28978 # Remove the extension.
28979 sed_drop_objext='s/\.o$//;s/\.obj$//'
28980 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28981 gl_libobjs="$gl_libobjs $i.$ac_objext"
28982 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28985 gl_LIBOBJS=$gl_libobjs
28987 gl_LTLIBOBJS=$gl_ltlibobjs
28993 if test -n "$gltests_LIBOBJS"; then
28994 # Remove the extension.
28995 sed_drop_objext='s/\.o$//;s/\.obj$//'
28996 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28997 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
28998 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29001 gltests_LIBOBJS=$gltests_libobjs
29003 gltests_LTLIBOBJS=$gltests_ltlibobjs
29007 : "${CONFIG_STATUS=./config.status}"
29009 ac_clean_files_save=$ac_clean_files
29010 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29012 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
29014 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29016 # Generated by $as_me.
29017 # Run this file to recreate the current configuration.
29018 # Compiler output produced by configure, useful for debugging
29019 # configure, is in config.log if it exists.
29022 ac_cs_recheck=false
29025 SHELL=\${CONFIG_SHELL-$SHELL}
29028 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29029 ## -------------------- ##
29030 ## M4sh Initialization. ##
29031 ## -------------------- ##
29033 # Be more Bourne compatible
29034 DUALCASE=1; export DUALCASE # for MKS sh
29035 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
29039 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29040 # is contrary to our usage. Disable this feature.
29041 alias -g '${1+"$@"}'='"$@"'
29042 setopt NO_GLOB_SUBST
29044 case `(set -o) 2>/dev/null` in #(
29053 # The user is always right.
29054 if ${PATH_SEPARATOR+false} :; then
29056 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29057 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29064 # We need space, tab and new line, in precisely that order. Quoting is
29065 # there to prevent editors from complaining about space-tab.
29066 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29067 # splitting by setting IFS to empty value.)
29073 # Find who we are. Look in the path if we contain no directory separator.
29076 *[\\/]* ) as_myself=$0 ;;
29077 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29078 for as_dir in $PATH
29081 case $as_dir in #(((
29084 *) as_dir=$as_dir/ ;;
29086 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
29092 # We did not find ourselves, most probably we were run as `sh COMMAND'
29093 # in which case we are not to be found in the path.
29094 if test "x$as_myself" = x; then
29097 if test ! -f "$as_myself"; then
29098 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29102 # Unset variables that we do not need and which cause bugs (e.g. in
29103 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29104 # suppresses any "Segmentation fault" message there. '((' could
29105 # trigger a bug in pdksh 5.2.14.
29106 for as_var in BASH_ENV ENV MAIL MAILPATH
29107 do eval test \${$as_var+y} \
29108 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29121 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29124 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29125 # ----------------------------------------
29126 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29127 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29128 # script with STATUS, using 1 if that was 0.
29131 as_status=$1; test $as_status -eq 0 && as_status=1
29133 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29134 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29136 printf "%s\n" "$as_me: error: $2" >&2
29137 as_fn_exit $as_status
29141 # as_fn_set_status STATUS
29142 # -----------------------
29143 # Set $? to STATUS, without forking.
29144 as_fn_set_status ()
29147 } # as_fn_set_status
29149 # as_fn_exit STATUS
29150 # -----------------
29151 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29155 as_fn_set_status $1
29161 # Portably unset VAR.
29164 { eval $1=; unset $1;}
29166 as_unset=as_fn_unset
29167 # as_fn_append VAR VALUE
29168 # ----------------------
29169 # Append the text in VALUE to the end of the definition contained in VAR. Take
29170 # advantage of any shell optimizations that allow amortized linear growth over
29171 # repeated appends, instead of the typical quadratic growth present in naive
29173 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
29175 eval 'as_fn_append ()
29186 # as_fn_arith ARG...
29187 # ------------------
29188 # Perform arithmetic evaluation on the ARGs, and store the result in the
29189 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29190 # must be portable across $(()) and expr.
29191 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
29193 eval 'as_fn_arith ()
29200 as_val=`expr "$@" || test $? -eq 1`
29205 if expr a : '\(a\)' >/dev/null 2>&1 &&
29206 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29212 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29213 as_basename=basename
29218 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29224 as_me=`$as_basename -- "$0" ||
29225 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29226 X"$0" : 'X\(//\)$' \| \
29227 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29228 printf "%s\n" X/"$0" |
29229 sed '/^.*\/\([^/][^/]*\)\/*$/{
29243 # Avoid depending upon Character Ranges.
29244 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29245 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29246 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29247 as_cr_digits='0123456789'
29248 as_cr_alnum=$as_cr_Letters$as_cr_digits
29250 ECHO_C= ECHO_N= ECHO_T=
29251 case `echo -n x` in #(((((
29253 case `echo 'xy\c'` in
29254 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29256 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29263 rm -f conf$$ conf$$.exe conf$$.file
29264 if test -d conf$$.dir; then
29265 rm -f conf$$.dir/conf$$.file
29268 mkdir conf$$.dir 2>/dev/null
29270 if (echo >conf$$.file) 2>/dev/null; then
29271 if ln -s conf$$.file conf$$ 2>/dev/null; then
29273 # ... but there are two gotchas:
29274 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29275 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29276 # In both cases, we have to default to `cp -pR'.
29277 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29279 elif ln conf$$.file conf$$ 2>/dev/null; then
29287 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29288 rmdir conf$$.dir 2>/dev/null
29293 # Create "$as_dir" as a directory, including parents if necessary.
29298 -*) as_dir=./$as_dir;;
29300 test -d "$as_dir" || eval $as_mkdir_p || {
29304 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29305 *) as_qdir=$as_dir;;
29307 as_dirs="'$as_qdir' $as_dirs"
29308 as_dir=`$as_dirname -- "$as_dir" ||
29309 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29310 X"$as_dir" : 'X\(//\)[^/]' \| \
29311 X"$as_dir" : 'X\(//\)$' \| \
29312 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29313 printf "%s\n" X"$as_dir" |
29314 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29318 /^X\(\/\/\)[^/].*/{
29331 test -d "$as_dir" && break
29333 test -z "$as_dirs" || eval "mkdir $as_dirs"
29334 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29338 if mkdir -p . 2>/dev/null; then
29339 as_mkdir_p='mkdir -p "$as_dir"'
29341 test -d ./-p && rmdir ./-p
29346 # as_fn_executable_p FILE
29347 # -----------------------
29348 # Test if FILE is an executable regular file.
29349 as_fn_executable_p ()
29351 test -f "$1" && test -x "$1"
29352 } # as_fn_executable_p
29353 as_test_x='test -x'
29354 as_executable_p=as_fn_executable_p
29356 # Sed expression to map a string onto a valid CPP name.
29357 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29359 # Sed expression to map a string onto a valid variable name.
29360 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29364 ## ----------------------------------- ##
29365 ## Main body of $CONFIG_STATUS script. ##
29366 ## ----------------------------------- ##
29368 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29370 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29371 # Save the log message, to keep $0 and so on meaningful, and to
29372 # report actual input values of CONFIG_FILES etc. instead of their
29373 # values after options handling.
29375 This file was extended by gzip $as_me 1.8, which was
29376 generated by GNU Autoconf 2.69.147-5ad35. Invocation command line was
29378 CONFIG_FILES = $CONFIG_FILES
29379 CONFIG_HEADERS = $CONFIG_HEADERS
29380 CONFIG_LINKS = $CONFIG_LINKS
29381 CONFIG_COMMANDS = $CONFIG_COMMANDS
29384 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29389 case $ac_config_files in *"
29390 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29393 case $ac_config_headers in *"
29394 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29398 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29399 # Files that config.status was made for.
29400 config_files="$ac_config_files"
29401 config_headers="$ac_config_headers"
29402 config_links="$ac_config_links"
29403 config_commands="$ac_config_commands"
29407 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29409 \`$as_me' instantiates files and other configuration actions
29410 from templates according to the current configuration. Unless the files
29411 and actions are specified as TAGs, all are instantiated by default.
29413 Usage: $0 [OPTION]... [TAG]...
29415 -h, --help print this help, then exit
29416 -V, --version print version number and configuration settings, then exit
29417 --config print configuration, then exit
29418 -q, --quiet, --silent
29419 do not print progress messages
29420 -d, --debug don't remove temporary files
29421 --recheck update $as_me by reconfiguring in the same conditions
29422 --file=FILE[:TEMPLATE]
29423 instantiate the configuration file FILE
29424 --header=FILE[:TEMPLATE]
29425 instantiate the configuration header FILE
29427 Configuration files:
29430 Configuration headers:
29433 Configuration links:
29436 Configuration commands:
29439 Report bugs to <bug-gzip@gnu.org>."
29442 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29443 ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29445 gzip config.status 1.8
29446 configured by $0, generated by GNU Autoconf 2.69.147-5ad35,
29447 with options \\"\$ac_cs_config\\"
29449 Copyright (C) 2015 Free Software Foundation, Inc.
29450 This config.status script is free software; the Free Software Foundation
29451 gives unlimited permission to copy, distribute and modify it."
29458 test -n "\$AWK" || AWK=awk
29461 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29462 # The default lists apply if the user does not specify any file.
29468 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29469 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29473 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29485 # Handling of the options.
29486 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29488 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29489 printf "%s\n" "$ac_cs_version"; exit ;;
29490 --config | --confi | --conf | --con | --co | --c )
29491 printf "%s\n" "$ac_cs_config"; exit ;;
29492 --debug | --debu | --deb | --de | --d | -d )
29494 --file | --fil | --fi | --f )
29497 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29498 '') as_fn_error $? "missing file argument" ;;
29500 as_fn_append CONFIG_FILES " '$ac_optarg'"
29501 ac_need_defaults=false;;
29502 --header | --heade | --head | --hea )
29505 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29507 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29508 ac_need_defaults=false;;
29510 # Conflict between --help and --header
29511 as_fn_error $? "ambiguous option: \`$1'
29512 Try \`$0 --help' for more information.";;
29513 --help | --hel | -h )
29514 printf "%s\n" "$ac_cs_usage"; exit ;;
29515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29516 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29519 # This is an error.
29520 -*) as_fn_error $? "unrecognized option: \`$1'
29521 Try \`$0 --help' for more information." ;;
29523 *) as_fn_append ac_config_targets " $1"
29524 ac_need_defaults=false ;;
29530 ac_configure_extra_args=
29532 if $ac_cs_silent; then
29534 ac_configure_extra_args="$ac_configure_extra_args --silent"
29538 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29539 if \$ac_cs_recheck; then
29540 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29542 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
29543 CONFIG_SHELL='$SHELL'
29544 export CONFIG_SHELL
29549 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29553 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29554 ## Running $as_me. ##
29556 printf "%s\n" "$ac_log"
29560 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29564 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
29565 GNUmakefile=$GNUmakefile
29569 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29571 # Handling of arguments.
29572 for ac_config_target in $ac_config_targets
29574 case $ac_config_target in
29575 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
29576 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29577 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
29578 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29579 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
29580 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29581 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
29583 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29588 # If the user did not use the arguments to specify the items to instantiate,
29589 # then the envvar interface is used. Set only those that are not.
29590 # We use the long form for the default assignment because of an extremely
29591 # bizarre bug on SunOS 4.1.3.
29592 if $ac_need_defaults; then
29593 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
29594 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
29595 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
29596 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
29599 # Have a temporary directory for convenience. Make it in the build tree
29600 # simply because there is no reason against having it here, and in addition,
29601 # creating and moving files from /tmp can sometimes cause problems.
29602 # Hook for its removal unless debugging.
29603 # Note that there is a small window in which the directory will not be cleaned:
29604 # after its creation but before its name has been assigned to `$tmp'.
29608 trap 'exit_status=$?
29609 : "${ac_tmp:=$tmp}"
29610 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29612 trap 'as_fn_exit 1' 1 2 13 15
29614 # Create a (secure) tmp directory for tmp files.
29617 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29621 tmp=./conf$$-$RANDOM
29622 (umask 077 && mkdir "$tmp")
29623 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29626 # Set up the scripts for CONFIG_FILES section.
29627 # No need to generate them if there are no CONFIG_FILES.
29628 # This happens for instance with `./config.status config.h'.
29629 if test -n "$CONFIG_FILES"; then
29632 ac_cr=`echo X | tr X '\015'`
29633 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29634 # But we know of no other shell where ac_cr would be empty at this
29635 # point, so we can use a bashism as a fallback.
29636 if test "x$ac_cr" = x; then
29637 eval ac_cr=\$\'\\r\'
29639 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29640 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29643 ac_cs_awk_cr=$ac_cr
29646 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29651 echo "cat >conf$$subs.awk <<_ACEOF" &&
29652 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29654 } >conf$$subs.sh ||
29655 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29656 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29658 for ac_last_try in false false false false false :; do
29659 . ./conf$$subs.sh ||
29660 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29662 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29663 if test $ac_delim_n = $ac_delim_num; then
29665 elif $ac_last_try; then
29666 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29668 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29671 rm -f conf$$subs.sh
29673 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29674 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29678 s/^/S["/; s/!.*/"]=/
29688 s/\(.\{148\}\)..*/\1/
29690 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29695 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29702 s/\(.\{148\}\)..*/\1/
29704 s/["\\]/\\&/g; s/^/"/; s/$/"/
29708 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29713 ' <conf$$subs.awk | sed '
29718 ' >>$CONFIG_STATUS || ac_write_fail=1
29719 rm -f conf$$subs.awk
29720 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29722 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29723 for (key in S) S_is_set[key] = 1
29729 nfields = split(line, field, "@")
29731 len = length(field[1])
29732 for (i = 2; i < nfields; i++) {
29734 keylen = length(key)
29735 if (S_is_set[key]) {
29737 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29738 len += length(value) + length(field[++i])
29749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29750 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29751 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29754 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29755 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29758 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29759 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29760 # trailing colons and then remove the whole line if VPATH becomes empty
29761 # (actually we leave an empty line to preserve line numbers).
29762 if test "x$srcdir" = x.; then
29763 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
29781 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29782 fi # test -n "$CONFIG_FILES"
29784 # Set up the scripts for CONFIG_HEADERS section.
29785 # No need to generate them if there are no CONFIG_HEADERS.
29786 # This happens for instance with `./config.status Makefile'.
29787 if test -n "$CONFIG_HEADERS"; then
29788 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
29792 # Transform confdefs.h into an awk script `defines.awk', embedded as
29793 # here-document in config.status, that substitutes the proper values into
29794 # config.h.in to produce config.h.
29796 # Create a delimiter string that does not exist in confdefs.h, to ease
29797 # handling of long lines.
29799 for ac_last_try in false false :; do
29800 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
29801 if test -z "$ac_tt"; then
29803 elif $ac_last_try; then
29804 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
29806 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29810 # For the awk script, D is an array of macro values keyed by name,
29811 # likewise P contains macro parameters if any. Preserve backslash
29812 # newline sequences.
29814 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29816 s/.\{148\}/&'"$ac_delim"'/g
29819 s/^[ ]*#[ ]*define[ ][ ]*/ /
29826 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29828 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29832 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29833 D["\1"]=" \3\\\\\\n"\\/p
29835 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29840 s/.\{148\}/&'"$ac_delim"'/g
29845 s/["\\]/\\&/g; s/^/"/; s/$/"/p
29848 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29850 ' <confdefs.h | sed '
29851 s/'"$ac_delim"'/"\\\
29852 "/g' >>$CONFIG_STATUS || ac_write_fail=1
29854 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29855 for (key in D) D_is_set[key] = 1
29858 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29860 split(line, arg, " ")
29861 if (arg[1] == "#") {
29865 defundef = substr(arg[1], 2)
29868 split(mac1, mac2, "(") #)
29870 prefix = substr(line, 1, index(line, defundef) - 1)
29871 if (D_is_set[macro]) {
29872 # Preserve the white space surrounding the "#".
29873 print prefix "define", macro P[macro] D[macro]
29876 # Replace #undef with comments. This is necessary, for example,
29877 # in the case of _POSIX_SOURCE, which is predefined and required
29878 # on some systems where configure will not decide to define it.
29879 if (defundef == "undef") {
29880 print "/*", prefix defundef, macro, "*/"
29888 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29889 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
29890 fi # test -n "$CONFIG_HEADERS"
29893 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
29898 :[FHLC]) ac_mode=$ac_tag; continue;;
29900 case $ac_mode$ac_tag in
29902 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
29903 :[FH]-) ac_tag=-:-;;
29904 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29921 -) ac_f="$ac_tmp/stdin";;
29922 *) # Look for the file first in the build tree, then in the source tree
29923 # (if the path is not absolute). The absolute path cannot be DOS-style,
29924 # because $ac_f cannot contain `:'.
29928 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29930 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
29932 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29933 as_fn_append ac_file_inputs " '$ac_f'"
29936 # Let's still pretend it is `configure' which instantiates (i.e., don't
29937 # use $as_me), people would be surprised to read:
29938 # /* config.h. Generated by config.status. */
29939 configure_input='Generated from '`
29940 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29942 if test x"$ac_file" != x-; then
29943 configure_input="$ac_file. $configure_input"
29944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29945 printf "%s\n" "$as_me: creating $ac_file" >&6;}
29947 # Neutralize special characters interpreted by sed in replacement strings.
29948 case $configure_input in #(
29949 *\&* | *\|* | *\\* )
29950 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
29951 sed 's/[\\\\&|]/\\\\&/g'`;; #(
29952 *) ac_sed_conf_input=$configure_input;;
29956 *:-:* | *:-) cat >"$ac_tmp/stdin" \
29957 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
29962 ac_dir=`$as_dirname -- "$ac_file" ||
29963 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29964 X"$ac_file" : 'X\(//\)[^/]' \| \
29965 X"$ac_file" : 'X\(//\)$' \| \
29966 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29967 printf "%s\n" X"$ac_file" |
29968 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29972 /^X\(\/\/\)[^/].*/{
29985 as_dir="$ac_dir"; as_fn_mkdir_p
29989 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29991 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
29992 # A ".." for each directory in $ac_dir_suffix.
29993 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29994 case $ac_top_builddir_sub in
29995 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29996 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29999 ac_abs_top_builddir=$ac_pwd
30000 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30001 # for backward compatibility:
30002 ac_top_builddir=$ac_top_build_prefix
30005 .) # We are building in place.
30007 ac_top_srcdir=$ac_top_builddir_sub
30008 ac_abs_top_srcdir=$ac_pwd ;;
30009 [\\/]* | ?:[\\/]* ) # Absolute name.
30010 ac_srcdir=$srcdir$ac_dir_suffix;
30011 ac_top_srcdir=$srcdir
30012 ac_abs_top_srcdir=$srcdir ;;
30013 *) # Relative name.
30014 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30015 ac_top_srcdir=$ac_top_build_prefix$srcdir
30016 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30018 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30028 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30029 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30031 ac_MKDIR_P=$MKDIR_P
30033 [\\/$]* | ?:[\\/]* ) ;;
30034 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30038 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30039 # If the template does not know about datarootdir, expand it.
30040 # FIXME: This hack should be removed a few years after 2.60.
30041 ac_datarootdir_hack=; ac_datarootdir_seen=
30052 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30053 *datarootdir*) ac_datarootdir_seen=yes;;
30054 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30056 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30058 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30059 ac_datarootdir_hack='
30060 s&@datadir@&$datadir&g
30061 s&@docdir@&$docdir&g
30062 s&@infodir@&$infodir&g
30063 s&@localedir@&$localedir&g
30064 s&@mandir@&$mandir&g
30065 s&\\\${datarootdir}&$datarootdir&g' ;;
30069 # Neutralize VPATH when `$srcdir' = `.'.
30070 # Shell code in configure.ac might set extrasub.
30071 # FIXME: do we really want to maintain this feature?
30072 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30073 ac_sed_extra="$ac_vpsub
30076 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30078 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30079 s|@configure_input@|$ac_sed_conf_input|;t t
30080 s&@top_builddir@&$ac_top_builddir_sub&;t t
30081 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30082 s&@srcdir@&$ac_srcdir&;t t
30083 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30084 s&@top_srcdir@&$ac_top_srcdir&;t t
30085 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30086 s&@builddir@&$ac_builddir&;t t
30087 s&@abs_builddir@&$ac_abs_builddir&;t t
30088 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30089 s&@INSTALL@&$ac_INSTALL&;t t
30090 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30091 $ac_datarootdir_hack
30093 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30094 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30096 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30097 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30098 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
30099 "$ac_tmp/out"`; test -z "$ac_out"; } &&
30100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30101 which seems to be undefined. Please make sure it is defined" >&5
30102 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30103 which seems to be undefined. Please make sure it is defined" >&2;}
30105 rm -f "$ac_tmp/stdin"
30107 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30108 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30110 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30116 if test x"$ac_file" != x-; then
30118 printf "%s\n" "/* $configure_input */" \
30119 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30120 } >"$ac_tmp/config.h" \
30121 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30122 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30124 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
30127 mv "$ac_tmp/config.h" "$ac_file" \
30128 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30131 printf "%s\n" "/* $configure_input */" \
30132 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30133 || as_fn_error $? "could not create -" "$LINENO" 5
30135 # Compute "$ac_file"'s index in $config_headers.
30138 for _am_header in $config_headers :; do
30139 case $_am_header in
30140 $_am_arg | $_am_arg:* )
30143 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30146 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30147 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30148 X"$_am_arg" : 'X\(//\)[^/]' \| \
30149 X"$_am_arg" : 'X\(//\)$' \| \
30150 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30151 printf "%s\n" X"$_am_arg" |
30152 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30156 /^X\(\/\/\)[^/].*/{
30168 s/.*/./; q'`/stamp-h$_am_stamp_count
30175 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
30178 # Prefer the file from the source tree if names are identical.
30179 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
30180 ac_source=$srcdir/$ac_source
30183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
30184 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
30186 if test ! -r "$ac_source"; then
30187 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
30191 # Try a relative symlink, then a hard link, then a copy.
30193 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
30194 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
30196 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
30197 ln "$ac_source" "$ac_file" 2>/dev/null ||
30198 cp -p "$ac_source" "$ac_file" ||
30199 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
30202 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30203 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
30208 case $ac_file$ac_mode in
30209 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30210 # Older Autoconf quotes --file arguments for eval, but not when files
30211 # are listed without --file. Let's play safe and only enable the eval
30212 # if we detect the quoting.
30213 # TODO: see whether this extra hack can be removed once we start
30214 # requiring Autoconf 2.70 or later.
30215 case $CONFIG_FILES in #(
30217 eval set x "$CONFIG_FILES" ;; #(
30219 set x $CONFIG_FILES ;; #(
30224 # Used to flag and report bootstrapping failures.
30228 # Strip MF so we end up with the name of the file.
30229 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
30230 # Check whether this is an Automake generated Makefile which includes
30231 # dependency-tracking related rules and includes.
30232 # Grep'ing the whole file directly is not great: AIX grep has a line
30233 # limit of 2048, but all sed's we know have understand at least 4000.
30234 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
30236 am_dirpart=`$as_dirname -- "$am_mf" ||
30237 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30238 X"$am_mf" : 'X\(//\)[^/]' \| \
30239 X"$am_mf" : 'X\(//\)$' \| \
30240 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
30241 printf "%s\n" X"$am_mf" |
30242 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30246 /^X\(\/\/\)[^/].*/{
30259 am_filepart=`$as_basename -- "$am_mf" ||
30260 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
30261 X"$am_mf" : 'X\(//\)$' \| \
30262 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
30263 printf "%s\n" X/"$am_mf" |
30264 sed '/^.*\/\([^/][^/]*\)\/*$/{
30277 { echo "$as_me:$LINENO: cd "$am_dirpart" \
30278 && sed -e '/# am--include-marker/d' "$am_filepart" \
30279 | $MAKE -f - am--depfiles" >&5
30280 (cd "$am_dirpart" \
30281 && sed -e '/# am--include-marker/d' "$am_filepart" \
30282 | $MAKE -f - am--depfiles) >&5 2>&5
30284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30285 (exit $ac_status); } || am_rc=$?
30287 if test $am_rc -ne 0; then
30288 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30289 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
30290 as_fn_error $? "Something went wrong bootstrapping makefile fragments
30291 for automatic dependency tracking. Try re-running configure with the
30292 '--disable-dependency-tracking' option to at least be able to build
30293 the package (albeit without support for automatic dependency tracking).
30294 See \`config.log' for more details" "$LINENO" 5; }
30296 { am_dirpart=; unset am_dirpart;}
30297 { am_filepart=; unset am_filepart;}
30298 { am_mf=; unset am_mf;}
30299 { am_rc=; unset am_rc;}
30300 rm -f conftest-deps.mk
30310 ac_clean_files=$ac_clean_files_save
30312 test $ac_write_fail = 0 ||
30313 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30316 # configure is writing to config.log, and then calls config.status.
30317 # config.status does its own redirection, appending to config.log.
30318 # Unfortunately, on DOS this fails, as config.log is still kept open
30319 # by configure, so config.status won't be able to write to it; its
30320 # output is simply discarded. So we exec the FD to /dev/null,
30321 # effectively closing config.log, so it can be properly (re)opened and
30322 # appended to by config.status. When coming back to configure, we
30323 # need to make the FD available again.
30324 if test "$no_create" != yes; then
30326 ac_config_status_args=
30327 test "$silent" = yes &&
30328 ac_config_status_args="$ac_config_status_args --quiet"
30330 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30332 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30333 # would make configure fail if this is the last instruction.
30334 $ac_cs_success || as_fn_exit 1
30336 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30338 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}