2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.4-560f for gzip 1.5.
5 # Report bugs to <bug-gzip@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2012 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 #(
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 as_echo_n='sh -c $as_echo_n_body as_echo'
71 as_echo='sh -c $as_echo_body as_echo'
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
91 # Find who we are. Look in the path if we contain no directory separator.
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
111 if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there. '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137 # Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149 *v*x* | *x*v* ) as_opts=-vx ;;
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 case \`(set -o) 2>/dev/null\` in #(
179 as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193 exitcode=1; echo positional parameters were not saved.
195 test x\$exitcode = x0 || exit 1
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 test -z "$as_dir" && as_dir=.
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
240 if test "x$CONFIG_SHELL" != x; then :
242 # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250 *v*x* | *x*v* ) as_opts=-vx ;;
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-gzip@gnu.org
270 $0: about your system, including any error possibly output
271 $0: before this message. Then install a modern shell, or
272 $0: manually run the script under such a shell if you do
279 SHELL=${CONFIG_SHELL-/bin/sh}
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
290 # Portably unset VAR.
293 { eval $1=; unset $1;}
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317 # Create "$as_dir" as a directory, including parents if necessary.
322 -*) as_dir=./$as_dir;;
324 test -d "$as_dir" || eval $as_mkdir_p || {
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
355 test -d "$as_dir" && break
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
368 test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
401 as_val=`expr "$@" || test $? -eq 1`
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
413 as_status=$1; test $as_status -eq 0 && as_status=1
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
418 $as_echo "$as_me: error: $2" >&2
419 as_fn_exit $as_status
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
446 sed '/^.*\/\([^/][^/]*\)\/*$/{
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
488 chmod +x "$as_me.lineno" ||
489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
497 # original and so on. Autoconf is especially sensitive to this).
499 # Exit status is that of the last command.
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
506 case `echo 'xy\c'` in
507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
521 mkdir conf$$.dir 2>/dev/null
523 if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529 # In both cases, we have to default to `cp -pR'.
530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
532 elif ln conf$$.file conf$$ 2>/dev/null; then
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
543 if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
546 test -d ./-p && rmdir ./-p
551 as_executable_p=as_fn_executable_p
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560 test -n "$DJDIR" || exec 7<&0 </dev/null
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 ac_default_prefix=/usr/local
573 ac_config_libobj_dir=.
580 # Identity of this package.
582 PACKAGE_TARNAME='gzip'
583 PACKAGE_VERSION='1.5'
584 PACKAGE_STRING='gzip 1.5'
585 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
588 ac_unique_file="gzip.c"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
602 # ifdef HAVE_STDLIB_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
625 gl_use_threads_default=
628 gl_getopt_required=POSIX
629 gl_getopt_required=POSIX
630 ac_subst_vars='gltests_LTLIBOBJS
651 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
664 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
667 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
669 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
670 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
671 TIME_H_DEFINES_STRUCT_TIMESPEC
672 NEXT_AS_FIRST_DIRECTIVE_TIME_H
681 HAVE_DECL_LOCALTIME_R
687 NEXT_AS_FIRST_DIRECTIVE_STRING_H
689 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
691 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
693 GL_GENERATE_STDINT_H_FALSE
694 GL_GENERATE_STDINT_H_TRUE
703 HAVE_SIGNED_SIG_ATOMIC_T
706 BITSIZEOF_SIG_ATOMIC_T
712 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
717 HAVE_UNSIGNED_LONG_LONG_INT
719 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
721 GL_GENERATE_STDDEF_H_FALSE
722 GL_GENERATE_STDDEF_H_TRUE
727 GL_GENERATE_STDBOOL_H_FALSE
728 GL_GENERATE_STDBOOL_H_TRUE
898 NEXT_AS_FIRST_DIRECTIVE_MATH_H
907 LOCALCHARSET_TESTS_ENVIRONMENT
909 IGNORE_UNUSED_LIBRARIES_CFLAGS
912 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
914 REPLACE_STRUCT_TIMEVAL
922 GNULIB_GL_UNISTD_H_GETOPT
925 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
927 WINDOWS_64_BIT_ST_SIZE
928 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
964 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
970 REPLACE_SIGNBIT_USING_GCC
1039 HAVE_DECL_REMAINDERL
1221 APPLE_UNIVERSAL_BUILD
1222 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1224 GL_GENERATE_FLOAT_H_FALSE
1225 GL_GENERATE_FLOAT_H_TRUE
1227 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1229 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1247 REPLACE_STDIO_WRITE_FUNCS
1248 REPLACE_STDIO_READ_FUNCS
1257 REPLACE_OBSTACK_PRINTF
1282 HAVE_DECL_OBSTACK_PRINTF
1288 GNULIB_VSPRINTF_POSIX
1290 GNULIB_VPRINTF_POSIX
1292 GNULIB_VFPRINTF_POSIX
1299 GNULIB_STDIO_H_SIGPIPE
1300 GNULIB_STDIO_H_NONBLOCKING
1301 GNULIB_SPRINTF_POSIX
1315 GNULIB_OBSTACK_PRINTF_POSIX
1316 GNULIB_OBSTACK_PRINTF
1332 GNULIB_FPRINTF_POSIX
1347 GL_GENERATE_ERRNO_H_FALSE
1348 GL_GENERATE_ERRNO_H_TRUE
1350 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1353 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1356 PRAGMA_SYSTEM_HEADER
1357 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1383 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1385 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1386 UNISTD_H_HAVE_WINSOCK2_H
1407 REPLACE_GETDOMAINNAME
1418 HAVE_DECL_SETHOSTNAME
1419 HAVE_DECL_GETUSERSHELL
1420 HAVE_DECL_GETPAGESIZE
1421 HAVE_DECL_GETLOGIN_R
1422 HAVE_DECL_GETDOMAINNAME
1461 GNULIB_UNISTD_H_SIGPIPE
1462 GNULIB_UNISTD_H_NONBLOCKING
1488 GNULIB_GETDTABLESIZE
1489 GNULIB_GETDOMAINNAME
1517 REPLACE_CANONICALIZE_FILE_NAME
1522 HAVE_STRUCT_RANDOM_DATA
1543 HAVE_DECL_GETLOADAVG
1544 HAVE_CANONICALIZE_FILE_NAME
1557 GNULIB_REALLOC_POSIX
1574 GNULIB_CANONICALIZE_FILE_NAME
1578 GL_GENERATE_ALLOCA_H_FALSE
1579 GL_GENERATE_ALLOCA_H_TRUE
1582 GL_COND_LIBTOOL_FALSE
1583 GL_COND_LIBTOOL_TRUE
1618 AM_DEFAULT_VERBOSITY
1628 INSTALL_STRIP_PROGRAM
1670 program_transform_name
1683 enable_option_checking
1685 enable_dependency_tracking
1693 ac_precious_vars='build_alias
1704 # Initialize some variables set by options.
1706 ac_init_version=false
1707 ac_unrecognized_opts=
1708 ac_unrecognized_sep=
1709 # The variables have the same names as the options, with
1710 # dashes changed to underlines.
1711 cache_file=/dev/null
1718 program_transform_name=s,x,x,
1726 # Installation directory options.
1727 # These are left unexpanded so users can "make install exec_prefix=/foo"
1728 # and all the variables that are supposed to be based on exec_prefix
1729 # by default will actually change.
1730 # Use braces instead of parens because sh, perl, etc. also accept them.
1731 # (The list follows the same order as the GNU Coding Standards.)
1732 bindir='${exec_prefix}/bin'
1733 sbindir='${exec_prefix}/sbin'
1734 libexecdir='${exec_prefix}/libexec'
1735 datarootdir='${prefix}/share'
1736 datadir='${datarootdir}'
1737 sysconfdir='${prefix}/etc'
1738 sharedstatedir='${prefix}/com'
1739 localstatedir='${prefix}/var'
1740 includedir='${prefix}/include'
1741 oldincludedir='/usr/include'
1742 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1743 infodir='${datarootdir}/info'
1748 libdir='${exec_prefix}/lib'
1749 localedir='${datarootdir}/locale'
1750 mandir='${datarootdir}/man'
1756 # If the previous option needs an argument, assign it.
1757 if test -n "$ac_prev"; then
1758 eval $ac_prev=\$ac_option
1764 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1769 # Accept the important Cygnus configure options, so we can diagnose typos.
1771 case $ac_dashdash$ac_option in
1775 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1777 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1778 bindir=$ac_optarg ;;
1780 -build | --build | --buil | --bui | --bu)
1781 ac_prev=build_alias ;;
1782 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1783 build_alias=$ac_optarg ;;
1785 -cache-file | --cache-file | --cache-fil | --cache-fi \
1786 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1787 ac_prev=cache_file ;;
1788 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1789 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1790 cache_file=$ac_optarg ;;
1792 --config-cache | -C)
1793 cache_file=config.cache ;;
1795 -datadir | --datadir | --datadi | --datad)
1797 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1798 datadir=$ac_optarg ;;
1800 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1801 | --dataroo | --dataro | --datar)
1802 ac_prev=datarootdir ;;
1803 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1804 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1805 datarootdir=$ac_optarg ;;
1807 -disable-* | --disable-*)
1808 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1809 # Reject names that are not valid shell variable names.
1810 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1811 as_fn_error $? "invalid feature name: $ac_useropt"
1812 ac_useropt_orig=$ac_useropt
1813 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1814 case $ac_user_opts in
1816 "enable_$ac_useropt"
1818 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1819 ac_unrecognized_sep=', ';;
1821 eval enable_$ac_useropt=no ;;
1823 -docdir | --docdir | --docdi | --doc | --do)
1825 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1826 docdir=$ac_optarg ;;
1828 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1830 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1831 dvidir=$ac_optarg ;;
1833 -enable-* | --enable-*)
1834 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1835 # Reject names that are not valid shell variable names.
1836 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1837 as_fn_error $? "invalid feature name: $ac_useropt"
1838 ac_useropt_orig=$ac_useropt
1839 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1840 case $ac_user_opts in
1842 "enable_$ac_useropt"
1844 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1845 ac_unrecognized_sep=', ';;
1847 eval enable_$ac_useropt=\$ac_optarg ;;
1849 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1850 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1851 | --exec | --exe | --ex)
1852 ac_prev=exec_prefix ;;
1853 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1854 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1855 | --exec=* | --exe=* | --ex=*)
1856 exec_prefix=$ac_optarg ;;
1858 -gas | --gas | --ga | --g)
1859 # Obsolete; use --with-gas.
1862 -help | --help | --hel | --he | -h)
1863 ac_init_help=long ;;
1864 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1865 ac_init_help=recursive ;;
1866 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1867 ac_init_help=short ;;
1869 -host | --host | --hos | --ho)
1870 ac_prev=host_alias ;;
1871 -host=* | --host=* | --hos=* | --ho=*)
1872 host_alias=$ac_optarg ;;
1874 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1876 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1878 htmldir=$ac_optarg ;;
1880 -includedir | --includedir | --includedi | --included | --include \
1881 | --includ | --inclu | --incl | --inc)
1882 ac_prev=includedir ;;
1883 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1884 | --includ=* | --inclu=* | --incl=* | --inc=*)
1885 includedir=$ac_optarg ;;
1887 -infodir | --infodir | --infodi | --infod | --info | --inf)
1889 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1890 infodir=$ac_optarg ;;
1892 -libdir | --libdir | --libdi | --libd)
1894 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1895 libdir=$ac_optarg ;;
1897 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1898 | --libexe | --libex | --libe)
1899 ac_prev=libexecdir ;;
1900 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1901 | --libexe=* | --libex=* | --libe=*)
1902 libexecdir=$ac_optarg ;;
1904 -localedir | --localedir | --localedi | --localed | --locale)
1905 ac_prev=localedir ;;
1906 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1907 localedir=$ac_optarg ;;
1909 -localstatedir | --localstatedir | --localstatedi | --localstated \
1910 | --localstate | --localstat | --localsta | --localst | --locals)
1911 ac_prev=localstatedir ;;
1912 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1913 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1914 localstatedir=$ac_optarg ;;
1916 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1918 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1919 mandir=$ac_optarg ;;
1921 -nfp | --nfp | --nf)
1922 # Obsolete; use --without-fp.
1925 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1926 | --no-cr | --no-c | -n)
1929 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1930 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1933 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1934 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1935 | --oldin | --oldi | --old | --ol | --o)
1936 ac_prev=oldincludedir ;;
1937 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1938 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1939 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1940 oldincludedir=$ac_optarg ;;
1942 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1944 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1945 prefix=$ac_optarg ;;
1947 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1948 | --program-pre | --program-pr | --program-p)
1949 ac_prev=program_prefix ;;
1950 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1951 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1952 program_prefix=$ac_optarg ;;
1954 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1955 | --program-suf | --program-su | --program-s)
1956 ac_prev=program_suffix ;;
1957 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1958 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1959 program_suffix=$ac_optarg ;;
1961 -program-transform-name | --program-transform-name \
1962 | --program-transform-nam | --program-transform-na \
1963 | --program-transform-n | --program-transform- \
1964 | --program-transform | --program-transfor \
1965 | --program-transfo | --program-transf \
1966 | --program-trans | --program-tran \
1967 | --progr-tra | --program-tr | --program-t)
1968 ac_prev=program_transform_name ;;
1969 -program-transform-name=* | --program-transform-name=* \
1970 | --program-transform-nam=* | --program-transform-na=* \
1971 | --program-transform-n=* | --program-transform-=* \
1972 | --program-transform=* | --program-transfor=* \
1973 | --program-transfo=* | --program-transf=* \
1974 | --program-trans=* | --program-tran=* \
1975 | --progr-tra=* | --program-tr=* | --program-t=*)
1976 program_transform_name=$ac_optarg ;;
1978 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1980 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1981 pdfdir=$ac_optarg ;;
1983 -psdir | --psdir | --psdi | --psd | --ps)
1985 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1988 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1989 | -silent | --silent | --silen | --sile | --sil)
1992 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1994 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1996 sbindir=$ac_optarg ;;
1998 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1999 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2000 | --sharedst | --shareds | --shared | --share | --shar \
2002 ac_prev=sharedstatedir ;;
2003 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2004 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2005 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2007 sharedstatedir=$ac_optarg ;;
2009 -site | --site | --sit)
2011 -site=* | --site=* | --sit=*)
2014 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2016 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2017 srcdir=$ac_optarg ;;
2019 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2020 | --syscon | --sysco | --sysc | --sys | --sy)
2021 ac_prev=sysconfdir ;;
2022 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2023 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2024 sysconfdir=$ac_optarg ;;
2026 -target | --target | --targe | --targ | --tar | --ta | --t)
2027 ac_prev=target_alias ;;
2028 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2029 target_alias=$ac_optarg ;;
2031 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2034 -version | --version | --versio | --versi | --vers | -V)
2035 ac_init_version=: ;;
2038 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2039 # Reject names that are not valid shell variable names.
2040 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2041 as_fn_error $? "invalid package name: $ac_useropt"
2042 ac_useropt_orig=$ac_useropt
2043 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2044 case $ac_user_opts in
2048 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2049 ac_unrecognized_sep=', ';;
2051 eval with_$ac_useropt=\$ac_optarg ;;
2053 -without-* | --without-*)
2054 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2055 # Reject names that are not valid shell variable names.
2056 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2057 as_fn_error $? "invalid package name: $ac_useropt"
2058 ac_useropt_orig=$ac_useropt
2059 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2060 case $ac_user_opts in
2064 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2065 ac_unrecognized_sep=', ';;
2067 eval with_$ac_useropt=no ;;
2070 # Obsolete; use --with-x.
2073 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2074 | --x-incl | --x-inc | --x-in | --x-i)
2075 ac_prev=x_includes ;;
2076 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2077 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2078 x_includes=$ac_optarg ;;
2080 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2081 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2082 ac_prev=x_libraries ;;
2083 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2084 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2085 x_libraries=$ac_optarg ;;
2087 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2088 Try \`$0 --help' for more information"
2092 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2093 # Reject names that are not valid shell variable names.
2094 case $ac_envvar in #(
2095 '' | [0-9]* | *[!_$as_cr_alnum]* )
2096 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2098 eval $ac_envvar=\$ac_optarg
2099 export $ac_envvar ;;
2102 # FIXME: should be removed in autoconf 3.0.
2103 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2104 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2105 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2106 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2112 if test -n "$ac_prev"; then
2113 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2114 as_fn_error $? "missing argument to $ac_option"
2117 if test -n "$ac_unrecognized_opts"; then
2118 case $enable_option_checking in
2120 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2121 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2125 # Check all directory arguments for consistency.
2126 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2127 datadir sysconfdir sharedstatedir localstatedir includedir \
2128 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2129 libdir localedir mandir
2131 eval ac_val=\$$ac_var
2132 # Remove trailing slashes.
2135 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2136 eval $ac_var=\$ac_val;;
2138 # Be sure to have absolute directory names.
2140 [\\/$]* | ?:[\\/]* ) continue;;
2141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2143 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2146 # There might be people who depend on the old broken behavior: `$host'
2147 # used to hold the argument of --host etc.
2148 # FIXME: To remove some day.
2151 target=$target_alias
2153 # FIXME: To remove some day.
2154 if test "x$host_alias" != x; then
2155 if test "x$build_alias" = x; then
2156 cross_compiling=maybe
2157 elif test "x$build_alias" != "x$host_alias"; then
2163 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2165 test "$silent" = yes && exec 6>/dev/null
2168 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2169 ac_ls_di=`ls -di .` &&
2170 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2171 as_fn_error $? "working directory cannot be determined"
2172 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2173 as_fn_error $? "pwd does not report name of working directory"
2176 # Find the source files, if location was not specified.
2177 if test -z "$srcdir"; then
2178 ac_srcdir_defaulted=yes
2179 # Try the directory containing this script, then the parent directory.
2180 ac_confdir=`$as_dirname -- "$as_myself" ||
2181 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2182 X"$as_myself" : 'X\(//\)[^/]' \| \
2183 X"$as_myself" : 'X\(//\)$' \| \
2184 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2185 $as_echo X"$as_myself" |
2186 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2204 if test ! -r "$srcdir/$ac_unique_file"; then
2208 ac_srcdir_defaulted=no
2210 if test ! -r "$srcdir/$ac_unique_file"; then
2211 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2212 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2214 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2216 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2218 # When building in place, set srcdir=.
2219 if test "$ac_abs_confdir" = "$ac_pwd"; then
2222 # Remove unnecessary trailing slashes from srcdir.
2223 # Double slashes in file names in object file debugging info
2224 # mess up M-x gdb in Emacs.
2226 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2228 for ac_var in $ac_precious_vars; do
2229 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2230 eval ac_env_${ac_var}_value=\$${ac_var}
2231 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2232 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2236 # Report the --help message.
2238 if test "$ac_init_help" = "long"; then
2239 # Omit some internal or obsolete options to make the list less imposing.
2240 # This message is too long to be a string in the A/UX 3.1 sh.
2242 \`configure' configures gzip 1.5 to adapt to many kinds of systems.
2244 Usage: $0 [OPTION]... [VAR=VALUE]...
2246 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2247 VAR=VALUE. See below for descriptions of some of the useful variables.
2249 Defaults for the options are specified in brackets.
2252 -h, --help display this help and exit
2253 --help=short display options specific to this package
2254 --help=recursive display the short help of all the included packages
2255 -V, --version display version information and exit
2256 -q, --quiet, --silent do not print \`checking ...' messages
2257 --cache-file=FILE cache test results in FILE [disabled]
2258 -C, --config-cache alias for \`--cache-file=config.cache'
2259 -n, --no-create do not create output files
2260 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2262 Installation directories:
2263 --prefix=PREFIX install architecture-independent files in PREFIX
2264 [$ac_default_prefix]
2265 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2268 By default, \`make install' will install all the files in
2269 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2270 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2271 for instance \`--prefix=\$HOME'.
2273 For better control, use the options below.
2275 Fine tuning of the installation directories:
2276 --bindir=DIR user executables [EPREFIX/bin]
2277 --sbindir=DIR system admin executables [EPREFIX/sbin]
2278 --libexecdir=DIR program executables [EPREFIX/libexec]
2279 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2280 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2281 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2282 --libdir=DIR object code libraries [EPREFIX/lib]
2283 --includedir=DIR C header files [PREFIX/include]
2284 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2285 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2286 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2287 --infodir=DIR info documentation [DATAROOTDIR/info]
2288 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2289 --mandir=DIR man documentation [DATAROOTDIR/man]
2290 --docdir=DIR documentation root [DATAROOTDIR/doc/gzip]
2291 --htmldir=DIR html documentation [DOCDIR]
2292 --dvidir=DIR dvi documentation [DOCDIR]
2293 --pdfdir=DIR pdf documentation [DOCDIR]
2294 --psdir=DIR ps documentation [DOCDIR]
2300 --program-prefix=PREFIX prepend PREFIX to installed program names
2301 --program-suffix=SUFFIX append SUFFIX to installed program names
2302 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2305 --build=BUILD configure for building on BUILD [guessed]
2306 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2310 if test -n "$ac_init_help"; then
2311 case $ac_init_help in
2312 short | recursive ) echo "Configuration of gzip 1.5:";;
2317 --disable-option-checking ignore unrecognized --enable/--with options
2318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2320 --enable-silent-rules less verbose build output (undo: "make V=1")
2321 --disable-silent-rules verbose build output (undo: "make V=0")
2322 --enable-dependency-tracking
2323 do not reject slow dependency extractors
2324 --disable-dependency-tracking
2325 speeds up one-time build
2326 --disable-largefile omit support for large files
2327 --enable-threads={posix|solaris|pth|windows}
2328 specify multithreading API
2329 --disable-threads build without multithread safety
2330 --disable-rpath do not hardcode runtime library paths
2331 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
2334 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2335 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2336 --with-gnu-ld assume the C compiler uses GNU ld default=no
2337 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2338 --without-libpth-prefix don't search for libpth in includedir and libdir
2340 Some influential environment variables:
2341 CC C compiler command
2342 CFLAGS C compiler flags
2343 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2344 nonstandard directory <lib dir>
2345 LIBS libraries to pass to the linker, e.g. -l<library>
2346 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2347 you have headers in a nonstandard directory <include dir>
2350 Use these variables to override the choices made by `configure' or to help
2351 it to find libraries and programs with nonstandard names/locations.
2353 Report bugs to <bug-gzip@gnu.org>.
2358 if test "$ac_init_help" = "recursive"; then
2359 # If there are subdirs, report their specific --help.
2360 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2361 test -d "$ac_dir" ||
2362 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2367 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2369 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2370 # A ".." for each directory in $ac_dir_suffix.
2371 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2372 case $ac_top_builddir_sub in
2373 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2374 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2377 ac_abs_top_builddir=$ac_pwd
2378 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2379 # for backward compatibility:
2380 ac_top_builddir=$ac_top_build_prefix
2383 .) # We are building in place.
2385 ac_top_srcdir=$ac_top_builddir_sub
2386 ac_abs_top_srcdir=$ac_pwd ;;
2387 [\\/]* | ?:[\\/]* ) # Absolute name.
2388 ac_srcdir=$srcdir$ac_dir_suffix;
2389 ac_top_srcdir=$srcdir
2390 ac_abs_top_srcdir=$srcdir ;;
2392 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2393 ac_top_srcdir=$ac_top_build_prefix$srcdir
2394 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2396 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2398 cd "$ac_dir" || { ac_status=$?; continue; }
2399 # Check for guested configure.
2400 if test -f "$ac_srcdir/configure.gnu"; then
2402 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2403 elif test -f "$ac_srcdir/configure"; then
2405 $SHELL "$ac_srcdir/configure" --help=recursive
2407 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2409 cd "$ac_pwd" || { ac_status=$?; break; }
2413 test -n "$ac_init_help" && exit $ac_status
2414 if $ac_init_version; then
2417 generated by GNU Autoconf 2.69.4-560f
2419 Copyright (C) 2012 Free Software Foundation, Inc.
2420 This configure script is free software; the Free Software Foundation
2421 gives unlimited permission to copy, distribute and modify it.
2426 ## ------------------------ ##
2427 ## Autoconf initialization. ##
2428 ## ------------------------ ##
2430 # ac_fn_c_try_compile LINENO
2431 # --------------------------
2432 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2433 ac_fn_c_try_compile ()
2435 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2436 rm -f conftest.$ac_objext
2437 if { { ac_try="$ac_compile"
2439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2440 *) ac_try_echo=$ac_try;;
2442 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2443 $as_echo "$ac_try_echo"; } >&5
2444 (eval "$ac_compile") 2>conftest.err
2446 if test -s conftest.err; then
2447 grep -v '^ *+' conftest.err >conftest.er1
2448 cat conftest.er1 >&5
2449 mv -f conftest.er1 conftest.err
2451 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2452 test $ac_status = 0; } && {
2453 test -z "$ac_c_werror_flag" ||
2454 test ! -s conftest.err
2455 } && test -s conftest.$ac_objext; then :
2458 $as_echo "$as_me: failed program was:" >&5
2459 sed 's/^/| /' conftest.$ac_ext >&5
2463 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464 as_fn_set_status $ac_retval
2466 } # ac_fn_c_try_compile
2468 # ac_fn_c_try_cpp LINENO
2469 # ----------------------
2470 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2473 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2474 if { { ac_try="$ac_cpp conftest.$ac_ext"
2476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2477 *) ac_try_echo=$ac_try;;
2479 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2480 $as_echo "$ac_try_echo"; } >&5
2481 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2483 if test -s conftest.err; then
2484 grep -v '^ *+' conftest.err >conftest.er1
2485 cat conftest.er1 >&5
2486 mv -f conftest.er1 conftest.err
2488 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2489 test $ac_status = 0; } > conftest.i && {
2490 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2491 test ! -s conftest.err
2495 $as_echo "$as_me: failed program was:" >&5
2496 sed 's/^/| /' conftest.$ac_ext >&5
2500 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2501 as_fn_set_status $ac_retval
2505 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2506 # -------------------------------------------------------
2507 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2508 # the include files in INCLUDES and setting the cache variable VAR
2510 ac_fn_c_check_header_mongrel ()
2512 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513 if eval \${$3+:} false; then :
2514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2515 $as_echo_n "checking for $2... " >&6; }
2516 if eval \${$3+:} false; then :
2517 $as_echo_n "(cached) " >&6
2520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2521 $as_echo "$ac_res" >&6; }
2523 # Is the header compilable?
2524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2525 $as_echo_n "checking $2 usability... " >&6; }
2526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2527 /* end confdefs.h. */
2531 if ac_fn_c_try_compile "$LINENO"; then :
2532 ac_header_compiler=yes
2534 ac_header_compiler=no
2536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2538 $as_echo "$ac_header_compiler" >&6; }
2540 # Is the header present?
2541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2542 $as_echo_n "checking $2 presence... " >&6; }
2543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2544 /* end confdefs.h. */
2547 if ac_fn_c_try_cpp "$LINENO"; then :
2548 ac_header_preproc=yes
2550 ac_header_preproc=no
2552 rm -f conftest.err conftest.i conftest.$ac_ext
2553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2554 $as_echo "$ac_header_preproc" >&6; }
2556 # So? What about this header?
2557 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2560 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2562 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2566 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2567 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2568 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2569 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2570 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2572 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2574 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2575 ( $as_echo "## ------------------------------- ##
2576 ## Report this to bug-gzip@gnu.org ##
2577 ## ------------------------------- ##"
2578 ) | sed "s/^/$as_me: WARNING: /" >&2
2581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2582 $as_echo_n "checking for $2... " >&6; }
2583 if eval \${$3+:} false; then :
2584 $as_echo_n "(cached) " >&6
2586 eval "$3=\$ac_header_compiler"
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2590 $as_echo "$ac_res" >&6; }
2592 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2594 } # ac_fn_c_check_header_mongrel
2596 # ac_fn_c_try_run LINENO
2597 # ----------------------
2598 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2599 # that executables *can* be run.
2602 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2603 if { { ac_try="$ac_link"
2605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2606 *) ac_try_echo=$ac_try;;
2608 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2609 $as_echo "$ac_try_echo"; } >&5
2610 (eval "$ac_link") 2>&5
2612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2613 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2614 { { case "(($ac_try" in
2615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2616 *) ac_try_echo=$ac_try;;
2618 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2619 $as_echo "$ac_try_echo"; } >&5
2620 (eval "$ac_try") 2>&5
2622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2623 test $ac_status = 0; }; }; then :
2626 $as_echo "$as_me: program exited with status $ac_status" >&5
2627 $as_echo "$as_me: failed program was:" >&5
2628 sed 's/^/| /' conftest.$ac_ext >&5
2630 ac_retval=$ac_status
2632 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2633 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2634 as_fn_set_status $ac_retval
2638 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2639 # -------------------------------------------------------
2640 # Tests whether HEADER exists and can be compiled using the include files in
2641 # INCLUDES, setting the cache variable VAR accordingly.
2642 ac_fn_c_check_header_compile ()
2644 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2646 $as_echo_n "checking for $2... " >&6; }
2647 if eval \${$3+:} false; then :
2648 $as_echo_n "(cached) " >&6
2650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651 /* end confdefs.h. */
2655 if ac_fn_c_try_compile "$LINENO"; then :
2660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2664 $as_echo "$ac_res" >&6; }
2665 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2667 } # ac_fn_c_check_header_compile
2669 # ac_fn_c_try_link LINENO
2670 # -----------------------
2671 # Try to link conftest.$ac_ext, and return whether this succeeded.
2674 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2675 rm -f conftest.$ac_objext conftest$ac_exeext
2676 if { { ac_try="$ac_link"
2678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679 *) ac_try_echo=$ac_try;;
2681 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2682 $as_echo "$ac_try_echo"; } >&5
2683 (eval "$ac_link") 2>conftest.err
2685 if test -s conftest.err; then
2686 grep -v '^ *+' conftest.err >conftest.er1
2687 cat conftest.er1 >&5
2688 mv -f conftest.er1 conftest.err
2690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691 test $ac_status = 0; } && {
2692 test -z "$ac_c_werror_flag" ||
2693 test ! -s conftest.err
2694 } && test -s conftest$ac_exeext && {
2695 test "$cross_compiling" = yes ||
2696 test -x conftest$ac_exeext
2700 $as_echo "$as_me: failed program was:" >&5
2701 sed 's/^/| /' conftest.$ac_ext >&5
2705 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2706 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2707 # interfere with the next link command; also delete a directory that is
2708 # left behind by Apple's compiler. We do this before executing the actions.
2709 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2711 as_fn_set_status $ac_retval
2713 } # ac_fn_c_try_link
2715 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2716 # -------------------------------------------
2717 # Tests whether TYPE exists after having included INCLUDES, setting cache
2718 # variable VAR accordingly.
2719 ac_fn_c_check_type ()
2721 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2723 $as_echo_n "checking for $2... " >&6; }
2724 if eval \${$3+:} false; then :
2725 $as_echo_n "(cached) " >&6
2728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729 /* end confdefs.h. */
2740 if ac_fn_c_try_compile "$LINENO"; then :
2741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2742 /* end confdefs.h. */
2753 if ac_fn_c_try_compile "$LINENO"; then :
2758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764 $as_echo "$ac_res" >&6; }
2765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2767 } # ac_fn_c_check_type
2769 # ac_fn_c_check_func LINENO FUNC VAR
2770 # ----------------------------------
2771 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2772 ac_fn_c_check_func ()
2774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2776 $as_echo_n "checking for $2... " >&6; }
2777 if eval \${$3+:} false; then :
2778 $as_echo_n "(cached) " >&6
2780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781 /* end confdefs.h. */
2782 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2783 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2784 #define $2 innocuous_$2
2786 /* System header to define __stub macros and hopefully few prototypes,
2787 which can conflict with char $2 (); below.
2788 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2789 <limits.h> exists even on freestanding compilers. */
2792 # include <limits.h>
2794 # include <assert.h>
2799 /* Override any GCC internal prototype to avoid an error.
2800 Use char because int might match the return type of a GCC
2801 builtin and then its argument prototype would still apply. */
2806 /* The GNU C library defines this for functions which it implements
2807 to always fail with ENOSYS. Some functions are actually named
2808 something starting with __ and the normal name is an alias. */
2809 #if defined __stub_$2 || defined __stub___$2
2821 if ac_fn_c_try_link "$LINENO"; then :
2826 rm -f core conftest.err conftest.$ac_objext \
2827 conftest$ac_exeext conftest.$ac_ext
2830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2831 $as_echo "$ac_res" >&6; }
2832 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2834 } # ac_fn_c_check_func
2836 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2837 # ---------------------------------------------
2838 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2840 ac_fn_c_check_decl ()
2842 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2843 as_decl_name=`echo $2|sed 's/ *(.*//'`
2844 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2846 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2847 if eval \${$3+:} false; then :
2848 $as_echo_n "(cached) " >&6
2850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2851 /* end confdefs.h. */
2856 #ifndef $as_decl_name
2858 (void) $as_decl_use;
2860 (void) $as_decl_name;
2868 if ac_fn_c_try_compile "$LINENO"; then :
2873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2877 $as_echo "$ac_res" >&6; }
2878 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2880 } # ac_fn_c_check_decl
2882 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2883 # --------------------------------------------
2884 # Tries to find the compile-time value of EXPR in a program that includes
2885 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2887 ac_fn_c_compute_int ()
2889 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2890 if test "$cross_compiling" = yes; then
2891 # Depending upon the size, compute the lo and hi bounds.
2892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2893 /* end confdefs.h. */
2898 static int test_array [1 - 2 * !(($2) >= 0)];
2900 return test_array [0];
2906 if ac_fn_c_try_compile "$LINENO"; then :
2909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2910 /* end confdefs.h. */
2915 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2917 return test_array [0];
2923 if ac_fn_c_try_compile "$LINENO"; then :
2924 ac_hi=$ac_mid; break
2926 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2927 if test $ac_lo -le $ac_mid; then
2931 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2937 /* end confdefs.h. */
2942 static int test_array [1 - 2 * !(($2) < 0)];
2944 return test_array [0];
2950 if ac_fn_c_try_compile "$LINENO"; then :
2953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2954 /* end confdefs.h. */
2959 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2961 return test_array [0];
2967 if ac_fn_c_try_compile "$LINENO"; then :
2968 ac_lo=$ac_mid; break
2970 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2971 if test $ac_mid -le $ac_hi; then
2975 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2985 # Binary search between lo and hi bounds.
2986 while test "x$ac_lo" != "x$ac_hi"; do
2987 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2989 /* end confdefs.h. */
2994 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2996 return test_array [0];
3002 if ac_fn_c_try_compile "$LINENO"; then :
3005 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3010 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3015 /* end confdefs.h. */
3017 static long int longval () { return $2; }
3018 static unsigned long int ulongval () { return $2; }
3025 FILE *f = fopen ("conftest.val", "w");
3030 long int i = longval ();
3033 fprintf (f, "%ld", i);
3037 unsigned long int i = ulongval ();
3040 fprintf (f, "%lu", i);
3042 /* Do not output a trailing newline, as this causes \r\n confusion
3043 on some platforms. */
3044 return ferror (f) || fclose (f) != 0;
3050 if ac_fn_c_try_run "$LINENO"; then :
3051 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3055 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3056 conftest.$ac_objext conftest.beam conftest.$ac_ext
3060 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3061 as_fn_set_status $ac_retval
3063 } # ac_fn_c_compute_int
3065 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3066 # ----------------------------------------------------
3067 # Tries to find if the field MEMBER exists in type AGGR, after including
3068 # INCLUDES, setting cache variable VAR accordingly.
3069 ac_fn_c_check_member ()
3071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3073 $as_echo_n "checking for $2.$3... " >&6; }
3074 if eval \${$4+:} false; then :
3075 $as_echo_n "(cached) " >&6
3077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078 /* end confdefs.h. */
3090 if ac_fn_c_try_compile "$LINENO"; then :
3093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3094 /* end confdefs.h. */
3100 if (sizeof ac_aggr.$3)
3106 if ac_fn_c_try_compile "$LINENO"; then :
3111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3117 $as_echo "$ac_res" >&6; }
3118 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3120 } # ac_fn_c_check_member
3121 cat >config.log <<_ACEOF
3122 This file contains any messages produced by compilers while
3123 running configure, to aid debugging if configure makes a mistake.
3125 It was created by gzip $as_me 1.5, which was
3126 generated by GNU Autoconf 2.69.4-560f. Invocation command line was
3138 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3139 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3140 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3141 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3142 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3144 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3145 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3147 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3148 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3149 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3150 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3151 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3152 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3153 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3161 test -z "$as_dir" && as_dir=.
3162 $as_echo "PATH: $as_dir"
3178 # Keep a trace of the command line.
3179 # Strip out --no-create and --no-recursion so they do not pile up.
3180 # Strip out --silent because we don't want to record it for future runs.
3181 # Also quote any args containing shell meta-characters.
3182 # Make two passes to allow for proper duplicate-argument suppression.
3186 ac_must_keep_next=false
3192 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3193 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3194 | -silent | --silent | --silen | --sile | --sil)
3197 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3200 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3202 as_fn_append ac_configure_args1 " '$ac_arg'"
3203 if test $ac_must_keep_next = true; then
3204 ac_must_keep_next=false # Got value, back to normal.
3207 *=* | --config-cache | -C | -disable-* | --disable-* \
3208 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3209 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3210 | -with-* | --with-* | -without-* | --without-* | --x)
3211 case "$ac_configure_args0 " in
3212 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3215 -* ) ac_must_keep_next=true ;;
3218 as_fn_append ac_configure_args " '$ac_arg'"
3223 { ac_configure_args0=; unset ac_configure_args0;}
3224 { ac_configure_args1=; unset ac_configure_args1;}
3226 # When interrupted or exit'd, cleanup temporary files, and complete
3227 # config.log. We remove comments because anyway the quotes in there
3228 # would cause problems or look ugly.
3229 # WARNING: Use '\'' to represent an apostrophe within the trap.
3230 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3231 trap 'exit_status=$?
3232 # Save into config.log some information that might help in debugging.
3236 $as_echo "## ---------------- ##
3237 ## Cache variables. ##
3238 ## ---------------- ##"
3240 # The following way of writing the cache mishandles newlines in values,
3242 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3243 eval ac_val=\$$ac_var
3247 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3248 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3251 _ | IFS | as_nl) ;; #(
3252 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3253 *) { eval $ac_var=; unset $ac_var;} ;;
3258 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3259 *${as_nl}ac_space=\ *)
3261 "s/'\''/'\''\\\\'\'''\''/g;
3262 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3265 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3272 $as_echo "## ----------------- ##
3273 ## Output variables. ##
3274 ## ----------------- ##"
3276 for ac_var in $ac_subst_vars
3278 eval ac_val=\$$ac_var
3280 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3282 $as_echo "$ac_var='\''$ac_val'\''"
3286 if test -n "$ac_subst_files"; then
3287 $as_echo "## ------------------- ##
3288 ## File substitutions. ##
3289 ## ------------------- ##"
3291 for ac_var in $ac_subst_files
3293 eval ac_val=\$$ac_var
3295 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3297 $as_echo "$ac_var='\''$ac_val'\''"
3302 if test -s confdefs.h; then
3303 $as_echo "## ----------- ##
3310 test "$ac_signal" != 0 &&
3311 $as_echo "$as_me: caught signal $ac_signal"
3312 $as_echo "$as_me: exit $exit_status"
3314 rm -f core *.core core.conftest.* &&
3315 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3318 for ac_signal in 1 2 13 15; do
3319 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3323 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3324 rm -f -r conftest* confdefs.h
3326 $as_echo "/* confdefs.h */" > confdefs.h
3328 # Predefined preprocessor variables.
3330 cat >>confdefs.h <<_ACEOF
3331 #define PACKAGE_NAME "$PACKAGE_NAME"
3334 cat >>confdefs.h <<_ACEOF
3335 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3338 cat >>confdefs.h <<_ACEOF
3339 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3342 cat >>confdefs.h <<_ACEOF
3343 #define PACKAGE_STRING "$PACKAGE_STRING"
3346 cat >>confdefs.h <<_ACEOF
3347 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3350 cat >>confdefs.h <<_ACEOF
3351 #define PACKAGE_URL "$PACKAGE_URL"
3355 # Let the site file select an alternate cache file if it wants to.
3356 # Prefer an explicitly selected file to automatically selected ones.
3359 if test -n "$CONFIG_SITE"; then
3360 # We do not want a PATH search for config.site.
3361 case $CONFIG_SITE in #((
3362 -*) ac_site_file1=./$CONFIG_SITE;;
3363 */*) ac_site_file1=$CONFIG_SITE;;
3364 *) ac_site_file1=./$CONFIG_SITE;;
3366 elif test "x$prefix" != xNONE; then
3367 ac_site_file1=$prefix/share/config.site
3368 ac_site_file2=$prefix/etc/config.site
3370 ac_site_file1=$ac_default_prefix/share/config.site
3371 ac_site_file2=$ac_default_prefix/etc/config.site
3373 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3375 test "x$ac_site_file" = xNONE && continue
3376 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3377 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3378 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3379 sed 's/^/| /' "$ac_site_file" >&5
3381 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3382 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3383 as_fn_error $? "failed to load site script $ac_site_file
3384 See \`config.log' for more details" "$LINENO" 5; }
3388 if test -r "$cache_file"; then
3389 # Some versions of bash will fail to source /dev/null (special files
3390 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3391 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3393 $as_echo "$as_me: loading cache $cache_file" >&6;}
3395 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3396 *) . "./$cache_file";;
3400 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3401 $as_echo "$as_me: creating cache $cache_file" >&6;}
3405 as_fn_append ac_header_list " unistd.h"
3406 as_fn_append ac_header_list " sys/param.h"
3407 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3408 as_fn_append ac_header_list " sys/socket.h"
3409 as_fn_append ac_func_list " fchdir"
3410 as_fn_append ac_header_list " dirent.h"
3411 as_fn_append ac_func_list " fdopendir"
3412 as_fn_append ac_func_list " fcntl"
3413 as_fn_append ac_func_list " symlink"
3414 as_fn_append ac_func_list " mempcpy"
3415 as_fn_append ac_header_list " stdio_ext.h"
3416 as_fn_append ac_func_list " __fpending"
3417 as_fn_append ac_func_list " vasnprintf"
3418 as_fn_append ac_header_list " features.h"
3419 as_fn_append ac_func_list " snprintf"
3420 as_fn_append ac_func_list " fpurge"
3421 as_fn_append ac_func_list " __fpurge"
3422 as_fn_append ac_func_list " __freading"
3423 as_fn_append ac_func_list " alarm"
3424 as_fn_append ac_header_list " sys/stat.h"
3425 as_fn_append ac_func_list " getdtablesize"
3426 gl_getopt_required=GNU
3427 as_fn_append ac_header_list " getopt.h"
3428 as_fn_append ac_func_list " gettimeofday"
3429 as_fn_append ac_func_list " nanotime"
3430 as_fn_append ac_header_list " sys/time.h"
3431 as_fn_append ac_func_list " lstat"
3432 as_fn_append ac_header_list " math.h"
3433 as_fn_append ac_func_list " mbsinit"
3434 as_fn_append ac_func_list " mbrtowc"
3435 as_fn_append ac_header_list " sys/mman.h"
3436 as_fn_append ac_func_list " mprotect"
3437 as_fn_append ac_func_list " openat"
3438 as_fn_append ac_func_list " strerror_r"
3439 as_fn_append ac_func_list " __xpg_strerror_r"
3441 as_fn_append ac_header_list " wchar.h"
3442 as_fn_append ac_header_list " stdint.h"
3443 as_fn_append ac_func_list " strdup"
3444 as_fn_append ac_func_list " catgets"
3445 as_fn_append ac_func_list " pipe"
3446 as_fn_append ac_header_list " utime.h"
3447 as_fn_append ac_func_list " futimes"
3448 as_fn_append ac_func_list " futimesat"
3449 as_fn_append ac_func_list " futimens"
3450 as_fn_append ac_func_list " utimensat"
3451 as_fn_append ac_func_list " lutimes"
3452 as_fn_append ac_func_list " iswcntrl"
3453 as_fn_append ac_header_list " wctype.h"
3454 as_fn_append ac_header_list " fcntl.h"
3455 as_fn_append ac_header_list " limits.h"
3456 as_fn_append ac_header_list " memory.h"
3457 as_fn_append ac_header_list " time.h"
3458 as_fn_append ac_func_list " chown"
3459 as_fn_append ac_func_list " fchmod"
3460 as_fn_append ac_func_list " fchown"
3461 as_fn_append ac_func_list " siginterrupt"
3462 # Check that the precious variables saved in the cache have kept the same
3464 ac_cache_corrupted=false
3465 for ac_var in $ac_precious_vars; do
3466 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3467 eval ac_new_set=\$ac_env_${ac_var}_set
3468 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3469 eval ac_new_val=\$ac_env_${ac_var}_value
3470 case $ac_old_set,$ac_new_set in
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3473 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3474 ac_cache_corrupted=: ;;
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3477 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3478 ac_cache_corrupted=: ;;
3481 if test "x$ac_old_val" != "x$ac_new_val"; then
3482 # differences in whitespace do not lead to failure.
3483 ac_old_val_w=`echo x $ac_old_val`
3484 ac_new_val_w=`echo x $ac_new_val`
3485 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3487 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3488 ac_cache_corrupted=:
3490 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3491 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3492 eval $ac_var=\$ac_old_val
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3495 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3497 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3500 # Pass precious variables to config.status.
3501 if test "$ac_new_set" = set; then
3503 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3504 *) ac_arg=$ac_var=$ac_new_val ;;
3506 case " $ac_configure_args " in
3507 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3508 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3512 if $ac_cache_corrupted; then
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3514 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3515 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3516 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3517 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3519 ## -------------------- ##
3520 ## Main body of script. ##
3521 ## -------------------- ##
3524 ac_cpp='$CPP $CPPFLAGS'
3525 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3526 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3527 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3533 for ac_dir in build-aux "$srcdir"/build-aux; do
3534 if test -f "$ac_dir/install-sh"; then
3536 ac_install_sh="$ac_aux_dir/install-sh -c"
3538 elif test -f "$ac_dir/install.sh"; then
3540 ac_install_sh="$ac_aux_dir/install.sh -c"
3542 elif test -f "$ac_dir/shtool"; then
3544 ac_install_sh="$ac_aux_dir/shtool install -c"
3548 if test -z "$ac_aux_dir"; then
3549 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3552 # These three variables are undocumented and unsupported,
3553 # and are intended to be withdrawn in a future Autoconf release.
3554 # They can cause serious problems if a builder's source tree is in a directory
3555 # whose full name contains unusual characters.
3556 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3557 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3558 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3561 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3563 am__api_version='1.12a'
3565 # Find a good install program. We prefer a C program (faster),
3566 # so one script is as good as another. But avoid the broken or
3567 # incompatible versions:
3568 # SysV /etc/install, /usr/sbin/install
3569 # SunOS /usr/etc/install
3570 # IRIX /sbin/install
3572 # AmigaOS /C/install, which installs bootblocks on floppy discs
3573 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3574 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3575 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3576 # OS/2's system install, which has a completely different semantic
3577 # ./install, which can be erroneously created by make from ./install.sh.
3578 # Reject install programs that cannot install multiple files.
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3580 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3581 if test -z "$INSTALL"; then
3582 if ${ac_cv_path_install+:} false; then :
3583 $as_echo_n "(cached) " >&6
3585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589 test -z "$as_dir" && as_dir=.
3590 # Account for people who put trailing slashes in PATH elements.
3591 case $as_dir/ in #((
3592 ./ | .// | /[cC]/* | \
3593 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3594 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3597 # OSF1 and SCO ODT 3.0 have their own names for install.
3598 # Don't use installbsd from OSF since it installs stuff as root
3600 for ac_prog in ginstall scoinst install; do
3601 for ac_exec_ext in '' $ac_executable_extensions; do
3602 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3603 if test $ac_prog = install &&
3604 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3605 # AIX install. It has an incompatible calling convention.
3607 elif test $ac_prog = install &&
3608 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3609 # program-specific install script used by HP pwplus--don't use.
3612 rm -rf conftest.one conftest.two conftest.dir
3613 echo one > conftest.one
3614 echo two > conftest.two
3616 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3617 test -s conftest.one && test -s conftest.two &&
3618 test -s conftest.dir/conftest.one &&
3619 test -s conftest.dir/conftest.two
3621 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3634 rm -rf conftest.one conftest.two conftest.dir
3637 if test "${ac_cv_path_install+set}" = set; then
3638 INSTALL=$ac_cv_path_install
3640 # As a last resort, use the slow shell script. Don't cache a
3641 # value for INSTALL within a source directory, because that will
3642 # break other packages using the cache if that directory is
3643 # removed, or if the value is a relative name.
3644 INSTALL=$ac_install_sh
3647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3648 $as_echo "$INSTALL" >&6; }
3650 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3651 # It thinks the first close brace ends the variable substitution.
3652 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3654 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3656 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3659 $as_echo_n "checking whether build environment is sane... " >&6; }
3660 # Reject unsafe characters in $srcdir or the absolute working directory
3661 # name. Accept space and tab only in the latter.
3665 *[\\\"\#\$\&\'\`$am_lf]*)
3666 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3669 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3670 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3673 # Do 'set' in a subshell so we don't clobber the current shell's
3674 # arguments. Must try -L first in case configure is actually a
3675 # symlink; some systems play weird games with the mod time of symlinks
3676 # (eg FreeBSD returns the mod time of the symlink's containing
3680 for am_try in 1 2; do
3681 echo "timestamp, slept: $am_has_slept" > conftest.file
3682 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3683 if test "$*" = "X"; then
3685 set X `ls -t "$srcdir/configure" conftest.file`
3687 if test "$*" != "X $srcdir/configure conftest.file" \
3688 && test "$*" != "X conftest.file $srcdir/configure"; then
3690 # If neither matched, then we have a broken ls. This can happen
3691 # if, for instance, CONFIG_SHELL is bash and it inherits a
3692 # broken ls alias from the environment. This has actually
3693 # happened. Such a system could not be considered "sane".
3694 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3695 alias in your environment" "$LINENO" 5
3697 if test "$2" = conftest.file || test $am_try -eq 2; then
3704 test "$2" = conftest.file
3710 as_fn_error $? "newly created file is older than distributed files!
3711 Check your system clock" "$LINENO" 5
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3714 $as_echo "yes" >&6; }
3715 # If we didn't sleep, we still need to ensure time stamps of config.status and
3716 # generated files are strictly newer.
3718 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3725 test "$program_prefix" != NONE &&
3726 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3727 # Use a double $ so make ignores it.
3728 test "$program_suffix" != NONE &&
3729 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3730 # Double any \ or $.
3731 # By default was `s,x,x', remove it if useless.
3732 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3733 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3735 # expand $ac_aux_dir to an absolute path
3736 am_aux_dir=`cd $ac_aux_dir && pwd`
3738 if test x"${MISSING+set}" != xset; then
3741 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3743 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3746 # Use eval to expand $SHELL
3747 if eval "$MISSING --run true"; then
3748 am_missing_run="$MISSING --run "
3751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3752 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3755 if test x"${install_sh}" != xset; then
3758 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3760 install_sh="\${SHELL} $am_aux_dir/install-sh"
3764 # Installed binaries are usually stripped using 'strip' when the user
3765 # run "make install-strip". However 'strip' might not be the right
3766 # tool to use in cross-compilation environments, therefore Automake
3767 # will honor the 'STRIP' environment variable to overrule this program.
3768 if test "$cross_compiling" != no; then
3769 if test -n "$ac_tool_prefix"; then
3770 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3771 set dummy ${ac_tool_prefix}strip; ac_word=$2
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773 $as_echo_n "checking for $ac_word... " >&6; }
3774 if ${ac_cv_prog_STRIP+:} false; then :
3775 $as_echo_n "(cached) " >&6
3777 if test -n "$STRIP"; then
3778 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3784 test -z "$as_dir" && as_dir=.
3785 for ac_exec_ext in '' $ac_executable_extensions; do
3786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3787 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3797 STRIP=$ac_cv_prog_STRIP
3798 if test -n "$STRIP"; then
3799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3800 $as_echo "$STRIP" >&6; }
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803 $as_echo "no" >&6; }
3808 if test -z "$ac_cv_prog_STRIP"; then
3810 # Extract the first word of "strip", so it can be a program name with args.
3811 set dummy strip; ac_word=$2
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3813 $as_echo_n "checking for $ac_word... " >&6; }
3814 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3815 $as_echo_n "(cached) " >&6
3817 if test -n "$ac_ct_STRIP"; then
3818 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3824 test -z "$as_dir" && as_dir=.
3825 for ac_exec_ext in '' $ac_executable_extensions; do
3826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3827 ac_cv_prog_ac_ct_STRIP="strip"
3828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3837 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3838 if test -n "$ac_ct_STRIP"; then
3839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3840 $as_echo "$ac_ct_STRIP" >&6; }
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3843 $as_echo "no" >&6; }
3846 if test "x$ac_ct_STRIP" = x; then
3849 case $cross_compiling:$ac_tool_warned in
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3853 ac_tool_warned=yes ;;
3858 STRIP="$ac_cv_prog_STRIP"
3862 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3865 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3866 if test -z "$MKDIR_P"; then
3867 if ${ac_cv_path_mkdir+:} false; then :
3868 $as_echo_n "(cached) " >&6
3870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3874 test -z "$as_dir" && as_dir=.
3875 for ac_prog in mkdir gmkdir; do
3876 for ac_exec_ext in '' $ac_executable_extensions; do
3877 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3878 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3879 'mkdir (GNU coreutils) '* | \
3880 'mkdir (coreutils) '* | \
3881 'mkdir (fileutils) '4.1*)
3882 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3892 test -d ./--version && rmdir ./--version
3893 if test "${ac_cv_path_mkdir+set}" = set; then
3894 MKDIR_P="$ac_cv_path_mkdir -p"
3896 # As a last resort, use the slow shell script. Don't cache a
3897 # value for MKDIR_P within a source directory, because that will
3898 # break other packages using the cache if that directory is
3899 # removed, or if the value is a relative name.
3900 MKDIR_P="$ac_install_sh -d"
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3904 $as_echo "$MKDIR_P" >&6; }
3907 for ac_prog in gawk mawk nawk awk
3909 # Extract the first word of "$ac_prog", so it can be a program name with args.
3910 set dummy $ac_prog; ac_word=$2
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3912 $as_echo_n "checking for $ac_word... " >&6; }
3913 if ${ac_cv_prog_AWK+:} false; then :
3914 $as_echo_n "(cached) " >&6
3916 if test -n "$AWK"; then
3917 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923 test -z "$as_dir" && as_dir=.
3924 for ac_exec_ext in '' $ac_executable_extensions; do
3925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3926 ac_cv_prog_AWK="$ac_prog"
3927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3937 if test -n "$AWK"; then
3938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3939 $as_echo "$AWK" >&6; }
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942 $as_echo "no" >&6; }
3946 test -n "$AWK" && break
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3950 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3952 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3953 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3954 $as_echo_n "(cached) " >&6
3956 cat >conftest.make <<\_ACEOF
3959 @echo '@@@%%%=$(MAKE)=@@@%%%'
3961 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3962 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3964 eval ac_cv_prog_make_${ac_make}_set=yes;;
3966 eval ac_cv_prog_make_${ac_make}_set=no;;
3970 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3972 $as_echo "yes" >&6; }
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3976 $as_echo "no" >&6; }
3977 SET_MAKE="MAKE=${MAKE-make}"
3980 rm -rf .tst 2>/dev/null
3981 mkdir .tst 2>/dev/null
3982 if test -d .tst; then
3987 rmdir .tst 2>/dev/null
3989 # Check whether --enable-silent-rules was given.
3990 if test "${enable_silent_rules+set}" = set; then :
3991 enableval=$enable_silent_rules;
3994 case $enable_silent_rules in # (((
3995 yes) AM_DEFAULT_VERBOSITY=0;;
3996 no) AM_DEFAULT_VERBOSITY=1;;
3997 *) AM_DEFAULT_VERBOSITY=1;;
3999 am_make=${MAKE-make}
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4001 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4002 if ${am_cv_make_support_nested_variables+:} false; then :
4003 $as_echo_n "(cached) " >&6
4005 if $as_echo 'TRUE=$(BAR$(V))
4011 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4012 am_cv_make_support_nested_variables=yes
4014 am_cv_make_support_nested_variables=no
4017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4018 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4019 if test $am_cv_make_support_nested_variables = yes; then
4021 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4023 AM_V=$AM_DEFAULT_VERBOSITY
4024 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4028 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4029 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4030 # is not polluted with repeated "-I."
4031 am__isrc=' -I$(srcdir)'
4032 # test to see if srcdir already configured
4033 if test -f $srcdir/config.status; then
4034 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4038 # test whether we have cygpath
4039 if test -z "$CYGPATH_W"; then
4040 if (cygpath --version) >/dev/null 2>/dev/null; then
4041 CYGPATH_W='cygpath -w'
4048 # Define the identity of the package.
4054 cat >>confdefs.h <<_ACEOF
4055 #define PACKAGE "$PACKAGE"
4059 cat >>confdefs.h <<_ACEOF
4060 #define VERSION "$VERSION"
4063 # Some tools Automake needs.
4065 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4068 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4071 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4074 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4077 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4079 # We need awk for the "check" target. The system "awk" is bad on
4081 # Always define AMTAR for backward compatibility. Yes, it's still used
4082 # in the wild :-( We should find a proper way to deprecate it ...
4085 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4091 # Check whether --enable-silent-rules was given.
4092 if test "${enable_silent_rules+set}" = set; then :
4093 enableval=$enable_silent_rules;
4096 case $enable_silent_rules in # (((
4097 yes) AM_DEFAULT_VERBOSITY=0;;
4098 no) AM_DEFAULT_VERBOSITY=1;;
4099 *) AM_DEFAULT_VERBOSITY=0;;
4101 am_make=${MAKE-make}
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4103 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4104 if ${am_cv_make_support_nested_variables+:} false; then :
4105 $as_echo_n "(cached) " >&6
4107 if $as_echo 'TRUE=$(BAR$(V))
4113 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4114 am_cv_make_support_nested_variables=yes
4116 am_cv_make_support_nested_variables=no
4119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4120 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4121 if test $am_cv_make_support_nested_variables = yes; then
4123 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4125 AM_V=$AM_DEFAULT_VERBOSITY
4126 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4129 # make --enable-silent-rules the default.
4131 DEPDIR="${am__leading_dot}deps"
4133 ac_config_commands="$ac_config_commands depfiles"
4136 am_make=${MAKE-make}
4137 cat > confinc << 'END'
4139 @echo this is the am__doit target
4142 # If we don't find an include directive, just comment out the code.
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4144 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4148 # First try GNU make style include.
4149 echo "include confinc" > confmf
4150 # Ignore all kinds of additional output from 'make'.
4151 case `$am_make -s -f confmf 2> /dev/null` in #(
4152 *the\ am__doit\ target*)
4158 # Now try BSD make style include.
4159 if test "$am__include" = "#"; then
4160 echo '.include "confinc"' > confmf
4161 case `$am_make -s -f confmf 2> /dev/null` in #(
4162 *the\ am__doit\ target*)
4163 am__include=.include
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4172 $as_echo "$_am_result" >&6; }
4173 rm -f confinc confmf
4175 # Check whether --enable-dependency-tracking was given.
4176 if test "${enable_dependency_tracking+set}" = set; then :
4177 enableval=$enable_dependency_tracking;
4180 if test "x$enable_dependency_tracking" != xno; then
4181 am_depcomp="$ac_aux_dir/depcomp"
4185 if test "x$enable_dependency_tracking" != xno; then
4195 ac_cpp='$CPP $CPPFLAGS'
4196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4199 if test -n "$ac_tool_prefix"; then
4200 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4201 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4203 $as_echo_n "checking for $ac_word... " >&6; }
4204 if ${ac_cv_prog_CC+:} false; then :
4205 $as_echo_n "(cached) " >&6
4207 if test -n "$CC"; then
4208 ac_cv_prog_CC="$CC" # Let the user override the test.
4210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214 test -z "$as_dir" && as_dir=.
4215 for ac_exec_ext in '' $ac_executable_extensions; do
4216 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4217 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4228 if test -n "$CC"; then
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4230 $as_echo "$CC" >&6; }
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4233 $as_echo "no" >&6; }
4238 if test -z "$ac_cv_prog_CC"; then
4240 # Extract the first word of "gcc", so it can be a program name with args.
4241 set dummy gcc; ac_word=$2
4242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243 $as_echo_n "checking for $ac_word... " >&6; }
4244 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4245 $as_echo_n "(cached) " >&6
4247 if test -n "$ac_ct_CC"; then
4248 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254 test -z "$as_dir" && as_dir=.
4255 for ac_exec_ext in '' $ac_executable_extensions; do
4256 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4257 ac_cv_prog_ac_ct_CC="gcc"
4258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4267 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4268 if test -n "$ac_ct_CC"; then
4269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4270 $as_echo "$ac_ct_CC" >&6; }
4272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4273 $as_echo "no" >&6; }
4276 if test "x$ac_ct_CC" = x; then
4279 case $cross_compiling:$ac_tool_warned in
4281 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4282 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4283 ac_tool_warned=yes ;;
4291 if test -z "$CC"; then
4292 if test -n "$ac_tool_prefix"; then
4293 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4294 set dummy ${ac_tool_prefix}cc; ac_word=$2
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4296 $as_echo_n "checking for $ac_word... " >&6; }
4297 if ${ac_cv_prog_CC+:} false; then :
4298 $as_echo_n "(cached) " >&6
4300 if test -n "$CC"; then
4301 ac_cv_prog_CC="$CC" # Let the user override the test.
4303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4307 test -z "$as_dir" && as_dir=.
4308 for ac_exec_ext in '' $ac_executable_extensions; do
4309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4310 ac_cv_prog_CC="${ac_tool_prefix}cc"
4311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4321 if test -n "$CC"; then
4322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4323 $as_echo "$CC" >&6; }
4325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4326 $as_echo "no" >&6; }
4332 if test -z "$CC"; then
4333 # Extract the first word of "cc", so it can be a program name with args.
4334 set dummy cc; ac_word=$2
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4336 $as_echo_n "checking for $ac_word... " >&6; }
4337 if ${ac_cv_prog_CC+:} false; then :
4338 $as_echo_n "(cached) " >&6
4340 if test -n "$CC"; then
4341 ac_cv_prog_CC="$CC" # Let the user override the test.
4344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4348 test -z "$as_dir" && as_dir=.
4349 for ac_exec_ext in '' $ac_executable_extensions; do
4350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4351 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4352 ac_prog_rejected=yes
4356 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4363 if test $ac_prog_rejected = yes; then
4364 # We found a bogon in the path, so make sure we never use it.
4365 set dummy $ac_cv_prog_CC
4367 if test $# != 0; then
4368 # We chose a different compiler from the bogus one.
4369 # However, it has the same basename, so the bogon will be chosen
4370 # first if we set CC to just the basename; use the full file name.
4372 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4378 if test -n "$CC"; then
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4380 $as_echo "$CC" >&6; }
4382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4383 $as_echo "no" >&6; }
4388 if test -z "$CC"; then
4389 if test -n "$ac_tool_prefix"; then
4390 for ac_prog in cl.exe
4392 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4393 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4395 $as_echo_n "checking for $ac_word... " >&6; }
4396 if ${ac_cv_prog_CC+:} false; then :
4397 $as_echo_n "(cached) " >&6
4399 if test -n "$CC"; then
4400 ac_cv_prog_CC="$CC" # Let the user override the test.
4402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4406 test -z "$as_dir" && as_dir=.
4407 for ac_exec_ext in '' $ac_executable_extensions; do
4408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4420 if test -n "$CC"; then
4421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4422 $as_echo "$CC" >&6; }
4424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4425 $as_echo "no" >&6; }
4429 test -n "$CC" && break
4432 if test -z "$CC"; then
4434 for ac_prog in cl.exe
4436 # Extract the first word of "$ac_prog", so it can be a program name with args.
4437 set dummy $ac_prog; ac_word=$2
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4439 $as_echo_n "checking for $ac_word... " >&6; }
4440 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4441 $as_echo_n "(cached) " >&6
4443 if test -n "$ac_ct_CC"; then
4444 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4450 test -z "$as_dir" && as_dir=.
4451 for ac_exec_ext in '' $ac_executable_extensions; do
4452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4453 ac_cv_prog_ac_ct_CC="$ac_prog"
4454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4463 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4464 if test -n "$ac_ct_CC"; then
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4466 $as_echo "$ac_ct_CC" >&6; }
4468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469 $as_echo "no" >&6; }
4473 test -n "$ac_ct_CC" && break
4476 if test "x$ac_ct_CC" = x; then
4479 case $cross_compiling:$ac_tool_warned in
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4482 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4483 ac_tool_warned=yes ;;
4492 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4493 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4494 as_fn_error $? "no acceptable C compiler found in \$PATH
4495 See \`config.log' for more details" "$LINENO" 5; }
4497 # Provide some information about the compiler.
4498 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4501 for ac_option in --version -v -V -qversion; do
4502 { { ac_try="$ac_compiler $ac_option >&5"
4504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4505 *) ac_try_echo=$ac_try;;
4507 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4508 $as_echo "$ac_try_echo"; } >&5
4509 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4511 if test -s conftest.err; then
4513 ... rest of stderr output deleted ...
4514 10q' conftest.err >conftest.er1
4515 cat conftest.er1 >&5
4517 rm -f conftest.er1 conftest.err
4518 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4519 test $ac_status = 0; }
4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523 /* end confdefs.h. */
4533 ac_clean_files_save=$ac_clean_files
4534 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4535 # Try to create an executable without -o first, disregard a.out.
4536 # It will help us diagnose broken compilers, and finding out an intuition
4538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4539 $as_echo_n "checking whether the C compiler works... " >&6; }
4540 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4542 # The possible output files:
4543 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4546 for ac_file in $ac_files
4549 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4550 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4555 if { { ac_try="$ac_link_default"
4557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4558 *) ac_try_echo=$ac_try;;
4560 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4561 $as_echo "$ac_try_echo"; } >&5
4562 (eval "$ac_link_default") 2>&5
4564 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4565 test $ac_status = 0; }; then :
4566 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4567 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4568 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4569 # so that the user can short-circuit this test for compilers unknown to
4571 for ac_file in $ac_files ''
4573 test -f "$ac_file" || continue
4575 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4578 # We found the default executable, but exeext='' is most
4582 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4584 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4586 # We set ac_cv_exeext here because the later test for it is not
4587 # safe: cross compilers may not add the suffix if given an `-o'
4588 # argument, so we may need to know it at that point already.
4589 # Even if this section looks crufty: it has the advantage of
4596 test "$ac_cv_exeext" = no && ac_cv_exeext=
4601 if test -z "$ac_file"; then :
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603 $as_echo "no" >&6; }
4604 $as_echo "$as_me: failed program was:" >&5
4605 sed 's/^/| /' conftest.$ac_ext >&5
4607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4608 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4609 as_fn_error 77 "C compiler cannot create executables
4610 See \`config.log' for more details" "$LINENO" 5; }
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4613 $as_echo "yes" >&6; }
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4616 $as_echo_n "checking for C compiler default output file name... " >&6; }
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4618 $as_echo "$ac_file" >&6; }
4619 ac_exeext=$ac_cv_exeext
4621 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4622 ac_clean_files=$ac_clean_files_save
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4624 $as_echo_n "checking for suffix of executables... " >&6; }
4625 if { { ac_try="$ac_link"
4627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4628 *) ac_try_echo=$ac_try;;
4630 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4631 $as_echo "$ac_try_echo"; } >&5
4632 (eval "$ac_link") 2>&5
4634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4635 test $ac_status = 0; }; then :
4636 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4637 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4638 # work properly (i.e., refer to `conftest.exe'), while it won't with
4640 for ac_file in conftest.exe conftest conftest.*; do
4641 test -f "$ac_file" || continue
4643 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4644 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4650 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4651 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4652 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4653 See \`config.log' for more details" "$LINENO" 5; }
4655 rm -f conftest conftest$ac_cv_exeext
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4657 $as_echo "$ac_cv_exeext" >&6; }
4659 rm -f conftest.$ac_ext
4660 EXEEXT=$ac_cv_exeext
4662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4663 /* end confdefs.h. */
4668 FILE *f = fopen ("conftest.out", "w");
4669 return ferror (f) || fclose (f) != 0;
4675 ac_clean_files="$ac_clean_files conftest.out"
4676 # Check that the compiler produces executables we can run. If not, either
4677 # the compiler is broken, or we cross compile.
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4679 $as_echo_n "checking whether we are cross compiling... " >&6; }
4680 if test "$cross_compiling" != yes; then
4681 { { ac_try="$ac_link"
4683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4684 *) ac_try_echo=$ac_try;;
4686 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4687 $as_echo "$ac_try_echo"; } >&5
4688 (eval "$ac_link") 2>&5
4690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4691 test $ac_status = 0; }
4692 if { ac_try='./conftest$ac_cv_exeext'
4693 { { case "(($ac_try" in
4694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4695 *) ac_try_echo=$ac_try;;
4697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4698 $as_echo "$ac_try_echo"; } >&5
4699 (eval "$ac_try") 2>&5
4701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4702 test $ac_status = 0; }; }; then
4705 if test "$cross_compiling" = maybe; then
4708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4709 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4710 as_fn_error $? "cannot run C compiled programs.
4711 If you meant to cross compile, use \`--host'.
4712 See \`config.log' for more details" "$LINENO" 5; }
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4717 $as_echo "$cross_compiling" >&6; }
4719 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4720 ac_clean_files=$ac_clean_files_save
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4722 $as_echo_n "checking for suffix of object files... " >&6; }
4723 if ${ac_cv_objext+:} false; then :
4724 $as_echo_n "(cached) " >&6
4726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4727 /* end confdefs.h. */
4737 rm -f conftest.o conftest.obj
4738 if { { ac_try="$ac_compile"
4740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4741 *) ac_try_echo=$ac_try;;
4743 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4744 $as_echo "$ac_try_echo"; } >&5
4745 (eval "$ac_compile") 2>&5
4747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4748 test $ac_status = 0; }; then :
4749 for ac_file in conftest.o conftest.obj conftest.*; do
4750 test -f "$ac_file" || continue;
4752 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4753 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4758 $as_echo "$as_me: failed program was:" >&5
4759 sed 's/^/| /' conftest.$ac_ext >&5
4761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4762 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4763 as_fn_error $? "cannot compute suffix of object files: cannot compile
4764 See \`config.log' for more details" "$LINENO" 5; }
4766 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4769 $as_echo "$ac_cv_objext" >&6; }
4770 OBJEXT=$ac_cv_objext
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4773 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4774 if ${ac_cv_c_compiler_gnu+:} false; then :
4775 $as_echo_n "(cached) " >&6
4777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4778 /* end confdefs.h. */
4791 if ac_fn_c_try_compile "$LINENO"; then :
4796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4797 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4801 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4802 if test $ac_compiler_gnu = yes; then
4807 ac_test_CFLAGS=${CFLAGS+set}
4808 ac_save_CFLAGS=$CFLAGS
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4810 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4811 if ${ac_cv_prog_cc_g+:} false; then :
4812 $as_echo_n "(cached) " >&6
4814 ac_save_c_werror_flag=$ac_c_werror_flag
4815 ac_c_werror_flag=yes
4818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4819 /* end confdefs.h. */
4829 if ac_fn_c_try_compile "$LINENO"; then :
4833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4834 /* end confdefs.h. */
4844 if ac_fn_c_try_compile "$LINENO"; then :
4847 ac_c_werror_flag=$ac_save_c_werror_flag
4849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4850 /* end confdefs.h. */
4860 if ac_fn_c_try_compile "$LINENO"; then :
4863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4868 ac_c_werror_flag=$ac_save_c_werror_flag
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4871 $as_echo "$ac_cv_prog_cc_g" >&6; }
4872 if test "$ac_test_CFLAGS" = set; then
4873 CFLAGS=$ac_save_CFLAGS
4874 elif test $ac_cv_prog_cc_g = yes; then
4875 if test "$GCC" = yes; then
4881 if test "$GCC" = yes; then
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4888 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4889 if ${ac_cv_prog_cc_c89+:} false; then :
4890 $as_echo_n "(cached) " >&6
4892 ac_cv_prog_cc_c89=no
4894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4895 /* end confdefs.h. */
4899 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4900 struct buf { int x; };
4901 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4902 static char *e (p, i)
4908 static char *f (char * (*g) (char **, int), char **p, ...)
4913 s = g (p, va_arg (v,int));
4918 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4919 function prototypes and stuff, but not '\xHH' hex character constants.
4920 These don't provoke an error unfortunately, instead are silently treated
4921 as 'x'. The following induces an error, until -std is added to get
4922 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4923 array size at least. It's necessary to write '\x00'==0 to get something
4924 that's true only with -std. */
4925 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4927 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4928 inside strings and character constants. */
4930 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4932 int test (int i, double x);
4933 struct s1 {int (*f) (int a);};
4934 struct s2 {int (*f) (double a);};
4935 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4941 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4946 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4947 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4949 CC="$ac_save_CC $ac_arg"
4950 if ac_fn_c_try_compile "$LINENO"; then :
4951 ac_cv_prog_cc_c89=$ac_arg
4953 rm -f core conftest.err conftest.$ac_objext
4954 test "x$ac_cv_prog_cc_c89" != "xno" && break
4956 rm -f conftest.$ac_ext
4961 case "x$ac_cv_prog_cc_c89" in
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4964 $as_echo "none needed" >&6; } ;;
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4967 $as_echo "unsupported" >&6; } ;;
4969 CC="$CC $ac_cv_prog_cc_c89"
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4971 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4973 if test "x$ac_cv_prog_cc_c89" != xno; then :
4978 ac_cpp='$CPP $CPPFLAGS'
4979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4983 depcc="$CC" am_compiler_list=
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4986 $as_echo_n "checking dependency style of $depcc... " >&6; }
4987 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4988 $as_echo_n "(cached) " >&6
4990 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4991 # We make a subdir and do the tests there. Otherwise we can end up
4992 # making bogus files that we don't know about and never remove. For
4993 # instance it was reported that on HP-UX the gcc test will end up
4994 # making a dummy file named 'D' -- because '-MD' means "put the output
4998 # Copy depcomp to subdir because otherwise we won't find it if we're
4999 # using a relative directory.
5000 cp "$am_depcomp" conftest.dir
5002 # We will build objects and dependencies in a subdirectory because
5003 # it helps to detect inapplicable dependency modes. For instance
5004 # both Tru64's cc and ICC support -MD to output dependencies as a
5005 # side effect of compilation, but ICC will put the dependencies in
5006 # the current directory while Tru64 will put them in the object
5010 am_cv_CC_dependencies_compiler_type=none
5011 if test "$am_compiler_list" = ""; then
5012 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5015 case " $depcc " in #(
5016 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5019 for depmode in $am_compiler_list; do
5020 # Setup a source with many dependencies, because some compilers
5021 # like to wrap large dependency lists on column 80 (with \), and
5022 # we should not choose a depcomp mode which is confused by this.
5024 # We need to recreate these files for each test, as the compiler may
5025 # overwrite some of them when testing with obscure command lines.
5026 # This happens at least with the AIX C compiler.
5028 for i in 1 2 3 4 5 6; do
5029 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5030 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5031 # Solaris 10 /bin/sh.
5032 echo '/* dummy */' > sub/conftst$i.h
5034 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5036 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5037 # mode. It turns out that the SunPro C++ compiler does not properly
5038 # handle '-M -o', and we need to detect this. Also, some Intel
5039 # versions had trouble with output in subdirs.
5040 am__obj=sub/conftest.${OBJEXT-o}
5041 am__minus_obj="-o $am__obj"
5044 # This depmode causes a compiler race in universal mode.
5045 test "$am__universal" = false || continue
5048 # After this tag, mechanisms are not by side-effect, so they'll
5049 # only be used when explicitly requested.
5050 if test "x$enable_dependency_tracking" = xyes; then
5056 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5057 # This compiler won't grok '-c -o', but also, the minuso test has
5058 # not run yet. These depmodes are late enough in the game, and
5059 # so weak that their functioning should not be impacted.
5060 am__obj=conftest.${OBJEXT-o}
5065 if depmode=$depmode \
5066 source=sub/conftest.c object=$am__obj \
5067 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5068 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5069 >/dev/null 2>conftest.err &&
5070 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5071 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5072 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5073 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5074 # icc doesn't choke on unknown options, it will just issue warnings
5075 # or remarks (even with -Werror). So we grep stderr for any message
5076 # that says an option was ignored or not supported.
5077 # When given -MP, icc 7.0 and 7.1 complain thusly:
5078 # icc: Command line warning: ignoring option '-M'; no argument required
5079 # The diagnosis changed in icc 8.0:
5080 # icc: Command line remark: option '-MP' not supported
5081 if (grep 'ignoring option' conftest.err ||
5082 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5083 am_cv_CC_dependencies_compiler_type=$depmode
5092 am_cv_CC_dependencies_compiler_type=none
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5097 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5098 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5101 test "x$enable_dependency_tracking" != xno \
5102 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5104 am__fastdepCC_FALSE='#'
5106 am__fastdepCC_TRUE='#'
5107 am__fastdepCC_FALSE=
5111 case $ac_cv_prog_cc_stdc in #(
5113 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5116 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5117 if ${ac_cv_prog_cc_c99+:} false; then :
5118 $as_echo_n "(cached) " >&6
5120 ac_cv_prog_cc_c99=no
5122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5123 /* end confdefs.h. */
5125 #include <stdbool.h>
5130 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5131 #define debug(...) fprintf (stderr, __VA_ARGS__)
5132 #define showlist(...) puts (#__VA_ARGS__)
5133 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5135 test_varargs_macros (void)
5140 debug ("X = %d\n", x);
5141 showlist (The first, second, and third items.);
5142 report (x>y, "x is %d but y is %d", x, y);
5145 // Check long long types.
5146 #define BIG64 18446744073709551615ull
5147 #define BIG32 4294967295ul
5148 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5150 your preprocessor is broken;
5154 your preprocessor is broken;
5156 static long long int bignum = -9223372036854775807LL;
5157 static unsigned long long int ubignum = BIG64;
5159 struct incomplete_array
5167 const wchar_t *name;
5171 typedef const char *ccp;
5174 test_restrict (ccp restrict text)
5176 // See if C++-style comments work.
5177 // Iterate through items via the restricted pointer.
5178 // Also check for declarations in for loops.
5179 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5184 // Check varargs and va_copy.
5186 test_varargs (const char *format, ...)
5189 va_start (args, format);
5191 va_copy (args_copy, args);
5202 str = va_arg (args_copy, const char *);
5205 number = va_arg (args_copy, int);
5208 fnumber = va_arg (args_copy, double);
5223 _Bool success = false;
5226 if (test_restrict ("String literal") == 0)
5228 char *restrict newvar = "Another string";
5231 test_varargs ("s, d' f .", "string", 65, 34.234);
5232 test_varargs_macros ();
5234 // Check flexible array members.
5235 struct incomplete_array *ia =
5236 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5238 for (int i = 0; i < ia->datasize; ++i)
5239 ia->data[i] = i * 1.234;
5241 // Check named initializers.
5242 struct named_init ni = {
5244 .name = L"Test wide string",
5245 .average = 543.34343,
5250 int dynamic_array[ni.number];
5251 dynamic_array[ni.number - 1] = 543;
5253 // work around unused variable warnings
5254 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5255 || dynamic_array[ni.number - 1] != 543);
5261 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5263 CC="$ac_save_CC $ac_arg"
5264 if ac_fn_c_try_compile "$LINENO"; then :
5265 ac_cv_prog_cc_c99=$ac_arg
5267 rm -f core conftest.err conftest.$ac_objext
5268 test "x$ac_cv_prog_cc_c99" != "xno" && break
5270 rm -f conftest.$ac_ext
5275 case "x$ac_cv_prog_cc_c99" in
5277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5278 $as_echo "none needed" >&6; } ;;
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5281 $as_echo "unsupported" >&6; } ;;
5283 CC="$CC $ac_cv_prog_cc_c99"
5284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5285 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5287 if test "x$ac_cv_prog_cc_c99" != xno; then :
5288 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5291 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5292 if ${ac_cv_prog_cc_c89+:} false; then :
5293 $as_echo_n "(cached) " >&6
5295 ac_cv_prog_cc_c89=no
5297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5298 /* end confdefs.h. */
5302 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5303 struct buf { int x; };
5304 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5305 static char *e (p, i)
5311 static char *f (char * (*g) (char **, int), char **p, ...)
5316 s = g (p, va_arg (v,int));
5321 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5322 function prototypes and stuff, but not '\xHH' hex character constants.
5323 These don't provoke an error unfortunately, instead are silently treated
5324 as 'x'. The following induces an error, until -std is added to get
5325 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5326 array size at least. It's necessary to write '\x00'==0 to get something
5327 that's true only with -std. */
5328 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5330 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5331 inside strings and character constants. */
5333 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5335 int test (int i, double x);
5336 struct s1 {int (*f) (int a);};
5337 struct s2 {int (*f) (double a);};
5338 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5344 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5349 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5350 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5352 CC="$ac_save_CC $ac_arg"
5353 if ac_fn_c_try_compile "$LINENO"; then :
5354 ac_cv_prog_cc_c89=$ac_arg
5356 rm -f core conftest.err conftest.$ac_objext
5357 test "x$ac_cv_prog_cc_c89" != "xno" && break
5359 rm -f conftest.$ac_ext
5364 case "x$ac_cv_prog_cc_c89" in
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5367 $as_echo "none needed" >&6; } ;;
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5370 $as_echo "unsupported" >&6; } ;;
5372 CC="$CC $ac_cv_prog_cc_c89"
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5374 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5376 if test "x$ac_cv_prog_cc_c89" != xno; then :
5377 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5379 ac_cv_prog_cc_stdc=no
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5386 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5387 if ${ac_cv_prog_cc_stdc+:} false; then :
5388 $as_echo_n "(cached) " >&6
5391 case $ac_cv_prog_cc_stdc in #(
5393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5394 $as_echo "unsupported" >&6; } ;; #(
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5397 $as_echo "none needed" >&6; } ;; #(
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5400 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5403 if test "x$CC" != xcc; then
5404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5405 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5408 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5410 set dummy $CC; ac_cc=`$as_echo "$2" |
5411 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5412 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
5413 $as_echo_n "(cached) " >&6
5415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5416 /* end confdefs.h. */
5426 # Make sure it works both with $CC and with simple cc.
5427 # We do the test twice because some compilers refuse to overwrite an
5428 # existing .o file with -o, though they will create one.
5429 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5431 if { { case "(($ac_try" in
5432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5433 *) ac_try_echo=$ac_try;;
5435 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5436 $as_echo "$ac_try_echo"; } >&5
5437 (eval "$ac_try") 2>&5
5439 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5440 test $ac_status = 0; } &&
5441 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5443 *) ac_try_echo=$ac_try;;
5445 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5446 $as_echo "$ac_try_echo"; } >&5
5447 (eval "$ac_try") 2>&5
5449 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5450 test $ac_status = 0; };
5452 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5453 if test "x$CC" != xcc; then
5454 # Test first that cc exists at all.
5455 if { ac_try='cc -c conftest.$ac_ext >&5'
5456 { { case "(($ac_try" in
5457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5458 *) ac_try_echo=$ac_try;;
5460 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5461 $as_echo "$ac_try_echo"; } >&5
5462 (eval "$ac_try") 2>&5
5464 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5465 test $ac_status = 0; }; }; then
5466 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5468 if { { case "(($ac_try" in
5469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5470 *) ac_try_echo=$ac_try;;
5472 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5473 $as_echo "$ac_try_echo"; } >&5
5474 (eval "$ac_try") 2>&5
5476 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5477 test $ac_status = 0; } &&
5478 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5480 *) ac_try_echo=$ac_try;;
5482 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5483 $as_echo "$ac_try_echo"; } >&5
5484 (eval "$ac_try") 2>&5
5486 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5487 test $ac_status = 0; };
5492 # cc exists but doesn't like -o.
5493 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5498 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5500 rm -f core conftest*
5503 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5505 $as_echo "yes" >&6; }
5507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508 $as_echo "no" >&6; }
5510 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5514 # FIXME: we rely on the cache variable name because
5515 # there is no other way.
5517 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5518 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5519 if test "$am_t" != yes; then
5520 # Losing compiler, so override with the script.
5521 # FIXME: It is wrong to rewrite CC.
5522 # But if we don't then we get into trouble of one sort or another.
5523 # A longer-term fix would be to have automake use am__CC in this case,
5524 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5525 CC="$am_aux_dir/compile $CC"
5530 ac_cpp='$CPP $CPPFLAGS'
5531 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5532 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5533 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5535 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5536 # On Suns, sometimes $CPP names a directory.
5537 if test -n "$CPP" && test -d "$CPP"; then
5540 if test -z "$CPP"; then
5541 if ${ac_cv_prog_CPP+:} false; then :
5542 $as_echo_n "(cached) " >&6
5544 # Double quotes because CPP needs to be expanded
5545 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5548 for ac_c_preproc_warn_flag in '' yes
5550 # Use a header file that comes with gcc, so configuring glibc
5551 # with a fresh cross-compiler works.
5552 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5553 # <limits.h> exists even on freestanding compilers.
5554 # On the NeXT, cc -E runs the code through the compiler's parser,
5555 # not just through cpp. "Syntax error" is here to catch this case.
5556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5557 /* end confdefs.h. */
5559 # include <limits.h>
5561 # include <assert.h>
5565 if ac_fn_c_try_cpp "$LINENO"; then :
5568 # Broken: fails on valid input.
5571 rm -f conftest.err conftest.i conftest.$ac_ext
5573 # OK, works on sane cases. Now check whether nonexistent headers
5574 # can be detected and how.
5575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5576 /* end confdefs.h. */
5577 #include <ac_nonexistent.h>
5579 if ac_fn_c_try_cpp "$LINENO"; then :
5580 # Broken: success on invalid input.
5583 # Passes both tests.
5587 rm -f conftest.err conftest.i conftest.$ac_ext
5590 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5591 rm -f conftest.i conftest.err conftest.$ac_ext
5592 if $ac_preproc_ok; then :
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5605 $as_echo "$CPP" >&6; }
5607 for ac_c_preproc_warn_flag in '' yes
5609 # Use a header file that comes with gcc, so configuring glibc
5610 # with a fresh cross-compiler works.
5611 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5612 # <limits.h> exists even on freestanding compilers.
5613 # On the NeXT, cc -E runs the code through the compiler's parser,
5614 # not just through cpp. "Syntax error" is here to catch this case.
5615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5616 /* end confdefs.h. */
5618 # include <limits.h>
5620 # include <assert.h>
5624 if ac_fn_c_try_cpp "$LINENO"; then :
5627 # Broken: fails on valid input.
5630 rm -f conftest.err conftest.i conftest.$ac_ext
5632 # OK, works on sane cases. Now check whether nonexistent headers
5633 # can be detected and how.
5634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5635 /* end confdefs.h. */
5636 #include <ac_nonexistent.h>
5638 if ac_fn_c_try_cpp "$LINENO"; then :
5639 # Broken: success on invalid input.
5642 # Passes both tests.
5646 rm -f conftest.err conftest.i conftest.$ac_ext
5649 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5650 rm -f conftest.i conftest.err conftest.$ac_ext
5651 if $ac_preproc_ok; then :
5654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5656 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5657 See \`config.log' for more details" "$LINENO" 5; }
5661 ac_cpp='$CPP $CPPFLAGS'
5662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5666 if test -n "$ac_tool_prefix"; then
5667 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5668 set dummy ${ac_tool_prefix}nm; ac_word=$2
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5670 $as_echo_n "checking for $ac_word... " >&6; }
5671 if ${ac_cv_prog_NM+:} false; then :
5672 $as_echo_n "(cached) " >&6
5674 if test -n "$NM"; then
5675 ac_cv_prog_NM="$NM" # Let the user override the test.
5677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681 test -z "$as_dir" && as_dir=.
5682 for ac_exec_ext in '' $ac_executable_extensions; do
5683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5684 ac_cv_prog_NM="${ac_tool_prefix}nm"
5685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5695 if test -n "$NM"; then
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
5697 $as_echo "$NM" >&6; }
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700 $as_echo "no" >&6; }
5705 if test -z "$ac_cv_prog_NM"; then
5707 # Extract the first word of "nm", so it can be a program name with args.
5708 set dummy nm; ac_word=$2
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710 $as_echo_n "checking for $ac_word... " >&6; }
5711 if ${ac_cv_prog_ac_ct_NM+:} false; then :
5712 $as_echo_n "(cached) " >&6
5714 if test -n "$ac_ct_NM"; then
5715 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5721 test -z "$as_dir" && as_dir=.
5722 for ac_exec_ext in '' $ac_executable_extensions; do
5723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5724 ac_cv_prog_ac_ct_NM="nm"
5725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5735 if test -n "$ac_ct_NM"; then
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
5737 $as_echo "$ac_ct_NM" >&6; }
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740 $as_echo "no" >&6; }
5743 if test "x$ac_ct_NM" = x; then
5746 case $cross_compiling:$ac_tool_warned in
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5749 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5750 ac_tool_warned=yes ;;
5758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5759 $as_echo_n "checking whether ln -s works... " >&6; }
5761 if test "$LN_S" = "ln -s"; then
5762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5763 $as_echo "yes" >&6; }
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5766 $as_echo "no, using $LN_S" >&6; }
5769 if test -n "$ac_tool_prefix"; then
5770 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5771 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5773 $as_echo_n "checking for $ac_word... " >&6; }
5774 if ${ac_cv_prog_RANLIB+:} false; then :
5775 $as_echo_n "(cached) " >&6
5777 if test -n "$RANLIB"; then
5778 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784 test -z "$as_dir" && as_dir=.
5785 for ac_exec_ext in '' $ac_executable_extensions; do
5786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5787 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797 RANLIB=$ac_cv_prog_RANLIB
5798 if test -n "$RANLIB"; then
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5800 $as_echo "$RANLIB" >&6; }
5802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5803 $as_echo "no" >&6; }
5808 if test -z "$ac_cv_prog_RANLIB"; then
5809 ac_ct_RANLIB=$RANLIB
5810 # Extract the first word of "ranlib", so it can be a program name with args.
5811 set dummy ranlib; ac_word=$2
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5813 $as_echo_n "checking for $ac_word... " >&6; }
5814 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5815 $as_echo_n "(cached) " >&6
5817 if test -n "$ac_ct_RANLIB"; then
5818 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5824 test -z "$as_dir" && as_dir=.
5825 for ac_exec_ext in '' $ac_executable_extensions; do
5826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5827 ac_cv_prog_ac_ct_RANLIB="ranlib"
5828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5837 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5838 if test -n "$ac_ct_RANLIB"; then
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5840 $as_echo "$ac_ct_RANLIB" >&6; }
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5843 $as_echo "no" >&6; }
5846 if test "x$ac_ct_RANLIB" = x; then
5849 case $cross_compiling:$ac_tool_warned in
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5853 ac_tool_warned=yes ;;
5855 RANLIB=$ac_ct_RANLIB
5858 RANLIB="$ac_cv_prog_RANLIB"
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
5862 $as_echo_n "checking for a POSIX-compliant shell... " >&6; }
5863 if ${ac_cv_path_shell+:} false; then :
5864 $as_echo_n "(cached) " >&6
5867 # Test the noclobber option, using the portable POSIX.2 syntax.
5871 >|conftest.c || exit
5872 !>conftest.c || exit
5873 # Test that $(...) works.
5874 test "$(expr 3 + 4)" -eq 7 || exit
5881 if ("$SHELL" -c "$ac_command") 2>/dev/null; then
5882 ac_cv_path_shell=$SHELL
5886 case $ac_cv_path_shell in
5888 # Prefer shells that are more likely to be installed in the
5889 # same place on all hosts of this platform. Therefore, prefer
5890 # shells in /bin and /usr/bin to shells in the installer's
5891 # PATH. Also, loop through PATH first and then through
5892 # shells, since less-"nice" shells in /bin and /usr/bin are
5893 # more likely to be installed than "nicer" shells elsewhere.
5894 as_save_IFS=$IFS; IFS=:
5895 for as_dir in /bin /usr/bin $PATH
5900 for ac_base in sh bash ksh sh5; do
5902 if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
5903 ac_cv_path_shell=$as_dir/$ac_base
5907 case $ac_cv_path_shell in
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
5917 $as_echo "$ac_cv_path_shell" >&6; }
5918 SHELL=$ac_cv_path_shell
5919 if test "$SHELL" = no; then
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
5922 $as_echo "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5929 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5930 if ${ac_cv_path_GREP+:} false; then :
5931 $as_echo_n "(cached) " >&6
5933 if test -z "$GREP"; then
5934 ac_path_GREP_found=false
5935 # Loop through the user's path and test for each of PROGNAME-LIST
5936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5940 test -z "$as_dir" && as_dir=.
5941 for ac_prog in grep ggrep; do
5942 for ac_exec_ext in '' $ac_executable_extensions; do
5943 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5944 as_fn_executable_p "$ac_path_GREP" || continue
5945 # Check for GNU ac_path_GREP and select it if it is found.
5946 # Check for GNU $ac_path_GREP
5947 case `"$ac_path_GREP" --version 2>&1` in
5949 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5952 $as_echo_n 0123456789 >"conftest.in"
5955 cat "conftest.in" "conftest.in" >"conftest.tmp"
5956 mv "conftest.tmp" "conftest.in"
5957 cp "conftest.in" "conftest.nl"
5958 $as_echo 'GREP' >> "conftest.nl"
5959 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5960 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5961 as_fn_arith $ac_count + 1 && ac_count=$as_val
5962 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5963 # Best one so far, save it but keep looking for a better one
5964 ac_cv_path_GREP="$ac_path_GREP"
5965 ac_path_GREP_max=$ac_count
5967 # 10*(2^10) chars as input seems more than enough
5968 test $ac_count -gt 10 && break
5970 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5973 $ac_path_GREP_found && break 3
5978 if test -z "$ac_cv_path_GREP"; then
5979 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5982 ac_cv_path_GREP=$GREP
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5987 $as_echo "$ac_cv_path_GREP" >&6; }
5988 GREP="$ac_cv_path_GREP"
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5992 $as_echo_n "checking for egrep... " >&6; }
5993 if ${ac_cv_path_EGREP+:} false; then :
5994 $as_echo_n "(cached) " >&6
5996 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5997 then ac_cv_path_EGREP="$GREP -E"
5999 if test -z "$EGREP"; then
6000 ac_path_EGREP_found=false
6001 # Loop through the user's path and test for each of PROGNAME-LIST
6002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006 test -z "$as_dir" && as_dir=.
6007 for ac_prog in egrep; do
6008 for ac_exec_ext in '' $ac_executable_extensions; do
6009 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6010 as_fn_executable_p "$ac_path_EGREP" || continue
6011 # Check for GNU ac_path_EGREP and select it if it is found.
6012 # Check for GNU $ac_path_EGREP
6013 case `"$ac_path_EGREP" --version 2>&1` in
6015 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6018 $as_echo_n 0123456789 >"conftest.in"
6021 cat "conftest.in" "conftest.in" >"conftest.tmp"
6022 mv "conftest.tmp" "conftest.in"
6023 cp "conftest.in" "conftest.nl"
6024 $as_echo 'EGREP' >> "conftest.nl"
6025 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6026 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6027 as_fn_arith $ac_count + 1 && ac_count=$as_val
6028 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6029 # Best one so far, save it but keep looking for a better one
6030 ac_cv_path_EGREP="$ac_path_EGREP"
6031 ac_path_EGREP_max=$ac_count
6033 # 10*(2^10) chars as input seems more than enough
6034 test $ac_count -gt 10 && break
6036 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039 $ac_path_EGREP_found && break 3
6044 if test -z "$ac_cv_path_EGREP"; then
6045 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048 ac_cv_path_EGREP=$EGREP
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6054 $as_echo "$ac_cv_path_EGREP" >&6; }
6055 EGREP="$ac_cv_path_EGREP"
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6061 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6062 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6063 $as_echo_n "(cached) " >&6
6066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6067 /* end confdefs.h. */
6074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6075 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6076 gl_cv_c_amsterdam_compiler=yes
6078 gl_cv_c_amsterdam_compiler=no
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6085 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6086 if test -z "$AR"; then
6087 if test $gl_cv_c_amsterdam_compiler = yes; then
6089 if test -z "$ARFLAGS"; then
6093 if test -n "$ac_tool_prefix"; then
6094 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6095 set dummy ${ac_tool_prefix}ar; ac_word=$2
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6097 $as_echo_n "checking for $ac_word... " >&6; }
6098 if ${ac_cv_prog_AR+:} false; then :
6099 $as_echo_n "(cached) " >&6
6101 if test -n "$AR"; then
6102 ac_cv_prog_AR="$AR" # Let the user override the test.
6104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6108 test -z "$as_dir" && as_dir=.
6109 for ac_exec_ext in '' $ac_executable_extensions; do
6110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6111 ac_cv_prog_AR="${ac_tool_prefix}ar"
6112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6122 if test -n "$AR"; then
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6124 $as_echo "$AR" >&6; }
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6127 $as_echo "no" >&6; }
6132 if test -z "$ac_cv_prog_AR"; then
6134 # Extract the first word of "ar", so it can be a program name with args.
6135 set dummy ar; ac_word=$2
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6137 $as_echo_n "checking for $ac_word... " >&6; }
6138 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6139 $as_echo_n "(cached) " >&6
6141 if test -n "$ac_ct_AR"; then
6142 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148 test -z "$as_dir" && as_dir=.
6149 for ac_exec_ext in '' $ac_executable_extensions; do
6150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6151 ac_cv_prog_ac_ct_AR="ar"
6152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6161 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6162 if test -n "$ac_ct_AR"; then
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6164 $as_echo "$ac_ct_AR" >&6; }
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6167 $as_echo "no" >&6; }
6170 if test "x$ac_ct_AR" = x; then
6173 case $cross_compiling:$ac_tool_warned in
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6176 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6177 ac_tool_warned=yes ;;
6185 if test -z "$ARFLAGS"; then
6190 if test -z "$ARFLAGS"; then
6196 if test -z "$RANLIB"; then
6197 if test $gl_cv_c_amsterdam_compiler = yes; then
6200 if test -n "$ac_tool_prefix"; then
6201 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6202 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6204 $as_echo_n "checking for $ac_word... " >&6; }
6205 if ${ac_cv_prog_RANLIB+:} false; then :
6206 $as_echo_n "(cached) " >&6
6208 if test -n "$RANLIB"; then
6209 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6215 test -z "$as_dir" && as_dir=.
6216 for ac_exec_ext in '' $ac_executable_extensions; do
6217 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6218 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6228 RANLIB=$ac_cv_prog_RANLIB
6229 if test -n "$RANLIB"; then
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6231 $as_echo "$RANLIB" >&6; }
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6234 $as_echo "no" >&6; }
6239 if test -z "$ac_cv_prog_RANLIB"; then
6240 ac_ct_RANLIB=$RANLIB
6241 # Extract the first word of "ranlib", so it can be a program name with args.
6242 set dummy ranlib; ac_word=$2
6243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6244 $as_echo_n "checking for $ac_word... " >&6; }
6245 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6246 $as_echo_n "(cached) " >&6
6248 if test -n "$ac_ct_RANLIB"; then
6249 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255 test -z "$as_dir" && as_dir=.
6256 for ac_exec_ext in '' $ac_executable_extensions; do
6257 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258 ac_cv_prog_ac_ct_RANLIB="ranlib"
6259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6268 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6269 if test -n "$ac_ct_RANLIB"; then
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6271 $as_echo "$ac_ct_RANLIB" >&6; }
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6274 $as_echo "no" >&6; }
6277 if test "x$ac_ct_RANLIB" = x; then
6280 case $cross_compiling:$ac_tool_warned in
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6283 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6284 ac_tool_warned=yes ;;
6286 RANLIB=$ac_ct_RANLIB
6289 RANLIB="$ac_cv_prog_RANLIB"
6296 # Make sure we can run config.sub.
6297 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6298 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6301 $as_echo_n "checking build system type... " >&6; }
6302 if ${ac_cv_build+:} false; then :
6303 $as_echo_n "(cached) " >&6
6305 ac_build_alias=$build_alias
6306 test "x$ac_build_alias" = x &&
6307 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6308 test "x$ac_build_alias" = x &&
6309 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6310 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6311 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6315 $as_echo "$ac_cv_build" >&6; }
6316 case $ac_cv_build in
6318 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6321 ac_save_IFS=$IFS; IFS='-'
6327 # Remember, the first character of IFS is used to create $*,
6328 # except with old shells:
6331 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6335 $as_echo_n "checking host system type... " >&6; }
6336 if ${ac_cv_host+:} false; then :
6337 $as_echo_n "(cached) " >&6
6339 if test "x$host_alias" = x; then
6340 ac_cv_host=$ac_cv_build
6342 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6343 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6348 $as_echo "$ac_cv_host" >&6; }
6351 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6354 ac_save_IFS=$IFS; IFS='-'
6360 # Remember, the first character of IFS is used to create $*,
6361 # except with old shells:
6364 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6368 $as_echo_n "checking for ANSI C header files... " >&6; }
6369 if ${ac_cv_header_stdc+:} false; then :
6370 $as_echo_n "(cached) " >&6
6372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6373 /* end confdefs.h. */
6387 if ac_fn_c_try_compile "$LINENO"; then :
6388 ac_cv_header_stdc=yes
6390 ac_cv_header_stdc=no
6392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6394 if test $ac_cv_header_stdc = yes; then
6395 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6397 /* end confdefs.h. */
6401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6402 $EGREP "memchr" >/dev/null 2>&1; then :
6405 ac_cv_header_stdc=no
6411 if test $ac_cv_header_stdc = yes; then
6412 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6414 /* end confdefs.h. */
6418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6419 $EGREP "free" >/dev/null 2>&1; then :
6422 ac_cv_header_stdc=no
6428 if test $ac_cv_header_stdc = yes; then
6429 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6430 if test "$cross_compiling" = yes; then :
6433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6434 /* end confdefs.h. */
6437 #if ((' ' & 0x0FF) == 0x020)
6438 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6439 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6441 # define ISLOWER(c) \
6442 (('a' <= (c) && (c) <= 'i') \
6443 || ('j' <= (c) && (c) <= 'r') \
6444 || ('s' <= (c) && (c) <= 'z'))
6445 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6448 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6453 for (i = 0; i < 256; i++)
6454 if (XOR (islower (i), ISLOWER (i))
6455 || toupper (i) != TOUPPER (i))
6460 if ac_fn_c_try_run "$LINENO"; then :
6463 ac_cv_header_stdc=no
6465 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6466 conftest.$ac_objext conftest.beam conftest.$ac_ext
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6472 $as_echo "$ac_cv_header_stdc" >&6; }
6473 if test $ac_cv_header_stdc = yes; then
6475 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6479 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6480 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6481 inttypes.h stdint.h unistd.h
6483 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6484 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6486 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6487 cat >>confdefs.h <<_ACEOF
6488 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6499 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6500 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6507 if test "$MINIX" = yes; then
6509 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6512 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6515 $as_echo "#define _MINIX 1" >>confdefs.h
6522 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6529 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6530 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6531 $as_echo_n "(cached) " >&6
6533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h. */
6536 # define __EXTENSIONS__ 1
6537 $ac_includes_default
6546 if ac_fn_c_try_compile "$LINENO"; then :
6547 ac_cv_safe_to_define___extensions__=yes
6549 ac_cv_safe_to_define___extensions__=no
6551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6554 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6555 test $ac_cv_safe_to_define___extensions__ = yes &&
6556 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6558 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6560 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6562 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6564 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6566 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6576 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6577 if ${ac_cv_sys_largefile_source+:} false; then :
6578 $as_echo_n "(cached) " >&6
6581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6582 /* end confdefs.h. */
6583 #include <sys/types.h> /* for off_t */
6588 int (*fp) (FILE *, off_t, int) = fseeko;
6589 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6594 if ac_fn_c_try_link "$LINENO"; then :
6595 ac_cv_sys_largefile_source=no; break
6597 rm -f core conftest.err conftest.$ac_objext \
6598 conftest$ac_exeext conftest.$ac_ext
6599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6600 /* end confdefs.h. */
6601 #define _LARGEFILE_SOURCE 1
6602 #include <sys/types.h> /* for off_t */
6607 int (*fp) (FILE *, off_t, int) = fseeko;
6608 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6613 if ac_fn_c_try_link "$LINENO"; then :
6614 ac_cv_sys_largefile_source=1; break
6616 rm -f core conftest.err conftest.$ac_objext \
6617 conftest$ac_exeext conftest.$ac_ext
6618 ac_cv_sys_largefile_source=unknown
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6623 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6624 case $ac_cv_sys_largefile_source in #(
6627 cat >>confdefs.h <<_ACEOF
6628 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6634 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6635 # in glibc 2.1.3, but that breaks too many other things.
6636 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6637 if test $ac_cv_sys_largefile_source != unknown; then
6639 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6646 # IEEE behaviour is the default on all CPUs except Alpha and SH
6647 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6648 # and the GCC 4.1.2 manual).
6651 # On Alpha systems, a compiler option provides the behaviour.
6652 # See the ieee(3) manual page, also available at
6653 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6654 if test -n "$GCC"; then
6655 # GCC has the option -mieee.
6656 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6657 CPPFLAGS="$CPPFLAGS -mieee"
6659 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6660 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6661 CPPFLAGS="$CPPFLAGS -ieee"
6665 if test -n "$GCC"; then
6666 # GCC has the option -mieee.
6667 CPPFLAGS="$CPPFLAGS -mieee"
6672 # Check whether --enable-largefile was given.
6673 if test "${enable_largefile+set}" = set; then :
6674 enableval=$enable_largefile;
6677 if test "$enable_largefile" != no; then
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6680 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6681 if ${ac_cv_sys_largefile_CC+:} false; then :
6682 $as_echo_n "(cached) " >&6
6684 ac_cv_sys_largefile_CC=no
6685 if test "$GCC" != yes; then
6688 # IRIX 6.2 and later do not support large files by default,
6689 # so use the C compiler's -n32 option if that helps.
6690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6691 /* end confdefs.h. */
6692 #include <sys/types.h>
6693 /* Check that off_t can represent 2**63 - 1 correctly.
6694 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6695 since some C++ compilers masquerading as C compilers
6696 incorrectly reject 9223372036854775807. */
6697 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6698 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6699 && LARGE_OFF_T % 2147483647 == 1)
6709 if ac_fn_c_try_compile "$LINENO"; then :
6712 rm -f core conftest.err conftest.$ac_objext
6714 if ac_fn_c_try_compile "$LINENO"; then :
6715 ac_cv_sys_largefile_CC=' -n32'; break
6717 rm -f core conftest.err conftest.$ac_objext
6721 rm -f conftest.$ac_ext
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6725 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6726 if test "$ac_cv_sys_largefile_CC" != no; then
6727 CC=$CC$ac_cv_sys_largefile_CC
6730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6731 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6732 if ${ac_cv_sys_file_offset_bits+:} false; then :
6733 $as_echo_n "(cached) " >&6
6736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6737 /* end confdefs.h. */
6738 #include <sys/types.h>
6739 /* Check that off_t can represent 2**63 - 1 correctly.
6740 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6741 since some C++ compilers masquerading as C compilers
6742 incorrectly reject 9223372036854775807. */
6743 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6744 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6745 && LARGE_OFF_T % 2147483647 == 1)
6755 if ac_fn_c_try_compile "$LINENO"; then :
6756 ac_cv_sys_file_offset_bits=no; break
6758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6760 /* end confdefs.h. */
6761 #define _FILE_OFFSET_BITS 64
6762 #include <sys/types.h>
6763 /* Check that off_t can represent 2**63 - 1 correctly.
6764 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6765 since some C++ compilers masquerading as C compilers
6766 incorrectly reject 9223372036854775807. */
6767 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6768 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6769 && LARGE_OFF_T % 2147483647 == 1)
6779 if ac_fn_c_try_compile "$LINENO"; then :
6780 ac_cv_sys_file_offset_bits=64; break
6782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6783 ac_cv_sys_file_offset_bits=unknown
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6788 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6789 case $ac_cv_sys_file_offset_bits in #(
6792 cat >>confdefs.h <<_ACEOF
6793 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6798 if test $ac_cv_sys_file_offset_bits = unknown; then
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6800 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6801 if ${ac_cv_sys_large_files+:} false; then :
6802 $as_echo_n "(cached) " >&6
6805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6806 /* end confdefs.h. */
6807 #include <sys/types.h>
6808 /* Check that off_t can represent 2**63 - 1 correctly.
6809 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6810 since some C++ compilers masquerading as C compilers
6811 incorrectly reject 9223372036854775807. */
6812 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6813 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6814 && LARGE_OFF_T % 2147483647 == 1)
6824 if ac_fn_c_try_compile "$LINENO"; then :
6825 ac_cv_sys_large_files=no; break
6827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829 /* end confdefs.h. */
6830 #define _LARGE_FILES 1
6831 #include <sys/types.h>
6832 /* Check that off_t can represent 2**63 - 1 correctly.
6833 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6834 since some C++ compilers masquerading as C compilers
6835 incorrectly reject 9223372036854775807. */
6836 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6837 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6838 && LARGE_OFF_T % 2147483647 == 1)
6848 if ac_fn_c_try_compile "$LINENO"; then :
6849 ac_cv_sys_large_files=1; break
6851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6852 ac_cv_sys_large_files=unknown
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6857 $as_echo "$ac_cv_sys_large_files" >&6; }
6858 case $ac_cv_sys_large_files in #(
6861 cat >>confdefs.h <<_ACEOF
6862 #define _LARGE_FILES $ac_cv_sys_large_files
6877 # Check whether --enable-threads was given.
6878 if test "${enable_threads+set}" = set; then :
6879 enableval=$enable_threads; gl_use_threads=$enableval
6881 if test -n "$gl_use_threads_default"; then
6882 gl_use_threads="$gl_use_threads_default"
6885 osf*) gl_use_threads=no ;;
6888 1.[0-5].*) gl_use_threads=no ;;
6889 *) gl_use_threads=yes ;;
6892 *) gl_use_threads=yes ;;
6898 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
6899 # For using <pthread.h>:
6902 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6903 # groks <pthread.h>. cc also understands the flag -pthread, but
6904 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6905 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6906 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6907 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6908 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6911 # Some systems optimize for single-threaded programs by default, and
6912 # need special flags to disable these optimizations. For example, the
6913 # definition of 'errno' in <errno.h>.
6915 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6916 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6923 # Code from module alloca-opt:
6924 # Code from module announce-gen:
6925 # Code from module at-internal:
6926 # Code from module c-ctype:
6927 # Code from module c-strcase:
6928 # Code from module c-strcaseeq:
6929 # Code from module calloc:
6930 # Code from module calloc-gnu:
6931 # Code from module calloc-posix:
6932 # Code from module chdir:
6933 # Code from module chdir-long:
6934 # Code from module clock-time:
6935 # Code from module cloexec:
6936 # Code from module close:
6937 # Code from module close-stream:
6938 # Code from module closedir:
6939 # Code from module closein:
6940 # Code from module closeout:
6941 # Code from module configmake:
6942 # Code from module dirent:
6943 # Code from module dirent-safer:
6944 # Code from module dirfd:
6945 # Code from module dirname-lgpl:
6946 # Code from module do-release-commit-and-tag:
6947 # Code from module dosname:
6948 # Code from module double-slash-root:
6949 # Code from module dup:
6950 # Code from module dup2:
6951 # Code from module errno:
6952 # Code from module error:
6953 # Code from module exitfail:
6954 # Code from module extensions:
6956 # Code from module fchdir:
6957 # Code from module fclose:
6958 # Code from module fcntl:
6959 # Code from module fcntl-h:
6960 # Code from module fcntl-safer:
6961 # Code from module fd-hook:
6962 # Code from module fdl:
6963 # Code from module fdopendir:
6964 # Code from module fflush:
6966 # Code from module filename:
6967 # Code from module filenamecat-lgpl:
6968 # Code from module float:
6969 # Code from module fpending:
6970 # Code from module fpieee:
6972 # Code from module fprintf-posix:
6973 # Code from module fpucw:
6974 # Code from module fpurge:
6975 # Code from module freadahead:
6976 # Code from module freading:
6977 # Code from module frexp-nolibm:
6978 # Code from module frexpl-nolibm:
6979 # Code from module fseek:
6980 # Code from module fseeko:
6982 # Code from module fseterr:
6983 # Code from module fstat:
6984 # Code from module ftell:
6985 # Code from module ftello:
6987 # Code from module gendocs:
6988 # Code from module getcwd-lgpl:
6989 # Code from module getdtablesize:
6990 # Code from module getopt-gnu:
6991 # Code from module getopt-posix:
6992 # Code from module gettext-h:
6993 # Code from module gettime:
6994 # Code from module gettimeofday:
6995 # Code from module git-version-gen:
6996 # Code from module gitlog-to-changelog:
6997 # Code from module gnu-make:
6998 # Code from module gnu-web-doc-update:
6999 # Code from module gnumakefile:
7000 # Code from module gnupload:
7001 # Code from module havelib:
7002 # Code from module ignore-value:
7003 # Code from module include_next:
7004 # Code from module inline:
7005 # Code from module intprops:
7006 # Code from module isnand-nolibm:
7007 # Code from module isnanf-nolibm:
7008 # Code from module isnanl-nolibm:
7009 # Code from module largefile:
7011 # Code from module lib-ignore:
7012 # Code from module localcharset:
7013 # Code from module lock:
7014 # Code from module lseek:
7015 # Code from module lstat:
7016 # Code from module maintainer-makefile:
7017 # Code from module malloc-gnu:
7018 # Code from module malloc-posix:
7019 # Code from module manywarnings:
7020 # Code from module math:
7021 # Code from module mbrtowc:
7022 # Code from module mbsinit:
7023 # Code from module memchr:
7024 # Code from module mempcpy:
7025 # Code from module memrchr:
7026 # Code from module msvc-inval:
7027 # Code from module msvc-nothrow:
7028 # Code from module multiarch:
7029 # Code from module nocrash:
7030 # Code from module open:
7031 # Code from module openat:
7032 # Code from module openat-die:
7033 # Code from module openat-h:
7034 # Code from module opendir:
7035 # Code from module pathmax:
7036 # Code from module perror:
7037 # Code from module printf-frexp:
7038 # Code from module printf-frexpl:
7039 # Code from module printf-posix:
7040 # Code from module printf-safe:
7041 # Code from module quotearg:
7042 # Code from module quotearg-simple:
7043 # Code from module readdir:
7044 # Code from module readme-release:
7045 # Code from module realloc-gnu:
7046 # Code from module realloc-posix:
7047 # Code from module save-cwd:
7048 # Code from module savedir:
7049 # Code from module signbit:
7050 # Code from module size_max:
7051 # Code from module snippet/_Noreturn:
7052 # Code from module snippet/arg-nonnull:
7053 # Code from module snippet/c++defs:
7054 # Code from module snippet/unused-parameter:
7055 # Code from module snippet/warn-on-use:
7056 # Code from module ssize_t:
7057 # Code from module stat:
7058 # Code from module stat-time:
7059 # Code from module stdbool:
7060 # Code from module stddef:
7061 # Code from module stdint:
7062 # Code from module stdio:
7063 # Code from module stdlib:
7064 # Code from module strdup-posix:
7065 # Code from module streq:
7066 # Code from module strerror:
7067 # Code from module strerror-override:
7068 # Code from module strerror_r-posix:
7069 # Code from module string:
7070 # Code from module sys_stat:
7071 # Code from module sys_time:
7072 # Code from module sys_types:
7073 # Code from module threadlib:
7077 # Code from module time:
7078 # Code from module timespec:
7079 # Code from module unistd:
7080 # Code from module unistd-safer:
7081 # Code from module update-copyright:
7082 # Code from module useless-if-before-free:
7083 # Code from module utimens:
7084 # Code from module vasnprintf:
7085 # Code from module vc-list-files:
7086 # Code from module verify:
7087 # Code from module vfprintf-posix:
7088 # Code from module warnings:
7089 # Code from module wchar:
7090 # Code from module wctype-h:
7091 # Code from module xalloc:
7092 # Code from module xalloc-die:
7093 # Code from module xalloc-oversized:
7094 # Code from module xsize:
7095 # Code from module yesno:
7103 LIBC_FATAL_STDERR_=1
7104 export LIBC_FATAL_STDERR_
7106 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7107 if test "x$ac_cv_type_size_t" = xyes; then :
7111 cat >>confdefs.h <<_ACEOF
7112 #define size_t unsigned int
7117 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7118 # for constant arguments. Useless!
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7120 $as_echo_n "checking for working alloca.h... " >&6; }
7121 if ${ac_cv_working_alloca_h+:} false; then :
7122 $as_echo_n "(cached) " >&6
7124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7125 /* end confdefs.h. */
7130 char *p = (char *) alloca (2 * sizeof (int));
7136 if ac_fn_c_try_link "$LINENO"; then :
7137 ac_cv_working_alloca_h=yes
7139 ac_cv_working_alloca_h=no
7141 rm -f core conftest.err conftest.$ac_objext \
7142 conftest$ac_exeext conftest.$ac_ext
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7145 $as_echo "$ac_cv_working_alloca_h" >&6; }
7146 if test $ac_cv_working_alloca_h = yes; then
7148 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7153 $as_echo_n "checking for alloca... " >&6; }
7154 if ${ac_cv_func_alloca_works+:} false; then :
7155 $as_echo_n "(cached) " >&6
7157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7158 /* end confdefs.h. */
7160 # define alloca __builtin_alloca
7163 # include <malloc.h>
7164 # define alloca _alloca
7166 # ifdef HAVE_ALLOCA_H
7167 # include <alloca.h>
7172 # ifndef alloca /* predefined by HP cc +Olibcalls */
7173 void *alloca (size_t);
7183 char *p = (char *) alloca (1);
7189 if ac_fn_c_try_link "$LINENO"; then :
7190 ac_cv_func_alloca_works=yes
7192 ac_cv_func_alloca_works=no
7194 rm -f core conftest.err conftest.$ac_objext \
7195 conftest$ac_exeext conftest.$ac_ext
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7198 $as_echo "$ac_cv_func_alloca_works" >&6; }
7200 if test $ac_cv_func_alloca_works = yes; then
7202 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7205 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7206 # that cause trouble. Some versions do not even contain alloca or
7207 # contain a buggy version. If you still want to use their alloca,
7208 # use ar to extract alloca.o from them instead of compiling alloca.c.
7214 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7216 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7220 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7221 if ${ac_cv_os_cray+:} false; then :
7222 $as_echo_n "(cached) " >&6
7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225 /* end confdefs.h. */
7226 #if defined CRAY && ! defined CRAY2
7233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7234 $EGREP "webecray" >/dev/null 2>&1; then :
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7243 $as_echo "$ac_cv_os_cray" >&6; }
7244 if test $ac_cv_os_cray = yes; then
7245 for ac_func in _getb67 GETB67 getb67; do
7246 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7247 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7248 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7250 cat >>confdefs.h <<_ACEOF
7251 #define CRAY_STACKSEG_END $ac_func
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7261 $as_echo_n "checking stack direction for C alloca... " >&6; }
7262 if ${ac_cv_c_stack_direction+:} false; then :
7263 $as_echo_n "(cached) " >&6
7265 if test "$cross_compiling" = yes; then :
7266 ac_cv_c_stack_direction=0
7268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7269 /* end confdefs.h. */
7270 $ac_includes_default
7272 find_stack_direction (int *addr, int depth)
7277 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7278 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7283 main (int argc, char **argv)
7285 return find_stack_direction (0, argc + !argv + 20) < 0;
7288 if ac_fn_c_try_run "$LINENO"; then :
7289 ac_cv_c_stack_direction=1
7291 ac_cv_c_stack_direction=-1
7293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7294 conftest.$ac_objext conftest.beam conftest.$ac_ext
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7299 $as_echo "$ac_cv_c_stack_direction" >&6; }
7300 cat >>confdefs.h <<_ACEOF
7301 #define STACK_DIRECTION $ac_cv_c_stack_direction
7310 GNULIB_CALLOC_POSIX=0;
7311 GNULIB_CANONICALIZE_FILE_NAME=0;
7312 GNULIB_GETLOADAVG=0;
7315 GNULIB_MALLOC_POSIX=0;
7322 GNULIB_POSIX_OPENPT=0;
7328 GNULIB_REALLOC_POSIX=0;
7335 GNULIB_SYSTEM_POSIX=0;
7341 HAVE_CANONICALIZE_FILE_NAME=1;
7342 HAVE_DECL_GETLOADAVG=1;
7350 HAVE_POSIX_OPENPT=1;
7363 HAVE_STRUCT_RANDOM_DATA=1;
7364 HAVE_SYS_LOADAVG_H=0;
7366 HAVE_DECL_UNSETENV=1;
7368 REPLACE_CANONICALIZE_FILE_NAME=0;
7372 REPLACE_PTSNAME_R=0;
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7384 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7385 if ${gl_cv_func_malloc_posix+:} false; then :
7386 $as_echo_n "(cached) " >&6
7389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7390 /* end confdefs.h. */
7395 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7403 if ac_fn_c_try_compile "$LINENO"; then :
7404 gl_cv_func_malloc_posix=yes
7406 gl_cv_func_malloc_posix=no
7408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7412 $as_echo "$gl_cv_func_malloc_posix" >&6; }
7422 GNULIB_EUIDACCESS=0;
7430 GNULIB_GETDOMAINNAME=0;
7431 GNULIB_GETDTABLESIZE=0;
7433 GNULIB_GETHOSTNAME=0;
7435 GNULIB_GETLOGIN_R=0;
7436 GNULIB_GETPAGESIZE=0;
7437 GNULIB_GETUSERSHELL=0;
7438 GNULIB_GROUP_MEMBER=0;
7450 GNULIB_READLINKAT=0;
7452 GNULIB_SETHOSTNAME=0;
7457 GNULIB_UNISTD_H_NONBLOCKING=0;
7458 GNULIB_UNISTD_H_SIGPIPE=0;
7473 HAVE_GETDTABLESIZE=1;
7478 HAVE_GROUP_MEMBER=1;
7494 HAVE_DECL_ENVIRON=1;
7496 HAVE_DECL_FDATASYNC=1;
7497 HAVE_DECL_GETDOMAINNAME=1;
7498 HAVE_DECL_GETLOGIN_R=1;
7499 HAVE_DECL_GETPAGESIZE=1;
7500 HAVE_DECL_GETUSERSHELL=1;
7501 HAVE_DECL_SETHOSTNAME=1;
7502 HAVE_DECL_TTYNAME_R=1;
7510 REPLACE_FTRUNCATE=0;
7512 REPLACE_GETDOMAINNAME=0;
7513 REPLACE_GETLOGIN_R=0;
7514 REPLACE_GETGROUPS=0;
7515 REPLACE_GETPAGESIZE=0;
7528 REPLACE_TTYNAME_R=0;
7533 UNISTD_H_HAVE_WINSOCK2_H=0;
7534 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7540 for ac_header in $ac_header_list
7542 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7543 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7545 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7546 cat >>confdefs.h <<_ACEOF
7547 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7562 $as_echo_n "checking for inline... " >&6; }
7563 if ${ac_cv_c_inline+:} false; then :
7564 $as_echo_n "(cached) " >&6
7567 for ac_kw in inline __inline__ __inline; do
7568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569 /* end confdefs.h. */
7572 static $ac_kw foo_t static_foo () {return 0; }
7573 $ac_kw foo_t foo () {return 0; }
7577 if ac_fn_c_try_compile "$LINENO"; then :
7578 ac_cv_c_inline=$ac_kw
7580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7581 test "$ac_cv_c_inline" != no && break
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7586 $as_echo "$ac_cv_c_inline" >&6; }
7588 case $ac_cv_c_inline in
7591 case $ac_cv_c_inline in
7593 *) ac_val=$ac_cv_c_inline;;
7595 cat >>confdefs.h <<_ACEOF
7597 #define inline $ac_val
7606 for ac_func in $ac_func_list
7608 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7609 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7610 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7611 cat >>confdefs.h <<_ACEOF
7612 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7622 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7623 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7625 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7628 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7650 HAVE_DECL_FDOPENDIR=1;
7657 REPLACE_FDOPENDIR=0;
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7662 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7663 if ${gl_cv_have_include_next+:} false; then :
7664 $as_echo_n "(cached) " >&6
7666 rm -rf conftestd1a conftestd1b conftestd2
7667 mkdir conftestd1a conftestd1b conftestd2
7668 cat <<EOF > conftestd1a/conftest.h
7669 #define DEFINED_IN_CONFTESTD1
7670 #include_next <conftest.h>
7671 #ifdef DEFINED_IN_CONFTESTD2
7674 #error "include_next doesn't work"
7677 cat <<EOF > conftestd1b/conftest.h
7678 #define DEFINED_IN_CONFTESTD1
7680 #include_next <conftest.h>
7681 #ifdef DEFINED_IN_CONFTESTD2
7684 #error "include_next doesn't work"
7687 cat <<EOF > conftestd2/conftest.h
7688 #ifndef DEFINED_IN_CONFTESTD1
7689 #error "include_next test doesn't work"
7691 #define DEFINED_IN_CONFTESTD2
7693 gl_save_CPPFLAGS="$CPPFLAGS"
7694 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7696 /* end confdefs.h. */
7697 #include <conftest.h>
7699 if ac_fn_c_try_compile "$LINENO"; then :
7700 gl_cv_have_include_next=yes
7702 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7704 /* end confdefs.h. */
7705 #include <conftest.h>
7707 if ac_fn_c_try_compile "$LINENO"; then :
7708 gl_cv_have_include_next=buggy
7710 gl_cv_have_include_next=no
7712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7716 CPPFLAGS="$gl_save_CPPFLAGS"
7717 rm -rf conftestd1a conftestd1b conftestd2
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7721 $as_echo "$gl_cv_have_include_next" >&6; }
7722 PRAGMA_SYSTEM_HEADER=
7723 if test $gl_cv_have_include_next = yes; then
7724 INCLUDE_NEXT=include_next
7725 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7726 if test -n "$GCC"; then
7727 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7730 if test $gl_cv_have_include_next = buggy; then
7731 INCLUDE_NEXT=include
7732 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7734 INCLUDE_NEXT=include
7735 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7742 $as_echo_n "checking whether system header files limit the line length... " >&6; }
7743 if ${gl_cv_pragma_columns+:} false; then :
7744 $as_echo_n "(cached) " >&6
7746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7747 /* end confdefs.h. */
7754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7755 $EGREP "choke me" >/dev/null 2>&1; then :
7756 gl_cv_pragma_columns=yes
7758 gl_cv_pragma_columns=no
7764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7765 $as_echo "$gl_cv_pragma_columns" >&6; }
7766 if test $gl_cv_pragma_columns = yes; then
7767 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7780 $as_echo_n "checking whether // is distinct from /... " >&6; }
7781 if ${gl_cv_double_slash_root+:} false; then :
7782 $as_echo_n "(cached) " >&6
7784 if test x"$cross_compiling" = xyes ; then
7785 # When cross-compiling, there is no way to tell whether // is special
7786 # short of a list of hosts. However, the only known hosts to date
7787 # that have a distinct // are Apollo DomainOS (too old to port to),
7788 # Cygwin, and z/OS. If anyone knows of another system for which // has
7789 # special semantics and is distinct from /, please report it to
7790 # <bug-gnulib@gnu.org>.
7792 *-cygwin | i370-ibm-openedition)
7793 gl_cv_double_slash_root=yes ;;
7795 # Be optimistic and assume that / and // are the same when we
7797 gl_cv_double_slash_root='unknown, assuming no' ;;
7800 set x `ls -di / // 2>/dev/null`
7801 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7802 gl_cv_double_slash_root=no
7804 gl_cv_double_slash_root=yes
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7809 $as_echo "$gl_cv_double_slash_root" >&6; }
7810 if test "$gl_cv_double_slash_root" = yes; then
7812 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7819 $as_echo_n "checking for complete errno.h... " >&6; }
7820 if ${gl_cv_header_errno_h_complete+:} false; then :
7821 $as_echo_n "(cached) " >&6
7824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7825 /* end confdefs.h. */
7828 #if !defined ETXTBSY
7837 #if !defined ENOLINK
7843 #if !defined EMULTIHOP
7846 #if !defined EBADMSG
7849 #if !defined EOVERFLOW
7852 #if !defined ENOTSUP
7855 #if !defined ENETRESET
7858 #if !defined ECONNABORTED
7867 #if !defined ECANCELED
7870 #if !defined EOWNERDEAD
7873 #if !defined ENOTRECOVERABLE
7878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7879 $EGREP "booboo" >/dev/null 2>&1; then :
7880 gl_cv_header_errno_h_complete=no
7882 gl_cv_header_errno_h_complete=yes
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7889 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
7890 if test $gl_cv_header_errno_h_complete = yes; then
7901 if test $gl_cv_have_include_next = yes; then
7902 gl_cv_next_errno_h='<'errno.h'>'
7904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7905 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
7906 if ${gl_cv_next_errno_h+:} false; then :
7907 $as_echo_n "(cached) " >&6
7910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7911 /* end confdefs.h. */
7916 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7917 *) gl_absname_cpp="$ac_cpp" ;;
7922 gl_dirsep_regex='[/\\]'
7925 gl_dirsep_regex='\/'
7928 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7930 gl_header_literal_regex=`echo 'errno.h' \
7931 | sed -e "$gl_make_literal_regex_sed"`
7932 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7933 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7938 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7939 sed -n "$gl_absolute_header_sed"`'"'
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7944 $as_echo "$gl_cv_next_errno_h" >&6; }
7946 NEXT_ERRNO_H=$gl_cv_next_errno_h
7948 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7949 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7950 gl_next_as_first_directive='<'errno.h'>'
7952 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7953 gl_next_as_first_directive=$gl_cv_next_errno_h
7955 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7963 if test -n "$ERRNO_H"; then
7964 GL_GENERATE_ERRNO_H_TRUE=
7965 GL_GENERATE_ERRNO_H_FALSE='#'
7967 GL_GENERATE_ERRNO_H_TRUE='#'
7968 GL_GENERATE_ERRNO_H_FALSE=
7972 if test -n "$ERRNO_H"; then
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7974 $as_echo_n "checking for EMULTIHOP value... " >&6; }
7975 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
7976 $as_echo_n "(cached) " >&6
7979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7980 /* end confdefs.h. */
7988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7989 $EGREP "yes" >/dev/null 2>&1; then :
7990 gl_cv_header_errno_h_EMULTIHOP=yes
7992 gl_cv_header_errno_h_EMULTIHOP=no
7996 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7998 /* end confdefs.h. */
8000 #define _XOPEN_SOURCE_EXTENDED 1
8007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8008 $EGREP "yes" >/dev/null 2>&1; then :
8009 gl_cv_header_errno_h_EMULTIHOP=hidden
8013 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8014 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8015 #define _XOPEN_SOURCE_EXTENDED 1
8017 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8029 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8030 case $gl_cv_header_errno_h_EMULTIHOP in
8032 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8035 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8043 if test -n "$ERRNO_H"; then
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8045 $as_echo_n "checking for ENOLINK value... " >&6; }
8046 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8047 $as_echo_n "(cached) " >&6
8050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8051 /* end confdefs.h. */
8059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8060 $EGREP "yes" >/dev/null 2>&1; then :
8061 gl_cv_header_errno_h_ENOLINK=yes
8063 gl_cv_header_errno_h_ENOLINK=no
8067 if test $gl_cv_header_errno_h_ENOLINK = no; then
8068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8069 /* end confdefs.h. */
8071 #define _XOPEN_SOURCE_EXTENDED 1
8078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8079 $EGREP "yes" >/dev/null 2>&1; then :
8080 gl_cv_header_errno_h_ENOLINK=hidden
8084 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8085 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8086 #define _XOPEN_SOURCE_EXTENDED 1
8088 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8100 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8101 case $gl_cv_header_errno_h_ENOLINK in
8103 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8106 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8114 if test -n "$ERRNO_H"; then
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8116 $as_echo_n "checking for EOVERFLOW value... " >&6; }
8117 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8118 $as_echo_n "(cached) " >&6
8121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8122 /* end confdefs.h. */
8130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8131 $EGREP "yes" >/dev/null 2>&1; then :
8132 gl_cv_header_errno_h_EOVERFLOW=yes
8134 gl_cv_header_errno_h_EOVERFLOW=no
8138 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8140 /* end confdefs.h. */
8142 #define _XOPEN_SOURCE_EXTENDED 1
8149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8150 $EGREP "yes" >/dev/null 2>&1; then :
8151 gl_cv_header_errno_h_EOVERFLOW=hidden
8155 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8156 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8157 #define _XOPEN_SOURCE_EXTENDED 1
8159 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8171 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8172 case $gl_cv_header_errno_h_EOVERFLOW in
8174 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8177 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8185 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8186 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8192 cat >>confdefs.h <<_ACEOF
8193 #define HAVE_DECL_STRERROR_R $ac_have_decl
8196 for ac_func in strerror_r
8198 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8199 if test "x$ac_cv_func_strerror_r" = xyes; then :
8200 cat >>confdefs.h <<_ACEOF
8201 #define HAVE_STRERROR_R 1
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8208 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
8209 if ${ac_cv_func_strerror_r_char_p+:} false; then :
8210 $as_echo_n "(cached) " >&6
8213 ac_cv_func_strerror_r_char_p=no
8214 if test $ac_cv_have_decl_strerror_r = yes; then
8215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216 /* end confdefs.h. */
8217 $ac_includes_default
8223 char x = *strerror_r (0, buf, sizeof buf);
8224 char *p = strerror_r (0, buf, sizeof buf);
8231 if ac_fn_c_try_compile "$LINENO"; then :
8232 ac_cv_func_strerror_r_char_p=yes
8234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8236 # strerror_r is not declared. Choose between
8237 # systems that have relatively inaccessible declarations for the
8238 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8239 # former has a strerror_r that returns char*, while the latter
8240 # has a strerror_r that returns `int'.
8241 # This test should segfault on the DEC system.
8242 if test "$cross_compiling" = yes; then :
8245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8246 /* end confdefs.h. */
8247 $ac_includes_default
8248 extern char *strerror_r ();
8253 char x = *strerror_r (0, buf, sizeof buf);
8254 return ! isalpha (x);
8259 if ac_fn_c_try_run "$LINENO"; then :
8260 ac_cv_func_strerror_r_char_p=yes
8262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8263 conftest.$ac_objext conftest.beam conftest.$ac_ext
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8270 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8271 if test $ac_cv_func_strerror_r_char_p = yes; then
8273 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8278 XGETTEXT_EXTRA_OPTIONS=
8280 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8281 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8287 cat >>confdefs.h <<_ACEOF
8288 #define HAVE_DECL_FCHDIR $ac_have_decl
8300 GNULIB_FPRINTF_POSIX=0;
8316 GNULIB_OBSTACK_PRINTF=0;
8317 GNULIB_OBSTACK_PRINTF_POSIX=0;
8322 GNULIB_PRINTF_POSIX=0;
8331 GNULIB_SPRINTF_POSIX=0;
8332 GNULIB_STDIO_H_NONBLOCKING=0;
8333 GNULIB_STDIO_H_SIGPIPE=0;
8340 GNULIB_VFPRINTF_POSIX=0;
8342 GNULIB_VPRINTF_POSIX=0;
8344 GNULIB_VSPRINTF_POSIX=0;
8348 HAVE_DECL_GETDELIM=1;
8349 HAVE_DECL_GETLINE=1;
8350 HAVE_DECL_OBSTACK_PRINTF=1;
8351 HAVE_DECL_SNPRINTF=1;
8352 HAVE_DECL_VSNPRINTF=1;
8375 REPLACE_OBSTACK_PRINTF=0;
8384 REPLACE_STDIO_READ_FUNCS=0;
8385 REPLACE_STDIO_WRITE_FUNCS=0;
8387 REPLACE_VASPRINTF=0;
8391 REPLACE_VSNPRINTF=0;
8396 GNULIB_NONBLOCKING=0;
8414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8415 $as_echo_n "checking for working fcntl.h... " >&6; }
8416 if ${gl_cv_header_working_fcntl_h+:} false; then :
8417 $as_echo_n "(cached) " >&6
8419 if test "$cross_compiling" = yes; then :
8420 gl_cv_header_working_fcntl_h=cross-compiling
8422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8423 /* end confdefs.h. */
8424 #include <sys/types.h>
8425 #include <sys/stat.h>
8427 # include <unistd.h>
8428 #else /* on Windows with MSVC */
8430 # include <stdlib.h>
8431 # defined sleep(n) _sleep ((n) * 1000)
8438 #define O_NOFOLLOW 0
8440 static int const constants[] =
8442 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8443 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8450 int result = !constants;
8453 static char const sym[] = "conftest.sym";
8454 if (symlink (".", sym) != 0)
8458 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8469 static char const file[] = "confdefs.h";
8470 int fd = open (file, O_RDONLY | O_NOATIME);
8476 if (fstat (fd, &st0) != 0)
8482 if (read (fd, &c, 1) != 1)
8486 if (close (fd) != 0)
8491 if (stat (file, &st1) != 0)
8494 if (st0.st_atime != st1.st_atime)
8506 if ac_fn_c_try_run "$LINENO"; then :
8507 gl_cv_header_working_fcntl_h=yes
8510 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8511 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8512 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8513 *) gl_cv_header_working_fcntl_h='no';;
8516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8517 conftest.$ac_objext conftest.beam conftest.$ac_ext
8521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8522 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8524 case $gl_cv_header_working_fcntl_h in #(
8525 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8529 cat >>confdefs.h <<_ACEOF
8530 #define HAVE_WORKING_O_NOATIME $ac_val
8534 case $gl_cv_header_working_fcntl_h in #(
8535 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8539 cat >>confdefs.h <<_ACEOF
8540 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8544 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8545 if test "x$ac_cv_type_pid_t" = xyes; then :
8549 cat >>confdefs.h <<_ACEOF
8555 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8556 if test "x$ac_cv_type_mode_t" = xyes; then :
8560 cat >>confdefs.h <<_ACEOF
8568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8569 $as_echo_n "checking for promoted mode_t type... " >&6; }
8570 if ${gl_cv_promoted_mode_t+:} false; then :
8571 $as_echo_n "(cached) " >&6
8574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8575 /* end confdefs.h. */
8576 #include <sys/types.h>
8580 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
8585 if ac_fn_c_try_compile "$LINENO"; then :
8586 gl_cv_promoted_mode_t='int'
8588 gl_cv_promoted_mode_t='mode_t'
8590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
8594 $as_echo "$gl_cv_promoted_mode_t" >&6; }
8596 cat >>confdefs.h <<_ACEOF
8597 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
8609 $as_echo_n "checking for stdint.h... " >&6; }
8610 if ${gl_cv_header_stdint_h+:} false; then :
8611 $as_echo_n "(cached) " >&6
8613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8614 /* end confdefs.h. */
8615 #include <sys/types.h>
8620 uintmax_t i = (uintmax_t) -1; return !i;
8625 if ac_fn_c_try_compile "$LINENO"; then :
8626 gl_cv_header_stdint_h=yes
8628 gl_cv_header_stdint_h=no
8630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
8633 $as_echo "$gl_cv_header_stdint_h" >&6; }
8634 if test $gl_cv_header_stdint_h = yes; then
8636 cat >>confdefs.h <<_ACEOF
8637 #define HAVE_STDINT_H_WITH_UINTMAX 1
8643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8644 $as_echo_n "checking for inttypes.h... " >&6; }
8645 if ${gl_cv_header_inttypes_h+:} false; then :
8646 $as_echo_n "(cached) " >&6
8648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8649 /* end confdefs.h. */
8651 #include <sys/types.h>
8652 #include <inttypes.h>
8657 uintmax_t i = (uintmax_t) -1; return !i;
8662 if ac_fn_c_try_compile "$LINENO"; then :
8663 gl_cv_header_inttypes_h=yes
8665 gl_cv_header_inttypes_h=no
8667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
8670 $as_echo "$gl_cv_header_inttypes_h" >&6; }
8671 if test $gl_cv_header_inttypes_h = yes; then
8673 cat >>confdefs.h <<_ACEOF
8674 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
8683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
8684 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
8685 if ${gl_cv_func_printf_sizes_c99+:} false; then :
8686 $as_echo_n "(cached) " >&6
8689 if test "$cross_compiling" = yes; then :
8692 # Guess yes on glibc systems.
8693 *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
8694 # Guess yes on FreeBSD >= 5.
8695 freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
8696 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8697 # Guess yes on MacOS X >= 10.3.
8698 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
8699 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
8700 # Guess yes on OpenBSD >= 3.9.
8701 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
8702 gl_cv_func_printf_sizes_c99="guessing no";;
8703 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8704 # Guess yes on Solaris >= 2.10.
8705 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
8706 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
8707 # Guess yes on NetBSD >= 3.
8708 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8709 gl_cv_func_printf_sizes_c99="guessing no";;
8710 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8711 # If we don't know, assume the worst.
8712 *) gl_cv_func_printf_sizes_c99="guessing no";;
8716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8717 /* end confdefs.h. */
8722 #include <sys/types.h>
8723 #if HAVE_STDINT_H_WITH_UINTMAX
8724 # include <stdint.h>
8726 #if HAVE_INTTYPES_H_WITH_UINTMAX
8727 # include <inttypes.h>
8729 static char buf[100];
8733 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
8735 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
8736 || strcmp (buf, "12345671 33") != 0)
8740 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
8741 || strcmp (buf, "12345672 33") != 0)
8744 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
8745 || strcmp (buf, "12345673 33") != 0)
8748 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
8749 || strcmp (buf, "1.5 33") != 0)
8754 if ac_fn_c_try_run "$LINENO"; then :
8755 gl_cv_func_printf_sizes_c99=yes
8757 gl_cv_func_printf_sizes_c99=no
8759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8760 conftest.$ac_objext conftest.beam conftest.$ac_ext
8765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
8766 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
8771 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
8772 if ${gl_cv_func_printf_long_double+:} false; then :
8773 $as_echo_n "(cached) " >&6
8776 if test "$cross_compiling" = yes; then :
8779 beos*) gl_cv_func_printf_long_double="guessing no";;
8780 mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
8781 *) gl_cv_func_printf_long_double="guessing yes";;
8785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8786 /* end confdefs.h. */
8790 static char buf[10000];
8795 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
8796 || strcmp (buf, "1.750000 33") != 0)
8799 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
8800 || strcmp (buf, "1.750000e+00 33") != 0)
8803 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
8804 || strcmp (buf, "1.75 33") != 0)
8809 if ac_fn_c_try_run "$LINENO"; then :
8810 gl_cv_func_printf_long_double=yes
8812 gl_cv_func_printf_long_double=no
8814 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8815 conftest.$ac_objext conftest.beam conftest.$ac_ext
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
8821 $as_echo "$gl_cv_func_printf_long_double" >&6; }
8825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
8826 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
8827 if ${gl_cv_func_printf_infinite+:} false; then :
8828 $as_echo_n "(cached) " >&6
8831 if test "$cross_compiling" = yes; then :
8834 # Guess yes on glibc systems.
8835 *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
8836 # Guess yes on FreeBSD >= 6.
8837 freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
8838 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
8839 # Guess yes on MacOS X >= 10.3.
8840 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
8841 darwin*) gl_cv_func_printf_infinite="guessing yes";;
8842 # Guess yes on HP-UX >= 11.
8843 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
8844 hpux*) gl_cv_func_printf_infinite="guessing yes";;
8845 # Guess yes on NetBSD >= 3.
8846 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8847 gl_cv_func_printf_infinite="guessing no";;
8848 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
8849 # Guess yes on BeOS.
8850 beos*) gl_cv_func_printf_infinite="guessing yes";;
8851 # If we don't know, assume the worst.
8852 *) gl_cv_func_printf_infinite="guessing no";;
8856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8857 /* end confdefs.h. */
8862 strisnan (const char *string, size_t start_index, size_t end_index)
8864 if (start_index < end_index)
8866 if (string[start_index] == '-')
8868 if (start_index + 3 <= end_index
8869 && memcmp (string + start_index, "nan", 3) == 0)
8872 if (start_index == end_index
8873 || (string[start_index] == '(' && string[end_index - 1] == ')'))
8882 static double plus_zero = 0.0;
8883 double minus_zero = - plus_zero;
8884 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
8886 static char buf[10000];
8887 static double zero = 0.0;
8891 if (sprintf (buf, "%f", 1.0 / zero) < 0
8892 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8894 if (sprintf (buf, "%f", -1.0 / zero) < 0
8895 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8897 if (sprintf (buf, "%f", zero / zero) < 0
8898 || !strisnan (buf, 0, strlen (buf)))
8900 if (sprintf (buf, "%e", 1.0 / zero) < 0
8901 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8903 if (sprintf (buf, "%e", -1.0 / zero) < 0
8904 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8906 if (sprintf (buf, "%e", zero / zero) < 0
8907 || !strisnan (buf, 0, strlen (buf)))
8909 if (sprintf (buf, "%g", 1.0 / zero) < 0
8910 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8912 if (sprintf (buf, "%g", -1.0 / zero) < 0
8913 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8915 if (sprintf (buf, "%g", zero / zero) < 0
8916 || !strisnan (buf, 0, strlen (buf)))
8918 /* This test fails on HP-UX 10.20. */
8919 if (have_minus_zero ())
8920 if (sprintf (buf, "%g", - zero) < 0
8921 || strcmp (buf, "-0") != 0)
8926 if ac_fn_c_try_run "$LINENO"; then :
8927 gl_cv_func_printf_infinite=yes
8929 gl_cv_func_printf_infinite=no
8931 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8932 conftest.$ac_objext conftest.beam conftest.$ac_ext
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
8938 $as_echo "$gl_cv_func_printf_infinite" >&6; }
8941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
8942 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
8943 if ${ac_cv_c_bigendian+:} false; then :
8944 $as_echo_n "(cached) " >&6
8946 ac_cv_c_bigendian=unknown
8947 # See if we're dealing with a universal compiler.
8948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8949 /* end confdefs.h. */
8950 #ifndef __APPLE_CC__
8951 not a universal capable compiler
8956 if ac_fn_c_try_compile "$LINENO"; then :
8958 # Check for potential -arch flags. It is not universal unless
8959 # there are at least two -arch flags with different values.
8962 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
8963 if test -n "$ac_prev"; then
8965 i?86 | x86_64 | ppc | ppc64)
8966 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8969 ac_cv_c_bigendian=universal
8975 elif test "x$ac_word" = "x-arch"; then
8980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8981 if test $ac_cv_c_bigendian = unknown; then
8982 # See if sys/param.h defines the BYTE_ORDER macro.
8983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8984 /* end confdefs.h. */
8985 #include <sys/types.h>
8986 #include <sys/param.h>
8991 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8992 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9001 if ac_fn_c_try_compile "$LINENO"; then :
9002 # It does; now see whether it defined to BIG_ENDIAN or not.
9003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9004 /* end confdefs.h. */
9005 #include <sys/types.h>
9006 #include <sys/param.h>
9011 #if BYTE_ORDER != BIG_ENDIAN
9019 if ac_fn_c_try_compile "$LINENO"; then :
9020 ac_cv_c_bigendian=yes
9022 ac_cv_c_bigendian=no
9024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9028 if test $ac_cv_c_bigendian = unknown; then
9029 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9031 /* end confdefs.h. */
9037 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9045 if ac_fn_c_try_compile "$LINENO"; then :
9046 # It does; now see whether it defined to _BIG_ENDIAN or not.
9047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9048 /* end confdefs.h. */
9062 if ac_fn_c_try_compile "$LINENO"; then :
9063 ac_cv_c_bigendian=yes
9065 ac_cv_c_bigendian=no
9067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9071 if test $ac_cv_c_bigendian = unknown; then
9072 # Compile a test program.
9073 if test "$cross_compiling" = yes; then :
9074 # Try to guess by grepping values from an object file.
9075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9076 /* end confdefs.h. */
9077 short int ascii_mm[] =
9078 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9079 short int ascii_ii[] =
9080 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9081 int use_ascii (int i) {
9082 return ascii_mm[i] + ascii_ii[i];
9084 short int ebcdic_ii[] =
9085 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9086 short int ebcdic_mm[] =
9087 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9088 int use_ebcdic (int i) {
9089 return ebcdic_mm[i] + ebcdic_ii[i];
9096 return use_ascii (foo) == use_ebcdic (foo);
9101 if ac_fn_c_try_compile "$LINENO"; then :
9102 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9103 ac_cv_c_bigendian=yes
9105 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9106 if test "$ac_cv_c_bigendian" = unknown; then
9107 ac_cv_c_bigendian=no
9109 # finding both strings is unlikely to happen, but who knows?
9110 ac_cv_c_bigendian=unknown
9114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9117 /* end confdefs.h. */
9118 $ac_includes_default
9123 /* Are we little or big endian? From Harbison&Steele. */
9127 char c[sizeof (long int)];
9130 return u.c[sizeof (long int) - 1] == 1;
9136 if ac_fn_c_try_run "$LINENO"; then :
9137 ac_cv_c_bigendian=no
9139 ac_cv_c_bigendian=yes
9141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9142 conftest.$ac_objext conftest.beam conftest.$ac_ext
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9148 $as_echo "$ac_cv_c_bigendian" >&6; }
9149 case $ac_cv_c_bigendian in #(
9151 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9157 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9161 as_fn_error $? "unknown endianness
9162 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9168 $as_echo_n "checking whether long double and double are the same... " >&6; }
9169 if ${gl_cv_long_double_equals_double+:} false; then :
9170 $as_echo_n "(cached) " >&6
9172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9173 /* end confdefs.h. */
9178 typedef int check[sizeof (long double) == sizeof (double)
9179 && LDBL_MANT_DIG == DBL_MANT_DIG
9180 && LDBL_MAX_EXP == DBL_MAX_EXP
9181 && LDBL_MIN_EXP == DBL_MIN_EXP
9188 if ac_fn_c_try_compile "$LINENO"; then :
9189 gl_cv_long_double_equals_double=yes
9191 gl_cv_long_double_equals_double=no
9193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9197 $as_echo "$gl_cv_long_double_equals_double" >&6; }
9198 if test $gl_cv_long_double_equals_double = yes; then
9200 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9202 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9204 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9213 if test -n "$gl_printf_safe"; then
9215 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9218 case "$gl_cv_func_printf_long_double" in
9220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9221 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
9222 if ${gl_cv_func_printf_infinite_long_double+:} false; then :
9223 $as_echo_n "(cached) " >&6
9226 if test "$cross_compiling" = yes; then :
9229 # Guess no on ia64, x86_64, i386.
9230 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9233 # Guess yes on glibc systems.
9234 *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9235 # Guess yes on FreeBSD >= 6.
9236 freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
9237 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9238 # Guess yes on HP-UX >= 11.
9239 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9240 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9241 # If we don't know, assume the worst.
9242 *) gl_cv_func_printf_infinite_long_double="guessing no";;
9248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9249 /* end confdefs.h. */
9253 #if defined __MACH__ && defined __APPLE__
9254 /* Avoid a crash on MacOS X. */
9255 #include <mach/mach.h>
9256 #include <mach/mach_error.h>
9257 #include <mach/thread_status.h>
9258 #include <mach/exception.h>
9259 #include <mach/task.h>
9260 #include <pthread.h>
9261 /* The exception port on which our thread listens. */
9262 static mach_port_t our_exception_port;
9263 /* The main function of the thread listening for exceptions of type
9266 mach_exception_thread (void *arg)
9268 /* Buffer for a message to be received. */
9270 mach_msg_header_t head;
9271 mach_msg_body_t msgh_body;
9274 mach_msg_return_t retval;
9275 /* Wait for a message on the exception port. */
9276 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9277 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9278 if (retval != MACH_MSG_SUCCESS)
9285 mach_port_t self = mach_task_self ();
9286 /* Allocate a port on which the thread shall listen for exceptions. */
9287 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9289 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9290 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9291 MACH_MSG_TYPE_MAKE_SEND)
9293 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9295 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9296 /* Create the thread listening on the exception port. */
9297 pthread_attr_t attr;
9299 if (pthread_attr_init (&attr) == 0
9300 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9301 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9302 pthread_attr_destroy (&attr);
9303 /* Replace the exception port info for these exceptions with our own.
9304 Note that we replace the exception port for the entire task, not only
9305 for a particular thread. This has the effect that when our exception
9306 port gets the message, the thread specific exception port has already
9307 been asked, and we don't need to bother about it.
9308 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9309 task_set_exception_ports (self, mask, our_exception_port,
9310 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9315 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9316 /* Avoid a crash on native Windows. */
9317 #define WIN32_LEAN_AND_MEAN
9318 #include <windows.h>
9319 #include <winerror.h>
9321 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9323 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9325 case EXCEPTION_ACCESS_VIOLATION:
9326 case EXCEPTION_IN_PAGE_ERROR:
9327 case EXCEPTION_STACK_OVERFLOW:
9328 case EXCEPTION_GUARD_PAGE:
9329 case EXCEPTION_PRIV_INSTRUCTION:
9330 case EXCEPTION_ILLEGAL_INSTRUCTION:
9331 case EXCEPTION_DATATYPE_MISALIGNMENT:
9332 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9333 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9336 return EXCEPTION_CONTINUE_SEARCH;
9341 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9344 /* Avoid a crash on POSIX systems. */
9346 /* A POSIX signal handler. */
9348 exception_handler (int sig)
9356 signal (SIGSEGV, exception_handler);
9359 signal (SIGBUS, exception_handler);
9368 strisnan (const char *string, size_t start_index, size_t end_index)
9370 if (start_index < end_index)
9372 if (string[start_index] == '-')
9374 if (start_index + 3 <= end_index
9375 && memcmp (string + start_index, "nan", 3) == 0)
9378 if (start_index == end_index
9379 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9385 static char buf[10000];
9386 static long double zeroL = 0.0L;
9391 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9392 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9394 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9395 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9397 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9398 || !strisnan (buf, 0, strlen (buf)))
9400 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9401 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9403 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9404 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9406 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9407 || !strisnan (buf, 0, strlen (buf)))
9409 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9410 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9412 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9413 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9415 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9416 || !strisnan (buf, 0, strlen (buf)))
9418 #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
9419 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9420 of 'unsigned int' words. */
9421 # ifdef WORDS_BIGENDIAN
9422 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9423 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9424 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
9425 (unsigned int) (mantlo) << 16 \
9428 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9429 { mantlo, manthi, exponent }
9432 static union { unsigned int word[4]; long double value; } x =
9433 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
9434 if (sprintf (buf, "%Lf", x.value) < 0
9435 || !strisnan (buf, 0, strlen (buf)))
9437 if (sprintf (buf, "%Le", x.value) < 0
9438 || !strisnan (buf, 0, strlen (buf)))
9440 if (sprintf (buf, "%Lg", x.value) < 0
9441 || !strisnan (buf, 0, strlen (buf)))
9445 /* Signalling NaN. */
9446 static union { unsigned int word[4]; long double value; } x =
9447 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
9448 if (sprintf (buf, "%Lf", x.value) < 0
9449 || !strisnan (buf, 0, strlen (buf)))
9451 if (sprintf (buf, "%Le", x.value) < 0
9452 || !strisnan (buf, 0, strlen (buf)))
9454 if (sprintf (buf, "%Lg", x.value) < 0
9455 || !strisnan (buf, 0, strlen (buf)))
9459 static union { unsigned int word[4]; long double value; } x =
9460 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
9461 if (sprintf (buf, "%Lf", x.value) < 0
9462 || !strisnan (buf, 0, strlen (buf)))
9464 if (sprintf (buf, "%Le", x.value) < 0
9465 || !strisnan (buf, 0, strlen (buf)))
9467 if (sprintf (buf, "%Lg", x.value) < 0
9468 || !strisnan (buf, 0, strlen (buf)))
9471 { /* Pseudo-Infinity. */
9472 static union { unsigned int word[4]; long double value; } x =
9473 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
9474 if (sprintf (buf, "%Lf", x.value) < 0
9475 || !strisnan (buf, 0, strlen (buf)))
9477 if (sprintf (buf, "%Le", x.value) < 0
9478 || !strisnan (buf, 0, strlen (buf)))
9480 if (sprintf (buf, "%Lg", x.value) < 0
9481 || !strisnan (buf, 0, strlen (buf)))
9484 { /* Pseudo-Zero. */
9485 static union { unsigned int word[4]; long double value; } x =
9486 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
9487 if (sprintf (buf, "%Lf", x.value) < 0
9488 || !strisnan (buf, 0, strlen (buf)))
9490 if (sprintf (buf, "%Le", x.value) < 0
9491 || !strisnan (buf, 0, strlen (buf)))
9493 if (sprintf (buf, "%Lg", x.value) < 0
9494 || !strisnan (buf, 0, strlen (buf)))
9497 { /* Unnormalized number. */
9498 static union { unsigned int word[4]; long double value; } x =
9499 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
9500 if (sprintf (buf, "%Lf", x.value) < 0
9501 || !strisnan (buf, 0, strlen (buf)))
9503 if (sprintf (buf, "%Le", x.value) < 0
9504 || !strisnan (buf, 0, strlen (buf)))
9506 if (sprintf (buf, "%Lg", x.value) < 0
9507 || !strisnan (buf, 0, strlen (buf)))
9510 { /* Pseudo-Denormal. */
9511 static union { unsigned int word[4]; long double value; } x =
9512 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
9513 if (sprintf (buf, "%Lf", x.value) < 0
9514 || !strisnan (buf, 0, strlen (buf)))
9516 if (sprintf (buf, "%Le", x.value) < 0
9517 || !strisnan (buf, 0, strlen (buf)))
9519 if (sprintf (buf, "%Lg", x.value) < 0
9520 || !strisnan (buf, 0, strlen (buf)))
9527 if ac_fn_c_try_run "$LINENO"; then :
9528 gl_cv_func_printf_infinite_long_double=yes
9530 gl_cv_func_printf_infinite_long_double=no
9532 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9533 conftest.$ac_objext conftest.beam conftest.$ac_ext
9538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
9539 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
9542 gl_cv_func_printf_infinite_long_double="irrelevant"
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
9549 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
9550 if ${gl_cv_func_printf_directive_a+:} false; then :
9551 $as_echo_n "(cached) " >&6
9554 if test "$cross_compiling" = yes; then :
9557 # Guess yes on glibc >= 2.5 systems.
9559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9560 /* end confdefs.h. */
9562 #include <features.h>
9563 #ifdef __GNU_LIBRARY__
9564 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
9570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9571 $EGREP "BZ2908" >/dev/null 2>&1; then :
9572 gl_cv_func_printf_directive_a="guessing yes"
9574 gl_cv_func_printf_directive_a="guessing no"
9579 # If we don't know, assume the worst.
9580 *) gl_cv_func_printf_directive_a="guessing no";;
9584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9585 /* end confdefs.h. */
9589 static char buf[100];
9590 static double zero = 0.0;
9594 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
9595 || (strcmp (buf, "0x1.922p+1 33") != 0
9596 && strcmp (buf, "0x3.244p+0 33") != 0
9597 && strcmp (buf, "0x6.488p-1 33") != 0
9598 && strcmp (buf, "0xc.91p-2 33") != 0))
9600 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
9601 || (strcmp (buf, "-0X1.922P+1 33") != 0
9602 && strcmp (buf, "-0X3.244P+0 33") != 0
9603 && strcmp (buf, "-0X6.488P-1 33") != 0
9604 && strcmp (buf, "-0XC.91P-2 33") != 0))
9606 /* This catches a FreeBSD 6.1 bug: it doesn't round. */
9607 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
9608 || (strcmp (buf, "0x1.83p+0 33") != 0
9609 && strcmp (buf, "0x3.05p-1 33") != 0
9610 && strcmp (buf, "0x6.0ap-2 33") != 0
9611 && strcmp (buf, "0xc.14p-3 33") != 0))
9613 /* This catches a FreeBSD 6.1 bug. See
9614 <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
9615 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
9618 /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
9619 if (sprintf (buf, "%.1a", 1.999) < 0
9620 || (strcmp (buf, "0x1.0p+1") != 0
9621 && strcmp (buf, "0x2.0p+0") != 0
9622 && strcmp (buf, "0x4.0p-1") != 0
9623 && strcmp (buf, "0x8.0p-2") != 0))
9625 /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
9626 glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
9627 if (sprintf (buf, "%.1La", 1.999L) < 0
9628 || (strcmp (buf, "0x1.0p+1") != 0
9629 && strcmp (buf, "0x2.0p+0") != 0
9630 && strcmp (buf, "0x4.0p-1") != 0
9631 && strcmp (buf, "0x8.0p-2") != 0))
9636 if ac_fn_c_try_run "$LINENO"; then :
9637 gl_cv_func_printf_directive_a=yes
9639 gl_cv_func_printf_directive_a=no
9641 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9642 conftest.$ac_objext conftest.beam conftest.$ac_ext
9647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
9648 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
9653 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
9654 if ${gl_cv_func_printf_directive_f+:} false; then :
9655 $as_echo_n "(cached) " >&6
9658 if test "$cross_compiling" = yes; then :
9661 # Guess yes on glibc systems.
9662 *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
9663 # Guess yes on FreeBSD >= 6.
9664 freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
9665 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
9666 # Guess yes on MacOS X >= 10.3.
9667 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
9668 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
9669 # Guess yes on Solaris >= 2.10.
9670 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9671 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
9672 # If we don't know, assume the worst.
9673 *) gl_cv_func_printf_directive_f="guessing no";;
9677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678 /* end confdefs.h. */
9682 static char buf[100];
9683 static double zero = 0.0;
9687 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
9688 || strcmp (buf, "1234567.000000 33") != 0)
9690 if (sprintf (buf, "%F", 1.0 / zero) < 0
9691 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
9693 /* This catches a Cygwin 1.5.x bug. */
9694 if (sprintf (buf, "%.F", 1234.0) < 0
9695 || strcmp (buf, "1234") != 0)
9700 if ac_fn_c_try_run "$LINENO"; then :
9701 gl_cv_func_printf_directive_f=yes
9703 gl_cv_func_printf_directive_f=no
9705 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9706 conftest.$ac_objext conftest.beam conftest.$ac_ext
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
9712 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
9716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
9717 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
9718 if ${gl_cv_func_printf_directive_n+:} false; then :
9719 $as_echo_n "(cached) " >&6
9722 if test "$cross_compiling" = yes; then :
9725 mingw*) gl_cv_func_printf_directive_n="guessing no";;
9726 *) gl_cv_func_printf_directive_n="guessing yes";;
9730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9731 /* end confdefs.h. */
9737 /* See page about "Parameter Validation" on msdn.microsoft.com. */
9739 invalid_parameter_handler (const wchar_t *expression,
9740 const wchar_t *function,
9741 const wchar_t *file, unsigned int line,
9747 static char fmtstring[10];
9748 static char buf[100];
9753 _set_invalid_parameter_handler (invalid_parameter_handler);
9755 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
9756 support %n in format strings in read-only memory but not in writable
9758 strcpy (fmtstring, "%d %n");
9759 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
9760 || strcmp (buf, "123 ") != 0
9766 if ac_fn_c_try_run "$LINENO"; then :
9767 gl_cv_func_printf_directive_n=yes
9769 gl_cv_func_printf_directive_n=no
9771 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9772 conftest.$ac_objext conftest.beam conftest.$ac_ext
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
9778 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
9783 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
9784 if ${gl_cv_func_printf_directive_ls+:} false; then :
9785 $as_echo_n "(cached) " >&6
9788 if test "$cross_compiling" = yes; then :
9791 openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
9792 irix*) gl_cv_func_printf_directive_ls="guessing no";;
9793 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
9794 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
9795 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
9796 *) gl_cv_func_printf_directive_ls="guessing yes";;
9800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9801 /* end confdefs.h. */
9803 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9805 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9806 included before <wchar.h>. */
9816 /* Test whether %ls works at all.
9817 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
9820 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
9822 if (sprintf (buf, "%ls", wstring) < 0
9823 || strcmp (buf, "abc") != 0)
9826 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
9827 assertion failure inside libc), but not on OpenBSD 4.0. */
9829 static const wchar_t wstring[] = { 'a', 0 };
9831 if (sprintf (buf, "%ls", wstring) < 0
9832 || strcmp (buf, "a") != 0)
9835 /* Test whether precisions in %ls are supported as specified in ISO C 99
9837 "If a precision is specified, no more than that many bytes are written
9838 (including shift sequences, if any), and the array shall contain a
9839 null wide character if, to equal the multibyte character sequence
9840 length given by the precision, the function would need to access a
9841 wide character one past the end of the array."
9842 This test fails on Solaris 10. */
9844 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
9846 if (sprintf (buf, "%.2ls", wstring) < 0
9847 || strcmp (buf, "ab") != 0)
9853 if ac_fn_c_try_run "$LINENO"; then :
9854 gl_cv_func_printf_directive_ls=yes
9856 gl_cv_func_printf_directive_ls=no
9858 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9859 conftest.$ac_objext conftest.beam conftest.$ac_ext
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
9865 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
9870 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
9871 if ${gl_cv_func_printf_positions+:} false; then :
9872 $as_echo_n "(cached) " >&6
9875 if test "$cross_compiling" = yes; then :
9878 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
9879 gl_cv_func_printf_positions="guessing no";;
9880 beos*) gl_cv_func_printf_positions="guessing no";;
9881 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
9882 *) gl_cv_func_printf_positions="guessing yes";;
9886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9887 /* end confdefs.h. */
9891 /* The string "%2$d %1$d", with dollar characters protected from the shell's
9892 dollar expansion (possibly an autoconf bug). */
9893 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
9894 static char buf[100];
9897 sprintf (buf, format, 33, 55);
9898 return (strcmp (buf, "55 33") != 0);
9901 if ac_fn_c_try_run "$LINENO"; then :
9902 gl_cv_func_printf_positions=yes
9904 gl_cv_func_printf_positions=no
9906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9907 conftest.$ac_objext conftest.beam conftest.$ac_ext
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
9913 $as_echo "$gl_cv_func_printf_positions" >&6; }
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
9918 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
9919 if ${gl_cv_func_printf_flag_grouping+:} false; then :
9920 $as_echo_n "(cached) " >&6
9923 if test "$cross_compiling" = yes; then :
9926 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
9927 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
9928 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
9929 *) gl_cv_func_printf_flag_grouping="guessing yes";;
9933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9934 /* end confdefs.h. */
9938 static char buf[100];
9941 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
9942 || buf[strlen (buf) - 1] != '9')
9947 if ac_fn_c_try_run "$LINENO"; then :
9948 gl_cv_func_printf_flag_grouping=yes
9950 gl_cv_func_printf_flag_grouping=no
9952 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9953 conftest.$ac_objext conftest.beam conftest.$ac_ext
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
9959 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
9964 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
9965 if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
9966 $as_echo_n "(cached) " >&6
9969 if test "$cross_compiling" = yes; then :
9972 # Guess yes on HP-UX 11.
9973 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
9974 # Guess no on HP-UX 10 and older.
9975 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
9976 # Guess yes otherwise.
9977 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
9981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9982 /* end confdefs.h. */
9986 static char buf[100];
9989 /* Check that a '-' flag is not annihilated by a negative width. */
9990 if (sprintf (buf, "a%-*sc", -3, "b") < 0
9991 || strcmp (buf, "ab c") != 0)
9996 if ac_fn_c_try_run "$LINENO"; then :
9997 gl_cv_func_printf_flag_leftadjust=yes
9999 gl_cv_func_printf_flag_leftadjust=no
10001 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10002 conftest.$ac_objext conftest.beam conftest.$ac_ext
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10008 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10013 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
10014 if ${gl_cv_func_printf_flag_zero+:} false; then :
10015 $as_echo_n "(cached) " >&6
10018 if test "$cross_compiling" = yes; then :
10021 # Guess yes on glibc systems.
10022 *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10023 # Guess yes on BeOS.
10024 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
10025 # If we don't know, assume the worst.
10026 *) gl_cv_func_printf_flag_zero="guessing no";;
10030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10031 /* end confdefs.h. */
10034 #include <string.h>
10035 static char buf[100];
10036 static double zero = 0.0;
10039 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10040 || (strcmp (buf, " inf") != 0
10041 && strcmp (buf, " infinity") != 0))
10046 if ac_fn_c_try_run "$LINENO"; then :
10047 gl_cv_func_printf_flag_zero=yes
10049 gl_cv_func_printf_flag_zero=no
10051 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10052 conftest.$ac_objext conftest.beam conftest.$ac_ext
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10058 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10063 $as_echo_n "checking whether printf supports large precisions... " >&6; }
10064 if ${gl_cv_func_printf_precision+:} false; then :
10065 $as_echo_n "(cached) " >&6
10068 if test "$cross_compiling" = yes; then :
10071 # Guess no only on Solaris, native Windows, and BeOS systems.
10072 solaris*) gl_cv_func_printf_precision="guessing no" ;;
10073 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10074 beos*) gl_cv_func_printf_precision="guessing no" ;;
10075 *) gl_cv_func_printf_precision="guessing yes" ;;
10079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10080 /* end confdefs.h. */
10083 #include <string.h>
10084 static char buf[5000];
10089 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
10092 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10094 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10096 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10099 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10105 if ac_fn_c_try_run "$LINENO"; then :
10106 gl_cv_func_printf_precision=yes
10108 gl_cv_func_printf_precision=no
10110 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10111 conftest.$ac_objext conftest.beam conftest.$ac_ext
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10117 $as_echo "$gl_cv_func_printf_precision" >&6; }
10120 gl_cv_c_multiarch=no
10121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10122 /* end confdefs.h. */
10123 #ifndef __APPLE_CC__
10124 not a universal capable compiler
10129 if ac_fn_c_try_compile "$LINENO"; then :
10133 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10134 if test -n "$prev"; then
10136 i?86 | x86_64 | ppc | ppc64)
10137 if test -z "$arch" || test "$arch" = "$word"; then
10140 gl_cv_c_multiarch=yes
10146 if test "x$word" = "x-arch"; then
10153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10154 if test $gl_cv_c_multiarch = yes; then
10155 APPLE_UNIVERSAL_BUILD=1
10157 APPLE_UNIVERSAL_BUILD=0
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10165 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
10166 if ${gl_cv_func_printf_enomem+:} false; then :
10167 $as_echo_n "(cached) " >&6
10170 gl_cv_func_printf_enomem="guessing no"
10171 if test "$cross_compiling" = no; then
10172 if test $APPLE_UNIVERSAL_BUILD = 0; then
10173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10174 /* end confdefs.h. */
10177 #include <stdlib.h>
10178 #if defined __MACH__ && defined __APPLE__
10179 /* Avoid a crash on MacOS X. */
10180 #include <mach/mach.h>
10181 #include <mach/mach_error.h>
10182 #include <mach/thread_status.h>
10183 #include <mach/exception.h>
10184 #include <mach/task.h>
10185 #include <pthread.h>
10186 /* The exception port on which our thread listens. */
10187 static mach_port_t our_exception_port;
10188 /* The main function of the thread listening for exceptions of type
10191 mach_exception_thread (void *arg)
10193 /* Buffer for a message to be received. */
10195 mach_msg_header_t head;
10196 mach_msg_body_t msgh_body;
10199 mach_msg_return_t retval;
10200 /* Wait for a message on the exception port. */
10201 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10202 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10203 if (retval != MACH_MSG_SUCCESS)
10208 nocrash_init (void)
10210 mach_port_t self = mach_task_self ();
10211 /* Allocate a port on which the thread shall listen for exceptions. */
10212 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10214 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
10215 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10216 MACH_MSG_TYPE_MAKE_SEND)
10218 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
10220 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10221 /* Create the thread listening on the exception port. */
10222 pthread_attr_t attr;
10224 if (pthread_attr_init (&attr) == 0
10225 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10226 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10227 pthread_attr_destroy (&attr);
10228 /* Replace the exception port info for these exceptions with our own.
10229 Note that we replace the exception port for the entire task, not only
10230 for a particular thread. This has the effect that when our exception
10231 port gets the message, the thread specific exception port has already
10232 been asked, and we don't need to bother about it.
10233 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
10234 task_set_exception_ports (self, mask, our_exception_port,
10235 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10240 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10241 /* Avoid a crash on native Windows. */
10242 #define WIN32_LEAN_AND_MEAN
10243 #include <windows.h>
10244 #include <winerror.h>
10246 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10248 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10250 case EXCEPTION_ACCESS_VIOLATION:
10251 case EXCEPTION_IN_PAGE_ERROR:
10252 case EXCEPTION_STACK_OVERFLOW:
10253 case EXCEPTION_GUARD_PAGE:
10254 case EXCEPTION_PRIV_INSTRUCTION:
10255 case EXCEPTION_ILLEGAL_INSTRUCTION:
10256 case EXCEPTION_DATATYPE_MISALIGNMENT:
10257 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10258 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10261 return EXCEPTION_CONTINUE_SEARCH;
10264 nocrash_init (void)
10266 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10269 /* Avoid a crash on POSIX systems. */
10270 #include <signal.h>
10271 /* A POSIX signal handler. */
10273 exception_handler (int sig)
10278 nocrash_init (void)
10281 signal (SIGSEGV, exception_handler);
10284 signal (SIGBUS, exception_handler);
10290 #include <sys/types.h>
10291 #include <sys/time.h>
10292 #include <sys/resource.h>
10296 struct rlimit limit;
10299 /* Some printf implementations allocate temporary space with malloc. */
10300 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
10302 if (getrlimit (RLIMIT_DATA, &limit) < 0)
10304 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10305 limit.rlim_max = 5000000;
10306 limit.rlim_cur = limit.rlim_max;
10307 if (setrlimit (RLIMIT_DATA, &limit) < 0)
10310 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
10312 if (getrlimit (RLIMIT_AS, &limit) < 0)
10314 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10315 limit.rlim_max = 5000000;
10316 limit.rlim_cur = limit.rlim_max;
10317 if (setrlimit (RLIMIT_AS, &limit) < 0)
10320 /* Some printf implementations allocate temporary space on the stack. */
10321 #ifdef RLIMIT_STACK
10322 if (getrlimit (RLIMIT_STACK, &limit) < 0)
10324 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10325 limit.rlim_max = 5000000;
10326 limit.rlim_cur = limit.rlim_max;
10327 if (setrlimit (RLIMIT_STACK, &limit) < 0)
10330 ret = printf ("%.5000000f", 1.0);
10331 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10335 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10336 (eval $ac_link) 2>&5
10338 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10339 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10342 if test $result != 0 && test $result != 77; then result=1; fi
10344 ) >/dev/null 2>/dev/null
10346 0) gl_cv_func_printf_enomem="yes" ;;
10347 77) gl_cv_func_printf_enomem="guessing no" ;;
10348 *) gl_cv_func_printf_enomem="no" ;;
10351 gl_cv_func_printf_enomem="guessing no"
10355 gl_cv_func_printf_enomem="guessing no"
10358 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10360 # Guess yes on glibc systems.
10361 *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
10362 # Guess yes on Solaris.
10363 solaris*) gl_cv_func_printf_enomem="guessing yes";;
10364 # Guess yes on AIX.
10365 aix*) gl_cv_func_printf_enomem="guessing yes";;
10366 # Guess yes on HP-UX/hppa.
10367 hpux*) case "$host_cpu" in
10368 hppa*) gl_cv_func_printf_enomem="guessing yes";;
10369 *) gl_cv_func_printf_enomem="guessing no";;
10372 # Guess yes on IRIX.
10373 irix*) gl_cv_func_printf_enomem="guessing yes";;
10374 # Guess yes on OSF/1.
10375 osf*) gl_cv_func_printf_enomem="guessing yes";;
10376 # Guess yes on BeOS.
10377 beos*) gl_cv_func_printf_enomem="guessing yes";;
10378 # Guess yes on Haiku.
10379 haiku*) gl_cv_func_printf_enomem="guessing yes";;
10380 # If we don't know, assume the worst.
10381 *) gl_cv_func_printf_enomem="guessing no";;
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
10387 $as_echo "$gl_cv_func_printf_enomem" >&6; }
10391 case "$gl_cv_func_printf_long_double" in
10396 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10405 $as_echo_n "checking for unsigned long long int... " >&6; }
10406 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10407 $as_echo_n "(cached) " >&6
10409 ac_cv_type_unsigned_long_long_int=yes
10410 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10412 /* end confdefs.h. */
10414 /* For now, do not test the preprocessor; as of 2007 there are too many
10415 implementations with broken preprocessors. Perhaps this can
10416 be revisited in 2012. In the meantime, code should not expect
10417 #if to work with literals wider than 32 bits. */
10418 /* Test literals. */
10419 long long int ll = 9223372036854775807ll;
10420 long long int nll = -9223372036854775807LL;
10421 unsigned long long int ull = 18446744073709551615ULL;
10422 /* Test constant expressions. */
10423 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10425 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10431 /* Test availability of runtime routines for shift and division. */
10432 long long int llmax = 9223372036854775807ll;
10433 unsigned long long int ullmax = 18446744073709551615ull;
10434 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10435 | (llmax / ll) | (llmax % ll)
10436 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10437 | (ullmax / ull) | (ullmax % ull));
10443 if ac_fn_c_try_link "$LINENO"; then :
10446 ac_cv_type_unsigned_long_long_int=no
10448 rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10453 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10454 if test $ac_cv_type_unsigned_long_long_int = yes; then
10456 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10463 $as_echo_n "checking for long long int... " >&6; }
10464 if ${ac_cv_type_long_long_int+:} false; then :
10465 $as_echo_n "(cached) " >&6
10467 ac_cv_type_long_long_int=yes
10468 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10469 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10470 if test $ac_cv_type_long_long_int = yes; then
10471 if test "$cross_compiling" = yes; then :
10474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10475 /* end confdefs.h. */
10476 #include <limits.h>
10479 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10480 # define LLONG_MAX (HALF - 1 + HALF)
10485 long long int n = 1;
10489 long long int m = n << i;
10492 if (LLONG_MAX / 2 < m)
10500 if ac_fn_c_try_run "$LINENO"; then :
10503 ac_cv_type_long_long_int=no
10505 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10506 conftest.$ac_objext conftest.beam conftest.$ac_ext
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10513 $as_echo "$ac_cv_type_long_long_int" >&6; }
10514 if test $ac_cv_type_long_long_int = yes; then
10516 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10522 $as_echo_n "checking for wchar_t... " >&6; }
10523 if ${gt_cv_c_wchar_t+:} false; then :
10524 $as_echo_n "(cached) " >&6
10526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10527 /* end confdefs.h. */
10528 #include <stddef.h>
10529 wchar_t foo = (wchar_t)'\0';
10538 if ac_fn_c_try_compile "$LINENO"; then :
10539 gt_cv_c_wchar_t=yes
10543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
10546 $as_echo "$gt_cv_c_wchar_t" >&6; }
10547 if test $gt_cv_c_wchar_t = yes; then
10549 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
10555 $as_echo_n "checking for wint_t... " >&6; }
10556 if ${gt_cv_c_wint_t+:} false; then :
10557 $as_echo_n "(cached) " >&6
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560 /* end confdefs.h. */
10562 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10564 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
10565 before <wchar.h>. */
10566 #include <stddef.h>
10570 wint_t foo = (wchar_t)'\0';
10579 if ac_fn_c_try_compile "$LINENO"; then :
10584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
10587 $as_echo "$gt_cv_c_wint_t" >&6; }
10588 if test $gt_cv_c_wint_t = yes; then
10590 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
10598 if test $ac_cv_header_features_h = yes; then
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
10609 $as_echo_n "checking for intmax_t... " >&6; }
10610 if ${gt_cv_c_intmax_t+:} false; then :
10611 $as_echo_n "(cached) " >&6
10613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10614 /* end confdefs.h. */
10616 #include <stddef.h>
10617 #include <stdlib.h>
10618 #if HAVE_STDINT_H_WITH_UINTMAX
10619 #include <stdint.h>
10621 #if HAVE_INTTYPES_H_WITH_UINTMAX
10622 #include <inttypes.h>
10628 intmax_t x = -1; return !x;
10633 if ac_fn_c_try_compile "$LINENO"; then :
10634 gt_cv_c_intmax_t=yes
10636 gt_cv_c_intmax_t=no
10638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
10641 $as_echo "$gt_cv_c_intmax_t" >&6; }
10642 if test $gt_cv_c_intmax_t = yes; then
10644 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
10648 test $ac_cv_type_long_long_int = yes \
10649 && ac_type='long long' \
10652 cat >>confdefs.h <<_ACEOF
10653 #define intmax_t $ac_type
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10660 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
10661 if ${gl_cv_cc_double_expbit0+:} false; then :
10662 $as_echo_n "(cached) " >&6
10665 if test "$cross_compiling" = yes; then :
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668 /* end confdefs.h. */
10670 #if defined arm || defined __arm || defined __arm__
10675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10676 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10677 gl_cv_cc_double_expbit0="unknown"
10681 if ${ac_cv_c_bigendian+:} false; then :
10682 $as_echo_n "(cached) " >&6
10684 ac_cv_c_bigendian=unknown
10685 # See if we're dealing with a universal compiler.
10686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687 /* end confdefs.h. */
10688 #ifndef __APPLE_CC__
10689 not a universal capable compiler
10694 if ac_fn_c_try_compile "$LINENO"; then :
10696 # Check for potential -arch flags. It is not universal unless
10697 # there are at least two -arch flags with different values.
10700 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10701 if test -n "$ac_prev"; then
10703 i?86 | x86_64 | ppc | ppc64)
10704 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10707 ac_cv_c_bigendian=universal
10713 elif test "x$ac_word" = "x-arch"; then
10718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10719 if test $ac_cv_c_bigendian = unknown; then
10720 # See if sys/param.h defines the BYTE_ORDER macro.
10721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10722 /* end confdefs.h. */
10723 #include <sys/types.h>
10724 #include <sys/param.h>
10729 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10730 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10732 bogus endian macros
10739 if ac_fn_c_try_compile "$LINENO"; then :
10740 # It does; now see whether it defined to BIG_ENDIAN or not.
10741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10742 /* end confdefs.h. */
10743 #include <sys/types.h>
10744 #include <sys/param.h>
10749 #if BYTE_ORDER != BIG_ENDIAN
10757 if ac_fn_c_try_compile "$LINENO"; then :
10758 ac_cv_c_bigendian=yes
10760 ac_cv_c_bigendian=no
10762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10766 if test $ac_cv_c_bigendian = unknown; then
10767 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10769 /* end confdefs.h. */
10770 #include <limits.h>
10775 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10776 bogus endian macros
10783 if ac_fn_c_try_compile "$LINENO"; then :
10784 # It does; now see whether it defined to _BIG_ENDIAN or not.
10785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10786 /* end confdefs.h. */
10787 #include <limits.h>
10792 #ifndef _BIG_ENDIAN
10800 if ac_fn_c_try_compile "$LINENO"; then :
10801 ac_cv_c_bigendian=yes
10803 ac_cv_c_bigendian=no
10805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10809 if test $ac_cv_c_bigendian = unknown; then
10810 # Compile a test program.
10811 if test "$cross_compiling" = yes; then :
10812 # Try to guess by grepping values from an object file.
10813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10814 /* end confdefs.h. */
10815 short int ascii_mm[] =
10816 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10817 short int ascii_ii[] =
10818 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10819 int use_ascii (int i) {
10820 return ascii_mm[i] + ascii_ii[i];
10822 short int ebcdic_ii[] =
10823 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10824 short int ebcdic_mm[] =
10825 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10826 int use_ebcdic (int i) {
10827 return ebcdic_mm[i] + ebcdic_ii[i];
10834 return use_ascii (foo) == use_ebcdic (foo);
10839 if ac_fn_c_try_compile "$LINENO"; then :
10840 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10841 ac_cv_c_bigendian=yes
10843 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10844 if test "$ac_cv_c_bigendian" = unknown; then
10845 ac_cv_c_bigendian=no
10847 # finding both strings is unlikely to happen, but who knows?
10848 ac_cv_c_bigendian=unknown
10852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10855 /* end confdefs.h. */
10856 $ac_includes_default
10861 /* Are we little or big endian? From Harbison&Steele. */
10865 char c[sizeof (long int)];
10868 return u.c[sizeof (long int) - 1] == 1;
10874 if ac_fn_c_try_run "$LINENO"; then :
10875 ac_cv_c_bigendian=no
10877 ac_cv_c_bigendian=yes
10879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10880 conftest.$ac_objext conftest.beam conftest.$ac_ext
10886 case $ac_cv_c_bigendian in #(
10888 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
10890 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
10893 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10897 gl_cv_cc_double_expbit0="unknown" ;;
10906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10907 /* end confdefs.h. */
10910 #include <stddef.h>
10912 #include <string.h>
10914 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10915 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
10916 static unsigned int ored_words[NWORDS];
10917 static unsigned int anded_words[NWORDS];
10918 static void add_to_ored_words (double x)
10922 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
10923 memset (&m, 0, sizeof (memory_double));
10925 for (i = 0; i < NWORDS; i++)
10927 ored_words[i] |= m.word[i];
10928 anded_words[i] &= m.word[i];
10934 FILE *fp = fopen ("conftest.out", "w");
10937 for (j = 0; j < NWORDS; j++)
10938 anded_words[j] = ~ (unsigned int) 0;
10939 add_to_ored_words (0.25);
10940 add_to_ored_words (0.5);
10941 add_to_ored_words (1.0);
10942 add_to_ored_words (2.0);
10943 add_to_ored_words (4.0);
10944 /* Remove bits that are common (e.g. if representation of the first mantissa
10945 bit is explicit). */
10946 for (j = 0; j < NWORDS; j++)
10947 ored_words[j] &= ~anded_words[j];
10948 /* Now find the nonzero word. */
10949 for (j = 0; j < NWORDS; j++)
10950 if (ored_words[j] != 0)
10955 for (i = j + 1; i < NWORDS; i++)
10956 if (ored_words[i] != 0)
10958 fprintf (fp, "unknown");
10959 return (fclose (fp) != 0);
10962 if ((ored_words[j] >> i) & 1)
10964 fprintf (fp, "word %d bit %d", (int) j, (int) i);
10965 return (fclose (fp) != 0);
10968 fprintf (fp, "unknown");
10969 return (fclose (fp) != 0);
10973 if ac_fn_c_try_run "$LINENO"; then :
10974 gl_cv_cc_double_expbit0=`cat conftest.out`
10976 gl_cv_cc_double_expbit0="unknown"
10978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10979 conftest.$ac_objext conftest.beam conftest.$ac_ext
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
10986 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
10987 case "$gl_cv_cc_double_expbit0" in
10989 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10990 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
10992 cat >>confdefs.h <<_ACEOF
10993 #define DBL_EXPBIT0_WORD $word
10997 cat >>confdefs.h <<_ACEOF
10998 #define DBL_EXPBIT0_BIT $bit
11012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11013 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
11014 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
11015 $as_echo_n "(cached) " >&6
11018 if test "$cross_compiling" = yes; then :
11021 # Guess yes on glibc systems.
11022 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11023 # Guess yes on FreeBSD >= 5.
11024 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
11025 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11026 # Guess yes on MacOS X >= 10.3.
11027 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
11028 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11029 # Guess yes on OpenBSD >= 3.9.
11030 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11031 gl_cv_func_snprintf_retval_c99="guessing no";;
11032 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11033 # Guess yes on Solaris >= 2.10.
11034 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11035 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
11036 # Guess yes on AIX >= 4.
11037 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
11038 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11039 # Guess yes on NetBSD >= 3.
11040 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11041 gl_cv_func_snprintf_retval_c99="guessing no";;
11042 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11043 # Guess yes on BeOS.
11044 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11045 # If we don't know, assume the worst.
11046 *) gl_cv_func_snprintf_retval_c99="guessing no";;
11050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11051 /* end confdefs.h. */
11054 #include <string.h>
11056 # define my_snprintf snprintf
11058 # include <stdarg.h>
11059 static int my_snprintf (char *buf, int size, const char *format, ...)
11063 va_start (args, format);
11064 ret = vsnprintf (buf, size, format, args);
11069 static char buf[100];
11072 strcpy (buf, "ABCDEF");
11073 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11075 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11077 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11082 if ac_fn_c_try_run "$LINENO"; then :
11083 gl_cv_func_snprintf_retval_c99=yes
11085 gl_cv_func_snprintf_retval_c99=no
11087 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11088 conftest.$ac_objext conftest.beam conftest.$ac_ext
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11094 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
11102 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
11104 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11105 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11106 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11107 cat >>confdefs.h <<_ACEOF
11108 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11114 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11116 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
11122 cat >>confdefs.h <<_ACEOF
11123 #define HAVE_DECL__SNPRINTF $ac_have_decl
11128 case "$gl_cv_func_snprintf_retval_c99" in
11131 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11157 GNULIB_COPYSIGNF=0;
11158 GNULIB_COPYSIGNL=0;
11217 GNULIB_REMAINDER=0;
11218 GNULIB_REMAINDERF=0;
11219 GNULIB_REMAINDERL=0;
11305 HAVE_DECL_COPYSIGNF=1;
11311 HAVE_DECL_EXPM1L=1;
11312 HAVE_DECL_FLOORF=1;
11313 HAVE_DECL_FLOORL=1;
11314 HAVE_DECL_FREXPL=1;
11315 HAVE_DECL_LDEXPL=1;
11317 HAVE_DECL_LOG10L=1;
11322 HAVE_DECL_REMAINDER=1;
11323 HAVE_DECL_REMAINDERL=1;
11326 HAVE_DECL_ROUNDF=1;
11327 HAVE_DECL_ROUNDL=1;
11332 HAVE_DECL_TRUNCF=1;
11333 HAVE_DECL_TRUNCL=1;
11356 REPLACE_HUGE_VAL=0;
11362 REPLACE_ISFINITE=0;
11385 REPLACE_REMAINDER=0;
11386 REPLACE_REMAINDERF=0;
11387 REPLACE_REMAINDERL=0;
11392 REPLACE_SIGNBIT_USING_GCC=0;
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11400 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
11401 if ${gl_cv_func_frexp_no_libm+:} false; then :
11402 $as_echo_n "(cached) " >&6
11405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11406 /* end confdefs.h. */
11412 int e; return frexp (x, &e) > 0;
11417 if ac_fn_c_try_link "$LINENO"; then :
11418 gl_cv_func_frexp_no_libm=yes
11420 gl_cv_func_frexp_no_libm=no
11422 rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext conftest.$ac_ext
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11427 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11433 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
11434 if ${gl_cv_var_stdin_large_offset+:} false; then :
11435 $as_echo_n "(cached) " >&6
11437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11438 /* end confdefs.h. */
11443 #if defined __SL64 && defined __SCLE /* cygwin */
11444 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11445 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
11446 it is easier to do a version check than building a runtime test. */
11447 # include <cygwin/version.h>
11448 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11456 if ac_fn_c_try_link "$LINENO"; then :
11457 gl_cv_var_stdin_large_offset=yes
11459 gl_cv_var_stdin_large_offset=no
11461 rm -f core conftest.err conftest.$ac_objext \
11462 conftest$ac_exeext conftest.$ac_ext
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11465 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11474 $as_echo_n "checking for 64-bit off_t... " >&6; }
11475 if ${gl_cv_type_off_t_64+:} false; then :
11476 $as_echo_n "(cached) " >&6
11478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11479 /* end confdefs.h. */
11480 #include <sys/types.h>
11481 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11491 if ac_fn_c_try_compile "$LINENO"; then :
11492 gl_cv_type_off_t_64=yes
11494 gl_cv_type_off_t_64=no
11496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11500 $as_echo "$gl_cv_type_off_t_64" >&6; }
11501 if test $gl_cv_type_off_t_64 = no; then
11502 WINDOWS_64_BIT_OFF_T=1
11504 WINDOWS_64_BIT_OFF_T=0
11506 WINDOWS_64_BIT_ST_SIZE=1
11509 WINDOWS_64_BIT_OFF_T=0
11510 WINDOWS_64_BIT_ST_SIZE=0
11530 if test $gl_cv_have_include_next = yes; then
11531 gl_cv_next_sys_types_h='<'sys/types.h'>'
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
11534 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
11535 if ${gl_cv_next_sys_types_h+:} false; then :
11536 $as_echo_n "(cached) " >&6
11539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540 /* end confdefs.h. */
11541 #include <sys/types.h>
11545 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11546 *) gl_absname_cpp="$ac_cpp" ;;
11551 gl_dirsep_regex='[/\\]'
11554 gl_dirsep_regex='\/'
11557 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11559 gl_header_literal_regex=`echo 'sys/types.h' \
11560 | sed -e "$gl_make_literal_regex_sed"`
11561 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11562 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11567 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11568 sed -n "$gl_absolute_header_sed"`'"'
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
11573 $as_echo "$gl_cv_next_sys_types_h" >&6; }
11575 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
11577 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11578 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11579 gl_next_as_first_directive='<'sys/types.h'>'
11581 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11582 gl_next_as_first_directive=$gl_cv_next_sys_types_h
11584 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
11596 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11597 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11603 cat >>confdefs.h <<_ACEOF
11604 #define HAVE_DECL_FSEEKO $ac_have_decl
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11616 $as_echo_n "checking for fseeko... " >&6; }
11617 if ${gl_cv_func_fseeko+:} false; then :
11618 $as_echo_n "(cached) " >&6
11621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11622 /* end confdefs.h. */
11628 fseeko (stdin, 0, 0);
11633 if ac_fn_c_try_link "$LINENO"; then :
11634 gl_cv_func_fseeko=yes
11636 gl_cv_func_fseeko=no
11638 rm -f core conftest.err conftest.$ac_objext \
11639 conftest$ac_exeext conftest.$ac_ext
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11643 $as_echo "$gl_cv_func_fseeko" >&6; }
11646 if test $ac_cv_have_decl_fseeko = no; then
11650 if test $gl_cv_func_fseeko = no; then
11653 if test $WINDOWS_64_BIT_OFF_T = 1; then
11656 if test $gl_cv_var_stdin_large_offset = no; then
11662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
11663 $as_echo_n "checking whether fflush works on input streams... " >&6; }
11664 if ${gl_cv_func_fflush_stdin+:} false; then :
11665 $as_echo_n "(cached) " >&6
11667 echo hello world > conftest.txt
11668 if test "$cross_compiling" = yes; then :
11669 gl_cv_func_fflush_stdin=no
11671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11672 /* end confdefs.h. */
11676 # include <unistd.h>
11677 #else /* on Windows with MSVC */
11684 FILE *f = fopen ("conftest.txt", "r");
11691 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
11693 /* For deterministic results, ensure f read a bigger buffer. */
11694 if (lseek (fd, 0, SEEK_CUR) == 5)
11696 /* POSIX requires fflush-fseek to set file offset of fd. This fails
11697 on BSD systems and on mingw. */
11698 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
11700 if (lseek (fd, 0, SEEK_CUR) != 5)
11702 /* Verify behaviour of fflush after ungetc. See
11703 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
11704 /* Verify behaviour of fflush after a backup ungetc. This fails on
11709 if (fgetc (f) != c)
11711 /* Verify behaviour of fflush after a non-backup ungetc. This fails
11712 on glibc 2.8 and on BSD systems. */
11716 if (fgetc (f) != c)
11724 if ac_fn_c_try_run "$LINENO"; then :
11725 gl_cv_func_fflush_stdin=yes
11727 gl_cv_func_fflush_stdin=no
11729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11730 conftest.$ac_objext conftest.beam conftest.$ac_ext
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
11737 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
11739 if test $gl_cv_func_fflush_stdin = no; then
11758 GNULIB_UTIMENSAT=0;
11772 REPLACE_FUTIMENS=0;
11778 REPLACE_UTIMENSAT=0;
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11781 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11782 if ${ac_cv_header_stat_broken+:} false; then :
11783 $as_echo_n "(cached) " >&6
11785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11786 /* end confdefs.h. */
11787 #include <sys/types.h>
11788 #include <sys/stat.h>
11790 #if defined S_ISBLK && defined S_IFDIR
11791 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11794 #if defined S_ISBLK && defined S_IFCHR
11795 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11798 #if defined S_ISLNK && defined S_IFREG
11799 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11802 #if defined S_ISSOCK && defined S_IFREG
11803 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11807 if ac_fn_c_try_compile "$LINENO"; then :
11808 ac_cv_header_stat_broken=no
11810 ac_cv_header_stat_broken=yes
11812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11815 $as_echo "$ac_cv_header_stat_broken" >&6; }
11816 if test $ac_cv_header_stat_broken = yes; then
11818 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11840 if test $gl_cv_have_include_next = yes; then
11841 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11844 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11845 if ${gl_cv_next_sys_stat_h+:} false; then :
11846 $as_echo_n "(cached) " >&6
11849 if test $ac_cv_header_sys_stat_h = yes; then
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h. */
11854 #include <sys/stat.h>
11858 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11859 *) gl_absname_cpp="$ac_cpp" ;;
11864 gl_dirsep_regex='[/\\]'
11867 gl_dirsep_regex='\/'
11870 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11872 gl_header_literal_regex=`echo 'sys/stat.h' \
11873 | sed -e "$gl_make_literal_regex_sed"`
11874 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11875 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11880 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11881 sed -n "$gl_absolute_header_sed"`'"'
11883 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11889 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
11891 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11893 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11894 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11895 gl_next_as_first_directive='<'sys/stat.h'>'
11897 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11898 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11900 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11912 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
11914 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
11918 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11919 #include <sys/stat.h>
11921 if test "x$ac_cv_type_nlink_t" = xyes; then :
11925 $as_echo "#define nlink_t int" >>confdefs.h
11931 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
11932 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11934 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11935 if eval \${$as_gl_Symbol+:} false; then :
11936 $as_echo_n "(cached) " >&6
11938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11939 /* end confdefs.h. */
11940 #include <sys/stat.h>
11951 if ac_fn_c_try_compile "$LINENO"; then :
11952 eval "$as_gl_Symbol=yes"
11954 eval "$as_gl_Symbol=no"
11956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11958 eval ac_res=\$$as_gl_Symbol
11959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11960 $as_echo "$ac_res" >&6; }
11961 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11962 cat >>confdefs.h <<_ACEOF
11963 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11966 eval ac_cv_have_decl_$gl_func=yes
11971 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
11972 if test "x$ac_cv_have_decl_ftello" = xyes; then :
11978 cat >>confdefs.h <<_ACEOF
11979 #define HAVE_DECL_FTELLO $ac_have_decl
11991 if test $ac_cv_have_decl_ftello = no; then
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
11996 $as_echo_n "checking for ftello... " >&6; }
11997 if ${gl_cv_func_ftello+:} false; then :
11998 $as_echo_n "(cached) " >&6
12001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12002 /* end confdefs.h. */
12012 if ac_fn_c_try_link "$LINENO"; then :
12013 gl_cv_func_ftello=yes
12015 gl_cv_func_ftello=no
12017 rm -f core conftest.err conftest.$ac_objext \
12018 conftest$ac_exeext conftest.$ac_ext
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12022 $as_echo "$gl_cv_func_ftello" >&6; }
12023 if test $gl_cv_func_ftello = no; then
12026 if test $WINDOWS_64_BIT_OFF_T = 1; then
12029 if test $gl_cv_var_stdin_large_offset = no; then
12032 if test $REPLACE_FTELLO = 0; then
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12035 $as_echo_n "checking whether ftello works... " >&6; }
12036 if ${gl_cv_func_ftello_works+:} false; then :
12037 $as_echo_n "(cached) " >&6
12041 # Guess no on Solaris.
12042 solaris*) gl_cv_func_ftello_works="guessing no" ;;
12043 # Guess yes otherwise.
12044 *) gl_cv_func_ftello_works="guessing yes" ;;
12046 if test "$cross_compiling" = yes; then :
12049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12050 /* end confdefs.h. */
12053 #include <stdlib.h>
12054 #include <string.h>
12055 #define TESTFILE "conftest.tmp"
12061 /* Create a file with some contents. */
12062 fp = fopen (TESTFILE, "w");
12065 if (fwrite ("foogarsh", 1, 8, fp) < 8)
12070 /* The file's contents is now "foogarsh". */
12072 /* Try writing after reading to EOF. */
12073 fp = fopen (TESTFILE, "r+");
12076 if (fseek (fp, -1, SEEK_END))
12078 if (!(getc (fp) == 'h'))
12080 if (!(getc (fp) == EOF))
12082 if (!(ftell (fp) == 8))
12084 if (!(ftell (fp) == 8))
12086 if (!(putc ('!', fp) == '!'))
12088 if (!(ftell (fp) == 9))
12090 if (!(fclose (fp) == 0))
12092 fp = fopen (TESTFILE, "r");
12097 if (!(fread (buf, 1, 10, fp) == 9))
12099 if (!(memcmp (buf, "foogarsh!", 9) == 0))
12102 if (!(fclose (fp) == 0))
12105 /* The file's contents is now "foogarsh!". */
12110 if ac_fn_c_try_run "$LINENO"; then :
12111 gl_cv_func_ftello_works=yes
12113 gl_cv_func_ftello_works=no
12115 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12116 conftest.$ac_objext conftest.beam conftest.$ac_ext
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12122 $as_echo "$gl_cv_func_ftello_works" >&6; }
12123 case "$gl_cv_func_ftello_works" in
12128 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12138 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12139 if ${gl_cv_func_getcwd_null+:} false; then :
12140 $as_echo_n "(cached) " >&6
12142 if test "$cross_compiling" = yes; then :
12144 # Guess yes on glibc systems.
12145 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
12146 # Guess yes on Cygwin.
12147 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
12148 # If we don't know, assume the worst.
12149 *) gl_cv_func_getcwd_null="guessing no";;
12153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12154 /* end confdefs.h. */
12157 # include <unistd.h>
12158 # else /* on Windows with MSVC */
12159 # include <direct.h>
12169 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12170 /* mingw cwd does not start with '/', but getcwd does allocate.
12171 However, mingw fails to honor non-zero size. */
12173 if (chdir ("/") != 0)
12177 char *f = getcwd (NULL, 0);
12192 if ac_fn_c_try_run "$LINENO"; then :
12193 gl_cv_func_getcwd_null=yes
12195 gl_cv_func_getcwd_null=no
12197 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12198 conftest.$ac_objext conftest.beam conftest.$ac_ext
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12203 $as_echo "$gl_cv_func_getcwd_null" >&6; }
12206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
12207 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
12208 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
12209 $as_echo_n "(cached) " >&6
12211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12212 /* end confdefs.h. */
12213 #include <unistd.h>
12221 char *getcwd (char *, size_t);
12228 if ac_fn_c_try_compile "$LINENO"; then :
12229 gl_cv_func_getcwd_posix_signature=yes
12231 gl_cv_func_getcwd_posix_signature=no
12233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
12237 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
12256 if test $gl_cv_have_include_next = yes; then
12257 gl_cv_next_getopt_h='<'getopt.h'>'
12259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12260 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
12261 if ${gl_cv_next_getopt_h+:} false; then :
12262 $as_echo_n "(cached) " >&6
12265 if test $ac_cv_header_getopt_h = yes; then
12268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12269 /* end confdefs.h. */
12270 #include <getopt.h>
12274 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12275 *) gl_absname_cpp="$ac_cpp" ;;
12280 gl_dirsep_regex='[/\\]'
12283 gl_dirsep_regex='\/'
12286 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12288 gl_header_literal_regex=`echo 'getopt.h' \
12289 | sed -e "$gl_make_literal_regex_sed"`
12290 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12291 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12296 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12297 sed -n "$gl_absolute_header_sed"`'"'
12299 gl_cv_next_getopt_h='<'getopt.h'>'
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12305 $as_echo "$gl_cv_next_getopt_h" >&6; }
12307 NEXT_GETOPT_H=$gl_cv_next_getopt_h
12309 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12310 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12311 gl_next_as_first_directive='<'getopt.h'>'
12313 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12314 gl_next_as_first_directive=$gl_cv_next_getopt_h
12316 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12321 if test $ac_cv_header_getopt_h = yes; then
12330 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12331 for ac_header in getopt.h
12333 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12334 if test "x$ac_cv_header_getopt_h" = xyes; then :
12335 cat >>confdefs.h <<_ACEOF
12336 #define HAVE_GETOPT_H 1
12340 gl_replace_getopt=yes
12347 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12348 for ac_func in getopt_long_only
12350 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12351 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
12352 cat >>confdefs.h <<_ACEOF
12353 #define HAVE_GETOPT_LONG_ONLY 1
12357 gl_replace_getopt=yes
12363 if test -z "$gl_replace_getopt"; then
12364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12365 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
12366 if ${gl_cv_func_getopt_posix+:} false; then :
12367 $as_echo_n "(cached) " >&6
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371 /* end confdefs.h. */
12372 #include <unistd.h>
12376 int *p = &optreset; return optreset;
12381 if ac_fn_c_try_link "$LINENO"; then :
12384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12385 /* end confdefs.h. */
12386 #include <getopt.h>
12390 return !getopt_clip;
12395 if ac_fn_c_try_compile "$LINENO"; then :
12400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12402 rm -f core conftest.err conftest.$ac_objext \
12403 conftest$ac_exeext conftest.$ac_ext
12405 gl_save_CPPFLAGS=$CPPFLAGS
12406 CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
12407 if test "$cross_compiling" = yes; then :
12409 mingw*) gl_cv_func_getopt_posix="guessing no";;
12410 darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
12411 *) gl_cv_func_getopt_posix="guessing yes";;
12415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12416 /* end confdefs.h. */
12418 #include <unistd.h>
12419 #include <stdlib.h>
12420 #include <string.h>
12426 static char program[] = "program";
12427 static char a[] = "-a";
12428 static char foo[] = "foo";
12429 static char bar[] = "bar";
12430 char *argv[] = { program, a, foo, bar, NULL };
12433 optind = OPTIND_MIN;
12436 c = getopt (4, argv, "ab");
12439 c = getopt (4, argv, "ab");
12442 if (!(optind == 2))
12445 /* Some internal state exists at this point. */
12447 static char program[] = "program";
12448 static char donald[] = "donald";
12449 static char p[] = "-p";
12450 static char billy[] = "billy";
12451 static char duck[] = "duck";
12452 static char a[] = "-a";
12453 static char bar[] = "bar";
12454 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
12457 optind = OPTIND_MIN;
12460 c = getopt (7, argv, "+abp:q:");
12463 if (!(strcmp (argv[0], "program") == 0))
12465 if (!(strcmp (argv[1], "donald") == 0))
12467 if (!(strcmp (argv[2], "-p") == 0))
12469 if (!(strcmp (argv[3], "billy") == 0))
12471 if (!(strcmp (argv[4], "duck") == 0))
12473 if (!(strcmp (argv[5], "-a") == 0))
12475 if (!(strcmp (argv[6], "bar") == 0))
12477 if (!(optind == 1))
12480 /* Detect MacOS 10.5, AIX 7.1 bug. */
12482 static char program[] = "program";
12483 static char ab[] = "-ab";
12484 char *argv[3] = { program, ab, NULL };
12485 optind = OPTIND_MIN;
12487 if (getopt (2, argv, "ab:") != 'a')
12489 if (getopt (2, argv, "ab:") != '?')
12501 if ac_fn_c_try_run "$LINENO"; then :
12502 gl_cv_func_getopt_posix=yes
12504 gl_cv_func_getopt_posix=no
12506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12507 conftest.$ac_objext conftest.beam conftest.$ac_ext
12510 CPPFLAGS=$gl_save_CPPFLAGS
12513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
12514 $as_echo "$gl_cv_func_getopt_posix" >&6; }
12515 case "$gl_cv_func_getopt_posix" in
12516 *no) gl_replace_getopt=yes ;;
12520 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12522 $as_echo_n "checking for working GNU getopt function... " >&6; }
12523 if ${gl_cv_func_getopt_gnu+:} false; then :
12524 $as_echo_n "(cached) " >&6
12526 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
12527 # optstring is necessary for programs like m4 that have POSIX-mandated
12528 # semantics for supporting options interspersed with files.
12529 # Also, since getopt_long is a GNU extension, we require optind=0.
12530 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
12531 # so take care to revert to the correct (non-)export state.
12532 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
12533 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
12534 xx) gl_had_POSIXLY_CORRECT=exported ;;
12535 x) gl_had_POSIXLY_CORRECT=yes ;;
12536 *) gl_had_POSIXLY_CORRECT= ;;
12539 export POSIXLY_CORRECT
12540 if test "$cross_compiling" = yes; then :
12541 case $host_os:$ac_cv_have_decl_optreset in
12542 *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
12543 *:yes) gl_cv_func_getopt_gnu=no;;
12544 *) gl_cv_func_getopt_gnu=yes;;
12548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12549 /* end confdefs.h. */
12550 #include <getopt.h>
12551 #include <stddef.h>
12552 #include <string.h>
12554 #include <stdlib.h>
12555 #if defined __MACH__ && defined __APPLE__
12556 /* Avoid a crash on MacOS X. */
12557 #include <mach/mach.h>
12558 #include <mach/mach_error.h>
12559 #include <mach/thread_status.h>
12560 #include <mach/exception.h>
12561 #include <mach/task.h>
12562 #include <pthread.h>
12563 /* The exception port on which our thread listens. */
12564 static mach_port_t our_exception_port;
12565 /* The main function of the thread listening for exceptions of type
12568 mach_exception_thread (void *arg)
12570 /* Buffer for a message to be received. */
12572 mach_msg_header_t head;
12573 mach_msg_body_t msgh_body;
12576 mach_msg_return_t retval;
12577 /* Wait for a message on the exception port. */
12578 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12579 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12580 if (retval != MACH_MSG_SUCCESS)
12585 nocrash_init (void)
12587 mach_port_t self = mach_task_self ();
12588 /* Allocate a port on which the thread shall listen for exceptions. */
12589 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12591 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
12592 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12593 MACH_MSG_TYPE_MAKE_SEND)
12595 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
12597 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12598 /* Create the thread listening on the exception port. */
12599 pthread_attr_t attr;
12601 if (pthread_attr_init (&attr) == 0
12602 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12603 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12604 pthread_attr_destroy (&attr);
12605 /* Replace the exception port info for these exceptions with our own.
12606 Note that we replace the exception port for the entire task, not only
12607 for a particular thread. This has the effect that when our exception
12608 port gets the message, the thread specific exception port has already
12609 been asked, and we don't need to bother about it.
12610 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
12611 task_set_exception_ports (self, mask, our_exception_port,
12612 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12617 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12618 /* Avoid a crash on native Windows. */
12619 #define WIN32_LEAN_AND_MEAN
12620 #include <windows.h>
12621 #include <winerror.h>
12623 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12625 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12627 case EXCEPTION_ACCESS_VIOLATION:
12628 case EXCEPTION_IN_PAGE_ERROR:
12629 case EXCEPTION_STACK_OVERFLOW:
12630 case EXCEPTION_GUARD_PAGE:
12631 case EXCEPTION_PRIV_INSTRUCTION:
12632 case EXCEPTION_ILLEGAL_INSTRUCTION:
12633 case EXCEPTION_DATATYPE_MISALIGNMENT:
12634 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12635 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12638 return EXCEPTION_CONTINUE_SEARCH;
12641 nocrash_init (void)
12643 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12646 /* Avoid a crash on POSIX systems. */
12647 #include <signal.h>
12648 /* A POSIX signal handler. */
12650 exception_handler (int sig)
12655 nocrash_init (void)
12658 signal (SIGSEGV, exception_handler);
12661 signal (SIGBUS, exception_handler);
12675 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12676 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12677 OSF/1 5.1, Solaris 10. */
12679 static char conftest[] = "conftest";
12680 static char plus[] = "-+";
12681 char *argv[3] = { conftest, plus, NULL };
12683 if (getopt (2, argv, "+a") != '?')
12686 /* This code succeeds on glibc 2.8, mingw,
12687 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12688 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
12690 static char program[] = "program";
12691 static char p[] = "-p";
12692 static char foo[] = "foo";
12693 static char bar[] = "bar";
12694 char *argv[] = { program, p, foo, bar, NULL };
12697 if (getopt (4, argv, "p::") != 'p')
12699 else if (optarg != NULL)
12701 else if (getopt (4, argv, "p::") != -1)
12703 else if (optind != 2)
12706 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
12708 static char program[] = "program";
12709 static char foo[] = "foo";
12710 static char p[] = "-p";
12711 char *argv[] = { program, foo, p, NULL };
12713 if (getopt (3, argv, "-p") != 1)
12715 else if (getopt (3, argv, "-p") != 'p')
12718 /* This code fails on glibc 2.11. */
12720 static char program[] = "program";
12721 static char b[] = "-b";
12722 static char a[] = "-a";
12723 char *argv[] = { program, b, a, NULL };
12724 optind = opterr = 0;
12725 if (getopt (3, argv, "+:a:b") != 'b')
12727 else if (getopt (3, argv, "+:a:b") != ':')
12730 /* This code dumps core on glibc 2.14. */
12732 static char program[] = "program";
12733 static char w[] = "-W";
12734 static char dummy[] = "dummy";
12735 char *argv[] = { program, w, dummy, NULL };
12736 optind = opterr = 1;
12737 if (getopt (3, argv, "W;") != 'W')
12746 if ac_fn_c_try_run "$LINENO"; then :
12747 gl_cv_func_getopt_gnu=yes
12749 gl_cv_func_getopt_gnu=no
12751 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12752 conftest.$ac_objext conftest.beam conftest.$ac_ext
12755 case $gl_had_POSIXLY_CORRECT in
12757 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12758 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12763 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
12764 if test "$gl_cv_func_getopt_gnu" = "no"; then
12765 gl_replace_getopt=yes
12776 if test -n "$gl_replace_getopt"; then :
12783 if test $REPLACE_GETOPT = 1; then
12787 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12793 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12794 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12800 cat >>confdefs.h <<_ACEOF
12801 #define HAVE_DECL_GETENV $ac_have_decl
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12812 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12813 if ${ac_cv_c_restrict+:} false; then :
12814 $as_echo_n "(cached) " >&6
12816 ac_cv_c_restrict=no
12817 # The order here caters to the fact that C++ does not require restrict.
12818 for ac_kw in __restrict __restrict__ _Restrict restrict; do
12819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820 /* end confdefs.h. */
12821 typedef int * int_ptr;
12822 int foo (int_ptr $ac_kw ip) {
12829 int * $ac_kw t = s;
12836 if ac_fn_c_try_compile "$LINENO"; then :
12837 ac_cv_c_restrict=$ac_kw
12839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12840 test "$ac_cv_c_restrict" != no && break
12844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12845 $as_echo "$ac_cv_c_restrict" >&6; }
12847 case $ac_cv_c_restrict in
12849 no) $as_echo "#define restrict /**/" >>confdefs.h
12851 *) cat >>confdefs.h <<_ACEOF
12852 #define restrict $ac_cv_c_restrict
12858 GNULIB_GETTIMEOFDAY=0;
12859 HAVE_GETTIMEOFDAY=1;
12860 HAVE_STRUCT_TIMEVAL=1;
12862 REPLACE_GETTIMEOFDAY=0;
12863 REPLACE_STRUCT_TIMEVAL=0;
12880 if test $gl_cv_have_include_next = yes; then
12881 gl_cv_next_sys_time_h='<'sys/time.h'>'
12883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12884 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12885 if ${gl_cv_next_sys_time_h+:} false; then :
12886 $as_echo_n "(cached) " >&6
12889 if test $ac_cv_header_sys_time_h = yes; then
12892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12893 /* end confdefs.h. */
12894 #include <sys/time.h>
12898 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12899 *) gl_absname_cpp="$ac_cpp" ;;
12904 gl_dirsep_regex='[/\\]'
12907 gl_dirsep_regex='\/'
12910 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12912 gl_header_literal_regex=`echo 'sys/time.h' \
12913 | sed -e "$gl_make_literal_regex_sed"`
12914 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12915 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12920 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12921 sed -n "$gl_absolute_header_sed"`'"'
12923 gl_cv_next_sys_time_h='<'sys/time.h'>'
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12929 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12931 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12933 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12934 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12935 gl_next_as_first_directive='<'sys/time.h'>'
12937 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12938 gl_next_as_first_directive=$gl_cv_next_sys_time_h
12940 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12946 if test $ac_cv_header_sys_time_h != yes; then
12954 if test $ac_cv_header_sys_socket_h != yes; then
12955 for ac_header in winsock2.h
12957 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12958 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12959 cat >>confdefs.h <<_ACEOF
12960 #define HAVE_WINSOCK2_H 1
12968 if test "$ac_cv_header_winsock2_h" = yes; then
12970 UNISTD_H_HAVE_WINSOCK2_H=1
12971 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12978 $as_echo_n "checking for struct timeval... " >&6; }
12979 if ${gl_cv_sys_struct_timeval+:} false; then :
12980 $as_echo_n "(cached) " >&6
12982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h. */
12984 #if HAVE_SYS_TIME_H
12985 #include <sys/time.h>
12988 #if HAVE_WINSOCK2_H
12989 # include <winsock2.h>
12995 static struct timeval x; x.tv_sec = x.tv_usec;
13000 if ac_fn_c_try_compile "$LINENO"; then :
13001 gl_cv_sys_struct_timeval=yes
13003 gl_cv_sys_struct_timeval=no
13005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13009 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
13010 if test $gl_cv_sys_struct_timeval != yes; then
13011 HAVE_STRUCT_TIMEVAL=0
13013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct struct timeval.tv_sec member" >&5
13014 $as_echo_n "checking for correct struct timeval.tv_sec member... " >&6; }
13015 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
13016 $as_echo_n "(cached) " >&6
13018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13019 /* end confdefs.h. */
13020 #if HAVE_SYS_TIME_H
13021 #include <sys/time.h>
13024 #if HAVE_WINSOCK2_H
13025 # include <winsock2.h>
13031 static struct timeval x;
13032 typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1];
13038 if ac_fn_c_try_compile "$LINENO"; then :
13039 gl_cv_sys_struct_timeval_tv_sec=yes
13041 gl_cv_sys_struct_timeval_tv_sec=no
13043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13047 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13048 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13049 REPLACE_STRUCT_TIMEVAL=1
13054 for gl_func in gettimeofday; do
13055 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13057 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13058 if eval \${$as_gl_Symbol+:} false; then :
13059 $as_echo_n "(cached) " >&6
13061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13062 /* end confdefs.h. */
13064 #if HAVE_SYS_TIME_H
13065 # include <sys/time.h>
13078 if ac_fn_c_try_compile "$LINENO"; then :
13079 eval "$as_gl_Symbol=yes"
13081 eval "$as_gl_Symbol=no"
13083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13085 eval ac_res=\$$as_gl_Symbol
13086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13087 $as_echo "$ac_res" >&6; }
13088 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13089 cat >>confdefs.h <<_ACEOF
13090 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13093 eval ac_cv_have_decl_$gl_func=yes
13102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
13103 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
13104 if ${gl_cv_cc_float_expbit0+:} false; then :
13105 $as_echo_n "(cached) " >&6
13108 if test "$cross_compiling" = yes; then :
13109 gl_cv_cc_float_expbit0="word 0 bit 23"
13111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112 /* end confdefs.h. */
13115 #include <stddef.h>
13117 #include <string.h>
13119 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13120 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13121 static unsigned int ored_words[NWORDS];
13122 static unsigned int anded_words[NWORDS];
13123 static void add_to_ored_words (float x)
13127 /* Clear it first, in case
13128 sizeof (float) < sizeof (memory_float). */
13129 memset (&m, 0, sizeof (memory_float));
13131 for (i = 0; i < NWORDS; i++)
13133 ored_words[i] |= m.word[i];
13134 anded_words[i] &= m.word[i];
13140 FILE *fp = fopen ("conftest.out", "w");
13143 for (j = 0; j < NWORDS; j++)
13144 anded_words[j] = ~ (unsigned int) 0;
13145 add_to_ored_words (0.25f);
13146 add_to_ored_words (0.5f);
13147 add_to_ored_words (1.0f);
13148 add_to_ored_words (2.0f);
13149 add_to_ored_words (4.0f);
13150 /* Remove bits that are common (e.g. if representation of the first mantissa
13151 bit is explicit). */
13152 for (j = 0; j < NWORDS; j++)
13153 ored_words[j] &= ~anded_words[j];
13154 /* Now find the nonzero word. */
13155 for (j = 0; j < NWORDS; j++)
13156 if (ored_words[j] != 0)
13161 for (i = j + 1; i < NWORDS; i++)
13162 if (ored_words[i] != 0)
13164 fprintf (fp, "unknown");
13165 return (fclose (fp) != 0);
13168 if ((ored_words[j] >> i) & 1)
13170 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13171 return (fclose (fp) != 0);
13174 fprintf (fp, "unknown");
13175 return (fclose (fp) != 0);
13179 if ac_fn_c_try_run "$LINENO"; then :
13180 gl_cv_cc_float_expbit0=`cat conftest.out`
13182 gl_cv_cc_float_expbit0="unknown"
13184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13185 conftest.$ac_objext conftest.beam conftest.$ac_ext
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13192 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
13193 case "$gl_cv_cc_float_expbit0" in
13195 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13196 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13198 cat >>confdefs.h <<_ACEOF
13199 #define FLT_EXPBIT0_WORD $word
13203 cat >>confdefs.h <<_ACEOF
13204 #define FLT_EXPBIT0_BIT $bit
13211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13212 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13213 if ${am_cv_langinfo_codeset+:} false; then :
13214 $as_echo_n "(cached) " >&6
13216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13217 /* end confdefs.h. */
13218 #include <langinfo.h>
13222 char* cs = nl_langinfo(CODESET); return !cs;
13227 if ac_fn_c_try_link "$LINENO"; then :
13228 am_cv_langinfo_codeset=yes
13230 am_cv_langinfo_codeset=no
13232 rm -f core conftest.err conftest.$ac_objext \
13233 conftest$ac_exeext conftest.$ac_ext
13236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13237 $as_echo "$am_cv_langinfo_codeset" >&6; }
13238 if test $am_cv_langinfo_codeset = yes; then
13240 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13244 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13245 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13251 cat >>confdefs.h <<_ACEOF
13252 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13257 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13258 if ${ac_cv_gnu_library_2_1+:} false; then :
13259 $as_echo_n "(cached) " >&6
13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262 /* end confdefs.h. */
13264 #include <features.h>
13265 #ifdef __GNU_LIBRARY__
13266 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13276 $EGREP "Lucky" >/dev/null 2>&1; then :
13277 ac_cv_gnu_library_2_1=yes
13279 ac_cv_gnu_library_2_1=no
13286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13287 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13289 GLIBC21="$ac_cv_gnu_library_2_1"
13293 if test "X$prefix" = "XNONE"; then
13294 acl_final_prefix="$ac_default_prefix"
13296 acl_final_prefix="$prefix"
13298 if test "X$exec_prefix" = "XNONE"; then
13299 acl_final_exec_prefix='${prefix}'
13301 acl_final_exec_prefix="$exec_prefix"
13303 acl_save_prefix="$prefix"
13304 prefix="$acl_final_prefix"
13305 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13306 prefix="$acl_save_prefix"
13309 # Check whether --with-gnu-ld was given.
13310 if test "${with_gnu_ld+set}" = set; then :
13311 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13316 # Prepare PATH_SEPARATOR.
13317 # The user is always right.
13318 if test "${PATH_SEPARATOR+set}" != set; then
13319 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13320 # contains only /bin. Note that ksh looks also at the FPATH variable,
13321 # so we have to set that as well for the test.
13323 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13324 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13325 || PATH_SEPARATOR=';'
13329 if test "$GCC" = yes; then
13330 # Check if gcc -print-prog-name=ld gives a path.
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
13332 $as_echo_n "checking for ld used by GCC... " >&6; }
13335 # gcc leaves a trailing carriage return which upsets mingw
13336 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13338 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13341 # Accept absolute paths.
13342 [\\/]* | [A-Za-z]:[\\/]*)
13343 re_direlt='/[^/][^/]*/\.\./'
13344 # Canonicalize the path of ld
13345 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
13346 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
13347 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
13349 test -z "$LD" && LD="$ac_prog"
13352 # If it fails, then pretend we aren't using GCC.
13356 # If it is relative, then search for the first ld in PATH.
13357 with_gnu_ld=unknown
13360 elif test "$with_gnu_ld" = yes; then
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13362 $as_echo_n "checking for GNU ld... " >&6; }
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13365 $as_echo_n "checking for non-GNU ld... " >&6; }
13367 if ${acl_cv_path_LD+:} false; then :
13368 $as_echo_n "(cached) " >&6
13370 if test -z "$LD"; then
13371 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
13372 for ac_dir in $PATH; do
13373 test -z "$ac_dir" && ac_dir=.
13374 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13375 acl_cv_path_LD="$ac_dir/$ac_prog"
13376 # Check to see if the program is GNU ld. I'd rather use --version,
13377 # but apparently some GNU ld's only accept -v.
13378 # Break only if it was the GNU/non-GNU ld that we prefer.
13379 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
13380 *GNU* | *'with BFD'*)
13381 test "$with_gnu_ld" != no && break ;;
13383 test "$with_gnu_ld" != yes && break ;;
13389 acl_cv_path_LD="$LD" # Let the user override the test with a path.
13393 LD="$acl_cv_path_LD"
13394 if test -n "$LD"; then
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13396 $as_echo "$LD" >&6; }
13398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13399 $as_echo "no" >&6; }
13401 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13403 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
13404 if ${acl_cv_prog_gnu_ld+:} false; then :
13405 $as_echo_n "(cached) " >&6
13407 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13408 case `$LD -v 2>&1 </dev/null` in
13409 *GNU* | *'with BFD'*)
13410 acl_cv_prog_gnu_ld=yes ;;
13412 acl_cv_prog_gnu_ld=no ;;
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
13416 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
13417 with_gnu_ld=$acl_cv_prog_gnu_ld
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
13423 $as_echo_n "checking for shared library run path origin... " >&6; }
13424 if ${acl_cv_rpath+:} false; then :
13425 $as_echo_n "(cached) " >&6
13428 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
13429 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
13431 rm -f ./conftest.sh
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
13436 $as_echo "$acl_cv_rpath" >&6; }
13438 acl_libext="$acl_cv_libext"
13439 acl_shlibext="$acl_cv_shlibext"
13440 acl_libname_spec="$acl_cv_libname_spec"
13441 acl_library_names_spec="$acl_cv_library_names_spec"
13442 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
13443 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
13444 acl_hardcode_direct="$acl_cv_hardcode_direct"
13445 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
13446 # Check whether --enable-rpath was given.
13447 if test "${enable_rpath+set}" = set; then :
13448 enableval=$enable_rpath; :
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
13461 $as_echo_n "checking for 64-bit host... " >&6; }
13462 if ${gl_cv_solaris_64bit+:} false; then :
13463 $as_echo_n "(cached) " >&6
13465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13466 /* end confdefs.h. */
13473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13474 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
13475 gl_cv_solaris_64bit=yes
13477 gl_cv_solaris_64bit=no
13483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
13484 $as_echo "$gl_cv_solaris_64bit" >&6; }
13485 if test $gl_cv_solaris_64bit = yes; then
13486 acl_libdirstem=lib/64
13487 case "$host_cpu" in
13488 sparc*) acl_libdirstem2=lib/sparcv9 ;;
13489 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
13494 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
13495 if test -n "$searchpath"; then
13496 acl_save_IFS="${IFS= }"; IFS=":"
13497 for searchdir in $searchpath; do
13498 if test -d "$searchdir"; then
13499 case "$searchdir" in
13500 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
13502 # Better ignore directories of this form. They are misleading.
13504 *) searchdir=`cd "$searchdir" && pwd`
13505 case "$searchdir" in
13506 */lib64 ) acl_libdirstem=lib64 ;;
13511 IFS="$acl_save_IFS"
13515 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
13519 gl_threads_api=none
13524 if test "$gl_use_threads" != no; then
13525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13526 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
13527 if ${gl_cv_have_weak+:} false; then :
13528 $as_echo_n "(cached) " >&6
13531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13532 /* end confdefs.h. */
13533 extern void xyzzy ();
13543 if ac_fn_c_try_link "$LINENO"; then :
13544 gl_cv_have_weak=maybe
13546 rm -f core conftest.err conftest.$ac_objext \
13547 conftest$ac_exeext conftest.$ac_ext
13548 if test $gl_cv_have_weak = maybe; then
13549 if test "$cross_compiling" = yes; then :
13550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13551 /* end confdefs.h. */
13553 Extensible Linking Format
13557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13558 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
13559 gl_cv_have_weak="guessing yes"
13561 gl_cv_have_weak="guessing no"
13567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13568 /* end confdefs.h. */
13574 return (fputs == NULL);
13577 if ac_fn_c_try_run "$LINENO"; then :
13578 gl_cv_have_weak=yes
13582 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13583 conftest.$ac_objext conftest.beam conftest.$ac_ext
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13590 $as_echo "$gl_cv_have_weak" >&6; }
13591 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
13592 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13593 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
13594 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13595 if test "x$ac_cv_header_pthread_h" = xyes; then :
13596 gl_have_pthread_h=yes
13598 gl_have_pthread_h=no
13602 if test "$gl_have_pthread_h" = yes; then
13603 # Other possible tests:
13604 # -lpthreads (FSU threads, PCthreads)
13607 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13608 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13609 # the second one only in libpthread, and lock.c needs it.
13610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13611 /* end confdefs.h. */
13612 #include <pthread.h>
13616 pthread_mutex_lock((pthread_mutex_t*)0);
13617 pthread_mutexattr_init((pthread_mutexattr_t*)0);
13622 if ac_fn_c_try_link "$LINENO"; then :
13623 gl_have_pthread=yes
13625 rm -f core conftest.err conftest.$ac_objext \
13626 conftest$ac_exeext conftest.$ac_ext
13627 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13628 # since it is defined as a macro on OSF/1.)
13629 if test -n "$gl_have_pthread"; then
13630 # The program links fine without libpthread. But it may actually
13631 # need to link with libpthread in order to create multiple threads.
13632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13633 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13634 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13635 $as_echo_n "(cached) " >&6
13637 ac_check_lib_save_LIBS=$LIBS
13638 LIBS="-lpthread $LIBS"
13639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13640 /* end confdefs.h. */
13642 /* Override any GCC internal prototype to avoid an error.
13643 Use char because int might match the return type of a GCC
13644 builtin and then its argument prototype would still apply. */
13648 char pthread_kill ();
13652 return pthread_kill ();
13657 if ac_fn_c_try_link "$LINENO"; then :
13658 ac_cv_lib_pthread_pthread_kill=yes
13660 ac_cv_lib_pthread_pthread_kill=no
13662 rm -f core conftest.err conftest.$ac_objext \
13663 conftest$ac_exeext conftest.$ac_ext
13664 LIBS=$ac_check_lib_save_LIBS
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13667 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13668 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13669 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13670 # On Solaris and HP-UX, most pthread functions exist also in libc.
13671 # Therefore pthread_in_use() needs to actually try to create a
13672 # thread: pthread_create from libc will fail, whereas
13673 # pthread_create will actually create a thread.
13677 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13684 # Some library is needed. Try libpthread and libc_r.
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13686 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13687 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13688 $as_echo_n "(cached) " >&6
13690 ac_check_lib_save_LIBS=$LIBS
13691 LIBS="-lpthread $LIBS"
13692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13693 /* end confdefs.h. */
13695 /* Override any GCC internal prototype to avoid an error.
13696 Use char because int might match the return type of a GCC
13697 builtin and then its argument prototype would still apply. */
13701 char pthread_kill ();
13705 return pthread_kill ();
13710 if ac_fn_c_try_link "$LINENO"; then :
13711 ac_cv_lib_pthread_pthread_kill=yes
13713 ac_cv_lib_pthread_pthread_kill=no
13715 rm -f core conftest.err conftest.$ac_objext \
13716 conftest$ac_exeext conftest.$ac_ext
13717 LIBS=$ac_check_lib_save_LIBS
13719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13720 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13721 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13722 gl_have_pthread=yes
13723 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
13724 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13727 if test -z "$gl_have_pthread"; then
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13730 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
13731 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
13732 $as_echo_n "(cached) " >&6
13734 ac_check_lib_save_LIBS=$LIBS
13736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13737 /* end confdefs.h. */
13739 /* Override any GCC internal prototype to avoid an error.
13740 Use char because int might match the return type of a GCC
13741 builtin and then its argument prototype would still apply. */
13745 char pthread_kill ();
13749 return pthread_kill ();
13754 if ac_fn_c_try_link "$LINENO"; then :
13755 ac_cv_lib_c_r_pthread_kill=yes
13757 ac_cv_lib_c_r_pthread_kill=no
13759 rm -f core conftest.err conftest.$ac_objext \
13760 conftest$ac_exeext conftest.$ac_ext
13761 LIBS=$ac_check_lib_save_LIBS
13763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13764 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13765 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13766 gl_have_pthread=yes
13767 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13768 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13773 if test -n "$gl_have_pthread"; then
13774 gl_threads_api=posix
13776 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13778 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13779 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13781 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13790 if test -z "$gl_have_pthread"; then
13791 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13792 gl_have_solaristhread=
13793 gl_save_LIBS="$LIBS"
13794 LIBS="$LIBS -lthread"
13795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13796 /* end confdefs.h. */
13798 #include <thread.h>
13809 if ac_fn_c_try_link "$LINENO"; then :
13810 gl_have_solaristhread=yes
13812 rm -f core conftest.err conftest.$ac_objext \
13813 conftest$ac_exeext conftest.$ac_ext
13814 LIBS="$gl_save_LIBS"
13815 if test -n "$gl_have_solaristhread"; then
13816 gl_threads_api=solaris
13818 LTLIBTHREAD=-lthread
13819 LIBMULTITHREAD="$LIBTHREAD"
13820 LTLIBMULTITHREAD="$LTLIBTHREAD"
13822 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13824 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13826 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13834 if test "$gl_use_threads" = pth; then
13835 gl_save_CPPFLAGS="$CPPFLAGS"
13841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13842 $as_echo_n "checking how to link with libpth... " >&6; }
13843 if ${ac_cv_libpth_libs+:} false; then :
13844 $as_echo_n "(cached) " >&6
13856 acl_save_prefix="$prefix"
13857 prefix="$acl_final_prefix"
13858 acl_save_exec_prefix="$exec_prefix"
13859 exec_prefix="$acl_final_exec_prefix"
13861 eval additional_includedir=\"$includedir\"
13862 eval additional_libdir=\"$libdir\"
13864 exec_prefix="$acl_save_exec_prefix"
13865 prefix="$acl_save_prefix"
13868 # Check whether --with-libpth-prefix was given.
13869 if test "${with_libpth_prefix+set}" = set; then :
13870 withval=$with_libpth_prefix;
13871 if test "X$withval" = "Xno"; then
13874 if test "X$withval" = "X"; then
13876 acl_save_prefix="$prefix"
13877 prefix="$acl_final_prefix"
13878 acl_save_exec_prefix="$exec_prefix"
13879 exec_prefix="$acl_final_exec_prefix"
13881 eval additional_includedir=\"$includedir\"
13882 eval additional_libdir=\"$libdir\"
13884 exec_prefix="$acl_save_exec_prefix"
13885 prefix="$acl_save_prefix"
13888 additional_includedir="$withval/include"
13889 additional_libdir="$withval/$acl_libdirstem"
13890 if test "$acl_libdirstem2" != "$acl_libdirstem" \
13891 && ! test -d "$withval/$acl_libdirstem"; then
13892 additional_libdir="$withval/$acl_libdirstem2"
13906 names_already_handled=
13907 names_next_round='pth '
13908 while test -n "$names_next_round"; do
13909 names_this_round="$names_next_round"
13911 for name in $names_this_round; do
13913 for n in $names_already_handled; do
13914 if test "$n" = "$name"; then
13915 already_handled=yes
13919 if test -z "$already_handled"; then
13920 names_already_handled="$names_already_handled $name"
13921 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
13922 eval value=\"\$HAVE_LIB$uppername\"
13923 if test -n "$value"; then
13924 if test "$value" = yes; then
13925 eval value=\"\$LIB$uppername\"
13926 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13927 eval value=\"\$LTLIB$uppername\"
13928 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13937 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
13938 if test -n "$acl_shlibext"; then
13939 shrext=".$acl_shlibext" # typically: shrext=.so
13943 if test $use_additional = yes; then
13944 dir="$additional_libdir"
13945 if test -n "$acl_shlibext"; then
13946 if test -f "$dir/$libname$shrext"; then
13948 found_so="$dir/$libname$shrext"
13950 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13951 ver=`(cd "$dir" && \
13952 for f in "$libname$shrext".*; do echo "$f"; done \
13953 | sed -e "s,^$libname$shrext\\\\.,," \
13954 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13955 | sed 1q ) 2>/dev/null`
13956 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13958 found_so="$dir/$libname$shrext.$ver"
13961 eval library_names=\"$acl_library_names_spec\"
13962 for f in $library_names; do
13963 if test -f "$dir/$f"; then
13972 if test "X$found_dir" = "X"; then
13973 if test -f "$dir/$libname.$acl_libext"; then
13975 found_a="$dir/$libname.$acl_libext"
13978 if test "X$found_dir" != "X"; then
13979 if test -f "$dir/$libname.la"; then
13980 found_la="$dir/$libname.la"
13984 if test "X$found_dir" = "X"; then
13985 for x in $LDFLAGS $LTLIBPTH; do
13987 acl_save_prefix="$prefix"
13988 prefix="$acl_final_prefix"
13989 acl_save_exec_prefix="$exec_prefix"
13990 exec_prefix="$acl_final_exec_prefix"
13992 exec_prefix="$acl_save_exec_prefix"
13993 prefix="$acl_save_prefix"
13997 dir=`echo "X$x" | sed -e 's/^X-L//'`
13998 if test -n "$acl_shlibext"; then
13999 if test -f "$dir/$libname$shrext"; then
14001 found_so="$dir/$libname$shrext"
14003 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14004 ver=`(cd "$dir" && \
14005 for f in "$libname$shrext".*; do echo "$f"; done \
14006 | sed -e "s,^$libname$shrext\\\\.,," \
14007 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14008 | sed 1q ) 2>/dev/null`
14009 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14011 found_so="$dir/$libname$shrext.$ver"
14014 eval library_names=\"$acl_library_names_spec\"
14015 for f in $library_names; do
14016 if test -f "$dir/$f"; then
14025 if test "X$found_dir" = "X"; then
14026 if test -f "$dir/$libname.$acl_libext"; then
14028 found_a="$dir/$libname.$acl_libext"
14031 if test "X$found_dir" != "X"; then
14032 if test -f "$dir/$libname.la"; then
14033 found_la="$dir/$libname.la"
14038 if test "X$found_dir" != "X"; then
14043 if test "X$found_dir" != "X"; then
14044 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
14045 if test "X$found_so" != "X"; then
14046 if test "$enable_rpath" = no \
14047 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14048 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14049 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14052 for x in $ltrpathdirs; do
14053 if test "X$x" = "X$found_dir"; then
14058 if test -z "$haveit"; then
14059 ltrpathdirs="$ltrpathdirs $found_dir"
14061 if test "$acl_hardcode_direct" = yes; then
14062 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14064 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14065 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14067 for x in $rpathdirs; do
14068 if test "X$x" = "X$found_dir"; then
14073 if test -z "$haveit"; then
14074 rpathdirs="$rpathdirs $found_dir"
14078 for x in $LDFLAGS $LIBPTH; do
14080 acl_save_prefix="$prefix"
14081 prefix="$acl_final_prefix"
14082 acl_save_exec_prefix="$exec_prefix"
14083 exec_prefix="$acl_final_exec_prefix"
14085 exec_prefix="$acl_save_exec_prefix"
14086 prefix="$acl_save_prefix"
14088 if test "X$x" = "X-L$found_dir"; then
14093 if test -z "$haveit"; then
14094 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
14096 if test "$acl_hardcode_minus_L" != no; then
14097 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14099 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14105 if test "X$found_a" != "X"; then
14106 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
14108 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
14111 additional_includedir=
14112 case "$found_dir" in
14113 */$acl_libdirstem | */$acl_libdirstem/)
14114 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14115 if test "$name" = 'pth'; then
14116 LIBPTH_PREFIX="$basedir"
14118 additional_includedir="$basedir/include"
14120 */$acl_libdirstem2 | */$acl_libdirstem2/)
14121 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14122 if test "$name" = 'pth'; then
14123 LIBPTH_PREFIX="$basedir"
14125 additional_includedir="$basedir/include"
14128 if test "X$additional_includedir" != "X"; then
14129 if test "X$additional_includedir" != "X/usr/include"; then
14131 if test "X$additional_includedir" = "X/usr/local/include"; then
14132 if test -n "$GCC"; then
14134 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14138 if test -z "$haveit"; then
14139 for x in $CPPFLAGS $INCPTH; do
14141 acl_save_prefix="$prefix"
14142 prefix="$acl_final_prefix"
14143 acl_save_exec_prefix="$exec_prefix"
14144 exec_prefix="$acl_final_exec_prefix"
14146 exec_prefix="$acl_save_exec_prefix"
14147 prefix="$acl_save_prefix"
14149 if test "X$x" = "X-I$additional_includedir"; then
14154 if test -z "$haveit"; then
14155 if test -d "$additional_includedir"; then
14156 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
14162 if test -n "$found_la"; then
14163 save_libdir="$libdir"
14164 case "$found_la" in
14165 */* | *\\*) . "$found_la" ;;
14166 *) . "./$found_la" ;;
14168 libdir="$save_libdir"
14169 for dep in $dependency_libs; do
14172 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14173 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14174 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14176 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14177 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14178 if test -n "$GCC"; then
14180 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14184 if test -z "$haveit"; then
14186 for x in $LDFLAGS $LIBPTH; do
14188 acl_save_prefix="$prefix"
14189 prefix="$acl_final_prefix"
14190 acl_save_exec_prefix="$exec_prefix"
14191 exec_prefix="$acl_final_exec_prefix"
14193 exec_prefix="$acl_save_exec_prefix"
14194 prefix="$acl_save_prefix"
14196 if test "X$x" = "X-L$additional_libdir"; then
14201 if test -z "$haveit"; then
14202 if test -d "$additional_libdir"; then
14203 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
14207 for x in $LDFLAGS $LTLIBPTH; do
14209 acl_save_prefix="$prefix"
14210 prefix="$acl_final_prefix"
14211 acl_save_exec_prefix="$exec_prefix"
14212 exec_prefix="$acl_final_exec_prefix"
14214 exec_prefix="$acl_save_exec_prefix"
14215 prefix="$acl_save_prefix"
14217 if test "X$x" = "X-L$additional_libdir"; then
14222 if test -z "$haveit"; then
14223 if test -d "$additional_libdir"; then
14224 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
14231 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14232 if test "$enable_rpath" != no; then
14234 for x in $rpathdirs; do
14235 if test "X$x" = "X$dir"; then
14240 if test -z "$haveit"; then
14241 rpathdirs="$rpathdirs $dir"
14244 for x in $ltrpathdirs; do
14245 if test "X$x" = "X$dir"; then
14250 if test -z "$haveit"; then
14251 ltrpathdirs="$ltrpathdirs $dir"
14256 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14259 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14262 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
14263 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14269 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14270 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14276 if test "X$rpathdirs" != "X"; then
14277 if test -n "$acl_hardcode_libdir_separator"; then
14279 for found_dir in $rpathdirs; do
14280 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14282 acl_save_libdir="$libdir"
14284 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14285 libdir="$acl_save_libdir"
14286 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14288 for found_dir in $rpathdirs; do
14289 acl_save_libdir="$libdir"
14290 libdir="$found_dir"
14291 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14292 libdir="$acl_save_libdir"
14293 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14297 if test "X$ltrpathdirs" != "X"; then
14298 for found_dir in $ltrpathdirs; do
14299 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14308 ac_cv_libpth_libs="$LIBPTH"
14309 ac_cv_libpth_ltlibs="$LTLIBPTH"
14310 ac_cv_libpth_cppflags="$INCPTH"
14311 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14315 $as_echo "$ac_cv_libpth_libs" >&6; }
14316 LIBPTH="$ac_cv_libpth_libs"
14317 LTLIBPTH="$ac_cv_libpth_ltlibs"
14318 INCPTH="$ac_cv_libpth_cppflags"
14319 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14321 for element in $INCPTH; do
14323 for x in $CPPFLAGS; do
14325 acl_save_prefix="$prefix"
14326 prefix="$acl_final_prefix"
14327 acl_save_exec_prefix="$exec_prefix"
14328 exec_prefix="$acl_final_exec_prefix"
14330 exec_prefix="$acl_save_exec_prefix"
14331 prefix="$acl_save_prefix"
14333 if test "X$x" = "X$element"; then
14338 if test -z "$haveit"; then
14339 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14351 gl_save_LIBS="$LIBS"
14352 LIBS="$LIBS $LIBPTH"
14353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14354 /* end confdefs.h. */
14364 if ac_fn_c_try_link "$LINENO"; then :
14367 rm -f core conftest.err conftest.$ac_objext \
14368 conftest$ac_exeext conftest.$ac_ext
14369 LIBS="$gl_save_LIBS"
14370 if test -n "$gl_have_pth"; then
14372 LIBTHREAD="$LIBPTH"
14373 LTLIBTHREAD="$LTLIBPTH"
14374 LIBMULTITHREAD="$LIBTHREAD"
14375 LTLIBMULTITHREAD="$LTLIBTHREAD"
14377 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
14379 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14380 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14382 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
14389 CPPFLAGS="$gl_save_CPPFLAGS"
14392 if test -z "$gl_have_pthread"; then
14393 case "$gl_use_threads" in
14394 yes | windows | win32) # The 'win32' is for backward compatibility.
14395 if { case "$host_os" in
14400 gl_threads_api=windows
14402 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14410 $as_echo_n "checking for multithread API to use... " >&6; }
14411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14412 $as_echo "$gl_threads_api" >&6; }
14425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
14426 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
14427 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
14428 $as_echo_n "(cached) " >&6
14430 rm -f conftest.sym conftest.file
14431 echo >conftest.file
14432 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
14433 if test "$cross_compiling" = yes; then :
14435 # Guess yes on glibc systems.
14436 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14437 # If we don't know, assume the worst.
14438 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14443 /* end confdefs.h. */
14444 $ac_includes_default
14449 /* Linux will dereference the symlink and fail, as required by
14450 POSIX. That is better in the sense that it means we will not
14451 have to compile and use the lstat wrapper. */
14452 return lstat ("conftest.sym/", &sbuf) == 0;
14458 if ac_fn_c_try_run "$LINENO"; then :
14459 gl_cv_func_lstat_dereferences_slashed_symlink=yes
14461 gl_cv_func_lstat_dereferences_slashed_symlink=no
14463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14464 conftest.$ac_objext conftest.beam conftest.$ac_ext
14468 # If the 'ln -s' command failed, then we probably don't even
14469 # have an lstat function.
14470 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
14472 rm -f conftest.sym conftest.file
14475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
14476 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
14477 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14480 cat >>confdefs.h <<_ACEOF
14481 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
14495 GNULIB_MBSRTOWCS=0;
14496 GNULIB_MBSNRTOWCS=0;
14498 GNULIB_WCSRTOMBS=0;
14499 GNULIB_WCSNRTOMBS=0;
14516 GNULIB_WCSCASECMP=0;
14517 GNULIB_WCSNCASECMP=0;
14554 HAVE_WCSNCASECMP=1;
14567 HAVE_DECL_WCWIDTH=1;
14568 REPLACE_MBSTATE_T=0;
14574 REPLACE_MBSRTOWCS=0;
14575 REPLACE_MBSNRTOWCS=0;
14577 REPLACE_WCSRTOMBS=0;
14578 REPLACE_WCSNRTOMBS=0;
14580 REPLACE_WCSWIDTH=0;
14584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14585 $as_echo_n "checking for mbstate_t... " >&6; }
14586 if ${ac_cv_type_mbstate_t+:} false; then :
14587 $as_echo_n "(cached) " >&6
14589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590 /* end confdefs.h. */
14591 $ac_includes_default
14592 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14594 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14595 included before <wchar.h>. */
14596 #include <stddef.h>
14603 mbstate_t x; return sizeof x;
14608 if ac_fn_c_try_compile "$LINENO"; then :
14609 ac_cv_type_mbstate_t=yes
14611 ac_cv_type_mbstate_t=no
14613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14616 $as_echo "$ac_cv_type_mbstate_t" >&6; }
14617 if test $ac_cv_type_mbstate_t = yes; then
14619 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
14623 $as_echo "#define mbstate_t int" >>confdefs.h
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14635 $as_echo_n "checking for a traditional japanese locale... " >&6; }
14636 if ${gt_cv_locale_ja+:} false; then :
14637 $as_echo_n "(cached) " >&6
14640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14641 /* end confdefs.h. */
14643 #include <locale.h>
14645 #if HAVE_LANGINFO_CODESET
14646 # include <langinfo.h>
14648 #include <stdlib.h>
14649 #include <string.h>
14655 /* Check whether the given locale name is recognized by the system. */
14656 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14657 /* On native Windows, setlocale(category, "") looks at the system settings,
14658 not at the environment variables. Also, when an encoding suffix such
14659 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14660 category of the locale to "C". */
14661 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14662 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14665 if (setlocale (LC_ALL, "") == NULL) return 1;
14667 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14668 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14669 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14670 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14671 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14672 some unit tests fail.
14673 On MirBSD 10, when an unsupported locale is specified, setlocale()
14674 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14675 #if HAVE_LANGINFO_CODESET
14677 const char *cs = nl_langinfo (CODESET);
14678 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14679 || strcmp (cs, "UTF-8") == 0)
14684 /* On Cygwin, avoid locale names without encoding suffix, because the
14685 locale_charset() function relies on the encoding suffix. Note that
14686 LC_ALL is set on the command line. */
14687 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14689 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
14690 on Cygwin 1.5.x. */
14691 if (MB_CUR_MAX == 1)
14693 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14694 This excludes the UTF-8 encoding (except on MirBSD). */
14695 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14696 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14697 for (p = buf; *p != '\0'; p++)
14698 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14704 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14705 (eval $ac_link) 2>&5
14707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14708 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14710 # Handle native Windows specially, because there setlocale() interprets
14711 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14712 # "fr" or "fra" as "French" or "French_France.1252",
14713 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14714 # "ja" as "Japanese" or "Japanese_Japan.932",
14717 # Note that on native Windows, the Japanese locale is
14718 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14719 # cannot use it here.
14720 gt_cv_locale_ja=none
14723 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14724 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
14725 # configure script would override the LC_ALL setting. Likewise for
14726 # LC_CTYPE, which is also set at the beginning of the configure script.
14727 # Test for the AIX locale name.
14728 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14729 gt_cv_locale_ja=ja_JP
14731 # Test for the locale name with explicit encoding suffix.
14732 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14733 gt_cv_locale_ja=ja_JP.EUC-JP
14735 # Test for the HP-UX, OSF/1, NetBSD locale name.
14736 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14737 gt_cv_locale_ja=ja_JP.eucJP
14739 # Test for the IRIX, FreeBSD locale name.
14740 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14741 gt_cv_locale_ja=ja_JP.EUC
14743 # Test for the Solaris 7 locale name.
14744 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14747 # Special test for NetBSD 1.6.
14748 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14749 gt_cv_locale_ja=ja_JP.eucJP
14752 gt_cv_locale_ja=none
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14766 $as_echo "$gt_cv_locale_ja" >&6; }
14767 LOCALE_JA=$gt_cv_locale_ja
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14774 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14775 if ${gt_cv_locale_zh_CN+:} false; then :
14776 $as_echo_n "(cached) " >&6
14779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780 /* end confdefs.h. */
14782 #include <locale.h>
14783 #include <stdlib.h>
14785 #if HAVE_LANGINFO_CODESET
14786 # include <langinfo.h>
14788 #include <stdlib.h>
14789 #include <string.h>
14795 /* Check whether the given locale name is recognized by the system. */
14796 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14797 /* On native Windows, setlocale(category, "") looks at the system settings,
14798 not at the environment variables. Also, when an encoding suffix such
14799 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14800 category of the locale to "C". */
14801 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14802 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14805 if (setlocale (LC_ALL, "") == NULL) return 1;
14807 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14808 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14809 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14810 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14811 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14812 some unit tests fail.
14813 On MirBSD 10, when an unsupported locale is specified, setlocale()
14814 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14815 #if HAVE_LANGINFO_CODESET
14817 const char *cs = nl_langinfo (CODESET);
14818 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14819 || strcmp (cs, "UTF-8") == 0)
14824 /* On Cygwin, avoid locale names without encoding suffix, because the
14825 locale_charset() function relies on the encoding suffix. Note that
14826 LC_ALL is set on the command line. */
14827 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14829 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14830 This excludes the UTF-8 encoding (except on MirBSD). */
14831 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14832 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14833 for (p = buf; *p != '\0'; p++)
14834 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14836 /* Check whether a typical GB18030 multibyte sequence is recognized as a
14837 single wide character. This excludes the GB2312 and GBK encodings. */
14838 if (mblen ("\203\062\332\066", 5) != 4)
14844 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14845 (eval $ac_link) 2>&5
14847 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14848 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14850 # Handle native Windows specially, because there setlocale() interprets
14851 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14852 # "fr" or "fra" as "French" or "French_France.1252",
14853 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14854 # "ja" as "Japanese" or "Japanese_Japan.932",
14857 # Test for the hypothetical native Windows locale name.
14858 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14859 gt_cv_locale_zh_CN=Chinese_China.54936
14862 gt_cv_locale_zh_CN=none
14866 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14867 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14868 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14869 gt_cv_locale_zh_CN=none
14872 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14873 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
14874 # configure script would override the LC_ALL setting. Likewise for
14875 # LC_CTYPE, which is also set at the beginning of the configure script.
14876 # Test for the locale name without encoding suffix.
14877 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14878 gt_cv_locale_zh_CN=zh_CN
14880 # Test for the locale name with explicit encoding suffix.
14881 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14882 gt_cv_locale_zh_CN=zh_CN.GB18030
14885 gt_cv_locale_zh_CN=none
14891 # If there was a link error, due to mblen(), the system is so old that
14892 # it certainly doesn't have a chinese locale.
14893 gt_cv_locale_zh_CN=none
14898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14899 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14900 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14906 $as_echo_n "checking for a french Unicode locale... " >&6; }
14907 if ${gt_cv_locale_fr_utf8+:} false; then :
14908 $as_echo_n "(cached) " >&6
14911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912 /* end confdefs.h. */
14914 #include <locale.h>
14916 #if HAVE_LANGINFO_CODESET
14917 # include <langinfo.h>
14919 #include <stdlib.h>
14920 #include <string.h>
14924 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14925 imitates locale dependent behaviour by looking at the environment
14926 variables, and all locales use the UTF-8 encoding. */
14927 #if !(defined __BEOS__ || defined __HAIKU__)
14928 /* Check whether the given locale name is recognized by the system. */
14929 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14930 /* On native Windows, setlocale(category, "") looks at the system settings,
14931 not at the environment variables. Also, when an encoding suffix such
14932 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14933 category of the locale to "C". */
14934 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14935 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14938 if (setlocale (LC_ALL, "") == NULL) return 1;
14940 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14941 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14942 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14943 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14944 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14945 some unit tests fail. */
14946 # if HAVE_LANGINFO_CODESET
14948 const char *cs = nl_langinfo (CODESET);
14949 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14954 /* On Cygwin, avoid locale names without encoding suffix, because the
14955 locale_charset() function relies on the encoding suffix. Note that
14956 LC_ALL is set on the command line. */
14957 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14959 /* Check whether in the abbreviation of the second month, the second
14960 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14961 two bytes long, with UTF-8 encoding. */
14962 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14963 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14964 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14967 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14968 /* Check whether the decimal separator is a comma.
14969 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14970 are nl_langinfo(RADIXCHAR) are both ".". */
14971 if (localeconv () ->decimal_point[0] != ',') return 1;
14977 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14978 (eval $ac_link) 2>&5
14980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14981 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14983 # Handle native Windows specially, because there setlocale() interprets
14984 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14985 # "fr" or "fra" as "French" or "French_France.1252",
14986 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14987 # "ja" as "Japanese" or "Japanese_Japan.932",
14990 # Test for the hypothetical native Windows locale name.
14991 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14992 gt_cv_locale_fr_utf8=French_France.65001
14995 gt_cv_locale_fr_utf8=none
14999 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15000 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
15001 # configure script would override the LC_ALL setting. Likewise for
15002 # LC_CTYPE, which is also set at the beginning of the configure script.
15003 # Test for the usual locale name.
15004 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15005 gt_cv_locale_fr_utf8=fr_FR
15007 # Test for the locale name with explicit encoding suffix.
15008 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15009 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15011 # Test for the Solaris 7 locale name.
15012 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15013 gt_cv_locale_fr_utf8=fr.UTF-8
15016 gt_cv_locale_fr_utf8=none
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15027 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15028 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15042 GNULIB_RAWMEMCHR=0;
15045 GNULIB_STRCHRNUL=0;
15053 GNULIB_STRCASESTR=0;
15060 GNULIB_MBSCASECMP=0;
15061 GNULIB_MBSNCASECMP=0;
15062 GNULIB_MBSPCASECMP=0;
15063 GNULIB_MBSCASESTR=0;
15070 GNULIB_STRERROR_R=0;
15071 GNULIB_STRSIGNAL=0;
15072 GNULIB_STRVERSCMP=0;
15077 HAVE_DECL_MEMMEM=1;
15079 HAVE_DECL_MEMRCHR=1;
15084 HAVE_DECL_STRDUP=1;
15085 HAVE_DECL_STRNDUP=1;
15086 HAVE_DECL_STRNLEN=1;
15090 HAVE_DECL_STRTOK_R=1;
15091 HAVE_DECL_STRERROR_R=1;
15092 HAVE_DECL_STRSIGNAL=1;
15099 REPLACE_STRCASESTR=0;
15100 REPLACE_STRCHRNUL=0;
15101 REPLACE_STRERROR=0;
15102 REPLACE_STRERROR_R=0;
15106 REPLACE_STRSIGNAL=0;
15107 REPLACE_STRTOK_R=0;
15108 UNDEFINE_STRTOK_R=0;
15114 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15115 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15116 # irrelevant for anonymous mappings.
15117 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15118 if test "x$ac_cv_func_mmap" = xyes; then :
15125 # Try to allow MAP_ANONYMOUS.
15126 gl_have_mmap_anonymous=no
15127 if test $gl_have_mmap = yes; then
15128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15129 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
15130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15131 /* end confdefs.h. */
15133 #include <sys/mman.h>
15134 #ifdef MAP_ANONYMOUS
15135 I cannot identify this map
15139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15140 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15141 gl_have_mmap_anonymous=yes
15145 if test $gl_have_mmap_anonymous != yes; then
15146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15147 /* end confdefs.h. */
15149 #include <sys/mman.h>
15151 I cannot identify this map
15155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15156 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15158 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15160 gl_have_mmap_anonymous=yes
15165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15166 $as_echo "$gl_have_mmap_anonymous" >&6; }
15167 if test $gl_have_mmap_anonymous = yes; then
15169 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15179 if test $HAVE_MEMCHR = 1; then
15180 # Detect platform-specific bugs in some versions of glibc:
15181 # memchr should not dereference anything with length 0
15182 # http://bugzilla.redhat.com/499689
15183 # memchr should not dereference overestimated length after a match
15184 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15185 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15186 # Assume that memchr works on platforms that lack mprotect.
15187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15188 $as_echo_n "checking whether memchr works... " >&6; }
15189 if ${gl_cv_func_memchr_works+:} false; then :
15190 $as_echo_n "(cached) " >&6
15192 if test "$cross_compiling" = yes; then :
15193 gl_cv_func_memchr_works="guessing no"
15195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15196 /* end confdefs.h. */
15198 #include <string.h>
15199 #if HAVE_SYS_MMAN_H
15200 # include <fcntl.h>
15201 # include <unistd.h>
15202 # include <sys/types.h>
15203 # include <sys/mman.h>
15205 # define MAP_FILE 0
15214 char *fence = NULL;
15215 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15216 # if HAVE_MAP_ANONYMOUS
15217 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15219 # else /* !HAVE_MAP_ANONYMOUS */
15220 const int flags = MAP_FILE | MAP_PRIVATE;
15221 int fd = open ("/dev/zero", O_RDONLY, 0666);
15225 int pagesize = getpagesize ();
15227 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15229 if (two_pages != (char *)(-1)
15230 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15231 fence = two_pages + pagesize;
15236 if (memchr (fence, 0, 0))
15238 strcpy (fence - 9, "12345678");
15239 if (memchr (fence - 9, 0, 79) != fence - 1)
15241 if (memchr (fence - 1, 0, 3) != fence - 1)
15250 if ac_fn_c_try_run "$LINENO"; then :
15251 gl_cv_func_memchr_works=yes
15253 gl_cv_func_memchr_works=no
15255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15256 conftest.$ac_objext conftest.beam conftest.$ac_ext
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15261 $as_echo "$gl_cv_func_memchr_works" >&6; }
15262 if test "$gl_cv_func_memchr_works" != yes; then
15267 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15268 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
15274 cat >>confdefs.h <<_ACEOF
15275 #define HAVE_DECL_MEMRCHR $ac_have_decl
15281 REPLACE_STRERROR_0=0
15282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15283 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15284 if ${gl_cv_func_strerror_0_works+:} false; then :
15285 $as_echo_n "(cached) " >&6
15287 if test "$cross_compiling" = yes; then :
15289 # Guess yes on glibc systems.
15290 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15291 # If we don't know, assume the worst.
15292 *) gl_cv_func_strerror_0_works="guessing no" ;;
15296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15297 /* end confdefs.h. */
15298 #include <string.h>
15307 str = strerror (0);
15308 if (!*str) result |= 1;
15309 if (errno) result |= 2;
15310 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15317 if ac_fn_c_try_run "$LINENO"; then :
15318 gl_cv_func_strerror_0_works=yes
15320 gl_cv_func_strerror_0_works=no
15322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15323 conftest.$ac_objext conftest.beam conftest.$ac_ext
15328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15329 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15330 case "$gl_cv_func_strerror_0_works" in
15333 REPLACE_STRERROR_0=1
15335 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15349 if test $ac_cv_func_strerror_r = yes; then
15350 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15352 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
15353 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15354 $as_echo_n "(cached) " >&6
15356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15357 /* end confdefs.h. */
15358 #include <string.h>
15359 int strerror_r (int, char *, size_t);
15369 if ac_fn_c_try_compile "$LINENO"; then :
15370 gl_cv_func_strerror_r_posix_signature=yes
15372 gl_cv_func_strerror_r_posix_signature=no
15374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15378 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
15379 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15381 $as_echo_n "checking whether strerror_r works... " >&6; }
15382 if ${gl_cv_func_strerror_r_works+:} false; then :
15383 $as_echo_n "(cached) " >&6
15385 if test "$cross_compiling" = yes; then :
15389 aix*) gl_cv_func_strerror_r_works="guessing no";;
15390 # Guess no on HP-UX.
15391 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15392 # Guess no on BSD variants.
15393 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
15394 # Guess yes otherwise.
15395 *) gl_cv_func_strerror_r_works="guessing yes";;
15399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15400 /* end confdefs.h. */
15402 #include <string.h>
15409 if (strerror_r (EACCES, buf, 0) < 0)
15412 if (strerror_r (EACCES, buf, sizeof buf) != 0)
15414 strcpy (buf, "Unknown");
15415 if (strerror_r (0, buf, sizeof buf) != 0)
15419 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15423 if (strerror_r (-3, buf, sizeof buf) < 0)
15435 if ac_fn_c_try_run "$LINENO"; then :
15436 gl_cv_func_strerror_r_works=yes
15438 gl_cv_func_strerror_r_works=no
15440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15441 conftest.$ac_objext conftest.beam conftest.$ac_ext
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15447 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15450 if test $ac_cv_func___xpg_strerror_r = yes; then
15451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15452 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
15453 if ${gl_cv_func_strerror_r_works+:} false; then :
15454 $as_echo_n "(cached) " >&6
15456 if test "$cross_compiling" = yes; then :
15457 gl_cv_func_strerror_r_works="guessing no"
15460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15461 /* end confdefs.h. */
15463 #include <string.h>
15468 int __xpg_strerror_r(int, char *, size_t);
15474 char buf[256] = "^";
15476 char *str = strerror (-1);
15477 strcpy (copy, str);
15478 if (__xpg_strerror_r (-2, buf, 1) == 0)
15482 __xpg_strerror_r (-2, buf, 256);
15483 if (strcmp (str, copy))
15491 if ac_fn_c_try_run "$LINENO"; then :
15492 gl_cv_func_strerror_r_works=yes
15494 gl_cv_func_strerror_r_works=no
15496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15497 conftest.$ac_objext conftest.beam conftest.$ac_ext
15502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15503 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15509 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
15510 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
15516 cat >>confdefs.h <<_ACEOF
15517 #define HAVE_DECL_STRERROR_R $ac_have_decl
15527 if test $ac_cv_have_decl_strerror_r = no; then
15528 HAVE_DECL_STRERROR_R=0
15531 if test $ac_cv_func_strerror_r = yes; then
15532 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15533 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15534 case "$gl_cv_func_strerror_r_works" in
15535 *no) REPLACE_STRERROR_R=1 ;;
15538 REPLACE_STRERROR_R=1
15541 REPLACE_STRERROR_R=1
15560 gl_cv_func_vfprintf_posix=no
15561 case "$gl_cv_func_printf_sizes_c99" in
15563 case "$gl_cv_func_printf_long_double" in
15565 case "$gl_cv_func_printf_infinite" in
15567 case "$gl_cv_func_printf_infinite_long_double" in
15569 case "$gl_cv_func_printf_directive_a" in
15571 case "$gl_cv_func_printf_directive_f" in
15573 case "$gl_cv_func_printf_directive_n" in
15575 case "$gl_cv_func_printf_directive_ls" in
15577 case "$gl_cv_func_printf_positions" in
15579 case "$gl_cv_func_printf_flag_grouping" in
15581 case "$gl_cv_func_printf_flag_leftadjust" in
15583 case "$gl_cv_func_printf_flag_zero" in
15585 case "$gl_cv_func_printf_precision" in
15587 case "$gl_cv_func_printf_enomem" in
15589 # vfprintf exists and is
15590 # already POSIX compliant.
15591 gl_cv_func_vfprintf_posix=yes
15620 if test $gl_cv_func_vfprintf_posix = no; then
15624 case "$gl_cv_func_printf_infinite" in
15629 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
15637 case "$gl_cv_func_printf_long_double" in
15639 case "$gl_cv_func_printf_infinite_long_double" in
15644 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
15653 case "$gl_cv_func_printf_directive_a" in
15658 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
15660 for ac_func in nl_langinfo
15662 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
15663 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
15664 cat >>confdefs.h <<_ACEOF
15665 #define HAVE_NL_LANGINFO 1
15676 case "$gl_cv_func_printf_directive_f" in
15681 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
15688 case "$gl_cv_func_printf_directive_ls" in
15693 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
15700 case "$gl_cv_func_printf_flag_grouping" in
15705 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
15712 case "$gl_cv_func_printf_flag_leftadjust" in
15717 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
15724 case "$gl_cv_func_printf_flag_zero" in
15729 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
15736 case "$gl_cv_func_printf_precision" in
15741 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
15744 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15747 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15754 case "$gl_cv_func_printf_enomem" in
15759 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
15762 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15765 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15780 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
15790 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
15800 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
15810 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
15812 if test $ac_cv_func_vasnprintf = yes; then
15814 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
15828 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
15829 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
15833 $as_echo "#define ptrdiff_t long" >>confdefs.h
15854 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
15858 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
15865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866 /* end confdefs.h. */
15873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15874 $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
15876 gl_c_asm_opt='-c -Fa'
15888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
15889 $as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
15890 if ${gl_cv_prog_as_underscore+:} false; then :
15891 $as_echo_n "(cached) " >&6
15893 cat > conftest.c <<EOF
15895 extern "C" int foo (void);
15897 int foo(void) { return 0; }
15899 # Look for the assembly language name in the .s file.
15900 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
15901 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
15902 (eval $ac_try) 2>&5
15904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15905 test $ac_status = 0; }; } >/dev/null 2>&1
15906 if grep _foo conftest.$gl_asmext >/dev/null ; then
15907 gl_cv_prog_as_underscore=yes
15909 gl_cv_prog_as_underscore=no
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
15915 $as_echo "$gl_cv_prog_as_underscore" >&6; }
15916 if test $gl_cv_prog_as_underscore = yes; then
15917 USER_LABEL_PREFIX=_
15922 cat >>confdefs.h <<_ACEOF
15923 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
15926 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
15930 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
15931 if ${ac_cv_header_stdbool_h+:} false; then :
15932 $as_echo_n "(cached) " >&6
15934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15935 /* end confdefs.h. */
15937 #include <stdbool.h>
15939 "error: bool is not defined"
15942 "error: false is not defined"
15945 "error: false is not 0"
15948 "error: true is not defined"
15951 "error: true is not 1"
15953 #ifndef __bool_true_false_are_defined
15954 "error: __bool_true_false_are_defined is not defined"
15957 struct s { _Bool s: 1; _Bool t; } s;
15959 char a[true == 1 ? 1 : -1];
15960 char b[false == 0 ? 1 : -1];
15961 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
15962 char d[(bool) 0.5 == true ? 1 : -1];
15963 /* See body of main program for 'e'. */
15964 char f[(_Bool) 0.0 == false ? 1 : -1];
15966 char h[sizeof (_Bool)];
15967 char i[sizeof s.t];
15968 enum { j = false, k = true, l = false * true, m = true * 256 };
15969 /* The following fails for
15970 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
15972 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
15973 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
15974 /* Catch a bug in an HP-UX C compiler. See
15975 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
15976 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
15988 /* Refer to every declared value, to avoid compiler optimizations. */
15989 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
15990 + !m + !n + !o + !p + !q + !pq);
15996 if ac_fn_c_try_compile "$LINENO"; then :
15997 ac_cv_header_stdbool_h=yes
15999 ac_cv_header_stdbool_h=no
16001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16004 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16005 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16006 if test "x$ac_cv_type__Bool" = xyes; then :
16008 cat >>confdefs.h <<_ACEOF
16009 #define HAVE__BOOL 1
16027 if test $ac_cv_type_long_long_int = yes; then
16028 HAVE_LONG_LONG_INT=1
16030 HAVE_LONG_LONG_INT=0
16034 if test $ac_cv_type_unsigned_long_long_int = yes; then
16035 HAVE_UNSIGNED_LONG_LONG_INT=1
16037 HAVE_UNSIGNED_LONG_LONG_INT=0
16042 if test $ac_cv_header_wchar_h = yes; then
16049 if test $ac_cv_header_inttypes_h = yes; then
16056 if test $ac_cv_header_sys_types_h = yes; then
16072 if test $gl_cv_have_include_next = yes; then
16073 gl_cv_next_stdint_h='<'stdint.h'>'
16075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
16076 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
16077 if ${gl_cv_next_stdint_h+:} false; then :
16078 $as_echo_n "(cached) " >&6
16081 if test $ac_cv_header_stdint_h = yes; then
16084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16085 /* end confdefs.h. */
16086 #include <stdint.h>
16090 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16091 *) gl_absname_cpp="$ac_cpp" ;;
16096 gl_dirsep_regex='[/\\]'
16099 gl_dirsep_regex='\/'
16102 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16104 gl_header_literal_regex=`echo 'stdint.h' \
16105 | sed -e "$gl_make_literal_regex_sed"`
16106 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16107 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16112 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16113 sed -n "$gl_absolute_header_sed"`'"'
16115 gl_cv_next_stdint_h='<'stdint.h'>'
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
16121 $as_echo "$gl_cv_next_stdint_h" >&6; }
16123 NEXT_STDINT_H=$gl_cv_next_stdint_h
16125 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16126 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16127 gl_next_as_first_directive='<'stdint.h'>'
16129 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16130 gl_next_as_first_directive=$gl_cv_next_stdint_h
16132 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
16137 if test $ac_cv_header_stdint_h = yes; then
16144 if test $ac_cv_header_stdint_h = yes; then
16145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
16146 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
16147 if ${gl_cv_header_working_stdint_h+:} false; then :
16148 $as_echo_n "(cached) " >&6
16150 gl_cv_header_working_stdint_h=no
16151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16152 /* end confdefs.h. */
16155 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16156 #include <stdint.h>
16157 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
16158 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
16159 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
16163 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16164 included before <wchar.h>. */
16165 #include <stddef.h>
16166 #include <signal.h>
16168 # include <stdio.h>
16170 # include <wchar.h>
16175 int8_t a1 = INT8_MAX;
16176 int8_t a1min = INT8_MIN;
16179 int16_t a2 = INT16_MAX;
16180 int16_t a2min = INT16_MIN;
16183 int32_t a3 = INT32_MAX;
16184 int32_t a3min = INT32_MIN;
16187 int64_t a4 = INT64_MAX;
16188 int64_t a4min = INT64_MIN;
16191 uint8_t b1 = UINT8_MAX;
16193 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
16196 uint16_t b2 = UINT16_MAX;
16199 uint32_t b3 = UINT32_MAX;
16202 uint64_t b4 = UINT64_MAX;
16204 int_least8_t c1 = INT8_C (0x7f);
16205 int_least8_t c1max = INT_LEAST8_MAX;
16206 int_least8_t c1min = INT_LEAST8_MIN;
16207 int_least16_t c2 = INT16_C (0x7fff);
16208 int_least16_t c2max = INT_LEAST16_MAX;
16209 int_least16_t c2min = INT_LEAST16_MIN;
16210 int_least32_t c3 = INT32_C (0x7fffffff);
16211 int_least32_t c3max = INT_LEAST32_MAX;
16212 int_least32_t c3min = INT_LEAST32_MIN;
16213 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
16214 int_least64_t c4max = INT_LEAST64_MAX;
16215 int_least64_t c4min = INT_LEAST64_MIN;
16216 uint_least8_t d1 = UINT8_C (0xff);
16217 uint_least8_t d1max = UINT_LEAST8_MAX;
16218 uint_least16_t d2 = UINT16_C (0xffff);
16219 uint_least16_t d2max = UINT_LEAST16_MAX;
16220 uint_least32_t d3 = UINT32_C (0xffffffff);
16221 uint_least32_t d3max = UINT_LEAST32_MAX;
16222 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
16223 uint_least64_t d4max = UINT_LEAST64_MAX;
16224 int_fast8_t e1 = INT_FAST8_MAX;
16225 int_fast8_t e1min = INT_FAST8_MIN;
16226 int_fast16_t e2 = INT_FAST16_MAX;
16227 int_fast16_t e2min = INT_FAST16_MIN;
16228 int_fast32_t e3 = INT_FAST32_MAX;
16229 int_fast32_t e3min = INT_FAST32_MIN;
16230 int_fast64_t e4 = INT_FAST64_MAX;
16231 int_fast64_t e4min = INT_FAST64_MIN;
16232 uint_fast8_t f1 = UINT_FAST8_MAX;
16233 uint_fast16_t f2 = UINT_FAST16_MAX;
16234 uint_fast32_t f3 = UINT_FAST32_MAX;
16235 uint_fast64_t f4 = UINT_FAST64_MAX;
16237 intptr_t g = INTPTR_MAX;
16238 intptr_t gmin = INTPTR_MIN;
16241 uintptr_t h = UINTPTR_MAX;
16243 intmax_t i = INTMAX_MAX;
16244 uintmax_t j = UINTMAX_MAX;
16246 #include <limits.h> /* for CHAR_BIT */
16247 #define TYPE_MINIMUM(t) \
16248 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16249 #define TYPE_MAXIMUM(t) \
16250 ((t) ((t) 0 < (t) -1 \
16252 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16255 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
16256 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
16258 /* Detect bug in FreeBSD 6.0 / ia64. */
16259 int check_SIG_ATOMIC:
16260 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
16261 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
16263 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
16265 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
16266 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
16268 /* Detect bug in mingw. */
16270 WINT_MIN == TYPE_MINIMUM (wint_t)
16271 && WINT_MAX == TYPE_MAXIMUM (wint_t)
16274 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
16276 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
16277 int check_UINT16_C:
16278 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
16280 /* Detect bugs in OpenBSD 3.9 stdint.h. */
16282 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
16285 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
16288 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
16291 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
16293 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
16294 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
16295 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
16296 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
16297 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
16298 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
16299 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
16300 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
16301 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
16302 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
16303 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
16314 if ac_fn_c_try_compile "$LINENO"; then :
16315 if test "$cross_compiling" = yes; then :
16316 gl_cv_header_working_stdint_h=yes
16319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320 /* end confdefs.h. */
16323 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16324 #include <stdint.h>
16327 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16328 included before <wchar.h>. */
16329 #include <stddef.h>
16330 #include <signal.h>
16332 # include <stdio.h>
16334 # include <wchar.h>
16339 #include <string.h>
16340 #define MVAL(macro) MVAL1(macro)
16341 #define MVAL1(expression) #expression
16342 static const char *macro_values[] =
16376 for (mv = macro_values; *mv != NULL; mv++)
16378 const char *value = *mv;
16379 /* Test whether it looks like a cast expression. */
16380 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
16381 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
16382 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
16383 || strncmp (value, "((int)"/*)*/, 6) == 0
16384 || strncmp (value, "((signed short)"/*)*/, 15) == 0
16385 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
16386 return mv - macro_values + 1;
16394 if ac_fn_c_try_run "$LINENO"; then :
16395 gl_cv_header_working_stdint_h=yes
16397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16398 conftest.$ac_objext conftest.beam conftest.$ac_ext
16403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
16407 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
16409 if test "$gl_cv_header_working_stdint_h" = yes; then
16412 for ac_header in sys/inttypes.h sys/bitypes.h
16414 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16415 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16416 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16417 cat >>confdefs.h <<_ACEOF
16418 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16425 if test $ac_cv_header_sys_inttypes_h = yes; then
16426 HAVE_SYS_INTTYPES_H=1
16428 HAVE_SYS_INTTYPES_H=0
16431 if test $ac_cv_header_sys_bitypes_h = yes; then
16432 HAVE_SYS_BITYPES_H=1
16434 HAVE_SYS_BITYPES_H=0
16440 if test $APPLE_UNIVERSAL_BUILD = 0; then
16443 for gltype in ptrdiff_t size_t ; do
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16445 $as_echo_n "checking for bit size of $gltype... " >&6; }
16446 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
16447 $as_echo_n "(cached) " >&6
16449 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
16450 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16451 included before <wchar.h>. */
16452 #include <stddef.h>
16453 #include <signal.h>
16455 # include <stdio.h>
16457 # include <wchar.h>
16460 #include <limits.h>"; then :
16466 eval gl_cv_bitsizeof_${gltype}=\$result
16469 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16471 $as_echo "$ac_res" >&6; }
16472 eval result=\$gl_cv_bitsizeof_${gltype}
16473 if test $result = unknown; then
16476 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16477 cat >>confdefs.h <<_ACEOF
16478 #define BITSIZEOF_${GLTYPE} $result
16481 eval BITSIZEOF_${GLTYPE}=\$result
16488 for gltype in sig_atomic_t wchar_t wint_t ; do
16489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16490 $as_echo_n "checking for bit size of $gltype... " >&6; }
16491 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
16492 $as_echo_n "(cached) " >&6
16494 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
16495 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16496 included before <wchar.h>. */
16497 #include <stddef.h>
16498 #include <signal.h>
16500 # include <stdio.h>
16502 # include <wchar.h>
16505 #include <limits.h>"; then :
16511 eval gl_cv_bitsizeof_${gltype}=\$result
16514 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16516 $as_echo "$ac_res" >&6; }
16517 eval result=\$gl_cv_bitsizeof_${gltype}
16518 if test $result = unknown; then
16521 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16522 cat >>confdefs.h <<_ACEOF
16523 #define BITSIZEOF_${GLTYPE} $result
16526 eval BITSIZEOF_${GLTYPE}=\$result
16532 for gltype in sig_atomic_t wchar_t wint_t ; do
16533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
16534 $as_echo_n "checking whether $gltype is signed... " >&6; }
16535 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
16536 $as_echo_n "(cached) " >&6
16538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16539 /* end confdefs.h. */
16541 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16542 included before <wchar.h>. */
16543 #include <stddef.h>
16544 #include <signal.h>
16546 # include <stdio.h>
16548 # include <wchar.h>
16551 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
16560 if ac_fn_c_try_compile "$LINENO"; then :
16565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16566 eval gl_cv_type_${gltype}_signed=\$result
16569 eval ac_res=\$gl_cv_type_${gltype}_signed
16570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16571 $as_echo "$ac_res" >&6; }
16572 eval result=\$gl_cv_type_${gltype}_signed
16573 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16574 if test "$result" = yes; then
16575 cat >>confdefs.h <<_ACEOF
16576 #define HAVE_SIGNED_${GLTYPE} 1
16579 eval HAVE_SIGNED_${GLTYPE}=1
16581 eval HAVE_SIGNED_${GLTYPE}=0
16586 gl_cv_type_ptrdiff_t_signed=yes
16587 gl_cv_type_size_t_signed=no
16588 if test $APPLE_UNIVERSAL_BUILD = 0; then
16591 for gltype in ptrdiff_t size_t ; do
16592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16593 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
16594 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
16595 $as_echo_n "(cached) " >&6
16597 eval gl_cv_type_${gltype}_suffix=no
16598 eval result=\$gl_cv_type_${gltype}_signed
16599 if test "$result" = yes; then
16604 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16606 '') gltype1='int';;
16607 l) gltype1='long int';;
16608 ll) gltype1='long long int';;
16609 i64) gltype1='__int64';;
16610 u) gltype1='unsigned int';;
16611 ul) gltype1='unsigned long int';;
16612 ull) gltype1='unsigned long long int';;
16613 ui64)gltype1='unsigned __int64';;
16615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616 /* end confdefs.h. */
16618 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16619 included before <wchar.h>. */
16620 #include <stddef.h>
16621 #include <signal.h>
16623 # include <stdio.h>
16625 # include <wchar.h>
16628 extern $gltype foo;
16629 extern $gltype1 foo;
16638 if ac_fn_c_try_compile "$LINENO"; then :
16639 eval gl_cv_type_${gltype}_suffix=\$glsuf
16641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16642 eval result=\$gl_cv_type_${gltype}_suffix
16643 test "$result" != no && break
16646 eval ac_res=\$gl_cv_type_${gltype}_suffix
16647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16648 $as_echo "$ac_res" >&6; }
16649 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16650 eval result=\$gl_cv_type_${gltype}_suffix
16651 test "$result" = no && result=
16652 eval ${GLTYPE}_SUFFIX=\$result
16653 cat >>confdefs.h <<_ACEOF
16654 #define ${GLTYPE}_SUFFIX $result
16663 for gltype in sig_atomic_t wchar_t wint_t ; do
16664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16665 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
16666 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
16667 $as_echo_n "(cached) " >&6
16669 eval gl_cv_type_${gltype}_suffix=no
16670 eval result=\$gl_cv_type_${gltype}_signed
16671 if test "$result" = yes; then
16676 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16678 '') gltype1='int';;
16679 l) gltype1='long int';;
16680 ll) gltype1='long long int';;
16681 i64) gltype1='__int64';;
16682 u) gltype1='unsigned int';;
16683 ul) gltype1='unsigned long int';;
16684 ull) gltype1='unsigned long long int';;
16685 ui64)gltype1='unsigned __int64';;
16687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16688 /* end confdefs.h. */
16690 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16691 included before <wchar.h>. */
16692 #include <stddef.h>
16693 #include <signal.h>
16695 # include <stdio.h>
16697 # include <wchar.h>
16700 extern $gltype foo;
16701 extern $gltype1 foo;
16710 if ac_fn_c_try_compile "$LINENO"; then :
16711 eval gl_cv_type_${gltype}_suffix=\$glsuf
16713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16714 eval result=\$gl_cv_type_${gltype}_suffix
16715 test "$result" != no && break
16718 eval ac_res=\$gl_cv_type_${gltype}_suffix
16719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16720 $as_echo "$ac_res" >&6; }
16721 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16722 eval result=\$gl_cv_type_${gltype}_suffix
16723 test "$result" = no && result=
16724 eval ${GLTYPE}_SUFFIX=\$result
16725 cat >>confdefs.h <<_ACEOF
16726 #define ${GLTYPE}_SUFFIX $result
16733 if test $BITSIZEOF_WINT_T -lt 32; then
16734 BITSIZEOF_WINT_T=32
16740 if test -n "$STDINT_H"; then
16741 GL_GENERATE_STDINT_H_TRUE=
16742 GL_GENERATE_STDINT_H_FALSE='#'
16744 GL_GENERATE_STDINT_H_TRUE='#'
16745 GL_GENERATE_STDINT_H_FALSE=
16751 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16752 if test "x$ac_cv_have_decl_strdup" = xyes; then :
16758 cat >>confdefs.h <<_ACEOF
16759 #define HAVE_DECL_STRDUP $ac_have_decl
16775 if test $gl_cv_have_include_next = yes; then
16776 gl_cv_next_string_h='<'string.h'>'
16778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16779 $as_echo_n "checking absolute name of <string.h>... " >&6; }
16780 if ${gl_cv_next_string_h+:} false; then :
16781 $as_echo_n "(cached) " >&6
16784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16785 /* end confdefs.h. */
16786 #include <string.h>
16790 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16791 *) gl_absname_cpp="$ac_cpp" ;;
16796 gl_dirsep_regex='[/\\]'
16799 gl_dirsep_regex='\/'
16802 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16804 gl_header_literal_regex=`echo 'string.h' \
16805 | sed -e "$gl_make_literal_regex_sed"`
16806 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16807 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16812 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16813 sed -n "$gl_absolute_header_sed"`'"'
16817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
16818 $as_echo "$gl_cv_next_string_h" >&6; }
16820 NEXT_STRING_H=$gl_cv_next_string_h
16822 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16823 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16824 gl_next_as_first_directive='<'string.h'>'
16826 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16827 gl_next_as_first_directive=$gl_cv_next_string_h
16829 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
16836 for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
16837 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16839 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16840 if eval \${$as_gl_Symbol+:} false; then :
16841 $as_echo_n "(cached) " >&6
16843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16844 /* end confdefs.h. */
16845 #include <string.h>
16856 if ac_fn_c_try_compile "$LINENO"; then :
16857 eval "$as_gl_Symbol=yes"
16859 eval "$as_gl_Symbol=no"
16861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16863 eval ac_res=\$$as_gl_Symbol
16864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16865 $as_echo "$ac_res" >&6; }
16866 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16867 cat >>confdefs.h <<_ACEOF
16868 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16871 eval ac_cv_have_decl_$gl_func=yes
16878 GNULIB_NANOSLEEP=0;
16882 HAVE_DECL_LOCALTIME_R=1;
16886 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
16887 REPLACE_MKTIME=GNULIB_PORTCHECK;
16888 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
16889 REPLACE_TIMEGM=GNULIB_PORTCHECK;
16893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
16894 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
16895 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
16896 $as_echo_n "(cached) " >&6
16898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16899 /* end confdefs.h. */
16905 static struct timespec x; x.tv_sec = x.tv_nsec;
16910 if ac_fn_c_try_compile "$LINENO"; then :
16911 gl_cv_sys_struct_timespec_in_time_h=yes
16913 gl_cv_sys_struct_timespec_in_time_h=no
16915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
16918 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
16920 TIME_H_DEFINES_STRUCT_TIMESPEC=0
16921 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
16922 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
16923 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
16924 TIME_H_DEFINES_STRUCT_TIMESPEC=1
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
16927 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
16928 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
16929 $as_echo_n "(cached) " >&6
16931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16932 /* end confdefs.h. */
16933 #include <sys/time.h>
16938 static struct timespec x; x.tv_sec = x.tv_nsec;
16943 if ac_fn_c_try_compile "$LINENO"; then :
16944 gl_cv_sys_struct_timespec_in_sys_time_h=yes
16946 gl_cv_sys_struct_timespec_in_sys_time_h=no
16948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
16951 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
16952 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
16953 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
16955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
16956 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
16957 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
16958 $as_echo_n "(cached) " >&6
16960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16961 /* end confdefs.h. */
16962 #include <pthread.h>
16967 static struct timespec x; x.tv_sec = x.tv_nsec;
16972 if ac_fn_c_try_compile "$LINENO"; then :
16973 gl_cv_sys_struct_timespec_in_pthread_h=yes
16975 gl_cv_sys_struct_timespec_in_pthread_h=no
16977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
16980 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
16981 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
16982 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17001 if test $gl_cv_have_include_next = yes; then
17002 gl_cv_next_time_h='<'time.h'>'
17004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17005 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17006 if ${gl_cv_next_time_h+:} false; then :
17007 $as_echo_n "(cached) " >&6
17010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17011 /* end confdefs.h. */
17016 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17017 *) gl_absname_cpp="$ac_cpp" ;;
17022 gl_dirsep_regex='[/\\]'
17025 gl_dirsep_regex='\/'
17028 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17030 gl_header_literal_regex=`echo 'time.h' \
17031 | sed -e "$gl_make_literal_regex_sed"`
17032 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17033 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17038 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17039 sed -n "$gl_absolute_header_sed"`'"'
17043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17044 $as_echo "$gl_cv_next_time_h" >&6; }
17046 NEXT_TIME_H=$gl_cv_next_time_h
17048 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17049 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17050 gl_next_as_first_directive='<'time.h'>'
17052 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17053 gl_next_as_first_directive=$gl_cv_next_time_h
17055 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
17066 $as_echo_n "checking whether the utimes function works... " >&6; }
17067 if ${gl_cv_func_working_utimes+:} false; then :
17068 $as_echo_n "(cached) " >&6
17071 if test "$cross_compiling" = yes; then :
17072 gl_cv_func_working_utimes=no
17074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17075 /* end confdefs.h. */
17077 #include <sys/types.h>
17078 #include <sys/stat.h>
17080 #include <sys/time.h>
17082 #include <unistd.h>
17083 #include <stdlib.h>
17088 inorder (time_t a, time_t b, time_t c)
17090 return a <= b && b <= c;
17097 char const *file = "conftest.utimes";
17098 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
17100 /* Test whether utimes() essentially works. */
17103 FILE *f = fopen (file, "w");
17106 else if (fclose (f) != 0)
17108 else if (utimes (file, timeval) != 0)
17110 else if (lstat (file, &sbuf) != 0)
17112 else if (!(sbuf.st_atime == timeval[0].tv_sec
17113 && sbuf.st_mtime == timeval[1].tv_sec))
17115 if (unlink (file) != 0)
17119 /* Test whether utimes() with a NULL argument sets the file's timestamp
17120 to the current time. Use 'fstat' as well as 'time' to
17121 determine the "current" time, to accommodate NFS file systems
17122 if there is a time skew between the host and the NFS server. */
17124 int fd = open (file, O_WRONLY|O_CREAT, 0644);
17130 struct stat st0, st1, st2;
17131 if (time (&t0) == (time_t) -1)
17133 else if (fstat (fd, &st0) != 0)
17135 else if (utimes (file, timeval) != 0)
17137 else if (utimes (file, NULL) != 0)
17139 else if (fstat (fd, &st1) != 0)
17141 else if (write (fd, "\n", 1) != 1)
17143 else if (fstat (fd, &st2) != 0)
17145 else if (time (&t2) == (time_t) -1)
17149 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
17150 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
17151 if (! (st1.st_atime == st1.st_mtime))
17153 if (! (m_ok_POSIX || m_ok_NFS))
17156 if (close (fd) != 0)
17159 if (unlink (file) != 0)
17163 /* Test whether utimes() with a NULL argument works on read-only files. */
17165 int fd = open (file, O_WRONLY|O_CREAT, 0444);
17168 else if (close (fd) != 0)
17170 else if (utimes (file, NULL) != 0)
17172 if (unlink (file) != 0)
17180 if ac_fn_c_try_run "$LINENO"; then :
17181 gl_cv_func_working_utimes=yes
17183 gl_cv_func_working_utimes=no
17185 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17186 conftest.$ac_objext conftest.beam conftest.$ac_ext
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
17191 $as_echo "$gl_cv_func_working_utimes" >&6; }
17193 if test $gl_cv_func_working_utimes = yes; then
17195 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
17204 $as_echo_n "checking for struct utimbuf... " >&6; }
17205 if ${gl_cv_sys_struct_utimbuf+:} false; then :
17206 $as_echo_n "(cached) " >&6
17208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17209 /* end confdefs.h. */
17210 #if HAVE_SYS_TIME_H
17211 #include <sys/time.h>
17214 #ifdef HAVE_UTIME_H
17221 static struct utimbuf x; x.actime = x.modtime;
17226 if ac_fn_c_try_compile "$LINENO"; then :
17227 gl_cv_sys_struct_utimbuf=yes
17229 gl_cv_sys_struct_utimbuf=no
17231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
17234 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
17236 if test $gl_cv_sys_struct_utimbuf = yes; then
17238 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
17253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
17254 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
17255 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
17256 $as_echo_n "(cached) " >&6
17258 gl_cv_header_wchar_h_correct_inline=yes
17259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17260 /* end confdefs.h. */
17262 #define wcstod renamed_wcstod
17263 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17265 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17266 included before <wchar.h>. */
17267 #include <stddef.h>
17271 extern int zero (void);
17272 int main () { return zero(); }
17275 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17276 (eval $ac_compile) 2>&5
17278 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17279 test $ac_status = 0; }; then
17280 mv conftest.$ac_objext conftest1.$ac_objext
17281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17282 /* end confdefs.h. */
17284 #define wcstod renamed_wcstod
17285 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17287 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17288 included before <wchar.h>. */
17289 #include <stddef.h>
17293 int zero (void) { return 0; }
17296 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17297 (eval $ac_compile) 2>&5
17299 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17300 test $ac_status = 0; }; then
17301 mv conftest.$ac_objext conftest2.$ac_objext
17302 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
17305 gl_cv_header_wchar_h_correct_inline=no
17309 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
17313 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
17314 if test $gl_cv_header_wchar_h_correct_inline = no; then
17315 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
17316 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
17317 C99 mode. You have four options:
17318 - Add the flag -fgnu89-inline to CC and reconfigure, or
17319 - Fix your include files, using parts of
17320 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
17321 - Use a gcc version older than 4.3, or
17322 - Don't use the flags -std=c99 or -std=gnu99.
17323 Configuration aborted." "$LINENO" 5
17331 GNULIB_TOWCTRANS=0;
17335 REPLACE_ISWBLANK=0;
17343 GL_COND_LIBTOOL_TRUE=
17344 GL_COND_LIBTOOL_FALSE='#'
17346 GL_COND_LIBTOOL_TRUE='#'
17347 GL_COND_LIBTOOL_FALSE=
17350 gl_cond_libtool=false
17363 gl_source_base='lib'
17366 if test $ac_cv_func_alloca_works = no; then
17370 # Define an additional variable used in the Makefile substitution.
17371 if test $ac_cv_working_alloca_h = yes; then
17372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17373 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
17374 if ${gl_cv_rpl_alloca+:} false; then :
17375 $as_echo_n "(cached) " >&6
17378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17379 /* end confdefs.h. */
17381 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17387 $EGREP "Need own alloca" >/dev/null 2>&1; then :
17388 gl_cv_rpl_alloca=yes
17390 gl_cv_rpl_alloca=no
17396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17397 $as_echo "$gl_cv_rpl_alloca" >&6; }
17398 if test $gl_cv_rpl_alloca = yes; then
17400 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17410 if test -n "$ALLOCA_H"; then
17411 GL_GENERATE_ALLOCA_H_TRUE=
17412 GL_GENERATE_ALLOCA_H_FALSE='#'
17414 GL_GENERATE_ALLOCA_H_TRUE='#'
17415 GL_GENERATE_ALLOCA_H_FALSE=
17427 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
17433 $as_echo_n "checking for GNU libc compatible calloc... " >&6; }
17434 if ${ac_cv_func_calloc_0_nonnull+:} false; then :
17435 $as_echo_n "(cached) " >&6
17437 if test "$cross_compiling" = yes; then :
17439 # Guess yes on glibc systems.
17440 *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
17441 # If we don't know, assume the worst.
17442 *) ac_cv_func_calloc_0_nonnull="guessing no" ;;
17446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17447 /* end confdefs.h. */
17448 $ac_includes_default
17453 if (!calloc (0, 0))
17455 if (calloc ((size_t) -1 / 8 + 1, 8))
17463 if ac_fn_c_try_run "$LINENO"; then :
17464 ac_cv_func_calloc_0_nonnull=yes
17466 ac_cv_func_calloc_0_nonnull=no
17468 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17469 conftest.$ac_objext conftest.beam conftest.$ac_ext
17473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
17474 $as_echo "$ac_cv_func_calloc_0_nonnull" >&6; }
17475 case "$ac_cv_func_calloc_0_nonnull" in
17478 $as_echo "#define HAVE_CALLOC_GNU 1" >>confdefs.h
17482 $as_echo "#define HAVE_CALLOC_GNU 0" >>confdefs.h
17490 if test $REPLACE_CALLOC = 1; then
17499 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17504 cat >>confdefs.h <<_ACEOF
17505 #define GNULIB_CALLOC_GNU 1
17512 if test $gl_cv_func_malloc_posix = yes; then
17514 $as_echo "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
17520 if test $REPLACE_CALLOC = 1; then
17529 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17537 GNULIB_CALLOC_POSIX=1
17543 $as_echo "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
17558 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17565 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17566 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17567 $as_echo_n "(cached) " >&6
17569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17570 /* end confdefs.h. */
17572 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17574 # include <unistd.h>
17576 #include <limits.h>
17577 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17578 # include <sys/param.h>
17580 #if !defined PATH_MAX && defined MAXPATHLEN
17581 # define PATH_MAX MAXPATHLEN
17585 # define PATH_MAX 1024
17587 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17589 # define PATH_MAX 260
17593 have_arbitrary_file_name_length_limit
17596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17597 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17598 gl_cv_have_arbitrary_file_name_length_limit=yes
17600 gl_cv_have_arbitrary_file_name_length_limit=no
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17606 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17608 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17617 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17627 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17628 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17630 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
17631 # programs in the package would end up linked with that potentially-shared
17632 # library, inducing unnecessary run-time overhead.
17635 gl_saved_libs=$LIBS
17636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17637 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17638 if ${ac_cv_search_clock_gettime+:} false; then :
17639 $as_echo_n "(cached) " >&6
17641 ac_func_search_save_LIBS=$LIBS
17642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17643 /* end confdefs.h. */
17645 /* Override any GCC internal prototype to avoid an error.
17646 Use char because int might match the return type of a GCC
17647 builtin and then its argument prototype would still apply. */
17651 char clock_gettime ();
17655 return clock_gettime ();
17660 for ac_lib in '' rt posix4; do
17661 if test -z "$ac_lib"; then
17662 ac_res="none required"
17665 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17667 if ac_fn_c_try_link "$LINENO"; then :
17668 ac_cv_search_clock_gettime=$ac_res
17670 rm -f core conftest.err conftest.$ac_objext \
17672 if ${ac_cv_search_clock_gettime+:} false; then :
17676 if ${ac_cv_search_clock_gettime+:} false; then :
17679 ac_cv_search_clock_gettime=no
17681 rm conftest.$ac_ext
17682 LIBS=$ac_func_search_save_LIBS
17684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17685 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17686 ac_res=$ac_cv_search_clock_gettime
17687 if test "$ac_res" != no; then :
17688 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17689 test "$ac_cv_search_clock_gettime" = "none required" ||
17690 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17693 for ac_func in clock_gettime clock_settime
17695 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17696 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17697 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17698 cat >>confdefs.h <<_ACEOF
17699 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17705 LIBS=$gl_saved_libs
17709 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17715 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17723 if test $ac_cv_header_sys_socket_h != yes; then
17724 for ac_header in winsock2.h
17726 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17727 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17728 cat >>confdefs.h <<_ACEOF
17729 #define HAVE_WINSOCK2_H 1
17737 if test "$ac_cv_header_winsock2_h" = yes; then
17739 UNISTD_H_HAVE_WINSOCK2_H=1
17740 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17746 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17751 if test $REPLACE_CLOSE = 0; then
17755 if test $ac_cv_func_fchdir = no; then
17759 if test $HAVE_FCHDIR = 0; then
17765 if test $REPLACE_CLOSE = 1; then
17774 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17788 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17797 cat >>confdefs.h <<_ACEOF
17798 #define GNULIB_CLOSE_STREAM 1
17805 for ac_func in closedir
17807 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17808 if test "x$ac_cv_func_closedir" = xyes; then :
17809 cat >>confdefs.h <<_ACEOF
17810 #define HAVE_CLOSEDIR 1
17816 if test $ac_cv_func_closedir = no; then
17823 if test $ac_cv_func_fchdir = no; then
17827 if test $HAVE_FCHDIR = 0; then
17828 if test $HAVE_CLOSEDIR = 1; then
17834 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17843 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17857 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17868 if test "x$datarootdir" = x; then
17869 datarootdir='${datadir}'
17872 if test "x$docdir" = x; then
17873 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
17876 if test "x$htmldir" = x; then
17877 htmldir='${docdir}'
17880 if test "x$dvidir" = x; then
17884 if test "x$pdfdir" = x; then
17888 if test "x$psdir" = x; then
17892 if test "x$lispdir" = x; then
17893 lispdir='${datarootdir}/emacs/site-lisp'
17896 if test "x$localedir" = x; then
17897 localedir='${datarootdir}/locale'
17901 pkglibexecdir='${libexecdir}/${PACKAGE}'
17916 if test $gl_cv_have_include_next = yes; then
17917 gl_cv_next_dirent_h='<'dirent.h'>'
17919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17920 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17921 if ${gl_cv_next_dirent_h+:} false; then :
17922 $as_echo_n "(cached) " >&6
17925 if test $ac_cv_header_dirent_h = yes; then
17928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17929 /* end confdefs.h. */
17930 #include <dirent.h>
17934 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17935 *) gl_absname_cpp="$ac_cpp" ;;
17940 gl_dirsep_regex='[/\\]'
17943 gl_dirsep_regex='\/'
17946 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17948 gl_header_literal_regex=`echo 'dirent.h' \
17949 | sed -e "$gl_make_literal_regex_sed"`
17950 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17951 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17956 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17957 sed -n "$gl_absolute_header_sed"`'"'
17959 gl_cv_next_dirent_h='<'dirent.h'>'
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17965 $as_echo "$gl_cv_next_dirent_h" >&6; }
17967 NEXT_DIRENT_H=$gl_cv_next_dirent_h
17969 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17970 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17971 gl_next_as_first_directive='<'dirent.h'>'
17973 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17974 gl_next_as_first_directive=$gl_cv_next_dirent_h
17976 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17981 if test $ac_cv_header_dirent_h = yes; then
17989 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17990 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17992 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17993 if eval \${$as_gl_Symbol+:} false; then :
17994 $as_echo_n "(cached) " >&6
17996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17997 /* end confdefs.h. */
17998 #include <dirent.h>
18009 if ac_fn_c_try_compile "$LINENO"; then :
18010 eval "$as_gl_Symbol=yes"
18012 eval "$as_gl_Symbol=no"
18014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18016 eval ac_res=\$$as_gl_Symbol
18017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18018 $as_echo "$ac_res" >&6; }
18019 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18020 cat >>confdefs.h <<_ACEOF
18021 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18024 eval ac_cv_have_decl_$gl_func=yes
18034 cat >>confdefs.h <<_ACEOF
18035 #define GNULIB_DIRENT_SAFER 1
18044 for ac_func in dirfd
18046 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18047 if test "x$ac_cv_func_dirfd" = xyes; then :
18048 cat >>confdefs.h <<_ACEOF
18049 #define HAVE_DIRFD 1
18055 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18056 #include <dirent.h>
18058 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
18064 cat >>confdefs.h <<_ACEOF
18065 #define HAVE_DECL_DIRFD $ac_have_decl
18068 if test $ac_cv_have_decl_dirfd = no; then
18072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18073 $as_echo_n "checking whether dirfd is a macro... " >&6; }
18074 if ${gl_cv_func_dirfd_macro+:} false; then :
18075 $as_echo_n "(cached) " >&6
18077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18078 /* end confdefs.h. */
18080 #include <sys/types.h>
18081 #include <dirent.h>
18083 dirent_header_defines_dirfd
18086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18087 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
18088 gl_cv_func_dirfd_macro=yes
18090 gl_cv_func_dirfd_macro=no
18095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18096 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
18098 # Use the replacement only if we have no function or macro with that name.
18099 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18100 if test $ac_cv_have_decl_dirfd = yes; then
18101 # If the system declares dirfd already, let's declare rpl_dirfd instead.
18106 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18115 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18119 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18120 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
18121 $as_echo_n "(cached) " >&6
18124 dirfd_save_CFLAGS=$CFLAGS
18125 for ac_expr in d_fd dd_fd; do
18127 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18129 /* end confdefs.h. */
18131 #include <sys/types.h>
18132 #include <dirent.h>
18136 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18141 if ac_fn_c_try_compile "$LINENO"; then :
18145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18146 CFLAGS=$dirfd_save_CFLAGS
18147 test "$dir_fd_found" = yes && break
18149 test "$dir_fd_found" = yes || ac_expr=no_such_member
18151 gl_cv_sys_dir_fd_member_name=$ac_expr
18155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18156 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
18157 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18159 cat >>confdefs.h <<_ACEOF
18160 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18178 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18189 $as_echo_n "checking whether // is distinct from /... " >&6; }
18190 if ${gl_cv_double_slash_root+:} false; then :
18191 $as_echo_n "(cached) " >&6
18193 if test x"$cross_compiling" = xyes ; then
18194 # When cross-compiling, there is no way to tell whether // is special
18195 # short of a list of hosts. However, the only known hosts to date
18196 # that have a distinct // are Apollo DomainOS (too old to port to),
18197 # Cygwin, and z/OS. If anyone knows of another system for which // has
18198 # special semantics and is distinct from /, please report it to
18199 # <bug-gnulib@gnu.org>.
18201 *-cygwin | i370-ibm-openedition)
18202 gl_cv_double_slash_root=yes ;;
18204 # Be optimistic and assume that / and // are the same when we
18206 gl_cv_double_slash_root='unknown, assuming no' ;;
18209 set x `ls -di / // 2>/dev/null`
18210 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18211 gl_cv_double_slash_root=no
18213 gl_cv_double_slash_root=yes
18217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18218 $as_echo "$gl_cv_double_slash_root" >&6; }
18219 if test "$gl_cv_double_slash_root" = yes; then
18221 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18228 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18235 if test $ac_cv_func_fchdir = no; then
18239 if test $HAVE_FCHDIR = 0; then
18244 if test $REPLACE_DUP = 1; then
18253 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18270 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
18279 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
18282 if test $HAVE_DUP2 = 1; then
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18284 $as_echo_n "checking whether dup2 works... " >&6; }
18285 if ${gl_cv_func_dup2_works+:} false; then :
18286 $as_echo_n "(cached) " >&6
18288 if test "$cross_compiling" = yes; then :
18290 mingw*) # on this platform, dup2 always returns 0 for success
18291 gl_cv_func_dup2_works="guessing no" ;;
18292 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18293 gl_cv_func_dup2_works="guessing no" ;;
18294 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
18295 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
18296 gl_cv_func_dup2_works="guessing no" ;;
18297 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
18298 gl_cv_func_dup2_works="guessing no" ;;
18299 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18300 gl_cv_func_dup2_works="guessing no" ;;
18301 *) gl_cv_func_dup2_works="guessing yes" ;;
18304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18305 /* end confdefs.h. */
18307 #include <unistd.h>
18315 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18318 if (dup2 (1, 1) == 0)
18321 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18325 if (dup2 (0, 0) != -1)
18327 /* Many gnulib modules require POSIX conformance of EBADF. */
18328 if (dup2 (2, 1000000) == -1 && errno != EBADF)
18337 if ac_fn_c_try_run "$LINENO"; then :
18338 gl_cv_func_dup2_works=yes
18340 gl_cv_func_dup2_works=no
18342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18343 conftest.$ac_objext conftest.beam conftest.$ac_ext
18348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18349 $as_echo "$gl_cv_func_dup2_works" >&6; }
18350 case "$gl_cv_func_dup2_works" in
18361 if test $ac_cv_func_fchdir = no; then
18365 if test $HAVE_FCHDIR = 0; then
18366 if test $HAVE_DUP2 = 1; then
18372 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18381 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18396 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18403 $as_echo_n "checking for error_at_line... " >&6; }
18404 if ${ac_cv_lib_error_at_line+:} false; then :
18405 $as_echo_n "(cached) " >&6
18407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18408 /* end confdefs.h. */
18413 error_at_line (0, 0, "", 0, "an error occurred");
18418 if ac_fn_c_try_link "$LINENO"; then :
18419 ac_cv_lib_error_at_line=yes
18421 ac_cv_lib_error_at_line=no
18423 rm -f core conftest.err conftest.$ac_objext \
18424 conftest$ac_exeext conftest.$ac_ext
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18427 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18429 if test $ac_cv_lib_error_at_line = no; then
18438 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18448 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18452 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18459 if test $ac_cv_have_decl_fchdir = no; then
18464 if test $HAVE_FCHDIR = 0; then
18473 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18477 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18480 $as_echo_n "checking whether open can visit directories... " >&6; }
18481 if ${gl_cv_func_open_directory_works+:} false; then :
18482 $as_echo_n "(cached) " >&6
18484 if test "$cross_compiling" = yes; then :
18486 # Guess yes on glibc systems.
18487 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18488 # If we don't know, assume the worst.
18489 *) gl_cv_func_open_directory_works="guessing no" ;;
18493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18494 /* end confdefs.h. */
18500 return open(".", O_RDONLY) < 0;
18505 if ac_fn_c_try_run "$LINENO"; then :
18506 gl_cv_func_open_directory_works=yes
18508 gl_cv_func_open_directory_works=no
18510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18511 conftest.$ac_objext conftest.beam conftest.$ac_ext
18515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18516 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18517 case "$gl_cv_func_open_directory_works" in
18521 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18538 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
18548 $as_echo_n "checking whether fflush works on input streams... " >&6; }
18549 if ${gl_cv_func_fflush_stdin+:} false; then :
18550 $as_echo_n "(cached) " >&6
18552 echo hello world > conftest.txt
18553 if test "$cross_compiling" = yes; then :
18554 gl_cv_func_fflush_stdin=no
18556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18557 /* end confdefs.h. */
18561 # include <unistd.h>
18562 #else /* on Windows with MSVC */
18569 FILE *f = fopen ("conftest.txt", "r");
18576 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
18578 /* For deterministic results, ensure f read a bigger buffer. */
18579 if (lseek (fd, 0, SEEK_CUR) == 5)
18581 /* POSIX requires fflush-fseek to set file offset of fd. This fails
18582 on BSD systems and on mingw. */
18583 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
18585 if (lseek (fd, 0, SEEK_CUR) != 5)
18587 /* Verify behaviour of fflush after ungetc. See
18588 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
18589 /* Verify behaviour of fflush after a backup ungetc. This fails on
18594 if (fgetc (f) != c)
18596 /* Verify behaviour of fflush after a non-backup ungetc. This fails
18597 on glibc 2.8 and on BSD systems. */
18601 if (fgetc (f) != c)
18609 if ac_fn_c_try_run "$LINENO"; then :
18610 gl_cv_func_fflush_stdin=yes
18612 gl_cv_func_fflush_stdin=no
18614 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18615 conftest.$ac_objext conftest.beam conftest.$ac_ext
18621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
18622 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
18624 if test $gl_cv_func_fflush_stdin = no; then
18629 if test $REPLACE_CLOSE = 1; then
18633 if test $REPLACE_FCLOSE = 1; then
18642 gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
18656 $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
18665 if test $ac_cv_func_fcntl = no; then
18669 if test $ac_cv_func_fcntl = no; then
18676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18677 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18678 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18679 $as_echo_n "(cached) " >&6
18681 if test "$cross_compiling" = yes; then :
18682 # Guess that it works on glibc systems
18683 case $host_os in #((
18684 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18685 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18689 /* end confdefs.h. */
18698 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18699 if (errno != EINVAL) result |= 2;
18706 if ac_fn_c_try_run "$LINENO"; then :
18707 gl_cv_func_fcntl_f_dupfd_works=yes
18709 gl_cv_func_fcntl_f_dupfd_works=no
18711 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18712 conftest.$ac_objext conftest.beam conftest.$ac_ext
18716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18717 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18718 case $gl_cv_func_fcntl_f_dupfd_works in
18723 if test $ac_cv_func_fcntl = no; then
18730 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18735 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18736 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18737 $as_echo_n "(cached) " >&6
18739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18740 /* end confdefs.h. */
18743 #ifndef F_DUPFD_CLOEXEC
18755 if ac_fn_c_try_compile "$LINENO"; then :
18756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18757 /* end confdefs.h. */
18760 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18761 it to support the semantics on older kernels that failed with EINVAL. */
18773 if ac_fn_c_try_compile "$LINENO"; then :
18774 gl_cv_func_fcntl_f_dupfd_cloexec=yes
18776 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18780 gl_cv_func_fcntl_f_dupfd_cloexec=no
18782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18785 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18786 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18790 if test $ac_cv_func_fcntl = no; then
18802 if test $ac_cv_func_fchdir = no; then
18806 if test $HAVE_FCHDIR = 0; then
18810 if test $ac_cv_func_fcntl = no; then
18819 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18828 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18842 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18857 if test $gl_cv_have_include_next = yes; then
18858 gl_cv_next_fcntl_h='<'fcntl.h'>'
18860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18861 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
18862 if ${gl_cv_next_fcntl_h+:} false; then :
18863 $as_echo_n "(cached) " >&6
18866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18867 /* end confdefs.h. */
18872 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18873 *) gl_absname_cpp="$ac_cpp" ;;
18878 gl_dirsep_regex='[/\\]'
18881 gl_dirsep_regex='\/'
18884 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18886 gl_header_literal_regex=`echo 'fcntl.h' \
18887 | sed -e "$gl_make_literal_regex_sed"`
18888 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18889 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18894 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18895 sed -n "$gl_absolute_header_sed"`'"'
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18900 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18902 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18904 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18905 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18906 gl_next_as_first_directive='<'fcntl.h'>'
18908 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18909 gl_next_as_first_directive=$gl_cv_next_fcntl_h
18911 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18922 for gl_func in fcntl openat; do
18923 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18925 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18926 if eval \${$as_gl_Symbol+:} false; then :
18927 $as_echo_n "(cached) " >&6
18929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18930 /* end confdefs.h. */
18942 if ac_fn_c_try_compile "$LINENO"; then :
18943 eval "$as_gl_Symbol=yes"
18945 eval "$as_gl_Symbol=no"
18947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18949 eval ac_res=\$$as_gl_Symbol
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18951 $as_echo "$ac_res" >&6; }
18952 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18953 cat >>confdefs.h <<_ACEOF
18954 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18957 eval ac_cv_have_decl_$gl_func=yes
18967 cat >>confdefs.h <<_ACEOF
18968 #define GNULIB_FCNTL_SAFER 1
18977 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18978 #include <dirent.h>
18981 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18987 cat >>confdefs.h <<_ACEOF
18988 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18990 if test $ac_have_decl = 1; then :
18993 HAVE_DECL_FDOPENDIR=0
18997 if test $ac_cv_func_fdopendir = no; then
19000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19001 $as_echo_n "checking whether fdopendir works... " >&6; }
19002 if ${gl_cv_func_fdopendir_works+:} false; then :
19003 $as_echo_n "(cached) " >&6
19005 if test "$cross_compiling" = yes; then :
19007 # Guess yes on glibc systems.
19008 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19009 # If we don't know, assume the worst.
19010 *) gl_cv_func_fdopendir_works="guessing no" ;;
19014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19015 /* end confdefs.h. */
19017 #include <dirent.h>
19019 #include <unistd.h>
19020 #if !HAVE_DECL_FDOPENDIR
19022 # ifdef __cplusplus
19025 DIR *fdopendir (int);
19032 int fd = open ("conftest.c", O_RDONLY);
19033 if (fd < 0) result |= 1;
19034 if (fdopendir (fd)) result |= 2;
19035 if (close (fd)) result |= 4;
19041 if ac_fn_c_try_run "$LINENO"; then :
19042 gl_cv_func_fdopendir_works=yes
19044 gl_cv_func_fdopendir_works=no
19046 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19047 conftest.$ac_objext conftest.beam conftest.$ac_ext
19051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19052 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19053 case "$gl_cv_func_fdopendir_works" in
19056 REPLACE_FDOPENDIR=1
19061 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19070 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19084 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19090 cat >>confdefs.h <<_ACEOF
19091 #define GNULIB_FDOPENDIR 1
19099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19100 $as_echo_n "checking whether fflush works on input streams... " >&6; }
19101 if ${gl_cv_func_fflush_stdin+:} false; then :
19102 $as_echo_n "(cached) " >&6
19104 echo hello world > conftest.txt
19105 if test "$cross_compiling" = yes; then :
19106 gl_cv_func_fflush_stdin=no
19108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19109 /* end confdefs.h. */
19113 # include <unistd.h>
19114 #else /* on Windows with MSVC */
19121 FILE *f = fopen ("conftest.txt", "r");
19128 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19130 /* For deterministic results, ensure f read a bigger buffer. */
19131 if (lseek (fd, 0, SEEK_CUR) == 5)
19133 /* POSIX requires fflush-fseek to set file offset of fd. This fails
19134 on BSD systems and on mingw. */
19135 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19137 if (lseek (fd, 0, SEEK_CUR) != 5)
19139 /* Verify behaviour of fflush after ungetc. See
19140 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
19141 /* Verify behaviour of fflush after a backup ungetc. This fails on
19146 if (fgetc (f) != c)
19148 /* Verify behaviour of fflush after a non-backup ungetc. This fails
19149 on glibc 2.8 and on BSD systems. */
19153 if (fgetc (f) != c)
19161 if ac_fn_c_try_run "$LINENO"; then :
19162 gl_cv_func_fflush_stdin=yes
19164 gl_cv_func_fflush_stdin=no
19166 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19167 conftest.$ac_objext conftest.beam conftest.$ac_ext
19173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19174 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
19176 if test $gl_cv_func_fflush_stdin = no; then
19180 if test $REPLACE_FFLUSH = 1; then
19189 gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
19198 cat >>confdefs.h <<_ACEOF
19199 #define GNULIB_FFLUSH 1
19214 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
19225 REPLACE_FLOAT_LDBL=0
19227 aix* | beos* | openbsd* | mirbsd* | irix*)
19231 case "$host_cpu" in
19236 # On x86_64 systems, the C compiler may still be generating
19238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19239 /* end confdefs.h. */
19240 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19245 $EGREP "yes" >/dev/null 2>&1; then :
19256 case "$host_cpu" in
19264 aix* | freebsd* | linux*)
19265 if test -n "$FLOAT_H"; then
19266 REPLACE_FLOAT_LDBL=1
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19273 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
19274 if ${gl_cv_func_itold_works+:} false; then :
19275 $as_echo_n "(cached) " >&6
19278 if test "$cross_compiling" = yes; then :
19281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19282 /* end confdefs.h. */
19283 #if defined __LP64__ || defined __arch64__
19287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19288 $EGREP "yes" >/dev/null 2>&1; then :
19289 gl_cv_func_itold_works="guessing no"
19291 gl_cv_func_itold_works="guessing yes"
19296 *) gl_cv_func_itold_works="guessing yes" ;;
19300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19301 /* end confdefs.h. */
19304 volatile long double ld;
19313 if ac_fn_c_try_run "$LINENO"; then :
19314 gl_cv_func_itold_works=yes
19316 gl_cv_func_itold_works=no
19318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19319 conftest.$ac_objext conftest.beam conftest.$ac_ext
19324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19325 $as_echo "$gl_cv_func_itold_works" >&6; }
19326 case "$gl_cv_func_itold_works" in
19333 if test -n "$FLOAT_H"; then
19342 if test $gl_cv_have_include_next = yes; then
19343 gl_cv_next_float_h='<'float.h'>'
19345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19346 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19347 if ${gl_cv_next_float_h+:} false; then :
19348 $as_echo_n "(cached) " >&6
19351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19352 /* end confdefs.h. */
19357 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19358 *) gl_absname_cpp="$ac_cpp" ;;
19363 gl_dirsep_regex='[/\\]'
19366 gl_dirsep_regex='\/'
19369 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19371 gl_header_literal_regex=`echo 'float.h' \
19372 | sed -e "$gl_make_literal_regex_sed"`
19373 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19374 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19379 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19380 sed -n "$gl_absolute_header_sed"`'"'
19384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19385 $as_echo "$gl_cv_next_float_h" >&6; }
19387 NEXT_FLOAT_H=$gl_cv_next_float_h
19389 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19390 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19391 gl_next_as_first_directive='<'float.h'>'
19393 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19394 gl_next_as_first_directive=$gl_cv_next_float_h
19396 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19403 if test -n "$FLOAT_H"; then
19404 GL_GENERATE_FLOAT_H_TRUE=
19405 GL_GENERATE_FLOAT_H_FALSE='#'
19407 GL_GENERATE_FLOAT_H_TRUE='#'
19408 GL_GENERATE_FLOAT_H_FALSE=
19413 if test $REPLACE_FLOAT_LDBL = 1; then
19422 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19425 if test $REPLACE_ITOLD = 1; then
19434 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19441 # include <stdio.h>
19442 # if HAVE_STDIO_EXT_H
19443 # include <stdio_ext.h>
19446 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19448 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19454 cat >>confdefs.h <<_ACEOF
19455 #define HAVE_DECL___FPENDING $ac_have_decl
19459 if test $ac_cv_func___fpending = no; then
19468 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19472 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
19473 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19474 $as_echo_n "(cached) " >&6
19480 'fp->_IO_write_ptr - fp->_IO_write_base' \
19482 '# traditional Unix' \
19483 'fp->_ptr - fp->_base' \
19486 'fp->_p - fp->_bf._base' \
19488 '# SCO, Unixware' \
19489 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
19492 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19495 'fp->__bufp - fp->__buffer' \
19497 '# old glibc iostream?' \
19498 'fp->_pptr - fp->_pbase' \
19501 'fp->_ptr - fp->_buffer' \
19504 'fp->_ptr - fp->_buf' \
19507 'fp->wp - fp->buf' \
19510 '(*fp)->_ptr - (*fp)->_base' \
19512 '# e.g., DGUX R4.11; the info is not available' \
19516 # Skip each embedded comment.
19517 case "$ac_expr" in '#'*) continue;; esac
19519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19520 /* end confdefs.h. */
19525 FILE *fp = stdin; (void) ($ac_expr);
19530 if ac_fn_c_try_compile "$LINENO"; then :
19534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19535 test "$fp_done" = yes && break
19538 ac_cv_sys_pending_output_n_bytes=$ac_expr
19542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19543 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
19545 cat >>confdefs.h <<_ACEOF
19546 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19566 gl_cv_func_fprintf_posix=no
19567 case "$gl_cv_func_printf_sizes_c99" in
19569 case "$gl_cv_func_printf_long_double" in
19571 case "$gl_cv_func_printf_infinite" in
19573 case "$gl_cv_func_printf_infinite_long_double" in
19575 case "$gl_cv_func_printf_directive_a" in
19577 case "$gl_cv_func_printf_directive_f" in
19579 case "$gl_cv_func_printf_directive_n" in
19581 case "$gl_cv_func_printf_directive_ls" in
19583 case "$gl_cv_func_printf_positions" in
19585 case "$gl_cv_func_printf_flag_grouping" in
19587 case "$gl_cv_func_printf_flag_leftadjust" in
19589 case "$gl_cv_func_printf_flag_zero" in
19591 case "$gl_cv_func_printf_precision" in
19593 case "$gl_cv_func_printf_enomem" in
19595 # fprintf exists and is
19596 # already POSIX compliant.
19597 gl_cv_func_fprintf_posix=yes
19626 if test $gl_cv_func_fprintf_posix = no; then
19630 case "$gl_cv_func_printf_infinite" in
19635 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
19643 case "$gl_cv_func_printf_long_double" in
19645 case "$gl_cv_func_printf_infinite_long_double" in
19650 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
19659 case "$gl_cv_func_printf_directive_a" in
19664 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
19666 for ac_func in nl_langinfo
19668 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
19669 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
19670 cat >>confdefs.h <<_ACEOF
19671 #define HAVE_NL_LANGINFO 1
19682 case "$gl_cv_func_printf_directive_f" in
19687 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
19694 case "$gl_cv_func_printf_directive_ls" in
19699 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
19706 case "$gl_cv_func_printf_flag_grouping" in
19711 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
19718 case "$gl_cv_func_printf_flag_leftadjust" in
19723 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
19730 case "$gl_cv_func_printf_flag_zero" in
19735 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
19742 case "$gl_cv_func_printf_precision" in
19747 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
19750 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
19753 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19760 case "$gl_cv_func_printf_enomem" in
19765 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
19768 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
19771 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19786 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
19796 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
19806 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
19816 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
19818 if test $ac_cv_func_vasnprintf = yes; then
19820 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
19834 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
19835 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
19839 $as_echo "#define ptrdiff_t long" >>confdefs.h
19860 gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
19864 $as_echo "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
19875 GNULIB_FPRINTF_POSIX=1
19881 $as_echo "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
19889 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
19891 if test "x$ac_cv_have_decl_fpurge" = xyes; then :
19897 cat >>confdefs.h <<_ACEOF
19898 #define HAVE_DECL_FPURGE $ac_have_decl
19901 if test "x$ac_cv_func_fpurge" = xyes; then
19903 # Detect BSD bug. Only cygwin 1.7 is known to be immune.
19904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
19905 $as_echo_n "checking whether fpurge works... " >&6; }
19906 if ${gl_cv_func_fpurge_works+:} false; then :
19907 $as_echo_n "(cached) " >&6
19909 if test "$cross_compiling" = yes; then :
19910 gl_cv_func_fpurge_works='guessing no'
19912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19913 /* end confdefs.h. */
19919 FILE *f = fopen ("conftest.txt", "w+");
19921 if (fputc ('a', f) != 'a') return 2;
19923 if (fgetc (f) != 'a') return 3;
19924 if (fgetc (f) != EOF) return 4;
19925 if (fpurge (f) != 0) return 5;
19926 if (putc ('b', f) != 'b') return 6;
19927 if (fclose (f) != 0) return 7;
19928 if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
19929 if (fgetc (f) != 'a') return 9;
19930 if (fgetc (f) != 'b') return 10;
19931 if (fgetc (f) != EOF) return 11;
19932 if (fclose (f) != 0) return 12;
19933 if (remove ("conftest.txt") != 0) return 13;
19939 if ac_fn_c_try_run "$LINENO"; then :
19940 gl_cv_func_fpurge_works=yes
19942 gl_cv_func_fpurge_works=no
19944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19945 conftest.$ac_objext conftest.beam conftest.$ac_ext
19949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
19950 $as_echo "$gl_cv_func_fpurge_works" >&6; }
19951 if test "x$gl_cv_func_fpurge_works" != xyes; then
19957 if test "x$ac_cv_have_decl_fpurge" = xno; then
19961 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
19970 gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
19984 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
19994 if test $gl_cv_func_frexp_no_libm = yes; then
19998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
19999 $as_echo_n "checking whether frexp works... " >&6; }
20000 if ${gl_cv_func_frexp_works+:} false; then :
20001 $as_echo_n "(cached) " >&6
20004 if test "$cross_compiling" = yes; then :
20006 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
20007 *) gl_cv_func_frexp_works="guessing yes";;
20011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20012 /* end confdefs.h. */
20016 #include <string.h>
20018 # include <unistd.h>
20020 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
20021 ICC 10.0 has a bug when optimizing the expression -zero.
20022 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
20023 to PowerPC on MacOS X 10.5. */
20024 #if defined __hpux || defined __sgi || defined __ICC
20026 compute_minus_zero (void)
20028 return -DBL_MIN * DBL_MIN;
20030 # define minus_zero compute_minus_zero ()
20032 double minus_zero = -0.0;
20041 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
20042 number. Let the test fail in this case. */
20045 /* Test on denormalized numbers. */
20046 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
20051 double y = frexp (x, &exp);
20052 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
20053 On NetBSD: y = 0.75. Correct: y = 0.5. */
20057 /* Test on infinite numbers. */
20061 double y = frexp (x, &exp);
20065 /* Test on negative zero. */
20069 double y = frexp (x, &exp);
20070 if (memcmp (&y, &x, sizeof x))
20076 if ac_fn_c_try_run "$LINENO"; then :
20077 gl_cv_func_frexp_works=yes
20079 gl_cv_func_frexp_works=no
20081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20082 conftest.$ac_objext conftest.beam conftest.$ac_ext
20087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
20088 $as_echo "$gl_cv_func_frexp_works" >&6; }
20090 case "$gl_cv_func_frexp_works" in
20091 *yes) gl_func_frexp_no_libm=yes ;;
20092 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
20095 gl_func_frexp_no_libm=no
20098 if test $gl_func_frexp_no_libm = yes; then
20100 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
20104 if test $gl_func_frexp_no_libm != yes; then
20113 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20127 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20134 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
20136 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
20142 if test $HAVE_DECL_FREXPL = 1; then
20144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
20145 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
20146 if ${gl_cv_func_frexpl_no_libm+:} false; then :
20147 $as_echo_n "(cached) " >&6
20150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20151 /* end confdefs.h. */
20157 int e; return frexpl (x, &e) > 0;
20162 if ac_fn_c_try_link "$LINENO"; then :
20163 gl_cv_func_frexpl_no_libm=yes
20165 gl_cv_func_frexpl_no_libm=no
20167 rm -f core conftest.err conftest.$ac_objext \
20168 conftest$ac_exeext conftest.$ac_ext
20171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
20172 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
20174 if test $gl_cv_func_frexpl_no_libm = yes; then
20177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
20178 $as_echo_n "checking whether frexpl works... " >&6; }
20179 if ${gl_cv_func_frexpl_works+:} false; then :
20180 $as_echo_n "(cached) " >&6
20183 if test "$cross_compiling" = yes; then :
20186 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
20187 gl_cv_func_frexpl_works="guessing no";;
20188 *) gl_cv_func_frexpl_works="guessing yes";;
20192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20193 /* end confdefs.h. */
20197 /* Override the values of <float.h>, like done in float.in.h. */
20198 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
20199 # undef LDBL_MIN_EXP
20200 # define LDBL_MIN_EXP (-16381)
20202 #if defined __i386__ && defined __FreeBSD__
20203 # undef LDBL_MIN_EXP
20204 # define LDBL_MIN_EXP (-16381)
20206 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
20207 # undef LDBL_MIN_EXP
20208 # define LDBL_MIN_EXP DBL_MIN_EXP
20210 #if defined __sgi && (LDBL_MANT_DIG >= 106)
20211 # if defined __GNUC__
20212 # undef LDBL_MIN_EXP
20213 # define LDBL_MIN_EXP DBL_MIN_EXP
20220 long double frexpl (long double, int *);
20224 volatile long double x;
20225 /* Test on finite numbers that fails on AIX 5.1. */
20233 /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
20234 function returns an invalid (incorrectly normalized) value: it returns
20235 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
20236 but the correct result is
20237 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
20241 long double y = frexpl (x, &exp);
20242 if (!(exp == 1 && y == 0.505L))
20245 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
20246 LDBL_MAX_EXP = 16384.
20247 In the loop end test, we test x against Infinity, rather than comparing
20248 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
20251 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
20262 /* Test on denormalized numbers. */
20265 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
20270 long double y = frexpl (x, &exp);
20271 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
20272 exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
20273 if (exp != LDBL_MIN_EXP - 1)
20277 /* Test on infinite numbers. */
20281 long double y = frexpl (x, &exp);
20288 if ac_fn_c_try_run "$LINENO"; then :
20289 gl_cv_func_frexpl_works=yes
20291 gl_cv_func_frexpl_works=no
20293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20294 conftest.$ac_objext conftest.beam conftest.$ac_ext
20299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
20300 $as_echo "$gl_cv_func_frexpl_works" >&6; }
20302 case "$gl_cv_func_frexpl_works" in
20303 *yes) gl_func_frexpl_no_libm=yes ;;
20304 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
20307 gl_func_frexpl_no_libm=no
20310 if test $gl_func_frexpl_no_libm = yes; then
20312 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
20317 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
20326 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20340 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20347 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20351 if test $REPLACE_FSEEK = 1; then
20360 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
20374 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
20386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
20387 $as_echo_n "checking for fseeko... " >&6; }
20388 if ${gl_cv_func_fseeko+:} false; then :
20389 $as_echo_n "(cached) " >&6
20392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20393 /* end confdefs.h. */
20399 fseeko (stdin, 0, 0);
20404 if ac_fn_c_try_link "$LINENO"; then :
20405 gl_cv_func_fseeko=yes
20407 gl_cv_func_fseeko=no
20409 rm -f core conftest.err conftest.$ac_objext \
20410 conftest$ac_exeext conftest.$ac_ext
20413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
20414 $as_echo "$gl_cv_func_fseeko" >&6; }
20417 if test $ac_cv_have_decl_fseeko = no; then
20421 if test $gl_cv_func_fseeko = no; then
20424 if test $WINDOWS_64_BIT_OFF_T = 1; then
20427 if test $gl_cv_var_stdin_large_offset = no; then
20433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20434 $as_echo_n "checking whether fflush works on input streams... " >&6; }
20435 if ${gl_cv_func_fflush_stdin+:} false; then :
20436 $as_echo_n "(cached) " >&6
20438 echo hello world > conftest.txt
20439 if test "$cross_compiling" = yes; then :
20440 gl_cv_func_fflush_stdin=no
20442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20443 /* end confdefs.h. */
20447 # include <unistd.h>
20448 #else /* on Windows with MSVC */
20455 FILE *f = fopen ("conftest.txt", "r");
20462 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20464 /* For deterministic results, ensure f read a bigger buffer. */
20465 if (lseek (fd, 0, SEEK_CUR) == 5)
20467 /* POSIX requires fflush-fseek to set file offset of fd. This fails
20468 on BSD systems and on mingw. */
20469 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20471 if (lseek (fd, 0, SEEK_CUR) != 5)
20473 /* Verify behaviour of fflush after ungetc. See
20474 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
20475 /* Verify behaviour of fflush after a backup ungetc. This fails on
20480 if (fgetc (f) != c)
20482 /* Verify behaviour of fflush after a non-backup ungetc. This fails
20483 on glibc 2.8 and on BSD systems. */
20487 if (fgetc (f) != c)
20495 if ac_fn_c_try_run "$LINENO"; then :
20496 gl_cv_func_fflush_stdin=yes
20498 gl_cv_func_fflush_stdin=no
20500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20501 conftest.$ac_objext conftest.beam conftest.$ac_ext
20507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20508 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
20510 if test $gl_cv_func_fflush_stdin = no; then
20516 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20525 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
20528 for ac_func in _fseeki64
20530 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
20531 if test "x$ac_cv_func__fseeki64" = xyes; then :
20532 cat >>confdefs.h <<_ACEOF
20533 #define HAVE__FSEEKI64 1
20552 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
20560 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20565 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
20573 if test $ac_cv_func_fchdir = no; then
20577 if test $HAVE_FCHDIR = 0; then
20578 case "$gl_cv_func_open_directory_works" in
20587 if test $REPLACE_FSTAT = 1; then
20596 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20613 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20620 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
20624 if test $REPLACE_FTELL = 1; then
20633 gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
20647 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
20660 if test $ac_cv_have_decl_ftello = no; then
20664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
20665 $as_echo_n "checking for ftello... " >&6; }
20666 if ${gl_cv_func_ftello+:} false; then :
20667 $as_echo_n "(cached) " >&6
20670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20671 /* end confdefs.h. */
20681 if ac_fn_c_try_link "$LINENO"; then :
20682 gl_cv_func_ftello=yes
20684 gl_cv_func_ftello=no
20686 rm -f core conftest.err conftest.$ac_objext \
20687 conftest$ac_exeext conftest.$ac_ext
20690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
20691 $as_echo "$gl_cv_func_ftello" >&6; }
20692 if test $gl_cv_func_ftello = no; then
20695 if test $WINDOWS_64_BIT_OFF_T = 1; then
20698 if test $gl_cv_var_stdin_large_offset = no; then
20701 if test $REPLACE_FTELLO = 0; then
20703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
20704 $as_echo_n "checking whether ftello works... " >&6; }
20705 if ${gl_cv_func_ftello_works+:} false; then :
20706 $as_echo_n "(cached) " >&6
20710 # Guess no on Solaris.
20711 solaris*) gl_cv_func_ftello_works="guessing no" ;;
20712 # Guess yes otherwise.
20713 *) gl_cv_func_ftello_works="guessing yes" ;;
20715 if test "$cross_compiling" = yes; then :
20718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20719 /* end confdefs.h. */
20722 #include <stdlib.h>
20723 #include <string.h>
20724 #define TESTFILE "conftest.tmp"
20730 /* Create a file with some contents. */
20731 fp = fopen (TESTFILE, "w");
20734 if (fwrite ("foogarsh", 1, 8, fp) < 8)
20739 /* The file's contents is now "foogarsh". */
20741 /* Try writing after reading to EOF. */
20742 fp = fopen (TESTFILE, "r+");
20745 if (fseek (fp, -1, SEEK_END))
20747 if (!(getc (fp) == 'h'))
20749 if (!(getc (fp) == EOF))
20751 if (!(ftell (fp) == 8))
20753 if (!(ftell (fp) == 8))
20755 if (!(putc ('!', fp) == '!'))
20757 if (!(ftell (fp) == 9))
20759 if (!(fclose (fp) == 0))
20761 fp = fopen (TESTFILE, "r");
20766 if (!(fread (buf, 1, 10, fp) == 9))
20768 if (!(memcmp (buf, "foogarsh!", 9) == 0))
20771 if (!(fclose (fp) == 0))
20774 /* The file's contents is now "foogarsh!". */
20779 if ac_fn_c_try_run "$LINENO"; then :
20780 gl_cv_func_ftello_works=yes
20782 gl_cv_func_ftello_works=no
20784 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20785 conftest.$ac_objext conftest.beam conftest.$ac_ext
20790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
20791 $as_echo "$gl_cv_func_ftello_works" >&6; }
20792 case "$gl_cv_func_ftello_works" in
20797 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
20804 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
20813 gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
20816 for ac_func in _ftelli64
20818 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
20819 if test "x$ac_cv_func__ftelli64" = xyes; then :
20820 cat >>confdefs.h <<_ACEOF
20821 #define HAVE__FTELLI64 1
20840 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
20849 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20856 if test $REPLACE_GETCWD = 1; then
20865 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20879 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20886 if test $ac_cv_func_getdtablesize != yes; then
20887 HAVE_GETDTABLESIZE=0
20890 if test $HAVE_GETDTABLESIZE = 0; then
20899 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20910 GNULIB_GETDTABLESIZE=1
20916 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20925 if test $REPLACE_GETOPT = 1; then
20934 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20944 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20949 GNULIB_GL_UNISTD_H_GETOPT=1
20954 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
20964 if test -n "$gl_replace_getopt"; then :
20971 if test $REPLACE_GETOPT = 1; then
20975 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
20981 if test $REPLACE_GETOPT = 1; then
20990 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21000 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21005 GNULIB_GL_UNISTD_H_GETOPT=1
21021 gl_gettimeofday_timezone=void
21022 if test $ac_cv_func_gettimeofday != yes; then
21023 HAVE_GETTIMEOFDAY=0
21028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21029 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21030 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
21031 $as_echo_n "(cached) " >&6
21033 if test "$cross_compiling" = yes; then :
21034 # When cross-compiling:
21036 # Guess all is fine on glibc systems.
21037 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21038 # If we don't know, assume the worst.
21039 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21044 /* end confdefs.h. */
21045 #include <string.h>
21046 #include <sys/time.h>
21048 #include <stdlib.h>
21056 struct tm saved_lt;
21058 lt = localtime (&t);
21060 gettimeofday (&tv, NULL);
21061 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21067 if ac_fn_c_try_run "$LINENO"; then :
21068 gl_cv_func_gettimeofday_clobber=no
21070 gl_cv_func_gettimeofday_clobber=yes
21072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21073 conftest.$ac_objext conftest.beam conftest.$ac_ext
21077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21078 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
21080 case "$gl_cv_func_gettimeofday_clobber" in
21082 REPLACE_GETTIMEOFDAY=1
21085 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
21088 $as_echo "#define localtime rpl_localtime" >>confdefs.h
21092 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21098 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21099 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
21100 $as_echo_n "(cached) " >&6
21102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21103 /* end confdefs.h. */
21104 #include <sys/time.h>
21106 int gettimeofday (struct timeval *restrict, void *restrict);
21111 /* glibc uses struct timezone * rather than the POSIX void *
21112 if _GNU_SOURCE is defined. However, since the only portable
21113 use of gettimeofday uses NULL as the second parameter, and
21114 since the glibc definition is actually more typesafe, it is
21115 not worth wrapping this to get a compliant signature. */
21116 int (*f) (struct timeval *restrict, void *restrict)
21119 return !(x | c.tv_sec | c.tv_usec);
21125 if ac_fn_c_try_compile "$LINENO"; then :
21126 gl_cv_func_gettimeofday_posix_signature=yes
21128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21129 /* end confdefs.h. */
21130 #include <sys/time.h>
21131 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21141 if ac_fn_c_try_compile "$LINENO"; then :
21142 gl_cv_func_gettimeofday_posix_signature=almost
21144 gl_cv_func_gettimeofday_posix_signature=no
21146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21151 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21152 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21153 gl_gettimeofday_timezone='struct timezone'
21154 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21155 REPLACE_GETTIMEOFDAY=1
21157 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21158 REPLACE_GETTIMEOFDAY=1
21163 cat >>confdefs.h <<_ACEOF
21164 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21168 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21177 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21180 for ac_header in sys/timeb.h
21182 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21183 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
21184 cat >>confdefs.h <<_ACEOF
21185 #define HAVE_SYS_TIMEB_H 1
21192 for ac_func in _ftime
21194 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21195 if test "x$ac_cv_func__ftime" = xyes; then :
21196 cat >>confdefs.h <<_ACEOF
21197 #define HAVE__FTIME 1
21210 GNULIB_GETTIMEOFDAY=1
21216 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21221 if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
21230 # Autoconf 2.61a.99 and earlier don't support linking a file only
21231 # in VPATH builds. But since GNUmakefile is for maintainer use
21232 # only, it does not matter if we skip the link with older autoconf.
21233 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21234 # builds, so use a shell variable to bypass this.
21235 GNUmakefile=GNUmakefile
21236 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
21241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
21242 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
21243 if ${gl_cv_c_inline_effective+:} false; then :
21244 $as_echo_n "(cached) " >&6
21246 if test $ac_cv_c_inline = no; then
21247 gl_cv_c_inline_effective=no
21249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21250 /* end confdefs.h. */
21255 #ifdef __NO_INLINE__
21256 #error "inline is not effective"
21262 if ac_fn_c_try_compile "$LINENO"; then :
21263 gl_cv_c_inline_effective=yes
21265 gl_cv_c_inline_effective=no
21267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
21272 $as_echo "$gl_cv_c_inline_effective" >&6; }
21273 if test $gl_cv_c_inline_effective = yes; then
21275 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
21281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21282 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
21283 if ${gl_cv_func_isnand_no_libm+:} false; then :
21284 $as_echo_n "(cached) " >&6
21287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21288 /* end confdefs.h. */
21292 # define isnand(x) __builtin_isnan ((double)(x))
21295 # define isnand(x) isnan ((double)(x))
21306 if ac_fn_c_try_link "$LINENO"; then :
21307 gl_cv_func_isnand_no_libm=yes
21309 gl_cv_func_isnand_no_libm=no
21311 rm -f core conftest.err conftest.$ac_objext \
21312 conftest$ac_exeext conftest.$ac_ext
21315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21316 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21318 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21319 if test $gl_cv_func_isnand_no_libm = yes; then
21321 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21325 if test $gl_func_isnand_no_libm != yes; then
21334 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
21343 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
21344 if ${gl_cv_func_isnanf_no_libm+:} false; then :
21345 $as_echo_n "(cached) " >&6
21348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21349 /* end confdefs.h. */
21353 # define isnanf(x) __builtin_isnanf ((float)(x))
21354 #elif defined isnan
21356 # define isnanf(x) isnan ((float)(x))
21367 if ac_fn_c_try_link "$LINENO"; then :
21368 gl_cv_func_isnanf_no_libm=yes
21370 gl_cv_func_isnanf_no_libm=no
21372 rm -f core conftest.err conftest.$ac_objext \
21373 conftest$ac_exeext conftest.$ac_ext
21376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
21377 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
21379 if test $gl_cv_func_isnanf_no_libm = yes; then
21383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
21384 $as_echo_n "checking whether isnan(float) works... " >&6; }
21385 if ${gl_cv_func_isnanf_works+:} false; then :
21386 $as_echo_n "(cached) " >&6
21389 if test "$cross_compiling" = yes; then :
21391 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
21392 *) gl_cv_func_isnanf_works="guessing yes";;
21396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21397 /* end confdefs.h. */
21402 # define isnanf(x) __builtin_isnanf ((float)(x))
21403 #elif defined isnan
21405 # define isnanf(x) isnan ((float)(x))
21407 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
21412 static float zero = 0.0f;
21413 return zero / zero;
21416 # define NaN() (0.0f / 0.0f)
21419 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21420 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
21425 if (isnanf (1.0f / 0.0f))
21428 if (!isnanf (NaN ()))
21431 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
21432 /* The isnanf function should be immune against changes in the sign bit and
21433 in the mantissa bits. The xor operation twiddles a bit that can only be
21434 a sign bit or a mantissa bit. */
21435 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
21440 /* Set the bits below the exponent to 01111...111. */
21441 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
21442 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
21443 if (!isnanf (m.value))
21451 if ac_fn_c_try_run "$LINENO"; then :
21452 gl_cv_func_isnanf_works=yes
21454 gl_cv_func_isnanf_works=no
21456 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21457 conftest.$ac_objext conftest.beam conftest.$ac_ext
21462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
21463 $as_echo "$gl_cv_func_isnanf_works" >&6; }
21466 if test $gl_cv_func_isnanf_no_libm = yes \
21467 && { case "$gl_cv_func_isnanf_works" in
21472 gl_func_isnanf_no_libm=yes
21474 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
21477 gl_func_isnanf_no_libm=no
21480 if test $gl_func_isnanf_no_libm != yes; then
21489 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
21493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
21494 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
21495 if ${gl_cv_cc_float_expbit0+:} false; then :
21496 $as_echo_n "(cached) " >&6
21499 if test "$cross_compiling" = yes; then :
21500 gl_cv_cc_float_expbit0="word 0 bit 23"
21502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21503 /* end confdefs.h. */
21506 #include <stddef.h>
21508 #include <string.h>
21510 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21511 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
21512 static unsigned int ored_words[NWORDS];
21513 static unsigned int anded_words[NWORDS];
21514 static void add_to_ored_words (float x)
21518 /* Clear it first, in case
21519 sizeof (float) < sizeof (memory_float). */
21520 memset (&m, 0, sizeof (memory_float));
21522 for (i = 0; i < NWORDS; i++)
21524 ored_words[i] |= m.word[i];
21525 anded_words[i] &= m.word[i];
21531 FILE *fp = fopen ("conftest.out", "w");
21534 for (j = 0; j < NWORDS; j++)
21535 anded_words[j] = ~ (unsigned int) 0;
21536 add_to_ored_words (0.25f);
21537 add_to_ored_words (0.5f);
21538 add_to_ored_words (1.0f);
21539 add_to_ored_words (2.0f);
21540 add_to_ored_words (4.0f);
21541 /* Remove bits that are common (e.g. if representation of the first mantissa
21542 bit is explicit). */
21543 for (j = 0; j < NWORDS; j++)
21544 ored_words[j] &= ~anded_words[j];
21545 /* Now find the nonzero word. */
21546 for (j = 0; j < NWORDS; j++)
21547 if (ored_words[j] != 0)
21552 for (i = j + 1; i < NWORDS; i++)
21553 if (ored_words[i] != 0)
21555 fprintf (fp, "unknown");
21556 return (fclose (fp) != 0);
21559 if ((ored_words[j] >> i) & 1)
21561 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21562 return (fclose (fp) != 0);
21565 fprintf (fp, "unknown");
21566 return (fclose (fp) != 0);
21570 if ac_fn_c_try_run "$LINENO"; then :
21571 gl_cv_cc_float_expbit0=`cat conftest.out`
21573 gl_cv_cc_float_expbit0="unknown"
21575 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21576 conftest.$ac_objext conftest.beam conftest.$ac_ext
21582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
21583 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
21584 case "$gl_cv_cc_float_expbit0" in
21586 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21587 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
21589 cat >>confdefs.h <<_ACEOF
21590 #define FLT_EXPBIT0_WORD $word
21594 cat >>confdefs.h <<_ACEOF
21595 #define FLT_EXPBIT0_BIT $bit
21605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21606 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21607 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21608 $as_echo_n "(cached) " >&6
21611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21612 /* end confdefs.h. */
21616 # define isnanl(x) __builtin_isnanl ((long double)(x))
21617 #elif defined isnan
21619 # define isnanl(x) isnan ((long double)(x))
21630 if ac_fn_c_try_link "$LINENO"; then :
21631 gl_cv_func_isnanl_no_libm=yes
21633 gl_cv_func_isnanl_no_libm=no
21635 rm -f core conftest.err conftest.$ac_objext \
21636 conftest$ac_exeext conftest.$ac_ext
21639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21640 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
21642 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21643 if test $gl_func_isnanl_no_libm = yes; then
21648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21649 $as_echo_n "checking whether isnanl works... " >&6; }
21650 if ${gl_cv_func_isnanl_works+:} false; then :
21651 $as_echo_n "(cached) " >&6
21654 if test "$cross_compiling" = yes; then :
21655 case "$host_cpu" in
21656 # Guess no on ia64, x86_64, i386.
21657 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
21660 netbsd*) gl_cv_func_isnanl_works="guessing no";;
21661 *) gl_cv_func_isnanl_works="guessing yes";;
21667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21668 /* end confdefs.h. */
21671 #include <limits.h>
21675 # define isnanl(x) __builtin_isnanl ((long double)(x))
21676 #elif defined isnan
21678 # define isnanl(x) isnan ((long double)(x))
21681 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21682 typedef union { unsigned int word[NWORDS]; long double value; }
21683 memory_long_double;
21684 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21685 runtime type conversion. */
21687 static long double NaNl ()
21690 return zero / zero;
21693 # define NaNl() (0.0L / 0.0L)
21699 if (!isnanl (NaNl ()))
21703 memory_long_double m;
21706 /* The isnanl function should be immune against changes in the sign bit and
21707 in the mantissa bits. The xor operation twiddles a bit that can only be
21708 a sign bit or a mantissa bit (since the exponent never extends to
21711 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21712 for (i = 0; i < NWORDS; i++)
21714 if (!isnanl (m.value))
21718 #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
21719 /* Representation of an 80-bit 'long double' as an initializer for a sequence
21720 of 'unsigned int' words. */
21721 # ifdef WORDS_BIGENDIAN
21722 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21723 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
21724 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
21725 (unsigned int) (mantlo) << 16 \
21728 # define LDBL80_WORDS(exponent,manthi,mantlo) \
21729 { mantlo, manthi, exponent }
21732 static memory_long_double x =
21733 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21734 if (!isnanl (x.value))
21738 /* Signalling NaN. */
21739 static memory_long_double x =
21740 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21741 if (!isnanl (x.value))
21744 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
21745 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
21746 Intel IA-64 Architecture Software Developer's Manual, Volume 1:
21747 Application Architecture.
21748 Table 5-2 "Floating-Point Register Encodings"
21749 Figure 5-6 "Memory to Floating-Point Register Data Translation"
21751 { /* Pseudo-NaN. */
21752 static memory_long_double x =
21753 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
21754 if (!isnanl (x.value))
21757 { /* Pseudo-Infinity. */
21758 static memory_long_double x =
21759 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
21760 if (!isnanl (x.value))
21763 { /* Pseudo-Zero. */
21764 static memory_long_double x =
21765 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
21766 if (!isnanl (x.value))
21769 { /* Unnormalized number. */
21770 static memory_long_double x =
21771 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
21772 if (!isnanl (x.value))
21775 { /* Pseudo-Denormal. */
21776 static memory_long_double x =
21777 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
21778 if (!isnanl (x.value))
21786 if ac_fn_c_try_run "$LINENO"; then :
21787 gl_cv_func_isnanl_works=yes
21789 gl_cv_func_isnanl_works=no
21791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21792 conftest.$ac_objext conftest.beam conftest.$ac_ext
21797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21798 $as_echo "$gl_cv_func_isnanl_works" >&6; }
21800 case "$gl_cv_func_isnanl_works" in
21802 *) gl_func_isnanl_no_libm=no ;;
21805 if test $gl_func_isnanl_no_libm = yes; then
21807 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21811 if test $gl_func_isnanl_no_libm != yes; then
21820 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
21826 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
21827 if ${gl_cv_cc_long_double_expbit0+:} false; then :
21828 $as_echo_n "(cached) " >&6
21831 if test "$cross_compiling" = yes; then :
21833 gl_cv_cc_long_double_expbit0="unknown"
21836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21837 /* end confdefs.h. */
21840 #include <stddef.h>
21842 #include <string.h>
21844 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21845 typedef union { long double value; unsigned int word[NWORDS]; }
21846 memory_long_double;
21847 static unsigned int ored_words[NWORDS];
21848 static unsigned int anded_words[NWORDS];
21849 static void add_to_ored_words (long double x)
21851 memory_long_double m;
21853 /* Clear it first, in case
21854 sizeof (long double) < sizeof (memory_long_double). */
21855 memset (&m, 0, sizeof (memory_long_double));
21857 for (i = 0; i < NWORDS; i++)
21859 ored_words[i] |= m.word[i];
21860 anded_words[i] &= m.word[i];
21866 FILE *fp = fopen ("conftest.out", "w");
21869 for (j = 0; j < NWORDS; j++)
21870 anded_words[j] = ~ (unsigned int) 0;
21871 add_to_ored_words (0.25L);
21872 add_to_ored_words (0.5L);
21873 add_to_ored_words (1.0L);
21874 add_to_ored_words (2.0L);
21875 add_to_ored_words (4.0L);
21876 /* Remove bits that are common (e.g. if representation of the first mantissa
21877 bit is explicit). */
21878 for (j = 0; j < NWORDS; j++)
21879 ored_words[j] &= ~anded_words[j];
21880 /* Now find the nonzero word. */
21881 for (j = 0; j < NWORDS; j++)
21882 if (ored_words[j] != 0)
21887 for (i = j + 1; i < NWORDS; i++)
21888 if (ored_words[i] != 0)
21890 fprintf (fp, "unknown");
21891 return (fclose (fp) != 0);
21894 if ((ored_words[j] >> i) & 1)
21896 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21897 return (fclose (fp) != 0);
21900 fprintf (fp, "unknown");
21901 return (fclose (fp) != 0);
21905 if ac_fn_c_try_run "$LINENO"; then :
21906 gl_cv_cc_long_double_expbit0=`cat conftest.out`
21908 gl_cv_cc_long_double_expbit0="unknown"
21910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21911 conftest.$ac_objext conftest.beam conftest.$ac_ext
21917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21918 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
21919 case "$gl_cv_cc_long_double_expbit0" in
21921 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21922 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21924 cat >>confdefs.h <<_ACEOF
21925 #define LDBL_EXPBIT0_WORD $word
21929 cat >>confdefs.h <<_ACEOF
21930 #define LDBL_EXPBIT0_BIT $bit
21941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
21942 $as_echo_n "checking for C compiler flag to ignore unused libraries... " >&6; }
21943 if ${gl_cv_prog_c_ignore_unused_libraries+:} false; then :
21944 $as_echo_n "(cached) " >&6
21946 gl_cv_prog_c_ignore_unused_libraries=none
21947 gl_saved_ldflags=$LDFLAGS
21948 gl_saved_libs=$LIBS
21949 # Link with -lm to detect binutils 2.16 bug with --as-needed; see
21950 # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
21952 # Use long option sequences like '-z ignore' to test for the feature,
21953 # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
21954 # GCC + binutils likes '-Wl,--as-needed'.
21955 # GCC + Solaris ld likes '-Wl,-z,ignore'.
21956 # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
21957 # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
21958 # native cc issues annoying warnings and then ignores it,
21959 # which would cause us to incorrectly conclude that it worked.
21960 for gl_flags in '-Wl,--as-needed' \
21965 LDFLAGS="$gl_flags $LDFLAGS"
21966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21967 /* end confdefs.h. */
21977 if ac_fn_c_try_link "$LINENO"; then :
21978 gl_cv_prog_c_ignore_unused_libraries=$gl_flags
21980 rm -f core conftest.err conftest.$ac_objext \
21981 conftest$ac_exeext conftest.$ac_ext
21982 LDFLAGS=$gl_saved_ldflags
21983 test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
21986 LIBS=$gl_saved_libs
21989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
21990 $as_echo "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
21991 IGNORE_UNUSED_LIBRARIES_CFLAGS=
21992 if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
21993 IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
22005 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22009 if test "$gl_threads_api" = posix; then
22010 # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
22011 # pthread_rwlock_* functions.
22012 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
22014 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
22016 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
22020 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
22021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22022 /* end confdefs.h. */
22024 #include <pthread.h>
22029 #if __FreeBSD__ == 4
22030 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
22032 int x = (int)PTHREAD_MUTEX_RECURSIVE;
22040 if ac_fn_c_try_compile "$LINENO"; then :
22042 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
22045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22058 $as_echo_n "checking whether lseek detects pipes... " >&6; }
22059 if ${gl_cv_func_lseek_pipe+:} false; then :
22060 $as_echo_n "(cached) " >&6
22064 gl_cv_func_lseek_pipe=no
22067 if test $cross_compiling = no; then
22068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22069 /* end confdefs.h. */
22071 #include <sys/types.h> /* for off_t */
22072 #include <stdio.h> /* for SEEK_CUR */
22074 # include <unistd.h>
22075 #else /* on Windows with MSVC */
22083 /* Exit with success only if stdin is seekable. */
22084 return lseek (0, (off_t)0, SEEK_CUR) < 0;
22090 if ac_fn_c_try_link "$LINENO"; then :
22091 if test -s conftest$ac_exeext \
22092 && ./conftest$ac_exeext < conftest.$ac_ext \
22093 && test 1 = "`echo hi \
22094 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22095 gl_cv_func_lseek_pipe=yes
22097 gl_cv_func_lseek_pipe=no
22101 gl_cv_func_lseek_pipe=no
22103 rm -f core conftest.err conftest.$ac_objext \
22104 conftest$ac_exeext conftest.$ac_ext
22106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22107 /* end confdefs.h. */
22109 #if defined __BEOS__
22110 /* BeOS mistakenly return 0 when trying to seek on pipes. */
22114 if ac_fn_c_try_compile "$LINENO"; then :
22115 gl_cv_func_lseek_pipe=yes
22117 gl_cv_func_lseek_pipe=no
22119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22126 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
22127 if test $gl_cv_func_lseek_pipe = no; then
22130 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22135 if test $WINDOWS_64_BIT_OFF_T = 1; then
22139 if test $REPLACE_LSEEK = 1; then
22148 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22162 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22169 if test $ac_cv_func_lstat = yes; then
22171 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22180 if test $REPLACE_LSTAT = 1; then
22189 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22207 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22215 for ac_header in stdlib.h
22217 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22218 if test "x$ac_cv_header_stdlib_h" = xyes; then :
22219 cat >>confdefs.h <<_ACEOF
22220 #define HAVE_STDLIB_H 1
22227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22228 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
22229 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
22230 $as_echo_n "(cached) " >&6
22232 if test "$cross_compiling" = yes; then :
22234 # Guess yes on platforms where we know the result.
22235 *-gnu* | freebsd* | netbsd* | openbsd* \
22236 | hpux* | solaris* | cygwin* | mingw*)
22237 ac_cv_func_malloc_0_nonnull=yes ;;
22238 # If we don't know, assume the worst.
22239 *) ac_cv_func_malloc_0_nonnull=no ;;
22243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22244 /* end confdefs.h. */
22245 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22246 # include <stdlib.h>
22254 return ! malloc (0);
22260 if ac_fn_c_try_run "$LINENO"; then :
22261 ac_cv_func_malloc_0_nonnull=yes
22263 ac_cv_func_malloc_0_nonnull=no
22265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22266 conftest.$ac_objext conftest.beam conftest.$ac_ext
22271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22272 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
22273 if test $ac_cv_func_malloc_0_nonnull = yes; then :
22275 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22278 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22285 if test $REPLACE_MALLOC = 1; then
22294 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22299 cat >>confdefs.h <<_ACEOF
22300 #define GNULIB_MALLOC_GNU 1
22307 if test $gl_cv_func_malloc_posix = yes; then
22309 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22315 if test $REPLACE_MALLOC = 1; then
22324 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22332 GNULIB_MALLOC_POSIX=1
22338 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22353 if test $gl_cv_have_include_next = yes; then
22354 gl_cv_next_math_h='<'math.h'>'
22356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
22357 $as_echo_n "checking absolute name of <math.h>... " >&6; }
22358 if ${gl_cv_next_math_h+:} false; then :
22359 $as_echo_n "(cached) " >&6
22362 if test $ac_cv_header_math_h = yes; then
22365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22366 /* end confdefs.h. */
22371 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22372 *) gl_absname_cpp="$ac_cpp" ;;
22377 gl_dirsep_regex='[/\\]'
22380 gl_dirsep_regex='\/'
22383 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22385 gl_header_literal_regex=`echo 'math.h' \
22386 | sed -e "$gl_make_literal_regex_sed"`
22387 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22388 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22393 gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22394 sed -n "$gl_absolute_header_sed"`'"'
22396 gl_cv_next_math_h='<'math.h'>'
22401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
22402 $as_echo "$gl_cv_next_math_h" >&6; }
22404 NEXT_MATH_H=$gl_cv_next_math_h
22406 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22407 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22408 gl_next_as_first_directive='<'math.h'>'
22410 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22411 gl_next_as_first_directive=$gl_cv_next_math_h
22413 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
22420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
22421 $as_echo_n "checking whether NAN macro works... " >&6; }
22422 if ${gl_cv_header_math_nan_works+:} false; then :
22423 $as_echo_n "(cached) " >&6
22425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22426 /* end confdefs.h. */
22431 /* Solaris 10 has a broken definition of NAN. Other platforms
22432 fail to provide NAN, or provide it only in C99 mode; this
22433 test only needs to fail when NAN is provided but wrong. */
22443 if ac_fn_c_try_compile "$LINENO"; then :
22444 gl_cv_header_math_nan_works=yes
22446 gl_cv_header_math_nan_works=no
22448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
22451 $as_echo "$gl_cv_header_math_nan_works" >&6; }
22452 if test $gl_cv_header_math_nan_works = no; then
22455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
22456 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
22457 if ${gl_cv_header_math_huge_val_works+:} false; then :
22458 $as_echo_n "(cached) " >&6
22460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22461 /* end confdefs.h. */
22466 /* Solaris 10 has a broken definition of HUGE_VAL. */
22467 double d = HUGE_VAL;
22473 if ac_fn_c_try_compile "$LINENO"; then :
22474 gl_cv_header_math_huge_val_works=yes
22476 gl_cv_header_math_huge_val_works=no
22478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
22481 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
22482 if test $gl_cv_header_math_huge_val_works = no; then
22487 for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do
22488 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22490 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22491 if eval \${$as_gl_Symbol+:} false; then :
22492 $as_echo_n "(cached) " >&6
22494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22495 /* end confdefs.h. */
22506 if ac_fn_c_try_compile "$LINENO"; then :
22507 eval "$as_gl_Symbol=yes"
22509 eval "$as_gl_Symbol=no"
22511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22513 eval ac_res=\$$as_gl_Symbol
22514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22515 $as_echo "$ac_res" >&6; }
22516 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22517 cat >>confdefs.h <<_ACEOF
22518 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22521 eval ac_cv_have_decl_$gl_func=yes
22536 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22541 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22542 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22543 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22598 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22604 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22605 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22606 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22665 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
22716 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22717 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22718 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22787 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22793 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22794 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22795 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22852 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22860 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22861 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22862 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22990 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
22995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22996 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
22997 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
22998 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23052 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23054 case "$gl_cv_func_mbrtowc_null_arg1" in
23057 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23062 case "$gl_cv_func_mbrtowc_null_arg2" in
23065 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23070 case "$gl_cv_func_mbrtowc_retval" in
23073 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23078 case "$gl_cv_func_mbrtowc_nul_retval" in
23081 $as_echo "#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 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23130 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23135 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23136 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23137 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23192 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23198 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23199 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23200 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23259 $as_echo "$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 $as_echo "#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 $as_echo "#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 $as_echo "#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 $as_echo "#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 $as_echo "#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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23533 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
23534 if ${gl_cv_func_open_slash+:} false; then :
23535 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23584 $as_echo "$gl_cv_func_open_slash" >&6; }
23585 case "$gl_cv_func_open_slash" in
23588 $as_echo "#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"
23639 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
23648 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
23652 # Solaris 9 has *at functions, but uniformly mishandles trailing
23653 # slash in all of them.
23661 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
23670 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
23680 cat >>confdefs.h <<_ACEOF
23681 #define GNULIB_OPENAT 1
23695 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
23702 for ac_func in opendir
23704 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
23705 if test "x$ac_cv_func_opendir" = xyes; then :
23706 cat >>confdefs.h <<_ACEOF
23707 #define HAVE_OPENDIR 1
23713 if test $ac_cv_func_opendir = no; then
23720 if test $ac_cv_func_fchdir = no; then
23724 if test $HAVE_FCHDIR = 0; then
23725 if test $HAVE_OPENDIR = 1; then
23731 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
23740 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
23754 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
23766 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
23769 case ${gl_cv_func_strerror_r_works-unset} in
23771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
23772 $as_echo_n "checking whether perror matches strerror... " >&6; }
23773 if ${gl_cv_func_perror_works+:} false; then :
23774 $as_echo_n "(cached) " >&6
23776 if test "$cross_compiling" = yes; then :
23777 gl_cv_func_perror_works="guessing no"
23780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23781 /* end confdefs.h. */
23784 #include <stdlib.h>
23785 #include <string.h>
23790 char *str = strerror (-1);
23791 if (!getenv("CONFTEST_OUTPUT")) return 0;
23792 if (!str) str = "";
23802 if ac_fn_c_try_run "$LINENO"; then :
23803 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
23804 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
23805 gl_cv_func_perror_works=yes
23807 gl_cv_func_perror_works=no
23809 rm -rf conftest.txt1 conftest.txt2
23811 gl_cv_func_perror_works=no
23813 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23814 conftest.$ac_objext conftest.beam conftest.$ac_ext
23819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
23820 $as_echo "$gl_cv_func_perror_works" >&6; }
23821 if test "$gl_cv_func_perror_works" != yes; then
23830 if test $REPLACE_PERROR = 1; then
23839 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
23853 $as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
23859 if test $gl_cv_func_frexp_no_libm = yes; then
23863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
23864 $as_echo_n "checking whether frexp works... " >&6; }
23865 if ${gl_cv_func_frexp_works+:} false; then :
23866 $as_echo_n "(cached) " >&6
23869 if test "$cross_compiling" = yes; then :
23871 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
23872 *) gl_cv_func_frexp_works="guessing yes";;
23876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23877 /* end confdefs.h. */
23881 #include <string.h>
23883 # include <unistd.h>
23885 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
23886 ICC 10.0 has a bug when optimizing the expression -zero.
23887 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
23888 to PowerPC on MacOS X 10.5. */
23889 #if defined __hpux || defined __sgi || defined __ICC
23891 compute_minus_zero (void)
23893 return -DBL_MIN * DBL_MIN;
23895 # define minus_zero compute_minus_zero ()
23897 double minus_zero = -0.0;
23906 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
23907 number. Let the test fail in this case. */
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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23953 $as_echo "$gl_cv_func_frexp_works" >&6; }
23955 case "$gl_cv_func_frexp_works" in
23958 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
23965 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
23966 if ${gl_cv_func_ldexp_no_libm+:} false; then :
23967 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
23993 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
23994 if test $gl_cv_func_ldexp_no_libm = yes; then
23996 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
24005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
24006 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
24007 if ${gl_cv_func_frexpl_no_libm+:} false; then :
24008 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
24033 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
24035 if test $gl_cv_func_frexpl_no_libm = yes; then
24038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
24039 $as_echo_n "checking whether frexpl works... " >&6; }
24040 if ${gl_cv_func_frexpl_works+:} false; then :
24041 $as_echo_n "(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 MacOS 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 MacOS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
24161 $as_echo "$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 $as_echo "#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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
24187 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
24188 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
24189 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
24214 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
24216 if test $gl_cv_func_ldexpl_no_libm = yes; then
24219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
24220 $as_echo_n "checking whether ldexpl works... " >&6; }
24221 if ${gl_cv_func_ldexpl_works+:} false; then :
24222 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
24272 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
24274 case "$gl_cv_func_ldexpl_works" in
24277 $as_echo "#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 $as_echo "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
24320 GNULIB_PRINTF_POSIX=1
24326 $as_echo "#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 $as_echo "#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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
24395 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
24396 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
24397 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
24439 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
24440 if test $ac_cv_func_realloc_0_nonnull = yes; then :
24442 $as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
24445 $as_echo "#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 $as_echo "#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 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
24518 $as_echo_n "checking for signbit macro... " >&6; }
24519 if ${gl_cv_func_signbit+:} false; then :
24520 $as_echo_n "(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 MacOS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
24634 $as_echo "$gl_cv_func_signbit" >&6; }
24635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
24636 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
24637 if ${gl_cv_func_signbit_gcc+:} false; then :
24638 $as_echo_n "(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 MacOS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
24749 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
24762 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
24763 if ${gl_cv_cc_float_signbit+:} false; then :
24764 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
24844 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
24866 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
24867 if ${gl_cv_cc_double_signbit+:} false; then :
24868 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
24948 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
24970 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
24971 if ${gl_cv_cc_long_double_signbit+:} false; then :
24972 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
25052 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
25086 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
25087 if ${gl_cv_func_copysignf_no_libm+:} false; then :
25088 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
25113 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
25114 if test $gl_cv_func_copysignf_no_libm = yes; then
25116 $as_echo "#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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
25136 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
25137 if ${gl_cv_func_copysign_no_libm+:} false; then :
25138 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
25163 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
25164 if test $gl_cv_func_copysign_no_libm = yes; then
25166 $as_echo "#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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
25186 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
25187 if ${gl_cv_func_copysignl_no_libm+:} false; then :
25188 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
25213 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
25214 if test $gl_cv_func_copysignl_no_libm = yes; then
25216 $as_echo "#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 $as_echo "#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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
25287 $as_echo_n "checking for SIZE_MAX... " >&6; }
25288 if ${gl_cv_size_max+:} false; then :
25289 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
25358 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25370 $as_echo_n "checking for ssize_t... " >&6; }
25371 if ${gt_cv_ssize_t+:} false; then :
25372 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25394 $as_echo "$gt_cv_ssize_t" >&6; }
25395 if test $gt_cv_ssize_t = no; then
25397 $as_echo "#define ssize_t int" >>confdefs.h
25404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25405 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25406 if ${gl_cv_func_stat_dir_slash+:} false; then :
25407 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25438 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25440 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25441 if ${gl_cv_func_stat_file_slash+:} false; then :
25442 $as_echo_n "(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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25491 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
25492 case $gl_cv_func_stat_dir_slash in
25493 *no) REPLACE_STAT=1
25495 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25498 case $gl_cv_func_stat_file_slash in
25499 *no) REPLACE_STAT=1
25501 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25505 if test $REPLACE_STAT = 1; then
25514 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25532 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25541 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>
25542 #include <sys/stat.h>
25544 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
25546 cat >>confdefs.h <<_ACEOF
25547 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25551 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25552 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
25553 $as_echo_n "(cached) " >&6
25555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25556 /* end confdefs.h. */
25558 #include <sys/types.h>
25559 #include <sys/stat.h>
25560 #if HAVE_SYS_TIME_H
25561 # include <sys/time.h>
25564 struct timespec ts;
25577 if ac_fn_c_try_compile "$LINENO"; then :
25578 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25580 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25585 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25586 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25588 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25592 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>
25593 #include <sys/stat.h>
25595 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
25597 cat >>confdefs.h <<_ACEOF
25598 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25603 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25604 #include <sys/stat.h>
25606 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
25608 cat >>confdefs.h <<_ACEOF
25609 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25614 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>
25615 #include <sys/stat.h>
25617 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
25619 cat >>confdefs.h <<_ACEOF
25620 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25637 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>
25638 #include <sys/stat.h>
25640 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
25642 cat >>confdefs.h <<_ACEOF
25643 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25648 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25649 #include <sys/stat.h>
25651 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
25653 cat >>confdefs.h <<_ACEOF
25654 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25659 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>
25660 #include <sys/stat.h>
25662 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
25664 cat >>confdefs.h <<_ACEOF
25665 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25679 # Define two additional variables used in the Makefile substitution.
25681 if test "$ac_cv_header_stdbool_h" = yes; then
25684 STDBOOL_H='stdbool.h'
25687 if test -n "$STDBOOL_H"; then
25688 GL_GENERATE_STDBOOL_H_TRUE=
25689 GL_GENERATE_STDBOOL_H_FALSE='#'
25691 GL_GENERATE_STDBOOL_H_TRUE='#'
25692 GL_GENERATE_STDBOOL_H_FALSE=
25696 if test "$ac_cv_type__Bool" = yes; then
25707 if test $gt_cv_c_wchar_t = no; then
25711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25712 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25713 if ${gl_cv_decl_null_works+:} false; then :
25714 $as_echo_n "(cached) " >&6
25716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25717 /* end confdefs.h. */
25718 #include <stddef.h>
25719 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25729 if ac_fn_c_try_compile "$LINENO"; then :
25730 gl_cv_decl_null_works=yes
25732 gl_cv_decl_null_works=no
25734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25737 $as_echo "$gl_cv_decl_null_works" >&6; }
25738 if test $gl_cv_decl_null_works = no; then
25743 if test -n "$STDDEF_H"; then
25744 GL_GENERATE_STDDEF_H_TRUE=
25745 GL_GENERATE_STDDEF_H_FALSE='#'
25747 GL_GENERATE_STDDEF_H_TRUE='#'
25748 GL_GENERATE_STDDEF_H_FALSE=
25751 if test -n "$STDDEF_H"; then
25760 if test $gl_cv_have_include_next = yes; then
25761 gl_cv_next_stddef_h='<'stddef.h'>'
25763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25764 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25765 if ${gl_cv_next_stddef_h+:} false; then :
25766 $as_echo_n "(cached) " >&6
25769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25770 /* end confdefs.h. */
25771 #include <stddef.h>
25775 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25776 *) gl_absname_cpp="$ac_cpp" ;;
25781 gl_dirsep_regex='[/\\]'
25784 gl_dirsep_regex='\/'
25787 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25789 gl_header_literal_regex=`echo 'stddef.h' \
25790 | sed -e "$gl_make_literal_regex_sed"`
25791 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25792 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25797 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25798 sed -n "$gl_absolute_header_sed"`'"'
25802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25803 $as_echo "$gl_cv_next_stddef_h" >&6; }
25805 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25807 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25808 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25809 gl_next_as_first_directive='<'stddef.h'>'
25811 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25812 gl_next_as_first_directive=$gl_cv_next_stddef_h
25814 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25833 if test $gl_cv_have_include_next = yes; then
25834 gl_cv_next_stdio_h='<'stdio.h'>'
25836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25837 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
25838 if ${gl_cv_next_stdio_h+:} false; then :
25839 $as_echo_n "(cached) " >&6
25842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25843 /* end confdefs.h. */
25848 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25849 *) gl_absname_cpp="$ac_cpp" ;;
25854 gl_dirsep_regex='[/\\]'
25857 gl_dirsep_regex='\/'
25860 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25862 gl_header_literal_regex=`echo 'stdio.h' \
25863 | sed -e "$gl_make_literal_regex_sed"`
25864 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25865 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25870 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25871 sed -n "$gl_absolute_header_sed"`'"'
25875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25876 $as_echo "$gl_cv_next_stdio_h" >&6; }
25878 NEXT_STDIO_H=$gl_cv_next_stdio_h
25880 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25881 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25882 gl_next_as_first_directive='<'stdio.h'>'
25884 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25885 gl_next_as_first_directive=$gl_cv_next_stdio_h
25887 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25916 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
25917 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25919 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25920 if eval \${$as_gl_Symbol+:} false; then :
25921 $as_echo_n "(cached) " >&6
25923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25924 /* end confdefs.h. */
25936 if ac_fn_c_try_compile "$LINENO"; then :
25937 eval "$as_gl_Symbol=yes"
25939 eval "$as_gl_Symbol=no"
25941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25943 eval ac_res=\$$as_gl_Symbol
25944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25945 $as_echo "$ac_res" >&6; }
25946 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25947 cat >>confdefs.h <<_ACEOF
25948 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25951 eval ac_cv_have_decl_$gl_func=yes
25966 if test $gl_cv_have_include_next = yes; then
25967 gl_cv_next_stdlib_h='<'stdlib.h'>'
25969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25970 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
25971 if ${gl_cv_next_stdlib_h+:} false; then :
25972 $as_echo_n "(cached) " >&6
25975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25976 /* end confdefs.h. */
25977 #include <stdlib.h>
25981 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25982 *) gl_absname_cpp="$ac_cpp" ;;
25987 gl_dirsep_regex='[/\\]'
25990 gl_dirsep_regex='\/'
25993 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25995 gl_header_literal_regex=`echo 'stdlib.h' \
25996 | sed -e "$gl_make_literal_regex_sed"`
25997 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25998 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26003 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26004 sed -n "$gl_absolute_header_sed"`'"'
26008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26009 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26011 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26013 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26014 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26015 gl_next_as_first_directive='<'stdlib.h'>'
26017 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26018 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26020 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26027 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
26028 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26030 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26031 if eval \${$as_gl_Symbol+:} false; then :
26032 $as_echo_n "(cached) " >&6
26034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26035 /* end confdefs.h. */
26036 #include <stdlib.h>
26037 #if HAVE_SYS_LOADAVG_H
26038 # include <sys/loadavg.h>
26041 # include <random.h>
26053 if ac_fn_c_try_compile "$LINENO"; then :
26054 eval "$as_gl_Symbol=yes"
26056 eval "$as_gl_Symbol=no"
26058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26060 eval ac_res=\$$as_gl_Symbol
26061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26062 $as_echo "$ac_res" >&6; }
26063 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26064 cat >>confdefs.h <<_ACEOF
26065 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26068 eval ac_cv_have_decl_$gl_func=yes
26077 if test $ac_cv_func_strdup = yes; then
26078 if test $gl_cv_func_malloc_posix != yes; then
26083 if test $ac_cv_have_decl_strdup = no; then
26087 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26096 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26111 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26122 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26124 $as_echo_n "checking for working strerror function... " >&6; }
26125 if ${gl_cv_func_working_strerror+:} false; then :
26126 $as_echo_n "(cached) " >&6
26128 if test "$cross_compiling" = yes; then :
26130 # Guess yes on glibc systems.
26131 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26132 # If we don't know, assume the worst.
26133 *) gl_cv_func_working_strerror="guessing no" ;;
26137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26138 /* end confdefs.h. */
26139 #include <string.h>
26144 if (!*strerror (-2)) return 1;
26149 if ac_fn_c_try_run "$LINENO"; then :
26150 gl_cv_func_working_strerror=yes
26152 gl_cv_func_working_strerror=no
26154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26155 conftest.$ac_objext conftest.beam conftest.$ac_ext
26160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26161 $as_echo "$gl_cv_func_working_strerror" >&6; }
26162 case "$gl_cv_func_working_strerror" in
26169 case "$gl_cv_func_strerror_r_works" in
26170 *no) REPLACE_STRERROR=1 ;;
26177 if test $REPLACE_STRERROR = 1; then
26186 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26191 cat >>confdefs.h <<_ACEOF
26192 #define GNULIB_STRERROR 1
26207 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26213 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26222 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26228 if test $ac_cv_header_sys_socket_h != yes; then
26229 for ac_header in winsock2.h
26231 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26232 if test "x$ac_cv_header_winsock2_h" = xyes; then :
26233 cat >>confdefs.h <<_ACEOF
26234 #define HAVE_WINSOCK2_H 1
26242 if test "$ac_cv_header_winsock2_h" = yes; then
26244 UNISTD_H_HAVE_WINSOCK2_H=1
26245 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26259 if test $ac_cv_have_decl_strerror_r = no; then
26260 HAVE_DECL_STRERROR_R=0
26263 if test $ac_cv_func_strerror_r = yes; then
26264 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26265 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26266 case "$gl_cv_func_strerror_r_works" in
26267 *no) REPLACE_STRERROR_R=1 ;;
26270 REPLACE_STRERROR_R=1
26273 REPLACE_STRERROR_R=1
26277 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26286 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26299 GNULIB_STRERROR_R=1
26305 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26328 if test $gl_cv_have_include_next = yes; then
26329 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26332 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26333 if ${gl_cv_next_sys_stat_h+:} false; then :
26334 $as_echo_n "(cached) " >&6
26337 if test $ac_cv_header_sys_stat_h = yes; then
26340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26341 /* end confdefs.h. */
26342 #include <sys/stat.h>
26346 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26347 *) gl_absname_cpp="$ac_cpp" ;;
26352 gl_dirsep_regex='[/\\]'
26355 gl_dirsep_regex='\/'
26358 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26360 gl_header_literal_regex=`echo 'sys/stat.h' \
26361 | sed -e "$gl_make_literal_regex_sed"`
26362 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26363 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26368 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26369 sed -n "$gl_absolute_header_sed"`'"'
26371 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26377 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26379 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26381 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26382 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26383 gl_next_as_first_directive='<'sys/stat.h'>'
26385 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26386 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26388 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26400 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26402 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26406 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26407 #include <sys/stat.h>
26409 if test "x$ac_cv_type_nlink_t" = xyes; then :
26413 $as_echo "#define nlink_t int" >>confdefs.h
26419 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
26420 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26422 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26423 if eval \${$as_gl_Symbol+:} false; then :
26424 $as_echo_n "(cached) " >&6
26426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26427 /* end confdefs.h. */
26428 #include <sys/stat.h>
26439 if ac_fn_c_try_compile "$LINENO"; then :
26440 eval "$as_gl_Symbol=yes"
26442 eval "$as_gl_Symbol=no"
26444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26446 eval ac_res=\$$as_gl_Symbol
26447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26448 $as_echo "$ac_res" >&6; }
26449 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26450 cat >>confdefs.h <<_ACEOF
26451 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26454 eval ac_cv_have_decl_$gl_func=yes
26474 if test $gl_cv_have_include_next = yes; then
26475 gl_cv_next_sys_types_h='<'sys/types.h'>'
26477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
26478 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
26479 if ${gl_cv_next_sys_types_h+:} false; then :
26480 $as_echo_n "(cached) " >&6
26483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26484 /* end confdefs.h. */
26485 #include <sys/types.h>
26489 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26490 *) gl_absname_cpp="$ac_cpp" ;;
26495 gl_dirsep_regex='[/\\]'
26498 gl_dirsep_regex='\/'
26501 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26503 gl_header_literal_regex=`echo 'sys/types.h' \
26504 | sed -e "$gl_make_literal_regex_sed"`
26505 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26506 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26511 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26512 sed -n "$gl_absolute_header_sed"`'"'
26516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
26517 $as_echo "$gl_cv_next_sys_types_h" >&6; }
26519 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
26521 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26522 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26523 gl_next_as_first_directive='<'sys/types.h'>'
26525 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26526 gl_next_as_first_directive=$gl_cv_next_sys_types_h
26528 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
26564 if test $gl_cv_have_include_next = yes; then
26565 gl_cv_next_unistd_h='<'unistd.h'>'
26567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26568 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
26569 if ${gl_cv_next_unistd_h+:} false; then :
26570 $as_echo_n "(cached) " >&6
26573 if test $ac_cv_header_unistd_h = yes; then
26576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26577 /* end confdefs.h. */
26578 #include <unistd.h>
26582 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26583 *) gl_absname_cpp="$ac_cpp" ;;
26588 gl_dirsep_regex='[/\\]'
26591 gl_dirsep_regex='\/'
26594 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26596 gl_header_literal_regex=`echo 'unistd.h' \
26597 | sed -e "$gl_make_literal_regex_sed"`
26598 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26599 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26604 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26605 sed -n "$gl_absolute_header_sed"`'"'
26607 gl_cv_next_unistd_h='<'unistd.h'>'
26612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26613 $as_echo "$gl_cv_next_unistd_h" >&6; }
26615 NEXT_UNISTD_H=$gl_cv_next_unistd_h
26617 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26618 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26619 gl_next_as_first_directive='<'unistd.h'>'
26621 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26622 gl_next_as_first_directive=$gl_cv_next_unistd_h
26624 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26629 if test $ac_cv_header_unistd_h = yes; then
26641 for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do
26642 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26644 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26645 if eval \${$as_gl_Symbol+:} false; then :
26646 $as_echo_n "(cached) " >&6
26648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26649 /* end confdefs.h. */
26652 # include <unistd.h>
26654 /* Some systems declare various items in the wrong headers. */
26655 #if !(defined __GLIBC__ && !defined __UCLIBC__)
26656 # include <fcntl.h>
26657 # include <stdio.h>
26658 # include <stdlib.h>
26659 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
26673 if ac_fn_c_try_compile "$LINENO"; then :
26674 eval "$as_gl_Symbol=yes"
26676 eval "$as_gl_Symbol=no"
26678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26680 eval ac_res=\$$as_gl_Symbol
26681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26682 $as_echo "$ac_res" >&6; }
26683 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26684 cat >>confdefs.h <<_ACEOF
26685 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26688 eval ac_cv_have_decl_$gl_func=yes
26702 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26704 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
26705 if ${gl_cv_func_futimesat_works+:} false; then :
26706 $as_echo_n "(cached) " >&6
26708 touch conftest.file
26709 if test "$cross_compiling" = yes; then :
26711 # Guess yes on glibc systems.
26712 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26713 # If we don't know, assume the worst.
26714 *) gl_cv_func_futimesat_works="guessing no" ;;
26718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26719 /* end confdefs.h. */
26721 #include <stddef.h>
26722 #include <sys/times.h>
26728 int fd = open ("conftest.file", O_RDWR);
26729 if (fd < 0) return 1;
26730 if (futimesat (fd, NULL, NULL)) return 2;
26736 if ac_fn_c_try_run "$LINENO"; then :
26737 gl_cv_func_futimesat_works=yes
26739 gl_cv_func_futimesat_works=no
26741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26742 conftest.$ac_objext conftest.beam conftest.$ac_ext
26745 rm -f conftest.file
26747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26748 $as_echo "$gl_cv_func_futimesat_works" >&6; }
26749 case "$gl_cv_func_futimesat_works" in
26753 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
26761 if test $ac_cv_func_vasnprintf = no; then
26772 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26782 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26792 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26802 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26804 if test $ac_cv_func_vasnprintf = yes; then
26806 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26820 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26821 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
26825 $as_echo "#define ptrdiff_t long" >>confdefs.h
26853 gl_cv_func_vfprintf_posix=no
26854 case "$gl_cv_func_printf_sizes_c99" in
26856 case "$gl_cv_func_printf_long_double" in
26858 case "$gl_cv_func_printf_infinite" in
26860 case "$gl_cv_func_printf_infinite_long_double" in
26862 case "$gl_cv_func_printf_directive_a" in
26864 case "$gl_cv_func_printf_directive_f" in
26866 case "$gl_cv_func_printf_directive_n" in
26868 case "$gl_cv_func_printf_directive_ls" in
26870 case "$gl_cv_func_printf_positions" in
26872 case "$gl_cv_func_printf_flag_grouping" in
26874 case "$gl_cv_func_printf_flag_leftadjust" in
26876 case "$gl_cv_func_printf_flag_zero" in
26878 case "$gl_cv_func_printf_precision" in
26880 case "$gl_cv_func_printf_enomem" in
26882 # vfprintf exists and is
26883 # already POSIX compliant.
26884 gl_cv_func_vfprintf_posix=yes
26913 if test $gl_cv_func_vfprintf_posix = no; then
26917 case "$gl_cv_func_printf_infinite" in
26922 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
26930 case "$gl_cv_func_printf_long_double" in
26932 case "$gl_cv_func_printf_infinite_long_double" in
26937 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
26946 case "$gl_cv_func_printf_directive_a" in
26951 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
26953 for ac_func in nl_langinfo
26955 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
26956 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
26957 cat >>confdefs.h <<_ACEOF
26958 #define HAVE_NL_LANGINFO 1
26969 case "$gl_cv_func_printf_directive_f" in
26974 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
26981 case "$gl_cv_func_printf_directive_ls" in
26986 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
26993 case "$gl_cv_func_printf_flag_grouping" in
26998 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
27005 case "$gl_cv_func_printf_flag_leftadjust" in
27010 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
27017 case "$gl_cv_func_printf_flag_zero" in
27022 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
27029 case "$gl_cv_func_printf_precision" in
27034 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
27037 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
27040 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
27047 case "$gl_cv_func_printf_enomem" in
27052 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
27055 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
27058 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
27073 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
27083 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
27093 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
27103 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
27105 if test $ac_cv_func_vasnprintf = yes; then
27107 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
27121 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
27122 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
27126 $as_echo "#define ptrdiff_t long" >>confdefs.h
27147 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
27151 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
27162 GNULIB_VFPRINTF_POSIX=1
27168 $as_echo "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
27184 if test $gl_cv_have_include_next = yes; then
27185 gl_cv_next_wchar_h='<'wchar.h'>'
27187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27188 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
27189 if ${gl_cv_next_wchar_h+:} false; then :
27190 $as_echo_n "(cached) " >&6
27193 if test $ac_cv_header_wchar_h = yes; then
27196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27197 /* end confdefs.h. */
27202 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27203 *) gl_absname_cpp="$ac_cpp" ;;
27208 gl_dirsep_regex='[/\\]'
27211 gl_dirsep_regex='\/'
27214 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27216 gl_header_literal_regex=`echo 'wchar.h' \
27217 | sed -e "$gl_make_literal_regex_sed"`
27218 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27219 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27224 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27225 sed -n "$gl_absolute_header_sed"`'"'
27227 gl_cv_next_wchar_h='<'wchar.h'>'
27232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27233 $as_echo "$gl_cv_next_wchar_h" >&6; }
27235 NEXT_WCHAR_H=$gl_cv_next_wchar_h
27237 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27238 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27239 gl_next_as_first_directive='<'wchar.h'>'
27241 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27242 gl_next_as_first_directive=$gl_cv_next_wchar_h
27244 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27249 if test $ac_cv_header_wchar_h = yes; then
27259 if test $gt_cv_c_wint_t = yes; then
27267 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do
27268 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27270 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27271 if eval \${$as_gl_Symbol+:} false; then :
27272 $as_echo_n "(cached) " >&6
27274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27275 /* end confdefs.h. */
27277 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27279 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27280 included before <wchar.h>. */
27281 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27282 # include <stddef.h>
27283 # include <stdio.h>
27297 if ac_fn_c_try_compile "$LINENO"; then :
27298 eval "$as_gl_Symbol=yes"
27300 eval "$as_gl_Symbol=no"
27302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27304 eval ac_res=\$$as_gl_Symbol
27305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27306 $as_echo "$ac_res" >&6; }
27307 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27308 cat >>confdefs.h <<_ACEOF
27309 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27312 eval ac_cv_have_decl_$gl_func=yes
27322 if test $ac_cv_func_iswcntrl = yes; then
27332 if test $gt_cv_c_wint_t = yes; then
27348 if test $gl_cv_have_include_next = yes; then
27349 gl_cv_next_wctype_h='<'wctype.h'>'
27351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27352 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
27353 if ${gl_cv_next_wctype_h+:} false; then :
27354 $as_echo_n "(cached) " >&6
27357 if test $ac_cv_header_wctype_h = yes; then
27360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27361 /* end confdefs.h. */
27362 #include <wctype.h>
27366 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27367 *) gl_absname_cpp="$ac_cpp" ;;
27372 gl_dirsep_regex='[/\\]'
27375 gl_dirsep_regex='\/'
27378 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27380 gl_header_literal_regex=`echo 'wctype.h' \
27381 | sed -e "$gl_make_literal_regex_sed"`
27382 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27383 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27388 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27389 sed -n "$gl_absolute_header_sed"`'"'
27391 gl_cv_next_wctype_h='<'wctype.h'>'
27396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27397 $as_echo "$gl_cv_next_wctype_h" >&6; }
27399 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
27401 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27402 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27403 gl_next_as_first_directive='<'wctype.h'>'
27405 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27406 gl_next_as_first_directive=$gl_cv_next_wctype_h
27408 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27413 if test $ac_cv_header_wctype_h = yes; then
27414 if test $ac_cv_func_iswcntrl = yes; then
27415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27416 $as_echo_n "checking whether iswcntrl works... " >&6; }
27417 if ${gl_cv_func_iswcntrl_works+:} false; then :
27418 $as_echo_n "(cached) " >&6
27421 if test "$cross_compiling" = yes; then :
27422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27423 /* end confdefs.h. */
27424 #include <stdlib.h>
27425 #if __GNU_LIBRARY__ == 1
27426 Linux libc5 i18n is broken.
27436 if ac_fn_c_try_compile "$LINENO"; then :
27437 gl_cv_func_iswcntrl_works="guessing yes"
27439 gl_cv_func_iswcntrl_works="guessing no"
27441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27445 /* end confdefs.h. */
27447 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27448 included before <wchar.h>.
27449 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27450 must be included before <wchar.h>. */
27451 #include <stddef.h>
27455 #include <wctype.h>
27456 int main () { return iswprint ('x') == 0; }
27459 if ac_fn_c_try_run "$LINENO"; then :
27460 gl_cv_func_iswcntrl_works=yes
27462 gl_cv_func_iswcntrl_works=no
27464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27465 conftest.$ac_objext conftest.beam conftest.$ac_ext
27470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27471 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
27479 case "$gl_cv_func_iswcntrl_works" in
27480 *yes) REPLACE_ISWCNTRL=0 ;;
27481 *) REPLACE_ISWCNTRL=1 ;;
27485 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27489 if test $REPLACE_ISWCNTRL = 1; then
27492 for ac_func in towlower
27494 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
27495 if test "x$ac_cv_func_towlower" = xyes; then :
27496 cat >>confdefs.h <<_ACEOF
27497 #define HAVE_TOWLOWER 1
27503 if test $ac_cv_func_towlower = yes; then
27506 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27507 included before <wchar.h>.
27508 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27509 must be included before <wchar.h>. */
27510 #include <stddef.h>
27515 # include <wctype.h>
27519 if test "x$ac_cv_have_decl_towlower" = xyes; then :
27525 cat >>confdefs.h <<_ACEOF
27526 #define HAVE_DECL_TOWLOWER $ac_have_decl
27529 if test $ac_cv_have_decl_towlower = yes; then
27538 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27543 $as_echo_n "checking for wctype_t... " >&6; }
27544 if ${gl_cv_type_wctype_t+:} false; then :
27545 $as_echo_n "(cached) " >&6
27547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27548 /* end confdefs.h. */
27549 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27550 included before <wchar.h>.
27551 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27552 must be included before <wchar.h>. */
27553 #include <stddef.h>
27558 # include <wctype.h>
27570 if ac_fn_c_try_compile "$LINENO"; then :
27571 gl_cv_type_wctype_t=yes
27573 gl_cv_type_wctype_t=no
27575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27579 $as_echo "$gl_cv_type_wctype_t" >&6; }
27580 if test $gl_cv_type_wctype_t = no; then
27584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27585 $as_echo_n "checking for wctrans_t... " >&6; }
27586 if ${gl_cv_type_wctrans_t+:} false; then :
27587 $as_echo_n "(cached) " >&6
27589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27590 /* end confdefs.h. */
27591 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27592 included before <wchar.h>.
27593 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27594 must be included before <wchar.h>. */
27595 #include <stddef.h>
27599 #include <wctype.h>
27610 if ac_fn_c_try_compile "$LINENO"; then :
27611 gl_cv_type_wctrans_t=yes
27613 gl_cv_type_wctrans_t=no
27615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27619 $as_echo "$gl_cv_type_wctrans_t" >&6; }
27620 if test $gl_cv_type_wctrans_t = no; then
27625 for gl_func in wctype iswctype wctrans towctrans ; do
27626 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27628 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27629 if eval \${$as_gl_Symbol+:} false; then :
27630 $as_echo_n "(cached) " >&6
27632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27633 /* end confdefs.h. */
27635 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27637 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27638 included before <wchar.h>. */
27639 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27640 # include <stddef.h>
27641 # include <stdio.h>
27643 # include <wchar.h>
27645 #include <wctype.h>
27656 if ac_fn_c_try_compile "$LINENO"; then :
27657 eval "$as_gl_Symbol=yes"
27659 eval "$as_gl_Symbol=no"
27661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27663 eval ac_res=\$$as_gl_Symbol
27664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27665 $as_echo "$ac_res" >&6; }
27666 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27667 cat >>confdefs.h <<_ACEOF
27668 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27671 eval ac_cv_have_decl_$gl_func=yes
27688 for ac_header in stdint.h
27690 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27691 if test "x$ac_cv_header_stdint_h" = xyes; then :
27692 cat >>confdefs.h <<_ACEOF
27693 #define HAVE_STDINT_H 1
27704 # End of code from modules
27725 gl_source_base='tests'
27726 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
27728 gl_module_indicator_condition=$gltests_WITNESS
27738 LIBGZIP_LIBDEPS="$gl_libdeps"
27740 LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
27744 # Check whether --enable-gcc-warnings was given.
27745 if test "${enable_gcc_warnings+set}" = set; then :
27746 enableval=$enable_gcc_warnings; case $enableval in
27748 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
27750 gl_gcc_warnings=$enableval
27757 if test "$gl_gcc_warnings" = yes; then
27758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
27759 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
27760 if ${gl_cv_warn_c__Werror+:} false; then :
27761 $as_echo_n "(cached) " >&6
27764 gl_save_compiler_FLAGS="$CFLAGS"
27765 as_fn_append CFLAGS " -Werror"
27766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27767 /* end confdefs.h. */
27777 if ac_fn_c_try_compile "$LINENO"; then :
27778 gl_cv_warn_c__Werror=yes
27780 gl_cv_warn_c__Werror=no
27782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27783 CFLAGS="$gl_save_compiler_FLAGS"
27786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
27787 $as_echo "$gl_cv_warn_c__Werror" >&6; }
27788 if test "x$gl_cv_warn_c__Werror" = xyes; then :
27789 as_fn_append WERROR_CFLAGS " -Werror"
27796 # This, $nw, is the list of warnings we disable.
27797 nw="$nw -Wdeclaration-after-statement" # too useful to forbid
27798 nw="$nw -Waggregate-return" # anachronistic
27799 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
27800 nw="$nw -Wc++-compat" # We don't care about C++ compilers
27801 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
27802 nw="$nw -Wtraditional" # Warns on #elif which we use often
27803 nw="$nw -Wcast-qual" # Too many warnings for now
27804 nw="$nw -Wconversion" # Too many warnings for now
27805 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
27806 nw="$nw -Wsign-conversion" # Too many warnings for now
27807 nw="$nw -Wtraditional-conversion" # Too many warnings for now
27808 nw="$nw -Wunreachable-code" # Too many warnings for now
27809 nw="$nw -Wpadded" # Our structs are not padded
27810 nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat
27811 nw="$nw -Wlogical-op" # any use of fwrite provokes this
27812 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
27813 nw="$nw -Wvla" # warnings in gettext.h
27814 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
27815 nw="$nw -Wswitch-enum" # Too many warnings for now
27816 nw="$nw -Wswitch-default" # Too many warnings for now
27817 nw="$nw -Wstack-protector" # not worth working around
27818 # things I might fix soon:
27819 nw="$nw -Wfloat-equal" # sort.c, seq.c
27820 nw="$nw -Wmissing-format-attribute" # copy.c
27821 nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
27822 nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
27823 nw="$nw -Wstrict-overflow" # expr.c, pr.c, tr.c, factor.c
27824 # initial problems in gzip
27825 nw="$nw -Wold-style-definition"
27827 nw="$nw -Wunused-macros"
27828 # ?? -Wstrict-overflow
27832 if test -n "$GCC"; then
27834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
27835 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
27836 if ${gl_cv_cc_nomfi_supported+:} false; then :
27837 $as_echo_n "(cached) " >&6
27840 gl_save_CFLAGS="$CFLAGS"
27841 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
27842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27843 /* end confdefs.h. */
27853 if ac_fn_c_try_compile "$LINENO"; then :
27854 gl_cv_cc_nomfi_supported=yes
27856 gl_cv_cc_nomfi_supported=no
27858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27859 CFLAGS="$gl_save_CFLAGS"
27862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
27863 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
27865 if test "$gl_cv_cc_nomfi_supported" = yes; then
27866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
27867 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
27868 if ${gl_cv_cc_nomfi_needed+:} false; then :
27869 $as_echo_n "(cached) " >&6
27872 gl_save_CFLAGS="$CFLAGS"
27873 CFLAGS="$CFLAGS -W -Werror"
27874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27875 /* end confdefs.h. */
27878 typedef struct { int a; int b; } s_t;
27890 if ac_fn_c_try_compile "$LINENO"; then :
27891 gl_cv_cc_nomfi_needed=no
27893 gl_cv_cc_nomfi_needed=yes
27895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27896 CFLAGS="$gl_save_CFLAGS"
27900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
27901 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
27906 for gl_manywarn_item in \
27910 -Wformat-nonliteral \
27911 -Wformat-security \
27913 -Wmissing-include-dirs \
27917 -Wunknown-pragmas \
27918 -Wstrict-aliasing \
27919 -Wstrict-overflow \
27923 -Wtraditional-conversion \
27924 -Wdeclaration-after-statement \
27927 -Wunsafe-loop-optimizations \
27929 -Wbad-function-cast \
27935 -Wsign-conversion \
27937 -Waggregate-return \
27938 -Wstrict-prototypes \
27939 -Wold-style-definition \
27940 -Wmissing-prototypes \
27941 -Wmissing-declarations \
27942 -Wmissing-noreturn \
27943 -Wmissing-format-attribute \
27946 -Wredundant-decls \
27948 -Wunreachable-code \
27953 -Wvolatile-register-var \
27954 -Wdisabled-optimization \
27955 -Wstack-protector \
27956 -Woverlength-strings \
27957 -Wbuiltin-macro-redefined \
27959 -Wpacked-bitfield-compat \
27962 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27964 # The following are not documented in the manual but are included in
27965 # output from gcc --help=warnings.
27966 for gl_manywarn_item in \
27968 -Wcoverage-mismatch \
27971 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27973 # More warnings from gcc 4.6.2 --help=warnings.
27974 for gl_manywarn_item in \
27978 -Wdeprecated-declarations \
27980 -Wdouble-promotion \
27983 -Wformat-contains-nul \
27984 -Wformat-extra-args \
27985 -Wformat-zero-length \
27990 -Wpointer-to-int-cast \
27992 -Wsuggest-attribute=const \
27993 -Wsuggest-attribute=noreturn \
27994 -Wsuggest-attribute=pure \
27997 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
28000 # Disable the missing-field-initializers warning if needed
28001 if test "$gl_cv_cc_nomfi_needed" = yes; then
28002 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
28005 ws=$gl_manywarn_set
28013 *" $gl_warn_item "*)
28016 gl_warn_set="$gl_warn_set $gl_warn_item"
28023 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
28024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
28025 $as_echo_n "checking whether C compiler handles $w... " >&6; }
28026 if eval \${$as_gl_Warn+:} false; then :
28027 $as_echo_n "(cached) " >&6
28030 gl_save_compiler_FLAGS="$CFLAGS"
28031 as_fn_append CFLAGS " $w"
28032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28033 /* end confdefs.h. */
28043 if ac_fn_c_try_compile "$LINENO"; then :
28044 eval "$as_gl_Warn=yes"
28046 eval "$as_gl_Warn=no"
28048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28049 CFLAGS="$gl_save_compiler_FLAGS"
28052 eval ac_res=\$$as_gl_Warn
28053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28054 $as_echo "$ac_res" >&6; }
28055 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
28056 as_fn_append WARN_CFLAGS " $w"
28061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
28062 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
28063 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
28064 $as_echo_n "(cached) " >&6
28067 gl_save_compiler_FLAGS="$CFLAGS"
28068 as_fn_append CFLAGS " -Wno-missing-field-initializers"
28069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28070 /* end confdefs.h. */
28080 if ac_fn_c_try_compile "$LINENO"; then :
28081 gl_cv_warn_c__Wno_missing_field_initializers=yes
28083 gl_cv_warn_c__Wno_missing_field_initializers=no
28085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28086 CFLAGS="$gl_save_compiler_FLAGS"
28089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
28090 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
28091 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
28092 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
28096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
28097 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
28098 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
28099 $as_echo_n "(cached) " >&6
28102 gl_save_compiler_FLAGS="$CFLAGS"
28103 as_fn_append CFLAGS " -Wno-sign-compare"
28104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28105 /* end confdefs.h. */
28115 if ac_fn_c_try_compile "$LINENO"; then :
28116 gl_cv_warn_c__Wno_sign_compare=yes
28118 gl_cv_warn_c__Wno_sign_compare=no
28120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28121 CFLAGS="$gl_save_compiler_FLAGS"
28124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
28125 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
28126 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
28127 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
28130 # Too many warnings for now
28131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
28132 $as_echo_n "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
28133 if ${gl_cv_warn_c__Wno_pointer_sign+:} false; then :
28134 $as_echo_n "(cached) " >&6
28137 gl_save_compiler_FLAGS="$CFLAGS"
28138 as_fn_append CFLAGS " -Wno-pointer-sign"
28139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28140 /* end confdefs.h. */
28150 if ac_fn_c_try_compile "$LINENO"; then :
28151 gl_cv_warn_c__Wno_pointer_sign=yes
28153 gl_cv_warn_c__Wno_pointer_sign=no
28155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28156 CFLAGS="$gl_save_compiler_FLAGS"
28159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
28160 $as_echo "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
28161 if test "x$gl_cv_warn_c__Wno_pointer_sign" = xyes; then :
28162 as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
28165 # Too many warnings for now
28166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
28167 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
28168 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
28169 $as_echo_n "(cached) " >&6
28172 gl_save_compiler_FLAGS="$CFLAGS"
28173 as_fn_append CFLAGS " -Wno-unused-parameter"
28174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28175 /* end confdefs.h. */
28185 if ac_fn_c_try_compile "$LINENO"; then :
28186 gl_cv_warn_c__Wno_unused_parameter=yes
28188 gl_cv_warn_c__Wno_unused_parameter=no
28190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28191 CFLAGS="$gl_save_compiler_FLAGS"
28194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
28195 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
28196 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
28197 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
28200 # Too many warnings for now
28201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-overflow" >&5
28202 $as_echo_n "checking whether C compiler handles -Wno-overflow... " >&6; }
28203 if ${gl_cv_warn_c__Wno_overflow+:} false; then :
28204 $as_echo_n "(cached) " >&6
28207 gl_save_compiler_FLAGS="$CFLAGS"
28208 as_fn_append CFLAGS " -Wno-overflow"
28209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28210 /* end confdefs.h. */
28220 if ac_fn_c_try_compile "$LINENO"; then :
28221 gl_cv_warn_c__Wno_overflow=yes
28223 gl_cv_warn_c__Wno_overflow=no
28225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28226 CFLAGS="$gl_save_compiler_FLAGS"
28229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_overflow" >&5
28230 $as_echo "$gl_cv_warn_c__Wno_overflow" >&6; }
28231 if test "x$gl_cv_warn_c__Wno_overflow" = xyes; then :
28232 as_fn_append WARN_CFLAGS " -Wno-overflow"
28236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
28237 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
28238 if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
28239 $as_echo_n "(cached) " >&6
28242 gl_save_compiler_FLAGS="$CFLAGS"
28243 as_fn_append CFLAGS " -Wno-type-limits"
28244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28245 /* end confdefs.h. */
28255 if ac_fn_c_try_compile "$LINENO"; then :
28256 gl_cv_warn_c__Wno_type_limits=yes
28258 gl_cv_warn_c__Wno_type_limits=no
28260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28261 CFLAGS="$gl_save_compiler_FLAGS"
28264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
28265 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
28266 if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
28267 as_fn_append WARN_CFLAGS " -Wno-type-limits"
28271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
28272 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
28273 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
28274 $as_echo_n "(cached) " >&6
28277 gl_save_compiler_FLAGS="$CFLAGS"
28278 as_fn_append CFLAGS " -Wno-format-nonliteral"
28279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28280 /* end confdefs.h. */
28290 if ac_fn_c_try_compile "$LINENO"; then :
28291 gl_cv_warn_c__Wno_format_nonliteral=yes
28293 gl_cv_warn_c__Wno_format_nonliteral=no
28295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28296 CFLAGS="$gl_save_compiler_FLAGS"
28299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
28300 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
28301 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
28302 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
28306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unsuffixed-float-constants" >&5
28307 $as_echo_n "checking whether C compiler handles -Wno-unsuffixed-float-constants... " >&6; }
28308 if ${gl_cv_warn_c__Wno_unsuffixed_float_constants+:} false; then :
28309 $as_echo_n "(cached) " >&6
28312 gl_save_compiler_FLAGS="$CFLAGS"
28313 as_fn_append CFLAGS " -Wno-unsuffixed-float-constants"
28314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28315 /* end confdefs.h. */
28325 if ac_fn_c_try_compile "$LINENO"; then :
28326 gl_cv_warn_c__Wno_unsuffixed_float_constants=yes
28328 gl_cv_warn_c__Wno_unsuffixed_float_constants=no
28330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28331 CFLAGS="$gl_save_compiler_FLAGS"
28334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unsuffixed_float_constants" >&5
28335 $as_echo "$gl_cv_warn_c__Wno_unsuffixed_float_constants" >&6; }
28336 if test "x$gl_cv_warn_c__Wno_unsuffixed_float_constants" = xyes; then :
28337 as_fn_append WARN_CFLAGS " -Wno-unsuffixed-float-constants"
28342 # In spite of excluding -Wlogical-op above, it is enabled, as of
28343 # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
28344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
28345 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
28346 if ${gl_cv_warn_c__Wno_logical_op+:} false; then :
28347 $as_echo_n "(cached) " >&6
28350 gl_save_compiler_FLAGS="$CFLAGS"
28351 as_fn_append CFLAGS " -Wno-logical-op"
28352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28353 /* end confdefs.h. */
28363 if ac_fn_c_try_compile "$LINENO"; then :
28364 gl_cv_warn_c__Wno_logical_op=yes
28366 gl_cv_warn_c__Wno_logical_op=no
28368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28369 CFLAGS="$gl_save_compiler_FLAGS"
28372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
28373 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
28374 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes; then :
28375 as_fn_append WARN_CFLAGS " -Wno-logical-op"
28380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
28381 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
28382 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
28383 $as_echo_n "(cached) " >&6
28386 gl_save_compiler_FLAGS="$CFLAGS"
28387 as_fn_append CFLAGS " -fdiagnostics-show-option"
28388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28389 /* end confdefs.h. */
28399 if ac_fn_c_try_compile "$LINENO"; then :
28400 gl_cv_warn_c__fdiagnostics_show_option=yes
28402 gl_cv_warn_c__fdiagnostics_show_option=no
28404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28405 CFLAGS="$gl_save_compiler_FLAGS"
28408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
28409 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
28410 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
28411 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
28415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
28416 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
28417 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
28418 $as_echo_n "(cached) " >&6
28421 gl_save_compiler_FLAGS="$CFLAGS"
28422 as_fn_append CFLAGS " -funit-at-a-time"
28423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28424 /* end confdefs.h. */
28434 if ac_fn_c_try_compile "$LINENO"; then :
28435 gl_cv_warn_c__funit_at_a_time=yes
28437 gl_cv_warn_c__funit_at_a_time=no
28439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28440 CFLAGS="$gl_save_compiler_FLAGS"
28443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
28444 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
28445 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
28446 as_fn_append WARN_CFLAGS " -funit-at-a-time"
28454 $as_echo "#define lint 1" >>confdefs.h
28457 $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
28460 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
28463 # We use a slightly smaller set of warning options for lib/.
28464 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
28466 nw="$nw -Wuninitialized"
28467 nw="$nw -Wmissing-prototypes"
28468 nw="$nw -Wold-style-definition"
28471 set x $WARN_CFLAGS; shift
28475 *" $gl_warn_item "*)
28478 gl_warn_set="$gl_warn_set $gl_warn_item"
28482 GNULIB_WARN_CFLAGS=$gl_warn_set
28487 # cc -E produces incorrect asm files on SVR4, so postprocess it.
28488 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
28491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
28492 $as_echo_n "checking for underline in external names... " >&6; }
28493 if ${gzip_cv_underline+:} false; then :
28494 $as_echo_n "(cached) " >&6
28496 gzip_cv_underline=yes
28497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28498 /* end confdefs.h. */
28499 int foo() {return 0;}
28508 if ac_fn_c_try_compile "$LINENO"; then :
28509 $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
28510 gzip_cv_underline=no
28512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
28515 $as_echo "$gzip_cv_underline" >&6; }
28517 if test $gzip_cv_underline = no; then
28518 ASCPPFLAGS='-DNO_UNDERLINE'
28523 # Try to assemble match.S.
28524 # "gcc -E match.s" ignores -E, so we must use _match.S.
28525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
28526 $as_echo_n "checking for an assembler syntax supported by this package... " >&6; }
28527 if ${gzip_cv_assembler+:} false; then :
28528 $as_echo_n "(cached) " >&6
28530 gzip_cv_assembler=no
28534 if cp $srcdir/lib/match.c _match.S &&
28535 eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
28536 eval "$ASCPPPOST < _match.i > match_.s"; then
28537 if test ! -s match_.s || grep error < match_.s > /dev/null; then
28539 elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
28540 test -f match_.$OBJEXT; then
28541 rm -f match_.$OBJEXT
28542 gzip_cv_assembler=yes
28543 if echo 'void foo (void) {}' > conftest.c &&
28544 eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
28545 grep '\.note\.GNU-stack' conftest.s >/dev/null &&
28546 eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
28547 test -f match_.$OBJEXT; then
28548 gzip_cv_assembler='yes, with -Wa,--noexecstack'
28552 rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
28555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
28556 $as_echo "$gzip_cv_assembler" >&6; }
28557 if test "$gzip_cv_assembler" != no; then
28559 $as_echo "#define ASMV /**/" >>confdefs.h
28561 case " $LIBOBJS " in
28562 *" match.$ac_objext "* ) ;;
28563 *) LIBOBJS="$LIBOBJS match.$ac_objext"
28568 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
28569 ASFLAGS_config='-Wa,--noexecstack'
28575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
28576 $as_echo_n "checking for library containing strerror... " >&6; }
28577 if ${ac_cv_search_strerror+:} false; then :
28578 $as_echo_n "(cached) " >&6
28580 ac_func_search_save_LIBS=$LIBS
28581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28582 /* end confdefs.h. */
28584 /* Override any GCC internal prototype to avoid an error.
28585 Use char because int might match the return type of a GCC
28586 builtin and then its argument prototype would still apply. */
28594 return strerror ();
28599 for ac_lib in '' cposix; do
28600 if test -z "$ac_lib"; then
28601 ac_res="none required"
28604 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28606 if ac_fn_c_try_link "$LINENO"; then :
28607 ac_cv_search_strerror=$ac_res
28609 rm -f core conftest.err conftest.$ac_objext \
28611 if ${ac_cv_search_strerror+:} false; then :
28615 if ${ac_cv_search_strerror+:} false; then :
28618 ac_cv_search_strerror=no
28620 rm conftest.$ac_ext
28621 LIBS=$ac_func_search_save_LIBS
28623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
28624 $as_echo "$ac_cv_search_strerror" >&6; }
28625 ac_res=$ac_cv_search_strerror
28626 if test "$ac_res" != no; then :
28627 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
28632 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
28633 if ${ac_cv_c_const+:} false; then :
28634 $as_echo_n "(cached) " >&6
28636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28637 /* end confdefs.h. */
28643 #ifndef __cplusplus
28644 /* Ultrix mips cc rejects this sort of thing. */
28645 typedef int charset[2];
28646 const charset cs = { 0, 0 };
28647 /* SunOS 4.1.1 cc rejects this. */
28648 char const *const *pcpcc;
28650 /* NEC SVR4.0.2 mips cc rejects this. */
28651 struct point {int x, y;};
28652 static struct point const zero = {0,0};
28653 /* AIX XL C 1.02.0.0 rejects this.
28654 It does not let you subtract one const X* pointer from another in
28655 an arm of an if-expression whose if-part is not a constant
28657 const char *g = "string";
28658 pcpcc = &g + (g ? g-g : 0);
28659 /* HPUX 7.0 cc rejects these. */
28661 ppc = (char**) pcpcc;
28662 pcpcc = (char const *const *) ppc;
28663 { /* SCO 3.2v4 cc rejects this sort of thing. */
28666 char const *s = 0 ? (char *) 0 : (char const *) 0;
28671 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
28672 int x[] = {25, 17};
28673 const int *foo = &x[0];
28676 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
28677 typedef const int *iptr;
28681 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
28682 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
28683 struct s { int j; const int *ap[3]; } bx;
28684 struct s *b = &bx; b->j = 5;
28686 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
28687 const int foo = 10;
28688 if (!foo) return 0;
28690 return !cs[0] && !zero.x;
28697 if ac_fn_c_try_compile "$LINENO"; then :
28702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
28705 $as_echo "$ac_cv_c_const" >&6; }
28706 if test $ac_cv_c_const = no; then
28708 $as_echo "#define const /**/" >>confdefs.h
28712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28713 $as_echo_n "checking for ANSI C header files... " >&6; }
28714 if ${ac_cv_header_stdc+:} false; then :
28715 $as_echo_n "(cached) " >&6
28717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28718 /* end confdefs.h. */
28719 #include <stdlib.h>
28720 #include <stdarg.h>
28721 #include <string.h>
28732 if ac_fn_c_try_compile "$LINENO"; then :
28733 ac_cv_header_stdc=yes
28735 ac_cv_header_stdc=no
28737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28739 if test $ac_cv_header_stdc = yes; then
28740 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28742 /* end confdefs.h. */
28743 #include <string.h>
28746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28747 $EGREP "memchr" >/dev/null 2>&1; then :
28750 ac_cv_header_stdc=no
28756 if test $ac_cv_header_stdc = yes; then
28757 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28759 /* end confdefs.h. */
28760 #include <stdlib.h>
28763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28764 $EGREP "free" >/dev/null 2>&1; then :
28767 ac_cv_header_stdc=no
28773 if test $ac_cv_header_stdc = yes; then
28774 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28775 if test "$cross_compiling" = yes; then :
28778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28779 /* end confdefs.h. */
28781 #include <stdlib.h>
28782 #if ((' ' & 0x0FF) == 0x020)
28783 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28784 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28786 # define ISLOWER(c) \
28787 (('a' <= (c) && (c) <= 'i') \
28788 || ('j' <= (c) && (c) <= 'r') \
28789 || ('s' <= (c) && (c) <= 'z'))
28790 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28793 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28798 for (i = 0; i < 256; i++)
28799 if (XOR (islower (i), ISLOWER (i))
28800 || toupper (i) != TOUPPER (i))
28805 if ac_fn_c_try_run "$LINENO"; then :
28808 ac_cv_header_stdc=no
28810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28811 conftest.$ac_objext conftest.beam conftest.$ac_ext
28816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28817 $as_echo "$ac_cv_header_stdc" >&6; }
28818 if test $ac_cv_header_stdc = yes; then
28820 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28842 ac_header_dirent=no
28843 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
28844 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
28845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
28846 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
28847 if eval \${$as_ac_Header+:} false; then :
28848 $as_echo_n "(cached) " >&6
28850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28851 /* end confdefs.h. */
28852 #include <sys/types.h>
28864 if ac_fn_c_try_compile "$LINENO"; then :
28865 eval "$as_ac_Header=yes"
28867 eval "$as_ac_Header=no"
28869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28871 eval ac_res=\$$as_ac_Header
28872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28873 $as_echo "$ac_res" >&6; }
28874 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28875 cat >>confdefs.h <<_ACEOF
28876 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
28879 ac_header_dirent=$ac_hdr; break
28883 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
28884 if test $ac_header_dirent = dirent.h; then
28885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28886 $as_echo_n "checking for library containing opendir... " >&6; }
28887 if ${ac_cv_search_opendir+:} false; then :
28888 $as_echo_n "(cached) " >&6
28890 ac_func_search_save_LIBS=$LIBS
28891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28892 /* end confdefs.h. */
28894 /* Override any GCC internal prototype to avoid an error.
28895 Use char because int might match the return type of a GCC
28896 builtin and then its argument prototype would still apply. */
28909 for ac_lib in '' dir; do
28910 if test -z "$ac_lib"; then
28911 ac_res="none required"
28914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28916 if ac_fn_c_try_link "$LINENO"; then :
28917 ac_cv_search_opendir=$ac_res
28919 rm -f core conftest.err conftest.$ac_objext \
28921 if ${ac_cv_search_opendir+:} false; then :
28925 if ${ac_cv_search_opendir+:} false; then :
28928 ac_cv_search_opendir=no
28930 rm conftest.$ac_ext
28931 LIBS=$ac_func_search_save_LIBS
28933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28934 $as_echo "$ac_cv_search_opendir" >&6; }
28935 ac_res=$ac_cv_search_opendir
28936 if test "$ac_res" != no; then :
28937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28943 $as_echo_n "checking for library containing opendir... " >&6; }
28944 if ${ac_cv_search_opendir+:} false; then :
28945 $as_echo_n "(cached) " >&6
28947 ac_func_search_save_LIBS=$LIBS
28948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28949 /* end confdefs.h. */
28951 /* Override any GCC internal prototype to avoid an error.
28952 Use char because int might match the return type of a GCC
28953 builtin and then its argument prototype would still apply. */
28966 for ac_lib in '' x; do
28967 if test -z "$ac_lib"; then
28968 ac_res="none required"
28971 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28973 if ac_fn_c_try_link "$LINENO"; then :
28974 ac_cv_search_opendir=$ac_res
28976 rm -f core conftest.err conftest.$ac_objext \
28978 if ${ac_cv_search_opendir+:} false; then :
28982 if ${ac_cv_search_opendir+:} false; then :
28985 ac_cv_search_opendir=no
28987 rm conftest.$ac_ext
28988 LIBS=$ac_func_search_save_LIBS
28990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28991 $as_echo "$ac_cv_search_opendir" >&6; }
28992 ac_res=$ac_cv_search_opendir
28993 if test "$ac_res" != no; then :
28994 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
29000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
29001 $as_echo_n "checking return type of signal handlers... " >&6; }
29002 if ${ac_cv_type_signal+:} false; then :
29003 $as_echo_n "(cached) " >&6
29005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29006 /* end confdefs.h. */
29007 #include <sys/types.h>
29008 #include <signal.h>
29013 return *(signal (0, 0)) (0) == 1;
29018 if ac_fn_c_try_compile "$LINENO"; then :
29019 ac_cv_type_signal=int
29021 ac_cv_type_signal=void
29023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
29026 $as_echo "$ac_cv_type_signal" >&6; }
29028 cat >>confdefs.h <<_ACEOF
29029 #define RETSIGTYPE $ac_cv_type_signal
29033 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
29034 if test "x$ac_cv_type_size_t" = xyes; then :
29038 cat >>confdefs.h <<_ACEOF
29039 #define size_t unsigned int
29044 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
29045 if test "x$ac_cv_type_off_t" = xyes; then :
29049 cat >>confdefs.h <<_ACEOF
29050 #define off_t long int
29056 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
29058 cat >confcache <<\_ACEOF
29059 # This file is a shell script that caches the results of configure
29060 # tests run on this system so they can be shared between configure
29061 # scripts and configure runs, see configure's option --config-cache.
29062 # It is not useful on other systems. If it contains results you don't
29063 # want to keep, you may remove or edit it.
29065 # config.status only pays attention to the cache file if you give it
29066 # the --recheck option to rerun configure.
29068 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29069 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29070 # following values.
29074 # The following way of writing the cache mishandles newlines in values,
29075 # but we know of no workaround that is simple, portable, and efficient.
29076 # So, we kill variables containing newlines.
29077 # Ultrix sh set writes to stderr and can't be redirected directly,
29078 # and sets the high bit in the cache file unless we assign to the vars.
29080 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29081 eval ac_val=\$$ac_var
29085 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29086 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29089 _ | IFS | as_nl) ;; #(
29090 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29091 *) { eval $ac_var=; unset $ac_var;} ;;
29097 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29098 *${as_nl}ac_space=\ *)
29099 # `set' does not quote correctly, so add quotes: double-quote
29100 # substitution turns \\\\ into \\, and sed turns \\ into \.
29103 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29106 # `set' quotes correctly as required by POSIX, so do not add quotes.
29107 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29116 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29118 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29120 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29121 if test -w "$cache_file"; then
29122 if test "x$cache_file" != "x/dev/null"; then
29123 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29124 $as_echo "$as_me: updating cache $cache_file" >&6;}
29125 if test ! -f "$cache_file" || test -h "$cache_file"; then
29126 cat confcache >"$cache_file"
29128 case $cache_file in #(
29130 mv -f confcache "$cache_file"$$ &&
29131 mv -f "$cache_file"$$ "$cache_file" ;; #(
29133 mv -f confcache "$cache_file" ;;
29138 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29139 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29144 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29145 # Let make expand exec_prefix.
29146 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29148 DEFS=-DHAVE_CONFIG_H
29153 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29154 # 1. Remove the extension, and $U if already installed.
29155 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29156 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29157 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29158 # will be set to the directory where LIBOBJS objects are built.
29159 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29160 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29162 LIBOBJS=$ac_libobjs
29164 LTLIBOBJS=$ac_ltlibobjs
29167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
29168 $as_echo_n "checking that generated files are newer than configure... " >&6; }
29169 if test -n "$am_sleep_pid"; then
29170 # Hide warnings about reused PIDs.
29171 wait $am_sleep_pid 2>/dev/null
29173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
29174 $as_echo "done" >&6; }
29175 if test -n "$EXEEXT"; then
29177 am__EXEEXT_FALSE='#'
29179 am__EXEEXT_TRUE='#'
29183 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
29184 as_fn_error $? "conditional \"AMDEP\" was never defined.
29185 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29187 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
29188 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
29189 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29191 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
29192 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
29193 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29195 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
29196 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
29197 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29199 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29200 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29201 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29203 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
29204 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
29205 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29209 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
29210 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
29211 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29213 CONFIG_INCLUDE=lib/config.h
29215 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
29216 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
29217 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29219 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
29220 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
29221 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29223 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
29224 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
29225 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29230 if test -n "$gl_LIBOBJS"; then
29231 # Remove the extension.
29232 sed_drop_objext='s/\.o$//;s/\.obj$//'
29233 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29234 gl_libobjs="$gl_libobjs $i.$ac_objext"
29235 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29238 gl_LIBOBJS=$gl_libobjs
29240 gl_LTLIBOBJS=$gl_ltlibobjs
29246 if test -n "$gltests_LIBOBJS"; then
29247 # Remove the extension.
29248 sed_drop_objext='s/\.o$//;s/\.obj$//'
29249 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29250 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29251 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29254 gltests_LIBOBJS=$gltests_libobjs
29256 gltests_LTLIBOBJS=$gltests_ltlibobjs
29260 : "${CONFIG_STATUS=./config.status}"
29262 ac_clean_files_save=$ac_clean_files
29263 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29264 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29265 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29267 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29269 # Generated by $as_me.
29270 # Run this file to recreate the current configuration.
29271 # Compiler output produced by configure, useful for debugging
29272 # configure, is in config.log if it exists.
29275 ac_cs_recheck=false
29278 SHELL=\${CONFIG_SHELL-$SHELL}
29281 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29282 ## -------------------- ##
29283 ## M4sh Initialization. ##
29284 ## -------------------- ##
29286 # Be more Bourne compatible
29287 DUALCASE=1; export DUALCASE # for MKS sh
29288 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29291 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29292 # is contrary to our usage. Disable this feature.
29293 alias -g '${1+"$@"}'='"$@"'
29294 setopt NO_GLOB_SUBST
29296 case `(set -o) 2>/dev/null` in #(
29308 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29309 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29310 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29311 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29312 # Prefer a ksh shell builtin over an external printf program on Solaris,
29313 # but without wasting forks for bash or zsh.
29314 if test -z "$BASH_VERSION$ZSH_VERSION" \
29315 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29316 as_echo='print -r --'
29317 as_echo_n='print -rn --'
29318 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29319 as_echo='printf %s\n'
29320 as_echo_n='printf %s'
29322 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29323 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29324 as_echo_n='/usr/ucb/echo -n'
29326 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29327 as_echo_n_body='eval
29331 expr "X$arg" : "X\\(.*\\)$as_nl";
29332 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29334 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29336 export as_echo_n_body
29337 as_echo_n='sh -c $as_echo_n_body as_echo'
29339 export as_echo_body
29340 as_echo='sh -c $as_echo_body as_echo'
29343 # The user is always right.
29344 if test "${PATH_SEPARATOR+set}" != set; then
29346 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29347 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29354 # We need space, tab and new line, in precisely that order. Quoting is
29355 # there to prevent editors from complaining about space-tab.
29356 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29357 # splitting by setting IFS to empty value.)
29360 # Find who we are. Look in the path if we contain no directory separator.
29363 *[\\/]* ) as_myself=$0 ;;
29364 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29365 for as_dir in $PATH
29368 test -z "$as_dir" && as_dir=.
29369 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29375 # We did not find ourselves, most probably we were run as `sh COMMAND'
29376 # in which case we are not to be found in the path.
29377 if test "x$as_myself" = x; then
29380 if test ! -f "$as_myself"; then
29381 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29385 # Unset variables that we do not need and which cause bugs (e.g. in
29386 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29387 # suppresses any "Segmentation fault" message there. '((' could
29388 # trigger a bug in pdksh 5.2.14.
29389 for as_var in BASH_ENV ENV MAIL MAILPATH
29390 do eval test x\${$as_var+set} = xset \
29391 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29404 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29407 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29408 # ----------------------------------------
29409 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29410 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29411 # script with STATUS, using 1 if that was 0.
29414 as_status=$1; test $as_status -eq 0 && as_status=1
29416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29419 $as_echo "$as_me: error: $2" >&2
29420 as_fn_exit $as_status
29424 # as_fn_set_status STATUS
29425 # -----------------------
29426 # Set $? to STATUS, without forking.
29427 as_fn_set_status ()
29430 } # as_fn_set_status
29432 # as_fn_exit STATUS
29433 # -----------------
29434 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29438 as_fn_set_status $1
29444 # Portably unset VAR.
29447 { eval $1=; unset $1;}
29449 as_unset=as_fn_unset
29450 # as_fn_append VAR VALUE
29451 # ----------------------
29452 # Append the text in VALUE to the end of the definition contained in VAR. Take
29453 # advantage of any shell optimizations that allow amortized linear growth over
29454 # repeated appends, instead of the typical quadratic growth present in naive
29456 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29457 eval 'as_fn_append ()
29468 # as_fn_arith ARG...
29469 # ------------------
29470 # Perform arithmetic evaluation on the ARGs, and store the result in the
29471 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29472 # must be portable across $(()) and expr.
29473 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29474 eval 'as_fn_arith ()
29481 as_val=`expr "$@" || test $? -eq 1`
29486 if expr a : '\(a\)' >/dev/null 2>&1 &&
29487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29493 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29494 as_basename=basename
29499 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29505 as_me=`$as_basename -- "$0" ||
29506 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29507 X"$0" : 'X\(//\)$' \| \
29508 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29510 sed '/^.*\/\([^/][^/]*\)\/*$/{
29524 # Avoid depending upon Character Ranges.
29525 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29526 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29527 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29528 as_cr_digits='0123456789'
29529 as_cr_alnum=$as_cr_Letters$as_cr_digits
29531 ECHO_C= ECHO_N= ECHO_T=
29532 case `echo -n x` in #(((((
29534 case `echo 'xy\c'` in
29535 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29537 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29544 rm -f conf$$ conf$$.exe conf$$.file
29545 if test -d conf$$.dir; then
29546 rm -f conf$$.dir/conf$$.file
29549 mkdir conf$$.dir 2>/dev/null
29551 if (echo >conf$$.file) 2>/dev/null; then
29552 if ln -s conf$$.file conf$$ 2>/dev/null; then
29554 # ... but there are two gotchas:
29555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29557 # In both cases, we have to default to `cp -pR'.
29558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29560 elif ln conf$$.file conf$$ 2>/dev/null; then
29568 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29569 rmdir conf$$.dir 2>/dev/null
29574 # Create "$as_dir" as a directory, including parents if necessary.
29579 -*) as_dir=./$as_dir;;
29581 test -d "$as_dir" || eval $as_mkdir_p || {
29585 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29586 *) as_qdir=$as_dir;;
29588 as_dirs="'$as_qdir' $as_dirs"
29589 as_dir=`$as_dirname -- "$as_dir" ||
29590 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29591 X"$as_dir" : 'X\(//\)[^/]' \| \
29592 X"$as_dir" : 'X\(//\)$' \| \
29593 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29594 $as_echo X"$as_dir" |
29595 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29599 /^X\(\/\/\)[^/].*/{
29612 test -d "$as_dir" && break
29614 test -z "$as_dirs" || eval "mkdir $as_dirs"
29615 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29619 if mkdir -p . 2>/dev/null; then
29620 as_mkdir_p='mkdir -p "$as_dir"'
29622 test -d ./-p && rmdir ./-p
29627 # as_fn_executable_p FILE
29628 # -----------------------
29629 # Test if FILE is an executable regular file.
29630 as_fn_executable_p ()
29632 test -f "$1" && test -x "$1"
29633 } # as_fn_executable_p
29634 as_test_x='test -x'
29635 as_executable_p=as_fn_executable_p
29637 # Sed expression to map a string onto a valid CPP name.
29638 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29640 # Sed expression to map a string onto a valid variable name.
29641 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29645 ## ----------------------------------- ##
29646 ## Main body of $CONFIG_STATUS script. ##
29647 ## ----------------------------------- ##
29649 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29651 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29652 # Save the log message, to keep $0 and so on meaningful, and to
29653 # report actual input values of CONFIG_FILES etc. instead of their
29654 # values after options handling.
29656 This file was extended by gzip $as_me 1.5, which was
29657 generated by GNU Autoconf 2.69.4-560f. Invocation command line was
29659 CONFIG_FILES = $CONFIG_FILES
29660 CONFIG_HEADERS = $CONFIG_HEADERS
29661 CONFIG_LINKS = $CONFIG_LINKS
29662 CONFIG_COMMANDS = $CONFIG_COMMANDS
29665 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29670 case $ac_config_files in *"
29671 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29674 case $ac_config_headers in *"
29675 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29680 # Files that config.status was made for.
29681 config_files="$ac_config_files"
29682 config_headers="$ac_config_headers"
29683 config_links="$ac_config_links"
29684 config_commands="$ac_config_commands"
29688 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29690 \`$as_me' instantiates files and other configuration actions
29691 from templates according to the current configuration. Unless the files
29692 and actions are specified as TAGs, all are instantiated by default.
29694 Usage: $0 [OPTION]... [TAG]...
29696 -h, --help print this help, then exit
29697 -V, --version print version number and configuration settings, then exit
29698 --config print configuration, then exit
29699 -q, --quiet, --silent
29700 do not print progress messages
29701 -d, --debug don't remove temporary files
29702 --recheck update $as_me by reconfiguring in the same conditions
29703 --file=FILE[:TEMPLATE]
29704 instantiate the configuration file FILE
29705 --header=FILE[:TEMPLATE]
29706 instantiate the configuration header FILE
29708 Configuration files:
29711 Configuration headers:
29714 Configuration links:
29717 Configuration commands:
29720 Report bugs to <bug-gzip@gnu.org>."
29723 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29724 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29726 gzip config.status 1.5
29727 configured by $0, generated by GNU Autoconf 2.69.4-560f,
29728 with options \\"\$ac_cs_config\\"
29730 Copyright (C) 2012 Free Software Foundation, Inc.
29731 This config.status script is free software; the Free Software Foundation
29732 gives unlimited permission to copy, distribute and modify it."
29739 test -n "\$AWK" || AWK=awk
29742 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29743 # The default lists apply if the user does not specify any file.
29749 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29750 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29754 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29766 # Handling of the options.
29767 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29769 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29770 $as_echo "$ac_cs_version"; exit ;;
29771 --config | --confi | --conf | --con | --co | --c )
29772 $as_echo "$ac_cs_config"; exit ;;
29773 --debug | --debu | --deb | --de | --d | -d )
29775 --file | --fil | --fi | --f )
29778 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29779 '') as_fn_error $? "missing file argument" ;;
29781 as_fn_append CONFIG_FILES " '$ac_optarg'"
29782 ac_need_defaults=false;;
29783 --header | --heade | --head | --hea )
29786 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29788 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29789 ac_need_defaults=false;;
29791 # Conflict between --help and --header
29792 as_fn_error $? "ambiguous option: \`$1'
29793 Try \`$0 --help' for more information.";;
29794 --help | --hel | -h )
29795 $as_echo "$ac_cs_usage"; exit ;;
29796 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29797 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29800 # This is an error.
29801 -*) as_fn_error $? "unrecognized option: \`$1'
29802 Try \`$0 --help' for more information." ;;
29804 *) as_fn_append ac_config_targets " $1"
29805 ac_need_defaults=false ;;
29811 ac_configure_extra_args=
29813 if $ac_cs_silent; then
29815 ac_configure_extra_args="$ac_configure_extra_args --silent"
29819 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29820 if \$ac_cs_recheck; then
29821 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29823 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29824 CONFIG_SHELL='$SHELL'
29825 export CONFIG_SHELL
29830 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29834 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29835 ## Running $as_me. ##
29841 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29845 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29846 GNUmakefile=$GNUmakefile
29850 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29852 # Handling of arguments.
29853 for ac_config_target in $ac_config_targets
29855 case $ac_config_target in
29856 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
29857 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29858 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
29859 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29860 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
29861 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29862 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
29864 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29869 # If the user did not use the arguments to specify the items to instantiate,
29870 # then the envvar interface is used. Set only those that are not.
29871 # We use the long form for the default assignment because of an extremely
29872 # bizarre bug on SunOS 4.1.3.
29873 if $ac_need_defaults; then
29874 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29875 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29876 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
29877 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29880 # Have a temporary directory for convenience. Make it in the build tree
29881 # simply because there is no reason against having it here, and in addition,
29882 # creating and moving files from /tmp can sometimes cause problems.
29883 # Hook for its removal unless debugging.
29884 # Note that there is a small window in which the directory will not be cleaned:
29885 # after its creation but before its name has been assigned to `$tmp'.
29889 trap 'exit_status=$?
29890 : "${ac_tmp:=$tmp}"
29891 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29893 trap 'as_fn_exit 1' 1 2 13 15
29895 # Create a (secure) tmp directory for tmp files.
29898 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29902 tmp=./conf$$-$RANDOM
29903 (umask 077 && mkdir "$tmp")
29904 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29907 # Set up the scripts for CONFIG_FILES section.
29908 # No need to generate them if there are no CONFIG_FILES.
29909 # This happens for instance with `./config.status config.h'.
29910 if test -n "$CONFIG_FILES"; then
29913 ac_cr=`echo X | tr X '\015'`
29914 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29915 # But we know of no other shell where ac_cr would be empty at this
29916 # point, so we can use a bashism as a fallback.
29917 if test "x$ac_cr" = x; then
29918 eval ac_cr=\$\'\\r\'
29920 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29921 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29924 ac_cs_awk_cr=$ac_cr
29927 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29932 echo "cat >conf$$subs.awk <<_ACEOF" &&
29933 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29935 } >conf$$subs.sh ||
29936 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29937 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29939 for ac_last_try in false false false false false :; do
29940 . ./conf$$subs.sh ||
29941 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29943 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29944 if test $ac_delim_n = $ac_delim_num; then
29946 elif $ac_last_try; then
29947 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29949 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29952 rm -f conf$$subs.sh
29954 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29955 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29959 s/^/S["/; s/!.*/"]=/
29969 s/\(.\{148\}\)..*/\1/
29971 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29976 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29983 s/\(.\{148\}\)..*/\1/
29985 s/["\\]/\\&/g; s/^/"/; s/$/"/
29989 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29994 ' <conf$$subs.awk | sed '
29999 ' >>$CONFIG_STATUS || ac_write_fail=1
30000 rm -f conf$$subs.awk
30001 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30003 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
30004 for (key in S) S_is_set[key] = 1
30010 nfields = split(line, field, "@")
30012 len = length(field[1])
30013 for (i = 2; i < nfields; i++) {
30015 keylen = length(key)
30016 if (S_is_set[key]) {
30018 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30019 len += length(value) + length(field[++i])
30030 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30031 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30032 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30035 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
30036 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
30039 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
30040 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
30041 # trailing colons and then remove the whole line if VPATH becomes empty
30042 # (actually we leave an empty line to preserve line numbers).
30043 if test "x$srcdir" = x.; then
30044 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
30062 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30063 fi # test -n "$CONFIG_FILES"
30065 # Set up the scripts for CONFIG_HEADERS section.
30066 # No need to generate them if there are no CONFIG_HEADERS.
30067 # This happens for instance with `./config.status Makefile'.
30068 if test -n "$CONFIG_HEADERS"; then
30069 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
30073 # Transform confdefs.h into an awk script `defines.awk', embedded as
30074 # here-document in config.status, that substitutes the proper values into
30075 # config.h.in to produce config.h.
30077 # Create a delimiter string that does not exist in confdefs.h, to ease
30078 # handling of long lines.
30080 for ac_last_try in false false :; do
30081 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
30082 if test -z "$ac_tt"; then
30084 elif $ac_last_try; then
30085 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
30087 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30091 # For the awk script, D is an array of macro values keyed by name,
30092 # likewise P contains macro parameters if any. Preserve backslash
30093 # newline sequences.
30095 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30097 s/.\{148\}/&'"$ac_delim"'/g
30100 s/^[ ]*#[ ]*define[ ][ ]*/ /
30107 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30109 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30113 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30114 D["\1"]=" \3\\\\\\n"\\/p
30116 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30121 s/.\{148\}/&'"$ac_delim"'/g
30126 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30129 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30131 ' <confdefs.h | sed '
30132 s/'"$ac_delim"'/"\\\
30133 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30136 for (key in D) D_is_set[key] = 1
30139 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30141 split(line, arg, " ")
30142 if (arg[1] == "#") {
30146 defundef = substr(arg[1], 2)
30149 split(mac1, mac2, "(") #)
30151 prefix = substr(line, 1, index(line, defundef) - 1)
30152 if (D_is_set[macro]) {
30153 # Preserve the white space surrounding the "#".
30154 print prefix "define", macro P[macro] D[macro]
30157 # Replace #undef with comments. This is necessary, for example,
30158 # in the case of _POSIX_SOURCE, which is predefined and required
30159 # on some systems where configure will not decide to define it.
30160 if (defundef == "undef") {
30161 print "/*", prefix defundef, macro, "*/"
30169 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30170 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
30171 fi # test -n "$CONFIG_HEADERS"
30174 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
30179 :[FHLC]) ac_mode=$ac_tag; continue;;
30181 case $ac_mode$ac_tag in
30183 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
30184 :[FH]-) ac_tag=-:-;;
30185 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30202 -) ac_f="$ac_tmp/stdin";;
30203 *) # Look for the file first in the build tree, then in the source tree
30204 # (if the path is not absolute). The absolute path cannot be DOS-style,
30205 # because $ac_f cannot contain `:'.
30209 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30211 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30213 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30214 as_fn_append ac_file_inputs " '$ac_f'"
30217 # Let's still pretend it is `configure' which instantiates (i.e., don't
30218 # use $as_me), people would be surprised to read:
30219 # /* config.h. Generated by config.status. */
30220 configure_input='Generated from '`
30221 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30223 if test x"$ac_file" != x-; then
30224 configure_input="$ac_file. $configure_input"
30225 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30226 $as_echo "$as_me: creating $ac_file" >&6;}
30228 # Neutralize special characters interpreted by sed in replacement strings.
30229 case $configure_input in #(
30230 *\&* | *\|* | *\\* )
30231 ac_sed_conf_input=`$as_echo "$configure_input" |
30232 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30233 *) ac_sed_conf_input=$configure_input;;
30237 *:-:* | *:-) cat >"$ac_tmp/stdin" \
30238 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
30243 ac_dir=`$as_dirname -- "$ac_file" ||
30244 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30245 X"$ac_file" : 'X\(//\)[^/]' \| \
30246 X"$ac_file" : 'X\(//\)$' \| \
30247 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30248 $as_echo X"$ac_file" |
30249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30253 /^X\(\/\/\)[^/].*/{
30266 as_dir="$ac_dir"; as_fn_mkdir_p
30270 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30272 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30273 # A ".." for each directory in $ac_dir_suffix.
30274 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30275 case $ac_top_builddir_sub in
30276 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30277 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30280 ac_abs_top_builddir=$ac_pwd
30281 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30282 # for backward compatibility:
30283 ac_top_builddir=$ac_top_build_prefix
30286 .) # We are building in place.
30288 ac_top_srcdir=$ac_top_builddir_sub
30289 ac_abs_top_srcdir=$ac_pwd ;;
30290 [\\/]* | ?:[\\/]* ) # Absolute name.
30291 ac_srcdir=$srcdir$ac_dir_suffix;
30292 ac_top_srcdir=$srcdir
30293 ac_abs_top_srcdir=$srcdir ;;
30294 *) # Relative name.
30295 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30296 ac_top_srcdir=$ac_top_build_prefix$srcdir
30297 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30299 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30309 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30310 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30312 ac_MKDIR_P=$MKDIR_P
30314 [\\/$]* | ?:[\\/]* ) ;;
30315 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30319 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30320 # If the template does not know about datarootdir, expand it.
30321 # FIXME: This hack should be removed a few years after 2.60.
30322 ac_datarootdir_hack=; ac_datarootdir_seen=
30333 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30334 *datarootdir*) ac_datarootdir_seen=yes;;
30335 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30336 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30337 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30339 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30340 ac_datarootdir_hack='
30341 s&@datadir@&$datadir&g
30342 s&@docdir@&$docdir&g
30343 s&@infodir@&$infodir&g
30344 s&@localedir@&$localedir&g
30345 s&@mandir@&$mandir&g
30346 s&\\\${datarootdir}&$datarootdir&g' ;;
30350 # Neutralize VPATH when `$srcdir' = `.'.
30351 # Shell code in configure.ac might set extrasub.
30352 # FIXME: do we really want to maintain this feature?
30353 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30354 ac_sed_extra="$ac_vpsub
30357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30359 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30360 s|@configure_input@|$ac_sed_conf_input|;t t
30361 s&@top_builddir@&$ac_top_builddir_sub&;t t
30362 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30363 s&@srcdir@&$ac_srcdir&;t t
30364 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30365 s&@top_srcdir@&$ac_top_srcdir&;t t
30366 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30367 s&@builddir@&$ac_builddir&;t t
30368 s&@abs_builddir@&$ac_abs_builddir&;t t
30369 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30370 s&@INSTALL@&$ac_INSTALL&;t t
30371 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30372 $ac_datarootdir_hack
30374 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30375 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30377 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30378 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30379 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
30380 "$ac_tmp/out"`; test -z "$ac_out"; } &&
30381 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30382 which seems to be undefined. Please make sure it is defined" >&5
30383 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30384 which seems to be undefined. Please make sure it is defined" >&2;}
30386 rm -f "$ac_tmp/stdin"
30388 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30389 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30391 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30397 if test x"$ac_file" != x-; then
30399 $as_echo "/* $configure_input */" \
30400 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30401 } >"$ac_tmp/config.h" \
30402 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30403 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30404 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30405 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30408 mv "$ac_tmp/config.h" "$ac_file" \
30409 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30412 $as_echo "/* $configure_input */" \
30413 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30414 || as_fn_error $? "could not create -" "$LINENO" 5
30416 # Compute "$ac_file"'s index in $config_headers.
30419 for _am_header in $config_headers :; do
30420 case $_am_header in
30421 $_am_arg | $_am_arg:* )
30424 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30427 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30428 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30429 X"$_am_arg" : 'X\(//\)[^/]' \| \
30430 X"$_am_arg" : 'X\(//\)$' \| \
30431 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30432 $as_echo X"$_am_arg" |
30433 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30437 /^X\(\/\/\)[^/].*/{
30449 s/.*/./; q'`/stamp-h$_am_stamp_count
30456 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
30459 # Prefer the file from the source tree if names are identical.
30460 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
30461 ac_source=$srcdir/$ac_source
30464 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
30465 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
30467 if test ! -r "$ac_source"; then
30468 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
30472 # Try a relative symlink, then a hard link, then a copy.
30474 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
30475 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
30477 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
30478 ln "$ac_source" "$ac_file" 2>/dev/null ||
30479 cp -p "$ac_source" "$ac_file" ||
30480 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
30483 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30484 $as_echo "$as_me: executing $ac_file commands" >&6;}
30489 case $ac_file$ac_mode in
30490 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30491 # Older Autoconf quotes --file arguments for eval, but not when files
30492 # are listed without --file. Let's play safe and only enable the eval
30493 # if we detect the quoting.
30494 case $CONFIG_FILES in
30495 *\'*) eval set x "$CONFIG_FILES" ;;
30496 *) set x $CONFIG_FILES ;;
30501 # Strip MF so we end up with the name of the file.
30502 mf=`echo "$mf" | sed -e 's/:.*$//'`
30503 # Check whether this is an Automake generated Makefile or not.
30504 # We used to match only the files named 'Makefile.in', but
30505 # some people rename them; so instead we look at the file content.
30506 # Grep'ing the first line is not enough: some people post-process
30507 # each Makefile.in and add a new line on top of each file to say so.
30508 # Grep'ing the whole file is not good either: AIX grep has a line
30509 # limit of 2048, but all sed's we know have understand at least 4000.
30510 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30511 dirpart=`$as_dirname -- "$mf" ||
30512 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30513 X"$mf" : 'X\(//\)[^/]' \| \
30514 X"$mf" : 'X\(//\)$' \| \
30515 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30517 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30521 /^X\(\/\/\)[^/].*/{
30537 # Extract the definition of DEPDIR, am__include, and am__quote
30538 # from the Makefile without running 'make'.
30539 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30540 test -z "$DEPDIR" && continue
30541 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30542 test -z "am__include" && continue
30543 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30544 # Find all dependency output files, they are included files with
30545 # $(DEPDIR) in their names. We invoke sed twice because it is the
30546 # simplest approach to changing $(DEPDIR) to its actual value in the
30548 for file in `sed -n "
30549 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30550 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
30551 # Make sure the directory exists.
30552 test -f "$dirpart/$file" && continue
30553 fdir=`$as_dirname -- "$file" ||
30554 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30555 X"$file" : 'X\(//\)[^/]' \| \
30556 X"$file" : 'X\(//\)$' \| \
30557 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30558 $as_echo X"$file" |
30559 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30563 /^X\(\/\/\)[^/].*/{
30576 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30577 # echo "creating $dirpart/$file"
30578 echo '# dummy' > "$dirpart/$file"
30590 ac_clean_files=$ac_clean_files_save
30592 test $ac_write_fail = 0 ||
30593 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30596 # configure is writing to config.log, and then calls config.status.
30597 # config.status does its own redirection, appending to config.log.
30598 # Unfortunately, on DOS this fails, as config.log is still kept open
30599 # by configure, so config.status won't be able to write to it; its
30600 # output is simply discarded. So we exec the FD to /dev/null,
30601 # effectively closing config.log, so it can be properly (re)opened and
30602 # appended to by config.status. When coming back to configure, we
30603 # need to make the FD available again.
30604 if test "$no_create" != yes; then
30606 ac_config_status_args=
30607 test "$silent" = yes &&
30608 ac_config_status_args="$ac_config_status_args --quiet"
30610 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30612 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30613 # would make configure fail if this is the last instruction.
30614 $ac_cs_success || as_fn_exit 1
30616 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30618 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}