2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.97-b1aba91 for gzip 1.6.
5 # Report bugs to <bug-gzip@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2013 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 -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
27 case `(set -o) 2>/dev/null` in #(
36 # The user is always right.
37 if test "${PATH_SEPARATOR+set}" != set; then
39 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
40 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
47 # We need space, tab and new line, in precisely that order. Quoting is
48 # there to prevent editors from complaining about space-tab.
49 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
50 # splitting by setting IFS to empty value.)
56 # Find who we are. Look in the path if we contain no directory separator.
59 *[\\/]* ) as_myself=$0 ;;
60 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
69 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
75 # We did not find ourselves, most probably we were run as `sh COMMAND'
76 # in which case we are not to be found in the path.
77 if test "x$as_myself" = x; then
80 if test ! -f "$as_myself"; then
81 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
85 # Unset variables that we do not need and which cause bugs (e.g. in
86 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
87 # suppresses any "Segmentation fault" message there. '((' could
88 # trigger a bug in pdksh 5.2.14.
89 for as_var in BASH_ENV ENV MAIL MAILPATH
90 do eval test x\${$as_var+set} = xset \
91 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
104 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
106 # Use a proper internal environment variable to ensure we don't fall
107 # into an infinite loop, continuously re-executing ourselves.
108 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
109 _as_can_reexec=no; export _as_can_reexec;
110 # We cannot yet assume a decent shell, so we have to provide a
111 # neutralization value for shells without unset; and this also
112 # works around shells that cannot unset nonexistent variables.
113 # Preserve -v and -x to the replacement shell.
116 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
118 *v*x* | *x*v* ) as_opts=-vx ;;
123 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
124 # Admittedly, this is quite paranoid, since all the known shells bail
125 # out after a failed `exec'.
126 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
129 # We don't want this to propagate to other subprocesses.
130 { _as_can_reexec=; unset _as_can_reexec;}
131 if test "x$CONFIG_SHELL" = x; then
132 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
135 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
136 # is contrary to our usage. Disable this feature.
137 alias -g '\${1+\"\$@\"}'='\"\$@\"'
140 case \`(set -o) 2>/dev/null\` in #(
148 as_required="as_fn_return () { (exit \$1); }
149 as_fn_success () { as_fn_return 0; }
150 as_fn_failure () { as_fn_return 1; }
151 as_fn_ret_success () { return 0; }
152 as_fn_ret_failure () { return 1; }
155 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
156 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
157 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
158 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
159 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
162 exitcode=1; echo positional parameters were not saved.
164 test x\$exitcode = x0 || exit 1
166 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
167 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
168 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
169 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
170 test \$(( 1 + 1 )) = 2 || exit 1"
171 if (eval "$as_required") 2>/dev/null; then :
176 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
181 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
187 *) as_dir=$as_dir/ ;;
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
207 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
208 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
209 CONFIG_SHELL=$SHELL as_have_required=yes
213 if test "x$CONFIG_SHELL" != x; then :
215 # We cannot yet assume a decent shell, so we have to provide a
216 # neutralization value for shells without unset; and this also
217 # works around shells that cannot unset nonexistent variables.
218 # Preserve -v and -x to the replacement shell.
221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 *v*x* | *x*v* ) as_opts=-vx ;;
228 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
229 # Admittedly, this is quite paranoid, since all the known shells bail
230 # out after a failed `exec'.
231 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
235 if test x$as_have_required = xno; then :
236 printf "%s\n" "$0: This script requires a shell more modern than all"
237 printf "%s\n" "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
242 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-gzip@gnu.org
243 $0: about your system, including any error possibly output
244 $0: before this message. Then install a modern shell, or
245 $0: manually run the script under such a shell if you do
252 SHELL=${CONFIG_SHELL-/bin/sh}
254 # Unset more variables known to interfere with behavior of common tools.
255 CLICOLOR_FORCE= GREP_OPTIONS=
256 unset CLICOLOR_FORCE GREP_OPTIONS
258 ## --------------------- ##
259 ## M4sh Shell Functions. ##
260 ## --------------------- ##
263 # Portably unset VAR.
266 { eval $1=; unset $1;}
270 # as_fn_set_status STATUS
271 # -----------------------
272 # Set $? to STATUS, without forking.
280 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
290 # Create "$as_dir" as a directory, including parents if necessary.
295 -*) as_dir=./$as_dir;;
297 test -d "$as_dir" || eval $as_mkdir_p || {
301 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310 printf "%s\n" X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
328 test -d "$as_dir" && break
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
336 # as_fn_executable_p FILE
337 # -----------------------
338 # Test if FILE is an executable regular file.
339 as_fn_executable_p ()
341 test -f "$1" && test -x "$1"
342 } # as_fn_executable_p
343 # as_fn_append VAR VALUE
344 # ----------------------
345 # Append the text in VALUE to the end of the definition contained in VAR. Take
346 # advantage of any shell optimizations that allow amortized linear growth over
347 # repeated appends, instead of the typical quadratic growth present in naive
349 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
350 eval 'as_fn_append ()
363 # Perform arithmetic evaluation on the ARGs, and store the result in the
364 # global $as_val. Take advantage of shells that can avoid forks. The arguments
365 # must be portable across $(()) and expr.
366 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
374 as_val=`expr "$@" || test $? -eq 1`
379 # as_fn_error STATUS ERROR [LINENO LOG_FD]
380 # ----------------------------------------
381 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
382 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
383 # script with STATUS, using 1 if that was 0.
386 as_status=$1; test $as_status -eq 0 && as_status=1
388 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
389 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
391 printf "%s\n" "$as_me: error: $2" >&2
392 as_fn_exit $as_status
395 if expr a : '\(a\)' >/dev/null 2>&1 &&
396 test "X`expr 00001 : '.*\(...\)'`" = X001; then
402 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
408 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
414 as_me=`$as_basename -- "$0" ||
415 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
416 X"$0" : 'X\(//\)$' \| \
417 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
418 printf "%s\n" X/"$0" |
419 sed '/^.*\/\([^/][^/]*\)\/*$/{
433 # Avoid depending upon Character Ranges.
434 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
435 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
436 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
437 as_cr_digits='0123456789'
438 as_cr_alnum=$as_cr_Letters$as_cr_digits
441 as_lineno_1=$LINENO as_lineno_1a=$LINENO
442 as_lineno_2=$LINENO as_lineno_2a=$LINENO
443 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
444 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
445 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
457 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
461 chmod +x "$as_me.lineno" ||
462 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
464 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
465 # already done that, so ensure we don't try to do so again and fall
466 # in an infinite loop. This has already happened in practice.
467 _as_can_reexec=no; export _as_can_reexec
468 # Don't try to exec as it changes $[0], causing all sort of problems
469 # (the dirname of $[0] is not the place where we might find the
470 # original and so on. Autoconf is especially sensitive to this).
472 # Exit status is that of the last command.
476 ECHO_C= ECHO_N= ECHO_T=
477 case `echo -n x` in #(((((
479 case `echo 'xy\c'` in
480 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
482 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
489 rm -f conf$$ conf$$.exe conf$$.file
490 if test -d conf$$.dir; then
491 rm -f conf$$.dir/conf$$.file
494 mkdir conf$$.dir 2>/dev/null
496 if (echo >conf$$.file) 2>/dev/null; then
497 if ln -s conf$$.file conf$$ 2>/dev/null; then
499 # ... but there are two gotchas:
500 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
501 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
502 # In both cases, we have to default to `cp -pR'.
503 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505 elif ln conf$$.file conf$$ 2>/dev/null; then
513 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
514 rmdir conf$$.dir 2>/dev/null
516 if mkdir -p . 2>/dev/null; then
517 as_mkdir_p='mkdir -p "$as_dir"'
519 test -d ./-p && rmdir ./-p
524 as_executable_p=as_fn_executable_p
526 # Sed expression to map a string onto a valid CPP name.
527 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
529 # Sed expression to map a string onto a valid variable name.
530 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
533 test -n "$DJDIR" || exec 7<&0 </dev/null
537 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
538 # so uname gets run too.
539 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
544 ac_default_prefix=/usr/local
546 ac_config_libobj_dir=.
553 # Identity of this package.
555 PACKAGE_TARNAME='gzip'
556 PACKAGE_VERSION='1.6'
557 PACKAGE_STRING='gzip 1.6'
558 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
561 ac_unique_file="gzip.c"
562 # Factoring default headers for most tests.
563 ac_includes_default="\
565 #ifdef HAVE_SYS_TYPES_H
566 # include <sys/types.h>
568 #ifdef HAVE_SYS_STAT_H
569 # include <sys/stat.h>
571 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
576 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
581 #ifdef HAVE_STRINGS_H
582 # include <strings.h>
584 #ifdef HAVE_INTTYPES_H
585 # include <inttypes.h>
594 gl_use_threads_default=
597 gl_getopt_required=POSIX
598 gl_getopt_required=POSIX
599 ac_subst_vars='gltests_LTLIBOBJS
620 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
633 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
636 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
638 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
639 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
640 TIME_H_DEFINES_STRUCT_TIMESPEC
641 NEXT_AS_FIRST_DIRECTIVE_TIME_H
650 HAVE_DECL_LOCALTIME_R
656 NEXT_AS_FIRST_DIRECTIVE_STRING_H
658 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
660 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
662 GL_GENERATE_STDINT_H_FALSE
663 GL_GENERATE_STDINT_H_TRUE
672 HAVE_SIGNED_SIG_ATOMIC_T
675 BITSIZEOF_SIG_ATOMIC_T
681 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
686 HAVE_UNSIGNED_LONG_LONG_INT
688 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
690 GL_GENERATE_STDDEF_H_FALSE
691 GL_GENERATE_STDDEF_H_TRUE
696 GL_GENERATE_STDBOOL_H_FALSE
697 GL_GENERATE_STDBOOL_H_TRUE
867 NEXT_AS_FIRST_DIRECTIVE_MATH_H
876 LOCALCHARSET_TESTS_ENVIRONMENT
878 IGNORE_UNUSED_LIBRARIES_CFLAGS
881 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
883 REPLACE_STRUCT_TIMEVAL
891 GNULIB_GL_UNISTD_H_GETOPT
894 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
896 WINDOWS_64_BIT_ST_SIZE
897 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
933 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
939 REPLACE_SIGNBIT_USING_GCC
1008 HAVE_DECL_REMAINDERL
1190 APPLE_UNIVERSAL_BUILD
1191 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1193 GL_GENERATE_FLOAT_H_FALSE
1194 GL_GENERATE_FLOAT_H_TRUE
1196 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1198 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1216 REPLACE_STDIO_WRITE_FUNCS
1217 REPLACE_STDIO_READ_FUNCS
1226 REPLACE_OBSTACK_PRINTF
1251 HAVE_DECL_OBSTACK_PRINTF
1257 GNULIB_VSPRINTF_POSIX
1259 GNULIB_VPRINTF_POSIX
1261 GNULIB_VFPRINTF_POSIX
1268 GNULIB_STDIO_H_SIGPIPE
1269 GNULIB_STDIO_H_NONBLOCKING
1270 GNULIB_SPRINTF_POSIX
1284 GNULIB_OBSTACK_PRINTF_POSIX
1285 GNULIB_OBSTACK_PRINTF
1301 GNULIB_FPRINTF_POSIX
1316 GL_GENERATE_ERRNO_H_FALSE
1317 GL_GENERATE_ERRNO_H_TRUE
1319 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1322 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1325 PRAGMA_SYSTEM_HEADER
1326 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1352 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1354 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1355 UNISTD_H_HAVE_WINSOCK2_H
1376 REPLACE_GETDOMAINNAME
1387 HAVE_DECL_SETHOSTNAME
1388 HAVE_DECL_GETUSERSHELL
1389 HAVE_DECL_GETPAGESIZE
1390 HAVE_DECL_GETLOGIN_R
1391 HAVE_DECL_GETDOMAINNAME
1430 GNULIB_UNISTD_H_SIGPIPE
1431 GNULIB_UNISTD_H_NONBLOCKING
1457 GNULIB_GETDTABLESIZE
1458 GNULIB_GETDOMAINNAME
1487 REPLACE_CANONICALIZE_FILE_NAME
1492 HAVE_STRUCT_RANDOM_DATA
1514 HAVE_DECL_GETLOADAVG
1515 HAVE_CANONICALIZE_FILE_NAME
1526 GNULIB_SECURE_GETENV
1529 GNULIB_REALLOC_POSIX
1546 GNULIB_CANONICALIZE_FILE_NAME
1550 GL_GENERATE_ALLOCA_H_FALSE
1551 GL_GENERATE_ALLOCA_H_TRUE
1554 GL_COND_LIBTOOL_FALSE
1555 GL_COND_LIBTOOL_TRUE
1590 AM_DEFAULT_VERBOSITY
1599 INSTALL_STRIP_PROGRAM
1642 program_transform_name
1655 enable_option_checking
1657 enable_dependency_tracking
1665 ac_precious_vars='build_alias
1676 # Initialize some variables set by options.
1678 ac_init_version=false
1679 ac_unrecognized_opts=
1680 ac_unrecognized_sep=
1681 # The variables have the same names as the options, with
1682 # dashes changed to underlines.
1683 cache_file=/dev/null
1690 program_transform_name=s,x,x,
1698 # Installation directory options.
1699 # These are left unexpanded so users can "make install exec_prefix=/foo"
1700 # and all the variables that are supposed to be based on exec_prefix
1701 # by default will actually change.
1702 # Use braces instead of parens because sh, perl, etc. also accept them.
1703 # (The list follows the same order as the GNU Coding Standards.)
1704 bindir='${exec_prefix}/bin'
1705 sbindir='${exec_prefix}/sbin'
1706 libexecdir='${exec_prefix}/libexec'
1707 datarootdir='${prefix}/share'
1708 datadir='${datarootdir}'
1709 sysconfdir='${prefix}/etc'
1710 sharedstatedir='${prefix}/com'
1711 localstatedir='${prefix}/var'
1712 includedir='${prefix}/include'
1713 oldincludedir='/usr/include'
1714 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1715 infodir='${datarootdir}/info'
1720 libdir='${exec_prefix}/lib'
1721 localedir='${datarootdir}/locale'
1722 mandir='${datarootdir}/man'
1728 # If the previous option needs an argument, assign it.
1729 if test -n "$ac_prev"; then
1730 eval $ac_prev=\$ac_option
1736 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1741 # Accept the important Cygnus configure options, so we can diagnose typos.
1743 case $ac_dashdash$ac_option in
1747 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1749 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1750 bindir=$ac_optarg ;;
1752 -build | --build | --buil | --bui | --bu)
1753 ac_prev=build_alias ;;
1754 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1755 build_alias=$ac_optarg ;;
1757 -cache-file | --cache-file | --cache-fil | --cache-fi \
1758 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1759 ac_prev=cache_file ;;
1760 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1761 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1762 cache_file=$ac_optarg ;;
1764 --config-cache | -C)
1765 cache_file=config.cache ;;
1767 -datadir | --datadir | --datadi | --datad)
1769 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1770 datadir=$ac_optarg ;;
1772 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1773 | --dataroo | --dataro | --datar)
1774 ac_prev=datarootdir ;;
1775 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1776 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1777 datarootdir=$ac_optarg ;;
1779 -disable-* | --disable-*)
1780 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1781 # Reject names that are not valid shell variable names.
1782 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1783 as_fn_error $? "invalid feature name: $ac_useropt"
1784 ac_useropt_orig=$ac_useropt
1785 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1786 case $ac_user_opts in
1788 "enable_$ac_useropt"
1790 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1791 ac_unrecognized_sep=', ';;
1793 eval enable_$ac_useropt=no ;;
1795 -docdir | --docdir | --docdi | --doc | --do)
1797 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1798 docdir=$ac_optarg ;;
1800 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1802 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1803 dvidir=$ac_optarg ;;
1805 -enable-* | --enable-*)
1806 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1807 # Reject names that are not valid shell variable names.
1808 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1809 as_fn_error $? "invalid feature name: $ac_useropt"
1810 ac_useropt_orig=$ac_useropt
1811 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1812 case $ac_user_opts in
1814 "enable_$ac_useropt"
1816 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1817 ac_unrecognized_sep=', ';;
1819 eval enable_$ac_useropt=\$ac_optarg ;;
1821 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1822 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1823 | --exec | --exe | --ex)
1824 ac_prev=exec_prefix ;;
1825 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1826 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1827 | --exec=* | --exe=* | --ex=*)
1828 exec_prefix=$ac_optarg ;;
1830 -gas | --gas | --ga | --g)
1831 # Obsolete; use --with-gas.
1834 -help | --help | --hel | --he | -h)
1835 ac_init_help=long ;;
1836 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1837 ac_init_help=recursive ;;
1838 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1839 ac_init_help=short ;;
1841 -host | --host | --hos | --ho)
1842 ac_prev=host_alias ;;
1843 -host=* | --host=* | --hos=* | --ho=*)
1844 host_alias=$ac_optarg ;;
1846 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1848 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1850 htmldir=$ac_optarg ;;
1852 -includedir | --includedir | --includedi | --included | --include \
1853 | --includ | --inclu | --incl | --inc)
1854 ac_prev=includedir ;;
1855 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1856 | --includ=* | --inclu=* | --incl=* | --inc=*)
1857 includedir=$ac_optarg ;;
1859 -infodir | --infodir | --infodi | --infod | --info | --inf)
1861 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1862 infodir=$ac_optarg ;;
1864 -libdir | --libdir | --libdi | --libd)
1866 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1867 libdir=$ac_optarg ;;
1869 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1870 | --libexe | --libex | --libe)
1871 ac_prev=libexecdir ;;
1872 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1873 | --libexe=* | --libex=* | --libe=*)
1874 libexecdir=$ac_optarg ;;
1876 -localedir | --localedir | --localedi | --localed | --locale)
1877 ac_prev=localedir ;;
1878 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1879 localedir=$ac_optarg ;;
1881 -localstatedir | --localstatedir | --localstatedi | --localstated \
1882 | --localstate | --localstat | --localsta | --localst | --locals)
1883 ac_prev=localstatedir ;;
1884 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1885 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1886 localstatedir=$ac_optarg ;;
1888 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1890 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1891 mandir=$ac_optarg ;;
1893 -nfp | --nfp | --nf)
1894 # Obsolete; use --without-fp.
1897 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1898 | --no-cr | --no-c | -n)
1901 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1902 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1905 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1906 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1907 | --oldin | --oldi | --old | --ol | --o)
1908 ac_prev=oldincludedir ;;
1909 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1910 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1911 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1912 oldincludedir=$ac_optarg ;;
1914 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1916 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1917 prefix=$ac_optarg ;;
1919 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1920 | --program-pre | --program-pr | --program-p)
1921 ac_prev=program_prefix ;;
1922 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1923 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1924 program_prefix=$ac_optarg ;;
1926 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1927 | --program-suf | --program-su | --program-s)
1928 ac_prev=program_suffix ;;
1929 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1930 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1931 program_suffix=$ac_optarg ;;
1933 -program-transform-name | --program-transform-name \
1934 | --program-transform-nam | --program-transform-na \
1935 | --program-transform-n | --program-transform- \
1936 | --program-transform | --program-transfor \
1937 | --program-transfo | --program-transf \
1938 | --program-trans | --program-tran \
1939 | --progr-tra | --program-tr | --program-t)
1940 ac_prev=program_transform_name ;;
1941 -program-transform-name=* | --program-transform-name=* \
1942 | --program-transform-nam=* | --program-transform-na=* \
1943 | --program-transform-n=* | --program-transform-=* \
1944 | --program-transform=* | --program-transfor=* \
1945 | --program-transfo=* | --program-transf=* \
1946 | --program-trans=* | --program-tran=* \
1947 | --progr-tra=* | --program-tr=* | --program-t=*)
1948 program_transform_name=$ac_optarg ;;
1950 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1952 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1953 pdfdir=$ac_optarg ;;
1955 -psdir | --psdir | --psdi | --psd | --ps)
1957 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1960 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1961 | -silent | --silent | --silen | --sile | --sil)
1964 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1966 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1968 sbindir=$ac_optarg ;;
1970 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1971 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1972 | --sharedst | --shareds | --shared | --share | --shar \
1974 ac_prev=sharedstatedir ;;
1975 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1976 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1977 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1979 sharedstatedir=$ac_optarg ;;
1981 -site | --site | --sit)
1983 -site=* | --site=* | --sit=*)
1986 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1988 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1989 srcdir=$ac_optarg ;;
1991 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1992 | --syscon | --sysco | --sysc | --sys | --sy)
1993 ac_prev=sysconfdir ;;
1994 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1995 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1996 sysconfdir=$ac_optarg ;;
1998 -target | --target | --targe | --targ | --tar | --ta | --t)
1999 ac_prev=target_alias ;;
2000 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2001 target_alias=$ac_optarg ;;
2003 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2006 -version | --version | --versio | --versi | --vers | -V)
2007 ac_init_version=: ;;
2010 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2011 # Reject names that are not valid shell variable names.
2012 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2013 as_fn_error $? "invalid package name: $ac_useropt"
2014 ac_useropt_orig=$ac_useropt
2015 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2016 case $ac_user_opts in
2020 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2021 ac_unrecognized_sep=', ';;
2023 eval with_$ac_useropt=\$ac_optarg ;;
2025 -without-* | --without-*)
2026 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2027 # Reject names that are not valid shell variable names.
2028 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2029 as_fn_error $? "invalid package name: $ac_useropt"
2030 ac_useropt_orig=$ac_useropt
2031 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2032 case $ac_user_opts in
2036 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2037 ac_unrecognized_sep=', ';;
2039 eval with_$ac_useropt=no ;;
2042 # Obsolete; use --with-x.
2045 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2046 | --x-incl | --x-inc | --x-in | --x-i)
2047 ac_prev=x_includes ;;
2048 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2049 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2050 x_includes=$ac_optarg ;;
2052 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2053 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2054 ac_prev=x_libraries ;;
2055 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2056 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2057 x_libraries=$ac_optarg ;;
2059 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2060 Try \`$0 --help' for more information"
2064 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2065 # Reject names that are not valid shell variable names.
2066 case $ac_envvar in #(
2067 '' | [0-9]* | *[!_$as_cr_alnum]* )
2068 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2070 eval $ac_envvar=\$ac_optarg
2071 export $ac_envvar ;;
2074 # FIXME: should be removed in autoconf 3.0.
2075 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2076 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2077 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2078 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2084 if test -n "$ac_prev"; then
2085 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2086 as_fn_error $? "missing argument to $ac_option"
2089 if test -n "$ac_unrecognized_opts"; then
2090 case $enable_option_checking in
2092 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2093 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2097 # Check all directory arguments for consistency.
2098 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2099 datadir sysconfdir sharedstatedir localstatedir includedir \
2100 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2101 libdir localedir mandir
2103 eval ac_val=\$$ac_var
2104 # Remove trailing slashes.
2107 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2108 eval $ac_var=\$ac_val;;
2110 # Be sure to have absolute directory names.
2112 [\\/$]* | ?:[\\/]* ) continue;;
2113 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2115 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2118 # There might be people who depend on the old broken behavior: `$host'
2119 # used to hold the argument of --host etc.
2120 # FIXME: To remove some day.
2123 target=$target_alias
2125 # FIXME: To remove some day.
2126 if test "x$host_alias" != x; then
2127 if test "x$build_alias" = x; then
2128 cross_compiling=maybe
2129 elif test "x$build_alias" != "x$host_alias"; then
2135 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2137 test "$silent" = yes && exec 6>/dev/null
2140 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2141 ac_ls_di=`ls -di .` &&
2142 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2143 as_fn_error $? "working directory cannot be determined"
2144 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2145 as_fn_error $? "pwd does not report name of working directory"
2148 # Find the source files, if location was not specified.
2149 if test -z "$srcdir"; then
2150 ac_srcdir_defaulted=yes
2151 # Try the directory containing this script, then the parent directory.
2152 ac_confdir=`$as_dirname -- "$as_myself" ||
2153 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2154 X"$as_myself" : 'X\(//\)[^/]' \| \
2155 X"$as_myself" : 'X\(//\)$' \| \
2156 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2157 printf "%s\n" X"$as_myself" |
2158 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2176 if test ! -r "$srcdir/$ac_unique_file"; then
2180 ac_srcdir_defaulted=no
2182 if test ! -r "$srcdir/$ac_unique_file"; then
2183 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2184 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2186 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2188 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2190 # When building in place, set srcdir=.
2191 if test "$ac_abs_confdir" = "$ac_pwd"; then
2194 # Remove unnecessary trailing slashes from srcdir.
2195 # Double slashes in file names in object file debugging info
2196 # mess up M-x gdb in Emacs.
2198 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2200 for ac_var in $ac_precious_vars; do
2201 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2202 eval ac_env_${ac_var}_value=\$${ac_var}
2203 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2204 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2208 # Report the --help message.
2210 if test "$ac_init_help" = "long"; then
2211 # Omit some internal or obsolete options to make the list less imposing.
2212 # This message is too long to be a string in the A/UX 3.1 sh.
2214 \`configure' configures gzip 1.6 to adapt to many kinds of systems.
2216 Usage: $0 [OPTION]... [VAR=VALUE]...
2218 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2219 VAR=VALUE. See below for descriptions of some of the useful variables.
2221 Defaults for the options are specified in brackets.
2224 -h, --help display this help and exit
2225 --help=short display options specific to this package
2226 --help=recursive display the short help of all the included packages
2227 -V, --version display version information and exit
2228 -q, --quiet, --silent do not print \`checking ...' messages
2229 --cache-file=FILE cache test results in FILE [disabled]
2230 -C, --config-cache alias for \`--cache-file=config.cache'
2231 -n, --no-create do not create output files
2232 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2234 Installation directories:
2235 --prefix=PREFIX install architecture-independent files in PREFIX
2236 [$ac_default_prefix]
2237 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2240 By default, \`make install' will install all the files in
2241 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2242 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2243 for instance \`--prefix=\$HOME'.
2245 For better control, use the options below.
2247 Fine tuning of the installation directories:
2248 --bindir=DIR user executables [EPREFIX/bin]
2249 --sbindir=DIR system admin executables [EPREFIX/sbin]
2250 --libexecdir=DIR program executables [EPREFIX/libexec]
2251 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2252 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2253 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2254 --libdir=DIR object code libraries [EPREFIX/lib]
2255 --includedir=DIR C header files [PREFIX/include]
2256 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2257 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2258 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2259 --infodir=DIR info documentation [DATAROOTDIR/info]
2260 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2261 --mandir=DIR man documentation [DATAROOTDIR/man]
2262 --docdir=DIR documentation root [DATAROOTDIR/doc/gzip]
2263 --htmldir=DIR html documentation [DOCDIR]
2264 --dvidir=DIR dvi documentation [DOCDIR]
2265 --pdfdir=DIR pdf documentation [DOCDIR]
2266 --psdir=DIR ps documentation [DOCDIR]
2272 --program-prefix=PREFIX prepend PREFIX to installed program names
2273 --program-suffix=SUFFIX append SUFFIX to installed program names
2274 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2277 --build=BUILD configure for building on BUILD [guessed]
2278 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2282 if test -n "$ac_init_help"; then
2283 case $ac_init_help in
2284 short | recursive ) echo "Configuration of gzip 1.6:";;
2289 --disable-option-checking ignore unrecognized --enable/--with options
2290 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2291 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2292 --enable-silent-rules less verbose build output (undo: "make V=1")
2293 --disable-silent-rules verbose build output (undo: "make V=0")
2294 --enable-dependency-tracking
2295 do not reject slow dependency extractors
2296 --disable-dependency-tracking
2297 speeds up one-time build
2298 --disable-largefile omit support for large files
2299 --enable-threads={posix|solaris|pth|windows}
2300 specify multithreading API
2301 --disable-threads build without multithread safety
2302 --disable-rpath do not hardcode runtime library paths
2303 --enable-gcc-warnings turn on many GCC warnings (for developers; best with
2307 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2308 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2309 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2310 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2311 --without-libpth-prefix don't search for libpth in includedir and libdir
2313 Some influential environment variables:
2314 CC C compiler command
2315 CFLAGS C compiler flags
2316 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2317 nonstandard directory <lib dir>
2318 LIBS libraries to pass to the linker, e.g. -l<library>
2319 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2320 you have headers in a nonstandard directory <include dir>
2323 Use these variables to override the choices made by `configure' or to help
2324 it to find libraries and programs with nonstandard names/locations.
2326 Report bugs to <bug-gzip@gnu.org>.
2331 if test "$ac_init_help" = "recursive"; then
2332 # If there are subdirs, report their specific --help.
2333 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2334 test -d "$ac_dir" ||
2335 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2340 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2342 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2343 # A ".." for each directory in $ac_dir_suffix.
2344 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2345 case $ac_top_builddir_sub in
2346 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2350 ac_abs_top_builddir=$ac_pwd
2351 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2352 # for backward compatibility:
2353 ac_top_builddir=$ac_top_build_prefix
2356 .) # We are building in place.
2358 ac_top_srcdir=$ac_top_builddir_sub
2359 ac_abs_top_srcdir=$ac_pwd ;;
2360 [\\/]* | ?:[\\/]* ) # Absolute name.
2361 ac_srcdir=$srcdir$ac_dir_suffix;
2362 ac_top_srcdir=$srcdir
2363 ac_abs_top_srcdir=$srcdir ;;
2365 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2366 ac_top_srcdir=$ac_top_build_prefix$srcdir
2367 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2369 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2371 cd "$ac_dir" || { ac_status=$?; continue; }
2372 # Check for guested configure.
2373 if test -f "$ac_srcdir/configure.gnu"; then
2375 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2376 elif test -f "$ac_srcdir/configure"; then
2378 $SHELL "$ac_srcdir/configure" --help=recursive
2380 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2382 cd "$ac_pwd" || { ac_status=$?; break; }
2386 test -n "$ac_init_help" && exit $ac_status
2387 if $ac_init_version; then
2390 generated by GNU Autoconf 2.69.97-b1aba91
2392 Copyright (C) 2013 Free Software Foundation, Inc.
2393 This configure script is free software; the Free Software Foundation
2394 gives unlimited permission to copy, distribute and modify it.
2399 ## ------------------------ ##
2400 ## Autoconf initialization. ##
2401 ## ------------------------ ##
2403 # ac_fn_c_try_compile LINENO
2404 # --------------------------
2405 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2406 ac_fn_c_try_compile ()
2408 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2409 rm -f conftest.$ac_objext
2410 if { { ac_try="$ac_compile"
2412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2413 *) ac_try_echo=$ac_try;;
2415 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2416 printf "%s\n" "$ac_try_echo"; } >&5
2417 (eval "$ac_compile") 2>conftest.err
2419 if test -s conftest.err; then
2420 grep -v '^ *+' conftest.err >conftest.er1
2421 cat conftest.er1 >&5
2422 mv -f conftest.er1 conftest.err
2424 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2425 test $ac_status = 0; } && {
2426 test -z "$ac_c_werror_flag" ||
2427 test ! -s conftest.err
2428 } && test -s conftest.$ac_objext; then :
2431 printf "%s\n" "$as_me: failed program was:" >&5
2432 sed 's/^/| /' conftest.$ac_ext >&5
2436 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2437 as_fn_set_status $ac_retval
2439 } # ac_fn_c_try_compile
2441 # ac_fn_c_try_cpp LINENO
2442 # ----------------------
2443 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2446 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447 if { { ac_try="$ac_cpp conftest.$ac_ext"
2449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450 *) ac_try_echo=$ac_try;;
2452 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453 printf "%s\n" "$ac_try_echo"; } >&5
2454 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2456 if test -s conftest.err; then
2457 grep -v '^ *+' conftest.err >conftest.er1
2458 cat conftest.er1 >&5
2459 mv -f conftest.er1 conftest.err
2461 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462 test $ac_status = 0; } > conftest.i && {
2463 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2464 test ! -s conftest.err
2468 printf "%s\n" "$as_me: failed program was:" >&5
2469 sed 's/^/| /' conftest.$ac_ext >&5
2473 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474 as_fn_set_status $ac_retval
2478 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2479 # -------------------------------------------------------
2480 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2481 # the include files in INCLUDES and setting the cache variable VAR
2483 ac_fn_c_check_header_mongrel ()
2485 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2486 if eval \${$3+:} false; then :
2487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2488 printf %s "checking for $2... " >&6; }
2489 if eval \${$3+:} false; then :
2490 printf %s "(cached) " >&6
2493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2494 printf "%s\n" "$ac_res" >&6; }
2496 # Is the header compilable?
2497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2498 printf %s "checking $2 usability... " >&6; }
2499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500 /* end confdefs.h. */
2504 if ac_fn_c_try_compile "$LINENO"; then :
2505 ac_header_compiler=yes
2507 ac_header_compiler=no
2509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2511 printf "%s\n" "$ac_header_compiler" >&6; }
2513 # Is the header present?
2514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2515 printf %s "checking $2 presence... " >&6; }
2516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2517 /* end confdefs.h. */
2520 if ac_fn_c_try_cpp "$LINENO"; then :
2521 ac_header_preproc=yes
2523 ac_header_preproc=no
2525 rm -f conftest.err conftest.i conftest.$ac_ext
2526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2527 printf "%s\n" "$ac_header_preproc" >&6; }
2529 # So? What about this header?
2530 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2533 printf "%s\n" "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2535 printf "%s\n" "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2539 printf "%s\n" "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2541 printf "%s\n" "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2543 printf "%s\n" "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2545 printf "%s\n" "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2547 printf "%s\n" "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2548 ( printf "%s\n" "## ------------------------------- ##
2549 ## Report this to bug-gzip@gnu.org ##
2550 ## ------------------------------- ##"
2551 ) | sed "s/^/$as_me: WARNING: /" >&2
2554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2555 printf %s "checking for $2... " >&6; }
2556 if eval \${$3+:} false; then :
2557 printf %s "(cached) " >&6
2559 eval "$3=\$ac_header_compiler"
2562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2563 printf "%s\n" "$ac_res" >&6; }
2565 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2567 } # ac_fn_c_check_header_mongrel
2569 # ac_fn_c_try_run LINENO
2570 # ----------------------
2571 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2572 # that executables *can* be run.
2575 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2576 if { { ac_try="$ac_link"
2578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2579 *) ac_try_echo=$ac_try;;
2581 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2582 printf "%s\n" "$ac_try_echo"; } >&5
2583 (eval "$ac_link") 2>&5
2585 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2587 { { case "(($ac_try" in
2588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2589 *) ac_try_echo=$ac_try;;
2591 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2592 printf "%s\n" "$ac_try_echo"; } >&5
2593 (eval "$ac_try") 2>&5
2595 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2596 test $ac_status = 0; }; }; then :
2599 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2600 printf "%s\n" "$as_me: failed program was:" >&5
2601 sed 's/^/| /' conftest.$ac_ext >&5
2603 ac_retval=$ac_status
2605 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2606 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2607 as_fn_set_status $ac_retval
2611 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2612 # -------------------------------------------------------
2613 # Tests whether HEADER exists and can be compiled using the include files in
2614 # INCLUDES, setting the cache variable VAR accordingly.
2615 ac_fn_c_check_header_compile ()
2617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2619 printf %s "checking for $2... " >&6; }
2620 if eval \${$3+:} false; then :
2621 printf %s "(cached) " >&6
2623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624 /* end confdefs.h. */
2628 if ac_fn_c_try_compile "$LINENO"; then :
2633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2637 printf "%s\n" "$ac_res" >&6; }
2638 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2640 } # ac_fn_c_check_header_compile
2642 # ac_fn_c_try_link LINENO
2643 # -----------------------
2644 # Try to link conftest.$ac_ext, and return whether this succeeded.
2647 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2648 rm -f conftest.$ac_objext conftest$ac_exeext
2649 if { { ac_try="$ac_link"
2651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2652 *) ac_try_echo=$ac_try;;
2654 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2655 printf "%s\n" "$ac_try_echo"; } >&5
2656 (eval "$ac_link") 2>conftest.err
2658 if test -s conftest.err; then
2659 grep -v '^ *+' conftest.err >conftest.er1
2660 cat conftest.er1 >&5
2661 mv -f conftest.er1 conftest.err
2663 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2664 test $ac_status = 0; } && {
2665 test -z "$ac_c_werror_flag" ||
2666 test ! -s conftest.err
2667 } && test -s conftest$ac_exeext && {
2668 test "$cross_compiling" = yes ||
2669 test -x conftest$ac_exeext
2673 printf "%s\n" "$as_me: failed program was:" >&5
2674 sed 's/^/| /' conftest.$ac_ext >&5
2678 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2679 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2680 # interfere with the next link command; also delete a directory that is
2681 # left behind by Apple's compiler. We do this before executing the actions.
2682 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2683 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2684 as_fn_set_status $ac_retval
2686 } # ac_fn_c_try_link
2688 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2689 # -------------------------------------------
2690 # Tests whether TYPE exists after having included INCLUDES, setting cache
2691 # variable VAR accordingly.
2692 ac_fn_c_check_type ()
2694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2696 printf %s "checking for $2... " >&6; }
2697 if eval \${$3+:} false; then :
2698 printf %s "(cached) " >&6
2701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2702 /* end confdefs.h. */
2713 if ac_fn_c_try_compile "$LINENO"; then :
2714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2715 /* end confdefs.h. */
2726 if ac_fn_c_try_compile "$LINENO"; then :
2731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2737 printf "%s\n" "$ac_res" >&6; }
2738 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2740 } # ac_fn_c_check_type
2742 # ac_fn_c_check_func LINENO FUNC VAR
2743 # ----------------------------------
2744 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2745 ac_fn_c_check_func ()
2747 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2749 printf %s "checking for $2... " >&6; }
2750 if eval \${$3+:} false; then :
2751 printf %s "(cached) " >&6
2753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754 /* end confdefs.h. */
2755 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2756 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2757 #define $2 innocuous_$2
2759 /* System header to define __stub macros and hopefully few prototypes,
2760 which can conflict with char $2 (); below. */
2765 /* Override any GCC internal prototype to avoid an error.
2766 Use char because int might match the return type of a GCC
2767 builtin and then its argument prototype would still apply. */
2772 /* The GNU C library defines this for functions which it implements
2773 to always fail with ENOSYS. Some functions are actually named
2774 something starting with __ and the normal name is an alias. */
2775 #if defined __stub_$2 || defined __stub___$2
2787 if ac_fn_c_try_link "$LINENO"; then :
2792 rm -f core conftest.err conftest.$ac_objext \
2793 conftest$ac_exeext conftest.$ac_ext
2796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2797 printf "%s\n" "$ac_res" >&6; }
2798 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2800 } # ac_fn_c_check_func
2802 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2803 # ---------------------------------------------
2804 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2806 ac_fn_c_check_decl ()
2808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2809 as_decl_name=`echo $2|sed 's/ *(.*//'`
2810 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2812 printf %s "checking whether $as_decl_name is declared... " >&6; }
2813 if eval \${$3+:} false; then :
2814 printf %s "(cached) " >&6
2816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817 /* end confdefs.h. */
2822 #ifndef $as_decl_name
2824 (void) $as_decl_use;
2826 (void) $as_decl_name;
2834 if ac_fn_c_try_compile "$LINENO"; then :
2839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2843 printf "%s\n" "$ac_res" >&6; }
2844 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2846 } # ac_fn_c_check_decl
2848 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2849 # --------------------------------------------
2850 # Tries to find the compile-time value of EXPR in a program that includes
2851 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2853 ac_fn_c_compute_int ()
2855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2856 if test "$cross_compiling" = yes; then
2857 # Depending upon the size, compute the lo and hi bounds.
2858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2859 /* end confdefs.h. */
2864 static int test_array [1 - 2 * !(($2) >= 0)];
2866 return test_array [0];
2872 if ac_fn_c_try_compile "$LINENO"; then :
2875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876 /* end confdefs.h. */
2881 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2883 return test_array [0];
2889 if ac_fn_c_try_compile "$LINENO"; then :
2890 ac_hi=$ac_mid; break
2892 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2893 if test $ac_lo -le $ac_mid; then
2897 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903 /* end confdefs.h. */
2908 static int test_array [1 - 2 * !(($2) < 0)];
2910 return test_array [0];
2916 if ac_fn_c_try_compile "$LINENO"; then :
2919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2920 /* end confdefs.h. */
2925 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2927 return test_array [0];
2933 if ac_fn_c_try_compile "$LINENO"; then :
2934 ac_lo=$ac_mid; break
2936 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2937 if test $ac_mid -le $ac_hi; then
2941 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951 # Binary search between lo and hi bounds.
2952 while test "x$ac_lo" != "x$ac_hi"; do
2953 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2955 /* end confdefs.h. */
2960 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2962 return test_array [0];
2968 if ac_fn_c_try_compile "$LINENO"; then :
2971 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2976 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2981 /* end confdefs.h. */
2983 static long int longval () { return $2; }
2984 static unsigned long int ulongval () { return $2; }
2991 FILE *f = fopen ("conftest.val", "w");
2996 long int i = longval ();
2999 fprintf (f, "%ld", i);
3003 unsigned long int i = ulongval ();
3006 fprintf (f, "%lu", i);
3008 /* Do not output a trailing newline, as this causes \r\n confusion
3009 on some platforms. */
3010 return ferror (f) || fclose (f) != 0;
3016 if ac_fn_c_try_run "$LINENO"; then :
3017 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3022 conftest.$ac_objext conftest.beam conftest.$ac_ext
3026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3027 as_fn_set_status $ac_retval
3029 } # ac_fn_c_compute_int
3031 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3032 # ----------------------------------------------------
3033 # Tries to find if the field MEMBER exists in type AGGR, after including
3034 # INCLUDES, setting cache variable VAR accordingly.
3035 ac_fn_c_check_member ()
3037 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3039 printf %s "checking for $2.$3... " >&6; }
3040 if eval \${$4+:} false; then :
3041 printf %s "(cached) " >&6
3043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3044 /* end confdefs.h. */
3056 if ac_fn_c_try_compile "$LINENO"; then :
3059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060 /* end confdefs.h. */
3066 if (sizeof ac_aggr.$3)
3072 if ac_fn_c_try_compile "$LINENO"; then :
3077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3083 printf "%s\n" "$ac_res" >&6; }
3084 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3086 } # ac_fn_c_check_member
3087 cat >config.log <<_ACEOF
3088 This file contains any messages produced by compilers while
3089 running configure, to aid debugging if configure makes a mistake.
3091 It was created by gzip $as_me 1.6, which was
3092 generated by GNU Autoconf 2.69.97-b1aba91. Invocation command line was
3104 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3105 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3106 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3107 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3108 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3110 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3111 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3113 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3114 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3115 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3116 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3117 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3118 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3119 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3127 case $as_dir in #(((
3130 *) as_dir=$as_dir/ ;;
3132 printf "%s\n" "PATH: $as_dir"
3148 # Keep a trace of the command line.
3149 # Strip out --no-create and --no-recursion so they do not pile up.
3150 # Strip out --silent because we don't want to record it for future runs.
3151 # Also quote any args containing shell meta-characters.
3152 # Make two passes to allow for proper duplicate-argument suppression.
3156 ac_must_keep_next=false
3162 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3164 | -silent | --silent | --silen | --sile | --sil)
3167 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3170 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3172 as_fn_append ac_configure_args1 " '$ac_arg'"
3173 if test $ac_must_keep_next = true; then
3174 ac_must_keep_next=false # Got value, back to normal.
3177 *=* | --config-cache | -C | -disable-* | --disable-* \
3178 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3179 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3180 | -with-* | --with-* | -without-* | --without-* | --x)
3181 case "$ac_configure_args0 " in
3182 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3185 -* ) ac_must_keep_next=true ;;
3188 as_fn_append ac_configure_args " '$ac_arg'"
3193 { ac_configure_args0=; unset ac_configure_args0;}
3194 { ac_configure_args1=; unset ac_configure_args1;}
3196 # When interrupted or exit'd, cleanup temporary files, and complete
3197 # config.log. We remove comments because anyway the quotes in there
3198 # would cause problems or look ugly.
3199 # WARNING: Use '\'' to represent an apostrophe within the trap.
3200 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3201 trap 'exit_status=$?
3204 # Save into config.log some information that might help in debugging.
3208 printf "%s\n" "## ---------------- ##
3209 ## Cache variables. ##
3210 ## ---------------- ##"
3212 # The following way of writing the cache mishandles newlines in values,
3214 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3215 eval ac_val=\$$ac_var
3219 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3220 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223 _ | IFS | as_nl) ;; #(
3224 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3225 *) { eval $ac_var=; unset $ac_var;} ;;
3230 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3231 *${as_nl}ac_space=\ *)
3233 "s/'\''/'\''\\\\'\'''\''/g;
3234 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3244 printf "%s\n" "## ----------------- ##
3245 ## Output variables. ##
3246 ## ----------------- ##"
3248 for ac_var in $ac_subst_vars
3250 eval ac_val=\$$ac_var
3252 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3254 printf "%s\n" "$ac_var='\''$ac_val'\''"
3258 if test -n "$ac_subst_files"; then
3259 printf "%s\n" "## ------------------- ##
3260 ## File substitutions. ##
3261 ## ------------------- ##"
3263 for ac_var in $ac_subst_files
3265 eval ac_val=\$$ac_var
3267 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3269 printf "%s\n" "$ac_var='\''$ac_val'\''"
3274 if test -s confdefs.h; then
3275 printf "%s\n" "## ----------- ##
3282 test "$ac_signal" != 0 &&
3283 printf "%s\n" "$as_me: caught signal $ac_signal"
3284 printf "%s\n" "$as_me: exit $exit_status"
3286 rm -f core *.core core.conftest.* &&
3287 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290 for ac_signal in 1 2 13 15; do
3291 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3295 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3296 rm -f -r conftest* confdefs.h
3298 printf "%s\n" "/* confdefs.h */" > confdefs.h
3300 # Predefined preprocessor variables.
3302 cat >>confdefs.h <<_ACEOF
3303 #define PACKAGE_NAME "$PACKAGE_NAME"
3306 cat >>confdefs.h <<_ACEOF
3307 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310 cat >>confdefs.h <<_ACEOF
3311 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3314 cat >>confdefs.h <<_ACEOF
3315 #define PACKAGE_STRING "$PACKAGE_STRING"
3318 cat >>confdefs.h <<_ACEOF
3319 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322 cat >>confdefs.h <<_ACEOF
3323 #define PACKAGE_URL "$PACKAGE_URL"
3327 # Let the site file select an alternate cache file if it wants to.
3328 # Prefer an explicitly selected file to automatically selected ones.
3331 if test -n "$CONFIG_SITE"; then
3332 # We do not want a PATH search for config.site.
3333 case $CONFIG_SITE in #((
3334 -*) ac_site_file1=./$CONFIG_SITE;;
3335 */*) ac_site_file1=$CONFIG_SITE;;
3336 *) ac_site_file1=./$CONFIG_SITE;;
3338 elif test "x$prefix" != xNONE; then
3339 ac_site_file1=$prefix/share/config.site
3340 ac_site_file2=$prefix/etc/config.site
3342 ac_site_file1=$ac_default_prefix/share/config.site
3343 ac_site_file2=$ac_default_prefix/etc/config.site
3345 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3347 test "x$ac_site_file" = xNONE && continue
3348 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3350 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3351 sed 's/^/| /' "$ac_site_file" >&5
3353 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3354 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3355 as_fn_error $? "failed to load site script $ac_site_file
3356 See \`config.log' for more details" "$LINENO" 5; }
3360 if test -r "$cache_file"; then
3361 # Some versions of bash will fail to source /dev/null (special files
3362 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3363 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3365 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3367 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3368 *) . "./$cache_file";;
3372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3373 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3377 as_fn_append ac_header_list " unistd.h"
3378 as_fn_append ac_header_list " sys/param.h"
3379 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3380 as_fn_append ac_header_list " sys/socket.h"
3381 as_fn_append ac_func_list " fchdir"
3382 as_fn_append ac_header_list " dirent.h"
3383 as_fn_append ac_func_list " fdopendir"
3384 as_fn_append ac_func_list " fcntl"
3385 as_fn_append ac_func_list " symlink"
3386 as_fn_append ac_func_list " mempcpy"
3387 as_fn_append ac_header_list " stdio_ext.h"
3388 as_fn_append ac_func_list " __fpending"
3389 as_fn_append ac_func_list " vasnprintf"
3390 as_fn_append ac_header_list " features.h"
3391 as_fn_append ac_func_list " snprintf"
3392 as_fn_append ac_func_list " fpurge"
3393 as_fn_append ac_func_list " __fpurge"
3394 as_fn_append ac_func_list " __freadahead"
3395 as_fn_append ac_func_list " __freading"
3396 as_fn_append ac_func_list " __fseterr"
3397 as_fn_append ac_header_list " sys/stat.h"
3398 as_fn_append ac_func_list " getdtablesize"
3399 gl_getopt_required=GNU
3400 as_fn_append ac_header_list " getopt.h"
3401 as_fn_append ac_func_list " gettimeofday"
3402 as_fn_append ac_func_list " nanotime"
3403 as_fn_append ac_header_list " sys/time.h"
3404 as_fn_append ac_func_list " lstat"
3405 as_fn_append ac_header_list " math.h"
3406 as_fn_append ac_func_list " mbsinit"
3407 as_fn_append ac_func_list " mbrtowc"
3408 as_fn_append ac_header_list " sys/mman.h"
3409 as_fn_append ac_func_list " mprotect"
3410 as_fn_append ac_func_list " openat"
3411 as_fn_append ac_func_list " strerror_r"
3412 as_fn_append ac_func_list " __xpg_strerror_r"
3414 as_fn_append ac_header_list " wchar.h"
3415 as_fn_append ac_header_list " stdint.h"
3416 as_fn_append ac_func_list " strdup"
3417 as_fn_append ac_func_list " catgets"
3418 as_fn_append ac_func_list " pipe"
3419 as_fn_append ac_header_list " utime.h"
3420 as_fn_append ac_func_list " futimes"
3421 as_fn_append ac_func_list " futimesat"
3422 as_fn_append ac_func_list " futimens"
3423 as_fn_append ac_func_list " utimensat"
3424 as_fn_append ac_func_list " lutimes"
3425 as_fn_append ac_func_list " iswcntrl"
3426 as_fn_append ac_header_list " wctype.h"
3427 as_fn_append ac_header_list " fcntl.h"
3428 as_fn_append ac_header_list " limits.h"
3429 as_fn_append ac_header_list " memory.h"
3430 as_fn_append ac_header_list " time.h"
3431 as_fn_append ac_func_list " chown"
3432 as_fn_append ac_func_list " fchmod"
3433 as_fn_append ac_func_list " fchown"
3434 as_fn_append ac_func_list " siginterrupt"
3435 # Check that the precious variables saved in the cache have kept the same
3437 ac_cache_corrupted=false
3438 for ac_var in $ac_precious_vars; do
3439 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3440 eval ac_new_set=\$ac_env_${ac_var}_set
3441 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3442 eval ac_new_val=\$ac_env_${ac_var}_value
3443 case $ac_old_set,$ac_new_set in
3445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3446 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3447 ac_cache_corrupted=: ;;
3449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3450 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3451 ac_cache_corrupted=: ;;
3454 if test "x$ac_old_val" != "x$ac_new_val"; then
3455 # differences in whitespace do not lead to failure.
3456 ac_old_val_w=`echo x $ac_old_val`
3457 ac_new_val_w=`echo x $ac_new_val`
3458 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3460 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3461 ac_cache_corrupted=:
3463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3464 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3465 eval $ac_var=\$ac_old_val
3467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3468 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3470 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
3473 # Pass precious variables to config.status.
3474 if test "$ac_new_set" = set; then
3476 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3477 *) ac_arg=$ac_var=$ac_new_val ;;
3479 case " $ac_configure_args " in
3480 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3481 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3485 if $ac_cache_corrupted; then
3486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3489 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3490 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3492 ## -------------------- ##
3493 ## Main body of script. ##
3494 ## -------------------- ##
3497 ac_cpp='$CPP $CPPFLAGS'
3498 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3499 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3506 for ac_dir in build-aux "$srcdir"/build-aux; do
3507 if test -f "$ac_dir/install-sh"; then
3509 ac_install_sh="$ac_aux_dir/install-sh -c"
3511 elif test -f "$ac_dir/install.sh"; then
3513 ac_install_sh="$ac_aux_dir/install.sh -c"
3515 elif test -f "$ac_dir/shtool"; then
3517 ac_install_sh="$ac_aux_dir/shtool install -c"
3521 if test -z "$ac_aux_dir"; then
3522 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3525 # These three variables are undocumented and unsupported,
3526 # and are intended to be withdrawn in a future Autoconf release.
3527 # They can cause serious problems if a builder's source tree is in a directory
3528 # whose full name contains unusual characters.
3529 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3530 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3531 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3535 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3537 am__api_version='1.99a'
3539 # Find a good install program. We prefer a C program (faster),
3540 # so one script is as good as another. But avoid the broken or
3541 # incompatible versions:
3542 # SysV /etc/install, /usr/sbin/install
3543 # SunOS /usr/etc/install
3544 # IRIX /sbin/install
3546 # AmigaOS /C/install, which installs bootblocks on floppy discs
3547 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3548 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3549 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3550 # OS/2's system install, which has a completely different semantic
3551 # ./install, which can be erroneously created by make from ./install.sh.
3552 # Reject install programs that cannot install multiple files.
3553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3554 printf %s "checking for a BSD-compatible install... " >&6; }
3555 if test -z "$INSTALL"; then
3556 if ${ac_cv_path_install+:} false; then :
3557 printf %s "(cached) " >&6
3559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563 case $as_dir in #(((
3566 *) as_dir=$as_dir/ ;;
3568 # Account for fact that we put trailing slashes in our PATH walk.
3571 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3572 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3575 # OSF1 and SCO ODT 3.0 have their own names for install.
3576 # Don't use installbsd from OSF since it installs stuff as root
3578 for ac_prog in ginstall scoinst install; do
3579 for ac_exec_ext in '' $ac_executable_extensions; do
3580 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3581 if test $ac_prog = install &&
3582 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3583 # AIX install. It has an incompatible calling convention.
3585 elif test $ac_prog = install &&
3586 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3587 # program-specific install script used by HP pwplus--don't use.
3590 rm -rf conftest.one conftest.two conftest.dir
3591 echo one > conftest.one
3592 echo two > conftest.two
3594 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3595 test -s conftest.one && test -s conftest.two &&
3596 test -s conftest.dir/conftest.one &&
3597 test -s conftest.dir/conftest.two
3599 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3612 rm -rf conftest.one conftest.two conftest.dir
3615 if test "${ac_cv_path_install+set}" = set; then
3616 INSTALL=$ac_cv_path_install
3618 # As a last resort, use the slow shell script. Don't cache a
3619 # value for INSTALL within a source directory, because that will
3620 # break other packages using the cache if that directory is
3621 # removed, or if the value is a relative name.
3622 INSTALL=$ac_install_sh
3625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3626 printf "%s\n" "$INSTALL" >&6; }
3628 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3629 # It thinks the first close brace ends the variable substitution.
3630 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3632 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3634 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3637 printf %s "checking whether build environment is sane... " >&6; }
3638 # Reject unsafe characters in $srcdir or the absolute working directory
3639 # name. Accept space and tab only in the latter.
3643 *[\\\"\#\$\&\'\`$am_lf]*)
3644 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3647 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3648 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3651 # Do 'set' in a subshell so we don't clobber the current shell's
3652 # arguments. Must try -L first in case configure is actually a
3653 # symlink; some systems play weird games with the mod time of symlinks
3654 # (eg FreeBSD returns the mod time of the symlink's containing
3658 for am_try in 1 2; do
3659 echo "timestamp, slept: $am_has_slept" > conftest.file
3660 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3661 if test "$*" = "X"; then
3663 set X `ls -t "$srcdir/configure" conftest.file`
3665 if test "$*" != "X $srcdir/configure conftest.file" \
3666 && test "$*" != "X conftest.file $srcdir/configure"; then
3668 # If neither matched, then we have a broken ls. This can happen
3669 # if, for instance, CONFIG_SHELL is bash and it inherits a
3670 # broken ls alias from the environment. This has actually
3671 # happened. Such a system could not be considered "sane".
3672 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3673 alias in your environment" "$LINENO" 5
3675 if test "$2" = conftest.file || test $am_try -eq 2; then
3682 test "$2" = conftest.file
3688 as_fn_error $? "newly created file is older than distributed files!
3689 Check your system clock" "$LINENO" 5
3691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3692 printf "%s\n" "yes" >&6; }
3693 # If we didn't sleep, we still need to ensure time stamps of config.status and
3694 # generated files are strictly newer.
3696 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3703 test "$program_prefix" != NONE &&
3704 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3705 # Use a double $ so make ignores it.
3706 test "$program_suffix" != NONE &&
3707 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3708 # Double any \ or $.
3709 # By default was `s,x,x', remove it if useless.
3710 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3711 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3713 # expand $ac_aux_dir to an absolute path
3714 am_aux_dir=`cd $ac_aux_dir && pwd`
3716 if test x"${MISSING+set}" != xset; then
3719 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3721 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3724 # Use eval to expand $SHELL
3725 if eval "$MISSING --is-lightweight"; then
3726 am_missing_run="$MISSING "
3729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3730 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3733 if test x"${install_sh}" != xset; then
3736 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3738 install_sh="\${SHELL} $am_aux_dir/install-sh"
3742 # Installed binaries are usually stripped using 'strip' when the user
3743 # run "make install-strip". However 'strip' might not be the right
3744 # tool to use in cross-compilation environments, therefore Automake
3745 # will honor the 'STRIP' environment variable to overrule this program.
3746 if test "$cross_compiling" != no; then
3747 if test -n "$ac_tool_prefix"; then
3748 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3749 set dummy ${ac_tool_prefix}strip; ac_word=$2
3750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3751 printf %s "checking for $ac_word... " >&6; }
3752 if ${ac_cv_prog_STRIP+:} false; then :
3753 printf %s "(cached) " >&6
3755 if test -n "$STRIP"; then
3756 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3762 case $as_dir in #(((
3765 *) as_dir=$as_dir/ ;;
3767 for ac_exec_ext in '' $ac_executable_extensions; do
3768 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3769 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3770 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3779 STRIP=$ac_cv_prog_STRIP
3780 if test -n "$STRIP"; then
3781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3782 printf "%s\n" "$STRIP" >&6; }
3784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785 printf "%s\n" "no" >&6; }
3790 if test -z "$ac_cv_prog_STRIP"; then
3792 # Extract the first word of "strip", so it can be a program name with args.
3793 set dummy strip; ac_word=$2
3794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3795 printf %s "checking for $ac_word... " >&6; }
3796 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3797 printf %s "(cached) " >&6
3799 if test -n "$ac_ct_STRIP"; then
3800 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3806 case $as_dir in #(((
3809 *) as_dir=$as_dir/ ;;
3811 for ac_exec_ext in '' $ac_executable_extensions; do
3812 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3813 ac_cv_prog_ac_ct_STRIP="strip"
3814 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3823 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3824 if test -n "$ac_ct_STRIP"; then
3825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3826 printf "%s\n" "$ac_ct_STRIP" >&6; }
3828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3829 printf "%s\n" "no" >&6; }
3832 if test "x$ac_ct_STRIP" = x; then
3835 case $cross_compiling:$ac_tool_warned in
3837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3838 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3839 ac_tool_warned=yes ;;
3844 STRIP="$ac_cv_prog_STRIP"
3848 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3851 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3852 if test -z "$MKDIR_P"; then
3853 if ${ac_cv_path_mkdir+:} false; then :
3854 printf %s "(cached) " >&6
3856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3857 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3860 case $as_dir in #(((
3863 *) as_dir=$as_dir/ ;;
3865 for ac_prog in mkdir gmkdir; do
3866 for ac_exec_ext in '' $ac_executable_extensions; do
3867 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3868 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3869 'mkdir (GNU coreutils) '* | \
3870 'mkdir (coreutils) '* | \
3871 'mkdir (fileutils) '4.1*)
3872 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3882 test -d ./--version && rmdir ./--version
3883 if test "${ac_cv_path_mkdir+set}" = set; then
3884 MKDIR_P="$ac_cv_path_mkdir -p"
3886 # As a last resort, use the slow shell script. Don't cache a
3887 # value for MKDIR_P within a source directory, because that will
3888 # break other packages using the cache if that directory is
3889 # removed, or if the value is a relative name.
3890 MKDIR_P="$ac_install_sh -d"
3893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3894 printf "%s\n" "$MKDIR_P" >&6; }
3896 for ac_prog in gawk mawk nawk awk
3898 # Extract the first word of "$ac_prog", so it can be a program name with args.
3899 set dummy $ac_prog; ac_word=$2
3900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3901 printf %s "checking for $ac_word... " >&6; }
3902 if ${ac_cv_prog_AWK+:} false; then :
3903 printf %s "(cached) " >&6
3905 if test -n "$AWK"; then
3906 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3912 case $as_dir in #(((
3915 *) as_dir=$as_dir/ ;;
3917 for ac_exec_ext in '' $ac_executable_extensions; do
3918 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3919 ac_cv_prog_AWK="$ac_prog"
3920 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3930 if test -n "$AWK"; then
3931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3932 printf "%s\n" "$AWK" >&6; }
3934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3935 printf "%s\n" "no" >&6; }
3939 test -n "$AWK" && break
3942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3943 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3945 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3946 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3947 printf %s "(cached) " >&6
3949 cat >conftest.make <<\_ACEOF
3952 @echo '@@@%%%=$(MAKE)=@@@%%%'
3954 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3955 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3957 eval ac_cv_prog_make_${ac_make}_set=yes;;
3959 eval ac_cv_prog_make_${ac_make}_set=no;;
3963 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3965 printf "%s\n" "yes" >&6; }
3968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3969 printf "%s\n" "no" >&6; }
3970 SET_MAKE="MAKE=${MAKE-make}"
3973 # Check whether --enable-silent-rules was given.
3974 if test "${enable_silent_rules+set}" = set; then :
3975 enableval=$enable_silent_rules;
3978 case $enable_silent_rules in # (((
3979 yes) AM_DEFAULT_VERBOSITY=0;;
3980 no) AM_DEFAULT_VERBOSITY=1;;
3981 *) AM_DEFAULT_VERBOSITY=1;;
3983 am_make=${MAKE-make}
3984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3985 printf %s "checking whether $am_make supports nested variables... " >&6; }
3986 if ${am_cv_make_support_nested_variables+:} false; then :
3987 printf %s "(cached) " >&6
3989 if printf "%s\n" 'TRUE=$(BAR$(V))
3995 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3996 am_cv_make_support_nested_variables=yes
3998 am_cv_make_support_nested_variables=no
4001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4002 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4003 if test $am_cv_make_support_nested_variables = yes; then
4005 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4007 AM_V=$AM_DEFAULT_VERBOSITY
4008 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4012 mkdir_p='$(MKDIR_P)'
4013 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4014 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4015 # is not polluted with repeated "-I."
4016 am__isrc=' -I$(srcdir)'
4017 # test to see if srcdir already configured
4018 if test -f $srcdir/config.status; then
4019 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4023 # test whether we have cygpath
4024 if test -z "$CYGPATH_W"; then
4025 if (cygpath --version) >/dev/null 2>/dev/null; then
4026 CYGPATH_W='cygpath -w'
4033 # Define the identity of the package.
4038 cat >>confdefs.h <<_ACEOF
4039 #define PACKAGE "$PACKAGE"
4043 cat >>confdefs.h <<_ACEOF
4044 #define VERSION "$VERSION"
4047 # Some tools Automake needs.
4049 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4052 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4055 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4058 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4061 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4063 # We need awk for the "check" target. The system "awk" is bad on
4065 # Always define AMTAR for backward compatibility. Yes, it's still used
4066 # in the wild :-( We should find a proper way to deprecate it ...
4070 # We'll loop over all known methods to create a tar archive until one works.
4071 _am_tools='gnutar pax cpio none'
4073 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4080 # POSIX will say in a future version that running "rm -f" with no argument
4081 # is OK; and we want to be able to make that assumption in our Makefile
4082 # recipes. So use an aggressive probe to check that the usage we want is
4083 # actually supported "in the wild" to an acceptable degree.
4084 # See automake bug#10828.
4085 # To make any issue more visible, cause the running configure to be aborted
4086 # by default if the 'rm' program in use doesn't match our expectations; the
4087 # user can still override this though.
4088 if rm -f && rm -fr && rm -rf; then : OK; else
4092 Your 'rm' program seems unable to run without file operands specified
4093 on the command line, even when the '-f' option is present. This is contrary
4094 to the behaviour of most rm programs out there, and not conforming with
4095 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4097 Please tell bug-automake@gnu.org about your system, including the value
4098 of your $PATH and any error possibly output before this message. This
4099 can help us improve future automake versions.
4102 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4103 echo 'Configuration will proceed anyway, since you have set the' >&2
4104 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4108 Aborting the configuration process, to ensure you take notice of the issue.
4110 You can download and install GNU coreutils to get an 'rm' implementation
4111 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4113 If you want to complete the configuration process using your problematic
4114 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4115 to "yes", and re-run configure.
4118 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4121 # Check whether --enable-silent-rules was given.
4122 if test "${enable_silent_rules+set}" = set; then :
4123 enableval=$enable_silent_rules;
4126 case $enable_silent_rules in # (((
4127 yes) AM_DEFAULT_VERBOSITY=0;;
4128 no) AM_DEFAULT_VERBOSITY=1;;
4129 *) AM_DEFAULT_VERBOSITY=0;;
4131 am_make=${MAKE-make}
4132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4133 printf %s "checking whether $am_make supports nested variables... " >&6; }
4134 if ${am_cv_make_support_nested_variables+:} false; then :
4135 printf %s "(cached) " >&6
4137 if printf "%s\n" 'TRUE=$(BAR$(V))
4143 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4144 am_cv_make_support_nested_variables=yes
4146 am_cv_make_support_nested_variables=no
4149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4150 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4151 if test $am_cv_make_support_nested_variables = yes; then
4153 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4155 AM_V=$AM_DEFAULT_VERBOSITY
4156 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4159 # make --enable-silent-rules the default.
4168 ac_config_commands="$ac_config_commands depfiles"
4171 am_make=${MAKE-make}
4172 cat > confinc << 'END'
4174 @echo this is the am__doit target
4177 # If we don't find an include directive, just comment out the code.
4178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4179 printf %s "checking for style of include used by $am_make... " >&6; }
4183 # First try GNU make style include.
4184 echo "include confinc" > confmf
4185 # Ignore all kinds of additional output from 'make'.
4186 case `$am_make -s -f confmf 2> /dev/null` in #(
4187 *the\ am__doit\ target*)
4193 # Now try BSD make style include.
4194 if test "$am__include" = "#"; then
4195 echo '.include "confinc"' > confmf
4196 case `$am_make -s -f confmf 2> /dev/null` in #(
4197 *the\ am__doit\ target*)
4198 am__include=.include
4206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4207 printf "%s\n" "$_am_result" >&6; }
4208 rm -f confinc confmf
4210 # Check whether --enable-dependency-tracking was given.
4211 if test "${enable_dependency_tracking+set}" = set; then :
4212 enableval=$enable_dependency_tracking;
4215 if test "x$enable_dependency_tracking" != xno; then
4216 am_depcomp="$ac_aux_dir/depcomp"
4220 if test "x$enable_dependency_tracking" != xno; then
4230 ac_cpp='$CPP $CPPFLAGS'
4231 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4232 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4233 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4234 if test -n "$ac_tool_prefix"; then
4235 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4236 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4238 printf %s "checking for $ac_word... " >&6; }
4239 if ${ac_cv_prog_CC+:} false; then :
4240 printf %s "(cached) " >&6
4242 if test -n "$CC"; then
4243 ac_cv_prog_CC="$CC" # Let the user override the test.
4245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4249 case $as_dir in #(((
4252 *) as_dir=$as_dir/ ;;
4254 for ac_exec_ext in '' $ac_executable_extensions; do
4255 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4256 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4257 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4267 if test -n "$CC"; then
4268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4269 printf "%s\n" "$CC" >&6; }
4271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4272 printf "%s\n" "no" >&6; }
4277 if test -z "$ac_cv_prog_CC"; then
4279 # Extract the first word of "gcc", so it can be a program name with args.
4280 set dummy gcc; ac_word=$2
4281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4282 printf %s "checking for $ac_word... " >&6; }
4283 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4284 printf %s "(cached) " >&6
4286 if test -n "$ac_ct_CC"; then
4287 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4293 case $as_dir in #(((
4296 *) as_dir=$as_dir/ ;;
4298 for ac_exec_ext in '' $ac_executable_extensions; do
4299 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4300 ac_cv_prog_ac_ct_CC="gcc"
4301 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4310 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4311 if test -n "$ac_ct_CC"; then
4312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4313 printf "%s\n" "$ac_ct_CC" >&6; }
4315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4316 printf "%s\n" "no" >&6; }
4319 if test "x$ac_ct_CC" = x; then
4322 case $cross_compiling:$ac_tool_warned in
4324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4325 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4326 ac_tool_warned=yes ;;
4334 if test -z "$CC"; then
4335 if test -n "$ac_tool_prefix"; then
4336 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4337 set dummy ${ac_tool_prefix}cc; ac_word=$2
4338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4339 printf %s "checking for $ac_word... " >&6; }
4340 if ${ac_cv_prog_CC+:} false; then :
4341 printf %s "(cached) " >&6
4343 if test -n "$CC"; then
4344 ac_cv_prog_CC="$CC" # Let the user override the test.
4346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4350 case $as_dir in #(((
4353 *) as_dir=$as_dir/ ;;
4355 for ac_exec_ext in '' $ac_executable_extensions; do
4356 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4357 ac_cv_prog_CC="${ac_tool_prefix}cc"
4358 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4368 if test -n "$CC"; then
4369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4370 printf "%s\n" "$CC" >&6; }
4372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4373 printf "%s\n" "no" >&6; }
4379 if test -z "$CC"; then
4380 # Extract the first word of "cc", so it can be a program name with args.
4381 set dummy cc; ac_word=$2
4382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4383 printf %s "checking for $ac_word... " >&6; }
4384 if ${ac_cv_prog_CC+:} false; then :
4385 printf %s "(cached) " >&6
4387 if test -n "$CC"; then
4388 ac_cv_prog_CC="$CC" # Let the user override the test.
4391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395 case $as_dir in #(((
4398 *) as_dir=$as_dir/ ;;
4400 for ac_exec_ext in '' $ac_executable_extensions; do
4401 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4402 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4403 ac_prog_rejected=yes
4407 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4414 if test $ac_prog_rejected = yes; then
4415 # We found a bogon in the path, so make sure we never use it.
4416 set dummy $ac_cv_prog_CC
4418 if test $# != 0; then
4419 # We chose a different compiler from the bogus one.
4420 # However, it has the same basename, so the bogon will be chosen
4421 # first if we set CC to just the basename; use the full file name.
4423 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4429 if test -n "$CC"; then
4430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4431 printf "%s\n" "$CC" >&6; }
4433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434 printf "%s\n" "no" >&6; }
4439 if test -z "$CC"; then
4440 if test -n "$ac_tool_prefix"; then
4441 for ac_prog in cl.exe
4443 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4444 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446 printf %s "checking for $ac_word... " >&6; }
4447 if ${ac_cv_prog_CC+:} false; then :
4448 printf %s "(cached) " >&6
4450 if test -n "$CC"; then
4451 ac_cv_prog_CC="$CC" # Let the user override the test.
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457 case $as_dir in #(((
4460 *) as_dir=$as_dir/ ;;
4462 for ac_exec_ext in '' $ac_executable_extensions; do
4463 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4464 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4465 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4475 if test -n "$CC"; then
4476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4477 printf "%s\n" "$CC" >&6; }
4479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4480 printf "%s\n" "no" >&6; }
4484 test -n "$CC" && break
4487 if test -z "$CC"; then
4489 for ac_prog in cl.exe
4491 # Extract the first word of "$ac_prog", so it can be a program name with args.
4492 set dummy $ac_prog; ac_word=$2
4493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4494 printf %s "checking for $ac_word... " >&6; }
4495 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4496 printf %s "(cached) " >&6
4498 if test -n "$ac_ct_CC"; then
4499 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4505 case $as_dir in #(((
4508 *) as_dir=$as_dir/ ;;
4510 for ac_exec_ext in '' $ac_executable_extensions; do
4511 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4512 ac_cv_prog_ac_ct_CC="$ac_prog"
4513 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4522 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4523 if test -n "$ac_ct_CC"; then
4524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4525 printf "%s\n" "$ac_ct_CC" >&6; }
4527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4528 printf "%s\n" "no" >&6; }
4532 test -n "$ac_ct_CC" && break
4535 if test "x$ac_ct_CC" = x; then
4538 case $cross_compiling:$ac_tool_warned in
4540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4541 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4542 ac_tool_warned=yes ;;
4551 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4552 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4553 as_fn_error $? "no acceptable C compiler found in \$PATH
4554 See \`config.log' for more details" "$LINENO" 5; }
4556 # Provide some information about the compiler.
4557 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4560 for ac_option in --version -v -V -qversion; do
4561 { { ac_try="$ac_compiler $ac_option >&5"
4563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4564 *) ac_try_echo=$ac_try;;
4566 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4567 printf "%s\n" "$ac_try_echo"; } >&5
4568 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4570 if test -s conftest.err; then
4572 ... rest of stderr output deleted ...
4573 10q' conftest.err >conftest.er1
4574 cat conftest.er1 >&5
4576 rm -f conftest.er1 conftest.err
4577 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4578 test $ac_status = 0; }
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582 /* end confdefs.h. */
4592 ac_clean_files_save=$ac_clean_files
4593 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4594 # Try to create an executable without -o first, disregard a.out.
4595 # It will help us diagnose broken compilers, and finding out an intuition
4597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4598 printf %s "checking whether the C compiler works... " >&6; }
4599 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4601 # The possible output files:
4602 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4605 for ac_file in $ac_files
4608 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4609 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4614 if { { ac_try="$ac_link_default"
4616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4617 *) ac_try_echo=$ac_try;;
4619 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4620 printf "%s\n" "$ac_try_echo"; } >&5
4621 (eval "$ac_link_default") 2>&5
4623 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4624 test $ac_status = 0; }; then :
4625 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4626 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4627 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4628 # so that the user can short-circuit this test for compilers unknown to
4630 for ac_file in $ac_files ''
4632 test -f "$ac_file" || continue
4634 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4637 # We found the default executable, but exeext='' is most
4641 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4643 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4645 # We set ac_cv_exeext here because the later test for it is not
4646 # safe: cross compilers may not add the suffix if given an `-o'
4647 # argument, so we may need to know it at that point already.
4648 # Even if this section looks crufty: it has the advantage of
4655 test "$ac_cv_exeext" = no && ac_cv_exeext=
4660 if test -z "$ac_file"; then :
4661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662 printf "%s\n" "no" >&6; }
4663 printf "%s\n" "$as_me: failed program was:" >&5
4664 sed 's/^/| /' conftest.$ac_ext >&5
4666 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4667 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4668 as_fn_error 77 "C compiler cannot create executables
4669 See \`config.log' for more details" "$LINENO" 5; }
4671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4672 printf "%s\n" "yes" >&6; }
4674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4675 printf %s "checking for C compiler default output file name... " >&6; }
4676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4677 printf "%s\n" "$ac_file" >&6; }
4678 ac_exeext=$ac_cv_exeext
4680 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4681 ac_clean_files=$ac_clean_files_save
4682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4683 printf %s "checking for suffix of executables... " >&6; }
4684 if { { ac_try="$ac_link"
4686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4687 *) ac_try_echo=$ac_try;;
4689 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4690 printf "%s\n" "$ac_try_echo"; } >&5
4691 (eval "$ac_link") 2>&5
4693 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4694 test $ac_status = 0; }; then :
4695 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4696 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4697 # work properly (i.e., refer to `conftest.exe'), while it won't with
4699 for ac_file in conftest.exe conftest conftest.*; do
4700 test -f "$ac_file" || continue
4702 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4703 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4709 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4710 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4711 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4712 See \`config.log' for more details" "$LINENO" 5; }
4714 rm -f conftest conftest$ac_cv_exeext
4715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4716 printf "%s\n" "$ac_cv_exeext" >&6; }
4718 rm -f conftest.$ac_ext
4719 EXEEXT=$ac_cv_exeext
4721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4722 /* end confdefs.h. */
4727 FILE *f = fopen ("conftest.out", "w");
4728 return ferror (f) || fclose (f) != 0;
4734 ac_clean_files="$ac_clean_files conftest.out"
4735 # Check that the compiler produces executables we can run. If not, either
4736 # the compiler is broken, or we cross compile.
4737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4738 printf %s "checking whether we are cross compiling... " >&6; }
4739 if test "$cross_compiling" != yes; then
4740 { { ac_try="$ac_link"
4742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4743 *) ac_try_echo=$ac_try;;
4745 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4746 printf "%s\n" "$ac_try_echo"; } >&5
4747 (eval "$ac_link") 2>&5
4749 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4750 test $ac_status = 0; }
4751 if { ac_try='./conftest$ac_cv_exeext'
4752 { { case "(($ac_try" in
4753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4754 *) ac_try_echo=$ac_try;;
4756 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4757 printf "%s\n" "$ac_try_echo"; } >&5
4758 (eval "$ac_try") 2>&5
4760 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4761 test $ac_status = 0; }; }; then
4764 if test "$cross_compiling" = maybe; then
4767 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4768 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4769 as_fn_error $? "cannot run C compiled programs.
4770 If you meant to cross compile, use \`--host'.
4771 See \`config.log' for more details" "$LINENO" 5; }
4775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4776 printf "%s\n" "$cross_compiling" >&6; }
4778 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4779 ac_clean_files=$ac_clean_files_save
4780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4781 printf %s "checking for suffix of object files... " >&6; }
4782 if ${ac_cv_objext+:} false; then :
4783 printf %s "(cached) " >&6
4785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4786 /* end confdefs.h. */
4796 rm -f conftest.o conftest.obj
4797 if { { ac_try="$ac_compile"
4799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4800 *) ac_try_echo=$ac_try;;
4802 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4803 printf "%s\n" "$ac_try_echo"; } >&5
4804 (eval "$ac_compile") 2>&5
4806 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4807 test $ac_status = 0; }; then :
4808 for ac_file in conftest.o conftest.obj conftest.*; do
4809 test -f "$ac_file" || continue;
4811 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4812 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4817 printf "%s\n" "$as_me: failed program was:" >&5
4818 sed 's/^/| /' conftest.$ac_ext >&5
4820 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4821 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4822 as_fn_error $? "cannot compute suffix of object files: cannot compile
4823 See \`config.log' for more details" "$LINENO" 5; }
4825 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4828 printf "%s\n" "$ac_cv_objext" >&6; }
4829 OBJEXT=$ac_cv_objext
4831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4832 printf %s "checking whether we are using the GNU C compiler... " >&6; }
4833 if ${ac_cv_c_compiler_gnu+:} false; then :
4834 printf %s "(cached) " >&6
4836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4837 /* end confdefs.h. */
4850 if ac_fn_c_try_compile "$LINENO"; then :
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4860 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4861 if test $ac_compiler_gnu = yes; then
4866 ac_test_CFLAGS=${CFLAGS+set}
4867 ac_save_CFLAGS=$CFLAGS
4868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4869 printf %s "checking whether $CC accepts -g... " >&6; }
4870 if ${ac_cv_prog_cc_g+:} false; then :
4871 printf %s "(cached) " >&6
4873 ac_save_c_werror_flag=$ac_c_werror_flag
4874 ac_c_werror_flag=yes
4877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4878 /* end confdefs.h. */
4888 if ac_fn_c_try_compile "$LINENO"; then :
4892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4893 /* end confdefs.h. */
4903 if ac_fn_c_try_compile "$LINENO"; then :
4906 ac_c_werror_flag=$ac_save_c_werror_flag
4908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4909 /* end confdefs.h. */
4919 if ac_fn_c_try_compile "$LINENO"; then :
4922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927 ac_c_werror_flag=$ac_save_c_werror_flag
4929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4930 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4931 if test "$ac_test_CFLAGS" = set; then
4932 CFLAGS=$ac_save_CFLAGS
4933 elif test $ac_cv_prog_cc_g = yes; then
4934 if test "$GCC" = yes; then
4940 if test "$GCC" = yes; then
4946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4947 printf %s "checking for $CC option to enable C11 features... " >&6; }
4948 if ${ac_cv_prog_cc_c11+:} false; then :
4949 printf %s "(cached) " >&6
4951 ac_cv_prog_cc_c11=no
4953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4954 /* end confdefs.h. */
4956 #include <stdbool.h>
4961 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4962 #define debug(...) fprintf (stderr, __VA_ARGS__)
4963 #define showlist(...) puts (#__VA_ARGS__)
4964 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4966 test_varargs_macros (void)
4971 debug ("X = %d\n", x);
4972 showlist (The first, second, and third items.);
4973 report (x>y, "x is %d but y is %d", x, y);
4976 // Check long long types.
4977 #define BIG64 18446744073709551615ull
4978 #define BIG32 4294967295ul
4979 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4981 your preprocessor is broken;
4985 your preprocessor is broken;
4987 static long long int bignum = -9223372036854775807LL;
4988 static unsigned long long int ubignum = BIG64;
4990 struct incomplete_array
4998 const wchar_t *name;
5002 typedef const char *ccp;
5005 test_restrict (ccp restrict text)
5007 // See if C++-style comments work.
5008 // Iterate through items via the restricted pointer.
5009 // Also check for declarations in for loops.
5010 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5015 // Check varargs and va_copy.
5017 test_varargs (const char *format, ...)
5020 va_start (args, format);
5022 va_copy (args_copy, args);
5024 const char *str = "";
5033 str = va_arg (args_copy, const char *);
5036 number = va_arg (args_copy, int);
5039 fnumber = va_arg (args_copy, double);
5048 return *str && number && fnumber;
5051 char _Alignas (double) aligned_as_double;
5052 char _Alignas (0) no_special_alignment;
5053 extern char aligned_as_int;
5054 char _Alignas (0) _Alignas (int) aligned_as_int;
5059 int_alignment = _Alignof (int),
5060 int_array_alignment = _Alignof (int[100]),
5061 char_alignment = _Alignof (char)
5063 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5066 int _Noreturn does_not_return (void) { for (;;) continue; }
5068 // Check _Static_assert.
5069 struct test_static_assert
5072 _Static_assert (sizeof (int) <= sizeof (long int),
5073 "_Static_assert does not work in struct");
5077 // Check UTF-8 literals.
5078 #define u8 syntax error!
5079 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5081 // Check duplicate typedefs.
5082 typedef long *long_ptr;
5083 typedef long int *long_ptr;
5084 typedef long_ptr long_ptr;
5086 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5090 struct { int i; int j; };
5091 struct { int k; long int l; } w;
5101 _Bool success = false;
5104 if (test_restrict ("String literal") == 0)
5106 char *restrict newvar = "Another string";
5109 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5110 test_varargs_macros ();
5112 // Check flexible array members.
5113 struct incomplete_array *ia =
5114 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5116 for (int i = 0; i < ia->datasize; ++i)
5117 ia->data[i] = i * 1.234;
5119 // Check named initializers.
5120 struct named_init ni = {
5122 .name = L"Test wide string",
5123 .average = 543.34343,
5128 int dynamic_array[ni.number];
5129 dynamic_array[ni.number - 1] = 543;
5131 // work around unused variable warnings
5132 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5133 || dynamic_array[ni.number - 1] != 543);
5137 _Static_assert (&v1.i == &v1.w.k, "Anonymous union alignment botch");
5143 for ac_arg in '' -std=gnu11
5145 CC="$ac_save_CC $ac_arg"
5146 if ac_fn_c_try_compile "$LINENO"; then :
5147 ac_cv_prog_cc_c11=$ac_arg
5149 rm -f core conftest.err conftest.$ac_objext
5150 test "x$ac_cv_prog_cc_c11" != "xno" && break
5152 rm -f conftest.$ac_ext
5157 ac_prog_cc_stdc_options=
5158 case "x$ac_cv_prog_cc_c11" in
5160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5161 printf "%s\n" "none needed" >&6; } ;;
5163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5164 printf "%s\n" "unsupported" >&6; } ;;
5166 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5167 CC=$CC$ac_prog_cc_stdc_options
5168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5169 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5171 if test "x$ac_cv_prog_cc_c11" != xno; then :
5173 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5176 printf %s "checking for $CC option to enable C99 features... " >&6; }
5177 if ${ac_cv_prog_cc_c99+:} false; then :
5178 printf %s "(cached) " >&6
5180 ac_cv_prog_cc_c99=no
5182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5183 /* end confdefs.h. */
5185 #include <stdbool.h>
5190 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5191 #define debug(...) fprintf (stderr, __VA_ARGS__)
5192 #define showlist(...) puts (#__VA_ARGS__)
5193 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5195 test_varargs_macros (void)
5200 debug ("X = %d\n", x);
5201 showlist (The first, second, and third items.);
5202 report (x>y, "x is %d but y is %d", x, y);
5205 // Check long long types.
5206 #define BIG64 18446744073709551615ull
5207 #define BIG32 4294967295ul
5208 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5210 your preprocessor is broken;
5214 your preprocessor is broken;
5216 static long long int bignum = -9223372036854775807LL;
5217 static unsigned long long int ubignum = BIG64;
5219 struct incomplete_array
5227 const wchar_t *name;
5231 typedef const char *ccp;
5234 test_restrict (ccp restrict text)
5236 // See if C++-style comments work.
5237 // Iterate through items via the restricted pointer.
5238 // Also check for declarations in for loops.
5239 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5244 // Check varargs and va_copy.
5246 test_varargs (const char *format, ...)
5249 va_start (args, format);
5251 va_copy (args_copy, args);
5253 const char *str = "";
5262 str = va_arg (args_copy, const char *);
5265 number = va_arg (args_copy, int);
5268 fnumber = va_arg (args_copy, double);
5277 return *str && number && fnumber;
5284 _Bool success = false;
5287 if (test_restrict ("String literal") == 0)
5289 char *restrict newvar = "Another string";
5292 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5293 test_varargs_macros ();
5295 // Check flexible array members.
5296 struct incomplete_array *ia =
5297 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5299 for (int i = 0; i < ia->datasize; ++i)
5300 ia->data[i] = i * 1.234;
5302 // Check named initializers.
5303 struct named_init ni = {
5305 .name = L"Test wide string",
5306 .average = 543.34343,
5311 int dynamic_array[ni.number];
5312 dynamic_array[ni.number - 1] = 543;
5314 // work around unused variable warnings
5315 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5316 || dynamic_array[ni.number - 1] != 543);
5322 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5324 CC="$ac_save_CC $ac_arg"
5325 if ac_fn_c_try_compile "$LINENO"; then :
5326 ac_cv_prog_cc_c99=$ac_arg
5328 rm -f core conftest.err conftest.$ac_objext
5329 test "x$ac_cv_prog_cc_c99" != "xno" && break
5331 rm -f conftest.$ac_ext
5336 ac_prog_cc_stdc_options=
5337 case "x$ac_cv_prog_cc_c99" in
5339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5340 printf "%s\n" "none needed" >&6; } ;;
5342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5343 printf "%s\n" "unsupported" >&6; } ;;
5345 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5346 CC=$CC$ac_prog_cc_stdc_options
5347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5348 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5350 if test "x$ac_cv_prog_cc_c99" != xno; then :
5352 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5355 printf %s "checking for $CC option to enable C89 features... " >&6; }
5356 if ${ac_cv_prog_cc_c89+:} false; then :
5357 printf %s "(cached) " >&6
5359 ac_cv_prog_cc_c89=no
5361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5362 /* end confdefs.h. */
5366 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5367 struct buf { int x; };
5368 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5369 static char *e (p, i)
5375 static char *f (char * (*g) (char **, int), char **p, ...)
5380 s = g (p, va_arg (v,int));
5385 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5386 function prototypes and stuff, but not '\xHH' hex character constants.
5387 These don't provoke an error unfortunately, instead are silently treated
5388 as 'x'. The following induces an error, until -std is added to get
5389 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5390 array size at least. It's necessary to write '\x00'==0 to get something
5391 that's true only with -std. */
5392 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5394 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5395 inside strings and character constants. */
5397 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5399 int test (int i, double x);
5400 struct s1 {int (*f) (int a);};
5401 struct s2 {int (*f) (double a);};
5402 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5408 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5413 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5414 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5416 CC="$ac_save_CC $ac_arg"
5417 if ac_fn_c_try_compile "$LINENO"; then :
5418 ac_cv_prog_cc_c89=$ac_arg
5420 rm -f core conftest.err conftest.$ac_objext
5421 test "x$ac_cv_prog_cc_c89" != "xno" && break
5423 rm -f conftest.$ac_ext
5428 ac_prog_cc_stdc_options=
5429 case "x$ac_cv_prog_cc_c89" in
5431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5432 printf "%s\n" "none needed" >&6; } ;;
5434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5435 printf "%s\n" "unsupported" >&6; } ;;
5437 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5438 CC=$CC$ac_prog_cc_stdc_options
5439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5440 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5442 if test "x$ac_cv_prog_cc_c89" != xno; then :
5444 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5447 ac_cv_prog_cc_stdc=no
5455 ac_cpp='$CPP $CPPFLAGS'
5456 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5457 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5458 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5461 ac_cpp='$CPP $CPPFLAGS'
5462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5466 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5467 if ${am_cv_prog_cc_c_o+:} false; then :
5468 printf %s "(cached) " >&6
5470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5471 /* end confdefs.h. */
5481 # Make sure it works both with $CC and with simple cc.
5482 # Following AC_PROG_CC_C_O, we do the test twice because some
5483 # compilers refuse to overwrite an existing .o file with -o,
5484 # though they will create one.
5485 am_cv_prog_cc_c_o=yes
5487 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5488 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); } \
5492 && test -f conftest2.$ac_objext; then
5495 am_cv_prog_cc_c_o=no
5499 rm -f core conftest*
5502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5503 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5504 if test "$am_cv_prog_cc_c_o" != yes; then
5505 # Losing compiler, so override with the script.
5506 # FIXME: It is wrong to rewrite CC.
5507 # But if we don't then we get into trouble of one sort or another.
5508 # A longer-term fix would be to have automake use am__CC in this case,
5509 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5510 CC="$am_aux_dir/compile $CC"
5513 ac_cpp='$CPP $CPPFLAGS'
5514 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5515 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5516 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5519 depcc="$CC" am_compiler_list=
5521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5522 printf %s "checking dependency style of $depcc... " >&6; }
5523 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5524 printf %s "(cached) " >&6
5526 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5527 # We make a subdir and do the tests there. Otherwise we can end up
5528 # making bogus files that we don't know about and never remove. For
5529 # instance it was reported that on HP-UX the gcc test will end up
5530 # making a dummy file named 'D' -- because '-MD' means "put the output
5534 # Copy depcomp to subdir because otherwise we won't find it if we're
5535 # using a relative directory.
5536 cp "$am_depcomp" conftest.dir
5538 # We will build objects and dependencies in a subdirectory because
5539 # it helps to detect inapplicable dependency modes. For instance
5540 # both Tru64's cc and ICC support -MD to output dependencies as a
5541 # side effect of compilation, but ICC will put the dependencies in
5542 # the current directory while Tru64 will put them in the object
5546 am_cv_CC_dependencies_compiler_type=none
5547 if test "$am_compiler_list" = ""; then
5548 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5551 case " $depcc " in #(
5552 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5555 for depmode in $am_compiler_list; do
5556 # Setup a source with many dependencies, because some compilers
5557 # like to wrap large dependency lists on column 80 (with \), and
5558 # we should not choose a depcomp mode which is confused by this.
5560 # We need to recreate these files for each test, as the compiler may
5561 # overwrite some of them when testing with obscure command lines.
5562 # This happens at least with the AIX C compiler.
5564 for i in 1 2 3 4 5 6; do
5565 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5566 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5567 # Solaris 10 /bin/sh.
5568 echo '/* dummy */' > sub/conftst$i.h
5570 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5572 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5573 # mode. It turns out that the SunPro C++ compiler does not properly
5574 # handle '-M -o', and we need to detect this. Also, some Intel
5575 # versions had trouble with output in subdirs.
5576 am__obj=sub/conftest.${OBJEXT-o}
5577 am__minus_obj="-o $am__obj"
5580 # This depmode causes a compiler race in universal mode.
5581 test "$am__universal" = false || continue
5584 # After this tag, mechanisms are not by side-effect, so they'll
5585 # only be used when explicitly requested.
5586 if test "x$enable_dependency_tracking" = xyes; then
5592 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5593 # This compiler won't grok '-c -o', but also, the minuso test has
5594 # not run yet. These depmodes are late enough in the game, and
5595 # so weak that their functioning should not be impacted.
5596 am__obj=conftest.${OBJEXT-o}
5601 if depmode=$depmode \
5602 source=sub/conftest.c object=$am__obj \
5603 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5604 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5605 >/dev/null 2>conftest.err &&
5606 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5607 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5608 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5609 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5610 # icc doesn't choke on unknown options, it will just issue warnings
5611 # or remarks (even with -Werror). So we grep stderr for any message
5612 # that says an option was ignored or not supported.
5613 # When given -MP, icc 7.0 and 7.1 complain thusly:
5614 # icc: Command line warning: ignoring option '-M'; no argument required
5615 # The diagnosis changed in icc 8.0:
5616 # icc: Command line remark: option '-MP' not supported
5617 if (grep 'ignoring option' conftest.err ||
5618 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5619 am_cv_CC_dependencies_compiler_type=$depmode
5628 am_cv_CC_dependencies_compiler_type=none
5632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5633 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5634 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5637 test "x$enable_dependency_tracking" != xno \
5638 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5640 am__fastdepCC_FALSE='#'
5642 am__fastdepCC_TRUE='#'
5643 am__fastdepCC_FALSE=
5650 ac_cpp='$CPP $CPPFLAGS'
5651 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5652 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5653 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5655 printf %s "checking how to run the C preprocessor... " >&6; }
5656 # On Suns, sometimes $CPP names a directory.
5657 if test -n "$CPP" && test -d "$CPP"; then
5660 if test -z "$CPP"; then
5661 if ${ac_cv_prog_CPP+:} false; then :
5662 printf %s "(cached) " >&6
5664 # Double quotes because CPP needs to be expanded
5665 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5668 for ac_c_preproc_warn_flag in '' yes
5670 # Use a header file that comes with gcc, so configuring glibc
5671 # with a fresh cross-compiler works.
5672 # On the NeXT, cc -E runs the code through the compiler's parser,
5673 # not just through cpp. "Syntax error" is here to catch this case.
5674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5675 /* end confdefs.h. */
5679 if ac_fn_c_try_cpp "$LINENO"; then :
5682 # Broken: fails on valid input.
5685 rm -f conftest.err conftest.i conftest.$ac_ext
5687 # OK, works on sane cases. Now check whether nonexistent headers
5688 # can be detected and how.
5689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5690 /* end confdefs.h. */
5691 #include <ac_nonexistent.h>
5693 if ac_fn_c_try_cpp "$LINENO"; then :
5694 # Broken: success on invalid input.
5697 # Passes both tests.
5701 rm -f conftest.err conftest.i conftest.$ac_ext
5704 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5705 rm -f conftest.i conftest.err conftest.$ac_ext
5706 if $ac_preproc_ok; then :
5718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5719 printf "%s\n" "$CPP" >&6; }
5721 for ac_c_preproc_warn_flag in '' yes
5723 # Use a header file that comes with gcc, so configuring glibc
5724 # with a fresh cross-compiler works.
5725 # On the NeXT, cc -E runs the code through the compiler's parser,
5726 # not just through cpp. "Syntax error" is here to catch this case.
5727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5728 /* end confdefs.h. */
5732 if ac_fn_c_try_cpp "$LINENO"; then :
5735 # Broken: fails on valid input.
5738 rm -f conftest.err conftest.i conftest.$ac_ext
5740 # OK, works on sane cases. Now check whether nonexistent headers
5741 # can be detected and how.
5742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5743 /* end confdefs.h. */
5744 #include <ac_nonexistent.h>
5746 if ac_fn_c_try_cpp "$LINENO"; then :
5747 # Broken: success on invalid input.
5750 # Passes both tests.
5754 rm -f conftest.err conftest.i conftest.$ac_ext
5757 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5758 rm -f conftest.i conftest.err conftest.$ac_ext
5759 if $ac_preproc_ok; then :
5762 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5763 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5764 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5765 See \`config.log' for more details" "$LINENO" 5; }
5769 ac_cpp='$CPP $CPPFLAGS'
5770 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5771 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5775 printf %s "checking for grep that handles long lines and -e... " >&6; }
5776 if ${ac_cv_path_GREP+:} false; then :
5777 printf %s "(cached) " >&6
5779 if test -z "$GREP"; then
5780 ac_path_GREP_found=false
5781 # Loop through the user's path and test for each of PROGNAME-LIST
5782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5783 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5786 case $as_dir in #(((
5789 *) as_dir=$as_dir/ ;;
5791 for ac_prog in grep ggrep; do
5792 for ac_exec_ext in '' $ac_executable_extensions; do
5793 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5794 as_fn_executable_p "$ac_path_GREP" || continue
5795 # Check for GNU ac_path_GREP and select it if it is found.
5796 # Check for GNU $ac_path_GREP
5797 case `"$ac_path_GREP" --version 2>&1` in
5799 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5802 printf %s 0123456789 >"conftest.in"
5805 cat "conftest.in" "conftest.in" >"conftest.tmp"
5806 mv "conftest.tmp" "conftest.in"
5807 cp "conftest.in" "conftest.nl"
5808 printf "%s\n" 'GREP' >> "conftest.nl"
5809 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5810 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5811 as_fn_arith $ac_count + 1 && ac_count=$as_val
5812 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5813 # Best one so far, save it but keep looking for a better one
5814 ac_cv_path_GREP="$ac_path_GREP"
5815 ac_path_GREP_max=$ac_count
5817 # 10*(2^10) chars as input seems more than enough
5818 test $ac_count -gt 10 && break
5820 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5823 $ac_path_GREP_found && break 3
5828 if test -z "$ac_cv_path_GREP"; then
5829 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5832 ac_cv_path_GREP=$GREP
5836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5837 printf "%s\n" "$ac_cv_path_GREP" >&6; }
5838 GREP="$ac_cv_path_GREP"
5841 if test -n "$ac_tool_prefix"; then
5842 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5843 set dummy ${ac_tool_prefix}nm; ac_word=$2
5844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5845 printf %s "checking for $ac_word... " >&6; }
5846 if ${ac_cv_prog_NM+:} false; then :
5847 printf %s "(cached) " >&6
5849 if test -n "$NM"; then
5850 ac_cv_prog_NM="$NM" # Let the user override the test.
5852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5856 case $as_dir in #(((
5859 *) as_dir=$as_dir/ ;;
5861 for ac_exec_ext in '' $ac_executable_extensions; do
5862 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5863 ac_cv_prog_NM="${ac_tool_prefix}nm"
5864 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5874 if test -n "$NM"; then
5875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
5876 printf "%s\n" "$NM" >&6; }
5878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879 printf "%s\n" "no" >&6; }
5884 if test -z "$ac_cv_prog_NM"; then
5886 # Extract the first word of "nm", so it can be a program name with args.
5887 set dummy nm; ac_word=$2
5888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5889 printf %s "checking for $ac_word... " >&6; }
5890 if ${ac_cv_prog_ac_ct_NM+:} false; then :
5891 printf %s "(cached) " >&6
5893 if test -n "$ac_ct_NM"; then
5894 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5900 case $as_dir in #(((
5903 *) as_dir=$as_dir/ ;;
5905 for ac_exec_ext in '' $ac_executable_extensions; do
5906 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5907 ac_cv_prog_ac_ct_NM="nm"
5908 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5917 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5918 if test -n "$ac_ct_NM"; then
5919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
5920 printf "%s\n" "$ac_ct_NM" >&6; }
5922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5923 printf "%s\n" "no" >&6; }
5926 if test "x$ac_ct_NM" = x; then
5929 case $cross_compiling:$ac_tool_warned in
5931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5932 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5933 ac_tool_warned=yes ;;
5941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5942 printf %s "checking whether ln -s works... " >&6; }
5944 if test "$LN_S" = "ln -s"; then
5945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5946 printf "%s\n" "yes" >&6; }
5948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5949 printf "%s\n" "no, using $LN_S" >&6; }
5952 if test -n "$ac_tool_prefix"; then
5953 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5954 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956 printf %s "checking for $ac_word... " >&6; }
5957 if ${ac_cv_prog_RANLIB+:} false; then :
5958 printf %s "(cached) " >&6
5960 if test -n "$RANLIB"; then
5961 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967 case $as_dir in #(((
5970 *) as_dir=$as_dir/ ;;
5972 for ac_exec_ext in '' $ac_executable_extensions; do
5973 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5974 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5975 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5984 RANLIB=$ac_cv_prog_RANLIB
5985 if test -n "$RANLIB"; then
5986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5987 printf "%s\n" "$RANLIB" >&6; }
5989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990 printf "%s\n" "no" >&6; }
5995 if test -z "$ac_cv_prog_RANLIB"; then
5996 ac_ct_RANLIB=$RANLIB
5997 # Extract the first word of "ranlib", so it can be a program name with args.
5998 set dummy ranlib; ac_word=$2
5999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000 printf %s "checking for $ac_word... " >&6; }
6001 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6002 printf %s "(cached) " >&6
6004 if test -n "$ac_ct_RANLIB"; then
6005 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6011 case $as_dir in #(((
6014 *) as_dir=$as_dir/ ;;
6016 for ac_exec_ext in '' $ac_executable_extensions; do
6017 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6018 ac_cv_prog_ac_ct_RANLIB="ranlib"
6019 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6028 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6029 if test -n "$ac_ct_RANLIB"; then
6030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6031 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6034 printf "%s\n" "no" >&6; }
6037 if test "x$ac_ct_RANLIB" = x; then
6040 case $cross_compiling:$ac_tool_warned in
6042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6043 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6044 ac_tool_warned=yes ;;
6046 RANLIB=$ac_ct_RANLIB
6049 RANLIB="$ac_cv_prog_RANLIB"
6052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
6053 printf %s "checking for a POSIX-compliant shell... " >&6; }
6054 if ${ac_cv_path_shell+:} false; then :
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
6072 if ("$SHELL" -c "$ac_command") 2>/dev/null; then
6073 ac_cv_path_shell=$SHELL
6077 case $ac_cv_path_shell in
6079 # Prefer shells that are more likely to be installed in the
6080 # same place on all hosts of this platform. Therefore, prefer
6081 # shells in /bin and /usr/bin to shells in the installer's
6082 # PATH. Also, loop through PATH first and then through
6083 # shells, since less-"nice" shells in /bin and /usr/bin are
6084 # more likely to be installed than "nicer" shells elsewhere.
6085 as_save_IFS=$IFS; IFS=:
6086 for as_dir in /bin /usr/bin $PATH
6091 for ac_base in sh bash ksh sh5; do
6093 if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
6094 ac_cv_path_shell=$as_dir/$ac_base
6098 case $ac_cv_path_shell in
6107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
6108 printf "%s\n" "$ac_cv_path_shell" >&6; }
6109 SHELL=$ac_cv_path_shell
6110 if test "$SHELL" = no; then
6112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
6113 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
6119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6120 printf %s "checking for egrep... " >&6; }
6121 if ${ac_cv_path_EGREP+:} false; then :
6122 printf %s "(cached) " >&6
6124 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6125 then ac_cv_path_EGREP="$GREP -E"
6127 if test -z "$EGREP"; then
6128 ac_path_EGREP_found=false
6129 # Loop through the user's path and test for each of PROGNAME-LIST
6130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6131 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6134 case $as_dir in #(((
6137 *) as_dir=$as_dir/ ;;
6139 for ac_prog in egrep; do
6140 for ac_exec_ext in '' $ac_executable_extensions; do
6141 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6142 as_fn_executable_p "$ac_path_EGREP" || continue
6143 # Check for GNU ac_path_EGREP and select it if it is found.
6144 # Check for GNU $ac_path_EGREP
6145 case `"$ac_path_EGREP" --version 2>&1` in
6147 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6150 printf %s 0123456789 >"conftest.in"
6153 cat "conftest.in" "conftest.in" >"conftest.tmp"
6154 mv "conftest.tmp" "conftest.in"
6155 cp "conftest.in" "conftest.nl"
6156 printf "%s\n" 'EGREP' >> "conftest.nl"
6157 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6158 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6159 as_fn_arith $ac_count + 1 && ac_count=$as_val
6160 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6161 # Best one so far, save it but keep looking for a better one
6162 ac_cv_path_EGREP="$ac_path_EGREP"
6163 ac_path_EGREP_max=$ac_count
6165 # 10*(2^10) chars as input seems more than enough
6166 test $ac_count -gt 10 && break
6168 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6171 $ac_path_EGREP_found && break 3
6176 if test -z "$ac_cv_path_EGREP"; then
6177 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6180 ac_cv_path_EGREP=$EGREP
6185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6186 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6187 EGREP="$ac_cv_path_EGREP"
6192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6193 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6194 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6195 printf %s "(cached) " >&6
6198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6199 /* end confdefs.h. */
6206 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6207 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6208 gl_cv_c_amsterdam_compiler=yes
6210 gl_cv_c_amsterdam_compiler=no
6216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6217 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6218 if test -z "$AR"; then
6219 if test $gl_cv_c_amsterdam_compiler = yes; then
6221 if test -z "$ARFLAGS"; then
6225 if test -n "$ac_tool_prefix"; then
6226 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6227 set dummy ${ac_tool_prefix}ar; ac_word=$2
6228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6229 printf %s "checking for $ac_word... " >&6; }
6230 if ${ac_cv_prog_AR+:} false; then :
6231 printf %s "(cached) " >&6
6233 if test -n "$AR"; then
6234 ac_cv_prog_AR="$AR" # Let the user override the test.
6236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240 case $as_dir in #(((
6243 *) as_dir=$as_dir/ ;;
6245 for ac_exec_ext in '' $ac_executable_extensions; do
6246 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6247 ac_cv_prog_AR="${ac_tool_prefix}ar"
6248 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6258 if test -n "$AR"; then
6259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6260 printf "%s\n" "$AR" >&6; }
6262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263 printf "%s\n" "no" >&6; }
6268 if test -z "$ac_cv_prog_AR"; then
6270 # Extract the first word of "ar", so it can be a program name with args.
6271 set dummy ar; ac_word=$2
6272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6273 printf %s "checking for $ac_word... " >&6; }
6274 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6275 printf %s "(cached) " >&6
6277 if test -n "$ac_ct_AR"; then
6278 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6284 case $as_dir in #(((
6287 *) as_dir=$as_dir/ ;;
6289 for ac_exec_ext in '' $ac_executable_extensions; do
6290 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6291 ac_cv_prog_ac_ct_AR="ar"
6292 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6301 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6302 if test -n "$ac_ct_AR"; then
6303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6304 printf "%s\n" "$ac_ct_AR" >&6; }
6306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6307 printf "%s\n" "no" >&6; }
6310 if test "x$ac_ct_AR" = x; then
6313 case $cross_compiling:$ac_tool_warned in
6315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6316 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6317 ac_tool_warned=yes ;;
6325 if test -z "$ARFLAGS"; then
6330 if test -z "$ARFLAGS"; then
6336 if test -z "$RANLIB"; then
6337 if test $gl_cv_c_amsterdam_compiler = yes; then
6340 if test -n "$ac_tool_prefix"; then
6341 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6342 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6344 printf %s "checking for $ac_word... " >&6; }
6345 if ${ac_cv_prog_RANLIB+:} false; then :
6346 printf %s "(cached) " >&6
6348 if test -n "$RANLIB"; then
6349 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355 case $as_dir in #(((
6358 *) as_dir=$as_dir/ ;;
6360 for ac_exec_ext in '' $ac_executable_extensions; do
6361 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6362 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6363 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6372 RANLIB=$ac_cv_prog_RANLIB
6373 if test -n "$RANLIB"; then
6374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6375 printf "%s\n" "$RANLIB" >&6; }
6377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378 printf "%s\n" "no" >&6; }
6383 if test -z "$ac_cv_prog_RANLIB"; then
6384 ac_ct_RANLIB=$RANLIB
6385 # Extract the first word of "ranlib", so it can be a program name with args.
6386 set dummy ranlib; ac_word=$2
6387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6388 printf %s "checking for $ac_word... " >&6; }
6389 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6390 printf %s "(cached) " >&6
6392 if test -n "$ac_ct_RANLIB"; then
6393 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399 case $as_dir in #(((
6402 *) as_dir=$as_dir/ ;;
6404 for ac_exec_ext in '' $ac_executable_extensions; do
6405 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6406 ac_cv_prog_ac_ct_RANLIB="ranlib"
6407 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6416 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6417 if test -n "$ac_ct_RANLIB"; then
6418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6419 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422 printf "%s\n" "no" >&6; }
6425 if test "x$ac_ct_RANLIB" = x; then
6428 case $cross_compiling:$ac_tool_warned in
6430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6431 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6432 ac_tool_warned=yes ;;
6434 RANLIB=$ac_ct_RANLIB
6437 RANLIB="$ac_cv_prog_RANLIB"
6444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6445 printf %s "checking for ANSI C header files... " >&6; }
6446 if ${ac_cv_header_stdc+:} false; then :
6447 printf %s "(cached) " >&6
6449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6450 /* end confdefs.h. */
6464 if ac_fn_c_try_compile "$LINENO"; then :
6465 ac_cv_header_stdc=yes
6467 ac_cv_header_stdc=no
6469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6471 if test $ac_cv_header_stdc = yes; then
6472 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6474 /* end confdefs.h. */
6478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6479 $EGREP "memchr" >/dev/null 2>&1; then :
6482 ac_cv_header_stdc=no
6488 if test $ac_cv_header_stdc = yes; then
6489 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6491 /* end confdefs.h. */
6495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6496 $EGREP "free" >/dev/null 2>&1; then :
6499 ac_cv_header_stdc=no
6505 if test $ac_cv_header_stdc = yes; then
6506 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6507 if test "$cross_compiling" = yes; then :
6510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6511 /* end confdefs.h. */
6514 #if ((' ' & 0x0FF) == 0x020)
6515 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6516 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6518 # define ISLOWER(c) \
6519 (('a' <= (c) && (c) <= 'i') \
6520 || ('j' <= (c) && (c) <= 'r') \
6521 || ('s' <= (c) && (c) <= 'z'))
6522 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6525 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6530 for (i = 0; i < 256; i++)
6531 if (XOR (islower (i), ISLOWER (i))
6532 || toupper (i) != TOUPPER (i))
6537 if ac_fn_c_try_run "$LINENO"; then :
6540 ac_cv_header_stdc=no
6542 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6543 conftest.$ac_objext conftest.beam conftest.$ac_ext
6548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6549 printf "%s\n" "$ac_cv_header_stdc" >&6; }
6550 if test $ac_cv_header_stdc = yes; then
6552 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6556 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6557 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6558 inttypes.h stdint.h unistd.h
6560 as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
6561 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6563 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6564 cat >>confdefs.h <<_ACEOF
6565 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
6574 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6575 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6582 if test "$MINIX" = yes; then
6584 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6587 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6590 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6593 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6599 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6600 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6601 printf %s "(cached) " >&6
6603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6604 /* end confdefs.h. */
6606 # define __EXTENSIONS__ 1
6607 $ac_includes_default
6616 if ac_fn_c_try_compile "$LINENO"; then :
6617 ac_cv_safe_to_define___extensions__=yes
6619 ac_cv_safe_to_define___extensions__=no
6621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6624 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6625 test $ac_cv_safe_to_define___extensions__ = yes &&
6626 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6628 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6630 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6632 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6634 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6636 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6639 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6640 if ${ac_cv_should_define__xopen_source+:} false; then :
6641 printf %s "(cached) " >&6
6643 ac_cv_should_define__xopen_source=no
6644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6645 /* end confdefs.h. */
6657 if ac_fn_c_try_compile "$LINENO"; then :
6660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6661 /* end confdefs.h. */
6663 #define _XOPEN_SOURCE 500
6674 if ac_fn_c_try_compile "$LINENO"; then :
6675 ac_cv_should_define__xopen_source=yes
6677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6682 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6683 test $ac_cv_should_define__xopen_source = yes &&
6684 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6694 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6695 if ${ac_cv_sys_largefile_source+:} false; then :
6696 printf %s "(cached) " >&6
6699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6700 /* end confdefs.h. */
6701 #include <sys/types.h> /* for off_t */
6706 int (*fp) (FILE *, off_t, int) = fseeko;
6707 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6712 if ac_fn_c_try_link "$LINENO"; then :
6713 ac_cv_sys_largefile_source=no; break
6715 rm -f core conftest.err conftest.$ac_objext \
6716 conftest$ac_exeext conftest.$ac_ext
6717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h. */
6719 #define _LARGEFILE_SOURCE 1
6720 #include <sys/types.h> /* for off_t */
6725 int (*fp) (FILE *, off_t, int) = fseeko;
6726 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6731 if ac_fn_c_try_link "$LINENO"; then :
6732 ac_cv_sys_largefile_source=1; break
6734 rm -f core conftest.err conftest.$ac_objext \
6735 conftest$ac_exeext conftest.$ac_ext
6736 ac_cv_sys_largefile_source=unknown
6740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6741 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
6742 case $ac_cv_sys_largefile_source in #(
6745 cat >>confdefs.h <<_ACEOF
6746 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6752 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6753 # in glibc 2.1.3, but that breaks too many other things.
6754 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6755 if test $ac_cv_sys_largefile_source != unknown; then
6757 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
6761 # Make sure we can run config.sub.
6762 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6763 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6766 printf %s "checking build system type... " >&6; }
6767 if ${ac_cv_build+:} false; then :
6768 printf %s "(cached) " >&6
6770 ac_build_alias=$build_alias
6771 test "x$ac_build_alias" = x &&
6772 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6773 test "x$ac_build_alias" = x &&
6774 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6775 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6776 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6780 printf "%s\n" "$ac_cv_build" >&6; }
6781 case $ac_cv_build in
6783 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6786 ac_save_IFS=$IFS; IFS='-'
6792 # Remember, the first character of IFS is used to create $*,
6793 # except with old shells:
6796 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6800 printf %s "checking host system type... " >&6; }
6801 if ${ac_cv_host+:} false; then :
6802 printf %s "(cached) " >&6
6804 if test "x$host_alias" = x; then
6805 ac_cv_host=$ac_cv_build
6807 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6808 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6813 printf "%s\n" "$ac_cv_host" >&6; }
6816 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6819 ac_save_IFS=$IFS; IFS='-'
6825 # Remember, the first character of IFS is used to create $*,
6826 # except with old shells:
6829 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6835 # IEEE behaviour is the default on all CPUs except Alpha and SH
6836 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6837 # and the GCC 4.1.2 manual).
6840 # On Alpha systems, a compiler option provides the behaviour.
6841 # See the ieee(3) manual page, also available at
6842 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6843 if test -n "$GCC"; then
6844 # GCC has the option -mieee.
6845 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6846 CPPFLAGS="$CPPFLAGS -mieee"
6848 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6849 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6850 CPPFLAGS="$CPPFLAGS -ieee"
6854 if test -n "$GCC"; then
6855 # GCC has the option -mieee.
6856 CPPFLAGS="$CPPFLAGS -mieee"
6861 # Check whether --enable-largefile was given.
6862 if test "${enable_largefile+set}" = set; then :
6863 enableval=$enable_largefile;
6866 if test "$enable_largefile" != no; then
6868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6869 printf %s "checking for special C compiler options needed for large files... " >&6; }
6870 if ${ac_cv_sys_largefile_CC+:} false; then :
6871 printf %s "(cached) " >&6
6873 ac_cv_sys_largefile_CC=no
6874 if test "$GCC" != yes; then
6877 # IRIX 6.2 and later do not support large files by default,
6878 # so use the C compiler's -n32 option if that helps.
6879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6880 /* end confdefs.h. */
6881 #include <sys/types.h>
6882 /* Check that off_t can represent 2**63 - 1 correctly.
6883 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6884 since some C++ compilers masquerading as C compilers
6885 incorrectly reject 9223372036854775807. */
6886 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6887 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6888 && LARGE_OFF_T % 2147483647 == 1)
6898 if ac_fn_c_try_compile "$LINENO"; then :
6901 rm -f core conftest.err conftest.$ac_objext
6903 if ac_fn_c_try_compile "$LINENO"; then :
6904 ac_cv_sys_largefile_CC=' -n32'; break
6906 rm -f core conftest.err conftest.$ac_objext
6910 rm -f conftest.$ac_ext
6913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6914 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
6915 if test "$ac_cv_sys_largefile_CC" != no; then
6916 CC=$CC$ac_cv_sys_largefile_CC
6919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6920 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6921 if ${ac_cv_sys_file_offset_bits+:} false; then :
6922 printf %s "(cached) " >&6
6925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6926 /* end confdefs.h. */
6927 #include <sys/types.h>
6928 /* Check that off_t can represent 2**63 - 1 correctly.
6929 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6930 since some C++ compilers masquerading as C compilers
6931 incorrectly reject 9223372036854775807. */
6932 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6933 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6934 && LARGE_OFF_T % 2147483647 == 1)
6944 if ac_fn_c_try_compile "$LINENO"; then :
6945 ac_cv_sys_file_offset_bits=no; break
6947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949 /* end confdefs.h. */
6950 #define _FILE_OFFSET_BITS 64
6951 #include <sys/types.h>
6952 /* Check that off_t can represent 2**63 - 1 correctly.
6953 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6954 since some C++ compilers masquerading as C compilers
6955 incorrectly reject 9223372036854775807. */
6956 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6957 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6958 && LARGE_OFF_T % 2147483647 == 1)
6968 if ac_fn_c_try_compile "$LINENO"; then :
6969 ac_cv_sys_file_offset_bits=64; break
6971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6972 ac_cv_sys_file_offset_bits=unknown
6976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6977 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
6978 case $ac_cv_sys_file_offset_bits in #(
6981 cat >>confdefs.h <<_ACEOF
6982 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6987 if test $ac_cv_sys_file_offset_bits = unknown; then
6988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6989 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
6990 if ${ac_cv_sys_large_files+:} false; then :
6991 printf %s "(cached) " >&6
6994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6995 /* end confdefs.h. */
6996 #include <sys/types.h>
6997 /* Check that off_t can represent 2**63 - 1 correctly.
6998 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6999 since some C++ compilers masquerading as C compilers
7000 incorrectly reject 9223372036854775807. */
7001 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7002 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7003 && LARGE_OFF_T % 2147483647 == 1)
7013 if ac_fn_c_try_compile "$LINENO"; then :
7014 ac_cv_sys_large_files=no; break
7016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018 /* end confdefs.h. */
7019 #define _LARGE_FILES 1
7020 #include <sys/types.h>
7021 /* Check that off_t can represent 2**63 - 1 correctly.
7022 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7023 since some C++ compilers masquerading as C compilers
7024 incorrectly reject 9223372036854775807. */
7025 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7026 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7027 && LARGE_OFF_T % 2147483647 == 1)
7037 if ac_fn_c_try_compile "$LINENO"; then :
7038 ac_cv_sys_large_files=1; break
7040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7041 ac_cv_sys_large_files=unknown
7045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7046 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7047 case $ac_cv_sys_large_files in #(
7050 cat >>confdefs.h <<_ACEOF
7051 #define _LARGE_FILES $ac_cv_sys_large_files
7059 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7068 # Check whether --enable-threads was given.
7069 if test "${enable_threads+set}" = set; then :
7070 enableval=$enable_threads; gl_use_threads=$enableval
7072 if test -n "$gl_use_threads_default"; then
7073 gl_use_threads="$gl_use_threads_default"
7076 osf*) gl_use_threads=no ;;
7079 1.[0-5].*) gl_use_threads=no ;;
7080 *) gl_use_threads=yes ;;
7083 *) gl_use_threads=yes ;;
7089 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7090 # For using <pthread.h>:
7093 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7094 # groks <pthread.h>. cc also understands the flag -pthread, but
7095 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7096 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7097 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7098 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7099 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7102 # Some systems optimize for single-threaded programs by default, and
7103 # need special flags to disable these optimizations. For example, the
7104 # definition of 'errno' in <errno.h>.
7106 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7107 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7114 # Code from module alloca-opt:
7115 # Code from module announce-gen:
7116 # Code from module at-internal:
7117 # Code from module c-ctype:
7118 # Code from module c-strcase:
7119 # Code from module c-strcaseeq:
7120 # Code from module calloc:
7121 # Code from module calloc-gnu:
7122 # Code from module calloc-posix:
7123 # Code from module chdir:
7124 # Code from module chdir-long:
7125 # Code from module clock-time:
7126 # Code from module cloexec:
7127 # Code from module close:
7128 # Code from module close-stream:
7129 # Code from module closedir:
7130 # Code from module closein:
7131 # Code from module closeout:
7132 # Code from module configmake:
7133 # Code from module dirent:
7134 # Code from module dirent-safer:
7135 # Code from module dirfd:
7136 # Code from module dirname-lgpl:
7137 # Code from module do-release-commit-and-tag:
7138 # Code from module dosname:
7139 # Code from module double-slash-root:
7140 # Code from module dup:
7141 # Code from module dup2:
7142 # Code from module errno:
7143 # Code from module error:
7144 # Code from module exitfail:
7145 # Code from module extensions:
7147 # Code from module extern-inline:
7148 # Code from module fchdir:
7149 # Code from module fclose:
7150 # Code from module fcntl:
7151 # Code from module fcntl-h:
7152 # Code from module fcntl-safer:
7153 # Code from module fd-hook:
7154 # Code from module fdl:
7155 # Code from module fdopendir:
7156 # Code from module fflush:
7158 # Code from module filename:
7159 # Code from module filenamecat-lgpl:
7160 # Code from module float:
7161 # Code from module fpending:
7162 # Code from module fpieee:
7164 # Code from module fprintf-posix:
7165 # Code from module fpucw:
7166 # Code from module fpurge:
7167 # Code from module freadahead:
7168 # Code from module freading:
7169 # Code from module frexp-nolibm:
7170 # Code from module frexpl-nolibm:
7171 # Code from module fseek:
7172 # Code from module fseeko:
7174 # Code from module fseterr:
7175 # Code from module fstat:
7176 # Code from module ftell:
7177 # Code from module ftello:
7179 # Code from module gendocs:
7180 # Code from module getcwd-lgpl:
7181 # Code from module getdtablesize:
7182 # Code from module getopt-gnu:
7183 # Code from module getopt-posix:
7184 # Code from module gettext-h:
7185 # Code from module gettime:
7186 # Code from module gettimeofday:
7187 # Code from module git-version-gen:
7188 # Code from module gitlog-to-changelog:
7189 # Code from module gnu-make:
7190 # Code from module gnu-web-doc-update:
7191 # Code from module gnumakefile:
7192 # Code from module gnupload:
7193 # Code from module havelib:
7194 # Code from module ignore-value:
7195 # Code from module include_next:
7196 # Code from module intprops:
7197 # Code from module isnand-nolibm:
7198 # Code from module isnanf-nolibm:
7199 # Code from module isnanl-nolibm:
7200 # Code from module largefile:
7202 # Code from module lib-ignore:
7203 # Code from module localcharset:
7204 # Code from module lock:
7205 # Code from module lseek:
7206 # Code from module lstat:
7207 # Code from module maintainer-makefile:
7208 # Code from module malloc-gnu:
7209 # Code from module malloc-posix:
7210 # Code from module manywarnings:
7211 # Code from module math:
7212 # Code from module mbrtowc:
7213 # Code from module mbsinit:
7214 # Code from module memchr:
7215 # Code from module mempcpy:
7216 # Code from module memrchr:
7217 # Code from module msvc-inval:
7218 # Code from module msvc-nothrow:
7219 # Code from module multiarch:
7220 # Code from module nocrash:
7221 # Code from module open:
7222 # Code from module openat:
7223 # Code from module openat-die:
7224 # Code from module openat-h:
7225 # Code from module opendir:
7226 # Code from module pathmax:
7227 # Code from module perror:
7228 # Code from module printf-frexp:
7229 # Code from module printf-frexpl:
7230 # Code from module printf-posix:
7231 # Code from module printf-safe:
7232 # Code from module quotearg:
7233 # Code from module quotearg-simple:
7234 # Code from module readdir:
7235 # Code from module readme-release:
7236 # Code from module realloc-gnu:
7237 # Code from module realloc-posix:
7238 # Code from module save-cwd:
7239 # Code from module savedir:
7240 # Code from module signbit:
7241 # Code from module size_max:
7242 # Code from module snippet/_Noreturn:
7243 # Code from module snippet/arg-nonnull:
7244 # Code from module snippet/c++defs:
7245 # Code from module snippet/unused-parameter:
7246 # Code from module snippet/warn-on-use:
7247 # Code from module ssize_t:
7248 # Code from module stat:
7249 # Code from module stat-time:
7250 # Code from module stdbool:
7251 # Code from module stddef:
7252 # Code from module stdint:
7253 # Code from module stdio:
7254 # Code from module stdlib:
7255 # Code from module strdup-posix:
7256 # Code from module streq:
7257 # Code from module strerror:
7258 # Code from module strerror-override:
7259 # Code from module strerror_r-posix:
7260 # Code from module string:
7261 # Code from module sys_stat:
7262 # Code from module sys_time:
7263 # Code from module sys_types:
7264 # Code from module threadlib:
7268 # Code from module time:
7269 # Code from module timespec:
7270 # Code from module unistd:
7271 # Code from module unistd-safer:
7272 # Code from module update-copyright:
7273 # Code from module useless-if-before-free:
7274 # Code from module utimens:
7275 # Code from module vasnprintf:
7276 # Code from module vc-list-files:
7277 # Code from module verify:
7278 # Code from module vfprintf-posix:
7279 # Code from module warnings:
7280 # Code from module wchar:
7281 # Code from module wctype-h:
7282 # Code from module xalloc:
7283 # Code from module xalloc-die:
7284 # Code from module xalloc-oversized:
7285 # Code from module xsize:
7286 # Code from module yesno:
7294 LIBC_FATAL_STDERR_=1
7295 export LIBC_FATAL_STDERR_
7297 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7298 if test "x$ac_cv_type_size_t" = xyes; then :
7302 cat >>confdefs.h <<_ACEOF
7303 #define size_t unsigned int
7308 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7309 # for constant arguments. Useless!
7310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7311 printf %s "checking for working alloca.h... " >&6; }
7312 if ${ac_cv_working_alloca_h+:} false; then :
7313 printf %s "(cached) " >&6
7315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7316 /* end confdefs.h. */
7321 char *p = (char *) alloca (2 * sizeof (int));
7327 if ac_fn_c_try_link "$LINENO"; then :
7328 ac_cv_working_alloca_h=yes
7330 ac_cv_working_alloca_h=no
7332 rm -f core conftest.err conftest.$ac_objext \
7333 conftest$ac_exeext conftest.$ac_ext
7335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7336 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7337 if test $ac_cv_working_alloca_h = yes; then
7339 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7344 printf %s "checking for alloca... " >&6; }
7345 if ${ac_cv_func_alloca_works+:} false; then :
7346 printf %s "(cached) " >&6
7348 if test $ac_cv_working_alloca_h = yes; then
7349 ac_cv_func_alloca_works=yes
7351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7352 /* end confdefs.h. */
7353 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
7354 # include <stdlib.h>
7359 # define alloca __builtin_alloca
7360 # elif defined _MSC_VER
7361 # include <malloc.h>
7362 # define alloca _alloca
7367 void *alloca (size_t);
7374 char *p = (char *) alloca (1);
7380 if ac_fn_c_try_link "$LINENO"; then :
7381 ac_cv_func_alloca_works=yes
7383 ac_cv_func_alloca_works=no
7385 rm -f core conftest.err conftest.$ac_objext \
7386 conftest$ac_exeext conftest.$ac_ext
7388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7389 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7392 if test $ac_cv_func_alloca_works = yes; then
7394 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7397 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7398 # that cause trouble. Some versions do not even contain alloca or
7399 # contain a buggy version. If you still want to use their alloca,
7400 # use ar to extract alloca.o from them instead of compiling alloca.c.
7406 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7408 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7412 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7413 if ${ac_cv_os_cray+:} false; then :
7414 printf %s "(cached) " >&6
7416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417 /* end confdefs.h. */
7418 #if defined CRAY && ! defined CRAY2
7425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7426 $EGREP "webecray" >/dev/null 2>&1; then :
7434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7435 printf "%s\n" "$ac_cv_os_cray" >&6; }
7436 if test $ac_cv_os_cray = yes; then
7437 for ac_func in _getb67 GETB67 getb67; do
7438 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7439 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7440 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7442 cat >>confdefs.h <<_ACEOF
7443 #define CRAY_STACKSEG_END $ac_func
7452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7453 printf %s "checking stack direction for C alloca... " >&6; }
7454 if ${ac_cv_c_stack_direction+:} false; then :
7455 printf %s "(cached) " >&6
7457 if test "$cross_compiling" = yes; then :
7458 ac_cv_c_stack_direction=0
7460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7461 /* end confdefs.h. */
7462 $ac_includes_default
7464 find_stack_direction (int *addr, int depth)
7469 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7470 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7475 main (int argc, char **argv)
7477 return find_stack_direction (0, argc + !argv + 20) < 0;
7480 if ac_fn_c_try_run "$LINENO"; then :
7481 ac_cv_c_stack_direction=1
7483 ac_cv_c_stack_direction=-1
7485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7486 conftest.$ac_objext conftest.beam conftest.$ac_ext
7490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7491 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7492 cat >>confdefs.h <<_ACEOF
7493 #define STACK_DIRECTION $ac_cv_c_stack_direction
7502 GNULIB_CALLOC_POSIX=0;
7503 GNULIB_CANONICALIZE_FILE_NAME=0;
7504 GNULIB_GETLOADAVG=0;
7507 GNULIB_MALLOC_POSIX=0;
7514 GNULIB_POSIX_OPENPT=0;
7520 GNULIB_REALLOC_POSIX=0;
7523 GNULIB_SECURE_GETENV=0;
7528 GNULIB_SYSTEM_POSIX=0;
7534 HAVE_CANONICALIZE_FILE_NAME=1;
7535 HAVE_DECL_GETLOADAVG=1;
7543 HAVE_POSIX_OPENPT=1;
7551 HAVE_SECURE_GETENV=1;
7557 HAVE_STRUCT_RANDOM_DATA=1;
7558 HAVE_SYS_LOADAVG_H=0;
7560 HAVE_DECL_UNSETENV=1;
7562 REPLACE_CANONICALIZE_FILE_NAME=0;
7567 REPLACE_PTSNAME_R=0;
7578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7579 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7580 if ${gl_cv_func_malloc_posix+:} false; then :
7581 printf %s "(cached) " >&6
7584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7585 /* end confdefs.h. */
7590 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7598 if ac_fn_c_try_compile "$LINENO"; then :
7599 gl_cv_func_malloc_posix=yes
7601 gl_cv_func_malloc_posix=no
7603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7607 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
7617 GNULIB_EUIDACCESS=0;
7625 GNULIB_GETDOMAINNAME=0;
7626 GNULIB_GETDTABLESIZE=0;
7628 GNULIB_GETHOSTNAME=0;
7630 GNULIB_GETLOGIN_R=0;
7631 GNULIB_GETPAGESIZE=0;
7632 GNULIB_GETUSERSHELL=0;
7633 GNULIB_GROUP_MEMBER=0;
7645 GNULIB_READLINKAT=0;
7647 GNULIB_SETHOSTNAME=0;
7652 GNULIB_UNISTD_H_NONBLOCKING=0;
7653 GNULIB_UNISTD_H_SIGPIPE=0;
7668 HAVE_GETDTABLESIZE=1;
7673 HAVE_GROUP_MEMBER=1;
7689 HAVE_DECL_ENVIRON=1;
7691 HAVE_DECL_FDATASYNC=1;
7692 HAVE_DECL_GETDOMAINNAME=1;
7693 HAVE_DECL_GETLOGIN_R=1;
7694 HAVE_DECL_GETPAGESIZE=1;
7695 HAVE_DECL_GETUSERSHELL=1;
7696 HAVE_DECL_SETHOSTNAME=1;
7697 HAVE_DECL_TTYNAME_R=1;
7705 REPLACE_FTRUNCATE=0;
7707 REPLACE_GETDOMAINNAME=0;
7708 REPLACE_GETLOGIN_R=0;
7709 REPLACE_GETGROUPS=0;
7710 REPLACE_GETPAGESIZE=0;
7723 REPLACE_TTYNAME_R=0;
7728 UNISTD_H_HAVE_WINSOCK2_H=0;
7729 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7735 for ac_header in $ac_header_list
7737 as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
7738 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7740 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7741 cat >>confdefs.h <<_ACEOF
7742 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
7759 for ac_func in $ac_func_list
7761 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7762 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7763 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7764 cat >>confdefs.h <<_ACEOF
7765 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
7775 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7776 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7778 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7781 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7803 HAVE_DECL_FDOPENDIR=1;
7810 REPLACE_FDOPENDIR=0;
7814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7815 printf %s "checking whether the preprocessor supports include_next... " >&6; }
7816 if ${gl_cv_have_include_next+:} false; then :
7817 printf %s "(cached) " >&6
7819 rm -rf conftestd1a conftestd1b conftestd2
7820 mkdir conftestd1a conftestd1b conftestd2
7821 cat <<EOF > conftestd1a/conftest.h
7822 #define DEFINED_IN_CONFTESTD1
7823 #include_next <conftest.h>
7824 #ifdef DEFINED_IN_CONFTESTD2
7827 #error "include_next doesn't work"
7830 cat <<EOF > conftestd1b/conftest.h
7831 #define DEFINED_IN_CONFTESTD1
7833 #include_next <conftest.h>
7834 #ifdef DEFINED_IN_CONFTESTD2
7837 #error "include_next doesn't work"
7840 cat <<EOF > conftestd2/conftest.h
7841 #ifndef DEFINED_IN_CONFTESTD1
7842 #error "include_next test doesn't work"
7844 #define DEFINED_IN_CONFTESTD2
7846 gl_save_CPPFLAGS="$CPPFLAGS"
7847 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849 /* end confdefs.h. */
7850 #include <conftest.h>
7852 if ac_fn_c_try_compile "$LINENO"; then :
7853 gl_cv_have_include_next=yes
7855 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7857 /* end confdefs.h. */
7858 #include <conftest.h>
7860 if ac_fn_c_try_compile "$LINENO"; then :
7861 gl_cv_have_include_next=buggy
7863 gl_cv_have_include_next=no
7865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7869 CPPFLAGS="$gl_save_CPPFLAGS"
7870 rm -rf conftestd1a conftestd1b conftestd2
7873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7874 printf "%s\n" "$gl_cv_have_include_next" >&6; }
7875 PRAGMA_SYSTEM_HEADER=
7876 if test $gl_cv_have_include_next = yes; then
7877 INCLUDE_NEXT=include_next
7878 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7879 if test -n "$GCC"; then
7880 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7883 if test $gl_cv_have_include_next = buggy; then
7884 INCLUDE_NEXT=include
7885 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7887 INCLUDE_NEXT=include
7888 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7895 printf %s "checking whether system header files limit the line length... " >&6; }
7896 if ${gl_cv_pragma_columns+:} false; then :
7897 printf %s "(cached) " >&6
7899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7900 /* end confdefs.h. */
7907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7908 $EGREP "choke me" >/dev/null 2>&1; then :
7909 gl_cv_pragma_columns=yes
7911 gl_cv_pragma_columns=no
7917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7918 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
7919 if test $gl_cv_pragma_columns = yes; then
7920 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7933 printf %s "checking whether // is distinct from /... " >&6; }
7934 if ${gl_cv_double_slash_root+:} false; then :
7935 printf %s "(cached) " >&6
7937 if test x"$cross_compiling" = xyes ; then
7938 # When cross-compiling, there is no way to tell whether // is special
7939 # short of a list of hosts. However, the only known hosts to date
7940 # that have a distinct // are Apollo DomainOS (too old to port to),
7941 # Cygwin, and z/OS. If anyone knows of another system for which // has
7942 # special semantics and is distinct from /, please report it to
7943 # <bug-gnulib@gnu.org>.
7945 *-cygwin | i370-ibm-openedition)
7946 gl_cv_double_slash_root=yes ;;
7948 # Be optimistic and assume that / and // are the same when we
7950 gl_cv_double_slash_root='unknown, assuming no' ;;
7953 set x `ls -di / // 2>/dev/null`
7954 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7955 gl_cv_double_slash_root=no
7957 gl_cv_double_slash_root=yes
7961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7962 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
7963 if test "$gl_cv_double_slash_root" = yes; then
7965 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7972 printf %s "checking for complete errno.h... " >&6; }
7973 if ${gl_cv_header_errno_h_complete+:} false; then :
7974 printf %s "(cached) " >&6
7977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7978 /* end confdefs.h. */
7981 #if !defined ETXTBSY
7990 #if !defined ENOLINK
7996 #if !defined EMULTIHOP
7999 #if !defined EBADMSG
8002 #if !defined EOVERFLOW
8005 #if !defined ENOTSUP
8008 #if !defined ENETRESET
8011 #if !defined ECONNABORTED
8020 #if !defined ECANCELED
8023 #if !defined EOWNERDEAD
8026 #if !defined ENOTRECOVERABLE
8034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8035 $EGREP "booboo" >/dev/null 2>&1; then :
8036 gl_cv_header_errno_h_complete=no
8038 gl_cv_header_errno_h_complete=yes
8044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8045 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
8046 if test $gl_cv_header_errno_h_complete = yes; then
8057 if test $gl_cv_have_include_next = yes; then
8058 gl_cv_next_errno_h='<'errno.h'>'
8060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8061 printf %s "checking absolute name of <errno.h>... " >&6; }
8062 if ${gl_cv_next_errno_h+:} false; then :
8063 printf %s "(cached) " >&6
8066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8067 /* end confdefs.h. */
8072 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8073 *) gl_absname_cpp="$ac_cpp" ;;
8078 gl_dirsep_regex='[/\\]'
8081 gl_dirsep_regex='\/'
8084 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8086 gl_header_literal_regex=`echo 'errno.h' \
8087 | sed -e "$gl_make_literal_regex_sed"`
8088 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8089 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8094 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8095 sed -n "$gl_absolute_header_sed"`'"'
8099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8100 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
8102 NEXT_ERRNO_H=$gl_cv_next_errno_h
8104 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8105 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8106 gl_next_as_first_directive='<'errno.h'>'
8108 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8109 gl_next_as_first_directive=$gl_cv_next_errno_h
8111 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8119 if test -n "$ERRNO_H"; then
8120 GL_GENERATE_ERRNO_H_TRUE=
8121 GL_GENERATE_ERRNO_H_FALSE='#'
8123 GL_GENERATE_ERRNO_H_TRUE='#'
8124 GL_GENERATE_ERRNO_H_FALSE=
8128 if test -n "$ERRNO_H"; then
8129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8130 printf %s "checking for EMULTIHOP value... " >&6; }
8131 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8132 printf %s "(cached) " >&6
8135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8136 /* end confdefs.h. */
8144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8145 $EGREP "yes" >/dev/null 2>&1; then :
8146 gl_cv_header_errno_h_EMULTIHOP=yes
8148 gl_cv_header_errno_h_EMULTIHOP=no
8152 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8154 /* end confdefs.h. */
8156 #define _XOPEN_SOURCE_EXTENDED 1
8163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8164 $EGREP "yes" >/dev/null 2>&1; then :
8165 gl_cv_header_errno_h_EMULTIHOP=hidden
8169 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8170 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8171 #define _XOPEN_SOURCE_EXTENDED 1
8173 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8185 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8186 case $gl_cv_header_errno_h_EMULTIHOP in
8188 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8191 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8199 if test -n "$ERRNO_H"; then
8200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8201 printf %s "checking for ENOLINK value... " >&6; }
8202 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8203 printf %s "(cached) " >&6
8206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8207 /* end confdefs.h. */
8215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8216 $EGREP "yes" >/dev/null 2>&1; then :
8217 gl_cv_header_errno_h_ENOLINK=yes
8219 gl_cv_header_errno_h_ENOLINK=no
8223 if test $gl_cv_header_errno_h_ENOLINK = no; then
8224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8225 /* end confdefs.h. */
8227 #define _XOPEN_SOURCE_EXTENDED 1
8234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8235 $EGREP "yes" >/dev/null 2>&1; then :
8236 gl_cv_header_errno_h_ENOLINK=hidden
8240 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8241 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8242 #define _XOPEN_SOURCE_EXTENDED 1
8244 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8256 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
8257 case $gl_cv_header_errno_h_ENOLINK in
8259 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8262 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8270 if test -n "$ERRNO_H"; then
8271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8272 printf %s "checking for EOVERFLOW value... " >&6; }
8273 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8274 printf %s "(cached) " >&6
8277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8278 /* end confdefs.h. */
8286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8287 $EGREP "yes" >/dev/null 2>&1; then :
8288 gl_cv_header_errno_h_EOVERFLOW=yes
8290 gl_cv_header_errno_h_EOVERFLOW=no
8294 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8296 /* end confdefs.h. */
8298 #define _XOPEN_SOURCE_EXTENDED 1
8305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8306 $EGREP "yes" >/dev/null 2>&1; then :
8307 gl_cv_header_errno_h_EOVERFLOW=hidden
8311 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8312 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8313 #define _XOPEN_SOURCE_EXTENDED 1
8315 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8327 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8328 case $gl_cv_header_errno_h_EOVERFLOW in
8330 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8333 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8341 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8342 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8348 cat >>confdefs.h <<_ACEOF
8349 #define HAVE_DECL_STRERROR_R $ac_have_decl
8352 for ac_func in strerror_r
8354 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8355 if test "x$ac_cv_func_strerror_r" = xyes; then :
8356 cat >>confdefs.h <<_ACEOF
8357 #define HAVE_STRERROR_R 1
8363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8364 printf %s "checking whether strerror_r returns char *... " >&6; }
8365 if ${ac_cv_func_strerror_r_char_p+:} false; then :
8366 printf %s "(cached) " >&6
8369 ac_cv_func_strerror_r_char_p=no
8370 if test $ac_cv_have_decl_strerror_r = yes; then
8371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8372 /* end confdefs.h. */
8373 $ac_includes_default
8379 char x = *strerror_r (0, buf, sizeof buf);
8380 char *p = strerror_r (0, buf, sizeof buf);
8387 if ac_fn_c_try_compile "$LINENO"; then :
8388 ac_cv_func_strerror_r_char_p=yes
8390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8392 # strerror_r is not declared. Choose between
8393 # systems that have relatively inaccessible declarations for the
8394 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8395 # former has a strerror_r that returns char*, while the latter
8396 # has a strerror_r that returns `int'.
8397 # This test should segfault on the DEC system.
8398 if test "$cross_compiling" = yes; then :
8401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8402 /* end confdefs.h. */
8403 $ac_includes_default
8404 extern char *strerror_r ();
8409 char x = *strerror_r (0, buf, sizeof buf);
8410 return ! isalpha (x);
8415 if ac_fn_c_try_run "$LINENO"; then :
8416 ac_cv_func_strerror_r_char_p=yes
8418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8419 conftest.$ac_objext conftest.beam conftest.$ac_ext
8425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8426 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
8427 if test $ac_cv_func_strerror_r_char_p = yes; then
8429 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8434 XGETTEXT_EXTRA_OPTIONS=
8439 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8440 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8446 cat >>confdefs.h <<_ACEOF
8447 #define HAVE_DECL_FCHDIR $ac_have_decl
8459 GNULIB_FPRINTF_POSIX=0;
8475 GNULIB_OBSTACK_PRINTF=0;
8476 GNULIB_OBSTACK_PRINTF_POSIX=0;
8481 GNULIB_PRINTF_POSIX=0;
8490 GNULIB_SPRINTF_POSIX=0;
8491 GNULIB_STDIO_H_NONBLOCKING=0;
8492 GNULIB_STDIO_H_SIGPIPE=0;
8499 GNULIB_VFPRINTF_POSIX=0;
8501 GNULIB_VPRINTF_POSIX=0;
8503 GNULIB_VSPRINTF_POSIX=0;
8507 HAVE_DECL_GETDELIM=1;
8508 HAVE_DECL_GETLINE=1;
8509 HAVE_DECL_OBSTACK_PRINTF=1;
8510 HAVE_DECL_SNPRINTF=1;
8511 HAVE_DECL_VSNPRINTF=1;
8534 REPLACE_OBSTACK_PRINTF=0;
8543 REPLACE_STDIO_READ_FUNCS=0;
8544 REPLACE_STDIO_WRITE_FUNCS=0;
8546 REPLACE_VASPRINTF=0;
8550 REPLACE_VSNPRINTF=0;
8555 GNULIB_NONBLOCKING=0;
8573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8574 printf %s "checking for working fcntl.h... " >&6; }
8575 if ${gl_cv_header_working_fcntl_h+:} false; then :
8576 printf %s "(cached) " >&6
8578 if test "$cross_compiling" = yes; then :
8579 gl_cv_header_working_fcntl_h=cross-compiling
8581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8582 /* end confdefs.h. */
8583 #include <sys/types.h>
8584 #include <sys/stat.h>
8586 # include <unistd.h>
8587 #else /* on Windows with MSVC */
8589 # include <stdlib.h>
8590 # defined sleep(n) _sleep ((n) * 1000)
8597 #define O_NOFOLLOW 0
8599 static int const constants[] =
8601 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8602 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8609 int result = !constants;
8612 static char const sym[] = "conftest.sym";
8613 if (symlink ("/dev/null", sym) != 0)
8617 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8624 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8628 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8639 static char const file[] = "confdefs.h";
8640 int fd = open (file, O_RDONLY | O_NOATIME);
8646 if (fstat (fd, &st0) != 0)
8652 if (read (fd, &c, 1) != 1)
8656 if (close (fd) != 0)
8661 if (stat (file, &st1) != 0)
8664 if (st0.st_atime != st1.st_atime)
8676 if ac_fn_c_try_run "$LINENO"; then :
8677 gl_cv_header_working_fcntl_h=yes
8680 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8681 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8682 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8683 *) gl_cv_header_working_fcntl_h='no';;
8686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8687 conftest.$ac_objext conftest.beam conftest.$ac_ext
8691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8692 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
8694 case $gl_cv_header_working_fcntl_h in #(
8695 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8699 cat >>confdefs.h <<_ACEOF
8700 #define HAVE_WORKING_O_NOATIME $ac_val
8704 case $gl_cv_header_working_fcntl_h in #(
8705 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8709 cat >>confdefs.h <<_ACEOF
8710 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8714 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8715 if test "x$ac_cv_type_pid_t" = xyes; then :
8719 cat >>confdefs.h <<_ACEOF
8725 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8726 if test "x$ac_cv_type_mode_t" = xyes; then :
8730 cat >>confdefs.h <<_ACEOF
8738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8739 printf %s "checking for promoted mode_t type... " >&6; }
8740 if ${gl_cv_promoted_mode_t+:} false; then :
8741 printf %s "(cached) " >&6
8744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8745 /* end confdefs.h. */
8746 #include <sys/types.h>
8750 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
8755 if ac_fn_c_try_compile "$LINENO"; then :
8756 gl_cv_promoted_mode_t='int'
8758 gl_cv_promoted_mode_t='mode_t'
8760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
8764 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
8766 cat >>confdefs.h <<_ACEOF
8767 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
8778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
8779 printf %s "checking for stdint.h... " >&6; }
8780 if ${gl_cv_header_stdint_h+:} false; then :
8781 printf %s "(cached) " >&6
8783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8784 /* end confdefs.h. */
8785 #include <sys/types.h>
8790 uintmax_t i = (uintmax_t) -1; return !i;
8795 if ac_fn_c_try_compile "$LINENO"; then :
8796 gl_cv_header_stdint_h=yes
8798 gl_cv_header_stdint_h=no
8800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
8803 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
8804 if test $gl_cv_header_stdint_h = yes; then
8806 cat >>confdefs.h <<_ACEOF
8807 #define HAVE_STDINT_H_WITH_UINTMAX 1
8813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8814 printf %s "checking for inttypes.h... " >&6; }
8815 if ${gl_cv_header_inttypes_h+:} false; then :
8816 printf %s "(cached) " >&6
8818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8819 /* end confdefs.h. */
8821 #include <sys/types.h>
8822 #include <inttypes.h>
8827 uintmax_t i = (uintmax_t) -1; return !i;
8832 if ac_fn_c_try_compile "$LINENO"; then :
8833 gl_cv_header_inttypes_h=yes
8835 gl_cv_header_inttypes_h=no
8837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
8840 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
8841 if test $gl_cv_header_inttypes_h = yes; then
8843 cat >>confdefs.h <<_ACEOF
8844 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
8853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
8854 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
8855 if ${gl_cv_func_printf_sizes_c99+:} false; then :
8856 printf %s "(cached) " >&6
8859 if test "$cross_compiling" = yes; then :
8862 # Guess yes on glibc systems.
8863 *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
8864 # Guess yes on FreeBSD >= 5.
8865 freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
8866 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8867 # Guess yes on Mac OS X >= 10.3.
8868 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
8869 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
8870 # Guess yes on OpenBSD >= 3.9.
8871 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
8872 gl_cv_func_printf_sizes_c99="guessing no";;
8873 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8874 # Guess yes on Solaris >= 2.10.
8875 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
8876 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
8877 # Guess yes on NetBSD >= 3.
8878 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8879 gl_cv_func_printf_sizes_c99="guessing no";;
8880 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8881 # If we don't know, assume the worst.
8882 *) gl_cv_func_printf_sizes_c99="guessing no";;
8886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8887 /* end confdefs.h. */
8892 #include <sys/types.h>
8893 #if HAVE_STDINT_H_WITH_UINTMAX
8894 # include <stdint.h>
8896 #if HAVE_INTTYPES_H_WITH_UINTMAX
8897 # include <inttypes.h>
8899 static char buf[100];
8903 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
8905 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
8906 || strcmp (buf, "12345671 33") != 0)
8910 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
8911 || strcmp (buf, "12345672 33") != 0)
8914 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
8915 || strcmp (buf, "12345673 33") != 0)
8918 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
8919 || strcmp (buf, "1.5 33") != 0)
8924 if ac_fn_c_try_run "$LINENO"; then :
8925 gl_cv_func_printf_sizes_c99=yes
8927 gl_cv_func_printf_sizes_c99=no
8929 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8930 conftest.$ac_objext conftest.beam conftest.$ac_ext
8935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
8936 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
8940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
8941 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
8942 if ${gl_cv_func_printf_long_double+:} false; then :
8943 printf %s "(cached) " >&6
8946 if test "$cross_compiling" = yes; then :
8949 beos*) gl_cv_func_printf_long_double="guessing no";;
8950 mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
8951 *) gl_cv_func_printf_long_double="guessing yes";;
8955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8956 /* end confdefs.h. */
8960 static char buf[10000];
8965 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
8966 || strcmp (buf, "1.750000 33") != 0)
8969 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
8970 || strcmp (buf, "1.750000e+00 33") != 0)
8973 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
8974 || strcmp (buf, "1.75 33") != 0)
8979 if ac_fn_c_try_run "$LINENO"; then :
8980 gl_cv_func_printf_long_double=yes
8982 gl_cv_func_printf_long_double=no
8984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8985 conftest.$ac_objext conftest.beam conftest.$ac_ext
8990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
8991 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
8995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
8996 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
8997 if ${gl_cv_func_printf_infinite+:} false; then :
8998 printf %s "(cached) " >&6
9001 if test "$cross_compiling" = yes; then :
9004 # Guess yes on glibc systems.
9005 *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
9006 # Guess yes on FreeBSD >= 6.
9007 freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
9008 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
9009 # Guess yes on Mac OS X >= 10.3.
9010 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
9011 darwin*) gl_cv_func_printf_infinite="guessing yes";;
9012 # Guess yes on HP-UX >= 11.
9013 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
9014 hpux*) gl_cv_func_printf_infinite="guessing yes";;
9015 # Guess yes on NetBSD >= 3.
9016 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9017 gl_cv_func_printf_infinite="guessing no";;
9018 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
9019 # Guess yes on BeOS.
9020 beos*) gl_cv_func_printf_infinite="guessing yes";;
9021 # If we don't know, assume the worst.
9022 *) gl_cv_func_printf_infinite="guessing no";;
9026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9027 /* end confdefs.h. */
9032 strisnan (const char *string, size_t start_index, size_t end_index)
9034 if (start_index < end_index)
9036 if (string[start_index] == '-')
9038 if (start_index + 3 <= end_index
9039 && memcmp (string + start_index, "nan", 3) == 0)
9042 if (start_index == end_index
9043 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9052 static double plus_zero = 0.0;
9053 double minus_zero = - plus_zero;
9054 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
9056 static char buf[10000];
9057 static double zero = 0.0;
9061 if (sprintf (buf, "%f", 1.0 / zero) < 0
9062 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9064 if (sprintf (buf, "%f", -1.0 / zero) < 0
9065 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9067 if (sprintf (buf, "%f", zero / zero) < 0
9068 || !strisnan (buf, 0, strlen (buf)))
9070 if (sprintf (buf, "%e", 1.0 / zero) < 0
9071 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9073 if (sprintf (buf, "%e", -1.0 / zero) < 0
9074 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9076 if (sprintf (buf, "%e", zero / zero) < 0
9077 || !strisnan (buf, 0, strlen (buf)))
9079 if (sprintf (buf, "%g", 1.0 / zero) < 0
9080 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9082 if (sprintf (buf, "%g", -1.0 / zero) < 0
9083 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9085 if (sprintf (buf, "%g", zero / zero) < 0
9086 || !strisnan (buf, 0, strlen (buf)))
9088 /* This test fails on HP-UX 10.20. */
9089 if (have_minus_zero ())
9090 if (sprintf (buf, "%g", - zero) < 0
9091 || strcmp (buf, "-0") != 0)
9096 if ac_fn_c_try_run "$LINENO"; then :
9097 gl_cv_func_printf_infinite=yes
9099 gl_cv_func_printf_infinite=no
9101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9102 conftest.$ac_objext conftest.beam conftest.$ac_ext
9107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
9108 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
9111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9112 printf %s "checking whether byte ordering is bigendian... " >&6; }
9113 if ${ac_cv_c_bigendian+:} false; then :
9114 printf %s "(cached) " >&6
9116 ac_cv_c_bigendian=unknown
9117 # See if we're dealing with a universal compiler.
9118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9119 /* end confdefs.h. */
9120 #ifndef __APPLE_CC__
9121 not a universal capable compiler
9126 if ac_fn_c_try_compile "$LINENO"; then :
9128 # Check for potential -arch flags. It is not universal unless
9129 # there are at least two -arch flags with different values.
9132 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9133 if test -n "$ac_prev"; then
9135 i?86 | x86_64 | ppc | ppc64)
9136 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9139 ac_cv_c_bigendian=universal
9145 elif test "x$ac_word" = "x-arch"; then
9150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9151 if test $ac_cv_c_bigendian = unknown; then
9152 # See if sys/param.h defines the BYTE_ORDER macro.
9153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9154 /* end confdefs.h. */
9155 #include <sys/types.h>
9156 #include <sys/param.h>
9161 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9162 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9171 if ac_fn_c_try_compile "$LINENO"; then :
9172 # It does; now see whether it defined to BIG_ENDIAN or not.
9173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9174 /* end confdefs.h. */
9175 #include <sys/types.h>
9176 #include <sys/param.h>
9181 #if BYTE_ORDER != BIG_ENDIAN
9189 if ac_fn_c_try_compile "$LINENO"; then :
9190 ac_cv_c_bigendian=yes
9192 ac_cv_c_bigendian=no
9194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9198 if test $ac_cv_c_bigendian = unknown; then
9199 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9201 /* end confdefs.h. */
9207 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9215 if ac_fn_c_try_compile "$LINENO"; then :
9216 # It does; now see whether it defined to _BIG_ENDIAN or not.
9217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9218 /* end confdefs.h. */
9232 if ac_fn_c_try_compile "$LINENO"; then :
9233 ac_cv_c_bigendian=yes
9235 ac_cv_c_bigendian=no
9237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9241 if test $ac_cv_c_bigendian = unknown; then
9242 # Compile a test program.
9243 if test "$cross_compiling" = yes; then :
9244 # Try to guess by grepping values from an object file.
9245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9246 /* end confdefs.h. */
9247 short int ascii_mm[] =
9248 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9249 short int ascii_ii[] =
9250 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9251 int use_ascii (int i) {
9252 return ascii_mm[i] + ascii_ii[i];
9254 short int ebcdic_ii[] =
9255 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9256 short int ebcdic_mm[] =
9257 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9258 int use_ebcdic (int i) {
9259 return ebcdic_mm[i] + ebcdic_ii[i];
9266 return use_ascii (foo) == use_ebcdic (foo);
9271 if ac_fn_c_try_compile "$LINENO"; then :
9272 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9273 ac_cv_c_bigendian=yes
9275 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9276 if test "$ac_cv_c_bigendian" = unknown; then
9277 ac_cv_c_bigendian=no
9279 # finding both strings is unlikely to happen, but who knows?
9280 ac_cv_c_bigendian=unknown
9284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9287 /* end confdefs.h. */
9288 $ac_includes_default
9293 /* Are we little or big endian? From Harbison&Steele. */
9297 char c[sizeof (long int)];
9300 return u.c[sizeof (long int) - 1] == 1;
9306 if ac_fn_c_try_run "$LINENO"; then :
9307 ac_cv_c_bigendian=no
9309 ac_cv_c_bigendian=yes
9311 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9312 conftest.$ac_objext conftest.beam conftest.$ac_ext
9317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9318 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
9319 case $ac_cv_c_bigendian in #(
9321 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
9327 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9331 as_fn_error $? "unknown endianness
9332 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9338 printf %s "checking whether long double and double are the same... " >&6; }
9339 if ${gl_cv_long_double_equals_double+:} false; then :
9340 printf %s "(cached) " >&6
9342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9343 /* end confdefs.h. */
9348 typedef int check[sizeof (long double) == sizeof (double)
9349 && LDBL_MANT_DIG == DBL_MANT_DIG
9350 && LDBL_MAX_EXP == DBL_MAX_EXP
9351 && LDBL_MIN_EXP == DBL_MIN_EXP
9358 if ac_fn_c_try_compile "$LINENO"; then :
9359 gl_cv_long_double_equals_double=yes
9361 gl_cv_long_double_equals_double=no
9363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9367 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
9368 if test $gl_cv_long_double_equals_double = yes; then
9370 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9372 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9374 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9383 if test -n "$gl_printf_safe"; then
9385 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9388 case "$gl_cv_func_printf_long_double" in
9390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9391 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
9392 if ${gl_cv_func_printf_infinite_long_double+:} false; then :
9393 printf %s "(cached) " >&6
9396 if test "$cross_compiling" = yes; then :
9399 # Guess no on ia64, x86_64, i386.
9400 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9403 # Guess yes on glibc systems.
9404 *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9405 # Guess yes on FreeBSD >= 6.
9406 freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
9407 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9408 # Guess yes on HP-UX >= 11.
9409 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9410 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9411 # If we don't know, assume the worst.
9412 *) gl_cv_func_printf_infinite_long_double="guessing no";;
9418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9419 /* end confdefs.h. */
9423 #if defined __MACH__ && defined __APPLE__
9424 /* Avoid a crash on Mac OS X. */
9425 #include <mach/mach.h>
9426 #include <mach/mach_error.h>
9427 #include <mach/thread_status.h>
9428 #include <mach/exception.h>
9429 #include <mach/task.h>
9430 #include <pthread.h>
9431 /* The exception port on which our thread listens. */
9432 static mach_port_t our_exception_port;
9433 /* The main function of the thread listening for exceptions of type
9436 mach_exception_thread (void *arg)
9438 /* Buffer for a message to be received. */
9440 mach_msg_header_t head;
9441 mach_msg_body_t msgh_body;
9444 mach_msg_return_t retval;
9445 /* Wait for a message on the exception port. */
9446 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9447 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9448 if (retval != MACH_MSG_SUCCESS)
9455 mach_port_t self = mach_task_self ();
9456 /* Allocate a port on which the thread shall listen for exceptions. */
9457 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9459 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9460 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9461 MACH_MSG_TYPE_MAKE_SEND)
9463 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9465 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9466 /* Create the thread listening on the exception port. */
9467 pthread_attr_t attr;
9469 if (pthread_attr_init (&attr) == 0
9470 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9471 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9472 pthread_attr_destroy (&attr);
9473 /* Replace the exception port info for these exceptions with our own.
9474 Note that we replace the exception port for the entire task, not only
9475 for a particular thread. This has the effect that when our exception
9476 port gets the message, the thread specific exception port has already
9477 been asked, and we don't need to bother about it.
9478 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9479 task_set_exception_ports (self, mask, our_exception_port,
9480 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9485 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9486 /* Avoid a crash on native Windows. */
9487 #define WIN32_LEAN_AND_MEAN
9488 #include <windows.h>
9489 #include <winerror.h>
9491 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9493 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9495 case EXCEPTION_ACCESS_VIOLATION:
9496 case EXCEPTION_IN_PAGE_ERROR:
9497 case EXCEPTION_STACK_OVERFLOW:
9498 case EXCEPTION_GUARD_PAGE:
9499 case EXCEPTION_PRIV_INSTRUCTION:
9500 case EXCEPTION_ILLEGAL_INSTRUCTION:
9501 case EXCEPTION_DATATYPE_MISALIGNMENT:
9502 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9503 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9506 return EXCEPTION_CONTINUE_SEARCH;
9511 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9514 /* Avoid a crash on POSIX systems. */
9516 /* A POSIX signal handler. */
9518 exception_handler (int sig)
9526 signal (SIGSEGV, exception_handler);
9529 signal (SIGBUS, exception_handler);
9538 strisnan (const char *string, size_t start_index, size_t end_index)
9540 if (start_index < end_index)
9542 if (string[start_index] == '-')
9544 if (start_index + 3 <= end_index
9545 && memcmp (string + start_index, "nan", 3) == 0)
9548 if (start_index == end_index
9549 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9555 static char buf[10000];
9556 static long double zeroL = 0.0L;
9561 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9562 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9564 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9565 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9567 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9568 || !strisnan (buf, 0, strlen (buf)))
9570 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9571 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9573 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9574 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9576 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9577 || !strisnan (buf, 0, strlen (buf)))
9579 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9580 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9582 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9583 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9585 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9586 || !strisnan (buf, 0, strlen (buf)))
9588 #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
9589 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9590 of 'unsigned int' words. */
9591 # ifdef WORDS_BIGENDIAN
9592 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9593 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9594 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
9595 (unsigned int) (mantlo) << 16 \
9598 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9599 { mantlo, manthi, exponent }
9602 static union { unsigned int word[4]; long double value; } x =
9603 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
9604 if (sprintf (buf, "%Lf", x.value) < 0
9605 || !strisnan (buf, 0, strlen (buf)))
9607 if (sprintf (buf, "%Le", x.value) < 0
9608 || !strisnan (buf, 0, strlen (buf)))
9610 if (sprintf (buf, "%Lg", x.value) < 0
9611 || !strisnan (buf, 0, strlen (buf)))
9615 /* Signalling NaN. */
9616 static union { unsigned int word[4]; long double value; } x =
9617 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
9618 if (sprintf (buf, "%Lf", x.value) < 0
9619 || !strisnan (buf, 0, strlen (buf)))
9621 if (sprintf (buf, "%Le", x.value) < 0
9622 || !strisnan (buf, 0, strlen (buf)))
9624 if (sprintf (buf, "%Lg", x.value) < 0
9625 || !strisnan (buf, 0, strlen (buf)))
9629 static union { unsigned int word[4]; long double value; } x =
9630 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
9631 if (sprintf (buf, "%Lf", x.value) < 0
9632 || !strisnan (buf, 0, strlen (buf)))
9634 if (sprintf (buf, "%Le", x.value) < 0
9635 || !strisnan (buf, 0, strlen (buf)))
9637 if (sprintf (buf, "%Lg", x.value) < 0
9638 || !strisnan (buf, 0, strlen (buf)))
9641 { /* Pseudo-Infinity. */
9642 static union { unsigned int word[4]; long double value; } x =
9643 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
9644 if (sprintf (buf, "%Lf", x.value) < 0
9645 || !strisnan (buf, 0, strlen (buf)))
9647 if (sprintf (buf, "%Le", x.value) < 0
9648 || !strisnan (buf, 0, strlen (buf)))
9650 if (sprintf (buf, "%Lg", x.value) < 0
9651 || !strisnan (buf, 0, strlen (buf)))
9654 { /* Pseudo-Zero. */
9655 static union { unsigned int word[4]; long double value; } x =
9656 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
9657 if (sprintf (buf, "%Lf", x.value) < 0
9658 || !strisnan (buf, 0, strlen (buf)))
9660 if (sprintf (buf, "%Le", x.value) < 0
9661 || !strisnan (buf, 0, strlen (buf)))
9663 if (sprintf (buf, "%Lg", x.value) < 0
9664 || !strisnan (buf, 0, strlen (buf)))
9667 { /* Unnormalized number. */
9668 static union { unsigned int word[4]; long double value; } x =
9669 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
9670 if (sprintf (buf, "%Lf", x.value) < 0
9671 || !strisnan (buf, 0, strlen (buf)))
9673 if (sprintf (buf, "%Le", x.value) < 0
9674 || !strisnan (buf, 0, strlen (buf)))
9676 if (sprintf (buf, "%Lg", x.value) < 0
9677 || !strisnan (buf, 0, strlen (buf)))
9680 { /* Pseudo-Denormal. */
9681 static union { unsigned int word[4]; long double value; } x =
9682 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
9683 if (sprintf (buf, "%Lf", x.value) < 0
9684 || !strisnan (buf, 0, strlen (buf)))
9686 if (sprintf (buf, "%Le", x.value) < 0
9687 || !strisnan (buf, 0, strlen (buf)))
9689 if (sprintf (buf, "%Lg", x.value) < 0
9690 || !strisnan (buf, 0, strlen (buf)))
9697 if ac_fn_c_try_run "$LINENO"; then :
9698 gl_cv_func_printf_infinite_long_double=yes
9700 gl_cv_func_printf_infinite_long_double=no
9702 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9703 conftest.$ac_objext conftest.beam conftest.$ac_ext
9708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
9709 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
9712 gl_cv_func_printf_infinite_long_double="irrelevant"
9718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
9719 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
9720 if ${gl_cv_func_printf_directive_a+:} false; then :
9721 printf %s "(cached) " >&6
9724 if test "$cross_compiling" = yes; then :
9727 # Guess yes on glibc >= 2.5 systems.
9729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9730 /* end confdefs.h. */
9732 #include <features.h>
9733 #ifdef __GNU_LIBRARY__
9734 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
9740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9741 $EGREP "BZ2908" >/dev/null 2>&1; then :
9742 gl_cv_func_printf_directive_a="guessing yes"
9744 gl_cv_func_printf_directive_a="guessing no"
9749 # If we don't know, assume the worst.
9750 *) gl_cv_func_printf_directive_a="guessing no";;
9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9755 /* end confdefs.h. */
9759 static char buf[100];
9760 static double zero = 0.0;
9764 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
9765 || (strcmp (buf, "0x1.922p+1 33") != 0
9766 && strcmp (buf, "0x3.244p+0 33") != 0
9767 && strcmp (buf, "0x6.488p-1 33") != 0
9768 && strcmp (buf, "0xc.91p-2 33") != 0))
9770 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
9771 || (strcmp (buf, "-0X1.922P+1 33") != 0
9772 && strcmp (buf, "-0X3.244P+0 33") != 0
9773 && strcmp (buf, "-0X6.488P-1 33") != 0
9774 && strcmp (buf, "-0XC.91P-2 33") != 0))
9776 /* This catches a FreeBSD 6.1 bug: it doesn't round. */
9777 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
9778 || (strcmp (buf, "0x1.83p+0 33") != 0
9779 && strcmp (buf, "0x3.05p-1 33") != 0
9780 && strcmp (buf, "0x6.0ap-2 33") != 0
9781 && strcmp (buf, "0xc.14p-3 33") != 0))
9783 /* This catches a FreeBSD 6.1 bug. See
9784 <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
9785 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
9788 /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
9789 if (sprintf (buf, "%.1a", 1.999) < 0
9790 || (strcmp (buf, "0x1.0p+1") != 0
9791 && strcmp (buf, "0x2.0p+0") != 0
9792 && strcmp (buf, "0x4.0p-1") != 0
9793 && strcmp (buf, "0x8.0p-2") != 0))
9795 /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
9796 glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
9797 if (sprintf (buf, "%.1La", 1.999L) < 0
9798 || (strcmp (buf, "0x1.0p+1") != 0
9799 && strcmp (buf, "0x2.0p+0") != 0
9800 && strcmp (buf, "0x4.0p-1") != 0
9801 && strcmp (buf, "0x8.0p-2") != 0))
9806 if ac_fn_c_try_run "$LINENO"; then :
9807 gl_cv_func_printf_directive_a=yes
9809 gl_cv_func_printf_directive_a=no
9811 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9812 conftest.$ac_objext conftest.beam conftest.$ac_ext
9817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
9818 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
9822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
9823 printf %s "checking whether printf supports the 'F' directive... " >&6; }
9824 if ${gl_cv_func_printf_directive_f+:} false; then :
9825 printf %s "(cached) " >&6
9828 if test "$cross_compiling" = yes; then :
9831 # Guess yes on glibc systems.
9832 *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
9833 # Guess yes on FreeBSD >= 6.
9834 freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
9835 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
9836 # Guess yes on Mac OS X >= 10.3.
9837 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
9838 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
9839 # Guess yes on Solaris >= 2.10.
9840 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9841 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
9842 # If we don't know, assume the worst.
9843 *) gl_cv_func_printf_directive_f="guessing no";;
9847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9848 /* end confdefs.h. */
9852 static char buf[100];
9853 static double zero = 0.0;
9857 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
9858 || strcmp (buf, "1234567.000000 33") != 0)
9860 if (sprintf (buf, "%F", 1.0 / zero) < 0
9861 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
9863 /* This catches a Cygwin 1.5.x bug. */
9864 if (sprintf (buf, "%.F", 1234.0) < 0
9865 || strcmp (buf, "1234") != 0)
9870 if ac_fn_c_try_run "$LINENO"; then :
9871 gl_cv_func_printf_directive_f=yes
9873 gl_cv_func_printf_directive_f=no
9875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9876 conftest.$ac_objext conftest.beam conftest.$ac_ext
9881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
9882 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
9886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
9887 printf %s "checking whether printf supports the 'n' directive... " >&6; }
9888 if ${gl_cv_func_printf_directive_n+:} false; then :
9889 printf %s "(cached) " >&6
9892 if test "$cross_compiling" = yes; then :
9895 mingw*) gl_cv_func_printf_directive_n="guessing no";;
9896 *) gl_cv_func_printf_directive_n="guessing yes";;
9900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9901 /* end confdefs.h. */
9907 /* See page about "Parameter Validation" on msdn.microsoft.com. */
9909 invalid_parameter_handler (const wchar_t *expression,
9910 const wchar_t *function,
9911 const wchar_t *file, unsigned int line,
9917 static char fmtstring[10];
9918 static char buf[100];
9923 _set_invalid_parameter_handler (invalid_parameter_handler);
9925 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
9926 support %n in format strings in read-only memory but not in writable
9928 strcpy (fmtstring, "%d %n");
9929 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
9930 || strcmp (buf, "123 ") != 0
9936 if ac_fn_c_try_run "$LINENO"; then :
9937 gl_cv_func_printf_directive_n=yes
9939 gl_cv_func_printf_directive_n=no
9941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9942 conftest.$ac_objext conftest.beam conftest.$ac_ext
9947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
9948 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
9952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
9953 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
9954 if ${gl_cv_func_printf_directive_ls+:} false; then :
9955 printf %s "(cached) " >&6
9958 if test "$cross_compiling" = yes; then :
9961 openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
9962 irix*) gl_cv_func_printf_directive_ls="guessing no";;
9963 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
9964 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
9965 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
9966 *) gl_cv_func_printf_directive_ls="guessing yes";;
9970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9971 /* end confdefs.h. */
9973 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9975 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9976 included before <wchar.h>. */
9986 /* Test whether %ls works at all.
9987 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
9990 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
9992 if (sprintf (buf, "%ls", wstring) < 0
9993 || strcmp (buf, "abc") != 0)
9996 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
9997 assertion failure inside libc), but not on OpenBSD 4.0. */
9999 static const wchar_t wstring[] = { 'a', 0 };
10001 if (sprintf (buf, "%ls", wstring) < 0
10002 || strcmp (buf, "a") != 0)
10005 /* Test whether precisions in %ls are supported as specified in ISO C 99
10007 "If a precision is specified, no more than that many bytes are written
10008 (including shift sequences, if any), and the array shall contain a
10009 null wide character if, to equal the multibyte character sequence
10010 length given by the precision, the function would need to access a
10011 wide character one past the end of the array."
10012 This test fails on Solaris 10. */
10014 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
10016 if (sprintf (buf, "%.2ls", wstring) < 0
10017 || strcmp (buf, "ab") != 0)
10023 if ac_fn_c_try_run "$LINENO"; then :
10024 gl_cv_func_printf_directive_ls=yes
10026 gl_cv_func_printf_directive_ls=no
10028 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10029 conftest.$ac_objext conftest.beam conftest.$ac_ext
10034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
10035 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
10039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
10040 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
10041 if ${gl_cv_func_printf_positions+:} false; then :
10042 printf %s "(cached) " >&6
10045 if test "$cross_compiling" = yes; then :
10048 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
10049 gl_cv_func_printf_positions="guessing no";;
10050 beos*) gl_cv_func_printf_positions="guessing no";;
10051 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
10052 *) gl_cv_func_printf_positions="guessing yes";;
10056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10057 /* end confdefs.h. */
10060 #include <string.h>
10061 /* The string "%2$d %1$d", with dollar characters protected from the shell's
10062 dollar expansion (possibly an autoconf bug). */
10063 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
10064 static char buf[100];
10067 sprintf (buf, format, 33, 55);
10068 return (strcmp (buf, "55 33") != 0);
10071 if ac_fn_c_try_run "$LINENO"; then :
10072 gl_cv_func_printf_positions=yes
10074 gl_cv_func_printf_positions=no
10076 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10077 conftest.$ac_objext conftest.beam conftest.$ac_ext
10082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
10083 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
10087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
10088 printf %s "checking whether printf supports the grouping flag... " >&6; }
10089 if ${gl_cv_func_printf_flag_grouping+:} false; then :
10090 printf %s "(cached) " >&6
10093 if test "$cross_compiling" = yes; then :
10096 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
10097 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
10098 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
10099 *) gl_cv_func_printf_flag_grouping="guessing yes";;
10103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10104 /* end confdefs.h. */
10107 #include <string.h>
10108 static char buf[100];
10111 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
10112 || buf[strlen (buf) - 1] != '9')
10117 if ac_fn_c_try_run "$LINENO"; then :
10118 gl_cv_func_printf_flag_grouping=yes
10120 gl_cv_func_printf_flag_grouping=no
10122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10123 conftest.$ac_objext conftest.beam conftest.$ac_ext
10128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
10129 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
10133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
10134 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
10135 if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
10136 printf %s "(cached) " >&6
10139 if test "$cross_compiling" = yes; then :
10142 # Guess yes on HP-UX 11.
10143 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10144 # Guess no on HP-UX 10 and older.
10145 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
10146 # Guess yes otherwise.
10147 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10152 /* end confdefs.h. */
10155 #include <string.h>
10156 static char buf[100];
10159 /* Check that a '-' flag is not annihilated by a negative width. */
10160 if (sprintf (buf, "a%-*sc", -3, "b") < 0
10161 || strcmp (buf, "ab c") != 0)
10166 if ac_fn_c_try_run "$LINENO"; then :
10167 gl_cv_func_printf_flag_leftadjust=yes
10169 gl_cv_func_printf_flag_leftadjust=no
10171 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10172 conftest.$ac_objext conftest.beam conftest.$ac_ext
10177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10178 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
10182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10183 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
10184 if ${gl_cv_func_printf_flag_zero+:} false; then :
10185 printf %s "(cached) " >&6
10188 if test "$cross_compiling" = yes; then :
10191 # Guess yes on glibc systems.
10192 *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10193 # Guess yes on BeOS.
10194 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
10195 # If we don't know, assume the worst.
10196 *) gl_cv_func_printf_flag_zero="guessing no";;
10200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10201 /* end confdefs.h. */
10204 #include <string.h>
10205 static char buf[100];
10206 static double zero = 0.0;
10209 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10210 || (strcmp (buf, " inf") != 0
10211 && strcmp (buf, " infinity") != 0))
10216 if ac_fn_c_try_run "$LINENO"; then :
10217 gl_cv_func_printf_flag_zero=yes
10219 gl_cv_func_printf_flag_zero=no
10221 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10222 conftest.$ac_objext conftest.beam conftest.$ac_ext
10227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10228 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
10232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10233 printf %s "checking whether printf supports large precisions... " >&6; }
10234 if ${gl_cv_func_printf_precision+:} false; then :
10235 printf %s "(cached) " >&6
10238 if test "$cross_compiling" = yes; then :
10241 # Guess no only on Solaris, native Windows, and BeOS systems.
10242 solaris*) gl_cv_func_printf_precision="guessing no" ;;
10243 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10244 beos*) gl_cv_func_printf_precision="guessing no" ;;
10245 *) gl_cv_func_printf_precision="guessing yes" ;;
10249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10250 /* end confdefs.h. */
10253 #include <string.h>
10254 static char buf[5000];
10259 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
10262 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10264 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10266 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10269 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10275 if ac_fn_c_try_run "$LINENO"; then :
10276 gl_cv_func_printf_precision=yes
10278 gl_cv_func_printf_precision=no
10280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10281 conftest.$ac_objext conftest.beam conftest.$ac_ext
10286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10287 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
10290 gl_cv_c_multiarch=no
10291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10292 /* end confdefs.h. */
10293 #ifndef __APPLE_CC__
10294 not a universal capable compiler
10299 if ac_fn_c_try_compile "$LINENO"; then :
10303 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10304 if test -n "$prev"; then
10306 i?86 | x86_64 | ppc | ppc64)
10307 if test -z "$arch" || test "$arch" = "$word"; then
10310 gl_cv_c_multiarch=yes
10316 if test "x$word" = "x-arch"; then
10323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10324 if test $gl_cv_c_multiarch = yes; then
10325 APPLE_UNIVERSAL_BUILD=1
10327 APPLE_UNIVERSAL_BUILD=0
10334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10335 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
10336 if ${gl_cv_func_printf_enomem+:} false; then :
10337 printf %s "(cached) " >&6
10340 gl_cv_func_printf_enomem="guessing no"
10341 if test "$cross_compiling" = no; then
10342 if test $APPLE_UNIVERSAL_BUILD = 0; then
10343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344 /* end confdefs.h. */
10347 #include <stdlib.h>
10348 #if defined __MACH__ && defined __APPLE__
10349 /* Avoid a crash on Mac OS X. */
10350 #include <mach/mach.h>
10351 #include <mach/mach_error.h>
10352 #include <mach/thread_status.h>
10353 #include <mach/exception.h>
10354 #include <mach/task.h>
10355 #include <pthread.h>
10356 /* The exception port on which our thread listens. */
10357 static mach_port_t our_exception_port;
10358 /* The main function of the thread listening for exceptions of type
10361 mach_exception_thread (void *arg)
10363 /* Buffer for a message to be received. */
10365 mach_msg_header_t head;
10366 mach_msg_body_t msgh_body;
10369 mach_msg_return_t retval;
10370 /* Wait for a message on the exception port. */
10371 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10372 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10373 if (retval != MACH_MSG_SUCCESS)
10378 nocrash_init (void)
10380 mach_port_t self = mach_task_self ();
10381 /* Allocate a port on which the thread shall listen for exceptions. */
10382 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10384 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
10385 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10386 MACH_MSG_TYPE_MAKE_SEND)
10388 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
10390 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10391 /* Create the thread listening on the exception port. */
10392 pthread_attr_t attr;
10394 if (pthread_attr_init (&attr) == 0
10395 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10396 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10397 pthread_attr_destroy (&attr);
10398 /* Replace the exception port info for these exceptions with our own.
10399 Note that we replace the exception port for the entire task, not only
10400 for a particular thread. This has the effect that when our exception
10401 port gets the message, the thread specific exception port has already
10402 been asked, and we don't need to bother about it.
10403 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
10404 task_set_exception_ports (self, mask, our_exception_port,
10405 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10410 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10411 /* Avoid a crash on native Windows. */
10412 #define WIN32_LEAN_AND_MEAN
10413 #include <windows.h>
10414 #include <winerror.h>
10416 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10418 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10420 case EXCEPTION_ACCESS_VIOLATION:
10421 case EXCEPTION_IN_PAGE_ERROR:
10422 case EXCEPTION_STACK_OVERFLOW:
10423 case EXCEPTION_GUARD_PAGE:
10424 case EXCEPTION_PRIV_INSTRUCTION:
10425 case EXCEPTION_ILLEGAL_INSTRUCTION:
10426 case EXCEPTION_DATATYPE_MISALIGNMENT:
10427 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10428 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10431 return EXCEPTION_CONTINUE_SEARCH;
10434 nocrash_init (void)
10436 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10439 /* Avoid a crash on POSIX systems. */
10440 #include <signal.h>
10441 /* A POSIX signal handler. */
10443 exception_handler (int sig)
10448 nocrash_init (void)
10451 signal (SIGSEGV, exception_handler);
10454 signal (SIGBUS, exception_handler);
10460 #include <sys/types.h>
10461 #include <sys/time.h>
10462 #include <sys/resource.h>
10466 struct rlimit limit;
10469 /* Some printf implementations allocate temporary space with malloc. */
10470 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
10472 if (getrlimit (RLIMIT_DATA, &limit) < 0)
10474 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10475 limit.rlim_max = 5000000;
10476 limit.rlim_cur = limit.rlim_max;
10477 if (setrlimit (RLIMIT_DATA, &limit) < 0)
10480 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
10482 if (getrlimit (RLIMIT_AS, &limit) < 0)
10484 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10485 limit.rlim_max = 5000000;
10486 limit.rlim_cur = limit.rlim_max;
10487 if (setrlimit (RLIMIT_AS, &limit) < 0)
10490 /* Some printf implementations allocate temporary space on the stack. */
10491 #ifdef RLIMIT_STACK
10492 if (getrlimit (RLIMIT_STACK, &limit) < 0)
10494 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10495 limit.rlim_max = 5000000;
10496 limit.rlim_cur = limit.rlim_max;
10497 if (setrlimit (RLIMIT_STACK, &limit) < 0)
10500 ret = printf ("%.5000000f", 1.0);
10501 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10505 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10506 (eval $ac_link) 2>&5
10508 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10509 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10512 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
10513 if test $result != 0 && test $result != 77; then result=1; fi
10515 ) >/dev/null 2>/dev/null
10517 0) gl_cv_func_printf_enomem="yes" ;;
10518 77) gl_cv_func_printf_enomem="guessing no" ;;
10519 *) gl_cv_func_printf_enomem="no" ;;
10522 gl_cv_func_printf_enomem="guessing no"
10526 gl_cv_func_printf_enomem="guessing no"
10529 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10531 # Guess yes on glibc systems.
10532 *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
10533 # Guess yes on Solaris.
10534 solaris*) gl_cv_func_printf_enomem="guessing yes";;
10535 # Guess yes on AIX.
10536 aix*) gl_cv_func_printf_enomem="guessing yes";;
10537 # Guess yes on HP-UX/hppa.
10538 hpux*) case "$host_cpu" in
10539 hppa*) gl_cv_func_printf_enomem="guessing yes";;
10540 *) gl_cv_func_printf_enomem="guessing no";;
10543 # Guess yes on IRIX.
10544 irix*) gl_cv_func_printf_enomem="guessing yes";;
10545 # Guess yes on OSF/1.
10546 osf*) gl_cv_func_printf_enomem="guessing yes";;
10547 # Guess yes on BeOS.
10548 beos*) gl_cv_func_printf_enomem="guessing yes";;
10549 # Guess yes on Haiku.
10550 haiku*) gl_cv_func_printf_enomem="guessing yes";;
10551 # If we don't know, assume the worst.
10552 *) gl_cv_func_printf_enomem="guessing no";;
10557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
10558 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
10562 case "$gl_cv_func_printf_long_double" in
10567 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
10575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10576 printf %s "checking for unsigned long long int... " >&6; }
10577 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10578 printf %s "(cached) " >&6
10580 ac_cv_type_unsigned_long_long_int=yes
10581 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583 /* end confdefs.h. */
10585 /* For now, do not test the preprocessor; as of 2007 there are too many
10586 implementations with broken preprocessors. Perhaps this can
10587 be revisited in 2012. In the meantime, code should not expect
10588 #if to work with literals wider than 32 bits. */
10589 /* Test literals. */
10590 long long int ll = 9223372036854775807ll;
10591 long long int nll = -9223372036854775807LL;
10592 unsigned long long int ull = 18446744073709551615ULL;
10593 /* Test constant expressions. */
10594 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10596 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10602 /* Test availability of runtime routines for shift and division. */
10603 long long int llmax = 9223372036854775807ll;
10604 unsigned long long int ullmax = 18446744073709551615ull;
10605 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10606 | (llmax / ll) | (llmax % ll)
10607 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10608 | (ullmax / ull) | (ullmax % ull));
10614 if ac_fn_c_try_link "$LINENO"; then :
10617 ac_cv_type_unsigned_long_long_int=no
10619 rm -f core conftest.err conftest.$ac_objext \
10620 conftest$ac_exeext conftest.$ac_ext
10623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10624 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
10625 if test $ac_cv_type_unsigned_long_long_int = yes; then
10627 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10634 printf %s "checking for long long int... " >&6; }
10635 if ${ac_cv_type_long_long_int+:} false; then :
10636 printf %s "(cached) " >&6
10638 ac_cv_type_long_long_int=yes
10639 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10640 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10641 if test $ac_cv_type_long_long_int = yes; then
10642 if test "$cross_compiling" = yes; then :
10645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10646 /* end confdefs.h. */
10647 #include <limits.h>
10650 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10651 # define LLONG_MAX (HALF - 1 + HALF)
10656 long long int n = 1;
10660 long long int m = n << i;
10663 if (LLONG_MAX / 2 < m)
10671 if ac_fn_c_try_run "$LINENO"; then :
10674 ac_cv_type_long_long_int=no
10676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10677 conftest.$ac_objext conftest.beam conftest.$ac_ext
10683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10684 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
10685 if test $ac_cv_type_long_long_int = yes; then
10687 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10693 printf %s "checking for wchar_t... " >&6; }
10694 if ${gt_cv_c_wchar_t+:} false; then :
10695 printf %s "(cached) " >&6
10697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10698 /* end confdefs.h. */
10699 #include <stddef.h>
10700 wchar_t foo = (wchar_t)'\0';
10709 if ac_fn_c_try_compile "$LINENO"; then :
10710 gt_cv_c_wchar_t=yes
10714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
10717 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
10718 if test $gt_cv_c_wchar_t = yes; then
10720 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
10725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
10726 printf %s "checking for wint_t... " >&6; }
10727 if ${gt_cv_c_wint_t+:} false; then :
10728 printf %s "(cached) " >&6
10730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10731 /* end confdefs.h. */
10733 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10735 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
10736 before <wchar.h>. */
10737 #include <stddef.h>
10741 wint_t foo = (wchar_t)'\0';
10750 if ac_fn_c_try_compile "$LINENO"; then :
10755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
10758 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
10759 if test $gt_cv_c_wint_t = yes; then
10761 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
10769 if test $ac_cv_header_features_h = yes; then
10779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
10780 printf %s "checking for intmax_t... " >&6; }
10781 if ${gt_cv_c_intmax_t+:} false; then :
10782 printf %s "(cached) " >&6
10784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10785 /* end confdefs.h. */
10787 #include <stddef.h>
10788 #include <stdlib.h>
10789 #if HAVE_STDINT_H_WITH_UINTMAX
10790 #include <stdint.h>
10792 #if HAVE_INTTYPES_H_WITH_UINTMAX
10793 #include <inttypes.h>
10799 intmax_t x = -1; return !x;
10804 if ac_fn_c_try_compile "$LINENO"; then :
10805 gt_cv_c_intmax_t=yes
10807 gt_cv_c_intmax_t=no
10809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
10812 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
10813 if test $gt_cv_c_intmax_t = yes; then
10815 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
10819 test $ac_cv_type_long_long_int = yes \
10820 && ac_type='long long' \
10823 cat >>confdefs.h <<_ACEOF
10824 #define intmax_t $ac_type
10830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10831 printf %s "checking where to find the exponent in a 'double'... " >&6; }
10832 if ${gl_cv_cc_double_expbit0+:} false; then :
10833 printf %s "(cached) " >&6
10836 if test "$cross_compiling" = yes; then :
10838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10839 /* end confdefs.h. */
10841 #if defined arm || defined __arm || defined __arm__
10846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10847 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10848 gl_cv_cc_double_expbit0="unknown"
10852 if ${ac_cv_c_bigendian+:} false; then :
10853 printf %s "(cached) " >&6
10855 ac_cv_c_bigendian=unknown
10856 # See if we're dealing with a universal compiler.
10857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10858 /* end confdefs.h. */
10859 #ifndef __APPLE_CC__
10860 not a universal capable compiler
10865 if ac_fn_c_try_compile "$LINENO"; then :
10867 # Check for potential -arch flags. It is not universal unless
10868 # there are at least two -arch flags with different values.
10871 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10872 if test -n "$ac_prev"; then
10874 i?86 | x86_64 | ppc | ppc64)
10875 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10878 ac_cv_c_bigendian=universal
10884 elif test "x$ac_word" = "x-arch"; then
10889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10890 if test $ac_cv_c_bigendian = unknown; then
10891 # See if sys/param.h defines the BYTE_ORDER macro.
10892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10893 /* end confdefs.h. */
10894 #include <sys/types.h>
10895 #include <sys/param.h>
10900 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10901 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10903 bogus endian macros
10910 if ac_fn_c_try_compile "$LINENO"; then :
10911 # It does; now see whether it defined to BIG_ENDIAN or not.
10912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913 /* end confdefs.h. */
10914 #include <sys/types.h>
10915 #include <sys/param.h>
10920 #if BYTE_ORDER != BIG_ENDIAN
10928 if ac_fn_c_try_compile "$LINENO"; then :
10929 ac_cv_c_bigendian=yes
10931 ac_cv_c_bigendian=no
10933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10937 if test $ac_cv_c_bigendian = unknown; then
10938 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10940 /* end confdefs.h. */
10941 #include <limits.h>
10946 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10947 bogus endian macros
10954 if ac_fn_c_try_compile "$LINENO"; then :
10955 # It does; now see whether it defined to _BIG_ENDIAN or not.
10956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10957 /* end confdefs.h. */
10958 #include <limits.h>
10963 #ifndef _BIG_ENDIAN
10971 if ac_fn_c_try_compile "$LINENO"; then :
10972 ac_cv_c_bigendian=yes
10974 ac_cv_c_bigendian=no
10976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10980 if test $ac_cv_c_bigendian = unknown; then
10981 # Compile a test program.
10982 if test "$cross_compiling" = yes; then :
10983 # Try to guess by grepping values from an object file.
10984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10985 /* end confdefs.h. */
10986 short int ascii_mm[] =
10987 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10988 short int ascii_ii[] =
10989 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10990 int use_ascii (int i) {
10991 return ascii_mm[i] + ascii_ii[i];
10993 short int ebcdic_ii[] =
10994 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10995 short int ebcdic_mm[] =
10996 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10997 int use_ebcdic (int i) {
10998 return ebcdic_mm[i] + ebcdic_ii[i];
11005 return use_ascii (foo) == use_ebcdic (foo);
11010 if ac_fn_c_try_compile "$LINENO"; then :
11011 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11012 ac_cv_c_bigendian=yes
11014 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11015 if test "$ac_cv_c_bigendian" = unknown; then
11016 ac_cv_c_bigendian=no
11018 # finding both strings is unlikely to happen, but who knows?
11019 ac_cv_c_bigendian=unknown
11023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026 /* end confdefs.h. */
11027 $ac_includes_default
11032 /* Are we little or big endian? From Harbison&Steele. */
11036 char c[sizeof (long int)];
11039 return u.c[sizeof (long int) - 1] == 1;
11045 if ac_fn_c_try_run "$LINENO"; then :
11046 ac_cv_c_bigendian=no
11048 ac_cv_c_bigendian=yes
11050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11051 conftest.$ac_objext conftest.beam conftest.$ac_ext
11057 case $ac_cv_c_bigendian in #(
11059 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
11061 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
11064 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11068 gl_cv_cc_double_expbit0="unknown" ;;
11077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11078 /* end confdefs.h. */
11081 #include <stddef.h>
11083 #include <string.h>
11085 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11086 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11087 static unsigned int ored_words[NWORDS];
11088 static unsigned int anded_words[NWORDS];
11089 static void add_to_ored_words (double x)
11093 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11094 memset (&m, 0, sizeof (memory_double));
11096 for (i = 0; i < NWORDS; i++)
11098 ored_words[i] |= m.word[i];
11099 anded_words[i] &= m.word[i];
11105 FILE *fp = fopen ("conftest.out", "w");
11108 for (j = 0; j < NWORDS; j++)
11109 anded_words[j] = ~ (unsigned int) 0;
11110 add_to_ored_words (0.25);
11111 add_to_ored_words (0.5);
11112 add_to_ored_words (1.0);
11113 add_to_ored_words (2.0);
11114 add_to_ored_words (4.0);
11115 /* Remove bits that are common (e.g. if representation of the first mantissa
11116 bit is explicit). */
11117 for (j = 0; j < NWORDS; j++)
11118 ored_words[j] &= ~anded_words[j];
11119 /* Now find the nonzero word. */
11120 for (j = 0; j < NWORDS; j++)
11121 if (ored_words[j] != 0)
11126 for (i = j + 1; i < NWORDS; i++)
11127 if (ored_words[i] != 0)
11129 fprintf (fp, "unknown");
11130 return (fclose (fp) != 0);
11133 if ((ored_words[j] >> i) & 1)
11135 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11136 return (fclose (fp) != 0);
11139 fprintf (fp, "unknown");
11140 return (fclose (fp) != 0);
11144 if ac_fn_c_try_run "$LINENO"; then :
11145 gl_cv_cc_double_expbit0=`cat conftest.out`
11147 gl_cv_cc_double_expbit0="unknown"
11149 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11150 conftest.$ac_objext conftest.beam conftest.$ac_ext
11156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11157 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
11158 case "$gl_cv_cc_double_expbit0" in
11160 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11161 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
11163 cat >>confdefs.h <<_ACEOF
11164 #define DBL_EXPBIT0_WORD $word
11168 cat >>confdefs.h <<_ACEOF
11169 #define DBL_EXPBIT0_BIT $bit
11183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11184 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
11185 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
11186 printf %s "(cached) " >&6
11189 if test "$cross_compiling" = yes; then :
11192 # Guess yes on glibc systems.
11193 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11194 # Guess yes on FreeBSD >= 5.
11195 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
11196 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11197 # Guess yes on Mac OS X >= 10.3.
11198 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
11199 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11200 # Guess yes on OpenBSD >= 3.9.
11201 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11202 gl_cv_func_snprintf_retval_c99="guessing no";;
11203 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11204 # Guess yes on Solaris >= 2.10.
11205 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11206 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
11207 # Guess yes on AIX >= 4.
11208 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
11209 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11210 # Guess yes on NetBSD >= 3.
11211 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11212 gl_cv_func_snprintf_retval_c99="guessing no";;
11213 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11214 # Guess yes on BeOS.
11215 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11216 # If we don't know, assume the worst.
11217 *) gl_cv_func_snprintf_retval_c99="guessing no";;
11221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11222 /* end confdefs.h. */
11225 #include <string.h>
11227 # define my_snprintf snprintf
11229 # include <stdarg.h>
11230 static int my_snprintf (char *buf, int size, const char *format, ...)
11234 va_start (args, format);
11235 ret = vsnprintf (buf, size, format, args);
11240 static char buf[100];
11243 strcpy (buf, "ABCDEF");
11244 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11246 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11248 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11253 if ac_fn_c_try_run "$LINENO"; then :
11254 gl_cv_func_snprintf_retval_c99=yes
11256 gl_cv_func_snprintf_retval_c99=no
11258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11259 conftest.$ac_objext conftest.beam conftest.$ac_ext
11264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11265 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
11272 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
11274 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
11275 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11276 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11277 cat >>confdefs.h <<_ACEOF
11278 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
11284 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11286 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
11292 cat >>confdefs.h <<_ACEOF
11293 #define HAVE_DECL__SNPRINTF $ac_have_decl
11298 case "$gl_cv_func_snprintf_retval_c99" in
11301 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11329 GNULIB_COPYSIGNF=0;
11330 GNULIB_COPYSIGNL=0;
11389 GNULIB_REMAINDER=0;
11390 GNULIB_REMAINDERF=0;
11391 GNULIB_REMAINDERL=0;
11477 HAVE_DECL_COPYSIGNF=1;
11483 HAVE_DECL_EXPM1L=1;
11484 HAVE_DECL_FLOORF=1;
11485 HAVE_DECL_FLOORL=1;
11486 HAVE_DECL_FREXPL=1;
11487 HAVE_DECL_LDEXPL=1;
11489 HAVE_DECL_LOG10L=1;
11494 HAVE_DECL_REMAINDER=1;
11495 HAVE_DECL_REMAINDERL=1;
11498 HAVE_DECL_ROUNDF=1;
11499 HAVE_DECL_ROUNDL=1;
11504 HAVE_DECL_TRUNCF=1;
11505 HAVE_DECL_TRUNCL=1;
11528 REPLACE_HUGE_VAL=0;
11534 REPLACE_ISFINITE=0;
11557 REPLACE_REMAINDER=0;
11558 REPLACE_REMAINDERF=0;
11559 REPLACE_REMAINDERL=0;
11564 REPLACE_SIGNBIT_USING_GCC=0;
11571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11572 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
11573 if ${gl_cv_func_frexp_no_libm+:} false; then :
11574 printf %s "(cached) " >&6
11577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11578 /* end confdefs.h. */
11584 int e; return frexp (x, &e) > 0;
11589 if ac_fn_c_try_link "$LINENO"; then :
11590 gl_cv_func_frexp_no_libm=yes
11592 gl_cv_func_frexp_no_libm=no
11594 rm -f core conftest.err conftest.$ac_objext \
11595 conftest$ac_exeext conftest.$ac_ext
11598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11599 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
11601 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
11602 if test "x$ac_cv_have_decl_alarm" = xyes; then :
11608 cat >>confdefs.h <<_ACEOF
11609 #define HAVE_DECL_ALARM $ac_have_decl
11613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11614 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
11615 if ${gl_cv_var_stdin_large_offset+:} false; then :
11616 printf %s "(cached) " >&6
11618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11619 /* end confdefs.h. */
11624 #if defined __SL64 && defined __SCLE /* cygwin */
11625 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11626 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
11627 it is easier to do a version check than building a runtime test. */
11628 # include <cygwin/version.h>
11629 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11637 if ac_fn_c_try_link "$LINENO"; then :
11638 gl_cv_var_stdin_large_offset=yes
11640 gl_cv_var_stdin_large_offset=no
11642 rm -f core conftest.err conftest.$ac_objext \
11643 conftest$ac_exeext conftest.$ac_ext
11645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11646 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
11654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11655 printf %s "checking for 64-bit off_t... " >&6; }
11656 if ${gl_cv_type_off_t_64+:} false; then :
11657 printf %s "(cached) " >&6
11659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11660 /* end confdefs.h. */
11661 #include <sys/types.h>
11662 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11672 if ac_fn_c_try_compile "$LINENO"; then :
11673 gl_cv_type_off_t_64=yes
11675 gl_cv_type_off_t_64=no
11677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11681 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
11682 if test $gl_cv_type_off_t_64 = no; then
11683 WINDOWS_64_BIT_OFF_T=1
11685 WINDOWS_64_BIT_OFF_T=0
11687 WINDOWS_64_BIT_ST_SIZE=1
11690 WINDOWS_64_BIT_OFF_T=0
11691 WINDOWS_64_BIT_ST_SIZE=0
11711 if test $gl_cv_have_include_next = yes; then
11712 gl_cv_next_sys_types_h='<'sys/types.h'>'
11714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
11715 printf %s "checking absolute name of <sys/types.h>... " >&6; }
11716 if ${gl_cv_next_sys_types_h+:} false; then :
11717 printf %s "(cached) " >&6
11720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11721 /* end confdefs.h. */
11722 #include <sys/types.h>
11726 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11727 *) gl_absname_cpp="$ac_cpp" ;;
11732 gl_dirsep_regex='[/\\]'
11735 gl_dirsep_regex='\/'
11738 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11740 gl_header_literal_regex=`echo 'sys/types.h' \
11741 | sed -e "$gl_make_literal_regex_sed"`
11742 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11743 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11748 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11749 sed -n "$gl_absolute_header_sed"`'"'
11753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
11754 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
11756 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
11758 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11759 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11760 gl_next_as_first_directive='<'sys/types.h'>'
11762 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11763 gl_next_as_first_directive=$gl_cv_next_sys_types_h
11765 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
11777 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11778 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11784 cat >>confdefs.h <<_ACEOF
11785 #define HAVE_DECL_FSEEKO $ac_have_decl
11796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11797 printf %s "checking for fseeko... " >&6; }
11798 if ${gl_cv_func_fseeko+:} false; then :
11799 printf %s "(cached) " >&6
11802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11803 /* end confdefs.h. */
11809 fseeko (stdin, 0, 0);
11814 if ac_fn_c_try_link "$LINENO"; then :
11815 gl_cv_func_fseeko=yes
11817 gl_cv_func_fseeko=no
11819 rm -f core conftest.err conftest.$ac_objext \
11820 conftest$ac_exeext conftest.$ac_ext
11823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11824 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
11827 if test $ac_cv_have_decl_fseeko = no; then
11831 if test $gl_cv_func_fseeko = no; then
11834 if test $WINDOWS_64_BIT_OFF_T = 1; then
11837 if test $gl_cv_var_stdin_large_offset = no; then
11843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
11844 printf %s "checking whether fflush works on input streams... " >&6; }
11845 if ${gl_cv_func_fflush_stdin+:} false; then :
11846 printf %s "(cached) " >&6
11848 echo hello world > conftest.txt
11849 if test "$cross_compiling" = yes; then :
11850 gl_cv_func_fflush_stdin=no
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h. */
11857 # include <unistd.h>
11858 #else /* on Windows with MSVC */
11865 FILE *f = fopen ("conftest.txt", "r");
11872 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
11874 /* For deterministic results, ensure f read a bigger buffer. */
11875 if (lseek (fd, 0, SEEK_CUR) == 5)
11877 /* POSIX requires fflush-fseek to set file offset of fd. This fails
11878 on BSD systems and on mingw. */
11879 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
11881 if (lseek (fd, 0, SEEK_CUR) != 5)
11883 /* Verify behaviour of fflush after ungetc. See
11884 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
11885 /* Verify behaviour of fflush after a backup ungetc. This fails on
11890 if (fgetc (f) != c)
11892 /* Verify behaviour of fflush after a non-backup ungetc. This fails
11893 on glibc 2.8 and on BSD systems. */
11897 if (fgetc (f) != c)
11905 if ac_fn_c_try_run "$LINENO"; then :
11906 gl_cv_func_fflush_stdin=yes
11908 gl_cv_func_fflush_stdin=no
11910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11911 conftest.$ac_objext conftest.beam conftest.$ac_ext
11917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
11918 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
11920 if test $gl_cv_func_fflush_stdin = no; then
11941 GNULIB_UTIMENSAT=0;
11955 REPLACE_FUTIMENS=0;
11961 REPLACE_UTIMENSAT=0;
11963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11964 printf %s "checking whether stat file-mode macros are broken... " >&6; }
11965 if ${ac_cv_header_stat_broken+:} false; then :
11966 printf %s "(cached) " >&6
11968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11969 /* end confdefs.h. */
11970 #include <sys/types.h>
11971 #include <sys/stat.h>
11973 #if defined S_ISBLK && defined S_IFDIR
11974 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11977 #if defined S_ISBLK && defined S_IFCHR
11978 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11981 #if defined S_ISLNK && defined S_IFREG
11982 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11985 #if defined S_ISSOCK && defined S_IFREG
11986 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11990 if ac_fn_c_try_compile "$LINENO"; then :
11991 ac_cv_header_stat_broken=no
11993 ac_cv_header_stat_broken=yes
11995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11998 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
11999 if test $ac_cv_header_stat_broken = yes; then
12001 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12021 if test $gl_cv_have_include_next = yes; then
12022 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12025 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
12026 if ${gl_cv_next_sys_stat_h+:} false; then :
12027 printf %s "(cached) " >&6
12030 if test $ac_cv_header_sys_stat_h = yes; then
12033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12034 /* end confdefs.h. */
12035 #include <sys/stat.h>
12039 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12040 *) gl_absname_cpp="$ac_cpp" ;;
12045 gl_dirsep_regex='[/\\]'
12048 gl_dirsep_regex='\/'
12051 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12053 gl_header_literal_regex=`echo 'sys/stat.h' \
12054 | sed -e "$gl_make_literal_regex_sed"`
12055 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12056 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12061 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12062 sed -n "$gl_absolute_header_sed"`'"'
12064 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12070 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
12072 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12074 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12075 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12076 gl_next_as_first_directive='<'sys/stat.h'>'
12078 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12079 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12081 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12093 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
12095 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
12099 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12100 #include <sys/stat.h>
12102 if test "x$ac_cv_type_nlink_t" = xyes; then :
12106 printf "%s\n" "#define nlink_t int" >>confdefs.h
12113 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12114 if test "x$ac_cv_have_decl_ftello" = xyes; then :
12120 cat >>confdefs.h <<_ACEOF
12121 #define HAVE_DECL_FTELLO $ac_have_decl
12133 if test $ac_cv_have_decl_ftello = no; then
12137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12138 printf %s "checking for ftello... " >&6; }
12139 if ${gl_cv_func_ftello+:} false; then :
12140 printf %s "(cached) " >&6
12143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12144 /* end confdefs.h. */
12154 if ac_fn_c_try_link "$LINENO"; then :
12155 gl_cv_func_ftello=yes
12157 gl_cv_func_ftello=no
12159 rm -f core conftest.err conftest.$ac_objext \
12160 conftest$ac_exeext conftest.$ac_ext
12163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12164 printf "%s\n" "$gl_cv_func_ftello" >&6; }
12165 if test $gl_cv_func_ftello = no; then
12168 if test $WINDOWS_64_BIT_OFF_T = 1; then
12171 if test $gl_cv_var_stdin_large_offset = no; then
12174 if test $REPLACE_FTELLO = 0; then
12176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12177 printf %s "checking whether ftello works... " >&6; }
12178 if ${gl_cv_func_ftello_works+:} false; then :
12179 printf %s "(cached) " >&6
12183 # Guess no on Solaris.
12184 solaris*) gl_cv_func_ftello_works="guessing no" ;;
12185 # Guess yes otherwise.
12186 *) gl_cv_func_ftello_works="guessing yes" ;;
12188 if test "$cross_compiling" = yes; then :
12191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12192 /* end confdefs.h. */
12195 #include <stdlib.h>
12196 #include <string.h>
12197 #define TESTFILE "conftest.tmp"
12203 /* Create a file with some contents. */
12204 fp = fopen (TESTFILE, "w");
12207 if (fwrite ("foogarsh", 1, 8, fp) < 8)
12212 /* The file's contents is now "foogarsh". */
12214 /* Try writing after reading to EOF. */
12215 fp = fopen (TESTFILE, "r+");
12218 if (fseek (fp, -1, SEEK_END))
12220 if (!(getc (fp) == 'h'))
12222 if (!(getc (fp) == EOF))
12224 if (!(ftell (fp) == 8))
12226 if (!(ftell (fp) == 8))
12228 if (!(putc ('!', fp) == '!'))
12230 if (!(ftell (fp) == 9))
12232 if (!(fclose (fp) == 0))
12234 fp = fopen (TESTFILE, "r");
12239 if (!(fread (buf, 1, 10, fp) == 9))
12241 if (!(memcmp (buf, "foogarsh!", 9) == 0))
12244 if (!(fclose (fp) == 0))
12247 /* The file's contents is now "foogarsh!". */
12252 if ac_fn_c_try_run "$LINENO"; then :
12253 gl_cv_func_ftello_works=yes
12255 gl_cv_func_ftello_works=no
12257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12258 conftest.$ac_objext conftest.beam conftest.$ac_ext
12263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12264 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
12265 case "$gl_cv_func_ftello_works" in
12270 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12280 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12281 if ${gl_cv_func_getcwd_null+:} false; then :
12282 printf %s "(cached) " >&6
12284 if test "$cross_compiling" = yes; then :
12286 # Guess yes on glibc systems.
12287 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
12288 # Guess yes on Cygwin.
12289 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
12290 # If we don't know, assume the worst.
12291 *) gl_cv_func_getcwd_null="guessing no";;
12295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12296 /* end confdefs.h. */
12299 # include <unistd.h>
12300 # else /* on Windows with MSVC */
12301 # include <direct.h>
12311 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12312 /* mingw cwd does not start with '/', but getcwd does allocate.
12313 However, mingw fails to honor non-zero size. */
12315 if (chdir ("/") != 0)
12319 char *f = getcwd (NULL, 0);
12334 if ac_fn_c_try_run "$LINENO"; then :
12335 gl_cv_func_getcwd_null=yes
12337 gl_cv_func_getcwd_null=no
12339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12340 conftest.$ac_objext conftest.beam conftest.$ac_ext
12344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12345 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
12348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
12349 printf %s "checking for getcwd with POSIX signature... " >&6; }
12350 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
12351 printf %s "(cached) " >&6
12353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12354 /* end confdefs.h. */
12355 #include <unistd.h>
12363 char *getcwd (char *, size_t);
12370 if ac_fn_c_try_compile "$LINENO"; then :
12371 gl_cv_func_getcwd_posix_signature=yes
12373 gl_cv_func_getcwd_posix_signature=no
12375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
12379 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
12398 if test $gl_cv_have_include_next = yes; then
12399 gl_cv_next_getopt_h='<'getopt.h'>'
12401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12402 printf %s "checking absolute name of <getopt.h>... " >&6; }
12403 if ${gl_cv_next_getopt_h+:} false; then :
12404 printf %s "(cached) " >&6
12407 if test $ac_cv_header_getopt_h = yes; then
12410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12411 /* end confdefs.h. */
12412 #include <getopt.h>
12416 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12417 *) gl_absname_cpp="$ac_cpp" ;;
12422 gl_dirsep_regex='[/\\]'
12425 gl_dirsep_regex='\/'
12428 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12430 gl_header_literal_regex=`echo 'getopt.h' \
12431 | sed -e "$gl_make_literal_regex_sed"`
12432 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12433 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12438 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12439 sed -n "$gl_absolute_header_sed"`'"'
12441 gl_cv_next_getopt_h='<'getopt.h'>'
12446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12447 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
12449 NEXT_GETOPT_H=$gl_cv_next_getopt_h
12451 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12452 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12453 gl_next_as_first_directive='<'getopt.h'>'
12455 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12456 gl_next_as_first_directive=$gl_cv_next_getopt_h
12458 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12463 if test $ac_cv_header_getopt_h = yes; then
12472 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12473 for ac_header in getopt.h
12475 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12476 if test "x$ac_cv_header_getopt_h" = xyes; then :
12477 cat >>confdefs.h <<_ACEOF
12478 #define HAVE_GETOPT_H 1
12482 gl_replace_getopt=yes
12489 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12490 for ac_func in getopt_long_only
12492 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12493 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
12494 cat >>confdefs.h <<_ACEOF
12495 #define HAVE_GETOPT_LONG_ONLY 1
12499 gl_replace_getopt=yes
12505 if test -z "$gl_replace_getopt"; then
12506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12507 printf %s "checking whether getopt is POSIX compatible... " >&6; }
12508 if ${gl_cv_func_getopt_posix+:} false; then :
12509 printf %s "(cached) " >&6
12512 if test $cross_compiling = no; then
12513 if test "$cross_compiling" = yes; then :
12514 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12515 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12516 as_fn_error $? "cannot run test program while cross compiling
12517 See \`config.log' for more details" "$LINENO" 5; }
12519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12520 /* end confdefs.h. */
12522 #include <unistd.h>
12523 #include <stdlib.h>
12524 #include <string.h>
12529 static char program[] = "program";
12530 static char a[] = "-a";
12531 static char foo[] = "foo";
12532 static char bar[] = "bar";
12533 char *argv[] = { program, a, foo, bar, NULL };
12536 c = getopt (4, argv, "ab");
12539 c = getopt (4, argv, "ab");
12542 if (!(optind == 2))
12548 if ac_fn_c_try_run "$LINENO"; then :
12549 gl_cv_func_getopt_posix=maybe
12551 gl_cv_func_getopt_posix=no
12553 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12554 conftest.$ac_objext conftest.beam conftest.$ac_ext
12557 if test $gl_cv_func_getopt_posix = maybe; then
12558 if test "$cross_compiling" = yes; then :
12559 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12560 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12561 as_fn_error $? "cannot run test program while cross compiling
12562 See \`config.log' for more details" "$LINENO" 5; }
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565 /* end confdefs.h. */
12567 #include <unistd.h>
12568 #include <stdlib.h>
12569 #include <string.h>
12574 static char program[] = "program";
12575 static char donald[] = "donald";
12576 static char p[] = "-p";
12577 static char billy[] = "billy";
12578 static char duck[] = "duck";
12579 static char a[] = "-a";
12580 static char bar[] = "bar";
12581 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
12584 c = getopt (7, argv, "+abp:q:");
12587 if (!(strcmp (argv[0], "program") == 0))
12589 if (!(strcmp (argv[1], "donald") == 0))
12591 if (!(strcmp (argv[2], "-p") == 0))
12593 if (!(strcmp (argv[3], "billy") == 0))
12595 if (!(strcmp (argv[4], "duck") == 0))
12597 if (!(strcmp (argv[5], "-a") == 0))
12599 if (!(strcmp (argv[6], "bar") == 0))
12601 if (!(optind == 1))
12607 if ac_fn_c_try_run "$LINENO"; then :
12608 gl_cv_func_getopt_posix=maybe
12610 gl_cv_func_getopt_posix=no
12612 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12613 conftest.$ac_objext conftest.beam conftest.$ac_ext
12617 if test $gl_cv_func_getopt_posix = maybe; then
12618 if test "$cross_compiling" = yes; then :
12619 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12620 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12621 as_fn_error $? "cannot run test program while cross compiling
12622 See \`config.log' for more details" "$LINENO" 5; }
12624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12625 /* end confdefs.h. */
12627 #include <unistd.h>
12628 #include <stdlib.h>
12629 #include <string.h>
12634 static char program[] = "program";
12635 static char ab[] = "-ab";
12636 char *argv[3] = { program, ab, NULL };
12637 if (getopt (2, argv, "ab:") != 'a')
12639 if (getopt (2, argv, "ab:") != '?')
12649 if ac_fn_c_try_run "$LINENO"; then :
12650 gl_cv_func_getopt_posix=yes
12652 gl_cv_func_getopt_posix=no
12654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12655 conftest.$ac_objext conftest.beam conftest.$ac_ext
12661 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
12662 *) gl_cv_func_getopt_posix="guessing yes";;
12667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
12668 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
12669 case "$gl_cv_func_getopt_posix" in
12670 *no) gl_replace_getopt=yes ;;
12674 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12676 printf %s "checking for working GNU getopt function... " >&6; }
12677 if ${gl_cv_func_getopt_gnu+:} false; then :
12678 printf %s "(cached) " >&6
12680 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
12681 # optstring is necessary for programs like m4 that have POSIX-mandated
12682 # semantics for supporting options interspersed with files.
12683 # Also, since getopt_long is a GNU extension, we require optind=0.
12684 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
12685 # so take care to revert to the correct (non-)export state.
12686 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
12687 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
12688 xx) gl_had_POSIXLY_CORRECT=exported ;;
12689 x) gl_had_POSIXLY_CORRECT=yes ;;
12690 *) gl_had_POSIXLY_CORRECT= ;;
12693 export POSIXLY_CORRECT
12694 if test "$cross_compiling" = yes; then :
12695 gl_cv_func_getopt_gnu="guessing no"
12698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12699 /* end confdefs.h. */
12700 #include <getopt.h>
12701 #include <stddef.h>
12702 #include <string.h>
12704 #include <stdlib.h>
12705 #if defined __MACH__ && defined __APPLE__
12706 /* Avoid a crash on Mac OS X. */
12707 #include <mach/mach.h>
12708 #include <mach/mach_error.h>
12709 #include <mach/thread_status.h>
12710 #include <mach/exception.h>
12711 #include <mach/task.h>
12712 #include <pthread.h>
12713 /* The exception port on which our thread listens. */
12714 static mach_port_t our_exception_port;
12715 /* The main function of the thread listening for exceptions of type
12718 mach_exception_thread (void *arg)
12720 /* Buffer for a message to be received. */
12722 mach_msg_header_t head;
12723 mach_msg_body_t msgh_body;
12726 mach_msg_return_t retval;
12727 /* Wait for a message on the exception port. */
12728 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12729 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12730 if (retval != MACH_MSG_SUCCESS)
12735 nocrash_init (void)
12737 mach_port_t self = mach_task_self ();
12738 /* Allocate a port on which the thread shall listen for exceptions. */
12739 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12741 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
12742 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12743 MACH_MSG_TYPE_MAKE_SEND)
12745 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
12747 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12748 /* Create the thread listening on the exception port. */
12749 pthread_attr_t attr;
12751 if (pthread_attr_init (&attr) == 0
12752 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12753 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12754 pthread_attr_destroy (&attr);
12755 /* Replace the exception port info for these exceptions with our own.
12756 Note that we replace the exception port for the entire task, not only
12757 for a particular thread. This has the effect that when our exception
12758 port gets the message, the thread specific exception port has already
12759 been asked, and we don't need to bother about it.
12760 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
12761 task_set_exception_ports (self, mask, our_exception_port,
12762 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12767 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12768 /* Avoid a crash on native Windows. */
12769 #define WIN32_LEAN_AND_MEAN
12770 #include <windows.h>
12771 #include <winerror.h>
12773 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12775 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12777 case EXCEPTION_ACCESS_VIOLATION:
12778 case EXCEPTION_IN_PAGE_ERROR:
12779 case EXCEPTION_STACK_OVERFLOW:
12780 case EXCEPTION_GUARD_PAGE:
12781 case EXCEPTION_PRIV_INSTRUCTION:
12782 case EXCEPTION_ILLEGAL_INSTRUCTION:
12783 case EXCEPTION_DATATYPE_MISALIGNMENT:
12784 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12785 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12788 return EXCEPTION_CONTINUE_SEARCH;
12791 nocrash_init (void)
12793 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12796 /* Avoid a crash on POSIX systems. */
12797 #include <signal.h>
12798 /* A POSIX signal handler. */
12800 exception_handler (int sig)
12805 nocrash_init (void)
12808 signal (SIGSEGV, exception_handler);
12811 signal (SIGBUS, exception_handler);
12825 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12826 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12827 OSF/1 5.1, Solaris 10. */
12829 static char conftest[] = "conftest";
12830 static char plus[] = "-+";
12831 char *argv[3] = { conftest, plus, NULL };
12833 if (getopt (2, argv, "+a") != '?')
12836 /* This code succeeds on glibc 2.8, mingw,
12837 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12838 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
12840 static char program[] = "program";
12841 static char p[] = "-p";
12842 static char foo[] = "foo";
12843 static char bar[] = "bar";
12844 char *argv[] = { program, p, foo, bar, NULL };
12847 if (getopt (4, argv, "p::") != 'p')
12849 else if (optarg != NULL)
12851 else if (getopt (4, argv, "p::") != -1)
12853 else if (optind != 2)
12856 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
12858 static char program[] = "program";
12859 static char foo[] = "foo";
12860 static char p[] = "-p";
12861 char *argv[] = { program, foo, p, NULL };
12863 if (getopt (3, argv, "-p") != 1)
12865 else if (getopt (3, argv, "-p") != 'p')
12868 /* This code fails on glibc 2.11. */
12870 static char program[] = "program";
12871 static char b[] = "-b";
12872 static char a[] = "-a";
12873 char *argv[] = { program, b, a, NULL };
12874 optind = opterr = 0;
12875 if (getopt (3, argv, "+:a:b") != 'b')
12877 else if (getopt (3, argv, "+:a:b") != ':')
12880 /* This code dumps core on glibc 2.14. */
12882 static char program[] = "program";
12883 static char w[] = "-W";
12884 static char dummy[] = "dummy";
12885 char *argv[] = { program, w, dummy, NULL };
12886 optind = opterr = 1;
12887 if (getopt (3, argv, "W;") != 'W')
12896 if ac_fn_c_try_run "$LINENO"; then :
12897 gl_cv_func_getopt_gnu=yes
12899 gl_cv_func_getopt_gnu=no
12901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12902 conftest.$ac_objext conftest.beam conftest.$ac_ext
12905 case $gl_had_POSIXLY_CORRECT in
12907 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12908 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12913 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
12914 if test "$gl_cv_func_getopt_gnu" != yes; then
12915 gl_replace_getopt=yes
12917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
12918 printf %s "checking for working GNU getopt_long function... " >&6; }
12919 if ${gl_cv_func_getopt_long_gnu+:} false; then :
12920 printf %s "(cached) " >&6
12922 if test "$cross_compiling" = yes; then :
12924 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
12925 *) gl_cv_func_getopt_long_gnu="guessing yes";;
12929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930 /* end confdefs.h. */
12931 #include <getopt.h>
12932 #include <stddef.h>
12933 #include <string.h>
12938 static const struct option long_options[] =
12940 { "xtremely-",no_argument, NULL, 1003 },
12941 { "xtra", no_argument, NULL, 1001 },
12942 { "xtreme", no_argument, NULL, 1002 },
12943 { "xtremely", no_argument, NULL, 1003 },
12944 { NULL, 0, NULL, 0 }
12946 /* This code fails on OpenBSD 5.0. */
12948 static char program[] = "program";
12949 static char xtremel[] = "--xtremel";
12950 char *argv[] = { program, xtremel, NULL };
12952 optind = 1; opterr = 0;
12953 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
12962 if ac_fn_c_try_run "$LINENO"; then :
12963 gl_cv_func_getopt_long_gnu=yes
12965 gl_cv_func_getopt_long_gnu=no
12967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12968 conftest.$ac_objext conftest.beam conftest.$ac_ext
12973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
12974 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
12975 case "$gl_cv_func_getopt_long_gnu" in
12977 *) gl_replace_getopt=yes ;;
12988 if test -n "$gl_replace_getopt"; then
12992 if test $REPLACE_GETOPT = 1; then
12996 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
13002 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
13003 if test "x$ac_cv_have_decl_getenv" = xyes; then :
13009 cat >>confdefs.h <<_ACEOF
13010 #define HAVE_DECL_GETENV $ac_have_decl
13018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13019 printf %s "checking for C/C++ restrict keyword... " >&6; }
13020 if ${ac_cv_c_restrict+:} false; then :
13021 printf %s "(cached) " >&6
13023 ac_cv_c_restrict=no
13024 # The order here caters to the fact that C++ does not require restrict.
13025 for ac_kw in __restrict __restrict__ _Restrict restrict; do
13026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027 /* end confdefs.h. */
13028 typedef int * int_ptr;
13029 int foo (int_ptr $ac_kw ip) {
13036 int * $ac_kw t = s;
13043 if ac_fn_c_try_compile "$LINENO"; then :
13044 ac_cv_c_restrict=$ac_kw
13046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13047 test "$ac_cv_c_restrict" != no && break
13051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
13052 printf "%s\n" "$ac_cv_c_restrict" >&6; }
13054 case $ac_cv_c_restrict in
13056 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
13058 *) cat >>confdefs.h <<_ACEOF
13059 #define restrict $ac_cv_c_restrict
13065 GNULIB_GETTIMEOFDAY=0;
13066 HAVE_GETTIMEOFDAY=1;
13067 HAVE_STRUCT_TIMEVAL=1;
13069 REPLACE_GETTIMEOFDAY=0;
13070 REPLACE_STRUCT_TIMEVAL=0;
13087 if test $gl_cv_have_include_next = yes; then
13088 gl_cv_next_sys_time_h='<'sys/time.h'>'
13090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13091 printf %s "checking absolute name of <sys/time.h>... " >&6; }
13092 if ${gl_cv_next_sys_time_h+:} false; then :
13093 printf %s "(cached) " >&6
13096 if test $ac_cv_header_sys_time_h = yes; then
13099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13100 /* end confdefs.h. */
13101 #include <sys/time.h>
13105 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13106 *) gl_absname_cpp="$ac_cpp" ;;
13111 gl_dirsep_regex='[/\\]'
13114 gl_dirsep_regex='\/'
13117 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13119 gl_header_literal_regex=`echo 'sys/time.h' \
13120 | sed -e "$gl_make_literal_regex_sed"`
13121 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13122 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13127 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13128 sed -n "$gl_absolute_header_sed"`'"'
13130 gl_cv_next_sys_time_h='<'sys/time.h'>'
13135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13136 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
13138 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13140 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13141 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13142 gl_next_as_first_directive='<'sys/time.h'>'
13144 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13145 gl_next_as_first_directive=$gl_cv_next_sys_time_h
13147 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13153 if test $ac_cv_header_sys_time_h != yes; then
13161 if test $ac_cv_header_sys_socket_h != yes; then
13162 for ac_header in winsock2.h
13164 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13165 if test "x$ac_cv_header_winsock2_h" = xyes; then :
13166 cat >>confdefs.h <<_ACEOF
13167 #define HAVE_WINSOCK2_H 1
13175 if test "$ac_cv_header_winsock2_h" = yes; then
13177 UNISTD_H_HAVE_WINSOCK2_H=1
13178 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13185 printf %s "checking for struct timeval... " >&6; }
13186 if ${gl_cv_sys_struct_timeval+:} false; then :
13187 printf %s "(cached) " >&6
13189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13190 /* end confdefs.h. */
13191 #if HAVE_SYS_TIME_H
13192 #include <sys/time.h>
13195 #if HAVE_WINSOCK2_H
13196 # include <winsock2.h>
13202 static struct timeval x; x.tv_sec = x.tv_usec;
13207 if ac_fn_c_try_compile "$LINENO"; then :
13208 gl_cv_sys_struct_timeval=yes
13210 gl_cv_sys_struct_timeval=no
13212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13216 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
13217 if test $gl_cv_sys_struct_timeval != yes; then
13218 HAVE_STRUCT_TIMEVAL=0
13220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13221 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13222 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
13223 printf %s "(cached) " >&6
13225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13226 /* end confdefs.h. */
13227 #if HAVE_SYS_TIME_H
13228 #include <sys/time.h>
13231 #if HAVE_WINSOCK2_H
13232 # include <winsock2.h>
13238 static struct timeval x;
13239 typedef int verify_tv_sec_type[
13240 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13247 if ac_fn_c_try_compile "$LINENO"; then :
13248 gl_cv_sys_struct_timeval_tv_sec=yes
13250 gl_cv_sys_struct_timeval_tv_sec=no
13252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13256 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13257 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13258 REPLACE_STRUCT_TIMEVAL=1
13268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
13269 printf %s "checking where to find the exponent in a 'float'... " >&6; }
13270 if ${gl_cv_cc_float_expbit0+:} false; then :
13271 printf %s "(cached) " >&6
13274 if test "$cross_compiling" = yes; then :
13275 gl_cv_cc_float_expbit0="word 0 bit 23"
13277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h. */
13281 #include <stddef.h>
13283 #include <string.h>
13285 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13286 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13287 static unsigned int ored_words[NWORDS];
13288 static unsigned int anded_words[NWORDS];
13289 static void add_to_ored_words (float x)
13293 /* Clear it first, in case
13294 sizeof (float) < sizeof (memory_float). */
13295 memset (&m, 0, sizeof (memory_float));
13297 for (i = 0; i < NWORDS; i++)
13299 ored_words[i] |= m.word[i];
13300 anded_words[i] &= m.word[i];
13306 FILE *fp = fopen ("conftest.out", "w");
13309 for (j = 0; j < NWORDS; j++)
13310 anded_words[j] = ~ (unsigned int) 0;
13311 add_to_ored_words (0.25f);
13312 add_to_ored_words (0.5f);
13313 add_to_ored_words (1.0f);
13314 add_to_ored_words (2.0f);
13315 add_to_ored_words (4.0f);
13316 /* Remove bits that are common (e.g. if representation of the first mantissa
13317 bit is explicit). */
13318 for (j = 0; j < NWORDS; j++)
13319 ored_words[j] &= ~anded_words[j];
13320 /* Now find the nonzero word. */
13321 for (j = 0; j < NWORDS; j++)
13322 if (ored_words[j] != 0)
13327 for (i = j + 1; i < NWORDS; i++)
13328 if (ored_words[i] != 0)
13330 fprintf (fp, "unknown");
13331 return (fclose (fp) != 0);
13334 if ((ored_words[j] >> i) & 1)
13336 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13337 return (fclose (fp) != 0);
13340 fprintf (fp, "unknown");
13341 return (fclose (fp) != 0);
13345 if ac_fn_c_try_run "$LINENO"; then :
13346 gl_cv_cc_float_expbit0=`cat conftest.out`
13348 gl_cv_cc_float_expbit0="unknown"
13350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13351 conftest.$ac_objext conftest.beam conftest.$ac_ext
13357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13358 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
13359 case "$gl_cv_cc_float_expbit0" in
13361 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13362 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13364 cat >>confdefs.h <<_ACEOF
13365 #define FLT_EXPBIT0_WORD $word
13369 cat >>confdefs.h <<_ACEOF
13370 #define FLT_EXPBIT0_BIT $bit
13377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13378 printf %s "checking for nl_langinfo and CODESET... " >&6; }
13379 if ${am_cv_langinfo_codeset+:} false; then :
13380 printf %s "(cached) " >&6
13382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13383 /* end confdefs.h. */
13384 #include <langinfo.h>
13388 char* cs = nl_langinfo(CODESET); return !cs;
13393 if ac_fn_c_try_link "$LINENO"; then :
13394 am_cv_langinfo_codeset=yes
13396 am_cv_langinfo_codeset=no
13398 rm -f core conftest.err conftest.$ac_objext \
13399 conftest$ac_exeext conftest.$ac_ext
13402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13403 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
13404 if test $am_cv_langinfo_codeset = yes; then
13406 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13410 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13411 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13417 cat >>confdefs.h <<_ACEOF
13418 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13423 printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13424 if ${ac_cv_gnu_library_2_1+:} false; then :
13425 printf %s "(cached) " >&6
13427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13428 /* end confdefs.h. */
13430 #include <features.h>
13431 #ifdef __GNU_LIBRARY__
13432 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13442 $EGREP "Lucky" >/dev/null 2>&1; then :
13443 ac_cv_gnu_library_2_1=yes
13445 ac_cv_gnu_library_2_1=no
13452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13453 printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; }
13455 GLIBC21="$ac_cv_gnu_library_2_1"
13459 if test "X$prefix" = "XNONE"; then
13460 acl_final_prefix="$ac_default_prefix"
13462 acl_final_prefix="$prefix"
13464 if test "X$exec_prefix" = "XNONE"; then
13465 acl_final_exec_prefix='${prefix}'
13467 acl_final_exec_prefix="$exec_prefix"
13469 acl_save_prefix="$prefix"
13470 prefix="$acl_final_prefix"
13471 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13472 prefix="$acl_save_prefix"
13476 # Check whether --with-gnu-ld was given.
13477 if test "${with_gnu_ld+set}" = set; then :
13478 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13483 # Prepare PATH_SEPARATOR.
13484 # The user is always right.
13485 if test "${PATH_SEPARATOR+set}" != set; then
13486 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13487 # contains only /bin. Note that ksh looks also at the FPATH variable,
13488 # so we have to set that as well for the test.
13490 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13491 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13492 || PATH_SEPARATOR=';'
13497 if test "$GCC" = yes; then
13498 # Check if gcc -print-prog-name=ld gives a path.
13499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13500 printf %s "checking for ld used by $CC... " >&6; }
13503 # gcc leaves a trailing carriage return which upsets mingw
13504 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13506 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13509 # Accept absolute paths.
13511 re_direlt='/[^/][^/]*/\.\./'
13512 # Canonicalize the pathname of ld
13513 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
13514 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
13515 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
13517 test -z "$LD" && LD="$ac_prog"
13520 # If it fails, then pretend we aren't using GCC.
13524 # If it is relative, then search for the first ld in PATH.
13525 with_gnu_ld=unknown
13528 elif test "$with_gnu_ld" = yes; then
13529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13530 printf %s "checking for GNU ld... " >&6; }
13532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13533 printf %s "checking for non-GNU ld... " >&6; }
13535 if ${acl_cv_path_LD+:} false; then :
13536 printf %s "(cached) " >&6
13538 if test -z "$LD"; then
13539 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13540 for ac_dir in $PATH; do
13541 IFS="$acl_save_ifs"
13542 test -z "$ac_dir" && ac_dir=.
13543 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13544 acl_cv_path_LD="$ac_dir/$ac_prog"
13545 # Check to see if the program is GNU ld. I'd rather use --version,
13546 # but apparently some variants of GNU ld only accept -v.
13547 # Break only if it was the GNU/non-GNU ld that we prefer.
13548 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
13549 *GNU* | *'with BFD'*)
13550 test "$with_gnu_ld" != no && break
13553 test "$with_gnu_ld" != yes && break
13558 IFS="$acl_save_ifs"
13560 acl_cv_path_LD="$LD" # Let the user override the test with a path.
13564 LD="$acl_cv_path_LD"
13565 if test -n "$LD"; then
13566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13567 printf "%s\n" "$LD" >&6; }
13569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13570 printf "%s\n" "no" >&6; }
13572 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13574 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
13575 if ${acl_cv_prog_gnu_ld+:} false; then :
13576 printf %s "(cached) " >&6
13578 # I'd rather use --version here, but apparently some GNU lds only accept -v.
13579 case `$LD -v 2>&1 </dev/null` in
13580 *GNU* | *'with BFD'*)
13581 acl_cv_prog_gnu_ld=yes
13584 acl_cv_prog_gnu_ld=no
13588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
13589 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
13590 with_gnu_ld=$acl_cv_prog_gnu_ld
13595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
13596 printf %s "checking for shared library run path origin... " >&6; }
13597 if ${acl_cv_rpath+:} false; then :
13598 printf %s "(cached) " >&6
13601 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
13602 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
13604 rm -f ./conftest.sh
13608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
13609 printf "%s\n" "$acl_cv_rpath" >&6; }
13611 acl_libext="$acl_cv_libext"
13612 acl_shlibext="$acl_cv_shlibext"
13613 acl_libname_spec="$acl_cv_libname_spec"
13614 acl_library_names_spec="$acl_cv_library_names_spec"
13615 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
13616 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
13617 acl_hardcode_direct="$acl_cv_hardcode_direct"
13618 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
13619 # Check whether --enable-rpath was given.
13620 if test "${enable_rpath+set}" = set; then :
13621 enableval=$enable_rpath; :
13633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
13634 printf %s "checking for 64-bit host... " >&6; }
13635 if ${gl_cv_solaris_64bit+:} false; then :
13636 printf %s "(cached) " >&6
13638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13639 /* end confdefs.h. */
13646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13647 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
13648 gl_cv_solaris_64bit=yes
13650 gl_cv_solaris_64bit=no
13656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
13657 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
13658 if test $gl_cv_solaris_64bit = yes; then
13659 acl_libdirstem=lib/64
13660 case "$host_cpu" in
13661 sparc*) acl_libdirstem2=lib/sparcv9 ;;
13662 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
13667 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
13668 if test -n "$searchpath"; then
13669 acl_save_IFS="${IFS= }"; IFS=":"
13670 for searchdir in $searchpath; do
13671 if test -d "$searchdir"; then
13672 case "$searchdir" in
13673 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
13675 # Better ignore directories of this form. They are misleading.
13677 *) searchdir=`cd "$searchdir" && pwd`
13678 case "$searchdir" in
13679 */lib64 ) acl_libdirstem=lib64 ;;
13684 IFS="$acl_save_IFS"
13688 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
13692 gl_threads_api=none
13697 if test "$gl_use_threads" != no; then
13698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13699 printf %s "checking whether imported symbols can be declared weak... " >&6; }
13700 if ${gl_cv_have_weak+:} false; then :
13701 printf %s "(cached) " >&6
13704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13705 /* end confdefs.h. */
13706 extern void xyzzy ();
13716 if ac_fn_c_try_link "$LINENO"; then :
13717 gl_cv_have_weak=maybe
13719 rm -f core conftest.err conftest.$ac_objext \
13720 conftest$ac_exeext conftest.$ac_ext
13721 if test $gl_cv_have_weak = maybe; then
13722 if test "$cross_compiling" = yes; then :
13723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13724 /* end confdefs.h. */
13726 Extensible Linking Format
13730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13731 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
13732 gl_cv_have_weak="guessing yes"
13734 gl_cv_have_weak="guessing no"
13740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13741 /* end confdefs.h. */
13747 return (fputs == NULL);
13750 if ac_fn_c_try_run "$LINENO"; then :
13751 gl_cv_have_weak=yes
13755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13756 conftest.$ac_objext conftest.beam conftest.$ac_ext
13762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13763 printf "%s\n" "$gl_cv_have_weak" >&6; }
13764 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
13765 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13766 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
13767 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13768 if test "x$ac_cv_header_pthread_h" = xyes; then :
13769 gl_have_pthread_h=yes
13771 gl_have_pthread_h=no
13775 if test "$gl_have_pthread_h" = yes; then
13776 # Other possible tests:
13777 # -lpthreads (FSU threads, PCthreads)
13780 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13781 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13782 # the second one only in libpthread, and lock.c needs it.
13783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13784 /* end confdefs.h. */
13785 #include <pthread.h>
13789 pthread_mutex_lock((pthread_mutex_t*)0);
13790 pthread_mutexattr_init((pthread_mutexattr_t*)0);
13795 if ac_fn_c_try_link "$LINENO"; then :
13796 gl_have_pthread=yes
13798 rm -f core conftest.err conftest.$ac_objext \
13799 conftest$ac_exeext conftest.$ac_ext
13800 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13801 # since it is defined as a macro on OSF/1.)
13802 if test -n "$gl_have_pthread"; then
13803 # The program links fine without libpthread. But it may actually
13804 # need to link with libpthread in order to create multiple threads.
13805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13806 printf %s "checking for pthread_kill in -lpthread... " >&6; }
13807 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13808 printf %s "(cached) " >&6
13810 ac_check_lib_save_LIBS=$LIBS
13811 LIBS="-lpthread $LIBS"
13812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13813 /* end confdefs.h. */
13815 /* Override any GCC internal prototype to avoid an error.
13816 Use char because int might match the return type of a GCC
13817 builtin and then its argument prototype would still apply. */
13821 char pthread_kill ();
13825 return pthread_kill ();
13830 if ac_fn_c_try_link "$LINENO"; then :
13831 ac_cv_lib_pthread_pthread_kill=yes
13833 ac_cv_lib_pthread_pthread_kill=no
13835 rm -f core conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
13837 LIBS=$ac_check_lib_save_LIBS
13839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13840 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
13841 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13842 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13843 # On Solaris and HP-UX, most pthread functions exist also in libc.
13844 # Therefore pthread_in_use() needs to actually try to create a
13845 # thread: pthread_create from libc will fail, whereas
13846 # pthread_create will actually create a thread.
13850 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13857 # Some library is needed. Try libpthread and libc_r.
13858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13859 printf %s "checking for pthread_kill in -lpthread... " >&6; }
13860 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13861 printf %s "(cached) " >&6
13863 ac_check_lib_save_LIBS=$LIBS
13864 LIBS="-lpthread $LIBS"
13865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13866 /* end confdefs.h. */
13868 /* Override any GCC internal prototype to avoid an error.
13869 Use char because int might match the return type of a GCC
13870 builtin and then its argument prototype would still apply. */
13874 char pthread_kill ();
13878 return pthread_kill ();
13883 if ac_fn_c_try_link "$LINENO"; then :
13884 ac_cv_lib_pthread_pthread_kill=yes
13886 ac_cv_lib_pthread_pthread_kill=no
13888 rm -f core conftest.err conftest.$ac_objext \
13889 conftest$ac_exeext conftest.$ac_ext
13890 LIBS=$ac_check_lib_save_LIBS
13892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13893 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
13894 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13895 gl_have_pthread=yes
13896 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
13897 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13900 if test -z "$gl_have_pthread"; then
13902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13903 printf %s "checking for pthread_kill in -lc_r... " >&6; }
13904 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
13905 printf %s "(cached) " >&6
13907 ac_check_lib_save_LIBS=$LIBS
13909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13910 /* end confdefs.h. */
13912 /* Override any GCC internal prototype to avoid an error.
13913 Use char because int might match the return type of a GCC
13914 builtin and then its argument prototype would still apply. */
13918 char pthread_kill ();
13922 return pthread_kill ();
13927 if ac_fn_c_try_link "$LINENO"; then :
13928 ac_cv_lib_c_r_pthread_kill=yes
13930 ac_cv_lib_c_r_pthread_kill=no
13932 rm -f core conftest.err conftest.$ac_objext \
13933 conftest$ac_exeext conftest.$ac_ext
13934 LIBS=$ac_check_lib_save_LIBS
13936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13937 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
13938 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13939 gl_have_pthread=yes
13940 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13941 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13946 if test -n "$gl_have_pthread"; then
13947 gl_threads_api=posix
13949 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
13951 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13952 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13954 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13963 if test -z "$gl_have_pthread"; then
13964 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13965 gl_have_solaristhread=
13966 gl_save_LIBS="$LIBS"
13967 LIBS="$LIBS -lthread"
13968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13969 /* end confdefs.h. */
13971 #include <thread.h>
13982 if ac_fn_c_try_link "$LINENO"; then :
13983 gl_have_solaristhread=yes
13985 rm -f core conftest.err conftest.$ac_objext \
13986 conftest$ac_exeext conftest.$ac_ext
13987 LIBS="$gl_save_LIBS"
13988 if test -n "$gl_have_solaristhread"; then
13989 gl_threads_api=solaris
13991 LTLIBTHREAD=-lthread
13992 LIBMULTITHREAD="$LIBTHREAD"
13993 LTLIBMULTITHREAD="$LTLIBTHREAD"
13995 printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13997 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13999 printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
14007 if test "$gl_use_threads" = pth; then
14008 gl_save_CPPFLAGS="$CPPFLAGS"
14014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
14015 printf %s "checking how to link with libpth... " >&6; }
14016 if ${ac_cv_libpth_libs+:} false; then :
14017 printf %s "(cached) " >&6
14029 acl_save_prefix="$prefix"
14030 prefix="$acl_final_prefix"
14031 acl_save_exec_prefix="$exec_prefix"
14032 exec_prefix="$acl_final_exec_prefix"
14034 eval additional_includedir=\"$includedir\"
14035 eval additional_libdir=\"$libdir\"
14037 exec_prefix="$acl_save_exec_prefix"
14038 prefix="$acl_save_prefix"
14041 # Check whether --with-libpth-prefix was given.
14042 if test "${with_libpth_prefix+set}" = set; then :
14043 withval=$with_libpth_prefix;
14044 if test "X$withval" = "Xno"; then
14047 if test "X$withval" = "X"; then
14049 acl_save_prefix="$prefix"
14050 prefix="$acl_final_prefix"
14051 acl_save_exec_prefix="$exec_prefix"
14052 exec_prefix="$acl_final_exec_prefix"
14054 eval additional_includedir=\"$includedir\"
14055 eval additional_libdir=\"$libdir\"
14057 exec_prefix="$acl_save_exec_prefix"
14058 prefix="$acl_save_prefix"
14061 additional_includedir="$withval/include"
14062 additional_libdir="$withval/$acl_libdirstem"
14063 if test "$acl_libdirstem2" != "$acl_libdirstem" \
14064 && ! test -d "$withval/$acl_libdirstem"; then
14065 additional_libdir="$withval/$acl_libdirstem2"
14079 names_already_handled=
14080 names_next_round='pth '
14081 while test -n "$names_next_round"; do
14082 names_this_round="$names_next_round"
14084 for name in $names_this_round; do
14086 for n in $names_already_handled; do
14087 if test "$n" = "$name"; then
14088 already_handled=yes
14092 if test -z "$already_handled"; then
14093 names_already_handled="$names_already_handled $name"
14094 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14095 eval value=\"\$HAVE_LIB$uppername\"
14096 if test -n "$value"; then
14097 if test "$value" = yes; then
14098 eval value=\"\$LIB$uppername\"
14099 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
14100 eval value=\"\$LTLIB$uppername\"
14101 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
14110 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
14111 if test -n "$acl_shlibext"; then
14112 shrext=".$acl_shlibext" # typically: shrext=.so
14116 if test $use_additional = yes; then
14117 dir="$additional_libdir"
14118 if test -n "$acl_shlibext"; then
14119 if test -f "$dir/$libname$shrext"; then
14121 found_so="$dir/$libname$shrext"
14123 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14124 ver=`(cd "$dir" && \
14125 for f in "$libname$shrext".*; do echo "$f"; done \
14126 | sed -e "s,^$libname$shrext\\\\.,," \
14127 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14128 | sed 1q ) 2>/dev/null`
14129 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14131 found_so="$dir/$libname$shrext.$ver"
14134 eval library_names=\"$acl_library_names_spec\"
14135 for f in $library_names; do
14136 if test -f "$dir/$f"; then
14145 if test "X$found_dir" = "X"; then
14146 if test -f "$dir/$libname.$acl_libext"; then
14148 found_a="$dir/$libname.$acl_libext"
14151 if test "X$found_dir" != "X"; then
14152 if test -f "$dir/$libname.la"; then
14153 found_la="$dir/$libname.la"
14157 if test "X$found_dir" = "X"; then
14158 for x in $LDFLAGS $LTLIBPTH; do
14160 acl_save_prefix="$prefix"
14161 prefix="$acl_final_prefix"
14162 acl_save_exec_prefix="$exec_prefix"
14163 exec_prefix="$acl_final_exec_prefix"
14165 exec_prefix="$acl_save_exec_prefix"
14166 prefix="$acl_save_prefix"
14170 dir=`echo "X$x" | sed -e 's/^X-L//'`
14171 if test -n "$acl_shlibext"; then
14172 if test -f "$dir/$libname$shrext"; then
14174 found_so="$dir/$libname$shrext"
14176 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14177 ver=`(cd "$dir" && \
14178 for f in "$libname$shrext".*; do echo "$f"; done \
14179 | sed -e "s,^$libname$shrext\\\\.,," \
14180 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14181 | sed 1q ) 2>/dev/null`
14182 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14184 found_so="$dir/$libname$shrext.$ver"
14187 eval library_names=\"$acl_library_names_spec\"
14188 for f in $library_names; do
14189 if test -f "$dir/$f"; then
14198 if test "X$found_dir" = "X"; then
14199 if test -f "$dir/$libname.$acl_libext"; then
14201 found_a="$dir/$libname.$acl_libext"
14204 if test "X$found_dir" != "X"; then
14205 if test -f "$dir/$libname.la"; then
14206 found_la="$dir/$libname.la"
14211 if test "X$found_dir" != "X"; then
14216 if test "X$found_dir" != "X"; then
14217 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
14218 if test "X$found_so" != "X"; then
14219 if test "$enable_rpath" = no \
14220 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14221 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14222 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14225 for x in $ltrpathdirs; do
14226 if test "X$x" = "X$found_dir"; then
14231 if test -z "$haveit"; then
14232 ltrpathdirs="$ltrpathdirs $found_dir"
14234 if test "$acl_hardcode_direct" = yes; then
14235 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14237 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14238 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14240 for x in $rpathdirs; do
14241 if test "X$x" = "X$found_dir"; then
14246 if test -z "$haveit"; then
14247 rpathdirs="$rpathdirs $found_dir"
14251 for x in $LDFLAGS $LIBPTH; do
14253 acl_save_prefix="$prefix"
14254 prefix="$acl_final_prefix"
14255 acl_save_exec_prefix="$exec_prefix"
14256 exec_prefix="$acl_final_exec_prefix"
14258 exec_prefix="$acl_save_exec_prefix"
14259 prefix="$acl_save_prefix"
14261 if test "X$x" = "X-L$found_dir"; then
14266 if test -z "$haveit"; then
14267 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
14269 if test "$acl_hardcode_minus_L" != no; then
14270 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14272 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14278 if test "X$found_a" != "X"; then
14279 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
14281 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
14284 additional_includedir=
14285 case "$found_dir" in
14286 */$acl_libdirstem | */$acl_libdirstem/)
14287 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14288 if test "$name" = 'pth'; then
14289 LIBPTH_PREFIX="$basedir"
14291 additional_includedir="$basedir/include"
14293 */$acl_libdirstem2 | */$acl_libdirstem2/)
14294 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14295 if test "$name" = 'pth'; then
14296 LIBPTH_PREFIX="$basedir"
14298 additional_includedir="$basedir/include"
14301 if test "X$additional_includedir" != "X"; then
14302 if test "X$additional_includedir" != "X/usr/include"; then
14304 if test "X$additional_includedir" = "X/usr/local/include"; then
14305 if test -n "$GCC"; then
14307 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14311 if test -z "$haveit"; then
14312 for x in $CPPFLAGS $INCPTH; do
14314 acl_save_prefix="$prefix"
14315 prefix="$acl_final_prefix"
14316 acl_save_exec_prefix="$exec_prefix"
14317 exec_prefix="$acl_final_exec_prefix"
14319 exec_prefix="$acl_save_exec_prefix"
14320 prefix="$acl_save_prefix"
14322 if test "X$x" = "X-I$additional_includedir"; then
14327 if test -z "$haveit"; then
14328 if test -d "$additional_includedir"; then
14329 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
14335 if test -n "$found_la"; then
14336 save_libdir="$libdir"
14337 case "$found_la" in
14338 */* | *\\*) . "$found_la" ;;
14339 *) . "./$found_la" ;;
14341 libdir="$save_libdir"
14342 for dep in $dependency_libs; do
14345 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14346 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14347 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14349 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14350 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14351 if test -n "$GCC"; then
14353 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14357 if test -z "$haveit"; then
14359 for x in $LDFLAGS $LIBPTH; do
14361 acl_save_prefix="$prefix"
14362 prefix="$acl_final_prefix"
14363 acl_save_exec_prefix="$exec_prefix"
14364 exec_prefix="$acl_final_exec_prefix"
14366 exec_prefix="$acl_save_exec_prefix"
14367 prefix="$acl_save_prefix"
14369 if test "X$x" = "X-L$additional_libdir"; then
14374 if test -z "$haveit"; then
14375 if test -d "$additional_libdir"; then
14376 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
14380 for x in $LDFLAGS $LTLIBPTH; do
14382 acl_save_prefix="$prefix"
14383 prefix="$acl_final_prefix"
14384 acl_save_exec_prefix="$exec_prefix"
14385 exec_prefix="$acl_final_exec_prefix"
14387 exec_prefix="$acl_save_exec_prefix"
14388 prefix="$acl_save_prefix"
14390 if test "X$x" = "X-L$additional_libdir"; then
14395 if test -z "$haveit"; then
14396 if test -d "$additional_libdir"; then
14397 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
14404 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14405 if test "$enable_rpath" != no; then
14407 for x in $rpathdirs; do
14408 if test "X$x" = "X$dir"; then
14413 if test -z "$haveit"; then
14414 rpathdirs="$rpathdirs $dir"
14417 for x in $ltrpathdirs; do
14418 if test "X$x" = "X$dir"; then
14423 if test -z "$haveit"; then
14424 ltrpathdirs="$ltrpathdirs $dir"
14429 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14432 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14435 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
14436 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14442 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14443 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14449 if test "X$rpathdirs" != "X"; then
14450 if test -n "$acl_hardcode_libdir_separator"; then
14452 for found_dir in $rpathdirs; do
14453 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14455 acl_save_libdir="$libdir"
14457 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14458 libdir="$acl_save_libdir"
14459 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14461 for found_dir in $rpathdirs; do
14462 acl_save_libdir="$libdir"
14463 libdir="$found_dir"
14464 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14465 libdir="$acl_save_libdir"
14466 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14470 if test "X$ltrpathdirs" != "X"; then
14471 for found_dir in $ltrpathdirs; do
14472 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14481 ac_cv_libpth_libs="$LIBPTH"
14482 ac_cv_libpth_ltlibs="$LTLIBPTH"
14483 ac_cv_libpth_cppflags="$INCPTH"
14484 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14488 printf "%s\n" "$ac_cv_libpth_libs" >&6; }
14489 LIBPTH="$ac_cv_libpth_libs"
14490 LTLIBPTH="$ac_cv_libpth_ltlibs"
14491 INCPTH="$ac_cv_libpth_cppflags"
14492 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14494 for element in $INCPTH; do
14496 for x in $CPPFLAGS; do
14498 acl_save_prefix="$prefix"
14499 prefix="$acl_final_prefix"
14500 acl_save_exec_prefix="$exec_prefix"
14501 exec_prefix="$acl_final_exec_prefix"
14503 exec_prefix="$acl_save_exec_prefix"
14504 prefix="$acl_save_prefix"
14506 if test "X$x" = "X$element"; then
14511 if test -z "$haveit"; then
14512 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14524 gl_save_LIBS="$LIBS"
14525 LIBS="$LIBS $LIBPTH"
14526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527 /* end confdefs.h. */
14537 if ac_fn_c_try_link "$LINENO"; then :
14540 rm -f core conftest.err conftest.$ac_objext \
14541 conftest$ac_exeext conftest.$ac_ext
14542 LIBS="$gl_save_LIBS"
14543 if test -n "$gl_have_pth"; then
14545 LIBTHREAD="$LIBPTH"
14546 LTLIBTHREAD="$LTLIBPTH"
14547 LIBMULTITHREAD="$LIBTHREAD"
14548 LTLIBMULTITHREAD="$LTLIBTHREAD"
14550 printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
14552 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14553 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14555 printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
14562 CPPFLAGS="$gl_save_CPPFLAGS"
14565 if test -z "$gl_have_pthread"; then
14566 case "$gl_use_threads" in
14567 yes | windows | win32) # The 'win32' is for backward compatibility.
14568 if { case "$host_os" in
14573 gl_threads_api=windows
14575 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14583 printf %s "checking for multithread API to use... " >&6; }
14584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14585 printf "%s\n" "$gl_threads_api" >&6; }
14598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
14599 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
14600 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
14601 printf %s "(cached) " >&6
14603 rm -f conftest.sym conftest.file
14604 echo >conftest.file
14605 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
14606 if test "$cross_compiling" = yes; then :
14608 # Guess yes on glibc systems.
14609 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14610 # If we don't know, assume the worst.
14611 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616 /* end confdefs.h. */
14617 $ac_includes_default
14622 /* Linux will dereference the symlink and fail, as required by
14623 POSIX. That is better in the sense that it means we will not
14624 have to compile and use the lstat wrapper. */
14625 return lstat ("conftest.sym/", &sbuf) == 0;
14631 if ac_fn_c_try_run "$LINENO"; then :
14632 gl_cv_func_lstat_dereferences_slashed_symlink=yes
14634 gl_cv_func_lstat_dereferences_slashed_symlink=no
14636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14637 conftest.$ac_objext conftest.beam conftest.$ac_ext
14641 # If the 'ln -s' command failed, then we probably don't even
14642 # have an lstat function.
14643 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
14645 rm -f conftest.sym conftest.file
14648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
14649 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
14650 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14653 cat >>confdefs.h <<_ACEOF
14654 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
14668 GNULIB_MBSRTOWCS=0;
14669 GNULIB_MBSNRTOWCS=0;
14671 GNULIB_WCSRTOMBS=0;
14672 GNULIB_WCSNRTOMBS=0;
14689 GNULIB_WCSCASECMP=0;
14690 GNULIB_WCSNCASECMP=0;
14727 HAVE_WCSNCASECMP=1;
14740 HAVE_DECL_WCWIDTH=1;
14741 REPLACE_MBSTATE_T=0;
14747 REPLACE_MBSRTOWCS=0;
14748 REPLACE_MBSNRTOWCS=0;
14750 REPLACE_WCSRTOMBS=0;
14751 REPLACE_WCSNRTOMBS=0;
14753 REPLACE_WCSWIDTH=0;
14757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14758 printf %s "checking for mbstate_t... " >&6; }
14759 if ${ac_cv_type_mbstate_t+:} false; then :
14760 printf %s "(cached) " >&6
14762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14763 /* end confdefs.h. */
14764 $ac_includes_default
14765 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14767 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14768 included before <wchar.h>. */
14769 #include <stddef.h>
14776 mbstate_t x; return sizeof x;
14781 if ac_fn_c_try_compile "$LINENO"; then :
14782 ac_cv_type_mbstate_t=yes
14784 ac_cv_type_mbstate_t=no
14786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14789 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
14790 if test $ac_cv_type_mbstate_t = yes; then
14792 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
14796 printf "%s\n" "#define mbstate_t int" >>confdefs.h
14807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14808 printf %s "checking for a traditional japanese locale... " >&6; }
14809 if ${gt_cv_locale_ja+:} false; then :
14810 printf %s "(cached) " >&6
14813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14814 /* end confdefs.h. */
14816 #include <locale.h>
14818 #if HAVE_LANGINFO_CODESET
14819 # include <langinfo.h>
14821 #include <stdlib.h>
14822 #include <string.h>
14828 /* Check whether the given locale name is recognized by the system. */
14829 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14830 /* On native Windows, setlocale(category, "") looks at the system settings,
14831 not at the environment variables. Also, when an encoding suffix such
14832 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14833 category of the locale to "C". */
14834 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14835 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14838 if (setlocale (LC_ALL, "") == NULL) return 1;
14840 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14841 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14842 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14843 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14844 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14845 some unit tests fail.
14846 On MirBSD 10, when an unsupported locale is specified, setlocale()
14847 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14848 #if HAVE_LANGINFO_CODESET
14850 const char *cs = nl_langinfo (CODESET);
14851 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14852 || strcmp (cs, "UTF-8") == 0)
14857 /* On Cygwin, avoid locale names without encoding suffix, because the
14858 locale_charset() function relies on the encoding suffix. Note that
14859 LC_ALL is set on the command line. */
14860 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14862 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
14863 on Cygwin 1.5.x. */
14864 if (MB_CUR_MAX == 1)
14866 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14867 This excludes the UTF-8 encoding (except on MirBSD). */
14868 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14869 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14870 for (p = buf; *p != '\0'; p++)
14871 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14877 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14878 (eval $ac_link) 2>&5
14880 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14881 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14883 # Handle native Windows specially, because there setlocale() interprets
14884 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14885 # "fr" or "fra" as "French" or "French_France.1252",
14886 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14887 # "ja" as "Japanese" or "Japanese_Japan.932",
14890 # Note that on native Windows, the Japanese locale is
14891 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14892 # cannot use it here.
14893 gt_cv_locale_ja=none
14896 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14897 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14898 # configure script would override the LC_ALL setting. Likewise for
14899 # LC_CTYPE, which is also set at the beginning of the configure script.
14900 # Test for the AIX locale name.
14901 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14902 gt_cv_locale_ja=ja_JP
14904 # Test for the locale name with explicit encoding suffix.
14905 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14906 gt_cv_locale_ja=ja_JP.EUC-JP
14908 # Test for the HP-UX, OSF/1, NetBSD locale name.
14909 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14910 gt_cv_locale_ja=ja_JP.eucJP
14912 # Test for the IRIX, FreeBSD locale name.
14913 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14914 gt_cv_locale_ja=ja_JP.EUC
14916 # Test for the Solaris 7 locale name.
14917 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14920 # Special test for NetBSD 1.6.
14921 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14922 gt_cv_locale_ja=ja_JP.eucJP
14925 gt_cv_locale_ja=none
14938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14939 printf "%s\n" "$gt_cv_locale_ja" >&6; }
14940 LOCALE_JA=$gt_cv_locale_ja
14946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14947 printf %s "checking for a transitional chinese locale... " >&6; }
14948 if ${gt_cv_locale_zh_CN+:} false; then :
14949 printf %s "(cached) " >&6
14952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14953 /* end confdefs.h. */
14955 #include <locale.h>
14956 #include <stdlib.h>
14958 #if HAVE_LANGINFO_CODESET
14959 # include <langinfo.h>
14961 #include <stdlib.h>
14962 #include <string.h>
14968 /* Check whether the given locale name is recognized by the system. */
14969 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14970 /* On native Windows, setlocale(category, "") looks at the system settings,
14971 not at the environment variables. Also, when an encoding suffix such
14972 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14973 category of the locale to "C". */
14974 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14975 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14978 if (setlocale (LC_ALL, "") == NULL) return 1;
14980 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14981 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14982 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14983 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14984 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14985 some unit tests fail.
14986 On MirBSD 10, when an unsupported locale is specified, setlocale()
14987 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14988 #if HAVE_LANGINFO_CODESET
14990 const char *cs = nl_langinfo (CODESET);
14991 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14992 || strcmp (cs, "UTF-8") == 0)
14997 /* On Cygwin, avoid locale names without encoding suffix, because the
14998 locale_charset() function relies on the encoding suffix. Note that
14999 LC_ALL is set on the command line. */
15000 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15002 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15003 This excludes the UTF-8 encoding (except on MirBSD). */
15004 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15005 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15006 for (p = buf; *p != '\0'; p++)
15007 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15009 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15010 single wide character. This excludes the GB2312 and GBK encodings. */
15011 if (mblen ("\203\062\332\066", 5) != 4)
15017 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15018 (eval $ac_link) 2>&5
15020 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15021 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15023 # Handle native Windows specially, because there setlocale() interprets
15024 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15025 # "fr" or "fra" as "French" or "French_France.1252",
15026 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15027 # "ja" as "Japanese" or "Japanese_Japan.932",
15030 # Test for the hypothetical native Windows locale name.
15031 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15032 gt_cv_locale_zh_CN=Chinese_China.54936
15035 gt_cv_locale_zh_CN=none
15039 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15040 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15041 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15042 gt_cv_locale_zh_CN=none
15045 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15046 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15047 # configure script would override the LC_ALL setting. Likewise for
15048 # LC_CTYPE, which is also set at the beginning of the configure script.
15049 # Test for the locale name without encoding suffix.
15050 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15051 gt_cv_locale_zh_CN=zh_CN
15053 # Test for the locale name with explicit encoding suffix.
15054 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15055 gt_cv_locale_zh_CN=zh_CN.GB18030
15058 gt_cv_locale_zh_CN=none
15064 # If there was a link error, due to mblen(), the system is so old that
15065 # it certainly doesn't have a chinese locale.
15066 gt_cv_locale_zh_CN=none
15071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15072 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
15073 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15079 printf %s "checking for a french Unicode locale... " >&6; }
15080 if ${gt_cv_locale_fr_utf8+:} false; then :
15081 printf %s "(cached) " >&6
15084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15085 /* end confdefs.h. */
15087 #include <locale.h>
15089 #if HAVE_LANGINFO_CODESET
15090 # include <langinfo.h>
15092 #include <stdlib.h>
15093 #include <string.h>
15097 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15098 imitates locale dependent behaviour by looking at the environment
15099 variables, and all locales use the UTF-8 encoding. */
15100 #if !(defined __BEOS__ || defined __HAIKU__)
15101 /* Check whether the given locale name is recognized by the system. */
15102 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15103 /* On native Windows, setlocale(category, "") looks at the system settings,
15104 not at the environment variables. Also, when an encoding suffix such
15105 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15106 category of the locale to "C". */
15107 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15108 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15111 if (setlocale (LC_ALL, "") == NULL) return 1;
15113 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15114 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15115 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15116 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15117 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15118 some unit tests fail. */
15119 # if HAVE_LANGINFO_CODESET
15121 const char *cs = nl_langinfo (CODESET);
15122 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15127 /* On Cygwin, avoid locale names without encoding suffix, because the
15128 locale_charset() function relies on the encoding suffix. Note that
15129 LC_ALL is set on the command line. */
15130 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15132 /* Check whether in the abbreviation of the second month, the second
15133 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15134 two bytes long, with UTF-8 encoding. */
15135 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15136 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15137 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15140 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15141 /* Check whether the decimal separator is a comma.
15142 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15143 are nl_langinfo(RADIXCHAR) are both ".". */
15144 if (localeconv () ->decimal_point[0] != ',') return 1;
15150 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15151 (eval $ac_link) 2>&5
15153 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15154 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15156 # Handle native Windows specially, because there setlocale() interprets
15157 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15158 # "fr" or "fra" as "French" or "French_France.1252",
15159 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15160 # "ja" as "Japanese" or "Japanese_Japan.932",
15163 # Test for the hypothetical native Windows locale name.
15164 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15165 gt_cv_locale_fr_utf8=French_France.65001
15168 gt_cv_locale_fr_utf8=none
15172 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15173 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15174 # configure script would override the LC_ALL setting. Likewise for
15175 # LC_CTYPE, which is also set at the beginning of the configure script.
15176 # Test for the usual locale name.
15177 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15178 gt_cv_locale_fr_utf8=fr_FR
15180 # Test for the locale name with explicit encoding suffix.
15181 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15182 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15184 # Test for the Solaris 7 locale name.
15185 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15186 gt_cv_locale_fr_utf8=fr.UTF-8
15189 gt_cv_locale_fr_utf8=none
15199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15200 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
15201 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15215 GNULIB_RAWMEMCHR=0;
15218 GNULIB_STRCHRNUL=0;
15226 GNULIB_STRCASESTR=0;
15233 GNULIB_MBSCASECMP=0;
15234 GNULIB_MBSNCASECMP=0;
15235 GNULIB_MBSPCASECMP=0;
15236 GNULIB_MBSCASESTR=0;
15243 GNULIB_STRERROR_R=0;
15244 GNULIB_STRSIGNAL=0;
15245 GNULIB_STRVERSCMP=0;
15250 HAVE_DECL_MEMMEM=1;
15252 HAVE_DECL_MEMRCHR=1;
15257 HAVE_DECL_STRDUP=1;
15258 HAVE_DECL_STRNDUP=1;
15259 HAVE_DECL_STRNLEN=1;
15263 HAVE_DECL_STRTOK_R=1;
15264 HAVE_DECL_STRERROR_R=1;
15265 HAVE_DECL_STRSIGNAL=1;
15272 REPLACE_STRCASESTR=0;
15273 REPLACE_STRCHRNUL=0;
15274 REPLACE_STRERROR=0;
15275 REPLACE_STRERROR_R=0;
15279 REPLACE_STRSIGNAL=0;
15280 REPLACE_STRTOK_R=0;
15281 UNDEFINE_STRTOK_R=0;
15287 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15288 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15289 # irrelevant for anonymous mappings.
15290 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15291 if test "x$ac_cv_func_mmap" = xyes; then :
15298 # Try to allow MAP_ANONYMOUS.
15299 gl_have_mmap_anonymous=no
15300 if test $gl_have_mmap = yes; then
15301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15302 printf %s "checking for MAP_ANONYMOUS... " >&6; }
15303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15304 /* end confdefs.h. */
15306 #include <sys/mman.h>
15307 #ifdef MAP_ANONYMOUS
15308 I cannot identify this map
15312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15313 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15314 gl_have_mmap_anonymous=yes
15318 if test $gl_have_mmap_anonymous != yes; then
15319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15320 /* end confdefs.h. */
15322 #include <sys/mman.h>
15324 I cannot identify this map
15328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15329 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15331 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15333 gl_have_mmap_anonymous=yes
15338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15339 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
15340 if test $gl_have_mmap_anonymous = yes; then
15342 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15352 if test $HAVE_MEMCHR = 1; then
15353 # Detect platform-specific bugs in some versions of glibc:
15354 # memchr should not dereference anything with length 0
15355 # http://bugzilla.redhat.com/499689
15356 # memchr should not dereference overestimated length after a match
15357 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15358 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15359 # Assume that memchr works on platforms that lack mprotect.
15360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15361 printf %s "checking whether memchr works... " >&6; }
15362 if ${gl_cv_func_memchr_works+:} false; then :
15363 printf %s "(cached) " >&6
15365 if test "$cross_compiling" = yes; then :
15366 gl_cv_func_memchr_works="guessing no"
15368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15369 /* end confdefs.h. */
15371 #include <string.h>
15372 #if HAVE_SYS_MMAN_H
15373 # include <fcntl.h>
15374 # include <unistd.h>
15375 # include <sys/types.h>
15376 # include <sys/mman.h>
15378 # define MAP_FILE 0
15387 char *fence = NULL;
15388 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15389 # if HAVE_MAP_ANONYMOUS
15390 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15392 # else /* !HAVE_MAP_ANONYMOUS */
15393 const int flags = MAP_FILE | MAP_PRIVATE;
15394 int fd = open ("/dev/zero", O_RDONLY, 0666);
15398 int pagesize = getpagesize ();
15400 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15402 if (two_pages != (char *)(-1)
15403 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15404 fence = two_pages + pagesize;
15409 if (memchr (fence, 0, 0))
15411 strcpy (fence - 9, "12345678");
15412 if (memchr (fence - 9, 0, 79) != fence - 1)
15414 if (memchr (fence - 1, 0, 3) != fence - 1)
15423 if ac_fn_c_try_run "$LINENO"; then :
15424 gl_cv_func_memchr_works=yes
15426 gl_cv_func_memchr_works=no
15428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15429 conftest.$ac_objext conftest.beam conftest.$ac_ext
15433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15434 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
15435 if test "$gl_cv_func_memchr_works" != yes; then
15440 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15441 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
15447 cat >>confdefs.h <<_ACEOF
15448 #define HAVE_DECL_MEMRCHR $ac_have_decl
15454 REPLACE_STRERROR_0=0
15455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15456 printf %s "checking whether strerror(0) succeeds... " >&6; }
15457 if ${gl_cv_func_strerror_0_works+:} false; then :
15458 printf %s "(cached) " >&6
15460 if test "$cross_compiling" = yes; then :
15462 # Guess yes on glibc systems.
15463 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15464 # If we don't know, assume the worst.
15465 *) gl_cv_func_strerror_0_works="guessing no" ;;
15469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15470 /* end confdefs.h. */
15471 #include <string.h>
15480 str = strerror (0);
15481 if (!*str) result |= 1;
15482 if (errno) result |= 2;
15483 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15490 if ac_fn_c_try_run "$LINENO"; then :
15491 gl_cv_func_strerror_0_works=yes
15493 gl_cv_func_strerror_0_works=no
15495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15496 conftest.$ac_objext conftest.beam conftest.$ac_ext
15501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15502 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
15503 case "$gl_cv_func_strerror_0_works" in
15506 REPLACE_STRERROR_0=1
15508 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
15522 if test $ac_cv_func_strerror_r = yes; then
15523 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15525 printf %s "checking for strerror_r with POSIX signature... " >&6; }
15526 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15527 printf %s "(cached) " >&6
15529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15530 /* end confdefs.h. */
15531 #include <string.h>
15532 int strerror_r (int, char *, size_t);
15542 if ac_fn_c_try_compile "$LINENO"; then :
15543 gl_cv_func_strerror_r_posix_signature=yes
15545 gl_cv_func_strerror_r_posix_signature=no
15547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15551 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
15552 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15554 printf %s "checking whether strerror_r works... " >&6; }
15555 if ${gl_cv_func_strerror_r_works+:} false; then :
15556 printf %s "(cached) " >&6
15558 if test "$cross_compiling" = yes; then :
15562 aix*) gl_cv_func_strerror_r_works="guessing no";;
15563 # Guess no on HP-UX.
15564 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15565 # Guess no on BSD variants.
15566 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
15567 # Guess yes otherwise.
15568 *) gl_cv_func_strerror_r_works="guessing yes";;
15572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15573 /* end confdefs.h. */
15575 #include <string.h>
15582 if (strerror_r (EACCES, buf, 0) < 0)
15585 if (strerror_r (EACCES, buf, sizeof buf) != 0)
15587 strcpy (buf, "Unknown");
15588 if (strerror_r (0, buf, sizeof buf) != 0)
15592 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15596 if (strerror_r (-3, buf, sizeof buf) < 0)
15608 if ac_fn_c_try_run "$LINENO"; then :
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; }
15623 if test $ac_cv_func___xpg_strerror_r = yes; then
15624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15625 printf %s "checking whether __xpg_strerror_r works... " >&6; }
15626 if ${gl_cv_func_strerror_r_works+:} false; then :
15627 printf %s "(cached) " >&6
15629 if test "$cross_compiling" = yes; then :
15630 gl_cv_func_strerror_r_works="guessing no"
15633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15634 /* end confdefs.h. */
15636 #include <string.h>
15641 int __xpg_strerror_r(int, char *, size_t);
15647 char buf[256] = "^";
15649 char *str = strerror (-1);
15650 strcpy (copy, str);
15651 if (__xpg_strerror_r (-2, buf, 1) == 0)
15655 __xpg_strerror_r (-2, buf, 256);
15656 if (strcmp (str, copy))
15664 if ac_fn_c_try_run "$LINENO"; then :
15665 gl_cv_func_strerror_r_works=yes
15667 gl_cv_func_strerror_r_works=no
15669 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15670 conftest.$ac_objext conftest.beam conftest.$ac_ext
15675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15676 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
15682 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
15683 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
15689 cat >>confdefs.h <<_ACEOF
15690 #define HAVE_DECL_STRERROR_R $ac_have_decl
15700 if test $ac_cv_have_decl_strerror_r = no; then
15701 HAVE_DECL_STRERROR_R=0
15704 if test $ac_cv_func_strerror_r = yes; then
15705 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15706 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15707 case "$gl_cv_func_strerror_r_works" in
15708 *no) REPLACE_STRERROR_R=1 ;;
15711 REPLACE_STRERROR_R=1
15714 REPLACE_STRERROR_R=1
15733 gl_cv_func_vfprintf_posix=no
15734 case "$gl_cv_func_printf_sizes_c99" in
15736 case "$gl_cv_func_printf_long_double" in
15738 case "$gl_cv_func_printf_infinite" in
15740 case "$gl_cv_func_printf_infinite_long_double" in
15742 case "$gl_cv_func_printf_directive_a" in
15744 case "$gl_cv_func_printf_directive_f" in
15746 case "$gl_cv_func_printf_directive_n" in
15748 case "$gl_cv_func_printf_directive_ls" in
15750 case "$gl_cv_func_printf_positions" in
15752 case "$gl_cv_func_printf_flag_grouping" in
15754 case "$gl_cv_func_printf_flag_leftadjust" in
15756 case "$gl_cv_func_printf_flag_zero" in
15758 case "$gl_cv_func_printf_precision" in
15760 case "$gl_cv_func_printf_enomem" in
15762 # vfprintf exists and is
15763 # already POSIX compliant.
15764 gl_cv_func_vfprintf_posix=yes
15793 if test $gl_cv_func_vfprintf_posix = no; then
15797 case "$gl_cv_func_printf_infinite" in
15802 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
15810 case "$gl_cv_func_printf_long_double" in
15812 case "$gl_cv_func_printf_infinite_long_double" in
15817 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
15826 case "$gl_cv_func_printf_directive_a" in
15831 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
15833 for ac_func in nl_langinfo
15835 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
15836 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
15837 cat >>confdefs.h <<_ACEOF
15838 #define HAVE_NL_LANGINFO 1
15849 case "$gl_cv_func_printf_directive_f" in
15854 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
15861 case "$gl_cv_func_printf_directive_ls" in
15866 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
15873 case "$gl_cv_func_printf_flag_grouping" in
15878 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
15885 case "$gl_cv_func_printf_flag_leftadjust" in
15890 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
15897 case "$gl_cv_func_printf_flag_zero" in
15902 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
15909 case "$gl_cv_func_printf_precision" in
15914 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
15917 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15920 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15927 case "$gl_cv_func_printf_enomem" in
15932 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
15935 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15938 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15953 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
15963 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
15973 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
15983 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
15985 if test $ac_cv_func_vasnprintf = yes; then
15987 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
16001 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16002 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
16006 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
16027 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
16031 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
16038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16039 /* end confdefs.h. */
16046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16047 $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
16049 gl_c_asm_opt='-c -Fa'
16061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
16062 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
16063 if ${gl_cv_prog_as_underscore+:} false; then :
16064 printf %s "(cached) " >&6
16066 cat > conftest.c <<EOF
16068 extern "C" int foo (void);
16070 int foo(void) { return 0; }
16072 # Look for the assembly language name in the .s file.
16073 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16074 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16075 (eval $ac_try) 2>&5
16077 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16078 test $ac_status = 0; }; } >/dev/null 2>&1
16079 if grep _foo conftest.$gl_asmext >/dev/null ; then
16080 gl_cv_prog_as_underscore=yes
16082 gl_cv_prog_as_underscore=no
16087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16088 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
16089 if test $gl_cv_prog_as_underscore = yes; then
16090 USER_LABEL_PREFIX=_
16095 cat >>confdefs.h <<_ACEOF
16096 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
16099 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16103 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
16104 if ${ac_cv_header_stdbool_h+:} false; then :
16105 printf %s "(cached) " >&6
16107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16108 /* end confdefs.h. */
16110 #include <stdbool.h>
16112 "error: bool is not defined"
16115 "error: false is not defined"
16118 "error: false is not 0"
16121 "error: true is not defined"
16124 "error: true is not 1"
16126 #ifndef __bool_true_false_are_defined
16127 "error: __bool_true_false_are_defined is not defined"
16130 struct s { _Bool s: 1; _Bool t; } s;
16132 char a[true == 1 ? 1 : -1];
16133 char b[false == 0 ? 1 : -1];
16134 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16135 char d[(bool) 0.5 == true ? 1 : -1];
16136 /* See body of main program for 'e'. */
16137 char f[(_Bool) 0.0 == false ? 1 : -1];
16139 char h[sizeof (_Bool)];
16140 char i[sizeof s.t];
16141 enum { j = false, k = true, l = false * true, m = true * 256 };
16142 /* The following fails for
16143 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16145 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16146 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16147 /* Catch a bug in an HP-UX C compiler. See
16148 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16149 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
16161 /* Refer to every declared value, to avoid compiler optimizations. */
16162 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16163 + !m + !n + !o + !p + !q + !pq);
16169 if ac_fn_c_try_compile "$LINENO"; then :
16170 ac_cv_header_stdbool_h=yes
16172 ac_cv_header_stdbool_h=no
16174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16177 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
16178 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16179 if test "x$ac_cv_type__Bool" = xyes; then :
16181 cat >>confdefs.h <<_ACEOF
16182 #define HAVE__BOOL 1
16200 if test $ac_cv_type_long_long_int = yes; then
16201 HAVE_LONG_LONG_INT=1
16203 HAVE_LONG_LONG_INT=0
16207 if test $ac_cv_type_unsigned_long_long_int = yes; then
16208 HAVE_UNSIGNED_LONG_LONG_INT=1
16210 HAVE_UNSIGNED_LONG_LONG_INT=0
16215 if test $ac_cv_header_wchar_h = yes; then
16222 if test $ac_cv_header_inttypes_h = yes; then
16229 if test $ac_cv_header_sys_types_h = yes; then
16245 if test $gl_cv_have_include_next = yes; then
16246 gl_cv_next_stdint_h='<'stdint.h'>'
16248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
16249 printf %s "checking absolute name of <stdint.h>... " >&6; }
16250 if ${gl_cv_next_stdint_h+:} false; then :
16251 printf %s "(cached) " >&6
16254 if test $ac_cv_header_stdint_h = yes; then
16257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16258 /* end confdefs.h. */
16259 #include <stdint.h>
16263 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16264 *) gl_absname_cpp="$ac_cpp" ;;
16269 gl_dirsep_regex='[/\\]'
16272 gl_dirsep_regex='\/'
16275 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16277 gl_header_literal_regex=`echo 'stdint.h' \
16278 | sed -e "$gl_make_literal_regex_sed"`
16279 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16280 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16285 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16286 sed -n "$gl_absolute_header_sed"`'"'
16288 gl_cv_next_stdint_h='<'stdint.h'>'
16293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
16294 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
16296 NEXT_STDINT_H=$gl_cv_next_stdint_h
16298 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16299 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16300 gl_next_as_first_directive='<'stdint.h'>'
16302 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16303 gl_next_as_first_directive=$gl_cv_next_stdint_h
16305 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
16310 if test $ac_cv_header_stdint_h = yes; then
16317 if test $ac_cv_header_stdint_h = yes; then
16318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
16319 printf %s "checking whether stdint.h conforms to C99... " >&6; }
16320 if ${gl_cv_header_working_stdint_h+:} false; then :
16321 printf %s "(cached) " >&6
16323 gl_cv_header_working_stdint_h=no
16324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16325 /* end confdefs.h. */
16328 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16329 #include <stdint.h>
16330 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
16331 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
16332 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
16336 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16337 included before <wchar.h>. */
16338 #include <stddef.h>
16339 #include <signal.h>
16341 # include <stdio.h>
16343 # include <wchar.h>
16348 int8_t a1 = INT8_MAX;
16349 int8_t a1min = INT8_MIN;
16352 int16_t a2 = INT16_MAX;
16353 int16_t a2min = INT16_MIN;
16356 int32_t a3 = INT32_MAX;
16357 int32_t a3min = INT32_MIN;
16360 int64_t a4 = INT64_MAX;
16361 int64_t a4min = INT64_MIN;
16364 uint8_t b1 = UINT8_MAX;
16366 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
16369 uint16_t b2 = UINT16_MAX;
16372 uint32_t b3 = UINT32_MAX;
16375 uint64_t b4 = UINT64_MAX;
16377 int_least8_t c1 = INT8_C (0x7f);
16378 int_least8_t c1max = INT_LEAST8_MAX;
16379 int_least8_t c1min = INT_LEAST8_MIN;
16380 int_least16_t c2 = INT16_C (0x7fff);
16381 int_least16_t c2max = INT_LEAST16_MAX;
16382 int_least16_t c2min = INT_LEAST16_MIN;
16383 int_least32_t c3 = INT32_C (0x7fffffff);
16384 int_least32_t c3max = INT_LEAST32_MAX;
16385 int_least32_t c3min = INT_LEAST32_MIN;
16386 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
16387 int_least64_t c4max = INT_LEAST64_MAX;
16388 int_least64_t c4min = INT_LEAST64_MIN;
16389 uint_least8_t d1 = UINT8_C (0xff);
16390 uint_least8_t d1max = UINT_LEAST8_MAX;
16391 uint_least16_t d2 = UINT16_C (0xffff);
16392 uint_least16_t d2max = UINT_LEAST16_MAX;
16393 uint_least32_t d3 = UINT32_C (0xffffffff);
16394 uint_least32_t d3max = UINT_LEAST32_MAX;
16395 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
16396 uint_least64_t d4max = UINT_LEAST64_MAX;
16397 int_fast8_t e1 = INT_FAST8_MAX;
16398 int_fast8_t e1min = INT_FAST8_MIN;
16399 int_fast16_t e2 = INT_FAST16_MAX;
16400 int_fast16_t e2min = INT_FAST16_MIN;
16401 int_fast32_t e3 = INT_FAST32_MAX;
16402 int_fast32_t e3min = INT_FAST32_MIN;
16403 int_fast64_t e4 = INT_FAST64_MAX;
16404 int_fast64_t e4min = INT_FAST64_MIN;
16405 uint_fast8_t f1 = UINT_FAST8_MAX;
16406 uint_fast16_t f2 = UINT_FAST16_MAX;
16407 uint_fast32_t f3 = UINT_FAST32_MAX;
16408 uint_fast64_t f4 = UINT_FAST64_MAX;
16410 intptr_t g = INTPTR_MAX;
16411 intptr_t gmin = INTPTR_MIN;
16414 uintptr_t h = UINTPTR_MAX;
16416 intmax_t i = INTMAX_MAX;
16417 uintmax_t j = UINTMAX_MAX;
16419 #include <limits.h> /* for CHAR_BIT */
16420 #define TYPE_MINIMUM(t) \
16421 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16422 #define TYPE_MAXIMUM(t) \
16423 ((t) ((t) 0 < (t) -1 \
16425 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16428 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
16429 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
16431 /* Detect bug in FreeBSD 6.0 / ia64. */
16432 int check_SIG_ATOMIC:
16433 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
16434 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
16436 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
16438 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
16439 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
16441 /* Detect bug in mingw. */
16443 WINT_MIN == TYPE_MINIMUM (wint_t)
16444 && WINT_MAX == TYPE_MAXIMUM (wint_t)
16447 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
16449 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
16450 int check_UINT16_C:
16451 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
16453 /* Detect bugs in OpenBSD 3.9 stdint.h. */
16455 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
16458 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
16461 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
16464 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
16466 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
16467 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
16468 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
16469 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
16470 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
16471 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
16472 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
16473 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
16474 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
16475 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
16476 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
16487 if ac_fn_c_try_compile "$LINENO"; then :
16488 if test "$cross_compiling" = yes; then :
16489 gl_cv_header_working_stdint_h=yes
16492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16493 /* end confdefs.h. */
16496 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16497 #include <stdint.h>
16500 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16501 included before <wchar.h>. */
16502 #include <stddef.h>
16503 #include <signal.h>
16505 # include <stdio.h>
16507 # include <wchar.h>
16512 #include <string.h>
16513 #define MVAL(macro) MVAL1(macro)
16514 #define MVAL1(expression) #expression
16515 static const char *macro_values[] =
16549 for (mv = macro_values; *mv != NULL; mv++)
16551 const char *value = *mv;
16552 /* Test whether it looks like a cast expression. */
16553 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
16554 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
16555 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
16556 || strncmp (value, "((int)"/*)*/, 6) == 0
16557 || strncmp (value, "((signed short)"/*)*/, 15) == 0
16558 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
16559 return mv - macro_values + 1;
16567 if ac_fn_c_try_run "$LINENO"; then :
16568 gl_cv_header_working_stdint_h=yes
16570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16571 conftest.$ac_objext conftest.beam conftest.$ac_ext
16576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
16580 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
16582 if test "$gl_cv_header_working_stdint_h" = yes; then
16585 for ac_header in sys/inttypes.h sys/bitypes.h
16587 as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
16588 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16589 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16590 cat >>confdefs.h <<_ACEOF
16591 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
16598 if test $ac_cv_header_sys_inttypes_h = yes; then
16599 HAVE_SYS_INTTYPES_H=1
16601 HAVE_SYS_INTTYPES_H=0
16604 if test $ac_cv_header_sys_bitypes_h = yes; then
16605 HAVE_SYS_BITYPES_H=1
16607 HAVE_SYS_BITYPES_H=0
16613 if test $APPLE_UNIVERSAL_BUILD = 0; then
16616 for gltype in ptrdiff_t size_t ; do
16617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16618 printf %s "checking for bit size of $gltype... " >&6; }
16619 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
16620 printf %s "(cached) " >&6
16622 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
16623 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16624 included before <wchar.h>. */
16625 #include <stddef.h>
16626 #include <signal.h>
16628 # include <stdio.h>
16630 # include <wchar.h>
16633 #include <limits.h>"; then :
16639 eval gl_cv_bitsizeof_${gltype}=\$result
16642 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16644 printf "%s\n" "$ac_res" >&6; }
16645 eval result=\$gl_cv_bitsizeof_${gltype}
16646 if test $result = unknown; then
16649 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16650 cat >>confdefs.h <<_ACEOF
16651 #define BITSIZEOF_${GLTYPE} $result
16654 eval BITSIZEOF_${GLTYPE}=\$result
16661 for gltype in sig_atomic_t wchar_t wint_t ; do
16662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16663 printf %s "checking for bit size of $gltype... " >&6; }
16664 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
16665 printf %s "(cached) " >&6
16667 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
16668 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16669 included before <wchar.h>. */
16670 #include <stddef.h>
16671 #include <signal.h>
16673 # include <stdio.h>
16675 # include <wchar.h>
16678 #include <limits.h>"; then :
16684 eval gl_cv_bitsizeof_${gltype}=\$result
16687 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16689 printf "%s\n" "$ac_res" >&6; }
16690 eval result=\$gl_cv_bitsizeof_${gltype}
16691 if test $result = unknown; then
16694 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16695 cat >>confdefs.h <<_ACEOF
16696 #define BITSIZEOF_${GLTYPE} $result
16699 eval BITSIZEOF_${GLTYPE}=\$result
16705 for gltype in sig_atomic_t wchar_t wint_t ; do
16706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
16707 printf %s "checking whether $gltype is signed... " >&6; }
16708 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
16709 printf %s "(cached) " >&6
16711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16712 /* end confdefs.h. */
16714 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16715 included before <wchar.h>. */
16716 #include <stddef.h>
16717 #include <signal.h>
16719 # include <stdio.h>
16721 # include <wchar.h>
16724 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
16733 if ac_fn_c_try_compile "$LINENO"; then :
16738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16739 eval gl_cv_type_${gltype}_signed=\$result
16742 eval ac_res=\$gl_cv_type_${gltype}_signed
16743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16744 printf "%s\n" "$ac_res" >&6; }
16745 eval result=\$gl_cv_type_${gltype}_signed
16746 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16747 if test "$result" = yes; then
16748 cat >>confdefs.h <<_ACEOF
16749 #define HAVE_SIGNED_${GLTYPE} 1
16752 eval HAVE_SIGNED_${GLTYPE}=1
16754 eval HAVE_SIGNED_${GLTYPE}=0
16759 gl_cv_type_ptrdiff_t_signed=yes
16760 gl_cv_type_size_t_signed=no
16761 if test $APPLE_UNIVERSAL_BUILD = 0; then
16764 for gltype in ptrdiff_t size_t ; do
16765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16766 printf %s "checking for $gltype integer literal suffix... " >&6; }
16767 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
16768 printf %s "(cached) " >&6
16770 eval gl_cv_type_${gltype}_suffix=no
16771 eval result=\$gl_cv_type_${gltype}_signed
16772 if test "$result" = yes; then
16777 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16779 '') gltype1='int';;
16780 l) gltype1='long int';;
16781 ll) gltype1='long long int';;
16782 i64) gltype1='__int64';;
16783 u) gltype1='unsigned int';;
16784 ul) gltype1='unsigned long int';;
16785 ull) gltype1='unsigned long long int';;
16786 ui64)gltype1='unsigned __int64';;
16788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16789 /* end confdefs.h. */
16791 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16792 included before <wchar.h>. */
16793 #include <stddef.h>
16794 #include <signal.h>
16796 # include <stdio.h>
16798 # include <wchar.h>
16801 extern $gltype foo;
16802 extern $gltype1 foo;
16811 if ac_fn_c_try_compile "$LINENO"; then :
16812 eval gl_cv_type_${gltype}_suffix=\$glsuf
16814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16815 eval result=\$gl_cv_type_${gltype}_suffix
16816 test "$result" != no && break
16819 eval ac_res=\$gl_cv_type_${gltype}_suffix
16820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16821 printf "%s\n" "$ac_res" >&6; }
16822 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16823 eval result=\$gl_cv_type_${gltype}_suffix
16824 test "$result" = no && result=
16825 eval ${GLTYPE}_SUFFIX=\$result
16826 cat >>confdefs.h <<_ACEOF
16827 #define ${GLTYPE}_SUFFIX $result
16836 for gltype in sig_atomic_t wchar_t wint_t ; do
16837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16838 printf %s "checking for $gltype integer literal suffix... " >&6; }
16839 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
16840 printf %s "(cached) " >&6
16842 eval gl_cv_type_${gltype}_suffix=no
16843 eval result=\$gl_cv_type_${gltype}_signed
16844 if test "$result" = yes; then
16849 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16851 '') gltype1='int';;
16852 l) gltype1='long int';;
16853 ll) gltype1='long long int';;
16854 i64) gltype1='__int64';;
16855 u) gltype1='unsigned int';;
16856 ul) gltype1='unsigned long int';;
16857 ull) gltype1='unsigned long long int';;
16858 ui64)gltype1='unsigned __int64';;
16860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16861 /* end confdefs.h. */
16863 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16864 included before <wchar.h>. */
16865 #include <stddef.h>
16866 #include <signal.h>
16868 # include <stdio.h>
16870 # include <wchar.h>
16873 extern $gltype foo;
16874 extern $gltype1 foo;
16883 if ac_fn_c_try_compile "$LINENO"; then :
16884 eval gl_cv_type_${gltype}_suffix=\$glsuf
16886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16887 eval result=\$gl_cv_type_${gltype}_suffix
16888 test "$result" != no && break
16891 eval ac_res=\$gl_cv_type_${gltype}_suffix
16892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16893 printf "%s\n" "$ac_res" >&6; }
16894 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16895 eval result=\$gl_cv_type_${gltype}_suffix
16896 test "$result" = no && result=
16897 eval ${GLTYPE}_SUFFIX=\$result
16898 cat >>confdefs.h <<_ACEOF
16899 #define ${GLTYPE}_SUFFIX $result
16906 if test $BITSIZEOF_WINT_T -lt 32; then
16907 BITSIZEOF_WINT_T=32
16913 if test -n "$STDINT_H"; then
16914 GL_GENERATE_STDINT_H_TRUE=
16915 GL_GENERATE_STDINT_H_FALSE='#'
16917 GL_GENERATE_STDINT_H_TRUE='#'
16918 GL_GENERATE_STDINT_H_FALSE=
16924 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16925 if test "x$ac_cv_have_decl_strdup" = xyes; then :
16931 cat >>confdefs.h <<_ACEOF
16932 #define HAVE_DECL_STRDUP $ac_have_decl
16948 if test $gl_cv_have_include_next = yes; then
16949 gl_cv_next_string_h='<'string.h'>'
16951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16952 printf %s "checking absolute name of <string.h>... " >&6; }
16953 if ${gl_cv_next_string_h+:} false; then :
16954 printf %s "(cached) " >&6
16957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16958 /* end confdefs.h. */
16959 #include <string.h>
16963 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16964 *) gl_absname_cpp="$ac_cpp" ;;
16969 gl_dirsep_regex='[/\\]'
16972 gl_dirsep_regex='\/'
16975 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16977 gl_header_literal_regex=`echo 'string.h' \
16978 | sed -e "$gl_make_literal_regex_sed"`
16979 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16980 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16985 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16986 sed -n "$gl_absolute_header_sed"`'"'
16990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
16991 printf "%s\n" "$gl_cv_next_string_h" >&6; }
16993 NEXT_STRING_H=$gl_cv_next_string_h
16995 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16996 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16997 gl_next_as_first_directive='<'string.h'>'
16999 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17000 gl_next_as_first_directive=$gl_cv_next_string_h
17002 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17012 GNULIB_NANOSLEEP=0;
17016 HAVE_DECL_LOCALTIME_R=1;
17020 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17021 REPLACE_MKTIME=GNULIB_PORTCHECK;
17022 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17023 REPLACE_TIMEGM=GNULIB_PORTCHECK;
17027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17028 printf %s "checking for struct timespec in <time.h>... " >&6; }
17029 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17030 printf %s "(cached) " >&6
17032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17033 /* end confdefs.h. */
17039 static struct timespec x; x.tv_sec = x.tv_nsec;
17044 if ac_fn_c_try_compile "$LINENO"; then :
17045 gl_cv_sys_struct_timespec_in_time_h=yes
17047 gl_cv_sys_struct_timespec_in_time_h=no
17049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17052 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17054 TIME_H_DEFINES_STRUCT_TIMESPEC=0
17055 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17056 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17057 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17058 TIME_H_DEFINES_STRUCT_TIMESPEC=1
17060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17061 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
17062 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17063 printf %s "(cached) " >&6
17065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17066 /* end confdefs.h. */
17067 #include <sys/time.h>
17072 static struct timespec x; x.tv_sec = x.tv_nsec;
17077 if ac_fn_c_try_compile "$LINENO"; then :
17078 gl_cv_sys_struct_timespec_in_sys_time_h=yes
17080 gl_cv_sys_struct_timespec_in_sys_time_h=no
17082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17085 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17086 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17087 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17090 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
17091 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17092 printf %s "(cached) " >&6
17094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17095 /* end confdefs.h. */
17096 #include <pthread.h>
17101 static struct timespec x; x.tv_sec = x.tv_nsec;
17106 if ac_fn_c_try_compile "$LINENO"; then :
17107 gl_cv_sys_struct_timespec_in_pthread_h=yes
17109 gl_cv_sys_struct_timespec_in_pthread_h=no
17111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17114 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17115 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17116 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17135 if test $gl_cv_have_include_next = yes; then
17136 gl_cv_next_time_h='<'time.h'>'
17138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17139 printf %s "checking absolute name of <time.h>... " >&6; }
17140 if ${gl_cv_next_time_h+:} false; then :
17141 printf %s "(cached) " >&6
17144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17145 /* end confdefs.h. */
17150 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17151 *) gl_absname_cpp="$ac_cpp" ;;
17156 gl_dirsep_regex='[/\\]'
17159 gl_dirsep_regex='\/'
17162 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17164 gl_header_literal_regex=`echo 'time.h' \
17165 | sed -e "$gl_make_literal_regex_sed"`
17166 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17167 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17172 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17173 sed -n "$gl_absolute_header_sed"`'"'
17177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17178 printf "%s\n" "$gl_cv_next_time_h" >&6; }
17180 NEXT_TIME_H=$gl_cv_next_time_h
17182 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17183 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17184 gl_next_as_first_directive='<'time.h'>'
17186 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17187 gl_next_as_first_directive=$gl_cv_next_time_h
17189 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
17200 printf %s "checking whether the utimes function works... " >&6; }
17201 if ${gl_cv_func_working_utimes+:} false; then :
17202 printf %s "(cached) " >&6
17205 if test "$cross_compiling" = yes; then :
17206 gl_cv_func_working_utimes=no
17208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17209 /* end confdefs.h. */
17211 #include <sys/types.h>
17212 #include <sys/stat.h>
17214 #include <sys/time.h>
17216 #include <unistd.h>
17217 #include <stdlib.h>
17222 inorder (time_t a, time_t b, time_t c)
17224 return a <= b && b <= c;
17231 char const *file = "conftest.utimes";
17232 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
17234 /* Test whether utimes() essentially works. */
17237 FILE *f = fopen (file, "w");
17240 else if (fclose (f) != 0)
17242 else if (utimes (file, timeval) != 0)
17244 else if (lstat (file, &sbuf) != 0)
17246 else if (!(sbuf.st_atime == timeval[0].tv_sec
17247 && sbuf.st_mtime == timeval[1].tv_sec))
17249 if (unlink (file) != 0)
17253 /* Test whether utimes() with a NULL argument sets the file's timestamp
17254 to the current time. Use 'fstat' as well as 'time' to
17255 determine the "current" time, to accommodate NFS file systems
17256 if there is a time skew between the host and the NFS server. */
17258 int fd = open (file, O_WRONLY|O_CREAT, 0644);
17264 struct stat st0, st1, st2;
17265 if (time (&t0) == (time_t) -1)
17267 else if (fstat (fd, &st0) != 0)
17269 else if (utimes (file, timeval) != 0)
17271 else if (utimes (file, NULL) != 0)
17273 else if (fstat (fd, &st1) != 0)
17275 else if (write (fd, "\n", 1) != 1)
17277 else if (fstat (fd, &st2) != 0)
17279 else if (time (&t2) == (time_t) -1)
17283 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
17284 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
17285 if (! (st1.st_atime == st1.st_mtime))
17287 if (! (m_ok_POSIX || m_ok_NFS))
17290 if (close (fd) != 0)
17293 if (unlink (file) != 0)
17297 /* Test whether utimes() with a NULL argument works on read-only files. */
17299 int fd = open (file, O_WRONLY|O_CREAT, 0444);
17302 else if (close (fd) != 0)
17304 else if (utimes (file, NULL) != 0)
17306 if (unlink (file) != 0)
17314 if ac_fn_c_try_run "$LINENO"; then :
17315 gl_cv_func_working_utimes=yes
17317 gl_cv_func_working_utimes=no
17319 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17320 conftest.$ac_objext conftest.beam conftest.$ac_ext
17324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
17325 printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
17327 if test $gl_cv_func_working_utimes = yes; then
17329 printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
17337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
17338 printf %s "checking for struct utimbuf... " >&6; }
17339 if ${gl_cv_sys_struct_utimbuf+:} false; then :
17340 printf %s "(cached) " >&6
17342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17343 /* end confdefs.h. */
17344 #if HAVE_SYS_TIME_H
17345 #include <sys/time.h>
17348 #ifdef HAVE_UTIME_H
17355 static struct utimbuf x; x.actime = x.modtime;
17360 if ac_fn_c_try_compile "$LINENO"; then :
17361 gl_cv_sys_struct_utimbuf=yes
17363 gl_cv_sys_struct_utimbuf=no
17365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
17368 printf "%s\n" "$gl_cv_sys_struct_utimbuf" >&6; }
17370 if test $gl_cv_sys_struct_utimbuf = yes; then
17372 printf "%s\n" "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
17387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
17388 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
17389 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
17390 printf %s "(cached) " >&6
17392 gl_cv_header_wchar_h_correct_inline=yes
17393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17394 /* end confdefs.h. */
17396 #define wcstod renamed_wcstod
17397 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17399 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17400 included before <wchar.h>. */
17401 #include <stddef.h>
17405 extern int zero (void);
17406 int main () { return zero(); }
17409 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17410 (eval $ac_compile) 2>&5
17412 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17413 test $ac_status = 0; }; then
17414 mv conftest.$ac_objext conftest1.$ac_objext
17415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17416 /* end confdefs.h. */
17418 #define wcstod renamed_wcstod
17419 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17421 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17422 included before <wchar.h>. */
17423 #include <stddef.h>
17427 int zero (void) { return 0; }
17430 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17431 (eval $ac_compile) 2>&5
17433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17434 test $ac_status = 0; }; then
17435 mv conftest.$ac_objext conftest2.$ac_objext
17436 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
17439 gl_cv_header_wchar_h_correct_inline=no
17443 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
17446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
17447 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
17448 if test $gl_cv_header_wchar_h_correct_inline = no; then
17449 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
17450 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
17451 C99 mode. You have four options:
17452 - Add the flag -fgnu89-inline to CC and reconfigure, or
17453 - Fix your include files, using parts of
17454 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
17455 - Use a gcc version older than 4.3, or
17456 - Don't use the flags -std=c99 or -std=gnu99.
17457 Configuration aborted." "$LINENO" 5
17465 GNULIB_TOWCTRANS=0;
17469 REPLACE_ISWBLANK=0;
17477 GL_COND_LIBTOOL_TRUE=
17478 GL_COND_LIBTOOL_FALSE='#'
17480 GL_COND_LIBTOOL_TRUE='#'
17481 GL_COND_LIBTOOL_FALSE=
17484 gl_cond_libtool=false
17497 gl_source_base='lib'
17500 if test $ac_cv_func_alloca_works = no; then
17504 # Define an additional variable used in the Makefile substitution.
17505 if test $ac_cv_working_alloca_h = yes; then
17506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17507 printf %s "checking for alloca as a compiler built-in... " >&6; }
17508 if ${gl_cv_rpl_alloca+:} false; then :
17509 printf %s "(cached) " >&6
17512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17513 /* end confdefs.h. */
17515 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17521 $EGREP "Need own alloca" >/dev/null 2>&1; then :
17522 gl_cv_rpl_alloca=yes
17524 gl_cv_rpl_alloca=no
17530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17531 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
17532 if test $gl_cv_rpl_alloca = yes; then
17534 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
17544 if test -n "$ALLOCA_H"; then
17545 GL_GENERATE_ALLOCA_H_TRUE=
17546 GL_GENERATE_ALLOCA_H_FALSE='#'
17548 GL_GENERATE_ALLOCA_H_TRUE='#'
17549 GL_GENERATE_ALLOCA_H_FALSE=
17561 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
17567 printf %s "checking for GNU libc compatible calloc... " >&6; }
17568 if ${ac_cv_func_calloc_0_nonnull+:} false; then :
17569 printf %s "(cached) " >&6
17571 if test "$cross_compiling" = yes; then :
17573 # Guess yes on glibc systems.
17574 *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
17575 # If we don't know, assume the worst.
17576 *) ac_cv_func_calloc_0_nonnull="guessing no" ;;
17580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581 /* end confdefs.h. */
17582 $ac_includes_default
17587 if (!calloc (0, 0))
17589 if (calloc ((size_t) -1 / 8 + 1, 8))
17597 if ac_fn_c_try_run "$LINENO"; then :
17598 ac_cv_func_calloc_0_nonnull=yes
17600 ac_cv_func_calloc_0_nonnull=no
17602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17603 conftest.$ac_objext conftest.beam conftest.$ac_ext
17607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
17608 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
17609 case "$ac_cv_func_calloc_0_nonnull" in
17612 printf "%s\n" "#define HAVE_CALLOC_GNU 1" >>confdefs.h
17616 printf "%s\n" "#define HAVE_CALLOC_GNU 0" >>confdefs.h
17624 if test $REPLACE_CALLOC = 1; then
17633 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17638 cat >>confdefs.h <<_ACEOF
17639 #define GNULIB_CALLOC_GNU 1
17646 if test $gl_cv_func_malloc_posix = yes; then
17648 printf "%s\n" "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
17654 if test $REPLACE_CALLOC = 1; then
17663 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17671 GNULIB_CALLOC_POSIX=1
17677 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
17692 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17699 printf %s "checking whether this system has an arbitrary file name length limit... " >&6; }
17700 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17701 printf %s "(cached) " >&6
17703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17704 /* end confdefs.h. */
17706 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17708 # include <unistd.h>
17710 #include <limits.h>
17711 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17712 # include <sys/param.h>
17714 #if !defined PATH_MAX && defined MAXPATHLEN
17715 # define PATH_MAX MAXPATHLEN
17719 # define PATH_MAX 1024
17721 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17723 # define PATH_MAX 260
17727 have_arbitrary_file_name_length_limit
17730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17731 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17732 gl_cv_have_arbitrary_file_name_length_limit=yes
17734 gl_cv_have_arbitrary_file_name_length_limit=no
17739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17740 printf "%s\n" "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17742 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17751 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17758 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17759 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17761 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
17762 # programs in the package would end up linked with that potentially-shared
17763 # library, inducing unnecessary run-time overhead.
17766 gl_saved_libs=$LIBS
17767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17768 printf %s "checking for library containing clock_gettime... " >&6; }
17769 if ${ac_cv_search_clock_gettime+:} false; then :
17770 printf %s "(cached) " >&6
17772 ac_func_search_save_LIBS=$LIBS
17773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17774 /* end confdefs.h. */
17776 /* Override any GCC internal prototype to avoid an error.
17777 Use char because int might match the return type of a GCC
17778 builtin and then its argument prototype would still apply. */
17782 char clock_gettime ();
17786 return clock_gettime ();
17791 for ac_lib in '' rt posix4; do
17792 if test -z "$ac_lib"; then
17793 ac_res="none required"
17796 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17798 if ac_fn_c_try_link "$LINENO"; then :
17799 ac_cv_search_clock_gettime=$ac_res
17801 rm -f core conftest.err conftest.$ac_objext \
17803 if ${ac_cv_search_clock_gettime+:} false; then :
17807 if ${ac_cv_search_clock_gettime+:} false; then :
17810 ac_cv_search_clock_gettime=no
17812 rm conftest.$ac_ext
17813 LIBS=$ac_func_search_save_LIBS
17815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17816 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
17817 ac_res=$ac_cv_search_clock_gettime
17818 if test "$ac_res" != no; then :
17819 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17820 test "$ac_cv_search_clock_gettime" = "none required" ||
17821 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17824 for ac_func in clock_gettime clock_settime
17826 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
17827 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17828 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17829 cat >>confdefs.h <<_ACEOF
17830 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
17836 LIBS=$gl_saved_libs
17840 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17846 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17854 if test $ac_cv_header_sys_socket_h != yes; then
17855 for ac_header in winsock2.h
17857 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17858 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17859 cat >>confdefs.h <<_ACEOF
17860 #define HAVE_WINSOCK2_H 1
17868 if test "$ac_cv_header_winsock2_h" = yes; then
17870 UNISTD_H_HAVE_WINSOCK2_H=1
17871 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17877 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17882 if test $REPLACE_CLOSE = 0; then
17886 if test $ac_cv_func_fchdir = no; then
17890 if test $HAVE_FCHDIR = 0; then
17896 if test $REPLACE_CLOSE = 1; then
17905 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17919 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17928 cat >>confdefs.h <<_ACEOF
17929 #define GNULIB_CLOSE_STREAM 1
17936 for ac_func in closedir
17938 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17939 if test "x$ac_cv_func_closedir" = xyes; then :
17940 cat >>confdefs.h <<_ACEOF
17941 #define HAVE_CLOSEDIR 1
17947 if test $ac_cv_func_closedir = no; then
17954 if test $ac_cv_func_fchdir = no; then
17958 if test $HAVE_FCHDIR = 0; then
17959 if test $HAVE_CLOSEDIR = 1; then
17965 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17974 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17988 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17999 if test "x$datarootdir" = x; then
18000 datarootdir='${datadir}'
18003 if test "x$docdir" = x; then
18004 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
18007 if test "x$htmldir" = x; then
18008 htmldir='${docdir}'
18011 if test "x$dvidir" = x; then
18015 if test "x$pdfdir" = x; then
18019 if test "x$psdir" = x; then
18023 if test "x$lispdir" = x; then
18024 lispdir='${datarootdir}/emacs/site-lisp'
18027 if test "x$localedir" = x; then
18028 localedir='${datarootdir}/locale'
18032 pkglibexecdir='${libexecdir}/${PACKAGE}'
18047 if test $gl_cv_have_include_next = yes; then
18048 gl_cv_next_dirent_h='<'dirent.h'>'
18050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
18051 printf %s "checking absolute name of <dirent.h>... " >&6; }
18052 if ${gl_cv_next_dirent_h+:} false; then :
18053 printf %s "(cached) " >&6
18056 if test $ac_cv_header_dirent_h = yes; then
18059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18060 /* end confdefs.h. */
18061 #include <dirent.h>
18065 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18066 *) gl_absname_cpp="$ac_cpp" ;;
18071 gl_dirsep_regex='[/\\]'
18074 gl_dirsep_regex='\/'
18077 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18079 gl_header_literal_regex=`echo 'dirent.h' \
18080 | sed -e "$gl_make_literal_regex_sed"`
18081 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18082 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18087 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18088 sed -n "$gl_absolute_header_sed"`'"'
18090 gl_cv_next_dirent_h='<'dirent.h'>'
18095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18096 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
18098 NEXT_DIRENT_H=$gl_cv_next_dirent_h
18100 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18101 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18102 gl_next_as_first_directive='<'dirent.h'>'
18104 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18105 gl_next_as_first_directive=$gl_cv_next_dirent_h
18107 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
18112 if test $ac_cv_header_dirent_h = yes; then
18126 cat >>confdefs.h <<_ACEOF
18127 #define GNULIB_DIRENT_SAFER 1
18136 for ac_func in dirfd
18138 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18139 if test "x$ac_cv_func_dirfd" = xyes; then :
18140 cat >>confdefs.h <<_ACEOF
18141 #define HAVE_DIRFD 1
18147 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18148 #include <dirent.h>
18150 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
18156 cat >>confdefs.h <<_ACEOF
18157 #define HAVE_DECL_DIRFD $ac_have_decl
18160 if test $ac_cv_have_decl_dirfd = no; then
18164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18165 printf %s "checking whether dirfd is a macro... " >&6; }
18166 if ${gl_cv_func_dirfd_macro+:} false; then :
18167 printf %s "(cached) " >&6
18169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18170 /* end confdefs.h. */
18172 #include <sys/types.h>
18173 #include <dirent.h>
18175 dirent_header_defines_dirfd
18178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18179 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
18180 gl_cv_func_dirfd_macro=yes
18182 gl_cv_func_dirfd_macro=no
18187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18188 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
18190 # Use the replacement only if we have no function or macro with that name.
18191 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18192 if test $ac_cv_have_decl_dirfd = yes; then
18193 # If the system declares dirfd already, let's declare rpl_dirfd instead.
18198 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18207 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18211 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18212 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
18213 printf %s "(cached) " >&6
18216 dirfd_save_CFLAGS=$CFLAGS
18217 for ac_expr in d_fd dd_fd; do
18219 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18221 /* end confdefs.h. */
18223 #include <sys/types.h>
18224 #include <dirent.h>
18228 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18233 if ac_fn_c_try_compile "$LINENO"; then :
18237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18238 CFLAGS=$dirfd_save_CFLAGS
18239 test "$dir_fd_found" = yes && break
18241 test "$dir_fd_found" = yes || ac_expr=no_such_member
18243 gl_cv_sys_dir_fd_member_name=$ac_expr
18247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18248 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
18249 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18251 cat >>confdefs.h <<_ACEOF
18252 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18270 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18281 printf %s "checking whether // is distinct from /... " >&6; }
18282 if ${gl_cv_double_slash_root+:} false; then :
18283 printf %s "(cached) " >&6
18285 if test x"$cross_compiling" = xyes ; then
18286 # When cross-compiling, there is no way to tell whether // is special
18287 # short of a list of hosts. However, the only known hosts to date
18288 # that have a distinct // are Apollo DomainOS (too old to port to),
18289 # Cygwin, and z/OS. If anyone knows of another system for which // has
18290 # special semantics and is distinct from /, please report it to
18291 # <bug-gnulib@gnu.org>.
18293 *-cygwin | i370-ibm-openedition)
18294 gl_cv_double_slash_root=yes ;;
18296 # Be optimistic and assume that / and // are the same when we
18298 gl_cv_double_slash_root='unknown, assuming no' ;;
18301 set x `ls -di / // 2>/dev/null`
18302 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18303 gl_cv_double_slash_root=no
18305 gl_cv_double_slash_root=yes
18309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18310 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
18311 if test "$gl_cv_double_slash_root" = yes; then
18313 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18320 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18327 if test $ac_cv_func_fchdir = no; then
18331 if test $HAVE_FCHDIR = 0; then
18336 if test $REPLACE_DUP = 1; then
18345 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18360 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
18369 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
18372 if test $HAVE_DUP2 = 1; then
18373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18374 printf %s "checking whether dup2 works... " >&6; }
18375 if ${gl_cv_func_dup2_works+:} false; then :
18376 printf %s "(cached) " >&6
18378 if test "$cross_compiling" = yes; then :
18380 mingw*) # on this platform, dup2 always returns 0 for success
18381 gl_cv_func_dup2_works="guessing no" ;;
18382 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18383 gl_cv_func_dup2_works="guessing no" ;;
18384 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
18385 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
18386 gl_cv_func_dup2_works="guessing no" ;;
18387 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
18388 gl_cv_func_dup2_works="guessing no" ;;
18389 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18390 gl_cv_func_dup2_works="guessing no" ;;
18391 *) gl_cv_func_dup2_works="guessing yes" ;;
18394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18395 /* end confdefs.h. */
18397 #include <unistd.h>
18405 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18408 if (dup2 (1, 1) == 0)
18411 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18415 if (dup2 (0, 0) != -1)
18417 /* Many gnulib modules require POSIX conformance of EBADF. */
18418 if (dup2 (2, 1000000) == -1 && errno != EBADF)
18420 /* Flush out a cygwin core dump. */
18421 if (dup2 (2, -1) != -1 || errno != EBADF)
18430 if ac_fn_c_try_run "$LINENO"; then :
18431 gl_cv_func_dup2_works=yes
18433 gl_cv_func_dup2_works=no
18435 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18436 conftest.$ac_objext conftest.beam conftest.$ac_ext
18441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18442 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
18443 case "$gl_cv_func_dup2_works" in
18454 if test $ac_cv_func_fchdir = no; then
18458 if test $HAVE_FCHDIR = 0; then
18459 if test $HAVE_DUP2 = 1; then
18465 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18474 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18489 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18496 printf %s "checking for error_at_line... " >&6; }
18497 if ${ac_cv_lib_error_at_line+:} false; then :
18498 printf %s "(cached) " >&6
18500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18501 /* end confdefs.h. */
18506 error_at_line (0, 0, "", 0, "an error occurred");
18511 if ac_fn_c_try_link "$LINENO"; then :
18512 ac_cv_lib_error_at_line=yes
18514 ac_cv_lib_error_at_line=no
18516 rm -f core conftest.err conftest.$ac_objext \
18517 conftest$ac_exeext conftest.$ac_ext
18519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18520 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
18522 if test $ac_cv_lib_error_at_line = no; then
18531 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18540 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18544 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18552 if test $ac_cv_have_decl_fchdir = no; then
18557 if test $HAVE_FCHDIR = 0; then
18566 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18570 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
18572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18573 printf %s "checking whether open can visit directories... " >&6; }
18574 if ${gl_cv_func_open_directory_works+:} false; then :
18575 printf %s "(cached) " >&6
18577 if test "$cross_compiling" = yes; then :
18579 # Guess yes on glibc systems.
18580 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18581 # If we don't know, assume the worst.
18582 *) gl_cv_func_open_directory_works="guessing no" ;;
18586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18587 /* end confdefs.h. */
18593 return open(".", O_RDONLY) < 0;
18598 if ac_fn_c_try_run "$LINENO"; then :
18599 gl_cv_func_open_directory_works=yes
18601 gl_cv_func_open_directory_works=no
18603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18604 conftest.$ac_objext conftest.beam conftest.$ac_ext
18608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18609 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
18610 case "$gl_cv_func_open_directory_works" in
18614 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18631 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
18641 printf %s "checking whether fflush works on input streams... " >&6; }
18642 if ${gl_cv_func_fflush_stdin+:} false; then :
18643 printf %s "(cached) " >&6
18645 echo hello world > conftest.txt
18646 if test "$cross_compiling" = yes; then :
18647 gl_cv_func_fflush_stdin=no
18649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18650 /* end confdefs.h. */
18654 # include <unistd.h>
18655 #else /* on Windows with MSVC */
18662 FILE *f = fopen ("conftest.txt", "r");
18669 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
18671 /* For deterministic results, ensure f read a bigger buffer. */
18672 if (lseek (fd, 0, SEEK_CUR) == 5)
18674 /* POSIX requires fflush-fseek to set file offset of fd. This fails
18675 on BSD systems and on mingw. */
18676 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
18678 if (lseek (fd, 0, SEEK_CUR) != 5)
18680 /* Verify behaviour of fflush after ungetc. See
18681 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
18682 /* Verify behaviour of fflush after a backup ungetc. This fails on
18687 if (fgetc (f) != c)
18689 /* Verify behaviour of fflush after a non-backup ungetc. This fails
18690 on glibc 2.8 and on BSD systems. */
18694 if (fgetc (f) != c)
18702 if ac_fn_c_try_run "$LINENO"; then :
18703 gl_cv_func_fflush_stdin=yes
18705 gl_cv_func_fflush_stdin=no
18707 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18708 conftest.$ac_objext conftest.beam conftest.$ac_ext
18714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
18715 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
18717 if test $gl_cv_func_fflush_stdin = no; then
18722 if test $REPLACE_CLOSE = 1; then
18726 if test $REPLACE_FCLOSE = 1; then
18735 gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
18749 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
18758 if test $ac_cv_func_fcntl = no; then
18762 if test $ac_cv_func_fcntl = no; then
18769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18770 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18771 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18772 printf %s "(cached) " >&6
18774 if test "$cross_compiling" = yes; then :
18775 # Guess that it works on glibc systems
18776 case $host_os in #((
18777 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18778 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18782 /* end confdefs.h. */
18791 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18792 if (errno != EINVAL) result |= 2;
18799 if ac_fn_c_try_run "$LINENO"; then :
18800 gl_cv_func_fcntl_f_dupfd_works=yes
18802 gl_cv_func_fcntl_f_dupfd_works=no
18804 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18805 conftest.$ac_objext conftest.beam conftest.$ac_ext
18809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18810 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18811 case $gl_cv_func_fcntl_f_dupfd_works in
18816 if test $ac_cv_func_fcntl = no; then
18823 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18828 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18829 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18830 printf %s "(cached) " >&6
18832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18833 /* end confdefs.h. */
18836 #ifndef F_DUPFD_CLOEXEC
18848 if ac_fn_c_try_compile "$LINENO"; then :
18849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18850 /* end confdefs.h. */
18853 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18854 it to support the semantics on older kernels that failed with EINVAL. */
18866 if ac_fn_c_try_compile "$LINENO"; then :
18867 gl_cv_func_fcntl_f_dupfd_cloexec=yes
18869 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18873 gl_cv_func_fcntl_f_dupfd_cloexec=no
18875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18878 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18879 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18883 if test $ac_cv_func_fcntl = no; then
18895 if test $ac_cv_func_fchdir = no; then
18899 if test $HAVE_FCHDIR = 0; then
18903 if test $ac_cv_func_fcntl = no; then
18912 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18921 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18935 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18950 if test $gl_cv_have_include_next = yes; then
18951 gl_cv_next_fcntl_h='<'fcntl.h'>'
18953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18954 printf %s "checking absolute name of <fcntl.h>... " >&6; }
18955 if ${gl_cv_next_fcntl_h+:} false; then :
18956 printf %s "(cached) " >&6
18959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18960 /* end confdefs.h. */
18965 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18966 *) gl_absname_cpp="$ac_cpp" ;;
18971 gl_dirsep_regex='[/\\]'
18974 gl_dirsep_regex='\/'
18977 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18979 gl_header_literal_regex=`echo 'fcntl.h' \
18980 | sed -e "$gl_make_literal_regex_sed"`
18981 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18982 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18987 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18988 sed -n "$gl_absolute_header_sed"`'"'
18992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18993 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
18995 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18997 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18998 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18999 gl_next_as_first_directive='<'fcntl.h'>'
19001 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19002 gl_next_as_first_directive=$gl_cv_next_fcntl_h
19004 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
19021 cat >>confdefs.h <<_ACEOF
19022 #define GNULIB_FCNTL_SAFER 1
19031 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19032 #include <dirent.h>
19035 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
19041 cat >>confdefs.h <<_ACEOF
19042 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19044 if test $ac_have_decl = 1; then :
19047 HAVE_DECL_FDOPENDIR=0
19051 if test $ac_cv_func_fdopendir = no; then
19054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19055 printf %s "checking whether fdopendir works... " >&6; }
19056 if ${gl_cv_func_fdopendir_works+:} false; then :
19057 printf %s "(cached) " >&6
19059 if test "$cross_compiling" = yes; then :
19061 # Guess yes on glibc systems.
19062 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19063 # If we don't know, assume the worst.
19064 *) gl_cv_func_fdopendir_works="guessing no" ;;
19068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19069 /* end confdefs.h. */
19071 #include <dirent.h>
19073 #include <unistd.h>
19074 #if !HAVE_DECL_FDOPENDIR
19076 # ifdef __cplusplus
19079 DIR *fdopendir (int);
19086 int fd = open ("conftest.c", O_RDONLY);
19087 if (fd < 0) result |= 1;
19088 if (fdopendir (fd)) result |= 2;
19089 if (close (fd)) result |= 4;
19095 if ac_fn_c_try_run "$LINENO"; then :
19096 gl_cv_func_fdopendir_works=yes
19098 gl_cv_func_fdopendir_works=no
19100 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19101 conftest.$ac_objext conftest.beam conftest.$ac_ext
19105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19106 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
19107 case "$gl_cv_func_fdopendir_works" in
19110 REPLACE_FDOPENDIR=1
19115 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19124 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19138 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19144 cat >>confdefs.h <<_ACEOF
19145 #define GNULIB_FDOPENDIR 1
19153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19154 printf %s "checking whether fflush works on input streams... " >&6; }
19155 if ${gl_cv_func_fflush_stdin+:} false; then :
19156 printf %s "(cached) " >&6
19158 echo hello world > conftest.txt
19159 if test "$cross_compiling" = yes; then :
19160 gl_cv_func_fflush_stdin=no
19162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19163 /* end confdefs.h. */
19167 # include <unistd.h>
19168 #else /* on Windows with MSVC */
19175 FILE *f = fopen ("conftest.txt", "r");
19182 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19184 /* For deterministic results, ensure f read a bigger buffer. */
19185 if (lseek (fd, 0, SEEK_CUR) == 5)
19187 /* POSIX requires fflush-fseek to set file offset of fd. This fails
19188 on BSD systems and on mingw. */
19189 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19191 if (lseek (fd, 0, SEEK_CUR) != 5)
19193 /* Verify behaviour of fflush after ungetc. See
19194 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
19195 /* Verify behaviour of fflush after a backup ungetc. This fails on
19200 if (fgetc (f) != c)
19202 /* Verify behaviour of fflush after a non-backup ungetc. This fails
19203 on glibc 2.8 and on BSD systems. */
19207 if (fgetc (f) != c)
19215 if ac_fn_c_try_run "$LINENO"; then :
19216 gl_cv_func_fflush_stdin=yes
19218 gl_cv_func_fflush_stdin=no
19220 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19221 conftest.$ac_objext conftest.beam conftest.$ac_ext
19227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19228 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
19230 if test $gl_cv_func_fflush_stdin = no; then
19234 if test $REPLACE_FFLUSH = 1; then
19243 gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
19249 cat >>confdefs.h <<_ACEOF
19250 #define GNULIB_FFLUSH 1
19265 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
19276 REPLACE_FLOAT_LDBL=0
19278 aix* | beos* | openbsd* | mirbsd* | irix*)
19282 case "$host_cpu" in
19287 # On x86_64 systems, the C compiler may still be generating
19289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19290 /* end confdefs.h. */
19291 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19296 $EGREP "yes" >/dev/null 2>&1; then :
19307 case "$host_cpu" in
19315 aix* | freebsd* | linux*)
19316 if test -n "$FLOAT_H"; then
19317 REPLACE_FLOAT_LDBL=1
19323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19324 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
19325 if ${gl_cv_func_itold_works+:} false; then :
19326 printf %s "(cached) " >&6
19329 if test "$cross_compiling" = yes; then :
19332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19333 /* end confdefs.h. */
19334 #if defined __LP64__ || defined __arch64__
19338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19339 $EGREP "yes" >/dev/null 2>&1; then :
19340 gl_cv_func_itold_works="guessing no"
19342 gl_cv_func_itold_works="guessing yes"
19347 *) gl_cv_func_itold_works="guessing yes" ;;
19351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19352 /* end confdefs.h. */
19355 volatile long double ld;
19364 if ac_fn_c_try_run "$LINENO"; then :
19365 gl_cv_func_itold_works=yes
19367 gl_cv_func_itold_works=no
19369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19370 conftest.$ac_objext conftest.beam conftest.$ac_ext
19375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19376 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
19377 case "$gl_cv_func_itold_works" in
19384 if test -n "$FLOAT_H"; then
19393 if test $gl_cv_have_include_next = yes; then
19394 gl_cv_next_float_h='<'float.h'>'
19396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19397 printf %s "checking absolute name of <float.h>... " >&6; }
19398 if ${gl_cv_next_float_h+:} false; then :
19399 printf %s "(cached) " >&6
19402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19403 /* end confdefs.h. */
19408 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19409 *) gl_absname_cpp="$ac_cpp" ;;
19414 gl_dirsep_regex='[/\\]'
19417 gl_dirsep_regex='\/'
19420 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19422 gl_header_literal_regex=`echo 'float.h' \
19423 | sed -e "$gl_make_literal_regex_sed"`
19424 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19425 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19430 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19431 sed -n "$gl_absolute_header_sed"`'"'
19435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19436 printf "%s\n" "$gl_cv_next_float_h" >&6; }
19438 NEXT_FLOAT_H=$gl_cv_next_float_h
19440 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19441 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19442 gl_next_as_first_directive='<'float.h'>'
19444 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19445 gl_next_as_first_directive=$gl_cv_next_float_h
19447 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19454 if test -n "$FLOAT_H"; then
19455 GL_GENERATE_FLOAT_H_TRUE=
19456 GL_GENERATE_FLOAT_H_FALSE='#'
19458 GL_GENERATE_FLOAT_H_TRUE='#'
19459 GL_GENERATE_FLOAT_H_FALSE=
19464 if test $REPLACE_FLOAT_LDBL = 1; then
19473 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19476 if test $REPLACE_ITOLD = 1; then
19485 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19492 # include <stdio.h>
19493 # if HAVE_STDIO_EXT_H
19494 # include <stdio_ext.h>
19497 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19499 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19505 cat >>confdefs.h <<_ACEOF
19506 #define HAVE_DECL___FPENDING $ac_have_decl
19510 if test $ac_cv_func___fpending = no; then
19519 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19523 printf %s "checking how to determine the number of pending output bytes on a stream... " >&6; }
19524 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19525 printf %s "(cached) " >&6
19531 'fp->_IO_write_ptr - fp->_IO_write_base' \
19533 '# traditional Unix' \
19534 'fp->_ptr - fp->_base' \
19537 'fp->_p - fp->_bf._base' \
19539 '# SCO, Unixware' \
19540 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
19543 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19546 'fp->__bufp - fp->__buffer' \
19548 '# old glibc iostream?' \
19549 'fp->_pptr - fp->_pbase' \
19552 'fp->_ptr - fp->_buffer' \
19555 'fp->_ptr - fp->_buf' \
19558 'fp->wp - fp->buf' \
19561 '(*fp)->_ptr - (*fp)->_base' \
19563 '# e.g., DGUX R4.11; the info is not available' \
19567 # Skip each embedded comment.
19568 case "$ac_expr" in '#'*) continue;; esac
19570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19571 /* end confdefs.h. */
19576 FILE *fp = stdin; (void) ($ac_expr);
19581 if ac_fn_c_try_compile "$LINENO"; then :
19585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19586 test "$fp_done" = yes && break
19589 ac_cv_sys_pending_output_n_bytes=$ac_expr
19593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19594 printf "%s\n" "$ac_cv_sys_pending_output_n_bytes" >&6; }
19596 cat >>confdefs.h <<_ACEOF
19597 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19617 gl_cv_func_fprintf_posix=no
19618 case "$gl_cv_func_printf_sizes_c99" in
19620 case "$gl_cv_func_printf_long_double" in
19622 case "$gl_cv_func_printf_infinite" in
19624 case "$gl_cv_func_printf_infinite_long_double" in
19626 case "$gl_cv_func_printf_directive_a" in
19628 case "$gl_cv_func_printf_directive_f" in
19630 case "$gl_cv_func_printf_directive_n" in
19632 case "$gl_cv_func_printf_directive_ls" in
19634 case "$gl_cv_func_printf_positions" in
19636 case "$gl_cv_func_printf_flag_grouping" in
19638 case "$gl_cv_func_printf_flag_leftadjust" in
19640 case "$gl_cv_func_printf_flag_zero" in
19642 case "$gl_cv_func_printf_precision" in
19644 case "$gl_cv_func_printf_enomem" in
19646 # fprintf exists and is
19647 # already POSIX compliant.
19648 gl_cv_func_fprintf_posix=yes
19677 if test $gl_cv_func_fprintf_posix = no; then
19681 case "$gl_cv_func_printf_infinite" in
19686 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
19694 case "$gl_cv_func_printf_long_double" in
19696 case "$gl_cv_func_printf_infinite_long_double" in
19701 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
19710 case "$gl_cv_func_printf_directive_a" in
19715 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
19717 for ac_func in nl_langinfo
19719 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
19720 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
19721 cat >>confdefs.h <<_ACEOF
19722 #define HAVE_NL_LANGINFO 1
19733 case "$gl_cv_func_printf_directive_f" in
19738 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
19745 case "$gl_cv_func_printf_directive_ls" in
19750 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
19757 case "$gl_cv_func_printf_flag_grouping" in
19762 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
19769 case "$gl_cv_func_printf_flag_leftadjust" in
19774 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
19781 case "$gl_cv_func_printf_flag_zero" in
19786 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
19793 case "$gl_cv_func_printf_precision" in
19798 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
19801 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
19804 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19811 case "$gl_cv_func_printf_enomem" in
19816 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
19819 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
19822 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19837 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
19847 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
19857 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
19867 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
19869 if test $ac_cv_func_vasnprintf = yes; then
19871 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
19885 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
19886 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
19890 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
19911 gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
19915 printf "%s\n" "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
19926 GNULIB_FPRINTF_POSIX=1
19932 printf "%s\n" "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
19940 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
19942 if test "x$ac_cv_have_decl_fpurge" = xyes; then :
19948 cat >>confdefs.h <<_ACEOF
19949 #define HAVE_DECL_FPURGE $ac_have_decl
19952 if test "x$ac_cv_func_fpurge" = xyes; then
19954 # Detect BSD bug. Only cygwin 1.7 is known to be immune.
19955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
19956 printf %s "checking whether fpurge works... " >&6; }
19957 if ${gl_cv_func_fpurge_works+:} false; then :
19958 printf %s "(cached) " >&6
19960 if test "$cross_compiling" = yes; then :
19961 gl_cv_func_fpurge_works='guessing no'
19963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19964 /* end confdefs.h. */
19970 FILE *f = fopen ("conftest.txt", "w+");
19972 if (fputc ('a', f) != 'a') return 2;
19974 if (fgetc (f) != 'a') return 3;
19975 if (fgetc (f) != EOF) return 4;
19976 if (fpurge (f) != 0) return 5;
19977 if (putc ('b', f) != 'b') return 6;
19978 if (fclose (f) != 0) return 7;
19979 if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
19980 if (fgetc (f) != 'a') return 9;
19981 if (fgetc (f) != 'b') return 10;
19982 if (fgetc (f) != EOF) return 11;
19983 if (fclose (f) != 0) return 12;
19984 if (remove ("conftest.txt") != 0) return 13;
19990 if ac_fn_c_try_run "$LINENO"; then :
19991 gl_cv_func_fpurge_works=yes
19993 gl_cv_func_fpurge_works=no
19995 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19996 conftest.$ac_objext conftest.beam conftest.$ac_ext
20000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
20001 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
20002 if test "x$gl_cv_func_fpurge_works" != xyes; then
20008 if test "x$ac_cv_have_decl_fpurge" = xno; then
20012 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
20021 gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
20035 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
20042 if test $ac_cv_func___freadahead = no; then
20051 gl_LIBOBJS="$gl_LIBOBJS freadahead.$ac_objext"
20060 if test $gl_cv_func_frexp_no_libm = yes; then
20064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
20065 printf %s "checking whether frexp works... " >&6; }
20066 if ${gl_cv_func_frexp_works+:} false; then :
20067 printf %s "(cached) " >&6
20070 if test "$cross_compiling" = yes; then :
20072 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
20073 *) gl_cv_func_frexp_works="guessing yes";;
20077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20078 /* end confdefs.h. */
20082 #include <string.h>
20083 #if HAVE_DECL_ALARM
20084 # include <signal.h>
20085 # include <unistd.h>
20087 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
20088 ICC 10.0 has a bug when optimizing the expression -zero.
20089 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
20090 to PowerPC on Mac OS X 10.5. */
20091 #if defined __hpux || defined __sgi || defined __ICC
20093 compute_minus_zero (void)
20095 return -DBL_MIN * DBL_MIN;
20097 # define minus_zero compute_minus_zero ()
20099 double minus_zero = -0.0;
20107 #if HAVE_DECL_ALARM
20108 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
20109 number. Let the test fail in this case. */
20110 signal (SIGALRM, SIG_DFL);
20113 /* Test on denormalized numbers. */
20114 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
20119 double y = frexp (x, &exp);
20120 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
20121 On NetBSD: y = 0.75. Correct: y = 0.5. */
20125 /* Test on infinite numbers. */
20129 double y = frexp (x, &exp);
20133 /* Test on negative zero. */
20137 double y = frexp (x, &exp);
20138 if (memcmp (&y, &x, sizeof x))
20144 if ac_fn_c_try_run "$LINENO"; then :
20145 gl_cv_func_frexp_works=yes
20147 gl_cv_func_frexp_works=no
20149 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20150 conftest.$ac_objext conftest.beam conftest.$ac_ext
20155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
20156 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
20158 case "$gl_cv_func_frexp_works" in
20159 *yes) gl_func_frexp_no_libm=yes ;;
20160 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
20163 gl_func_frexp_no_libm=no
20166 if test $gl_func_frexp_no_libm = yes; then
20168 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
20172 if test $gl_func_frexp_no_libm != yes; then
20181 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20195 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20202 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
20204 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
20210 if test $HAVE_DECL_FREXPL = 1; then
20212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
20213 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
20214 if ${gl_cv_func_frexpl_no_libm+:} false; then :
20215 printf %s "(cached) " >&6
20218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20219 /* end confdefs.h. */
20225 int e; return frexpl (x, &e) > 0;
20230 if ac_fn_c_try_link "$LINENO"; then :
20231 gl_cv_func_frexpl_no_libm=yes
20233 gl_cv_func_frexpl_no_libm=no
20235 rm -f core conftest.err conftest.$ac_objext \
20236 conftest$ac_exeext conftest.$ac_ext
20239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
20240 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
20242 if test $gl_cv_func_frexpl_no_libm = yes; then
20245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
20246 printf %s "checking whether frexpl works... " >&6; }
20247 if ${gl_cv_func_frexpl_works+:} false; then :
20248 printf %s "(cached) " >&6
20251 if test "$cross_compiling" = yes; then :
20254 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
20255 gl_cv_func_frexpl_works="guessing no";;
20256 *) gl_cv_func_frexpl_works="guessing yes";;
20260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20261 /* end confdefs.h. */
20265 /* Override the values of <float.h>, like done in float.in.h. */
20266 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
20267 # undef LDBL_MIN_EXP
20268 # define LDBL_MIN_EXP (-16381)
20270 #if defined __i386__ && defined __FreeBSD__
20271 # undef LDBL_MIN_EXP
20272 # define LDBL_MIN_EXP (-16381)
20274 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
20275 # undef LDBL_MIN_EXP
20276 # define LDBL_MIN_EXP DBL_MIN_EXP
20278 #if defined __sgi && (LDBL_MANT_DIG >= 106)
20279 # if defined __GNUC__
20280 # undef LDBL_MIN_EXP
20281 # define LDBL_MIN_EXP DBL_MIN_EXP
20288 long double frexpl (long double, int *);
20292 volatile long double x;
20293 /* Test on finite numbers that fails on AIX 5.1. */
20301 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
20302 function returns an invalid (incorrectly normalized) value: it returns
20303 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
20304 but the correct result is
20305 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
20309 long double y = frexpl (x, &exp);
20310 if (!(exp == 1 && y == 0.505L))
20313 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
20314 LDBL_MAX_EXP = 16384.
20315 In the loop end test, we test x against Infinity, rather than comparing
20316 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
20319 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
20330 /* Test on denormalized numbers. */
20333 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
20338 long double y = frexpl (x, &exp);
20339 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
20340 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
20341 if (exp != LDBL_MIN_EXP - 1)
20345 /* Test on infinite numbers. */
20349 long double y = frexpl (x, &exp);
20356 if ac_fn_c_try_run "$LINENO"; then :
20357 gl_cv_func_frexpl_works=yes
20359 gl_cv_func_frexpl_works=no
20361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20362 conftest.$ac_objext conftest.beam conftest.$ac_ext
20367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
20368 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
20370 case "$gl_cv_func_frexpl_works" in
20371 *yes) gl_func_frexpl_no_libm=yes ;;
20372 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
20375 gl_func_frexpl_no_libm=no
20378 if test $gl_func_frexpl_no_libm = yes; then
20380 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
20385 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
20394 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20408 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20415 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20419 if test $REPLACE_FSEEK = 1; then
20428 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
20442 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
20454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
20455 printf %s "checking for fseeko... " >&6; }
20456 if ${gl_cv_func_fseeko+:} false; then :
20457 printf %s "(cached) " >&6
20460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20461 /* end confdefs.h. */
20467 fseeko (stdin, 0, 0);
20472 if ac_fn_c_try_link "$LINENO"; then :
20473 gl_cv_func_fseeko=yes
20475 gl_cv_func_fseeko=no
20477 rm -f core conftest.err conftest.$ac_objext \
20478 conftest$ac_exeext conftest.$ac_ext
20481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
20482 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
20485 if test $ac_cv_have_decl_fseeko = no; then
20489 if test $gl_cv_func_fseeko = no; then
20492 if test $WINDOWS_64_BIT_OFF_T = 1; then
20495 if test $gl_cv_var_stdin_large_offset = no; then
20501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20502 printf %s "checking whether fflush works on input streams... " >&6; }
20503 if ${gl_cv_func_fflush_stdin+:} false; then :
20504 printf %s "(cached) " >&6
20506 echo hello world > conftest.txt
20507 if test "$cross_compiling" = yes; then :
20508 gl_cv_func_fflush_stdin=no
20510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20511 /* end confdefs.h. */
20515 # include <unistd.h>
20516 #else /* on Windows with MSVC */
20523 FILE *f = fopen ("conftest.txt", "r");
20530 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20532 /* For deterministic results, ensure f read a bigger buffer. */
20533 if (lseek (fd, 0, SEEK_CUR) == 5)
20535 /* POSIX requires fflush-fseek to set file offset of fd. This fails
20536 on BSD systems and on mingw. */
20537 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20539 if (lseek (fd, 0, SEEK_CUR) != 5)
20541 /* Verify behaviour of fflush after ungetc. See
20542 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
20543 /* Verify behaviour of fflush after a backup ungetc. This fails on
20548 if (fgetc (f) != c)
20550 /* Verify behaviour of fflush after a non-backup ungetc. This fails
20551 on glibc 2.8 and on BSD systems. */
20555 if (fgetc (f) != c)
20563 if ac_fn_c_try_run "$LINENO"; then :
20564 gl_cv_func_fflush_stdin=yes
20566 gl_cv_func_fflush_stdin=no
20568 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20569 conftest.$ac_objext conftest.beam conftest.$ac_ext
20575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20576 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
20578 if test $gl_cv_func_fflush_stdin = no; then
20584 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20593 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
20596 for ac_func in _fseeki64
20598 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
20599 if test "x$ac_cv_func__fseeki64" = xyes; then :
20600 cat >>confdefs.h <<_ACEOF
20601 #define HAVE__FSEEKI64 1
20620 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
20627 if test $ac_cv_func___fseterr = no; then
20636 gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
20643 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20648 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
20656 if test $ac_cv_func_fchdir = no; then
20660 if test $HAVE_FCHDIR = 0; then
20661 case "$gl_cv_func_open_directory_works" in
20670 if test $REPLACE_FSTAT = 1; then
20679 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20694 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20701 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
20705 if test $REPLACE_FTELL = 1; then
20714 gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
20728 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
20741 if test $ac_cv_have_decl_ftello = no; then
20745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
20746 printf %s "checking for ftello... " >&6; }
20747 if ${gl_cv_func_ftello+:} false; then :
20748 printf %s "(cached) " >&6
20751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20752 /* end confdefs.h. */
20762 if ac_fn_c_try_link "$LINENO"; then :
20763 gl_cv_func_ftello=yes
20765 gl_cv_func_ftello=no
20767 rm -f core conftest.err conftest.$ac_objext \
20768 conftest$ac_exeext conftest.$ac_ext
20771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
20772 printf "%s\n" "$gl_cv_func_ftello" >&6; }
20773 if test $gl_cv_func_ftello = no; then
20776 if test $WINDOWS_64_BIT_OFF_T = 1; then
20779 if test $gl_cv_var_stdin_large_offset = no; then
20782 if test $REPLACE_FTELLO = 0; then
20784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
20785 printf %s "checking whether ftello works... " >&6; }
20786 if ${gl_cv_func_ftello_works+:} false; then :
20787 printf %s "(cached) " >&6
20791 # Guess no on Solaris.
20792 solaris*) gl_cv_func_ftello_works="guessing no" ;;
20793 # Guess yes otherwise.
20794 *) gl_cv_func_ftello_works="guessing yes" ;;
20796 if test "$cross_compiling" = yes; then :
20799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20800 /* end confdefs.h. */
20803 #include <stdlib.h>
20804 #include <string.h>
20805 #define TESTFILE "conftest.tmp"
20811 /* Create a file with some contents. */
20812 fp = fopen (TESTFILE, "w");
20815 if (fwrite ("foogarsh", 1, 8, fp) < 8)
20820 /* The file's contents is now "foogarsh". */
20822 /* Try writing after reading to EOF. */
20823 fp = fopen (TESTFILE, "r+");
20826 if (fseek (fp, -1, SEEK_END))
20828 if (!(getc (fp) == 'h'))
20830 if (!(getc (fp) == EOF))
20832 if (!(ftell (fp) == 8))
20834 if (!(ftell (fp) == 8))
20836 if (!(putc ('!', fp) == '!'))
20838 if (!(ftell (fp) == 9))
20840 if (!(fclose (fp) == 0))
20842 fp = fopen (TESTFILE, "r");
20847 if (!(fread (buf, 1, 10, fp) == 9))
20849 if (!(memcmp (buf, "foogarsh!", 9) == 0))
20852 if (!(fclose (fp) == 0))
20855 /* The file's contents is now "foogarsh!". */
20860 if ac_fn_c_try_run "$LINENO"; then :
20861 gl_cv_func_ftello_works=yes
20863 gl_cv_func_ftello_works=no
20865 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20866 conftest.$ac_objext conftest.beam conftest.$ac_ext
20871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
20872 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
20873 case "$gl_cv_func_ftello_works" in
20878 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
20885 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
20894 gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
20897 for ac_func in _ftelli64
20899 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
20900 if test "x$ac_cv_func__ftelli64" = xyes; then :
20901 cat >>confdefs.h <<_ACEOF
20902 #define HAVE__FTELLI64 1
20921 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
20930 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20937 if test $REPLACE_GETCWD = 1; then
20946 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20960 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20967 if test $ac_cv_func_getdtablesize != yes; then
20968 HAVE_GETDTABLESIZE=0
20971 if test $HAVE_GETDTABLESIZE = 0; then
20980 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20989 GNULIB_GETDTABLESIZE=1
20995 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21004 if test $REPLACE_GETOPT = 1; then
21013 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21023 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21028 GNULIB_GL_UNISTD_H_GETOPT=1
21033 printf "%s\n" "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
21042 if test -n "$gl_replace_getopt"; then
21046 if test $REPLACE_GETOPT = 1; then
21050 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21056 if test $REPLACE_GETOPT = 1; then
21065 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21075 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21080 GNULIB_GL_UNISTD_H_GETOPT=1
21096 gl_gettimeofday_timezone=void
21097 if test $ac_cv_func_gettimeofday != yes; then
21098 HAVE_GETTIMEOFDAY=0
21103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21104 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21105 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
21106 printf %s "(cached) " >&6
21108 if test "$cross_compiling" = yes; then :
21109 # When cross-compiling:
21111 # Guess all is fine on glibc systems.
21112 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21113 # If we don't know, assume the worst.
21114 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21119 /* end confdefs.h. */
21120 #include <string.h>
21121 #include <sys/time.h>
21123 #include <stdlib.h>
21131 struct tm saved_lt;
21133 lt = localtime (&t);
21135 gettimeofday (&tv, NULL);
21136 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21142 if ac_fn_c_try_run "$LINENO"; then :
21143 gl_cv_func_gettimeofday_clobber=no
21145 gl_cv_func_gettimeofday_clobber=yes
21147 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21148 conftest.$ac_objext conftest.beam conftest.$ac_ext
21152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21153 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
21155 case "$gl_cv_func_gettimeofday_clobber" in
21157 REPLACE_GETTIMEOFDAY=1
21160 printf "%s\n" "#define gmtime rpl_gmtime" >>confdefs.h
21163 printf "%s\n" "#define localtime rpl_localtime" >>confdefs.h
21167 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21173 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
21174 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
21175 printf %s "(cached) " >&6
21177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21178 /* end confdefs.h. */
21179 #include <sys/time.h>
21181 int gettimeofday (struct timeval *restrict, void *restrict);
21186 /* glibc uses struct timezone * rather than the POSIX void *
21187 if _GNU_SOURCE is defined. However, since the only portable
21188 use of gettimeofday uses NULL as the second parameter, and
21189 since the glibc definition is actually more typesafe, it is
21190 not worth wrapping this to get a compliant signature. */
21191 int (*f) (struct timeval *restrict, void *restrict)
21194 return !(x | c.tv_sec | c.tv_usec);
21200 if ac_fn_c_try_compile "$LINENO"; then :
21201 gl_cv_func_gettimeofday_posix_signature=yes
21203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21204 /* end confdefs.h. */
21205 #include <sys/time.h>
21206 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21216 if ac_fn_c_try_compile "$LINENO"; then :
21217 gl_cv_func_gettimeofday_posix_signature=almost
21219 gl_cv_func_gettimeofday_posix_signature=no
21221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21226 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21227 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21228 gl_gettimeofday_timezone='struct timezone'
21229 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21230 REPLACE_GETTIMEOFDAY=1
21232 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21233 REPLACE_GETTIMEOFDAY=1
21238 cat >>confdefs.h <<_ACEOF
21239 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21243 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21252 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21255 for ac_header in sys/timeb.h
21257 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21258 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
21259 cat >>confdefs.h <<_ACEOF
21260 #define HAVE_SYS_TIMEB_H 1
21267 for ac_func in _ftime
21269 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21270 if test "x$ac_cv_func__ftime" = xyes; then :
21271 cat >>confdefs.h <<_ACEOF
21272 #define HAVE__FTIME 1
21285 GNULIB_GETTIMEOFDAY=1
21291 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21296 if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
21305 # Autoconf 2.61a.99 and earlier don't support linking a file only
21306 # in VPATH builds. But since GNUmakefile is for maintainer use
21307 # only, it does not matter if we skip the link with older autoconf.
21308 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21309 # builds, so use a shell variable to bypass this.
21310 GNUmakefile=GNUmakefile
21311 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
21315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21316 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
21317 if ${gl_cv_func_isnand_no_libm+:} false; then :
21318 printf %s "(cached) " >&6
21321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21322 /* end confdefs.h. */
21326 # define isnand(x) __builtin_isnan ((double)(x))
21329 # define isnand(x) isnan ((double)(x))
21340 if ac_fn_c_try_link "$LINENO"; then :
21341 gl_cv_func_isnand_no_libm=yes
21343 gl_cv_func_isnand_no_libm=no
21345 rm -f core conftest.err conftest.$ac_objext \
21346 conftest$ac_exeext conftest.$ac_ext
21349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21350 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
21352 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21353 if test $gl_cv_func_isnand_no_libm = yes; then
21355 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21359 if test $gl_func_isnand_no_libm != yes; then
21368 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
21377 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
21378 if ${gl_cv_func_isnanf_no_libm+:} false; then :
21379 printf %s "(cached) " >&6
21382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21383 /* end confdefs.h. */
21387 # define isnanf(x) __builtin_isnanf ((float)(x))
21388 #elif defined isnan
21390 # define isnanf(x) isnan ((float)(x))
21401 if ac_fn_c_try_link "$LINENO"; then :
21402 gl_cv_func_isnanf_no_libm=yes
21404 gl_cv_func_isnanf_no_libm=no
21406 rm -f core conftest.err conftest.$ac_objext \
21407 conftest$ac_exeext conftest.$ac_ext
21410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
21411 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
21413 if test $gl_cv_func_isnanf_no_libm = yes; then
21417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
21418 printf %s "checking whether isnan(float) works... " >&6; }
21419 if ${gl_cv_func_isnanf_works+:} false; then :
21420 printf %s "(cached) " >&6
21423 if test "$cross_compiling" = yes; then :
21425 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
21426 *) gl_cv_func_isnanf_works="guessing yes";;
21430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21431 /* end confdefs.h. */
21436 # define isnanf(x) __builtin_isnanf ((float)(x))
21437 #elif defined isnan
21439 # define isnanf(x) isnan ((float)(x))
21441 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
21446 static float zero = 0.0f;
21447 return zero / zero;
21450 # define NaN() (0.0f / 0.0f)
21453 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21454 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
21459 if (isnanf (1.0f / 0.0f))
21462 if (!isnanf (NaN ()))
21465 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
21466 /* The isnanf function should be immune against changes in the sign bit and
21467 in the mantissa bits. The xor operation twiddles a bit that can only be
21468 a sign bit or a mantissa bit. */
21469 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
21474 /* Set the bits below the exponent to 01111...111. */
21475 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
21476 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
21477 if (!isnanf (m.value))
21485 if ac_fn_c_try_run "$LINENO"; then :
21486 gl_cv_func_isnanf_works=yes
21488 gl_cv_func_isnanf_works=no
21490 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21491 conftest.$ac_objext conftest.beam conftest.$ac_ext
21496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
21497 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
21500 if test $gl_cv_func_isnanf_no_libm = yes \
21501 && { case "$gl_cv_func_isnanf_works" in
21506 gl_func_isnanf_no_libm=yes
21508 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
21511 gl_func_isnanf_no_libm=no
21514 if test $gl_func_isnanf_no_libm != yes; then
21523 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
21527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
21528 printf %s "checking where to find the exponent in a 'float'... " >&6; }
21529 if ${gl_cv_cc_float_expbit0+:} false; then :
21530 printf %s "(cached) " >&6
21533 if test "$cross_compiling" = yes; then :
21534 gl_cv_cc_float_expbit0="word 0 bit 23"
21536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21537 /* end confdefs.h. */
21540 #include <stddef.h>
21542 #include <string.h>
21544 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21545 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
21546 static unsigned int ored_words[NWORDS];
21547 static unsigned int anded_words[NWORDS];
21548 static void add_to_ored_words (float x)
21552 /* Clear it first, in case
21553 sizeof (float) < sizeof (memory_float). */
21554 memset (&m, 0, sizeof (memory_float));
21556 for (i = 0; i < NWORDS; i++)
21558 ored_words[i] |= m.word[i];
21559 anded_words[i] &= m.word[i];
21565 FILE *fp = fopen ("conftest.out", "w");
21568 for (j = 0; j < NWORDS; j++)
21569 anded_words[j] = ~ (unsigned int) 0;
21570 add_to_ored_words (0.25f);
21571 add_to_ored_words (0.5f);
21572 add_to_ored_words (1.0f);
21573 add_to_ored_words (2.0f);
21574 add_to_ored_words (4.0f);
21575 /* Remove bits that are common (e.g. if representation of the first mantissa
21576 bit is explicit). */
21577 for (j = 0; j < NWORDS; j++)
21578 ored_words[j] &= ~anded_words[j];
21579 /* Now find the nonzero word. */
21580 for (j = 0; j < NWORDS; j++)
21581 if (ored_words[j] != 0)
21586 for (i = j + 1; i < NWORDS; i++)
21587 if (ored_words[i] != 0)
21589 fprintf (fp, "unknown");
21590 return (fclose (fp) != 0);
21593 if ((ored_words[j] >> i) & 1)
21595 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21596 return (fclose (fp) != 0);
21599 fprintf (fp, "unknown");
21600 return (fclose (fp) != 0);
21604 if ac_fn_c_try_run "$LINENO"; then :
21605 gl_cv_cc_float_expbit0=`cat conftest.out`
21607 gl_cv_cc_float_expbit0="unknown"
21609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21610 conftest.$ac_objext conftest.beam conftest.$ac_ext
21616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
21617 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
21618 case "$gl_cv_cc_float_expbit0" in
21620 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21621 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
21623 cat >>confdefs.h <<_ACEOF
21624 #define FLT_EXPBIT0_WORD $word
21628 cat >>confdefs.h <<_ACEOF
21629 #define FLT_EXPBIT0_BIT $bit
21639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21640 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21641 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21642 printf %s "(cached) " >&6
21645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21646 /* end confdefs.h. */
21650 # define isnanl(x) __builtin_isnanl ((long double)(x))
21651 #elif defined isnan
21653 # define isnanl(x) isnan ((long double)(x))
21664 if ac_fn_c_try_link "$LINENO"; then :
21665 gl_cv_func_isnanl_no_libm=yes
21667 gl_cv_func_isnanl_no_libm=no
21669 rm -f core conftest.err conftest.$ac_objext \
21670 conftest$ac_exeext conftest.$ac_ext
21673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21674 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
21676 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21677 if test $gl_func_isnanl_no_libm = yes; then
21682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21683 printf %s "checking whether isnanl works... " >&6; }
21684 if ${gl_cv_func_isnanl_works+:} false; then :
21685 printf %s "(cached) " >&6
21688 if test "$cross_compiling" = yes; then :
21689 case "$host_cpu" in
21690 # Guess no on ia64, x86_64, i386.
21691 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
21694 netbsd*) gl_cv_func_isnanl_works="guessing no";;
21695 *) gl_cv_func_isnanl_works="guessing yes";;
21701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21702 /* end confdefs.h. */
21705 #include <limits.h>
21709 # define isnanl(x) __builtin_isnanl ((long double)(x))
21710 #elif defined isnan
21712 # define isnanl(x) isnan ((long double)(x))
21715 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21716 typedef union { unsigned int word[NWORDS]; long double value; }
21717 memory_long_double;
21718 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21719 runtime type conversion. */
21721 static long double NaNl ()
21724 return zero / zero;
21727 # define NaNl() (0.0L / 0.0L)
21733 if (!isnanl (NaNl ()))
21737 memory_long_double m;
21740 /* The isnanl function should be immune against changes in the sign bit and
21741 in the mantissa bits. The xor operation twiddles a bit that can only be
21742 a sign bit or a mantissa bit (since the exponent never extends to
21745 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21746 for (i = 0; i < NWORDS; i++)
21748 if (!isnanl (m.value))
21752 #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
21753 /* Representation of an 80-bit 'long double' as an initializer for a sequence
21754 of 'unsigned int' words. */
21755 # ifdef WORDS_BIGENDIAN
21756 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21757 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
21758 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
21759 (unsigned int) (mantlo) << 16 \
21762 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21763 { mantlo, manthi, exponent }
21766 static memory_long_double x =
21767 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21768 if (!isnanl (x.value))
21772 /* Signalling NaN. */
21773 static memory_long_double x =
21774 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21775 if (!isnanl (x.value))
21778 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
21779 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
21780 Intel IA-64 Architecture Software Developer's Manual, Volume 1:
21781 Application Architecture.
21782 Table 5-2 "Floating-Point Register Encodings"
21783 Figure 5-6 "Memory to Floating-Point Register Data Translation"
21785 { /* Pseudo-NaN. */
21786 static memory_long_double x =
21787 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
21788 if (!isnanl (x.value))
21791 { /* Pseudo-Infinity. */
21792 static memory_long_double x =
21793 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
21794 if (!isnanl (x.value))
21797 { /* Pseudo-Zero. */
21798 static memory_long_double x =
21799 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
21800 if (!isnanl (x.value))
21803 { /* Unnormalized number. */
21804 static memory_long_double x =
21805 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
21806 if (!isnanl (x.value))
21809 { /* Pseudo-Denormal. */
21810 static memory_long_double x =
21811 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
21812 if (!isnanl (x.value))
21820 if ac_fn_c_try_run "$LINENO"; then :
21821 gl_cv_func_isnanl_works=yes
21823 gl_cv_func_isnanl_works=no
21825 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21826 conftest.$ac_objext conftest.beam conftest.$ac_ext
21831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21832 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
21834 case "$gl_cv_func_isnanl_works" in
21836 *) gl_func_isnanl_no_libm=no ;;
21839 if test $gl_func_isnanl_no_libm = yes; then
21841 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21845 if test $gl_func_isnanl_no_libm != yes; then
21854 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
21860 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
21861 if ${gl_cv_cc_long_double_expbit0+:} false; then :
21862 printf %s "(cached) " >&6
21865 if test "$cross_compiling" = yes; then :
21867 gl_cv_cc_long_double_expbit0="unknown"
21870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21871 /* end confdefs.h. */
21874 #include <stddef.h>
21876 #include <string.h>
21878 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21879 typedef union { long double value; unsigned int word[NWORDS]; }
21880 memory_long_double;
21881 static unsigned int ored_words[NWORDS];
21882 static unsigned int anded_words[NWORDS];
21883 static void add_to_ored_words (long double x)
21885 memory_long_double m;
21887 /* Clear it first, in case
21888 sizeof (long double) < sizeof (memory_long_double). */
21889 memset (&m, 0, sizeof (memory_long_double));
21891 for (i = 0; i < NWORDS; i++)
21893 ored_words[i] |= m.word[i];
21894 anded_words[i] &= m.word[i];
21900 FILE *fp = fopen ("conftest.out", "w");
21903 for (j = 0; j < NWORDS; j++)
21904 anded_words[j] = ~ (unsigned int) 0;
21905 add_to_ored_words (0.25L);
21906 add_to_ored_words (0.5L);
21907 add_to_ored_words (1.0L);
21908 add_to_ored_words (2.0L);
21909 add_to_ored_words (4.0L);
21910 /* Remove bits that are common (e.g. if representation of the first mantissa
21911 bit is explicit). */
21912 for (j = 0; j < NWORDS; j++)
21913 ored_words[j] &= ~anded_words[j];
21914 /* Now find the nonzero word. */
21915 for (j = 0; j < NWORDS; j++)
21916 if (ored_words[j] != 0)
21921 for (i = j + 1; i < NWORDS; i++)
21922 if (ored_words[i] != 0)
21924 fprintf (fp, "unknown");
21925 return (fclose (fp) != 0);
21928 if ((ored_words[j] >> i) & 1)
21930 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21931 return (fclose (fp) != 0);
21934 fprintf (fp, "unknown");
21935 return (fclose (fp) != 0);
21939 if ac_fn_c_try_run "$LINENO"; then :
21940 gl_cv_cc_long_double_expbit0=`cat conftest.out`
21942 gl_cv_cc_long_double_expbit0="unknown"
21944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21945 conftest.$ac_objext conftest.beam conftest.$ac_ext
21951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21952 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
21953 case "$gl_cv_cc_long_double_expbit0" in
21955 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21956 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21958 cat >>confdefs.h <<_ACEOF
21959 #define LDBL_EXPBIT0_WORD $word
21963 cat >>confdefs.h <<_ACEOF
21964 #define LDBL_EXPBIT0_BIT $bit
21975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
21976 printf %s "checking for C compiler flag to ignore unused libraries... " >&6; }
21977 if ${gl_cv_prog_c_ignore_unused_libraries+:} false; then :
21978 printf %s "(cached) " >&6
21980 gl_cv_prog_c_ignore_unused_libraries=none
21981 gl_saved_ldflags=$LDFLAGS
21982 gl_saved_libs=$LIBS
21983 # Link with -lm to detect binutils 2.16 bug with --as-needed; see
21984 # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
21986 # Use long option sequences like '-z ignore' to test for the feature,
21987 # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
21988 # GCC + binutils likes '-Wl,--as-needed'.
21989 # GCC + Solaris ld likes '-Wl,-z,ignore'.
21990 # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
21991 # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
21992 # native cc issues annoying warnings and then ignores it,
21993 # which would cause us to incorrectly conclude that it worked.
21994 for gl_flags in '-Wl,--as-needed' \
21999 LDFLAGS="$gl_flags $LDFLAGS"
22000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22001 /* end confdefs.h. */
22011 if ac_fn_c_try_link "$LINENO"; then :
22012 gl_cv_prog_c_ignore_unused_libraries=$gl_flags
22014 rm -f core conftest.err conftest.$ac_objext \
22015 conftest$ac_exeext conftest.$ac_ext
22016 LDFLAGS=$gl_saved_ldflags
22017 test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
22020 LIBS=$gl_saved_libs
22023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
22024 printf "%s\n" "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
22025 IGNORE_UNUSED_LIBRARIES_CFLAGS=
22026 if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
22027 IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
22039 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22043 if test "$gl_threads_api" = posix; then
22044 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
22045 # pthread_rwlock_* functions.
22046 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
22048 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
22050 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
22054 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
22055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22056 /* end confdefs.h. */
22058 #include <pthread.h>
22063 #if __FreeBSD__ == 4
22064 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
22065 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
22066 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
22067 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
22069 int x = (int)PTHREAD_MUTEX_RECURSIVE;
22077 if ac_fn_c_try_compile "$LINENO"; then :
22079 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
22082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22088 cat >>confdefs.h <<_ACEOF
22089 #define GNULIB_LOCK 1
22099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22100 printf %s "checking whether lseek detects pipes... " >&6; }
22101 if ${gl_cv_func_lseek_pipe+:} false; then :
22102 printf %s "(cached) " >&6
22106 gl_cv_func_lseek_pipe=no
22109 if test $cross_compiling = no; then
22110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22111 /* end confdefs.h. */
22113 #include <sys/types.h> /* for off_t */
22114 #include <stdio.h> /* for SEEK_CUR */
22116 # include <unistd.h>
22117 #else /* on Windows with MSVC */
22125 /* Exit with success only if stdin is seekable. */
22126 return lseek (0, (off_t)0, SEEK_CUR) < 0;
22132 if ac_fn_c_try_link "$LINENO"; then :
22133 if test -s conftest$ac_exeext \
22134 && ./conftest$ac_exeext < conftest.$ac_ext \
22135 && test 1 = "`echo hi \
22136 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22137 gl_cv_func_lseek_pipe=yes
22139 gl_cv_func_lseek_pipe=no
22143 gl_cv_func_lseek_pipe=no
22145 rm -f core conftest.err conftest.$ac_objext \
22146 conftest$ac_exeext conftest.$ac_ext
22148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22149 /* end confdefs.h. */
22151 #if defined __BEOS__
22152 /* BeOS mistakenly return 0 when trying to seek on pipes. */
22156 if ac_fn_c_try_compile "$LINENO"; then :
22157 gl_cv_func_lseek_pipe=yes
22159 gl_cv_func_lseek_pipe=no
22161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22168 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
22169 if test $gl_cv_func_lseek_pipe = no; then
22172 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22177 if test $WINDOWS_64_BIT_OFF_T = 1; then
22181 if test $REPLACE_LSEEK = 1; then
22190 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22204 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22211 if test $ac_cv_func_lstat = yes; then
22213 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22222 if test $REPLACE_LSTAT = 1; then
22231 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22246 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22254 for ac_header in stdlib.h
22256 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22257 if test "x$ac_cv_header_stdlib_h" = xyes; then :
22258 cat >>confdefs.h <<_ACEOF
22259 #define HAVE_STDLIB_H 1
22266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22267 printf %s "checking for GNU libc compatible malloc... " >&6; }
22268 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
22269 printf %s "(cached) " >&6
22271 if test "$cross_compiling" = yes; then :
22273 # Guess yes on platforms where we know the result.
22274 *-gnu* | freebsd* | netbsd* | openbsd* \
22275 | hpux* | solaris* | cygwin* | mingw*)
22276 ac_cv_func_malloc_0_nonnull=yes ;;
22277 # If we don't know, assume the worst.
22278 *) ac_cv_func_malloc_0_nonnull=no ;;
22282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22283 /* end confdefs.h. */
22284 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22285 # include <stdlib.h>
22293 return ! malloc (0);
22299 if ac_fn_c_try_run "$LINENO"; then :
22300 ac_cv_func_malloc_0_nonnull=yes
22302 ac_cv_func_malloc_0_nonnull=no
22304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22305 conftest.$ac_objext conftest.beam conftest.$ac_ext
22310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22311 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
22312 if test $ac_cv_func_malloc_0_nonnull = yes; then :
22314 printf "%s\n" "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22317 printf "%s\n" "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22324 if test $REPLACE_MALLOC = 1; then
22333 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22338 cat >>confdefs.h <<_ACEOF
22339 #define GNULIB_MALLOC_GNU 1
22346 if test $gl_cv_func_malloc_posix = yes; then
22348 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22354 if test $REPLACE_MALLOC = 1; then
22363 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22371 GNULIB_MALLOC_POSIX=1
22377 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22392 if test $gl_cv_have_include_next = yes; then
22393 gl_cv_next_math_h='<'math.h'>'
22395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
22396 printf %s "checking absolute name of <math.h>... " >&6; }
22397 if ${gl_cv_next_math_h+:} false; then :
22398 printf %s "(cached) " >&6
22401 if test $ac_cv_header_math_h = yes; then
22404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22405 /* end confdefs.h. */
22410 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22411 *) gl_absname_cpp="$ac_cpp" ;;
22416 gl_dirsep_regex='[/\\]'
22419 gl_dirsep_regex='\/'
22422 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22424 gl_header_literal_regex=`echo 'math.h' \
22425 | sed -e "$gl_make_literal_regex_sed"`
22426 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22427 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22432 gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22433 sed -n "$gl_absolute_header_sed"`'"'
22435 gl_cv_next_math_h='<'math.h'>'
22440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
22441 printf "%s\n" "$gl_cv_next_math_h" >&6; }
22443 NEXT_MATH_H=$gl_cv_next_math_h
22445 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22446 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22447 gl_next_as_first_directive='<'math.h'>'
22449 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22450 gl_next_as_first_directive=$gl_cv_next_math_h
22452 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
22458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
22459 printf %s "checking whether NAN macro works... " >&6; }
22460 if ${gl_cv_header_math_nan_works+:} false; then :
22461 printf %s "(cached) " >&6
22463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22464 /* end confdefs.h. */
22469 /* Solaris 10 has a broken definition of NAN. Other platforms
22470 fail to provide NAN, or provide it only in C99 mode; this
22471 test only needs to fail when NAN is provided but wrong. */
22481 if ac_fn_c_try_compile "$LINENO"; then :
22482 gl_cv_header_math_nan_works=yes
22484 gl_cv_header_math_nan_works=no
22486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
22489 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
22490 if test $gl_cv_header_math_nan_works = no; then
22493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
22494 printf %s "checking whether HUGE_VAL works... " >&6; }
22495 if ${gl_cv_header_math_huge_val_works+:} false; then :
22496 printf %s "(cached) " >&6
22498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22499 /* end confdefs.h. */
22504 /* Solaris 10 has a broken definition of HUGE_VAL. */
22505 double d = HUGE_VAL;
22511 if ac_fn_c_try_compile "$LINENO"; then :
22512 gl_cv_header_math_huge_val_works=yes
22514 gl_cv_header_math_huge_val_works=no
22516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
22519 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
22520 if test $gl_cv_header_math_huge_val_works = no; then
22536 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22541 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
22542 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22543 printf %s "(cached) " >&6
22547 # Guess no on AIX and OSF/1.
22548 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22549 # Guess yes otherwise.
22550 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22552 if test $LOCALE_JA != none; then
22553 if test "$cross_compiling" = yes; then :
22556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22557 /* end confdefs.h. */
22559 #include <locale.h>
22560 #include <string.h>
22561 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22563 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22564 included before <wchar.h>. */
22565 #include <stddef.h>
22571 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22573 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22577 memset (&state, '\0', sizeof (mbstate_t));
22578 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22579 if (mbsinit (&state))
22585 if ac_fn_c_try_run "$LINENO"; then :
22586 gl_cv_func_mbrtowc_incomplete_state=yes
22588 gl_cv_func_mbrtowc_incomplete_state=no
22590 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22591 conftest.$ac_objext conftest.beam conftest.$ac_ext
22597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22598 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22604 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
22605 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22606 printf %s "(cached) " >&6
22610 # Guess no on Solaris 8.
22611 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22612 # Guess yes otherwise.
22613 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22615 if test $LOCALE_ZH_CN != none; then
22616 if test "$cross_compiling" = yes; then :
22619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22620 /* end confdefs.h. */
22622 #include <locale.h>
22623 #include <stdlib.h>
22624 #include <string.h>
22625 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22627 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22628 included before <wchar.h>. */
22629 #include <stddef.h>
22635 /* This fails on Solaris 8:
22636 mbrtowc returns 2, and sets wc to 0x00F0.
22637 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22638 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22640 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22644 memset (&state, '\0', sizeof (mbstate_t));
22645 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22646 && mbtowc (&wc, input + 3, 6) == 4)
22652 if ac_fn_c_try_run "$LINENO"; then :
22653 gl_cv_func_mbrtowc_sanitycheck=yes
22655 gl_cv_func_mbrtowc_sanitycheck=no
22657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22658 conftest.$ac_objext conftest.beam conftest.$ac_ext
22664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22665 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22667 REPLACE_MBSTATE_T=0
22668 case "$gl_cv_func_mbrtowc_incomplete_state" in
22670 *) REPLACE_MBSTATE_T=1 ;;
22672 case "$gl_cv_func_mbrtowc_sanitycheck" in
22674 *) REPLACE_MBSTATE_T=1 ;;
22677 REPLACE_MBSTATE_T=1
22682 if test $ac_cv_func_mbrtowc = no; then
22684 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
22685 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22687 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22688 included before <wchar.h>. */
22689 #include <stddef.h>
22695 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
22701 cat >>confdefs.h <<_ACEOF
22702 #define HAVE_DECL_MBRTOWC $ac_have_decl
22705 if test $ac_cv_have_decl_mbrtowc = yes; then
22709 if test $REPLACE_MBSTATE_T = 1; then
22715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
22716 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22717 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22718 printf %s "(cached) " >&6
22722 # Guess no on Solaris.
22723 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22724 # Guess yes otherwise.
22725 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22727 if test $LOCALE_FR_UTF8 != none; then
22728 if test "$cross_compiling" = yes; then :
22731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22732 /* end confdefs.h. */
22734 #include <locale.h>
22735 #include <stdlib.h>
22736 #include <string.h>
22737 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22739 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22740 included before <wchar.h>. */
22741 #include <stddef.h>
22749 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22751 char input[] = "\303\237er";
22756 memset (&state, '\0', sizeof (mbstate_t));
22757 wc = (wchar_t) 0xBADFACE;
22758 ret = mbrtowc (&wc, input, 5, &state);
22761 if (!mbsinit (&state))
22764 memset (&state, '\0', sizeof (mbstate_t));
22765 ret = mbrtowc (NULL, input, 5, &state);
22766 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
22768 if (!mbsinit (&state))
22774 if ac_fn_c_try_run "$LINENO"; then :
22775 gl_cv_func_mbrtowc_null_arg1=yes
22777 gl_cv_func_mbrtowc_null_arg1=no
22779 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22780 conftest.$ac_objext conftest.beam conftest.$ac_ext
22786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22787 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22793 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
22794 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22795 printf %s "(cached) " >&6
22799 # Guess no on OSF/1.
22800 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22801 # Guess yes otherwise.
22802 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22804 if test $LOCALE_FR_UTF8 != none; then
22805 if test "$cross_compiling" = yes; then :
22808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22809 /* end confdefs.h. */
22811 #include <locale.h>
22812 #include <string.h>
22813 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22815 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22816 included before <wchar.h>. */
22817 #include <stddef.h>
22823 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22829 memset (&state, '\0', sizeof (mbstate_t));
22830 wc = (wchar_t) 0xBADFACE;
22831 mbrtowc (&wc, NULL, 5, &state);
22832 /* Check that wc was not modified. */
22833 if (wc != (wchar_t) 0xBADFACE)
22839 if ac_fn_c_try_run "$LINENO"; then :
22840 gl_cv_func_mbrtowc_null_arg2=yes
22842 gl_cv_func_mbrtowc_null_arg2=no
22844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22845 conftest.$ac_objext conftest.beam conftest.$ac_ext
22851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22852 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22860 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
22861 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22862 printf %s "(cached) " >&6
22866 # Guess no on HP-UX, Solaris, native Windows.
22867 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22868 # Guess yes otherwise.
22869 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
22871 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22872 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22873 if test "$cross_compiling" = yes; then :
22876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22877 /* end confdefs.h. */
22879 #include <locale.h>
22880 #include <string.h>
22881 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22883 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22884 included before <wchar.h>. */
22885 #include <stddef.h>
22892 int found_some_locale = 0;
22893 /* This fails on Solaris. */
22894 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22896 char input[] = "B\303\274\303\237er"; /* "Büßer" */
22900 memset (&state, '\0', sizeof (mbstate_t));
22901 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22904 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
22907 found_some_locale = 1;
22909 /* This fails on HP-UX 11.11. */
22910 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22912 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22916 memset (&state, '\0', sizeof (mbstate_t));
22917 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22920 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
22923 found_some_locale = 1;
22925 /* This fails on native Windows. */
22926 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22928 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
22932 memset (&state, '\0', sizeof (mbstate_t));
22933 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22936 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22939 found_some_locale = 1;
22941 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22943 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
22947 memset (&state, '\0', sizeof (mbstate_t));
22948 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22951 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22954 found_some_locale = 1;
22956 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22958 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
22962 memset (&state, '\0', sizeof (mbstate_t));
22963 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22966 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22969 found_some_locale = 1;
22971 return (found_some_locale ? result : 77);
22974 if ac_fn_c_try_run "$LINENO"; then :
22975 gl_cv_func_mbrtowc_retval=yes
22977 if test $? != 77; then
22978 gl_cv_func_mbrtowc_retval=no
22982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22983 conftest.$ac_objext conftest.beam conftest.$ac_ext
22989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22990 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
22995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22996 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
22997 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
22998 printf %s "(cached) " >&6
23002 # Guess no on Solaris 8 and 9.
23003 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23004 # Guess yes otherwise.
23005 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23007 if test $LOCALE_ZH_CN != none; then
23008 if test "$cross_compiling" = yes; then :
23011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23012 /* end confdefs.h. */
23014 #include <locale.h>
23015 #include <string.h>
23016 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23018 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23019 included before <wchar.h>. */
23020 #include <stddef.h>
23026 /* This fails on Solaris 8 and 9. */
23027 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23032 memset (&state, '\0', sizeof (mbstate_t));
23033 if (mbrtowc (&wc, "", 1, &state) != 0)
23039 if ac_fn_c_try_run "$LINENO"; then :
23040 gl_cv_func_mbrtowc_nul_retval=yes
23042 gl_cv_func_mbrtowc_nul_retval=no
23044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23045 conftest.$ac_objext conftest.beam conftest.$ac_ext
23051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23052 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23054 case "$gl_cv_func_mbrtowc_null_arg1" in
23057 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23062 case "$gl_cv_func_mbrtowc_null_arg2" in
23065 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23070 case "$gl_cv_func_mbrtowc_retval" in
23073 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23078 case "$gl_cv_func_mbrtowc_nul_retval" in
23081 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23089 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23098 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23115 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23130 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23135 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
23136 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23137 printf %s "(cached) " >&6
23141 # Guess no on AIX and OSF/1.
23142 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23143 # Guess yes otherwise.
23144 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23146 if test $LOCALE_JA != none; then
23147 if test "$cross_compiling" = yes; then :
23150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23151 /* end confdefs.h. */
23153 #include <locale.h>
23154 #include <string.h>
23155 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23157 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23158 included before <wchar.h>. */
23159 #include <stddef.h>
23165 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23167 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23171 memset (&state, '\0', sizeof (mbstate_t));
23172 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23173 if (mbsinit (&state))
23179 if ac_fn_c_try_run "$LINENO"; then :
23180 gl_cv_func_mbrtowc_incomplete_state=yes
23182 gl_cv_func_mbrtowc_incomplete_state=no
23184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23185 conftest.$ac_objext conftest.beam conftest.$ac_ext
23191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23192 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23198 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
23199 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23200 printf %s "(cached) " >&6
23204 # Guess no on Solaris 8.
23205 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23206 # Guess yes otherwise.
23207 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23209 if test $LOCALE_ZH_CN != none; then
23210 if test "$cross_compiling" = yes; then :
23213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23214 /* end confdefs.h. */
23216 #include <locale.h>
23217 #include <stdlib.h>
23218 #include <string.h>
23219 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23221 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23222 included before <wchar.h>. */
23223 #include <stddef.h>
23229 /* This fails on Solaris 8:
23230 mbrtowc returns 2, and sets wc to 0x00F0.
23231 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23232 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23234 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23238 memset (&state, '\0', sizeof (mbstate_t));
23239 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23240 && mbtowc (&wc, input + 3, 6) == 4)
23246 if ac_fn_c_try_run "$LINENO"; then :
23247 gl_cv_func_mbrtowc_sanitycheck=yes
23249 gl_cv_func_mbrtowc_sanitycheck=no
23251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23252 conftest.$ac_objext conftest.beam conftest.$ac_ext
23258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23259 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23261 REPLACE_MBSTATE_T=0
23262 case "$gl_cv_func_mbrtowc_incomplete_state" in
23264 *) REPLACE_MBSTATE_T=1 ;;
23266 case "$gl_cv_func_mbrtowc_sanitycheck" in
23268 *) REPLACE_MBSTATE_T=1 ;;
23271 REPLACE_MBSTATE_T=1
23276 if test $ac_cv_func_mbsinit = no; then
23278 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
23279 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23281 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23282 included before <wchar.h>. */
23283 #include <stddef.h>
23289 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
23295 cat >>confdefs.h <<_ACEOF
23296 #define HAVE_DECL_MBSINIT $ac_have_decl
23299 if test $ac_cv_have_decl_mbsinit = yes; then
23303 if test $REPLACE_MBSTATE_T = 1; then
23307 mingw*) REPLACE_MBSINIT=1 ;;
23312 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
23321 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
23338 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
23343 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23352 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23355 for ac_header in bp-sym.h
23357 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23358 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
23359 cat >>confdefs.h <<_ACEOF
23360 #define HAVE_BP_SYM_H 1
23380 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23390 for ac_func in mempcpy
23392 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23393 if test "x$ac_cv_func_mempcpy" = xyes; then :
23394 cat >>confdefs.h <<_ACEOF
23395 #define HAVE_MEMPCPY 1
23401 if test $ac_cv_func_mempcpy = no; then
23405 if test $HAVE_MEMPCPY = 0; then
23414 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23431 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23440 if test $ac_cv_have_decl_memrchr = no; then
23441 HAVE_DECL_MEMRCHR=0
23444 for ac_func in memrchr
23446 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23447 if test "x$ac_cv_func_memrchr" = xyes; then :
23448 cat >>confdefs.h <<_ACEOF
23449 #define HAVE_MEMRCHR 1
23456 if test $ac_cv_func_memrchr = no; then
23465 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23480 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23486 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
23487 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
23489 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
23492 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
23496 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23505 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
23511 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23520 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
23532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23533 printf %s "checking whether open recognizes a trailing slash... " >&6; }
23534 if ${gl_cv_func_open_slash+:} false; then :
23535 printf %s "(cached) " >&6
23537 # Assume that if we have lstat, we can also check symlinks.
23538 if test $ac_cv_func_lstat = yes; then
23540 ln -s conftest.tmp conftest.lnk
23542 if test "$cross_compiling" = yes; then :
23545 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23546 gl_cv_func_open_slash="guessing no" ;;
23548 gl_cv_func_open_slash="guessing yes" ;;
23552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23553 /* end confdefs.h. */
23557 # include <unistd.h>
23563 if (open ("conftest.lnk/", O_RDONLY) != -1)
23566 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23571 if ac_fn_c_try_run "$LINENO"; then :
23572 gl_cv_func_open_slash=yes
23574 gl_cv_func_open_slash=no
23576 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23577 conftest.$ac_objext conftest.beam conftest.$ac_ext
23580 rm -f conftest.sl conftest.tmp conftest.lnk
23583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23584 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
23585 case "$gl_cv_func_open_slash" in
23588 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23596 if test $REPLACE_OPEN = 0; then
23600 if test $ac_cv_func_fchdir = no; then
23604 if test $HAVE_FCHDIR = 0; then
23611 if test $REPLACE_OPEN = 1; then
23620 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
23638 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
23647 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
23651 # Solaris 9 has *at functions, but uniformly mishandles trailing
23652 # slash in all of them.
23660 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
23669 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
23678 cat >>confdefs.h <<_ACEOF
23679 #define GNULIB_OPENAT 1
23693 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
23700 for ac_func in opendir
23702 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
23703 if test "x$ac_cv_func_opendir" = xyes; then :
23704 cat >>confdefs.h <<_ACEOF
23705 #define HAVE_OPENDIR 1
23711 if test $ac_cv_func_opendir = no; then
23718 if test $ac_cv_func_fchdir = no; then
23722 if test $HAVE_FCHDIR = 0; then
23723 if test $HAVE_OPENDIR = 1; then
23729 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
23738 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
23752 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
23764 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
23767 case ${gl_cv_func_strerror_r_works-unset} in
23769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
23770 printf %s "checking whether perror matches strerror... " >&6; }
23771 if ${gl_cv_func_perror_works+:} false; then :
23772 printf %s "(cached) " >&6
23774 if test "$cross_compiling" = yes; then :
23775 gl_cv_func_perror_works="guessing no"
23778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23779 /* end confdefs.h. */
23782 #include <stdlib.h>
23783 #include <string.h>
23788 char *str = strerror (-1);
23789 if (!getenv("CONFTEST_OUTPUT")) return 0;
23790 if (!str) str = "";
23800 if ac_fn_c_try_run "$LINENO"; then :
23801 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
23802 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
23803 gl_cv_func_perror_works=yes
23805 gl_cv_func_perror_works=no
23807 rm -rf conftest.txt1 conftest.txt2
23809 gl_cv_func_perror_works=no
23811 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23812 conftest.$ac_objext conftest.beam conftest.$ac_ext
23817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
23818 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
23819 if test "$gl_cv_func_perror_works" != yes; then
23828 if test $REPLACE_PERROR = 1; then
23837 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
23851 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
23857 if test $gl_cv_func_frexp_no_libm = yes; then
23861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
23862 printf %s "checking whether frexp works... " >&6; }
23863 if ${gl_cv_func_frexp_works+:} false; then :
23864 printf %s "(cached) " >&6
23867 if test "$cross_compiling" = yes; then :
23869 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
23870 *) gl_cv_func_frexp_works="guessing yes";;
23874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23875 /* end confdefs.h. */
23879 #include <string.h>
23880 #if HAVE_DECL_ALARM
23881 # include <signal.h>
23882 # include <unistd.h>
23884 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
23885 ICC 10.0 has a bug when optimizing the expression -zero.
23886 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
23887 to PowerPC on Mac OS X 10.5. */
23888 #if defined __hpux || defined __sgi || defined __ICC
23890 compute_minus_zero (void)
23892 return -DBL_MIN * DBL_MIN;
23894 # define minus_zero compute_minus_zero ()
23896 double minus_zero = -0.0;
23904 #if HAVE_DECL_ALARM
23905 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
23906 number. Let the test fail in this case. */
23907 signal (SIGALRM, SIG_DFL);
23910 /* Test on denormalized numbers. */
23911 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
23916 double y = frexp (x, &exp);
23917 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
23918 On NetBSD: y = 0.75. Correct: y = 0.5. */
23922 /* Test on infinite numbers. */
23926 double y = frexp (x, &exp);
23930 /* Test on negative zero. */
23934 double y = frexp (x, &exp);
23935 if (memcmp (&y, &x, sizeof x))
23941 if ac_fn_c_try_run "$LINENO"; then :
23942 gl_cv_func_frexp_works=yes
23944 gl_cv_func_frexp_works=no
23946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23947 conftest.$ac_objext conftest.beam conftest.$ac_ext
23952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23953 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
23955 case "$gl_cv_func_frexp_works" in
23958 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
23965 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
23966 if ${gl_cv_func_ldexp_no_libm+:} false; then :
23967 printf %s "(cached) " >&6
23970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23971 /* end confdefs.h. */
23978 return ldexp (x, y) < 1;
23983 if ac_fn_c_try_link "$LINENO"; then :
23984 gl_cv_func_ldexp_no_libm=yes
23986 gl_cv_func_ldexp_no_libm=no
23988 rm -f core conftest.err conftest.$ac_objext \
23989 conftest$ac_exeext conftest.$ac_ext
23992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
23993 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
23994 if test $gl_cv_func_ldexp_no_libm = yes; then
23996 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
24005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
24006 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
24007 if ${gl_cv_func_frexpl_no_libm+:} false; then :
24008 printf %s "(cached) " >&6
24011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24012 /* end confdefs.h. */
24018 int e; return frexpl (x, &e) > 0;
24023 if ac_fn_c_try_link "$LINENO"; then :
24024 gl_cv_func_frexpl_no_libm=yes
24026 gl_cv_func_frexpl_no_libm=no
24028 rm -f core conftest.err conftest.$ac_objext \
24029 conftest$ac_exeext conftest.$ac_ext
24032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
24033 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
24035 if test $gl_cv_func_frexpl_no_libm = yes; then
24038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
24039 printf %s "checking whether frexpl works... " >&6; }
24040 if ${gl_cv_func_frexpl_works+:} false; then :
24041 printf %s "(cached) " >&6
24044 if test "$cross_compiling" = yes; then :
24047 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
24048 gl_cv_func_frexpl_works="guessing no";;
24049 *) gl_cv_func_frexpl_works="guessing yes";;
24053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24054 /* end confdefs.h. */
24058 /* Override the values of <float.h>, like done in float.in.h. */
24059 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
24060 # undef LDBL_MIN_EXP
24061 # define LDBL_MIN_EXP (-16381)
24063 #if defined __i386__ && defined __FreeBSD__
24064 # undef LDBL_MIN_EXP
24065 # define LDBL_MIN_EXP (-16381)
24067 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
24068 # undef LDBL_MIN_EXP
24069 # define LDBL_MIN_EXP DBL_MIN_EXP
24071 #if defined __sgi && (LDBL_MANT_DIG >= 106)
24072 # if defined __GNUC__
24073 # undef LDBL_MIN_EXP
24074 # define LDBL_MIN_EXP DBL_MIN_EXP
24081 long double frexpl (long double, int *);
24085 volatile long double x;
24086 /* Test on finite numbers that fails on AIX 5.1. */
24094 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
24095 function returns an invalid (incorrectly normalized) value: it returns
24096 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
24097 but the correct result is
24098 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
24102 long double y = frexpl (x, &exp);
24103 if (!(exp == 1 && y == 0.505L))
24106 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
24107 LDBL_MAX_EXP = 16384.
24108 In the loop end test, we test x against Infinity, rather than comparing
24109 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
24112 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
24123 /* Test on denormalized numbers. */
24126 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
24131 long double y = frexpl (x, &exp);
24132 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
24133 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
24134 if (exp != LDBL_MIN_EXP - 1)
24138 /* Test on infinite numbers. */
24142 long double y = frexpl (x, &exp);
24149 if ac_fn_c_try_run "$LINENO"; then :
24150 gl_cv_func_frexpl_works=yes
24152 gl_cv_func_frexpl_works=no
24154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24155 conftest.$ac_objext conftest.beam conftest.$ac_ext
24160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
24161 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
24163 case "$gl_cv_func_frexpl_works" in
24164 *yes) gl_func_frexpl_no_libm=yes ;;
24165 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
24168 gl_func_frexpl_no_libm=no
24171 if test $gl_func_frexpl_no_libm = yes; then
24173 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
24175 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
24177 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
24186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
24187 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
24188 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
24189 printf %s "(cached) " >&6
24192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24193 /* end confdefs.h. */
24199 return ldexpl (x, -1) > 0;
24204 if ac_fn_c_try_link "$LINENO"; then :
24205 gl_cv_func_ldexpl_no_libm=yes
24207 gl_cv_func_ldexpl_no_libm=no
24209 rm -f core conftest.err conftest.$ac_objext \
24210 conftest$ac_exeext conftest.$ac_ext
24213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
24214 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
24216 if test $gl_cv_func_ldexpl_no_libm = yes; then
24219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
24220 printf %s "checking whether ldexpl works... " >&6; }
24221 if ${gl_cv_func_ldexpl_works+:} false; then :
24222 printf %s "(cached) " >&6
24225 if test "$cross_compiling" = yes; then :
24228 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
24229 *) gl_cv_func_ldexpl_works="guessing yes";;
24233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24234 /* end confdefs.h. */
24241 long double ldexpl (long double, int);
24246 volatile long double x = 1.0;
24247 volatile long double y = ldexpl (x, -1);
24252 volatile long double x = 1.73205L;
24253 volatile long double y = ldexpl (x, 0);
24260 if ac_fn_c_try_run "$LINENO"; then :
24261 gl_cv_func_ldexpl_works=yes
24263 gl_cv_func_ldexpl_works=no
24265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24266 conftest.$ac_objext conftest.beam conftest.$ac_ext
24271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
24272 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
24274 case "$gl_cv_func_ldexpl_works" in
24277 printf "%s\n" "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
24279 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
24281 if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
24293 if test $gl_cv_func_vfprintf_posix = no; then
24305 gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
24309 printf "%s\n" "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
24320 GNULIB_PRINTF_POSIX=1
24326 printf "%s\n" "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
24337 for ac_func in readdir
24339 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
24340 if test "x$ac_cv_func_readdir" = xyes; then :
24341 cat >>confdefs.h <<_ACEOF
24342 #define HAVE_READDIR 1
24348 if test $ac_cv_func_readdir = no; then
24352 if test $HAVE_READDIR = 0; then
24361 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24375 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24382 for ac_header in stdlib.h
24384 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24385 if test "x$ac_cv_header_stdlib_h" = xyes; then :
24386 cat >>confdefs.h <<_ACEOF
24387 #define HAVE_STDLIB_H 1
24394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
24395 printf %s "checking for GNU libc compatible realloc... " >&6; }
24396 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
24397 printf %s "(cached) " >&6
24399 if test "$cross_compiling" = yes; then :
24401 # Guess yes on platforms where we know the result.
24402 *-gnu* | freebsd* | netbsd* | openbsd* \
24403 | hpux* | solaris* | cygwin* | mingw*)
24404 ac_cv_func_realloc_0_nonnull=yes ;;
24405 # If we don't know, assume the worst.
24406 *) ac_cv_func_realloc_0_nonnull=no ;;
24410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24411 /* end confdefs.h. */
24412 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
24413 # include <stdlib.h>
24421 return ! realloc (0, 0);
24427 if ac_fn_c_try_run "$LINENO"; then :
24428 ac_cv_func_realloc_0_nonnull=yes
24430 ac_cv_func_realloc_0_nonnull=no
24432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24433 conftest.$ac_objext conftest.beam conftest.$ac_ext
24438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
24439 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
24440 if test $ac_cv_func_realloc_0_nonnull = yes; then :
24442 printf "%s\n" "#define HAVE_REALLOC_GNU 1" >>confdefs.h
24445 printf "%s\n" "#define HAVE_REALLOC_GNU 0" >>confdefs.h
24452 if test $REPLACE_REALLOC = 1; then
24461 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24466 cat >>confdefs.h <<_ACEOF
24467 #define GNULIB_REALLOC_GNU 1
24474 if test $gl_cv_func_malloc_posix = yes; then
24476 printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24482 if test $REPLACE_REALLOC = 1; then
24491 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24499 GNULIB_REALLOC_POSIX=1
24505 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
24518 printf %s "checking for signbit macro... " >&6; }
24519 if ${gl_cv_func_signbit+:} false; then :
24520 printf %s "(cached) " >&6
24523 if test "$cross_compiling" = yes; then :
24525 # Guess yes on glibc systems.
24526 *-gnu*) gl_cv_func_signbit="guessing yes" ;;
24527 # If we don't know, assume the worst.
24528 *) gl_cv_func_signbit="guessing no" ;;
24532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24533 /* end confdefs.h. */
24536 /* If signbit is defined as a function, don't use it, since calling it for
24537 'float' or 'long double' arguments would involve conversions.
24538 If signbit is not declared at all but exists as a library function, don't
24539 use it, since the prototype may not match.
24540 If signbit is not declared at all but exists as a compiler built-in, don't
24541 use it, since it's preferable to use __builtin_signbit* (no warnings,
24542 no conversions). */
24544 # error "signbit should be a macro"
24546 #include <string.h>
24548 /* Global variables.
24549 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24550 but cannot constant-fold __builtin_signbitl (variable). */
24556 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24557 So we use -p0f and -p0d instead. */
24562 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24563 So we use another constant expression instead.
24564 But that expression does not work on other platforms, such as when
24565 cross-compiling to PowerPC on Mac OS X 10.5. */
24566 long double p0l = 0.0L;
24567 #if defined __hpux || defined __sgi
24568 long double m0l = -LDBL_MIN * LDBL_MIN;
24570 long double m0l = -p0l;
24573 if (signbit (vf)) /* link check */
24576 float plus_inf = 1.0f / p0f;
24577 float minus_inf = -1.0f / p0f;
24578 if (!(!signbit (255.0f)
24579 && signbit (-255.0f)
24581 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24582 && !signbit (plus_inf)
24583 && signbit (minus_inf)))
24586 if (signbit (vd)) /* link check */
24589 double plus_inf = 1.0 / p0d;
24590 double minus_inf = -1.0 / p0d;
24591 if (!(!signbit (255.0)
24592 && signbit (-255.0)
24594 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24595 && !signbit (plus_inf)
24596 && signbit (minus_inf)))
24599 if (signbit (vl)) /* link check */
24602 long double plus_inf = 1.0L / p0l;
24603 long double minus_inf = -1.0L / p0l;
24604 if (signbit (255.0L))
24606 if (!signbit (-255.0L))
24610 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24612 if (signbit (plus_inf))
24614 if (!signbit (minus_inf))
24622 if ac_fn_c_try_run "$LINENO"; then :
24623 gl_cv_func_signbit=yes
24625 gl_cv_func_signbit=no
24627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24628 conftest.$ac_objext conftest.beam conftest.$ac_ext
24633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
24634 printf "%s\n" "$gl_cv_func_signbit" >&6; }
24635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
24636 printf %s "checking for signbit compiler built-ins... " >&6; }
24637 if ${gl_cv_func_signbit_gcc+:} false; then :
24638 printf %s "(cached) " >&6
24641 if test "$cross_compiling" = yes; then :
24643 # Guess yes on glibc systems.
24644 *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
24645 # If we don't know, assume the worst.
24646 *) gl_cv_func_signbit_gcc="guessing no" ;;
24650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24651 /* end confdefs.h. */
24654 # define signbit(x) \
24655 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
24656 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
24657 __builtin_signbitf (x))
24659 # error "signbit should be three compiler built-ins"
24661 #include <string.h>
24663 /* Global variables.
24664 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24665 but cannot constant-fold __builtin_signbitl (variable). */
24671 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24672 So we use -p0f and -p0d instead. */
24677 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24678 So we use another constant expression instead.
24679 But that expression does not work on other platforms, such as when
24680 cross-compiling to PowerPC on Mac OS X 10.5. */
24681 long double p0l = 0.0L;
24682 #if defined __hpux || defined __sgi
24683 long double m0l = -LDBL_MIN * LDBL_MIN;
24685 long double m0l = -p0l;
24688 if (signbit (vf)) /* link check */
24691 float plus_inf = 1.0f / p0f;
24692 float minus_inf = -1.0f / p0f;
24693 if (!(!signbit (255.0f)
24694 && signbit (-255.0f)
24696 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24697 && !signbit (plus_inf)
24698 && signbit (minus_inf)))
24701 if (signbit (vd)) /* link check */
24704 double plus_inf = 1.0 / p0d;
24705 double minus_inf = -1.0 / p0d;
24706 if (!(!signbit (255.0)
24707 && signbit (-255.0)
24709 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24710 && !signbit (plus_inf)
24711 && signbit (minus_inf)))
24714 if (signbit (vl)) /* link check */
24717 long double plus_inf = 1.0L / p0l;
24718 long double minus_inf = -1.0L / p0l;
24719 if (signbit (255.0L))
24721 if (!signbit (-255.0L))
24725 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24727 if (signbit (plus_inf))
24729 if (!signbit (minus_inf))
24737 if ac_fn_c_try_run "$LINENO"; then :
24738 gl_cv_func_signbit_gcc=yes
24740 gl_cv_func_signbit_gcc=no
24742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24743 conftest.$ac_objext conftest.beam conftest.$ac_ext
24748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
24749 printf "%s\n" "$gl_cv_func_signbit_gcc" >&6; }
24750 case "$gl_cv_func_signbit_gcc" in
24752 REPLACE_SIGNBIT_USING_GCC=1
24755 case "$gl_cv_func_signbit" in
24761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
24762 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
24763 if ${gl_cv_cc_float_signbit+:} false; then :
24764 printf %s "(cached) " >&6
24767 if test "$cross_compiling" = yes; then :
24769 gl_cv_cc_float_signbit="unknown"
24772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24773 /* end confdefs.h. */
24775 #include <stddef.h>
24778 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24779 typedef union { float value; unsigned int word[NWORDS]; }
24781 static memory_float plus = { 1.0f };
24782 static memory_float minus = { -1.0f };
24787 FILE *fp = fopen ("conftest.out", "w");
24790 /* Find the different bit. */
24792 for (j = 0; j < NWORDS; j++)
24794 unsigned int x = plus.word[j] ^ minus.word[j];
24795 if ((x & (x - 1)) || (x && m))
24797 /* More than one bit difference. */
24798 fprintf (fp, "unknown");
24809 /* No difference. */
24810 fprintf (fp, "unknown");
24813 /* Now m = plus.word[k] ^ ~minus.word[k]. */
24814 if (plus.word[k] & ~minus.word[k])
24816 /* Oh? The sign bit is set in the positive and cleared in the negative
24818 fprintf (fp, "unknown");
24824 fprintf (fp, "word %d bit %d", (int) k, (int) i);
24825 if (fclose (fp) != 0)
24831 if ac_fn_c_try_run "$LINENO"; then :
24832 gl_cv_cc_float_signbit=`cat conftest.out`
24834 gl_cv_cc_float_signbit="unknown"
24836 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24837 conftest.$ac_objext conftest.beam conftest.$ac_ext
24843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
24844 printf "%s\n" "$gl_cv_cc_float_signbit" >&6; }
24845 case "$gl_cv_cc_float_signbit" in
24847 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24848 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
24850 cat >>confdefs.h <<_ACEOF
24851 #define FLT_SIGNBIT_WORD $word
24855 cat >>confdefs.h <<_ACEOF
24856 #define FLT_SIGNBIT_BIT $bit
24865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
24866 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
24867 if ${gl_cv_cc_double_signbit+:} false; then :
24868 printf %s "(cached) " >&6
24871 if test "$cross_compiling" = yes; then :
24873 gl_cv_cc_double_signbit="unknown"
24876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24877 /* end confdefs.h. */
24879 #include <stddef.h>
24882 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24883 typedef union { double value; unsigned int word[NWORDS]; }
24885 static memory_float plus = { 1.0 };
24886 static memory_float minus = { -1.0 };
24891 FILE *fp = fopen ("conftest.out", "w");
24894 /* Find the different bit. */
24896 for (j = 0; j < NWORDS; j++)
24898 unsigned int x = plus.word[j] ^ minus.word[j];
24899 if ((x & (x - 1)) || (x && m))
24901 /* More than one bit difference. */
24902 fprintf (fp, "unknown");
24913 /* No difference. */
24914 fprintf (fp, "unknown");
24917 /* Now m = plus.word[k] ^ ~minus.word[k]. */
24918 if (plus.word[k] & ~minus.word[k])
24920 /* Oh? The sign bit is set in the positive and cleared in the negative
24922 fprintf (fp, "unknown");
24928 fprintf (fp, "word %d bit %d", (int) k, (int) i);
24929 if (fclose (fp) != 0)
24935 if ac_fn_c_try_run "$LINENO"; then :
24936 gl_cv_cc_double_signbit=`cat conftest.out`
24938 gl_cv_cc_double_signbit="unknown"
24940 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24941 conftest.$ac_objext conftest.beam conftest.$ac_ext
24947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
24948 printf "%s\n" "$gl_cv_cc_double_signbit" >&6; }
24949 case "$gl_cv_cc_double_signbit" in
24951 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24952 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
24954 cat >>confdefs.h <<_ACEOF
24955 #define DBL_SIGNBIT_WORD $word
24959 cat >>confdefs.h <<_ACEOF
24960 #define DBL_SIGNBIT_BIT $bit
24969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
24970 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
24971 if ${gl_cv_cc_long_double_signbit+:} false; then :
24972 printf %s "(cached) " >&6
24975 if test "$cross_compiling" = yes; then :
24977 gl_cv_cc_long_double_signbit="unknown"
24980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24981 /* end confdefs.h. */
24983 #include <stddef.h>
24986 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24987 typedef union { long double value; unsigned int word[NWORDS]; }
24989 static memory_float plus = { 1.0L };
24990 static memory_float minus = { -1.0L };
24995 FILE *fp = fopen ("conftest.out", "w");
24998 /* Find the different bit. */
25000 for (j = 0; j < NWORDS; j++)
25002 unsigned int x = plus.word[j] ^ minus.word[j];
25003 if ((x & (x - 1)) || (x && m))
25005 /* More than one bit difference. */
25006 fprintf (fp, "unknown");
25017 /* No difference. */
25018 fprintf (fp, "unknown");
25021 /* Now m = plus.word[k] ^ ~minus.word[k]. */
25022 if (plus.word[k] & ~minus.word[k])
25024 /* Oh? The sign bit is set in the positive and cleared in the negative
25026 fprintf (fp, "unknown");
25032 fprintf (fp, "word %d bit %d", (int) k, (int) i);
25033 if (fclose (fp) != 0)
25039 if ac_fn_c_try_run "$LINENO"; then :
25040 gl_cv_cc_long_double_signbit=`cat conftest.out`
25042 gl_cv_cc_long_double_signbit="unknown"
25044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25045 conftest.$ac_objext conftest.beam conftest.$ac_ext
25051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
25052 printf "%s\n" "$gl_cv_cc_long_double_signbit" >&6; }
25053 case "$gl_cv_cc_long_double_signbit" in
25055 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
25056 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
25058 cat >>confdefs.h <<_ACEOF
25059 #define LDBL_SIGNBIT_WORD $word
25063 cat >>confdefs.h <<_ACEOF
25064 #define LDBL_SIGNBIT_BIT $bit
25071 if test "$gl_cv_cc_float_signbit" = unknown; then
25072 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
25074 if test "x$ac_cv_have_decl_copysignf" = xyes; then :
25080 cat >>confdefs.h <<_ACEOF
25081 #define HAVE_DECL_COPYSIGNF $ac_have_decl
25084 if test "$ac_cv_have_decl_copysignf" = yes; then
25085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
25086 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
25087 if ${gl_cv_func_copysignf_no_libm+:} false; then :
25088 printf %s "(cached) " >&6
25091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25092 /* end confdefs.h. */
25098 return copysignf (x, y) < 0;
25103 if ac_fn_c_try_link "$LINENO"; then :
25104 gl_cv_func_copysignf_no_libm=yes
25106 gl_cv_func_copysignf_no_libm=no
25108 rm -f core conftest.err conftest.$ac_objext \
25109 conftest$ac_exeext conftest.$ac_ext
25112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
25113 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
25114 if test $gl_cv_func_copysignf_no_libm = yes; then
25116 printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
25121 if test "$gl_cv_cc_double_signbit" = unknown; then
25122 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
25124 if test "x$ac_cv_have_decl_copysign" = xyes; then :
25130 cat >>confdefs.h <<_ACEOF
25131 #define HAVE_DECL_COPYSIGN $ac_have_decl
25134 if test "$ac_cv_have_decl_copysign" = yes; then
25135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
25136 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
25137 if ${gl_cv_func_copysign_no_libm+:} false; then :
25138 printf %s "(cached) " >&6
25141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25142 /* end confdefs.h. */
25148 return copysign (x, y) < 0;
25153 if ac_fn_c_try_link "$LINENO"; then :
25154 gl_cv_func_copysign_no_libm=yes
25156 gl_cv_func_copysign_no_libm=no
25158 rm -f core conftest.err conftest.$ac_objext \
25159 conftest$ac_exeext conftest.$ac_ext
25162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
25163 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
25164 if test $gl_cv_func_copysign_no_libm = yes; then
25166 printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
25171 if test "$gl_cv_cc_long_double_signbit" = unknown; then
25172 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
25174 if test "x$ac_cv_have_decl_copysignl" = xyes; then :
25180 cat >>confdefs.h <<_ACEOF
25181 #define HAVE_DECL_COPYSIGNL $ac_have_decl
25184 if test "$ac_cv_have_decl_copysignl" = yes; then
25185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
25186 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
25187 if ${gl_cv_func_copysignl_no_libm+:} false; then :
25188 printf %s "(cached) " >&6
25191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25192 /* end confdefs.h. */
25198 return copysignl (x, y) < 0;
25203 if ac_fn_c_try_link "$LINENO"; then :
25204 gl_cv_func_copysignl_no_libm=yes
25206 gl_cv_func_copysignl_no_libm=no
25208 rm -f core conftest.err conftest.$ac_objext \
25209 conftest$ac_exeext conftest.$ac_ext
25212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
25213 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
25214 if test $gl_cv_func_copysignl_no_libm = yes; then
25216 printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
25226 if test $REPLACE_SIGNBIT = 1; then
25235 gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
25245 gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
25255 gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
25269 printf "%s\n" "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
25274 for ac_header in stdint.h
25276 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
25277 if test "x$ac_cv_header_stdint_h" = xyes; then :
25278 cat >>confdefs.h <<_ACEOF
25279 #define HAVE_STDINT_H 1
25286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
25287 printf %s "checking for SIZE_MAX... " >&6; }
25288 if ${gl_cv_size_max+:} false; then :
25289 printf %s "(cached) " >&6
25293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25294 /* end confdefs.h. */
25296 #include <limits.h>
25298 #include <stdint.h>
25305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25306 $EGREP "Found it" >/dev/null 2>&1; then :
25311 if test -z "$gl_cv_size_max"; then
25312 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
25313 #include <limits.h>"; then :
25316 size_t_bits_minus_1=
25319 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
25325 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
25326 if test $fits_in_uint = 1; then
25327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25328 /* end confdefs.h. */
25329 #include <stddef.h>
25331 extern unsigned long foo;
25341 if ac_fn_c_try_compile "$LINENO"; then :
25344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25346 if test $fits_in_uint = 1; then
25347 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
25349 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
25352 gl_cv_size_max='((size_t)~(size_t)0)'
25357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
25358 printf "%s\n" "$gl_cv_size_max" >&6; }
25359 if test "$gl_cv_size_max" != yes; then
25361 cat >>confdefs.h <<_ACEOF
25362 #define SIZE_MAX $gl_cv_size_max
25369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25370 printf %s "checking for ssize_t... " >&6; }
25371 if ${gt_cv_ssize_t+:} false; then :
25372 printf %s "(cached) " >&6
25374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25375 /* end confdefs.h. */
25376 #include <sys/types.h>
25380 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25386 if ac_fn_c_try_compile "$LINENO"; then :
25391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25394 printf "%s\n" "$gt_cv_ssize_t" >&6; }
25395 if test $gt_cv_ssize_t = no; then
25397 printf "%s\n" "#define ssize_t int" >>confdefs.h
25404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25405 printf %s "checking whether stat handles trailing slashes on directories... " >&6; }
25406 if ${gl_cv_func_stat_dir_slash+:} false; then :
25407 printf %s "(cached) " >&6
25409 if test "$cross_compiling" = yes; then :
25411 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25412 *) gl_cv_func_stat_dir_slash="guessing yes";;
25415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25416 /* end confdefs.h. */
25417 #include <sys/stat.h>
25422 struct stat st; return stat (".", &st) != stat ("./", &st);
25427 if ac_fn_c_try_run "$LINENO"; then :
25428 gl_cv_func_stat_dir_slash=yes
25430 gl_cv_func_stat_dir_slash=no
25432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25433 conftest.$ac_objext conftest.beam conftest.$ac_ext
25437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25438 printf "%s\n" "$gl_cv_func_stat_dir_slash" >&6; }
25439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25440 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
25441 if ${gl_cv_func_stat_file_slash+:} false; then :
25442 printf %s "(cached) " >&6
25445 # Assume that if we have lstat, we can also check symlinks.
25446 if test $ac_cv_func_lstat = yes; then
25447 ln -s conftest.tmp conftest.lnk
25449 if test "$cross_compiling" = yes; then :
25451 # Guess yes on glibc systems.
25452 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25453 # If we don't know, assume the worst.
25454 *) gl_cv_func_stat_file_slash="guessing no" ;;
25458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25459 /* end confdefs.h. */
25460 #include <sys/stat.h>
25467 if (!stat ("conftest.tmp/", &st))
25470 if (!stat ("conftest.lnk/", &st))
25479 if ac_fn_c_try_run "$LINENO"; then :
25480 gl_cv_func_stat_file_slash=yes
25482 gl_cv_func_stat_file_slash=no
25484 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25485 conftest.$ac_objext conftest.beam conftest.$ac_ext
25488 rm -f conftest.tmp conftest.lnk
25490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25491 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
25492 case $gl_cv_func_stat_dir_slash in
25493 *no) REPLACE_STAT=1
25495 printf "%s\n" "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25498 case $gl_cv_func_stat_file_slash in
25499 *no) REPLACE_STAT=1
25501 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25505 if test $REPLACE_STAT = 1; then
25514 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25529 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
25537 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>
25538 #include <sys/stat.h>
25540 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
25542 cat >>confdefs.h <<_ACEOF
25543 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25547 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25548 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
25549 printf %s "(cached) " >&6
25551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25552 /* end confdefs.h. */
25554 #include <sys/types.h>
25555 #include <sys/stat.h>
25556 #if HAVE_SYS_TIME_H
25557 # include <sys/time.h>
25560 struct timespec ts;
25573 if ac_fn_c_try_compile "$LINENO"; then :
25574 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25576 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25581 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25582 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25584 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25588 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>
25589 #include <sys/stat.h>
25591 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
25593 cat >>confdefs.h <<_ACEOF
25594 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25599 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25600 #include <sys/stat.h>
25602 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
25604 cat >>confdefs.h <<_ACEOF
25605 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25610 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>
25611 #include <sys/stat.h>
25613 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
25615 cat >>confdefs.h <<_ACEOF
25616 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25632 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>
25633 #include <sys/stat.h>
25635 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
25637 cat >>confdefs.h <<_ACEOF
25638 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25643 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25644 #include <sys/stat.h>
25646 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
25648 cat >>confdefs.h <<_ACEOF
25649 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25654 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>
25655 #include <sys/stat.h>
25657 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
25659 cat >>confdefs.h <<_ACEOF
25660 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25674 # Define two additional variables used in the Makefile substitution.
25676 if test "$ac_cv_header_stdbool_h" = yes; then
25679 STDBOOL_H='stdbool.h'
25682 if test -n "$STDBOOL_H"; then
25683 GL_GENERATE_STDBOOL_H_TRUE=
25684 GL_GENERATE_STDBOOL_H_FALSE='#'
25686 GL_GENERATE_STDBOOL_H_TRUE='#'
25687 GL_GENERATE_STDBOOL_H_FALSE=
25691 if test "$ac_cv_type__Bool" = yes; then
25702 if test $gt_cv_c_wchar_t = no; then
25706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25707 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
25708 if ${gl_cv_decl_null_works+:} false; then :
25709 printf %s "(cached) " >&6
25711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25712 /* end confdefs.h. */
25713 #include <stddef.h>
25714 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25724 if ac_fn_c_try_compile "$LINENO"; then :
25725 gl_cv_decl_null_works=yes
25727 gl_cv_decl_null_works=no
25729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25732 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
25733 if test $gl_cv_decl_null_works = no; then
25738 if test -n "$STDDEF_H"; then
25739 GL_GENERATE_STDDEF_H_TRUE=
25740 GL_GENERATE_STDDEF_H_FALSE='#'
25742 GL_GENERATE_STDDEF_H_TRUE='#'
25743 GL_GENERATE_STDDEF_H_FALSE=
25746 if test -n "$STDDEF_H"; then
25755 if test $gl_cv_have_include_next = yes; then
25756 gl_cv_next_stddef_h='<'stddef.h'>'
25758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25759 printf %s "checking absolute name of <stddef.h>... " >&6; }
25760 if ${gl_cv_next_stddef_h+:} false; then :
25761 printf %s "(cached) " >&6
25764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25765 /* end confdefs.h. */
25766 #include <stddef.h>
25770 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25771 *) gl_absname_cpp="$ac_cpp" ;;
25776 gl_dirsep_regex='[/\\]'
25779 gl_dirsep_regex='\/'
25782 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25784 gl_header_literal_regex=`echo 'stddef.h' \
25785 | sed -e "$gl_make_literal_regex_sed"`
25786 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25787 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25792 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25793 sed -n "$gl_absolute_header_sed"`'"'
25797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25798 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
25800 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25802 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25803 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25804 gl_next_as_first_directive='<'stddef.h'>'
25806 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25807 gl_next_as_first_directive=$gl_cv_next_stddef_h
25809 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25827 if test $gl_cv_have_include_next = yes; then
25828 gl_cv_next_stdio_h='<'stdio.h'>'
25830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25831 printf %s "checking absolute name of <stdio.h>... " >&6; }
25832 if ${gl_cv_next_stdio_h+:} false; then :
25833 printf %s "(cached) " >&6
25836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25837 /* end confdefs.h. */
25842 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25843 *) gl_absname_cpp="$ac_cpp" ;;
25848 gl_dirsep_regex='[/\\]'
25851 gl_dirsep_regex='\/'
25854 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25856 gl_header_literal_regex=`echo 'stdio.h' \
25857 | sed -e "$gl_make_literal_regex_sed"`
25858 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25859 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25864 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25865 sed -n "$gl_absolute_header_sed"`'"'
25869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25870 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
25872 NEXT_STDIO_H=$gl_cv_next_stdio_h
25874 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25875 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25876 gl_next_as_first_directive='<'stdio.h'>'
25878 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25879 gl_next_as_first_directive=$gl_cv_next_stdio_h
25881 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25890 cat >>confdefs.h <<_ACEOF
25891 #define GNULIB_FSCANF 1
25898 cat >>confdefs.h <<_ACEOF
25899 #define GNULIB_SCANF 1
25935 if test $gl_cv_have_include_next = yes; then
25936 gl_cv_next_stdlib_h='<'stdlib.h'>'
25938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25939 printf %s "checking absolute name of <stdlib.h>... " >&6; }
25940 if ${gl_cv_next_stdlib_h+:} false; then :
25941 printf %s "(cached) " >&6
25944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25945 /* end confdefs.h. */
25946 #include <stdlib.h>
25950 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25951 *) gl_absname_cpp="$ac_cpp" ;;
25956 gl_dirsep_regex='[/\\]'
25959 gl_dirsep_regex='\/'
25962 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25964 gl_header_literal_regex=`echo 'stdlib.h' \
25965 | sed -e "$gl_make_literal_regex_sed"`
25966 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25967 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25972 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25973 sed -n "$gl_absolute_header_sed"`'"'
25977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25978 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
25980 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25982 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25983 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25984 gl_next_as_first_directive='<'stdlib.h'>'
25986 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25987 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25989 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26001 if test $ac_cv_func_strdup = yes; then
26002 if test $gl_cv_func_malloc_posix != yes; then
26007 if test $ac_cv_have_decl_strdup = no; then
26011 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26020 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26035 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26046 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26048 printf %s "checking for working strerror function... " >&6; }
26049 if ${gl_cv_func_working_strerror+:} false; then :
26050 printf %s "(cached) " >&6
26052 if test "$cross_compiling" = yes; then :
26054 # Guess yes on glibc systems.
26055 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26056 # If we don't know, assume the worst.
26057 *) gl_cv_func_working_strerror="guessing no" ;;
26061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26062 /* end confdefs.h. */
26063 #include <string.h>
26068 if (!*strerror (-2)) return 1;
26073 if ac_fn_c_try_run "$LINENO"; then :
26074 gl_cv_func_working_strerror=yes
26076 gl_cv_func_working_strerror=no
26078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26079 conftest.$ac_objext conftest.beam conftest.$ac_ext
26084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26085 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
26086 case "$gl_cv_func_working_strerror" in
26093 case "$gl_cv_func_strerror_r_works" in
26094 *no) REPLACE_STRERROR=1 ;;
26101 if test $REPLACE_STRERROR = 1; then
26110 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26115 cat >>confdefs.h <<_ACEOF
26116 #define GNULIB_STRERROR 1
26131 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26137 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26146 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26152 if test $ac_cv_header_sys_socket_h != yes; then
26153 for ac_header in winsock2.h
26155 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26156 if test "x$ac_cv_header_winsock2_h" = xyes; then :
26157 cat >>confdefs.h <<_ACEOF
26158 #define HAVE_WINSOCK2_H 1
26166 if test "$ac_cv_header_winsock2_h" = yes; then
26168 UNISTD_H_HAVE_WINSOCK2_H=1
26169 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26183 if test $ac_cv_have_decl_strerror_r = no; then
26184 HAVE_DECL_STRERROR_R=0
26187 if test $ac_cv_func_strerror_r = yes; then
26188 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26189 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26190 case "$gl_cv_func_strerror_r_works" in
26191 *no) REPLACE_STRERROR_R=1 ;;
26194 REPLACE_STRERROR_R=1
26197 REPLACE_STRERROR_R=1
26201 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26210 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26223 GNULIB_STRERROR_R=1
26229 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26250 if test $gl_cv_have_include_next = yes; then
26251 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26254 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
26255 if ${gl_cv_next_sys_stat_h+:} false; then :
26256 printf %s "(cached) " >&6
26259 if test $ac_cv_header_sys_stat_h = yes; then
26262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26263 /* end confdefs.h. */
26264 #include <sys/stat.h>
26268 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26269 *) gl_absname_cpp="$ac_cpp" ;;
26274 gl_dirsep_regex='[/\\]'
26277 gl_dirsep_regex='\/'
26280 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26282 gl_header_literal_regex=`echo 'sys/stat.h' \
26283 | sed -e "$gl_make_literal_regex_sed"`
26284 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26285 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26290 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26291 sed -n "$gl_absolute_header_sed"`'"'
26293 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26299 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
26301 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26303 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26304 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26305 gl_next_as_first_directive='<'sys/stat.h'>'
26307 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26308 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26310 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26322 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26324 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26328 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26329 #include <sys/stat.h>
26331 if test "x$ac_cv_type_nlink_t" = xyes; then :
26335 printf "%s\n" "#define nlink_t int" >>confdefs.h
26369 if test $gl_cv_have_include_next = yes; then
26370 gl_cv_next_unistd_h='<'unistd.h'>'
26372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26373 printf %s "checking absolute name of <unistd.h>... " >&6; }
26374 if ${gl_cv_next_unistd_h+:} false; then :
26375 printf %s "(cached) " >&6
26378 if test $ac_cv_header_unistd_h = yes; then
26381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26382 /* end confdefs.h. */
26383 #include <unistd.h>
26387 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26388 *) gl_absname_cpp="$ac_cpp" ;;
26393 gl_dirsep_regex='[/\\]'
26396 gl_dirsep_regex='\/'
26399 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26401 gl_header_literal_regex=`echo 'unistd.h' \
26402 | sed -e "$gl_make_literal_regex_sed"`
26403 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26404 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26409 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26410 sed -n "$gl_absolute_header_sed"`'"'
26412 gl_cv_next_unistd_h='<'unistd.h'>'
26417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26418 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
26420 NEXT_UNISTD_H=$gl_cv_next_unistd_h
26422 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26423 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26424 gl_next_as_first_directive='<'unistd.h'>'
26426 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26427 gl_next_as_first_directive=$gl_cv_next_unistd_h
26429 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26434 if test $ac_cv_header_unistd_h = yes; then
26456 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26458 printf %s "checking whether futimesat handles NULL file... " >&6; }
26459 if ${gl_cv_func_futimesat_works+:} false; then :
26460 printf %s "(cached) " >&6
26462 touch conftest.file
26463 if test "$cross_compiling" = yes; then :
26465 # Guess yes on glibc systems.
26466 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26467 # If we don't know, assume the worst.
26468 *) gl_cv_func_futimesat_works="guessing no" ;;
26472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26473 /* end confdefs.h. */
26475 #include <stddef.h>
26476 #include <sys/times.h>
26482 int fd = open ("conftest.file", O_RDWR);
26483 if (fd < 0) return 1;
26484 if (futimesat (fd, NULL, NULL)) return 2;
26490 if ac_fn_c_try_run "$LINENO"; then :
26491 gl_cv_func_futimesat_works=yes
26493 gl_cv_func_futimesat_works=no
26495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26496 conftest.$ac_objext conftest.beam conftest.$ac_ext
26499 rm -f conftest.file
26501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26502 printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
26503 case "$gl_cv_func_futimesat_works" in
26507 printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
26515 if test $ac_cv_func_vasnprintf = no; then
26526 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26536 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26546 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26556 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26558 if test $ac_cv_func_vasnprintf = yes; then
26560 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26574 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26575 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
26579 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
26607 gl_cv_func_vfprintf_posix=no
26608 case "$gl_cv_func_printf_sizes_c99" in
26610 case "$gl_cv_func_printf_long_double" in
26612 case "$gl_cv_func_printf_infinite" in
26614 case "$gl_cv_func_printf_infinite_long_double" in
26616 case "$gl_cv_func_printf_directive_a" in
26618 case "$gl_cv_func_printf_directive_f" in
26620 case "$gl_cv_func_printf_directive_n" in
26622 case "$gl_cv_func_printf_directive_ls" in
26624 case "$gl_cv_func_printf_positions" in
26626 case "$gl_cv_func_printf_flag_grouping" in
26628 case "$gl_cv_func_printf_flag_leftadjust" in
26630 case "$gl_cv_func_printf_flag_zero" in
26632 case "$gl_cv_func_printf_precision" in
26634 case "$gl_cv_func_printf_enomem" in
26636 # vfprintf exists and is
26637 # already POSIX compliant.
26638 gl_cv_func_vfprintf_posix=yes
26667 if test $gl_cv_func_vfprintf_posix = no; then
26671 case "$gl_cv_func_printf_infinite" in
26676 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
26684 case "$gl_cv_func_printf_long_double" in
26686 case "$gl_cv_func_printf_infinite_long_double" in
26691 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
26700 case "$gl_cv_func_printf_directive_a" in
26705 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
26707 for ac_func in nl_langinfo
26709 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
26710 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
26711 cat >>confdefs.h <<_ACEOF
26712 #define HAVE_NL_LANGINFO 1
26723 case "$gl_cv_func_printf_directive_f" in
26728 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
26735 case "$gl_cv_func_printf_directive_ls" in
26740 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
26747 case "$gl_cv_func_printf_flag_grouping" in
26752 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
26759 case "$gl_cv_func_printf_flag_leftadjust" in
26764 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
26771 case "$gl_cv_func_printf_flag_zero" in
26776 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
26783 case "$gl_cv_func_printf_precision" in
26788 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
26791 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
26794 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
26801 case "$gl_cv_func_printf_enomem" in
26806 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
26809 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
26812 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
26827 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26837 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26847 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26857 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26859 if test $ac_cv_func_vasnprintf = yes; then
26861 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26875 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26876 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
26880 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
26901 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
26905 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
26916 GNULIB_VFPRINTF_POSIX=1
26922 printf "%s\n" "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
26938 if test $gl_cv_have_include_next = yes; then
26939 gl_cv_next_wchar_h='<'wchar.h'>'
26941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
26942 printf %s "checking absolute name of <wchar.h>... " >&6; }
26943 if ${gl_cv_next_wchar_h+:} false; then :
26944 printf %s "(cached) " >&6
26947 if test $ac_cv_header_wchar_h = yes; then
26950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26951 /* end confdefs.h. */
26956 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26957 *) gl_absname_cpp="$ac_cpp" ;;
26962 gl_dirsep_regex='[/\\]'
26965 gl_dirsep_regex='\/'
26968 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26970 gl_header_literal_regex=`echo 'wchar.h' \
26971 | sed -e "$gl_make_literal_regex_sed"`
26972 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26973 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26978 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26979 sed -n "$gl_absolute_header_sed"`'"'
26981 gl_cv_next_wchar_h='<'wchar.h'>'
26986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
26987 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
26989 NEXT_WCHAR_H=$gl_cv_next_wchar_h
26991 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26992 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26993 gl_next_as_first_directive='<'wchar.h'>'
26995 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26996 gl_next_as_first_directive=$gl_cv_next_wchar_h
26998 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27003 if test $ac_cv_header_wchar_h = yes; then
27013 if test $gt_cv_c_wint_t = yes; then
27027 if test $ac_cv_func_iswcntrl = yes; then
27035 if test $gt_cv_c_wint_t = yes; then
27051 if test $gl_cv_have_include_next = yes; then
27052 gl_cv_next_wctype_h='<'wctype.h'>'
27054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27055 printf %s "checking absolute name of <wctype.h>... " >&6; }
27056 if ${gl_cv_next_wctype_h+:} false; then :
27057 printf %s "(cached) " >&6
27060 if test $ac_cv_header_wctype_h = yes; then
27063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27064 /* end confdefs.h. */
27065 #include <wctype.h>
27069 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27070 *) gl_absname_cpp="$ac_cpp" ;;
27075 gl_dirsep_regex='[/\\]'
27078 gl_dirsep_regex='\/'
27081 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27083 gl_header_literal_regex=`echo 'wctype.h' \
27084 | sed -e "$gl_make_literal_regex_sed"`
27085 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27086 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27091 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27092 sed -n "$gl_absolute_header_sed"`'"'
27094 gl_cv_next_wctype_h='<'wctype.h'>'
27099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27100 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
27102 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
27104 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27105 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27106 gl_next_as_first_directive='<'wctype.h'>'
27108 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27109 gl_next_as_first_directive=$gl_cv_next_wctype_h
27111 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27116 if test $ac_cv_header_wctype_h = yes; then
27117 if test $ac_cv_func_iswcntrl = yes; then
27118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27119 printf %s "checking whether iswcntrl works... " >&6; }
27120 if ${gl_cv_func_iswcntrl_works+:} false; then :
27121 printf %s "(cached) " >&6
27124 if test "$cross_compiling" = yes; then :
27125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27126 /* end confdefs.h. */
27127 #include <stdlib.h>
27128 #if __GNU_LIBRARY__ == 1
27129 Linux libc5 i18n is broken.
27139 if ac_fn_c_try_compile "$LINENO"; then :
27140 gl_cv_func_iswcntrl_works="guessing yes"
27142 gl_cv_func_iswcntrl_works="guessing no"
27144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27148 /* end confdefs.h. */
27150 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27151 included before <wchar.h>.
27152 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27153 must be included before <wchar.h>. */
27154 #include <stddef.h>
27158 #include <wctype.h>
27159 int main () { return iswprint ('x') == 0; }
27162 if ac_fn_c_try_run "$LINENO"; then :
27163 gl_cv_func_iswcntrl_works=yes
27165 gl_cv_func_iswcntrl_works=no
27167 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27168 conftest.$ac_objext conftest.beam conftest.$ac_ext
27173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27174 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
27182 case "$gl_cv_func_iswcntrl_works" in
27183 *yes) REPLACE_ISWCNTRL=0 ;;
27184 *) REPLACE_ISWCNTRL=1 ;;
27188 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27192 if test $REPLACE_ISWCNTRL = 1; then
27195 for ac_func in towlower
27197 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
27198 if test "x$ac_cv_func_towlower" = xyes; then :
27199 cat >>confdefs.h <<_ACEOF
27200 #define HAVE_TOWLOWER 1
27206 if test $ac_cv_func_towlower = yes; then
27209 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27210 included before <wchar.h>.
27211 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27212 must be included before <wchar.h>. */
27213 #include <stddef.h>
27218 # include <wctype.h>
27222 if test "x$ac_cv_have_decl_towlower" = xyes; then :
27228 cat >>confdefs.h <<_ACEOF
27229 #define HAVE_DECL_TOWLOWER $ac_have_decl
27232 if test $ac_cv_have_decl_towlower = yes; then
27241 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27246 printf %s "checking for wctype_t... " >&6; }
27247 if ${gl_cv_type_wctype_t+:} false; then :
27248 printf %s "(cached) " >&6
27250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27251 /* end confdefs.h. */
27252 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27253 included before <wchar.h>.
27254 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27255 must be included before <wchar.h>. */
27256 #include <stddef.h>
27261 # include <wctype.h>
27273 if ac_fn_c_try_compile "$LINENO"; then :
27274 gl_cv_type_wctype_t=yes
27276 gl_cv_type_wctype_t=no
27278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27282 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
27283 if test $gl_cv_type_wctype_t = no; then
27287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27288 printf %s "checking for wctrans_t... " >&6; }
27289 if ${gl_cv_type_wctrans_t+:} false; then :
27290 printf %s "(cached) " >&6
27292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27293 /* end confdefs.h. */
27294 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27295 included before <wchar.h>.
27296 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27297 must be included before <wchar.h>. */
27298 #include <stddef.h>
27302 #include <wctype.h>
27313 if ac_fn_c_try_compile "$LINENO"; then :
27314 gl_cv_type_wctrans_t=yes
27316 gl_cv_type_wctrans_t=no
27318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27322 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
27323 if test $gl_cv_type_wctrans_t = no; then
27332 for ac_header in stdint.h
27334 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27335 if test "x$ac_cv_header_stdint_h" = xyes; then :
27336 cat >>confdefs.h <<_ACEOF
27337 #define HAVE_STDINT_H 1
27348 # End of code from modules
27369 gl_source_base='tests'
27370 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
27372 gl_module_indicator_condition=$gltests_WITNESS
27382 LIBGZIP_LIBDEPS="$gl_libdeps"
27384 LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
27388 # Check whether --enable-gcc-warnings was given.
27389 if test "${enable_gcc_warnings+set}" = set; then :
27390 enableval=$enable_gcc_warnings; case $enableval in
27392 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
27394 gl_gcc_warnings=$enableval
27396 if test -d "$srcdir"/.git; then
27397 gl_gcc_warnings=yes
27405 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
27406 # ------------------------------------------------
27407 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
27408 # Otherwise, run RUN-IF-NOT-FOUND.
27411 if test "$gl_gcc_warnings" = yes; then
27412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
27413 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
27414 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
27415 printf %s "(cached) " >&6
27418 gl_save_compiler_FLAGS="$CFLAGS"
27419 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
27420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27421 /* end confdefs.h. */
27431 if ac_fn_c_try_compile "$LINENO"; then :
27432 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
27434 gl_cv_warn_c__Werror__Wunknown_warning_option=no
27436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27437 CFLAGS="$gl_save_compiler_FLAGS"
27440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
27441 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
27442 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
27443 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
27445 gl_unknown_warnings_are_errors=
27449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
27450 printf %s "checking whether C compiler handles -Werror... " >&6; }
27451 if ${gl_cv_warn_c__Werror+:} false; then :
27452 printf %s "(cached) " >&6
27455 gl_save_compiler_FLAGS="$CFLAGS"
27456 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
27457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27458 /* end confdefs.h. */
27468 if ac_fn_c_try_compile "$LINENO"; then :
27469 gl_cv_warn_c__Werror=yes
27471 gl_cv_warn_c__Werror=no
27473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27474 CFLAGS="$gl_save_compiler_FLAGS"
27477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
27478 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
27479 if test "x$gl_cv_warn_c__Werror" = xyes; then :
27480 as_fn_append WERROR_CFLAGS " -Werror"
27487 # This, $nw, is the list of warnings we disable.
27488 nw="$nw -Wdeclaration-after-statement" # too useful to forbid
27489 nw="$nw -Waggregate-return" # anachronistic
27490 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
27491 nw="$nw -Wc++-compat" # We don't care about C++ compilers
27492 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
27493 nw="$nw -Wtraditional" # Warns on #elif which we use often
27494 nw="$nw -Wcast-qual" # Too many warnings for now
27495 nw="$nw -Wconversion" # Too many warnings for now
27496 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
27497 nw="$nw -Wsign-conversion" # Too many warnings for now
27498 nw="$nw -Wtraditional-conversion" # Too many warnings for now
27499 nw="$nw -Wunreachable-code" # Too many warnings for now
27500 nw="$nw -Wpadded" # Our structs are not padded
27501 nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat
27502 nw="$nw -Wlogical-op" # any use of fwrite provokes this
27503 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
27504 nw="$nw -Wvla" # warnings in gettext.h
27505 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
27506 nw="$nw -Wswitch-enum" # Too many warnings for now
27507 nw="$nw -Wswitch-default" # Too many warnings for now
27508 nw="$nw -Wstack-protector" # not worth working around
27509 # things I might fix soon:
27510 nw="$nw -Wfloat-equal" # sort.c, seq.c
27511 nw="$nw -Wmissing-format-attribute" # copy.c
27512 nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
27513 nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
27515 # Warnings that gzip runs afoul of but coreutils does not.
27516 nw="$nw -Wold-style-definition"
27518 nw="$nw -Wstrict-overflow"
27520 # Using -Wstrict-overflow is a pain, but the alternative is worse.
27521 # For an example, see the code that provoked this report:
27522 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
27523 # Code like that still infloops with gcc-4.6.0 and -O2. Scary indeed.
27527 if test -n "$GCC"; then
27529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
27530 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
27531 if ${gl_cv_cc_nomfi_supported+:} false; then :
27532 printf %s "(cached) " >&6
27535 gl_save_CFLAGS="$CFLAGS"
27536 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
27537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27538 /* end confdefs.h. */
27548 if ac_fn_c_try_compile "$LINENO"; then :
27549 gl_cv_cc_nomfi_supported=yes
27551 gl_cv_cc_nomfi_supported=no
27553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27554 CFLAGS="$gl_save_CFLAGS"
27557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
27558 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
27560 if test "$gl_cv_cc_nomfi_supported" = yes; then
27561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
27562 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
27563 if ${gl_cv_cc_nomfi_needed+:} false; then :
27564 printf %s "(cached) " >&6
27567 gl_save_CFLAGS="$CFLAGS"
27568 CFLAGS="$CFLAGS -W -Werror"
27569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27570 /* end confdefs.h. */
27573 typedef struct { int a; int b; } s_t;
27585 if ac_fn_c_try_compile "$LINENO"; then :
27586 gl_cv_cc_nomfi_needed=no
27588 gl_cv_cc_nomfi_needed=yes
27590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27591 CFLAGS="$gl_save_CFLAGS"
27595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
27596 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
27599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
27600 printf %s "checking whether -Wuninitialized is supported... " >&6; }
27601 if ${gl_cv_cc_uninitialized_supported+:} false; then :
27602 printf %s "(cached) " >&6
27605 gl_save_CFLAGS="$CFLAGS"
27606 CFLAGS="$CFLAGS -Werror -Wuninitialized"
27607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27608 /* end confdefs.h. */
27618 if ac_fn_c_try_compile "$LINENO"; then :
27619 gl_cv_cc_uninitialized_supported=yes
27621 gl_cv_cc_uninitialized_supported=no
27623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27624 CFLAGS="$gl_save_CFLAGS"
27627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
27628 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
27632 # List all gcc warning categories.
27634 for gl_manywarn_item in \
27638 -Waggressive-loop-optimizations \
27642 -Wbad-function-cast \
27643 -Wbuiltin-macro-redefined \
27645 -Wchar-subscripts \
27649 -Wcoverage-mismatch \
27652 -Wdeprecated-declarations \
27653 -Wdisabled-optimization \
27655 -Wdouble-promotion \
27660 -Wformat-contains-nul \
27661 -Wformat-extra-args \
27662 -Wformat-nonliteral \
27663 -Wformat-security \
27665 -Wformat-zero-length \
27666 -Wfree-nonheap-object \
27667 -Wignored-qualifiers \
27669 -Wimplicit-function-declaration \
27673 -Wint-to-pointer-cast \
27674 -Winvalid-memory-model \
27676 -Wjump-misses-init \
27679 -Wmaybe-uninitialized \
27681 -Wmissing-declarations \
27682 -Wmissing-field-initializers \
27683 -Wmissing-include-dirs \
27684 -Wmissing-parameter-type \
27685 -Wmissing-prototypes \
27692 -Wold-style-declaration \
27693 -Wold-style-definition \
27695 -Woverlength-strings \
27698 -Wpacked-bitfield-compat \
27702 -Wpointer-to-int-cast \
27704 -Wreturn-local-addr \
27708 -Wsizeof-pointer-memaccess \
27709 -Wstack-protector \
27710 -Wstrict-aliasing \
27711 -Wstrict-overflow \
27712 -Wstrict-prototypes \
27713 -Wsuggest-attribute=const \
27714 -Wsuggest-attribute=format \
27715 -Wsuggest-attribute=noreturn \
27716 -Wsuggest-attribute=pure \
27725 -Wunknown-pragmas \
27726 -Wunsafe-loop-optimizations \
27728 -Wunused-but-set-parameter \
27729 -Wunused-but-set-variable \
27730 -Wunused-function \
27732 -Wunused-local-typedefs \
27734 -Wunused-parameter \
27737 -Wunused-variable \
27739 -Wvariadic-macros \
27740 -Wvector-operation-performance \
27742 -Wvolatile-register-var \
27746 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27749 # Disable specific options as needed.
27750 if test "$gl_cv_cc_nomfi_needed" = yes; then
27751 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
27754 if test "$gl_cv_cc_uninitialized_supported" = no; then
27755 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
27758 ws=$gl_manywarn_set
27766 *" $gl_warn_item "*)
27769 gl_warn_set="$gl_warn_set $gl_warn_item"
27777 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
27778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
27779 printf %s "checking whether C compiler handles $w... " >&6; }
27780 if eval \${$as_gl_Warn+:} false; then :
27781 printf %s "(cached) " >&6
27784 gl_save_compiler_FLAGS="$CFLAGS"
27785 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
27786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27787 /* end confdefs.h. */
27797 if ac_fn_c_try_compile "$LINENO"; then :
27798 eval "$as_gl_Warn=yes"
27800 eval "$as_gl_Warn=no"
27802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27803 CFLAGS="$gl_save_compiler_FLAGS"
27806 eval ac_res=\$$as_gl_Warn
27807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27808 printf "%s\n" "$ac_res" >&6; }
27809 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
27810 as_fn_append WARN_CFLAGS " $w"
27816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
27817 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
27818 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
27819 printf %s "(cached) " >&6
27822 gl_save_compiler_FLAGS="$CFLAGS"
27823 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
27824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27825 /* end confdefs.h. */
27835 if ac_fn_c_try_compile "$LINENO"; then :
27836 gl_cv_warn_c__Wno_sign_compare=yes
27838 gl_cv_warn_c__Wno_sign_compare=no
27840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27841 CFLAGS="$gl_save_compiler_FLAGS"
27844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
27845 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
27846 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
27847 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
27850 # Too many warnings for now
27852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
27853 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
27854 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
27855 printf %s "(cached) " >&6
27858 gl_save_compiler_FLAGS="$CFLAGS"
27859 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
27860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27861 /* end confdefs.h. */
27871 if ac_fn_c_try_compile "$LINENO"; then :
27872 gl_cv_warn_c__Wno_unused_parameter=yes
27874 gl_cv_warn_c__Wno_unused_parameter=no
27876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27877 CFLAGS="$gl_save_compiler_FLAGS"
27880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
27881 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
27882 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
27883 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
27886 # Too many warnings for now
27888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5
27889 printf %s "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; }
27890 if ${gl_cv_warn_c__Wsuggest_attribute_const+:} false; then :
27891 printf %s "(cached) " >&6
27894 gl_save_compiler_FLAGS="$CFLAGS"
27895 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=const"
27896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27897 /* end confdefs.h. */
27907 if ac_fn_c_try_compile "$LINENO"; then :
27908 gl_cv_warn_c__Wsuggest_attribute_const=yes
27910 gl_cv_warn_c__Wsuggest_attribute_const=no
27912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27913 CFLAGS="$gl_save_compiler_FLAGS"
27916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_const" >&5
27917 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_const" >&6; }
27918 if test "x$gl_cv_warn_c__Wsuggest_attribute_const" = xyes; then :
27919 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=const"
27924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=noreturn" >&5
27925 printf %s "checking whether C compiler handles -Wsuggest-attribute=noreturn... " >&6; }
27926 if ${gl_cv_warn_c__Wsuggest_attribute_noreturn+:} false; then :
27927 printf %s "(cached) " >&6
27930 gl_save_compiler_FLAGS="$CFLAGS"
27931 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=noreturn"
27932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27933 /* end confdefs.h. */
27943 if ac_fn_c_try_compile "$LINENO"; then :
27944 gl_cv_warn_c__Wsuggest_attribute_noreturn=yes
27946 gl_cv_warn_c__Wsuggest_attribute_noreturn=no
27948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27949 CFLAGS="$gl_save_compiler_FLAGS"
27952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_noreturn" >&5
27953 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_noreturn" >&6; }
27954 if test "x$gl_cv_warn_c__Wsuggest_attribute_noreturn" = xyes; then :
27955 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
27960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
27961 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
27962 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
27963 printf %s "(cached) " >&6
27966 gl_save_compiler_FLAGS="$CFLAGS"
27967 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
27968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27969 /* end confdefs.h. */
27979 if ac_fn_c_try_compile "$LINENO"; then :
27980 gl_cv_warn_c__Wno_format_nonliteral=yes
27982 gl_cv_warn_c__Wno_format_nonliteral=no
27984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27985 CFLAGS="$gl_save_compiler_FLAGS"
27988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
27989 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
27990 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
27991 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
27996 # Enable this warning only with gcc-4.7 and newer. With 4.6.2 20111027,
27997 # it suggests test.c's advance function may be pure, even though it
27998 # increments a global variable. Oops.
27999 # Normally we'd write code to test for the precise failure, but that
28000 # requires a relatively large input to make gcc exhibit the failure.
28001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28002 /* end confdefs.h. */
28004 #if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
28007 # error "your version of gcc is older than 4.7"
28019 if ac_fn_c_try_cpp "$LINENO"; then :
28021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5
28022 printf %s "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; }
28023 if ${gl_cv_warn_c__Wsuggest_attribute_pure+:} false; then :
28024 printf %s "(cached) " >&6
28027 gl_save_compiler_FLAGS="$CFLAGS"
28028 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=pure"
28029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28030 /* end confdefs.h. */
28040 if ac_fn_c_try_compile "$LINENO"; then :
28041 gl_cv_warn_c__Wsuggest_attribute_pure=yes
28043 gl_cv_warn_c__Wsuggest_attribute_pure=no
28045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28046 CFLAGS="$gl_save_compiler_FLAGS"
28049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_pure" >&5
28050 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_pure" >&6; }
28051 if test "x$gl_cv_warn_c__Wsuggest_attribute_pure" = xyes; then :
28052 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=pure"
28057 rm -f conftest.err conftest.i conftest.$ac_ext
28061 # In spite of excluding -Wlogical-op above, it is enabled, as of
28062 # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
28064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
28065 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
28066 if ${gl_cv_warn_c__Wno_logical_op+:} false; then :
28067 printf %s "(cached) " >&6
28070 gl_save_compiler_FLAGS="$CFLAGS"
28071 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op"
28072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28073 /* end confdefs.h. */
28083 if ac_fn_c_try_compile "$LINENO"; then :
28084 gl_cv_warn_c__Wno_logical_op=yes
28086 gl_cv_warn_c__Wno_logical_op=no
28088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28089 CFLAGS="$gl_save_compiler_FLAGS"
28092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
28093 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
28094 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes; then :
28095 as_fn_append WARN_CFLAGS " -Wno-logical-op"
28101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
28102 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
28103 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
28104 printf %s "(cached) " >&6
28107 gl_save_compiler_FLAGS="$CFLAGS"
28108 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
28109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28110 /* end confdefs.h. */
28120 if ac_fn_c_try_compile "$LINENO"; then :
28121 gl_cv_warn_c__fdiagnostics_show_option=yes
28123 gl_cv_warn_c__fdiagnostics_show_option=no
28125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28126 CFLAGS="$gl_save_compiler_FLAGS"
28129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
28130 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
28131 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
28132 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
28137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
28138 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
28139 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
28140 printf %s "(cached) " >&6
28143 gl_save_compiler_FLAGS="$CFLAGS"
28144 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
28145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28146 /* end confdefs.h. */
28156 if ac_fn_c_try_compile "$LINENO"; then :
28157 gl_cv_warn_c__funit_at_a_time=yes
28159 gl_cv_warn_c__funit_at_a_time=no
28161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28162 CFLAGS="$gl_save_compiler_FLAGS"
28165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
28166 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
28167 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
28168 as_fn_append WARN_CFLAGS " -funit-at-a-time"
28176 printf "%s\n" "#define lint 1" >>confdefs.h
28180 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
28183 # We use a slightly smaller set of warning options for lib/.
28184 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
28186 nw="$nw -Wstrict-overflow"
28187 nw="$nw -Wuninitialized"
28188 nw="$nw -Wunused-macros"
28189 nw="$nw -Wmissing-prototypes"
28190 nw="$nw -Wold-style-definition"
28193 set x $WARN_CFLAGS; shift
28197 *" $gl_warn_item "*)
28200 gl_warn_set="$gl_warn_set $gl_warn_item"
28204 GNULIB_WARN_CFLAGS=$gl_warn_set
28209 # cc -E produces incorrect asm files on SVR4, so postprocess it.
28210 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
28213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
28214 printf %s "checking for underline in external names... " >&6; }
28215 if ${gzip_cv_underline+:} false; then :
28216 printf %s "(cached) " >&6
28218 gzip_cv_underline=yes
28219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28220 /* end confdefs.h. */
28221 int foo() {return 0;}
28230 if ac_fn_c_try_compile "$LINENO"; then :
28231 $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
28232 gzip_cv_underline=no
28234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
28237 printf "%s\n" "$gzip_cv_underline" >&6; }
28239 if test $gzip_cv_underline = no; then
28240 ASCPPFLAGS='-DNO_UNDERLINE'
28245 # Try to assemble match.S.
28246 # "gcc -E match.s" ignores -E, so we must use _match.S.
28247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
28248 printf %s "checking for an assembler syntax supported by this package... " >&6; }
28249 if ${gzip_cv_assembler+:} false; then :
28250 printf %s "(cached) " >&6
28252 gzip_cv_assembler=no
28256 if cp $srcdir/lib/match.c _match.S &&
28257 eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
28258 eval "$ASCPPPOST < _match.i > match_.s"; then
28259 if test ! -s match_.s || grep error < match_.s > /dev/null; then
28261 elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
28262 test -f match_.$OBJEXT; then
28263 rm -f match_.$OBJEXT
28264 gzip_cv_assembler=yes
28265 if echo 'void foo (void) {}' > conftest.c &&
28266 eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
28267 grep '\.note\.GNU-stack' conftest.s >/dev/null &&
28268 eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
28269 test -f match_.$OBJEXT; then
28270 gzip_cv_assembler='yes, with -Wa,--noexecstack'
28274 rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
28277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
28278 printf "%s\n" "$gzip_cv_assembler" >&6; }
28279 if test "$gzip_cv_assembler" != no; then
28281 printf "%s\n" "#define ASMV /**/" >>confdefs.h
28283 case " $LIBOBJS " in
28284 *" match.$ac_objext "* ) ;;
28285 *) LIBOBJS="$LIBOBJS match.$ac_objext"
28290 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
28291 ASFLAGS_config='-Wa,--noexecstack'
28297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
28298 printf %s "checking for library containing strerror... " >&6; }
28299 if ${ac_cv_search_strerror+:} false; then :
28300 printf %s "(cached) " >&6
28302 ac_func_search_save_LIBS=$LIBS
28303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28304 /* end confdefs.h. */
28306 /* Override any GCC internal prototype to avoid an error.
28307 Use char because int might match the return type of a GCC
28308 builtin and then its argument prototype would still apply. */
28316 return strerror ();
28321 for ac_lib in '' cposix; do
28322 if test -z "$ac_lib"; then
28323 ac_res="none required"
28326 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28328 if ac_fn_c_try_link "$LINENO"; then :
28329 ac_cv_search_strerror=$ac_res
28331 rm -f core conftest.err conftest.$ac_objext \
28333 if ${ac_cv_search_strerror+:} false; then :
28337 if ${ac_cv_search_strerror+:} false; then :
28340 ac_cv_search_strerror=no
28342 rm conftest.$ac_ext
28343 LIBS=$ac_func_search_save_LIBS
28345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
28346 printf "%s\n" "$ac_cv_search_strerror" >&6; }
28347 ac_res=$ac_cv_search_strerror
28348 if test "$ac_res" != no; then :
28349 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
28354 printf %s "checking for an ANSI C-conforming const... " >&6; }
28355 if ${ac_cv_c_const+:} false; then :
28356 printf %s "(cached) " >&6
28358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28359 /* end confdefs.h. */
28365 #ifndef __cplusplus
28366 /* Ultrix mips cc rejects this sort of thing. */
28367 typedef int charset[2];
28368 const charset cs = { 0, 0 };
28369 /* SunOS 4.1.1 cc rejects this. */
28370 char const *const *pcpcc;
28372 /* NEC SVR4.0.2 mips cc rejects this. */
28373 struct point {int x, y;};
28374 static struct point const zero = {0,0};
28375 /* IBM XL C 1.02.0.0 rejects this.
28376 It does not let you subtract one const X* pointer from another in
28377 an arm of an if-expression whose if-part is not a constant
28379 const char *g = "string";
28380 pcpcc = &g + (g ? g-g : 0);
28381 /* HPUX 7.0 cc rejects these. */
28383 ppc = (char**) pcpcc;
28384 pcpcc = (char const *const *) ppc;
28385 { /* SCO 3.2v4 cc rejects this sort of thing. */
28388 char const *s = 0 ? (char *) 0 : (char const *) 0;
28393 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
28394 int x[] = {25, 17};
28395 const int *foo = &x[0];
28398 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
28399 typedef const int *iptr;
28403 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
28404 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
28405 struct s { int j; const int *ap[3]; } bx;
28406 struct s *b = &bx; b->j = 5;
28408 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
28409 const int foo = 10;
28410 if (!foo) return 0;
28412 return !cs[0] && !zero.x;
28419 if ac_fn_c_try_compile "$LINENO"; then :
28424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
28427 printf "%s\n" "$ac_cv_c_const" >&6; }
28428 if test $ac_cv_c_const = no; then
28430 printf "%s\n" "#define const /**/" >>confdefs.h
28434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28435 printf %s "checking for ANSI C header files... " >&6; }
28436 if ${ac_cv_header_stdc+:} false; then :
28437 printf %s "(cached) " >&6
28439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28440 /* end confdefs.h. */
28441 #include <stdlib.h>
28442 #include <stdarg.h>
28443 #include <string.h>
28454 if ac_fn_c_try_compile "$LINENO"; then :
28455 ac_cv_header_stdc=yes
28457 ac_cv_header_stdc=no
28459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28461 if test $ac_cv_header_stdc = yes; then
28462 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28464 /* end confdefs.h. */
28465 #include <string.h>
28468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28469 $EGREP "memchr" >/dev/null 2>&1; then :
28472 ac_cv_header_stdc=no
28478 if test $ac_cv_header_stdc = yes; then
28479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28481 /* end confdefs.h. */
28482 #include <stdlib.h>
28485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28486 $EGREP "free" >/dev/null 2>&1; then :
28489 ac_cv_header_stdc=no
28495 if test $ac_cv_header_stdc = yes; then
28496 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28497 if test "$cross_compiling" = yes; then :
28500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28501 /* end confdefs.h. */
28503 #include <stdlib.h>
28504 #if ((' ' & 0x0FF) == 0x020)
28505 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28506 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28508 # define ISLOWER(c) \
28509 (('a' <= (c) && (c) <= 'i') \
28510 || ('j' <= (c) && (c) <= 'r') \
28511 || ('s' <= (c) && (c) <= 'z'))
28512 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28515 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28520 for (i = 0; i < 256; i++)
28521 if (XOR (islower (i), ISLOWER (i))
28522 || toupper (i) != TOUPPER (i))
28527 if ac_fn_c_try_run "$LINENO"; then :
28530 ac_cv_header_stdc=no
28532 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28533 conftest.$ac_objext conftest.beam conftest.$ac_ext
28538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28539 printf "%s\n" "$ac_cv_header_stdc" >&6; }
28540 if test $ac_cv_header_stdc = yes; then
28542 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
28564 ac_header_dirent=no
28565 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
28566 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
28567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
28568 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
28569 if eval \${$as_ac_Header+:} false; then :
28570 printf %s "(cached) " >&6
28572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28573 /* end confdefs.h. */
28574 #include <sys/types.h>
28586 if ac_fn_c_try_compile "$LINENO"; then :
28587 eval "$as_ac_Header=yes"
28589 eval "$as_ac_Header=no"
28591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28593 eval ac_res=\$$as_ac_Header
28594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28595 printf "%s\n" "$ac_res" >&6; }
28596 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28597 cat >>confdefs.h <<_ACEOF
28598 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
28601 ac_header_dirent=$ac_hdr; break
28605 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
28606 if test $ac_header_dirent = dirent.h; then
28607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28608 printf %s "checking for library containing opendir... " >&6; }
28609 if ${ac_cv_search_opendir+:} false; then :
28610 printf %s "(cached) " >&6
28612 ac_func_search_save_LIBS=$LIBS
28613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28614 /* end confdefs.h. */
28616 /* Override any GCC internal prototype to avoid an error.
28617 Use char because int might match the return type of a GCC
28618 builtin and then its argument prototype would still apply. */
28631 for ac_lib in '' dir; do
28632 if test -z "$ac_lib"; then
28633 ac_res="none required"
28636 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28638 if ac_fn_c_try_link "$LINENO"; then :
28639 ac_cv_search_opendir=$ac_res
28641 rm -f core conftest.err conftest.$ac_objext \
28643 if ${ac_cv_search_opendir+:} false; then :
28647 if ${ac_cv_search_opendir+:} false; then :
28650 ac_cv_search_opendir=no
28652 rm conftest.$ac_ext
28653 LIBS=$ac_func_search_save_LIBS
28655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28656 printf "%s\n" "$ac_cv_search_opendir" >&6; }
28657 ac_res=$ac_cv_search_opendir
28658 if test "$ac_res" != no; then :
28659 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28665 printf %s "checking for library containing opendir... " >&6; }
28666 if ${ac_cv_search_opendir+:} false; then :
28667 printf %s "(cached) " >&6
28669 ac_func_search_save_LIBS=$LIBS
28670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28671 /* end confdefs.h. */
28673 /* Override any GCC internal prototype to avoid an error.
28674 Use char because int might match the return type of a GCC
28675 builtin and then its argument prototype would still apply. */
28688 for ac_lib in '' x; do
28689 if test -z "$ac_lib"; then
28690 ac_res="none required"
28693 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28695 if ac_fn_c_try_link "$LINENO"; then :
28696 ac_cv_search_opendir=$ac_res
28698 rm -f core conftest.err conftest.$ac_objext \
28700 if ${ac_cv_search_opendir+:} false; then :
28704 if ${ac_cv_search_opendir+:} false; then :
28707 ac_cv_search_opendir=no
28709 rm conftest.$ac_ext
28710 LIBS=$ac_func_search_save_LIBS
28712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28713 printf "%s\n" "$ac_cv_search_opendir" >&6; }
28714 ac_res=$ac_cv_search_opendir
28715 if test "$ac_res" != no; then :
28716 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
28723 printf %s "checking return type of signal handlers... " >&6; }
28724 if ${ac_cv_type_signal+:} false; then :
28725 printf %s "(cached) " >&6
28727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28728 /* end confdefs.h. */
28729 #include <sys/types.h>
28730 #include <signal.h>
28735 return *(signal (0, 0)) (0) == 1;
28740 if ac_fn_c_try_compile "$LINENO"; then :
28741 ac_cv_type_signal=int
28743 ac_cv_type_signal=void
28745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
28748 printf "%s\n" "$ac_cv_type_signal" >&6; }
28750 cat >>confdefs.h <<_ACEOF
28751 #define RETSIGTYPE $ac_cv_type_signal
28755 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
28756 if test "x$ac_cv_type_size_t" = xyes; then :
28760 cat >>confdefs.h <<_ACEOF
28761 #define size_t unsigned int
28766 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
28767 if test "x$ac_cv_type_off_t" = xyes; then :
28771 cat >>confdefs.h <<_ACEOF
28772 #define off_t long int
28778 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
28780 cat >confcache <<\_ACEOF
28781 # This file is a shell script that caches the results of configure
28782 # tests run on this system so they can be shared between configure
28783 # scripts and configure runs, see configure's option --config-cache.
28784 # It is not useful on other systems. If it contains results you don't
28785 # want to keep, you may remove or edit it.
28787 # config.status only pays attention to the cache file if you give it
28788 # the --recheck option to rerun configure.
28790 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28791 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28792 # following values.
28796 # The following way of writing the cache mishandles newlines in values,
28797 # but we know of no workaround that is simple, portable, and efficient.
28798 # So, we kill variables containing newlines.
28799 # Ultrix sh set writes to stderr and can't be redirected directly,
28800 # and sets the high bit in the cache file unless we assign to the vars.
28802 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28803 eval ac_val=\$$ac_var
28807 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28808 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28811 _ | IFS | as_nl) ;; #(
28812 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28813 *) { eval $ac_var=; unset $ac_var;} ;;
28819 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28820 *${as_nl}ac_space=\ *)
28821 # `set' does not quote correctly, so add quotes: double-quote
28822 # substitution turns \\\\ into \\, and sed turns \\ into \.
28825 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28828 # `set' quotes correctly as required by POSIX, so do not add quotes.
28829 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28838 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28840 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28842 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28843 if test -w "$cache_file"; then
28844 if test "x$cache_file" != "x/dev/null"; then
28845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28846 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
28847 if test ! -f "$cache_file" || test -h "$cache_file"; then
28848 cat confcache >"$cache_file"
28850 case $cache_file in #(
28852 mv -f confcache "$cache_file"$$ &&
28853 mv -f "$cache_file"$$ "$cache_file" ;; #(
28855 mv -f confcache "$cache_file" ;;
28860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28861 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
28866 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28867 # Let make expand exec_prefix.
28868 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28870 DEFS=-DHAVE_CONFIG_H
28875 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28876 # 1. Remove the extension, and $U if already installed.
28877 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28878 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
28879 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28880 # will be set to the directory where LIBOBJS objects are built.
28881 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28882 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28884 LIBOBJS=$ac_libobjs
28886 LTLIBOBJS=$ac_ltlibobjs
28889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
28890 printf %s "checking that generated files are newer than configure... " >&6; }
28891 if test -n "$am_sleep_pid"; then
28892 # Hide warnings about reused PIDs.
28893 wait $am_sleep_pid 2>/dev/null
28895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
28896 printf "%s\n" "done" >&6; }
28897 if test -n "$EXEEXT"; then
28899 am__EXEEXT_FALSE='#'
28901 am__EXEEXT_TRUE='#'
28905 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
28906 as_fn_error $? "conditional \"AMDEP\" was never defined.
28907 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28909 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
28910 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
28911 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28913 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
28914 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
28915 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28917 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28918 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
28919 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28921 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28922 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28923 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28925 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
28926 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
28927 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28931 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
28932 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
28933 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28935 CONFIG_INCLUDE=lib/config.h
28937 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
28938 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
28939 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28941 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
28942 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
28943 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28945 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
28946 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
28947 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28952 if test -n "$gl_LIBOBJS"; then
28953 # Remove the extension.
28954 sed_drop_objext='s/\.o$//;s/\.obj$//'
28955 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28956 gl_libobjs="$gl_libobjs $i.$ac_objext"
28957 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28960 gl_LIBOBJS=$gl_libobjs
28962 gl_LTLIBOBJS=$gl_ltlibobjs
28968 if test -n "$gltests_LIBOBJS"; then
28969 # Remove the extension.
28970 sed_drop_objext='s/\.o$//;s/\.obj$//'
28971 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28972 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
28973 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
28976 gltests_LIBOBJS=$gltests_libobjs
28978 gltests_LTLIBOBJS=$gltests_ltlibobjs
28982 : "${CONFIG_STATUS=./config.status}"
28984 ac_clean_files_save=$ac_clean_files
28985 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
28987 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
28989 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
28991 # Generated by $as_me.
28992 # Run this file to recreate the current configuration.
28993 # Compiler output produced by configure, useful for debugging
28994 # configure, is in config.log if it exists.
28997 ac_cs_recheck=false
29000 SHELL=\${CONFIG_SHELL-$SHELL}
29003 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29004 ## -------------------- ##
29005 ## M4sh Initialization. ##
29006 ## -------------------- ##
29008 # Be more Bourne compatible
29009 DUALCASE=1; export DUALCASE # for MKS sh
29010 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29013 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29014 # is contrary to our usage. Disable this feature.
29015 alias -g '${1+"$@"}'='"$@"'
29016 setopt NO_GLOB_SUBST
29018 case `(set -o) 2>/dev/null` in #(
29027 # The user is always right.
29028 if test "${PATH_SEPARATOR+set}" != set; then
29030 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29031 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29038 # We need space, tab and new line, in precisely that order. Quoting is
29039 # there to prevent editors from complaining about space-tab.
29040 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29041 # splitting by setting IFS to empty value.)
29047 # Find who we are. Look in the path if we contain no directory separator.
29050 *[\\/]* ) as_myself=$0 ;;
29051 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29052 for as_dir in $PATH
29055 case $as_dir in #(((
29058 *) as_dir=$as_dir/ ;;
29060 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
29066 # We did not find ourselves, most probably we were run as `sh COMMAND'
29067 # in which case we are not to be found in the path.
29068 if test "x$as_myself" = x; then
29071 if test ! -f "$as_myself"; then
29072 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29076 # Unset variables that we do not need and which cause bugs (e.g. in
29077 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29078 # suppresses any "Segmentation fault" message there. '((' could
29079 # trigger a bug in pdksh 5.2.14.
29080 for as_var in BASH_ENV ENV MAIL MAILPATH
29081 do eval test x\${$as_var+set} = xset \
29082 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29095 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29098 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29099 # ----------------------------------------
29100 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29101 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29102 # script with STATUS, using 1 if that was 0.
29105 as_status=$1; test $as_status -eq 0 && as_status=1
29107 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29108 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29110 printf "%s\n" "$as_me: error: $2" >&2
29111 as_fn_exit $as_status
29115 # as_fn_set_status STATUS
29116 # -----------------------
29117 # Set $? to STATUS, without forking.
29118 as_fn_set_status ()
29121 } # as_fn_set_status
29123 # as_fn_exit STATUS
29124 # -----------------
29125 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29129 as_fn_set_status $1
29135 # Portably unset VAR.
29138 { eval $1=; unset $1;}
29140 as_unset=as_fn_unset
29141 # as_fn_append VAR VALUE
29142 # ----------------------
29143 # Append the text in VALUE to the end of the definition contained in VAR. Take
29144 # advantage of any shell optimizations that allow amortized linear growth over
29145 # repeated appends, instead of the typical quadratic growth present in naive
29147 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29148 eval 'as_fn_append ()
29159 # as_fn_arith ARG...
29160 # ------------------
29161 # Perform arithmetic evaluation on the ARGs, and store the result in the
29162 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29163 # must be portable across $(()) and expr.
29164 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29165 eval 'as_fn_arith ()
29172 as_val=`expr "$@" || test $? -eq 1`
29177 if expr a : '\(a\)' >/dev/null 2>&1 &&
29178 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29184 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29185 as_basename=basename
29190 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29196 as_me=`$as_basename -- "$0" ||
29197 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29198 X"$0" : 'X\(//\)$' \| \
29199 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29200 printf "%s\n" X/"$0" |
29201 sed '/^.*\/\([^/][^/]*\)\/*$/{
29215 # Avoid depending upon Character Ranges.
29216 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29217 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29218 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29219 as_cr_digits='0123456789'
29220 as_cr_alnum=$as_cr_Letters$as_cr_digits
29222 ECHO_C= ECHO_N= ECHO_T=
29223 case `echo -n x` in #(((((
29225 case `echo 'xy\c'` in
29226 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29228 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29235 rm -f conf$$ conf$$.exe conf$$.file
29236 if test -d conf$$.dir; then
29237 rm -f conf$$.dir/conf$$.file
29240 mkdir conf$$.dir 2>/dev/null
29242 if (echo >conf$$.file) 2>/dev/null; then
29243 if ln -s conf$$.file conf$$ 2>/dev/null; then
29245 # ... but there are two gotchas:
29246 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29247 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29248 # In both cases, we have to default to `cp -pR'.
29249 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29251 elif ln conf$$.file conf$$ 2>/dev/null; then
29259 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29260 rmdir conf$$.dir 2>/dev/null
29265 # Create "$as_dir" as a directory, including parents if necessary.
29270 -*) as_dir=./$as_dir;;
29272 test -d "$as_dir" || eval $as_mkdir_p || {
29276 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29277 *) as_qdir=$as_dir;;
29279 as_dirs="'$as_qdir' $as_dirs"
29280 as_dir=`$as_dirname -- "$as_dir" ||
29281 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29282 X"$as_dir" : 'X\(//\)[^/]' \| \
29283 X"$as_dir" : 'X\(//\)$' \| \
29284 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29285 printf "%s\n" X"$as_dir" |
29286 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29290 /^X\(\/\/\)[^/].*/{
29303 test -d "$as_dir" && break
29305 test -z "$as_dirs" || eval "mkdir $as_dirs"
29306 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29310 if mkdir -p . 2>/dev/null; then
29311 as_mkdir_p='mkdir -p "$as_dir"'
29313 test -d ./-p && rmdir ./-p
29318 # as_fn_executable_p FILE
29319 # -----------------------
29320 # Test if FILE is an executable regular file.
29321 as_fn_executable_p ()
29323 test -f "$1" && test -x "$1"
29324 } # as_fn_executable_p
29325 as_test_x='test -x'
29326 as_executable_p=as_fn_executable_p
29328 # Sed expression to map a string onto a valid CPP name.
29329 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29331 # Sed expression to map a string onto a valid variable name.
29332 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29336 ## ----------------------------------- ##
29337 ## Main body of $CONFIG_STATUS script. ##
29338 ## ----------------------------------- ##
29340 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29342 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29343 # Save the log message, to keep $0 and so on meaningful, and to
29344 # report actual input values of CONFIG_FILES etc. instead of their
29345 # values after options handling.
29347 This file was extended by gzip $as_me 1.6, which was
29348 generated by GNU Autoconf 2.69.97-b1aba91. Invocation command line was
29350 CONFIG_FILES = $CONFIG_FILES
29351 CONFIG_HEADERS = $CONFIG_HEADERS
29352 CONFIG_LINKS = $CONFIG_LINKS
29353 CONFIG_COMMANDS = $CONFIG_COMMANDS
29356 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29361 case $ac_config_files in *"
29362 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29365 case $ac_config_headers in *"
29366 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29370 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29371 # Files that config.status was made for.
29372 config_files="$ac_config_files"
29373 config_headers="$ac_config_headers"
29374 config_links="$ac_config_links"
29375 config_commands="$ac_config_commands"
29379 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29381 \`$as_me' instantiates files and other configuration actions
29382 from templates according to the current configuration. Unless the files
29383 and actions are specified as TAGs, all are instantiated by default.
29385 Usage: $0 [OPTION]... [TAG]...
29387 -h, --help print this help, then exit
29388 -V, --version print version number and configuration settings, then exit
29389 --config print configuration, then exit
29390 -q, --quiet, --silent
29391 do not print progress messages
29392 -d, --debug don't remove temporary files
29393 --recheck update $as_me by reconfiguring in the same conditions
29394 --file=FILE[:TEMPLATE]
29395 instantiate the configuration file FILE
29396 --header=FILE[:TEMPLATE]
29397 instantiate the configuration header FILE
29399 Configuration files:
29402 Configuration headers:
29405 Configuration links:
29408 Configuration commands:
29411 Report bugs to <bug-gzip@gnu.org>."
29414 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29415 ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29417 gzip config.status 1.6
29418 configured by $0, generated by GNU Autoconf 2.69.97-b1aba91,
29419 with options \\"\$ac_cs_config\\"
29421 Copyright (C) 2013 Free Software Foundation, Inc.
29422 This config.status script is free software; the Free Software Foundation
29423 gives unlimited permission to copy, distribute and modify it."
29430 test -n "\$AWK" || AWK=awk
29433 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29434 # The default lists apply if the user does not specify any file.
29440 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29441 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29445 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29457 # Handling of the options.
29458 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29460 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29461 printf "%s\n" "$ac_cs_version"; exit ;;
29462 --config | --confi | --conf | --con | --co | --c )
29463 printf "%s\n" "$ac_cs_config"; exit ;;
29464 --debug | --debu | --deb | --de | --d | -d )
29466 --file | --fil | --fi | --f )
29469 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29470 '') as_fn_error $? "missing file argument" ;;
29472 as_fn_append CONFIG_FILES " '$ac_optarg'"
29473 ac_need_defaults=false;;
29474 --header | --heade | --head | --hea )
29477 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29479 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29480 ac_need_defaults=false;;
29482 # Conflict between --help and --header
29483 as_fn_error $? "ambiguous option: \`$1'
29484 Try \`$0 --help' for more information.";;
29485 --help | --hel | -h )
29486 printf "%s\n" "$ac_cs_usage"; exit ;;
29487 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29488 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29491 # This is an error.
29492 -*) as_fn_error $? "unrecognized option: \`$1'
29493 Try \`$0 --help' for more information." ;;
29495 *) as_fn_append ac_config_targets " $1"
29496 ac_need_defaults=false ;;
29502 ac_configure_extra_args=
29504 if $ac_cs_silent; then
29506 ac_configure_extra_args="$ac_configure_extra_args --silent"
29510 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29511 if \$ac_cs_recheck; then
29512 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29514 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
29515 CONFIG_SHELL='$SHELL'
29516 export CONFIG_SHELL
29521 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29525 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29526 ## Running $as_me. ##
29528 printf "%s\n" "$ac_log"
29532 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29536 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29537 GNUmakefile=$GNUmakefile
29541 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29543 # Handling of arguments.
29544 for ac_config_target in $ac_config_targets
29546 case $ac_config_target in
29547 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
29548 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29549 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
29550 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29551 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
29552 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29553 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
29555 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29560 # If the user did not use the arguments to specify the items to instantiate,
29561 # then the envvar interface is used. Set only those that are not.
29562 # We use the long form for the default assignment because of an extremely
29563 # bizarre bug on SunOS 4.1.3.
29564 if $ac_need_defaults; then
29565 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29566 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29567 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
29568 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29571 # Have a temporary directory for convenience. Make it in the build tree
29572 # simply because there is no reason against having it here, and in addition,
29573 # creating and moving files from /tmp can sometimes cause problems.
29574 # Hook for its removal unless debugging.
29575 # Note that there is a small window in which the directory will not be cleaned:
29576 # after its creation but before its name has been assigned to `$tmp'.
29580 trap 'exit_status=$?
29581 : "${ac_tmp:=$tmp}"
29582 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29584 trap 'as_fn_exit 1' 1 2 13 15
29586 # Create a (secure) tmp directory for tmp files.
29589 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29593 tmp=./conf$$-$RANDOM
29594 (umask 077 && mkdir "$tmp")
29595 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29598 # Set up the scripts for CONFIG_FILES section.
29599 # No need to generate them if there are no CONFIG_FILES.
29600 # This happens for instance with `./config.status config.h'.
29601 if test -n "$CONFIG_FILES"; then
29604 ac_cr=`echo X | tr X '\015'`
29605 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29606 # But we know of no other shell where ac_cr would be empty at this
29607 # point, so we can use a bashism as a fallback.
29608 if test "x$ac_cr" = x; then
29609 eval ac_cr=\$\'\\r\'
29611 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29612 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29615 ac_cs_awk_cr=$ac_cr
29618 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29623 echo "cat >conf$$subs.awk <<_ACEOF" &&
29624 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29626 } >conf$$subs.sh ||
29627 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29628 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29630 for ac_last_try in false false false false false :; do
29631 . ./conf$$subs.sh ||
29632 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29634 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29635 if test $ac_delim_n = $ac_delim_num; then
29637 elif $ac_last_try; then
29638 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29640 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29643 rm -f conf$$subs.sh
29645 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29646 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29650 s/^/S["/; s/!.*/"]=/
29660 s/\(.\{148\}\)..*/\1/
29662 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29667 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29674 s/\(.\{148\}\)..*/\1/
29676 s/["\\]/\\&/g; s/^/"/; s/$/"/
29680 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29685 ' <conf$$subs.awk | sed '
29690 ' >>$CONFIG_STATUS || ac_write_fail=1
29691 rm -f conf$$subs.awk
29692 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29694 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29695 for (key in S) S_is_set[key] = 1
29701 nfields = split(line, field, "@")
29703 len = length(field[1])
29704 for (i = 2; i < nfields; i++) {
29706 keylen = length(key)
29707 if (S_is_set[key]) {
29709 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29710 len += length(value) + length(field[++i])
29721 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29722 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29723 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29726 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29727 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29730 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29731 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29732 # trailing colons and then remove the whole line if VPATH becomes empty
29733 # (actually we leave an empty line to preserve line numbers).
29734 if test "x$srcdir" = x.; then
29735 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
29753 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29754 fi # test -n "$CONFIG_FILES"
29756 # Set up the scripts for CONFIG_HEADERS section.
29757 # No need to generate them if there are no CONFIG_HEADERS.
29758 # This happens for instance with `./config.status Makefile'.
29759 if test -n "$CONFIG_HEADERS"; then
29760 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
29764 # Transform confdefs.h into an awk script `defines.awk', embedded as
29765 # here-document in config.status, that substitutes the proper values into
29766 # config.h.in to produce config.h.
29768 # Create a delimiter string that does not exist in confdefs.h, to ease
29769 # handling of long lines.
29771 for ac_last_try in false false :; do
29772 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
29773 if test -z "$ac_tt"; then
29775 elif $ac_last_try; then
29776 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
29778 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29782 # For the awk script, D is an array of macro values keyed by name,
29783 # likewise P contains macro parameters if any. Preserve backslash
29784 # newline sequences.
29786 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29788 s/.\{148\}/&'"$ac_delim"'/g
29791 s/^[ ]*#[ ]*define[ ][ ]*/ /
29798 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29800 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29804 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29805 D["\1"]=" \3\\\\\\n"\\/p
29807 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29812 s/.\{148\}/&'"$ac_delim"'/g
29817 s/["\\]/\\&/g; s/^/"/; s/$/"/p
29820 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29822 ' <confdefs.h | sed '
29823 s/'"$ac_delim"'/"\\\
29824 "/g' >>$CONFIG_STATUS || ac_write_fail=1
29826 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29827 for (key in D) D_is_set[key] = 1
29830 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29832 split(line, arg, " ")
29833 if (arg[1] == "#") {
29837 defundef = substr(arg[1], 2)
29840 split(mac1, mac2, "(") #)
29842 prefix = substr(line, 1, index(line, defundef) - 1)
29843 if (D_is_set[macro]) {
29844 # Preserve the white space surrounding the "#".
29845 print prefix "define", macro P[macro] D[macro]
29848 # Replace #undef with comments. This is necessary, for example,
29849 # in the case of _POSIX_SOURCE, which is predefined and required
29850 # on some systems where configure will not decide to define it.
29851 if (defundef == "undef") {
29852 print "/*", prefix defundef, macro, "*/"
29860 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29861 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
29862 fi # test -n "$CONFIG_HEADERS"
29865 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
29870 :[FHLC]) ac_mode=$ac_tag; continue;;
29872 case $ac_mode$ac_tag in
29874 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
29875 :[FH]-) ac_tag=-:-;;
29876 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29893 -) ac_f="$ac_tmp/stdin";;
29894 *) # Look for the file first in the build tree, then in the source tree
29895 # (if the path is not absolute). The absolute path cannot be DOS-style,
29896 # because $ac_f cannot contain `:'.
29900 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29902 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
29904 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29905 as_fn_append ac_file_inputs " '$ac_f'"
29908 # Let's still pretend it is `configure' which instantiates (i.e., don't
29909 # use $as_me), people would be surprised to read:
29910 # /* config.h. Generated by config.status. */
29911 configure_input='Generated from '`
29912 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29914 if test x"$ac_file" != x-; then
29915 configure_input="$ac_file. $configure_input"
29916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29917 printf "%s\n" "$as_me: creating $ac_file" >&6;}
29919 # Neutralize special characters interpreted by sed in replacement strings.
29920 case $configure_input in #(
29921 *\&* | *\|* | *\\* )
29922 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
29923 sed 's/[\\\\&|]/\\\\&/g'`;; #(
29924 *) ac_sed_conf_input=$configure_input;;
29928 *:-:* | *:-) cat >"$ac_tmp/stdin" \
29929 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
29934 ac_dir=`$as_dirname -- "$ac_file" ||
29935 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29936 X"$ac_file" : 'X\(//\)[^/]' \| \
29937 X"$ac_file" : 'X\(//\)$' \| \
29938 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29939 printf "%s\n" X"$ac_file" |
29940 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29944 /^X\(\/\/\)[^/].*/{
29957 as_dir="$ac_dir"; as_fn_mkdir_p
29961 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29963 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
29964 # A ".." for each directory in $ac_dir_suffix.
29965 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29966 case $ac_top_builddir_sub in
29967 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29968 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29971 ac_abs_top_builddir=$ac_pwd
29972 ac_abs_builddir=$ac_pwd$ac_dir_suffix
29973 # for backward compatibility:
29974 ac_top_builddir=$ac_top_build_prefix
29977 .) # We are building in place.
29979 ac_top_srcdir=$ac_top_builddir_sub
29980 ac_abs_top_srcdir=$ac_pwd ;;
29981 [\\/]* | ?:[\\/]* ) # Absolute name.
29982 ac_srcdir=$srcdir$ac_dir_suffix;
29983 ac_top_srcdir=$srcdir
29984 ac_abs_top_srcdir=$srcdir ;;
29985 *) # Relative name.
29986 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29987 ac_top_srcdir=$ac_top_build_prefix$srcdir
29988 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29990 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30000 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30001 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30003 ac_MKDIR_P=$MKDIR_P
30005 [\\/$]* | ?:[\\/]* ) ;;
30006 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30010 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30011 # If the template does not know about datarootdir, expand it.
30012 # FIXME: This hack should be removed a few years after 2.60.
30013 ac_datarootdir_hack=; ac_datarootdir_seen=
30024 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30025 *datarootdir*) ac_datarootdir_seen=yes;;
30026 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30028 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30030 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30031 ac_datarootdir_hack='
30032 s&@datadir@&$datadir&g
30033 s&@docdir@&$docdir&g
30034 s&@infodir@&$infodir&g
30035 s&@localedir@&$localedir&g
30036 s&@mandir@&$mandir&g
30037 s&\\\${datarootdir}&$datarootdir&g' ;;
30041 # Neutralize VPATH when `$srcdir' = `.'.
30042 # Shell code in configure.ac might set extrasub.
30043 # FIXME: do we really want to maintain this feature?
30044 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30045 ac_sed_extra="$ac_vpsub
30048 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30050 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30051 s|@configure_input@|$ac_sed_conf_input|;t t
30052 s&@top_builddir@&$ac_top_builddir_sub&;t t
30053 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30054 s&@srcdir@&$ac_srcdir&;t t
30055 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30056 s&@top_srcdir@&$ac_top_srcdir&;t t
30057 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30058 s&@builddir@&$ac_builddir&;t t
30059 s&@abs_builddir@&$ac_abs_builddir&;t t
30060 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30061 s&@INSTALL@&$ac_INSTALL&;t t
30062 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30063 $ac_datarootdir_hack
30065 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30066 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30068 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30069 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30070 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
30071 "$ac_tmp/out"`; test -z "$ac_out"; } &&
30072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30073 which seems to be undefined. Please make sure it is defined" >&5
30074 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30075 which seems to be undefined. Please make sure it is defined" >&2;}
30077 rm -f "$ac_tmp/stdin"
30079 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30080 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30082 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30088 if test x"$ac_file" != x-; then
30090 printf "%s\n" "/* $configure_input */" \
30091 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30092 } >"$ac_tmp/config.h" \
30093 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30094 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30096 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
30099 mv "$ac_tmp/config.h" "$ac_file" \
30100 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30103 printf "%s\n" "/* $configure_input */" \
30104 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30105 || as_fn_error $? "could not create -" "$LINENO" 5
30107 # Compute "$ac_file"'s index in $config_headers.
30110 for _am_header in $config_headers :; do
30111 case $_am_header in
30112 $_am_arg | $_am_arg:* )
30115 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30118 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30119 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30120 X"$_am_arg" : 'X\(//\)[^/]' \| \
30121 X"$_am_arg" : 'X\(//\)$' \| \
30122 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30123 printf "%s\n" X"$_am_arg" |
30124 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30128 /^X\(\/\/\)[^/].*/{
30140 s/.*/./; q'`/stamp-h$_am_stamp_count
30147 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
30150 # Prefer the file from the source tree if names are identical.
30151 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
30152 ac_source=$srcdir/$ac_source
30155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
30156 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
30158 if test ! -r "$ac_source"; then
30159 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
30163 # Try a relative symlink, then a hard link, then a copy.
30165 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
30166 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
30168 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
30169 ln "$ac_source" "$ac_file" 2>/dev/null ||
30170 cp -p "$ac_source" "$ac_file" ||
30171 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
30174 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30175 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
30180 case $ac_file$ac_mode in
30181 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30182 # Older Autoconf quotes --file arguments for eval, but not when files
30183 # are listed without --file. Let's play safe and only enable the eval
30184 # if we detect the quoting.
30185 case $CONFIG_FILES in
30186 *\'*) eval set x "$CONFIG_FILES" ;;
30187 *) set x $CONFIG_FILES ;;
30192 # Strip MF so we end up with the name of the file.
30193 mf=`echo "$mf" | sed -e 's/:.*$//'`
30194 # Check whether this is an Automake generated Makefile or not.
30195 # We used to match only the files named 'Makefile.in', but
30196 # some people rename them; so instead we look at the file content.
30197 # Grep'ing the first line is not enough: some people post-process
30198 # each Makefile.in and add a new line on top of each file to say so.
30199 # Grep'ing the whole file is not good either: AIX grep has a line
30200 # limit of 2048, but all sed's we know have understand at least 4000.
30201 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30202 dirpart=`$as_dirname -- "$mf" ||
30203 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30204 X"$mf" : 'X\(//\)[^/]' \| \
30205 X"$mf" : 'X\(//\)$' \| \
30206 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30207 printf "%s\n" X"$mf" |
30208 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30212 /^X\(\/\/\)[^/].*/{
30228 # Extract the definition of DEPDIR, am__include, and am__quote
30229 # from the Makefile without running 'make'.
30230 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30231 test -z "$DEPDIR" && continue
30232 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30233 test -z "$am__include" && continue
30234 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30235 # Find all dependency output files, they are included files with
30236 # $(DEPDIR) in their names. We invoke sed twice because it is the
30237 # simplest approach to changing $(DEPDIR) to its actual value in the
30239 for file in `sed -n "
30240 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30241 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
30242 # Make sure the directory exists.
30243 test -f "$dirpart/$file" && continue
30244 fdir=`$as_dirname -- "$file" ||
30245 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30246 X"$file" : 'X\(//\)[^/]' \| \
30247 X"$file" : 'X\(//\)$' \| \
30248 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30249 printf "%s\n" X"$file" |
30250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30254 /^X\(\/\/\)[^/].*/{
30267 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30268 # echo "creating $dirpart/$file"
30269 echo '# dummy' > "$dirpart/$file"
30281 ac_clean_files=$ac_clean_files_save
30283 test $ac_write_fail = 0 ||
30284 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30287 # configure is writing to config.log, and then calls config.status.
30288 # config.status does its own redirection, appending to config.log.
30289 # Unfortunately, on DOS this fails, as config.log is still kept open
30290 # by configure, so config.status won't be able to write to it; its
30291 # output is simply discarded. So we exec the FD to /dev/null,
30292 # effectively closing config.log, so it can be properly (re)opened and
30293 # appended to by config.status. When coming back to configure, we
30294 # need to make the FD available again.
30295 if test "$no_create" != yes; then
30297 ac_config_status_args=
30298 test "$silent" = yes &&
30299 ac_config_status_args="$ac_config_status_args --quiet"
30301 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30303 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30304 # would make configure fail if this is the last instruction.
30305 $ac_cs_success || as_fn_exit 1
30307 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30309 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}