2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.197-b8fd7 for gzip 1.10.
5 # Report bugs to <bug-gzip@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2017 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
28 case `(set -o) 2>/dev/null` in #(
37 # The user is always right.
38 if ${PATH_SEPARATOR+false} :; then
40 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
41 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48 # We need space, tab and new line, in precisely that order. Quoting is
49 # there to prevent editors from complaining about space-tab.
50 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51 # splitting by setting IFS to empty value.)
57 # Find who we are. Look in the path if we contain no directory separator.
60 *[\\/]* ) as_myself=$0 ;;
61 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
70 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
76 # We did not find ourselves, most probably we were run as `sh COMMAND'
77 # in which case we are not to be found in the path.
78 if test "x$as_myself" = x; then
81 if test ! -f "$as_myself"; then
82 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
86 # Unset variables that we do not need and which cause bugs (e.g. in
87 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
88 # suppresses any "Segmentation fault" message there. '((' could
89 # trigger a bug in pdksh 5.2.14.
90 for as_var in BASH_ENV ENV MAIL MAILPATH
91 do eval test \${$as_var+y} \
92 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
105 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
107 # Use a proper internal environment variable to ensure we don't fall
108 # into an infinite loop, continuously re-executing ourselves.
109 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
110 _as_can_reexec=no; export _as_can_reexec;
111 # We cannot yet assume a decent shell, so we have to provide a
112 # neutralization value for shells without unset; and this also
113 # works around shells that cannot unset nonexistent variables.
114 # Preserve -v and -x to the replacement shell.
117 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
119 *v*x* | *x*v* ) as_opts=-vx ;;
124 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
125 # Admittedly, this is quite paranoid, since all the known shells bail
126 # out after a failed `exec'.
127 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
130 # We don't want this to propagate to other subprocesses.
131 { _as_can_reexec=; unset _as_can_reexec;}
132 if test "x$CONFIG_SHELL" = x; then
133 as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
137 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
138 # is contrary to our usage. Disable this feature.
139 alias -g '\${1+\"\$@\"}'='\"\$@\"'
142 case \`(set -o) 2>/dev/null\` in #(
150 as_required="as_fn_return () { (exit \$1); }
151 as_fn_success () { as_fn_return 0; }
152 as_fn_failure () { as_fn_return 1; }
153 as_fn_ret_success () { return 0; }
154 as_fn_ret_failure () { return 1; }
157 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
158 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
159 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
160 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
161 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
165 exitcode=1; echo positional parameters were not saved.
167 test x\$exitcode = x0 || exit 1
169 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
170 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
171 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
172 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
173 test \$(( 1 + 1 )) = 2 || exit 1"
174 if (eval "$as_required") 2>/dev/null
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
192 *) as_dir=$as_dir/ ;;
197 for as_base in sh bash ksh sh5; do
198 # Try only shells that exist, to save several forks.
199 as_shell=$as_dir$as_base
200 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
201 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null
203 CONFIG_SHELL=$as_shell as_have_required=yes
204 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null
214 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
215 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null
217 CONFIG_SHELL=$SHELL as_have_required=yes
221 if test "x$CONFIG_SHELL" != x
224 # We cannot yet assume a decent shell, so we have to provide a
225 # neutralization value for shells without unset; and this also
226 # works around shells that cannot unset nonexistent variables.
227 # Preserve -v and -x to the replacement shell.
230 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
232 *v*x* | *x*v* ) as_opts=-vx ;;
237 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
238 # Admittedly, this is quite paranoid, since all the known shells bail
239 # out after a failed `exec'.
240 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
244 if test x$as_have_required = xno
246 printf "%s\n" "$0: This script requires a shell more modern than all"
247 printf "%s\n" "$0: the shells that I found on your system."
248 if test ${ZSH_VERSION+y} ; then
249 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
250 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
252 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-gzip@gnu.org
253 $0: about your system, including any error possibly output
254 $0: before this message. Then install a modern shell, or
255 $0: manually run the script under such a shell if you do
262 SHELL=${CONFIG_SHELL-/bin/sh}
264 # Unset more variables known to interfere with behavior of common tools.
265 CLICOLOR_FORCE= GREP_OPTIONS=
266 unset CLICOLOR_FORCE GREP_OPTIONS
268 ## --------------------- ##
269 ## M4sh Shell Functions. ##
270 ## --------------------- ##
273 # Portably unset VAR.
276 { eval $1=; unset $1;}
280 # as_fn_set_status STATUS
281 # -----------------------
282 # Set $? to STATUS, without forking.
290 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
300 # Create "$as_dir" as a directory, including parents if necessary.
305 -*) as_dir=./$as_dir;;
307 test -d "$as_dir" || eval $as_mkdir_p || {
311 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
314 as_dirs="'$as_qdir' $as_dirs"
315 as_dir=`$as_dirname -- "$as_dir" ||
316 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
317 X"$as_dir" : 'X\(//\)[^/]' \| \
318 X"$as_dir" : 'X\(//\)$' \| \
319 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
320 printf "%s\n" X"$as_dir" |
321 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
338 test -d "$as_dir" && break
340 test -z "$as_dirs" || eval "mkdir $as_dirs"
341 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
346 # as_fn_executable_p FILE
347 # -----------------------
348 # Test if FILE is an executable regular file.
349 as_fn_executable_p ()
351 test -f "$1" && test -x "$1"
352 } # as_fn_executable_p
353 # as_fn_append VAR VALUE
354 # ----------------------
355 # Append the text in VALUE to the end of the definition contained in VAR. Take
356 # advantage of any shell optimizations that allow amortized linear growth over
357 # repeated appends, instead of the typical quadratic growth present in naive
359 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
361 eval 'as_fn_append ()
374 # Perform arithmetic evaluation on the ARGs, and store the result in the
375 # global $as_val. Take advantage of shells that can avoid forks. The arguments
376 # must be portable across $(()) and expr.
377 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
386 as_val=`expr "$@" || test $? -eq 1`
391 # as_fn_error STATUS ERROR [LINENO LOG_FD]
392 # ----------------------------------------
393 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
394 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
395 # script with STATUS, using 1 if that was 0.
398 as_status=$1; test $as_status -eq 0 && as_status=1
400 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
401 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
403 printf "%s\n" "$as_me: error: $2" >&2
404 as_fn_exit $as_status
407 if expr a : '\(a\)' >/dev/null 2>&1 &&
408 test "X`expr 00001 : '.*\(...\)'`" = X001; then
414 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
420 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
426 as_me=`$as_basename -- "$0" ||
427 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
428 X"$0" : 'X\(//\)$' \| \
429 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
430 printf "%s\n" X/"$0" |
431 sed '/^.*\/\([^/][^/]*\)\/*$/{
445 # Avoid depending upon Character Ranges.
446 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
447 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
448 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
449 as_cr_digits='0123456789'
450 as_cr_alnum=$as_cr_Letters$as_cr_digits
453 as_lineno_1=$LINENO as_lineno_1a=$LINENO
454 as_lineno_2=$LINENO as_lineno_2a=$LINENO
455 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
456 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
457 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
469 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
473 chmod +x "$as_me.lineno" ||
474 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
476 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
477 # already done that, so ensure we don't try to do so again and fall
478 # in an infinite loop. This has already happened in practice.
479 _as_can_reexec=no; export _as_can_reexec
480 # Don't try to exec as it changes $[0], causing all sort of problems
481 # (the dirname of $[0] is not the place where we might find the
482 # original and so on. Autoconf is especially sensitive to this).
484 # Exit status is that of the last command.
488 ECHO_C= ECHO_N= ECHO_T=
489 case `echo -n x` in #(((((
491 case `echo 'xy\c'` in
492 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
494 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
501 rm -f conf$$ conf$$.exe conf$$.file
502 if test -d conf$$.dir; then
503 rm -f conf$$.dir/conf$$.file
506 mkdir conf$$.dir 2>/dev/null
508 if (echo >conf$$.file) 2>/dev/null; then
509 if ln -s conf$$.file conf$$ 2>/dev/null; then
511 # ... but there are two gotchas:
512 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
513 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
514 # In both cases, we have to default to `cp -pR'.
515 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
517 elif ln conf$$.file conf$$ 2>/dev/null; then
525 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
526 rmdir conf$$.dir 2>/dev/null
528 if mkdir -p . 2>/dev/null; then
529 as_mkdir_p='mkdir -p "$as_dir"'
531 test -d ./-p && rmdir ./-p
536 as_executable_p=as_fn_executable_p
538 # Sed expression to map a string onto a valid CPP name.
539 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
541 # Sed expression to map a string onto a valid variable name.
542 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
545 test -n "$DJDIR" || exec 7<&0 </dev/null
549 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
550 # so uname gets run too.
551 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
556 ac_default_prefix=/usr/local
558 ac_config_libobj_dir=.
565 # Identity of this package.
567 PACKAGE_TARNAME='gzip'
568 PACKAGE_VERSION='1.10'
569 PACKAGE_STRING='gzip 1.10'
570 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
573 ac_unique_file="gzip.c"
574 # Factoring default headers for most tests.
575 ac_includes_default="\
580 #ifdef HAVE_SYS_TYPES_H
581 # include <sys/types.h>
583 #ifdef HAVE_SYS_STAT_H
584 # include <sys/stat.h>
586 #ifdef HAVE_STRINGS_H
587 # include <strings.h>
589 #ifdef HAVE_INTTYPES_H
590 # include <inttypes.h>
600 gl_use_threads_default=
602 gl_getopt_required=POSIX
603 ac_subst_vars='gltests_LTLIBOBJS
623 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
719 GL_GENERATE_UTIME_H_FALSE
720 GL_GENERATE_UTIME_H_TRUE
723 NEXT_AS_FIRST_DIRECTIVE_UTIME_H
729 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
731 UNISTD_H_DEFINES_STRUCT_TIMESPEC
732 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
733 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
734 TIME_H_DEFINES_STRUCT_TIMESPEC
735 NEXT_AS_FIRST_DIRECTIVE_TIME_H
737 NEXT_AS_FIRST_DIRECTIVE_STRING_H
739 GL_GENERATE_STDNORETURN_H_FALSE
740 GL_GENERATE_STDNORETURN_H_TRUE
742 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
744 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
746 GL_GENERATE_STDINT_H_FALSE
747 GL_GENERATE_STDINT_H_TRUE
759 HAVE_SIGNED_SIG_ATOMIC_T
762 BITSIZEOF_SIG_ATOMIC_T
766 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
771 HAVE_UNSIGNED_LONG_LONG_INT
773 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
775 GL_GENERATE_STDDEF_H_FALSE
776 GL_GENERATE_STDDEF_H_TRUE
782 GL_GENERATE_STDBOOL_H_FALSE
783 GL_GENERATE_STDBOOL_H_TRUE
785 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
788 REPLACE_PTHREAD_SIGMASK
790 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
791 HAVE_STRUCT_SIGACTION_SA_SIGACTION
797 HAVE_POSIX_SIGNALBLOCKING
800 GNULIB_SIGNAL_H_SIGPIPE
802 GNULIB_PTHREAD_SIGMASK
878 GNULIB_EXPLICIT_BZERO
879 NEXT_AS_FIRST_DIRECTIVE_MATH_H
889 GL_GENERATE_LIMITS_H_FALSE
890 GL_GENERATE_LIMITS_H_TRUE
892 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
894 IGNORE_UNUSED_LIBRARIES_CFLAGS
911 HAVE_DECL_LOCALTIME_R
922 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
924 REPLACE_STRUCT_TIMEVAL
932 GNULIB_GL_UNISTD_H_GETOPT
937 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
939 WINDOWS_64_BIT_ST_SIZE
940 WINDOWS_STAT_TIMESPEC
941 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
963 GNULIB_OVERRIDES_STRUCT_STAT
979 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
990 REPLACE_SIGNBIT_USING_GCC
1067 HAVE_DECL_REMAINDERL
1249 GNULIB_OVERRIDES_WINT_T
1250 APPLE_UNIVERSAL_BUILD
1251 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1253 GL_GENERATE_FLOAT_H_FALSE
1254 GL_GENERATE_FLOAT_H_TRUE
1256 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1259 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1277 REPLACE_STDIO_WRITE_FUNCS
1278 REPLACE_STDIO_READ_FUNCS
1287 REPLACE_OBSTACK_PRINTF
1312 HAVE_DECL_OBSTACK_PRINTF
1318 GNULIB_VSPRINTF_POSIX
1320 GNULIB_VPRINTF_POSIX
1322 GNULIB_VFPRINTF_POSIX
1329 GNULIB_STDIO_H_SIGPIPE
1330 GNULIB_STDIO_H_NONBLOCKING
1331 GNULIB_SPRINTF_POSIX
1345 GNULIB_OBSTACK_PRINTF_POSIX
1346 GNULIB_OBSTACK_PRINTF
1362 GNULIB_FPRINTF_POSIX
1377 GL_GENERATE_ERRNO_H_FALSE
1378 GL_GENERATE_ERRNO_H_TRUE
1380 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1383 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1386 PRAGMA_SYSTEM_HEADER
1387 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1411 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1413 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1414 UNISTD_H_HAVE_WINSOCK2_H
1439 REPLACE_GETDTABLESIZE
1440 REPLACE_GETDOMAINNAME
1453 HAVE_DECL_SETHOSTNAME
1454 HAVE_DECL_GETUSERSHELL
1455 HAVE_DECL_GETPAGESIZE
1456 HAVE_DECL_GETLOGIN_R
1458 HAVE_DECL_GETDOMAINNAME
1498 GNULIB_UNISTD_H_SIGPIPE
1499 GNULIB_UNISTD_H_NONBLOCKING
1527 GNULIB_GETDTABLESIZE
1528 GNULIB_GETDOMAINNAME
1558 REPLACE_CANONICALIZE_FILE_NAME
1563 HAVE_STRUCT_RANDOM_DATA
1589 HAVE_DECL_GETLOADAVG
1590 HAVE_CANONICALIZE_FILE_NAME
1601 GNULIB_SECURE_GETENV
1604 GNULIB_REALLOC_POSIX
1623 GNULIB_CANONICALIZE_FILE_NAME
1627 GL_GENERATE_ALLOCA_H_FALSE
1628 GL_GENERATE_ALLOCA_H_TRUE
1631 GL_COND_LIBTOOL_FALSE
1632 GL_COND_LIBTOOL_TRUE
1666 AM_DEFAULT_VERBOSITY
1677 INSTALL_STRIP_PROGRAM
1720 program_transform_name
1734 enable_option_checking
1736 enable_dependency_tracking
1744 ac_precious_vars='build_alias
1755 # Initialize some variables set by options.
1757 ac_init_version=false
1758 ac_unrecognized_opts=
1759 ac_unrecognized_sep=
1760 # The variables have the same names as the options, with
1761 # dashes changed to underlines.
1762 cache_file=/dev/null
1769 program_transform_name=s,x,x,
1777 # Installation directory options.
1778 # These are left unexpanded so users can "make install exec_prefix=/foo"
1779 # and all the variables that are supposed to be based on exec_prefix
1780 # by default will actually change.
1781 # Use braces instead of parens because sh, perl, etc. also accept them.
1782 # (The list follows the same order as the GNU Coding Standards.)
1783 bindir='${exec_prefix}/bin'
1784 sbindir='${exec_prefix}/sbin'
1785 libexecdir='${exec_prefix}/libexec'
1786 datarootdir='${prefix}/share'
1787 datadir='${datarootdir}'
1788 sysconfdir='${prefix}/etc'
1789 sharedstatedir='${prefix}/com'
1790 localstatedir='${prefix}/var'
1791 runstatedir='${localstatedir}/run'
1792 includedir='${prefix}/include'
1793 oldincludedir='/usr/include'
1794 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1795 infodir='${datarootdir}/info'
1800 libdir='${exec_prefix}/lib'
1801 localedir='${datarootdir}/locale'
1802 mandir='${datarootdir}/man'
1808 # If the previous option needs an argument, assign it.
1809 if test -n "$ac_prev"; then
1810 eval $ac_prev=\$ac_option
1816 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1821 # Accept the important Cygnus configure options, so we can diagnose typos.
1823 case $ac_dashdash$ac_option in
1827 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1829 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1830 bindir=$ac_optarg ;;
1832 -build | --build | --buil | --bui | --bu)
1833 ac_prev=build_alias ;;
1834 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1835 build_alias=$ac_optarg ;;
1837 -cache-file | --cache-file | --cache-fil | --cache-fi \
1838 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1839 ac_prev=cache_file ;;
1840 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1841 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1842 cache_file=$ac_optarg ;;
1844 --config-cache | -C)
1845 cache_file=config.cache ;;
1847 -datadir | --datadir | --datadi | --datad)
1849 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1850 datadir=$ac_optarg ;;
1852 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1853 | --dataroo | --dataro | --datar)
1854 ac_prev=datarootdir ;;
1855 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1856 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1857 datarootdir=$ac_optarg ;;
1859 -disable-* | --disable-*)
1860 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1861 # Reject names that are not valid shell variable names.
1862 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1863 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1864 ac_useropt_orig=$ac_useropt
1865 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1866 case $ac_user_opts in
1868 "enable_$ac_useropt"
1870 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1871 ac_unrecognized_sep=', ';;
1873 eval enable_$ac_useropt=no ;;
1875 -docdir | --docdir | --docdi | --doc | --do)
1877 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1878 docdir=$ac_optarg ;;
1880 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1882 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1883 dvidir=$ac_optarg ;;
1885 -enable-* | --enable-*)
1886 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1887 # Reject names that are not valid shell variable names.
1888 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1889 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1890 ac_useropt_orig=$ac_useropt
1891 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1892 case $ac_user_opts in
1894 "enable_$ac_useropt"
1896 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1897 ac_unrecognized_sep=', ';;
1899 eval enable_$ac_useropt=\$ac_optarg ;;
1901 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1902 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1903 | --exec | --exe | --ex)
1904 ac_prev=exec_prefix ;;
1905 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1906 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1907 | --exec=* | --exe=* | --ex=*)
1908 exec_prefix=$ac_optarg ;;
1910 -gas | --gas | --ga | --g)
1911 # Obsolete; use --with-gas.
1914 -help | --help | --hel | --he | -h)
1915 ac_init_help=long ;;
1916 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1917 ac_init_help=recursive ;;
1918 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1919 ac_init_help=short ;;
1921 -host | --host | --hos | --ho)
1922 ac_prev=host_alias ;;
1923 -host=* | --host=* | --hos=* | --ho=*)
1924 host_alias=$ac_optarg ;;
1926 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1928 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1930 htmldir=$ac_optarg ;;
1932 -includedir | --includedir | --includedi | --included | --include \
1933 | --includ | --inclu | --incl | --inc)
1934 ac_prev=includedir ;;
1935 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1936 | --includ=* | --inclu=* | --incl=* | --inc=*)
1937 includedir=$ac_optarg ;;
1939 -infodir | --infodir | --infodi | --infod | --info | --inf)
1941 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1942 infodir=$ac_optarg ;;
1944 -libdir | --libdir | --libdi | --libd)
1946 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1947 libdir=$ac_optarg ;;
1949 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1950 | --libexe | --libex | --libe)
1951 ac_prev=libexecdir ;;
1952 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1953 | --libexe=* | --libex=* | --libe=*)
1954 libexecdir=$ac_optarg ;;
1956 -localedir | --localedir | --localedi | --localed | --locale)
1957 ac_prev=localedir ;;
1958 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1959 localedir=$ac_optarg ;;
1961 -localstatedir | --localstatedir | --localstatedi | --localstated \
1962 | --localstate | --localstat | --localsta | --localst | --locals)
1963 ac_prev=localstatedir ;;
1964 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1965 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1966 localstatedir=$ac_optarg ;;
1968 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1970 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1971 mandir=$ac_optarg ;;
1973 -nfp | --nfp | --nf)
1974 # Obsolete; use --without-fp.
1977 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1978 | --no-cr | --no-c | -n)
1981 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1982 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1985 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1986 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1987 | --oldin | --oldi | --old | --ol | --o)
1988 ac_prev=oldincludedir ;;
1989 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1990 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1991 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1992 oldincludedir=$ac_optarg ;;
1994 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1996 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1997 prefix=$ac_optarg ;;
1999 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2000 | --program-pre | --program-pr | --program-p)
2001 ac_prev=program_prefix ;;
2002 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2003 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2004 program_prefix=$ac_optarg ;;
2006 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2007 | --program-suf | --program-su | --program-s)
2008 ac_prev=program_suffix ;;
2009 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2010 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2011 program_suffix=$ac_optarg ;;
2013 -program-transform-name | --program-transform-name \
2014 | --program-transform-nam | --program-transform-na \
2015 | --program-transform-n | --program-transform- \
2016 | --program-transform | --program-transfor \
2017 | --program-transfo | --program-transf \
2018 | --program-trans | --program-tran \
2019 | --progr-tra | --program-tr | --program-t)
2020 ac_prev=program_transform_name ;;
2021 -program-transform-name=* | --program-transform-name=* \
2022 | --program-transform-nam=* | --program-transform-na=* \
2023 | --program-transform-n=* | --program-transform-=* \
2024 | --program-transform=* | --program-transfor=* \
2025 | --program-transfo=* | --program-transf=* \
2026 | --program-trans=* | --program-tran=* \
2027 | --progr-tra=* | --program-tr=* | --program-t=*)
2028 program_transform_name=$ac_optarg ;;
2030 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2032 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2033 pdfdir=$ac_optarg ;;
2035 -psdir | --psdir | --psdi | --psd | --ps)
2037 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2040 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2041 | -silent | --silent | --silen | --sile | --sil)
2044 -runstatedir | --runstatedir | --runstatedi | --runstated \
2045 | --runstate | --runstat | --runsta | --runst | --runs \
2046 | --run | --ru | --r)
2047 ac_prev=runstatedir ;;
2048 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2049 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2050 | --run=* | --ru=* | --r=*)
2051 runstatedir=$ac_optarg ;;
2053 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2055 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2057 sbindir=$ac_optarg ;;
2059 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2060 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2061 | --sharedst | --shareds | --shared | --share | --shar \
2063 ac_prev=sharedstatedir ;;
2064 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2065 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2066 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2068 sharedstatedir=$ac_optarg ;;
2070 -site | --site | --sit)
2072 -site=* | --site=* | --sit=*)
2075 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2077 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2078 srcdir=$ac_optarg ;;
2080 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2081 | --syscon | --sysco | --sysc | --sys | --sy)
2082 ac_prev=sysconfdir ;;
2083 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2084 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2085 sysconfdir=$ac_optarg ;;
2087 -target | --target | --targe | --targ | --tar | --ta | --t)
2088 ac_prev=target_alias ;;
2089 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2090 target_alias=$ac_optarg ;;
2092 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2095 -version | --version | --versio | --versi | --vers | -V)
2096 ac_init_version=: ;;
2099 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2100 # Reject names that are not valid shell variable names.
2101 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2102 as_fn_error $? "invalid package name: \`$ac_useropt'"
2103 ac_useropt_orig=$ac_useropt
2104 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2105 case $ac_user_opts in
2109 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2110 ac_unrecognized_sep=', ';;
2112 eval with_$ac_useropt=\$ac_optarg ;;
2114 -without-* | --without-*)
2115 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2116 # Reject names that are not valid shell variable names.
2117 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2118 as_fn_error $? "invalid package name: \`$ac_useropt'"
2119 ac_useropt_orig=$ac_useropt
2120 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2121 case $ac_user_opts in
2125 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2126 ac_unrecognized_sep=', ';;
2128 eval with_$ac_useropt=no ;;
2131 # Obsolete; use --with-x.
2134 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2135 | --x-incl | --x-inc | --x-in | --x-i)
2136 ac_prev=x_includes ;;
2137 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2138 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2139 x_includes=$ac_optarg ;;
2141 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2142 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2143 ac_prev=x_libraries ;;
2144 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2145 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2146 x_libraries=$ac_optarg ;;
2148 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2149 Try \`$0 --help' for more information"
2153 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2154 # Reject names that are not valid shell variable names.
2155 case $ac_envvar in #(
2156 '' | [0-9]* | *[!_$as_cr_alnum]* )
2157 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2159 eval $ac_envvar=\$ac_optarg
2160 export $ac_envvar ;;
2163 # FIXME: should be removed in autoconf 3.0.
2164 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2165 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2166 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2167 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2173 if test -n "$ac_prev"; then
2174 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2175 as_fn_error $? "missing argument to $ac_option"
2178 if test -n "$ac_unrecognized_opts"; then
2179 case $enable_option_checking in
2181 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2182 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2186 # Check all directory arguments for consistency.
2187 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2188 datadir sysconfdir sharedstatedir localstatedir includedir \
2189 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2190 libdir localedir mandir runstatedir
2192 eval ac_val=\$$ac_var
2193 # Remove trailing slashes.
2196 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2197 eval $ac_var=\$ac_val;;
2199 # Be sure to have absolute directory names.
2201 [\\/$]* | ?:[\\/]* ) continue;;
2202 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2204 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2207 # There might be people who depend on the old broken behavior: `$host'
2208 # used to hold the argument of --host etc.
2209 # FIXME: To remove some day.
2212 target=$target_alias
2214 # FIXME: To remove some day.
2215 if test "x$host_alias" != x; then
2216 if test "x$build_alias" = x; then
2217 cross_compiling=maybe
2218 elif test "x$build_alias" != "x$host_alias"; then
2224 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2226 test "$silent" = yes && exec 6>/dev/null
2229 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2230 ac_ls_di=`ls -di .` &&
2231 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2232 as_fn_error $? "working directory cannot be determined"
2233 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2234 as_fn_error $? "pwd does not report name of working directory"
2237 # Find the source files, if location was not specified.
2238 if test -z "$srcdir"; then
2239 ac_srcdir_defaulted=yes
2240 # Try the directory containing this script, then the parent directory.
2241 ac_confdir=`$as_dirname -- "$as_myself" ||
2242 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2243 X"$as_myself" : 'X\(//\)[^/]' \| \
2244 X"$as_myself" : 'X\(//\)$' \| \
2245 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2246 printf "%s\n" X"$as_myself" |
2247 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2265 if test ! -r "$srcdir/$ac_unique_file"; then
2269 ac_srcdir_defaulted=no
2271 if test ! -r "$srcdir/$ac_unique_file"; then
2272 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2273 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2275 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2277 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2279 # When building in place, set srcdir=.
2280 if test "$ac_abs_confdir" = "$ac_pwd"; then
2283 # Remove unnecessary trailing slashes from srcdir.
2284 # Double slashes in file names in object file debugging info
2285 # mess up M-x gdb in Emacs.
2287 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2289 for ac_var in $ac_precious_vars; do
2290 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2291 eval ac_env_${ac_var}_value=\$${ac_var}
2292 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2293 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2297 # Report the --help message.
2299 if test "$ac_init_help" = "long"; then
2300 # Omit some internal or obsolete options to make the list less imposing.
2301 # This message is too long to be a string in the A/UX 3.1 sh.
2303 \`configure' configures gzip 1.10 to adapt to many kinds of systems.
2305 Usage: $0 [OPTION]... [VAR=VALUE]...
2307 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2308 VAR=VALUE. See below for descriptions of some of the useful variables.
2310 Defaults for the options are specified in brackets.
2313 -h, --help display this help and exit
2314 --help=short display options specific to this package
2315 --help=recursive display the short help of all the included packages
2316 -V, --version display version information and exit
2317 -q, --quiet, --silent do not print \`checking ...' messages
2318 --cache-file=FILE cache test results in FILE [disabled]
2319 -C, --config-cache alias for \`--cache-file=config.cache'
2320 -n, --no-create do not create output files
2321 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2323 Installation directories:
2324 --prefix=PREFIX install architecture-independent files in PREFIX
2325 [$ac_default_prefix]
2326 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2329 By default, \`make install' will install all the files in
2330 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2331 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2332 for instance \`--prefix=\$HOME'.
2334 For better control, use the options below.
2336 Fine tuning of the installation directories:
2337 --bindir=DIR user executables [EPREFIX/bin]
2338 --sbindir=DIR system admin executables [EPREFIX/sbin]
2339 --libexecdir=DIR program executables [EPREFIX/libexec]
2340 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2341 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2342 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2343 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2344 --libdir=DIR object code libraries [EPREFIX/lib]
2345 --includedir=DIR C header files [PREFIX/include]
2346 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2347 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2348 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2349 --infodir=DIR info documentation [DATAROOTDIR/info]
2350 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2351 --mandir=DIR man documentation [DATAROOTDIR/man]
2352 --docdir=DIR documentation root [DATAROOTDIR/doc/gzip]
2353 --htmldir=DIR html documentation [DOCDIR]
2354 --dvidir=DIR dvi documentation [DOCDIR]
2355 --pdfdir=DIR pdf documentation [DOCDIR]
2356 --psdir=DIR ps documentation [DOCDIR]
2362 --program-prefix=PREFIX prepend PREFIX to installed program names
2363 --program-suffix=SUFFIX append SUFFIX to installed program names
2364 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2367 --build=BUILD configure for building on BUILD [guessed]
2368 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2372 if test -n "$ac_init_help"; then
2373 case $ac_init_help in
2374 short | recursive ) echo "Configuration of gzip 1.10:";;
2379 --disable-option-checking ignore unrecognized --enable/--with options
2380 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2381 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2382 --enable-silent-rules less verbose build output (undo: "make V=1")
2383 --disable-silent-rules verbose build output (undo: "make V=0")
2384 --enable-dependency-tracking
2385 do not reject slow dependency extractors
2386 --disable-dependency-tracking
2387 speeds up one-time build
2388 --disable-largefile omit support for large files
2389 --enable-threads={posix|solaris|pth|windows}
2390 specify multithreading API
2391 --disable-threads build without multithread safety
2392 --disable-rpath do not hardcode runtime library paths
2393 --enable-gcc-warnings turn on many GCC warnings (for developers; best with
2397 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2398 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2399 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2400 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2401 --without-libpth-prefix don't search for libpth in includedir and libdir
2403 Some influential environment variables:
2404 CC C compiler command
2405 CFLAGS C compiler flags
2406 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2407 nonstandard directory <lib dir>
2408 LIBS libraries to pass to the linker, e.g. -l<library>
2409 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2410 you have headers in a nonstandard directory <include dir>
2413 Use these variables to override the choices made by `configure' or to help
2414 it to find libraries and programs with nonstandard names/locations.
2416 Report bugs to <bug-gzip@gnu.org>.
2421 if test "$ac_init_help" = "recursive"; then
2422 # If there are subdirs, report their specific --help.
2423 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2424 test -d "$ac_dir" ||
2425 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2430 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2432 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2433 # A ".." for each directory in $ac_dir_suffix.
2434 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2435 case $ac_top_builddir_sub in
2436 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2437 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2440 ac_abs_top_builddir=$ac_pwd
2441 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2442 # for backward compatibility:
2443 ac_top_builddir=$ac_top_build_prefix
2446 .) # We are building in place.
2448 ac_top_srcdir=$ac_top_builddir_sub
2449 ac_abs_top_srcdir=$ac_pwd ;;
2450 [\\/]* | ?:[\\/]* ) # Absolute name.
2451 ac_srcdir=$srcdir$ac_dir_suffix;
2452 ac_top_srcdir=$srcdir
2453 ac_abs_top_srcdir=$srcdir ;;
2455 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2456 ac_top_srcdir=$ac_top_build_prefix$srcdir
2457 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2459 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2461 cd "$ac_dir" || { ac_status=$?; continue; }
2462 # Check for guested configure.
2463 if test -f "$ac_srcdir/configure.gnu"; then
2465 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2466 elif test -f "$ac_srcdir/configure"; then
2468 $SHELL "$ac_srcdir/configure" --help=recursive
2470 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2472 cd "$ac_pwd" || { ac_status=$?; break; }
2476 test -n "$ac_init_help" && exit $ac_status
2477 if $ac_init_version; then
2480 generated by GNU Autoconf 2.69.197-b8fd7
2482 Copyright (C) 2017 Free Software Foundation, Inc.
2483 This configure script is free software; the Free Software Foundation
2484 gives unlimited permission to copy, distribute and modify it.
2489 ## ------------------------ ##
2490 ## Autoconf initialization. ##
2491 ## ------------------------ ##
2493 # ac_fn_c_try_compile LINENO
2494 # --------------------------
2495 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2496 ac_fn_c_try_compile ()
2498 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2499 rm -f conftest.$ac_objext
2500 if { { ac_try="$ac_compile"
2502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2503 *) ac_try_echo=$ac_try;;
2505 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2506 printf "%s\n" "$ac_try_echo"; } >&5
2507 (eval "$ac_compile") 2>conftest.err
2509 if test -s conftest.err; then
2510 grep -v '^ *+' conftest.err >conftest.er1
2511 cat conftest.er1 >&5
2512 mv -f conftest.er1 conftest.err
2514 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2515 test $ac_status = 0; } && {
2516 test -z "$ac_c_werror_flag" ||
2517 test ! -s conftest.err
2518 } && test -s conftest.$ac_objext
2522 printf "%s\n" "$as_me: failed program was:" >&5
2523 sed 's/^/| /' conftest.$ac_ext >&5
2527 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2528 as_fn_set_status $ac_retval
2530 } # ac_fn_c_try_compile
2532 # ac_fn_c_try_cpp LINENO
2533 # ----------------------
2534 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2537 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2538 if { { ac_try="$ac_cpp conftest.$ac_ext"
2540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2541 *) ac_try_echo=$ac_try;;
2543 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2544 printf "%s\n" "$ac_try_echo"; } >&5
2545 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2547 if test -s conftest.err; then
2548 grep -v '^ *+' conftest.err >conftest.er1
2549 cat conftest.er1 >&5
2550 mv -f conftest.er1 conftest.err
2552 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2553 test $ac_status = 0; } > conftest.i && {
2554 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2555 test ! -s conftest.err
2560 printf "%s\n" "$as_me: failed program was:" >&5
2561 sed 's/^/| /' conftest.$ac_ext >&5
2565 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2566 as_fn_set_status $ac_retval
2570 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2571 # -------------------------------------------------------
2572 # Tests whether HEADER exists and can be compiled using the include files in
2573 # INCLUDES, setting the cache variable VAR accordingly.
2574 ac_fn_c_check_header_compile ()
2576 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2578 printf %s "checking for $2... " >&6; }
2579 if eval test \${$3+y}
2581 printf %s "(cached) " >&6
2583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2584 /* end confdefs.h. */
2588 if ac_fn_c_try_compile "$LINENO"
2594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2598 printf "%s\n" "$ac_res" >&6; }
2599 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601 } # ac_fn_c_check_header_compile
2603 # ac_fn_c_try_link LINENO
2604 # -----------------------
2605 # Try to link conftest.$ac_ext, and return whether this succeeded.
2608 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2609 rm -f conftest.$ac_objext conftest$ac_exeext
2610 if { { ac_try="$ac_link"
2612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2613 *) ac_try_echo=$ac_try;;
2615 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2616 printf "%s\n" "$ac_try_echo"; } >&5
2617 (eval "$ac_link") 2>conftest.err
2619 if test -s conftest.err; then
2620 grep -v '^ *+' conftest.err >conftest.er1
2621 cat conftest.er1 >&5
2622 mv -f conftest.er1 conftest.err
2624 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2625 test $ac_status = 0; } && {
2626 test -z "$ac_c_werror_flag" ||
2627 test ! -s conftest.err
2628 } && test -s conftest$ac_exeext && {
2629 test "$cross_compiling" = yes ||
2630 test -x conftest$ac_exeext
2635 printf "%s\n" "$as_me: failed program was:" >&5
2636 sed 's/^/| /' conftest.$ac_ext >&5
2640 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2641 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2642 # interfere with the next link command; also delete a directory that is
2643 # left behind by Apple's compiler. We do this before executing the actions.
2644 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2645 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2646 as_fn_set_status $ac_retval
2648 } # ac_fn_c_try_link
2650 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2651 # -------------------------------------------
2652 # Tests whether TYPE exists after having included INCLUDES, setting cache
2653 # variable VAR accordingly.
2654 ac_fn_c_check_type ()
2656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2658 printf %s "checking for $2... " >&6; }
2659 if eval test \${$3+y}
2661 printf %s "(cached) " >&6
2664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2665 /* end confdefs.h. */
2676 if ac_fn_c_try_compile "$LINENO"
2678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679 /* end confdefs.h. */
2690 if ac_fn_c_try_compile "$LINENO"
2696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2702 printf "%s\n" "$ac_res" >&6; }
2703 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2705 } # ac_fn_c_check_type
2707 # ac_fn_c_check_func LINENO FUNC VAR
2708 # ----------------------------------
2709 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2710 ac_fn_c_check_func ()
2712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2714 printf %s "checking for $2... " >&6; }
2715 if eval test \${$3+y}
2717 printf %s "(cached) " >&6
2719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2720 /* end confdefs.h. */
2721 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2722 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2723 #define $2 innocuous_$2
2725 /* System header to define __stub macros and hopefully few prototypes,
2726 which can conflict with char $2 (); below. */
2731 /* Override any GCC internal prototype to avoid an error.
2732 Use char because int might match the return type of a GCC
2733 builtin and then its argument prototype would still apply. */
2738 /* The GNU C library defines this for functions which it implements
2739 to always fail with ENOSYS. Some functions are actually named
2740 something starting with __ and the normal name is an alias. */
2741 #if defined __stub_$2 || defined __stub___$2
2753 if ac_fn_c_try_link "$LINENO"
2759 rm -f core conftest.err conftest.$ac_objext \
2760 conftest$ac_exeext conftest.$ac_ext
2763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764 printf "%s\n" "$ac_res" >&6; }
2765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2767 } # ac_fn_c_check_func
2769 # ac_fn_c_try_run LINENO
2770 # ----------------------
2771 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2772 # executables *can* be run.
2775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2776 if { { ac_try="$ac_link"
2778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2779 *) ac_try_echo=$ac_try;;
2781 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2782 printf "%s\n" "$ac_try_echo"; } >&5
2783 (eval "$ac_link") 2>&5
2785 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2786 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2787 { { case "(($ac_try" in
2788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2789 *) ac_try_echo=$ac_try;;
2791 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2792 printf "%s\n" "$ac_try_echo"; } >&5
2793 (eval "$ac_try") 2>&5
2795 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2796 test $ac_status = 0; }; }
2800 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2801 printf "%s\n" "$as_me: failed program was:" >&5
2802 sed 's/^/| /' conftest.$ac_ext >&5
2804 ac_retval=$ac_status
2806 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2808 as_fn_set_status $ac_retval
2812 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2813 # ---------------------------------------------
2814 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2816 ac_fn_c_check_decl ()
2818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2819 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2820 as_decl_name=`echo $2|sed 's/ *(.*//'`
2821 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2823 printf %s "checking whether $as_decl_name is declared... " >&6; }
2824 if eval test \${$3+y}
2826 printf %s "(cached) " >&6
2828 ac_save_werror_flag=$ac_c_werror_flag
2829 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831 /* end confdefs.h. */
2836 #ifndef $as_decl_name
2838 (void) $as_decl_use;
2840 (void) $as_decl_name;
2848 if ac_fn_c_try_compile "$LINENO"
2854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2855 ac_c_werror_flag=$ac_save_werror_flag
2858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2859 printf "%s\n" "$ac_res" >&6; }
2860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2862 } # ac_fn_c_check_decl
2864 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2865 # --------------------------------------------
2866 # Tries to find the compile-time value of EXPR in a program that includes
2867 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2869 ac_fn_c_compute_int ()
2871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2872 if test "$cross_compiling" = yes; then
2873 # Depending upon the size, compute the lo and hi bounds.
2874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2875 /* end confdefs.h. */
2880 static int test_array [1 - 2 * !(($2) >= 0)];
2882 return test_array [0];
2888 if ac_fn_c_try_compile "$LINENO"
2892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2893 /* end confdefs.h. */
2898 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2900 return test_array [0];
2906 if ac_fn_c_try_compile "$LINENO"
2908 ac_hi=$ac_mid; break
2910 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2911 if test $ac_lo -le $ac_mid; then
2915 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2921 /* end confdefs.h. */
2926 static int test_array [1 - 2 * !(($2) < 0)];
2928 return test_array [0];
2934 if ac_fn_c_try_compile "$LINENO"
2938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2939 /* end confdefs.h. */
2944 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2946 return test_array [0];
2952 if ac_fn_c_try_compile "$LINENO"
2954 ac_lo=$ac_mid; break
2956 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2957 if test $ac_mid -le $ac_hi; then
2961 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2971 # Binary search between lo and hi bounds.
2972 while test "x$ac_lo" != "x$ac_hi"; do
2973 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2975 /* end confdefs.h. */
2980 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2982 return test_array [0];
2988 if ac_fn_c_try_compile "$LINENO"
2992 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2997 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3002 /* end confdefs.h. */
3004 static long int longval () { return $2; }
3005 static unsigned long int ulongval () { return $2; }
3012 FILE *f = fopen ("conftest.val", "w");
3017 long int i = longval ();
3020 fprintf (f, "%ld", i);
3024 unsigned long int i = ulongval ();
3027 fprintf (f, "%lu", i);
3029 /* Do not output a trailing newline, as this causes \r\n confusion
3030 on some platforms. */
3031 return ferror (f) || fclose (f) != 0;
3037 if ac_fn_c_try_run "$LINENO"
3039 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3043 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3044 conftest.$ac_objext conftest.beam conftest.$ac_ext
3048 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3049 as_fn_set_status $ac_retval
3051 } # ac_fn_c_compute_int
3053 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3054 # ----------------------------------------------------
3055 # Tries to find if the field MEMBER exists in type AGGR, after including
3056 # INCLUDES, setting cache variable VAR accordingly.
3057 ac_fn_c_check_member ()
3059 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3061 printf %s "checking for $2.$3... " >&6; }
3062 if eval test \${$4+y}
3064 printf %s "(cached) " >&6
3066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3067 /* end confdefs.h. */
3079 if ac_fn_c_try_compile "$LINENO"
3083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3084 /* end confdefs.h. */
3090 if (sizeof ac_aggr.$3)
3096 if ac_fn_c_try_compile "$LINENO"
3102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3108 printf "%s\n" "$ac_res" >&6; }
3109 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3111 } # ac_fn_c_check_member
3112 ac_configure_args_raw=
3117 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3119 as_fn_append ac_configure_args_raw " '$ac_arg'"
3122 case $ac_configure_args_raw in
3126 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
3127 ac_unsafe_a="$ac_unsafe_z#~"
3128 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3129 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3132 cat >config.log <<_ACEOF
3133 This file contains any messages produced by compilers while
3134 running configure, to aid debugging if configure makes a mistake.
3136 It was created by gzip $as_me 1.10, which was
3137 generated by GNU Autoconf 2.69.197-b8fd7. Invocation command line was
3139 $ $0$ac_configure_args_raw
3149 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3150 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3151 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3152 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3153 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3155 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3156 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3158 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3159 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3160 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3161 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3162 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3163 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3164 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3172 case $as_dir in #(((
3175 *) as_dir=$as_dir/ ;;
3177 printf "%s\n" "PATH: $as_dir"
3193 # Keep a trace of the command line.
3194 # Strip out --no-create and --no-recursion so they do not pile up.
3195 # Strip out --silent because we don't want to record it for future runs.
3196 # Also quote any args containing shell meta-characters.
3197 # Make two passes to allow for proper duplicate-argument suppression.
3201 ac_must_keep_next=false
3207 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3208 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3209 | -silent | --silent | --silen | --sile | --sil)
3212 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3215 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3217 as_fn_append ac_configure_args1 " '$ac_arg'"
3218 if test $ac_must_keep_next = true; then
3219 ac_must_keep_next=false # Got value, back to normal.
3222 *=* | --config-cache | -C | -disable-* | --disable-* \
3223 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3224 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3225 | -with-* | --with-* | -without-* | --without-* | --x)
3226 case "$ac_configure_args0 " in
3227 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3230 -* ) ac_must_keep_next=true ;;
3233 as_fn_append ac_configure_args " '$ac_arg'"
3238 { ac_configure_args0=; unset ac_configure_args0;}
3239 { ac_configure_args1=; unset ac_configure_args1;}
3241 # When interrupted or exit'd, cleanup temporary files, and complete
3242 # config.log. We remove comments because anyway the quotes in there
3243 # would cause problems or look ugly.
3244 # WARNING: Use '\'' to represent an apostrophe within the trap.
3245 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3246 trap 'exit_status=$?
3249 # Save into config.log some information that might help in debugging.
3253 printf "%s\n" "## ---------------- ##
3254 ## Cache variables. ##
3255 ## ---------------- ##"
3257 # The following way of writing the cache mishandles newlines in values,
3259 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3260 eval ac_val=\$$ac_var
3264 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3265 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3268 _ | IFS | as_nl) ;; #(
3269 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3270 *) { eval $ac_var=; unset $ac_var;} ;;
3275 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3276 *${as_nl}ac_space=\ *)
3278 "s/'\''/'\''\\\\'\'''\''/g;
3279 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3282 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3289 printf "%s\n" "## ----------------- ##
3290 ## Output variables. ##
3291 ## ----------------- ##"
3293 for ac_var in $ac_subst_vars
3295 eval ac_val=\$$ac_var
3297 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3299 printf "%s\n" "$ac_var='\''$ac_val'\''"
3303 if test -n "$ac_subst_files"; then
3304 printf "%s\n" "## ------------------- ##
3305 ## File substitutions. ##
3306 ## ------------------- ##"
3308 for ac_var in $ac_subst_files
3310 eval ac_val=\$$ac_var
3312 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3314 printf "%s\n" "$ac_var='\''$ac_val'\''"
3319 if test -s confdefs.h; then
3320 printf "%s\n" "## ----------- ##
3327 test "$ac_signal" != 0 &&
3328 printf "%s\n" "$as_me: caught signal $ac_signal"
3329 printf "%s\n" "$as_me: exit $exit_status"
3331 rm -f core *.core core.conftest.* &&
3332 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3335 for ac_signal in 1 2 13 15; do
3336 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3340 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3341 rm -f -r conftest* confdefs.h
3343 printf "%s\n" "/* confdefs.h */" > confdefs.h
3345 # Predefined preprocessor variables.
3347 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3349 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3351 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3353 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3355 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3357 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3360 # Let the site file select an alternate cache file if it wants to.
3361 # Prefer an explicitly selected file to automatically selected ones.
3364 if test -n "$CONFIG_SITE"; then
3365 # We do not want a PATH search for config.site.
3366 case $CONFIG_SITE in #((
3367 -*) ac_site_file1=./$CONFIG_SITE;;
3368 */*) ac_site_file1=$CONFIG_SITE;;
3369 *) ac_site_file1=./$CONFIG_SITE;;
3371 elif test "x$prefix" != xNONE; then
3372 ac_site_file1=$prefix/share/config.site
3373 ac_site_file2=$prefix/etc/config.site
3375 ac_site_file1=$ac_default_prefix/share/config.site
3376 ac_site_file2=$ac_default_prefix/etc/config.site
3378 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3380 test "x$ac_site_file" = xNONE && continue
3381 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3383 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3384 sed 's/^/| /' "$ac_site_file" >&5
3386 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3387 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3388 as_fn_error $? "failed to load site script $ac_site_file
3389 See \`config.log' for more details" "$LINENO" 5; }
3393 if test -r "$cache_file"; then
3394 # Some versions of bash will fail to source /dev/null (special files
3395 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3396 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3398 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3400 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3401 *) . "./$cache_file";;
3405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3406 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3410 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3411 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3412 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3413 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3414 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3415 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3416 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
3417 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
3418 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
3419 as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
3420 as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
3421 as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
3422 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
3423 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
3424 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
3425 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
3426 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
3427 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
3428 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
3429 as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
3430 as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
3431 as_fn_append ac_func_c_list " __freading HAVE___FREADING"
3432 as_fn_append ac_func_c_list " __fseterr HAVE___FSETERR"
3433 as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT"
3434 as_fn_append ac_func_c_list " fsync HAVE_FSYNC"
3435 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
3436 gl_getopt_required=GNU
3437 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
3438 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
3439 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
3440 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
3441 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
3442 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
3443 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
3444 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
3445 as_fn_append ac_header_c_list " math.h math_h HAVE_MATH_H"
3446 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
3447 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
3448 as_fn_append ac_func_c_list " openat HAVE_OPENAT"
3449 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
3451 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
3452 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
3453 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
3454 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3455 as_fn_append ac_func_c_list " strdup HAVE_STRDUP"
3456 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
3457 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
3458 as_fn_append ac_func_c_list " unlinkat HAVE_UNLINKAT"
3459 as_fn_append ac_func_c_list " utime HAVE_UTIME"
3460 as_fn_append ac_header_c_list " utime.h utime_h HAVE_UTIME_H"
3461 as_fn_append ac_func_c_list " futimes HAVE_FUTIMES"
3462 as_fn_append ac_func_c_list " futimesat HAVE_FUTIMESAT"
3463 as_fn_append ac_func_c_list " futimens HAVE_FUTIMENS"
3464 as_fn_append ac_func_c_list " utimensat HAVE_UTIMENSAT"
3465 as_fn_append ac_func_c_list " lutimes HAVE_LUTIMES"
3466 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
3467 as_fn_append ac_header_c_list " fcntl.h fcntl_h HAVE_FCNTL_H"
3468 as_fn_append ac_header_c_list " memory.h memory_h HAVE_MEMORY_H"
3469 as_fn_append ac_header_c_list " time.h time_h HAVE_TIME_H"
3470 as_fn_append ac_func_c_list " chown HAVE_CHOWN"
3471 as_fn_append ac_func_c_list " fchmod HAVE_FCHMOD"
3472 as_fn_append ac_func_c_list " fchown HAVE_FCHOWN"
3473 # Check that the precious variables saved in the cache have kept the same
3475 ac_cache_corrupted=false
3476 for ac_var in $ac_precious_vars; do
3477 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3478 eval ac_new_set=\$ac_env_${ac_var}_set
3479 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3480 eval ac_new_val=\$ac_env_${ac_var}_value
3481 case $ac_old_set,$ac_new_set in
3483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3484 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3485 ac_cache_corrupted=: ;;
3487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3488 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3489 ac_cache_corrupted=: ;;
3492 if test "x$ac_old_val" != "x$ac_new_val"; then
3493 # differences in whitespace do not lead to failure.
3494 ac_old_val_w=`echo x $ac_old_val`
3495 ac_new_val_w=`echo x $ac_new_val`
3496 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3498 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3499 ac_cache_corrupted=:
3501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3502 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3503 eval $ac_var=\$ac_old_val
3505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3506 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3508 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
3511 # Pass precious variables to config.status.
3512 if test "$ac_new_set" = set; then
3514 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3515 *) ac_arg=$ac_var=$ac_new_val ;;
3517 case " $ac_configure_args " in
3518 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3519 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3523 if $ac_cache_corrupted; then
3524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3525 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3527 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3528 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3530 ## -------------------- ##
3531 ## Main body of script. ##
3532 ## -------------------- ##
3535 ac_cpp='$CPP $CPPFLAGS'
3536 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3537 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3538 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3544 for ac_dir in build-aux "$srcdir"/build-aux
3546 if test -f "$ac_dir/install-sh"; then
3548 ac_install_sh="$ac_aux_dir/install-sh -c"
3550 elif test -f "$ac_dir/install.sh"; then
3552 ac_install_sh="$ac_aux_dir/install.sh -c"
3554 elif test -f "$ac_dir/shtool"; then
3556 ac_install_sh="$ac_aux_dir/shtool install -c"
3560 if test -z "$ac_aux_dir"; then
3561 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3564 # These three variables are undocumented and unsupported,
3565 # and are intended to be withdrawn in a future Autoconf release.
3566 # They can cause serious problems if a builder's source tree is in a directory
3567 # whose full name contains unusual characters.
3568 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3569 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3570 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3574 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3576 am__api_version='1.16'
3578 # Find a good install program. We prefer a C program (faster),
3579 # so one script is as good as another. But avoid the broken or
3580 # incompatible versions:
3581 # SysV /etc/install, /usr/sbin/install
3582 # SunOS /usr/etc/install
3583 # IRIX /sbin/install
3585 # AmigaOS /C/install, which installs bootblocks on floppy discs
3586 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3587 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3588 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3589 # OS/2's system install, which has a completely different semantic
3590 # ./install, which can be erroneously created by make from ./install.sh.
3591 # Reject install programs that cannot install multiple files.
3592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3593 printf %s "checking for a BSD-compatible install... " >&6; }
3594 if test -z "$INSTALL"; then
3595 if test ${ac_cv_path_install+y}
3597 printf %s "(cached) " >&6
3599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3603 case $as_dir in #(((
3606 *) as_dir=$as_dir/ ;;
3608 # Account for fact that we put trailing slashes in our PATH walk.
3611 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3612 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3615 # OSF1 and SCO ODT 3.0 have their own names for install.
3616 # Don't use installbsd from OSF since it installs stuff as root
3618 for ac_prog in ginstall scoinst install; do
3619 for ac_exec_ext in '' $ac_executable_extensions; do
3620 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3621 if test $ac_prog = install &&
3622 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3623 # AIX install. It has an incompatible calling convention.
3625 elif test $ac_prog = install &&
3626 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3627 # program-specific install script used by HP pwplus--don't use.
3630 rm -rf conftest.one conftest.two conftest.dir
3631 echo one > conftest.one
3632 echo two > conftest.two
3634 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3635 test -s conftest.one && test -s conftest.two &&
3636 test -s conftest.dir/conftest.one &&
3637 test -s conftest.dir/conftest.two
3639 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3652 rm -rf conftest.one conftest.two conftest.dir
3655 if test ${ac_cv_path_install+y}; then
3656 INSTALL=$ac_cv_path_install
3658 # As a last resort, use the slow shell script. Don't cache a
3659 # value for INSTALL within a source directory, because that will
3660 # break other packages using the cache if that directory is
3661 # removed, or if the value is a relative name.
3662 INSTALL=$ac_install_sh
3665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3666 printf "%s\n" "$INSTALL" >&6; }
3668 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3669 # It thinks the first close brace ends the variable substitution.
3670 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3672 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3674 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3677 printf %s "checking whether build environment is sane... " >&6; }
3678 # Reject unsafe characters in $srcdir or the absolute working directory
3679 # name. Accept space and tab only in the latter.
3683 *[\\\"\#\$\&\'\`$am_lf]*)
3684 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3687 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3688 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3691 # Do 'set' in a subshell so we don't clobber the current shell's
3692 # arguments. Must try -L first in case configure is actually a
3693 # symlink; some systems play weird games with the mod time of symlinks
3694 # (eg FreeBSD returns the mod time of the symlink's containing
3698 for am_try in 1 2; do
3699 echo "timestamp, slept: $am_has_slept" > conftest.file
3700 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3701 if test "$*" = "X"; then
3703 set X `ls -t "$srcdir/configure" conftest.file`
3705 if test "$*" != "X $srcdir/configure conftest.file" \
3706 && test "$*" != "X conftest.file $srcdir/configure"; then
3708 # If neither matched, then we have a broken ls. This can happen
3709 # if, for instance, CONFIG_SHELL is bash and it inherits a
3710 # broken ls alias from the environment. This has actually
3711 # happened. Such a system could not be considered "sane".
3712 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3713 alias in your environment" "$LINENO" 5
3715 if test "$2" = conftest.file || test $am_try -eq 2; then
3722 test "$2" = conftest.file
3728 as_fn_error $? "newly created file is older than distributed files!
3729 Check your system clock" "$LINENO" 5
3731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3732 printf "%s\n" "yes" >&6; }
3733 # If we didn't sleep, we still need to ensure time stamps of config.status and
3734 # generated files are strictly newer.
3736 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3743 test "$program_prefix" != NONE &&
3744 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3745 # Use a double $ so make ignores it.
3746 test "$program_suffix" != NONE &&
3747 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3748 # Double any \ or $.
3749 # By default was `s,x,x', remove it if useless.
3750 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3751 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3753 # Expand $ac_aux_dir to an absolute path.
3754 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3756 if test x"${MISSING+set}" != xset; then
3759 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3761 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3764 # Use eval to expand $SHELL
3765 if eval "$MISSING --is-lightweight"; then
3766 am_missing_run="$MISSING "
3769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3770 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3773 if test x"${install_sh+set}" != xset; then
3776 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3778 install_sh="\${SHELL} $am_aux_dir/install-sh"
3782 # Installed binaries are usually stripped using 'strip' when the user
3783 # run "make install-strip". However 'strip' might not be the right
3784 # tool to use in cross-compilation environments, therefore Automake
3785 # will honor the 'STRIP' environment variable to overrule this program.
3786 if test "$cross_compiling" != no; then
3787 if test -n "$ac_tool_prefix"; then
3788 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3789 set dummy ${ac_tool_prefix}strip; ac_word=$2
3790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791 printf %s "checking for $ac_word... " >&6; }
3792 if test ${ac_cv_prog_STRIP+y}
3794 printf %s "(cached) " >&6
3796 if test -n "$STRIP"; then
3797 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3803 case $as_dir in #(((
3806 *) as_dir=$as_dir/ ;;
3808 for ac_exec_ext in '' $ac_executable_extensions; do
3809 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3810 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3811 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3820 STRIP=$ac_cv_prog_STRIP
3821 if test -n "$STRIP"; then
3822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3823 printf "%s\n" "$STRIP" >&6; }
3825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826 printf "%s\n" "no" >&6; }
3831 if test -z "$ac_cv_prog_STRIP"; then
3833 # Extract the first word of "strip", so it can be a program name with args.
3834 set dummy strip; ac_word=$2
3835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3836 printf %s "checking for $ac_word... " >&6; }
3837 if test ${ac_cv_prog_ac_ct_STRIP+y}
3839 printf %s "(cached) " >&6
3841 if test -n "$ac_ct_STRIP"; then
3842 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3848 case $as_dir in #(((
3851 *) as_dir=$as_dir/ ;;
3853 for ac_exec_ext in '' $ac_executable_extensions; do
3854 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3855 ac_cv_prog_ac_ct_STRIP="strip"
3856 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3865 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3866 if test -n "$ac_ct_STRIP"; then
3867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3868 printf "%s\n" "$ac_ct_STRIP" >&6; }
3870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3871 printf "%s\n" "no" >&6; }
3874 if test "x$ac_ct_STRIP" = x; then
3877 case $cross_compiling:$ac_tool_warned in
3879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3880 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3881 ac_tool_warned=yes ;;
3886 STRIP="$ac_cv_prog_STRIP"
3890 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3893 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3894 if test -z "$MKDIR_P"; then
3895 if test ${ac_cv_path_mkdir+y}
3897 printf %s "(cached) " >&6
3899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3900 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3903 case $as_dir in #(((
3906 *) as_dir=$as_dir/ ;;
3908 for ac_prog in mkdir gmkdir; do
3909 for ac_exec_ext in '' $ac_executable_extensions; do
3910 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3911 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3912 'mkdir ('*'coreutils) '* | \
3914 'mkdir (fileutils) '4.1*)
3915 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3925 test -d ./--version && rmdir ./--version
3926 if test ${ac_cv_path_mkdir+y}; then
3927 MKDIR_P="$ac_cv_path_mkdir -p"
3929 # As a last resort, use the slow shell script. Don't cache a
3930 # value for MKDIR_P within a source directory, because that will
3931 # break other packages using the cache if that directory is
3932 # removed, or if the value is a relative name.
3933 MKDIR_P="$ac_install_sh -d"
3936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3937 printf "%s\n" "$MKDIR_P" >&6; }
3939 for ac_prog in gawk mawk nawk awk
3941 # Extract the first word of "$ac_prog", so it can be a program name with args.
3942 set dummy $ac_prog; ac_word=$2
3943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3944 printf %s "checking for $ac_word... " >&6; }
3945 if test ${ac_cv_prog_AWK+y}
3947 printf %s "(cached) " >&6
3949 if test -n "$AWK"; then
3950 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3956 case $as_dir in #(((
3959 *) as_dir=$as_dir/ ;;
3961 for ac_exec_ext in '' $ac_executable_extensions; do
3962 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3963 ac_cv_prog_AWK="$ac_prog"
3964 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3974 if test -n "$AWK"; then
3975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3976 printf "%s\n" "$AWK" >&6; }
3978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979 printf "%s\n" "no" >&6; }
3983 test -n "$AWK" && break
3986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3987 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3989 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3990 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3992 printf %s "(cached) " >&6
3994 cat >conftest.make <<\_ACEOF
3997 @echo '@@@%%%=$(MAKE)=@@@%%%'
3999 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4000 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4002 eval ac_cv_prog_make_${ac_make}_set=yes;;
4004 eval ac_cv_prog_make_${ac_make}_set=no;;
4008 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4010 printf "%s\n" "yes" >&6; }
4013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4014 printf "%s\n" "no" >&6; }
4015 SET_MAKE="MAKE=${MAKE-make}"
4018 rm -rf .tst 2>/dev/null
4019 mkdir .tst 2>/dev/null
4020 if test -d .tst; then
4025 rmdir .tst 2>/dev/null
4027 # Check whether --enable-silent-rules was given.
4028 if test ${enable_silent_rules+y}
4030 enableval=$enable_silent_rules;
4033 case $enable_silent_rules in # (((
4034 yes) AM_DEFAULT_VERBOSITY=0;;
4035 no) AM_DEFAULT_VERBOSITY=1;;
4036 *) AM_DEFAULT_VERBOSITY=1;;
4038 am_make=${MAKE-make}
4039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4040 printf %s "checking whether $am_make supports nested variables... " >&6; }
4041 if test ${am_cv_make_support_nested_variables+y}
4043 printf %s "(cached) " >&6
4045 if printf "%s\n" 'TRUE=$(BAR$(V))
4051 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4052 am_cv_make_support_nested_variables=yes
4054 am_cv_make_support_nested_variables=no
4057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4058 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4059 if test $am_cv_make_support_nested_variables = yes; then
4061 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4063 AM_V=$AM_DEFAULT_VERBOSITY
4064 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4068 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4069 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4070 # is not polluted with repeated "-I."
4071 am__isrc=' -I$(srcdir)'
4072 # test to see if srcdir already configured
4073 if test -f $srcdir/config.status; then
4074 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4078 # test whether we have cygpath
4079 if test -z "$CYGPATH_W"; then
4080 if (cygpath --version) >/dev/null 2>/dev/null; then
4081 CYGPATH_W='cygpath -w'
4088 # Define the identity of the package.
4093 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4096 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4098 # Some tools Automake needs.
4100 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4103 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4106 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4109 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4112 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4114 # For better backward compatibility. To be removed once Automake 1.9.x
4115 # dies out for good. For more background, see:
4116 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4117 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4118 mkdir_p='$(MKDIR_P)'
4120 # We need awk for the "check" target (and possibly the TAP driver). The
4121 # system "awk" is bad on some platforms.
4122 # Always define AMTAR for backward compatibility. Yes, it's still used
4123 # in the wild :-( We should find a proper way to deprecate it ...
4127 # We'll loop over all known methods to create a tar archive until one works.
4128 _am_tools='gnutar pax cpio none'
4130 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4137 # POSIX will say in a future version that running "rm -f" with no argument
4138 # is OK; and we want to be able to make that assumption in our Makefile
4139 # recipes. So use an aggressive probe to check that the usage we want is
4140 # actually supported "in the wild" to an acceptable degree.
4141 # See automake bug#10828.
4142 # To make any issue more visible, cause the running configure to be aborted
4143 # by default if the 'rm' program in use doesn't match our expectations; the
4144 # user can still override this though.
4145 if rm -f && rm -fr && rm -rf; then : OK; else
4149 Your 'rm' program seems unable to run without file operands specified
4150 on the command line, even when the '-f' option is present. This is contrary
4151 to the behaviour of most rm programs out there, and not conforming with
4152 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4154 Please tell bug-automake@gnu.org about your system, including the value
4155 of your $PATH and any error possibly output before this message. This
4156 can help us improve future automake versions.
4159 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4160 echo 'Configuration will proceed anyway, since you have set the' >&2
4161 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4165 Aborting the configuration process, to ensure you take notice of the issue.
4167 You can download and install GNU coreutils to get an 'rm' implementation
4168 that behaves properly: <https://www.gnu.org/software/coreutils/>.
4170 If you want to complete the configuration process using your problematic
4171 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4172 to "yes", and re-run configure.
4175 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4179 # Check whether --enable-silent-rules was given.
4180 if test ${enable_silent_rules+y}
4182 enableval=$enable_silent_rules;
4185 case $enable_silent_rules in # (((
4186 yes) AM_DEFAULT_VERBOSITY=0;;
4187 no) AM_DEFAULT_VERBOSITY=1;;
4188 *) AM_DEFAULT_VERBOSITY=0;;
4190 am_make=${MAKE-make}
4191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4192 printf %s "checking whether $am_make supports nested variables... " >&6; }
4193 if test ${am_cv_make_support_nested_variables+y}
4195 printf %s "(cached) " >&6
4197 if printf "%s\n" 'TRUE=$(BAR$(V))
4203 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4204 am_cv_make_support_nested_variables=yes
4206 am_cv_make_support_nested_variables=no
4209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4210 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4211 if test $am_cv_make_support_nested_variables = yes; then
4213 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4215 AM_V=$AM_DEFAULT_VERBOSITY
4216 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4219 # make --enable-silent-rules the default.
4226 DEPDIR="${am__leading_dot}deps"
4228 ac_config_commands="$ac_config_commands depfiles"
4230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4231 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4232 cat > confinc.mk << 'END'
4234 @echo this is the am__doit target >confinc.out
4239 # BSD make does it like this.
4240 echo '.include "confinc.mk" # ignored' > confmf.BSD
4241 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4242 echo 'include confinc.mk # ignored' > confmf.GNU
4244 for s in GNU BSD; do
4245 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4246 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4249 (exit $ac_status); }
4250 case $?:`cat confinc.out 2>/dev/null` in #(
4251 '0:this is the am__doit target') :
4254 am__include='.include' am__quote='"' ;; #(
4256 am__include='include' am__quote='' ;;
4261 if test "$am__include" != "#"; then
4262 _am_result="yes ($s style)"
4266 rm -f confinc.* confmf.*
4267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4268 printf "%s\n" "${_am_result}" >&6; }
4270 # Check whether --enable-dependency-tracking was given.
4271 if test ${enable_dependency_tracking+y}
4273 enableval=$enable_dependency_tracking;
4276 if test "x$enable_dependency_tracking" != xno; then
4277 am_depcomp="$ac_aux_dir/depcomp"
4281 if test "x$enable_dependency_tracking" != xno; then
4291 ac_cpp='$CPP $CPPFLAGS'
4292 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4293 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4294 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4295 if test -n "$ac_tool_prefix"; then
4296 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4297 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4299 printf %s "checking for $ac_word... " >&6; }
4300 if test ${ac_cv_prog_CC+y}
4302 printf %s "(cached) " >&6
4304 if test -n "$CC"; then
4305 ac_cv_prog_CC="$CC" # Let the user override the test.
4307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311 case $as_dir in #(((
4314 *) as_dir=$as_dir/ ;;
4316 for ac_exec_ext in '' $ac_executable_extensions; do
4317 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4318 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4319 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4329 if test -n "$CC"; then
4330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4331 printf "%s\n" "$CC" >&6; }
4333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4334 printf "%s\n" "no" >&6; }
4339 if test -z "$ac_cv_prog_CC"; then
4341 # Extract the first word of "gcc", so it can be a program name with args.
4342 set dummy gcc; ac_word=$2
4343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4344 printf %s "checking for $ac_word... " >&6; }
4345 if test ${ac_cv_prog_ac_ct_CC+y}
4347 printf %s "(cached) " >&6
4349 if test -n "$ac_ct_CC"; then
4350 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4356 case $as_dir in #(((
4359 *) as_dir=$as_dir/ ;;
4361 for ac_exec_ext in '' $ac_executable_extensions; do
4362 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4363 ac_cv_prog_ac_ct_CC="gcc"
4364 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4373 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4374 if test -n "$ac_ct_CC"; then
4375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4376 printf "%s\n" "$ac_ct_CC" >&6; }
4378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4379 printf "%s\n" "no" >&6; }
4382 if test "x$ac_ct_CC" = x; then
4385 case $cross_compiling:$ac_tool_warned in
4387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4388 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4389 ac_tool_warned=yes ;;
4397 if test -z "$CC"; then
4398 if test -n "$ac_tool_prefix"; then
4399 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4400 set dummy ${ac_tool_prefix}cc; ac_word=$2
4401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4402 printf %s "checking for $ac_word... " >&6; }
4403 if test ${ac_cv_prog_CC+y}
4405 printf %s "(cached) " >&6
4407 if test -n "$CC"; then
4408 ac_cv_prog_CC="$CC" # Let the user override the test.
4410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414 case $as_dir in #(((
4417 *) as_dir=$as_dir/ ;;
4419 for ac_exec_ext in '' $ac_executable_extensions; do
4420 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4421 ac_cv_prog_CC="${ac_tool_prefix}cc"
4422 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4432 if test -n "$CC"; then
4433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4434 printf "%s\n" "$CC" >&6; }
4436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4437 printf "%s\n" "no" >&6; }
4443 if test -z "$CC"; then
4444 # Extract the first word of "cc", so it can be a program name with args.
4445 set dummy cc; ac_word=$2
4446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4447 printf %s "checking for $ac_word... " >&6; }
4448 if test ${ac_cv_prog_CC+y}
4450 printf %s "(cached) " >&6
4452 if test -n "$CC"; then
4453 ac_cv_prog_CC="$CC" # Let the user override the test.
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460 case $as_dir in #(((
4463 *) as_dir=$as_dir/ ;;
4465 for ac_exec_ext in '' $ac_executable_extensions; do
4466 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4467 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4468 ac_prog_rejected=yes
4472 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4479 if test $ac_prog_rejected = yes; then
4480 # We found a bogon in the path, so make sure we never use it.
4481 set dummy $ac_cv_prog_CC
4483 if test $# != 0; then
4484 # We chose a different compiler from the bogus one.
4485 # However, it has the same basename, so the bogon will be chosen
4486 # first if we set CC to just the basename; use the full file name.
4488 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4494 if test -n "$CC"; then
4495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4496 printf "%s\n" "$CC" >&6; }
4498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4499 printf "%s\n" "no" >&6; }
4504 if test -z "$CC"; then
4505 if test -n "$ac_tool_prefix"; then
4506 for ac_prog in cl.exe
4508 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4509 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4511 printf %s "checking for $ac_word... " >&6; }
4512 if test ${ac_cv_prog_CC+y}
4514 printf %s "(cached) " >&6
4516 if test -n "$CC"; then
4517 ac_cv_prog_CC="$CC" # Let the user override the test.
4519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4523 case $as_dir in #(((
4526 *) as_dir=$as_dir/ ;;
4528 for ac_exec_ext in '' $ac_executable_extensions; do
4529 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4530 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4531 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4541 if test -n "$CC"; then
4542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4543 printf "%s\n" "$CC" >&6; }
4545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546 printf "%s\n" "no" >&6; }
4550 test -n "$CC" && break
4553 if test -z "$CC"; then
4555 for ac_prog in cl.exe
4557 # Extract the first word of "$ac_prog", so it can be a program name with args.
4558 set dummy $ac_prog; ac_word=$2
4559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4560 printf %s "checking for $ac_word... " >&6; }
4561 if test ${ac_cv_prog_ac_ct_CC+y}
4563 printf %s "(cached) " >&6
4565 if test -n "$ac_ct_CC"; then
4566 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4572 case $as_dir in #(((
4575 *) as_dir=$as_dir/ ;;
4577 for ac_exec_ext in '' $ac_executable_extensions; do
4578 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4579 ac_cv_prog_ac_ct_CC="$ac_prog"
4580 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4589 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4590 if test -n "$ac_ct_CC"; then
4591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4592 printf "%s\n" "$ac_ct_CC" >&6; }
4594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4595 printf "%s\n" "no" >&6; }
4599 test -n "$ac_ct_CC" && break
4602 if test "x$ac_ct_CC" = x; then
4605 case $cross_compiling:$ac_tool_warned in
4607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4608 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4609 ac_tool_warned=yes ;;
4616 if test -z "$CC"; then
4617 if test -n "$ac_tool_prefix"; then
4618 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4619 set dummy ${ac_tool_prefix}clang; ac_word=$2
4620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4621 printf %s "checking for $ac_word... " >&6; }
4622 if test ${ac_cv_prog_CC+y}
4624 printf %s "(cached) " >&6
4626 if test -n "$CC"; then
4627 ac_cv_prog_CC="$CC" # Let the user override the test.
4629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633 case $as_dir in #(((
4636 *) as_dir=$as_dir/ ;;
4638 for ac_exec_ext in '' $ac_executable_extensions; do
4639 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4640 ac_cv_prog_CC="${ac_tool_prefix}clang"
4641 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4651 if test -n "$CC"; then
4652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4653 printf "%s\n" "$CC" >&6; }
4655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656 printf "%s\n" "no" >&6; }
4661 if test -z "$ac_cv_prog_CC"; then
4663 # Extract the first word of "clang", so it can be a program name with args.
4664 set dummy clang; ac_word=$2
4665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666 printf %s "checking for $ac_word... " >&6; }
4667 if test ${ac_cv_prog_ac_ct_CC+y}
4669 printf %s "(cached) " >&6
4671 if test -n "$ac_ct_CC"; then
4672 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4678 case $as_dir in #(((
4681 *) as_dir=$as_dir/ ;;
4683 for ac_exec_ext in '' $ac_executable_extensions; do
4684 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4685 ac_cv_prog_ac_ct_CC="clang"
4686 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4695 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4696 if test -n "$ac_ct_CC"; then
4697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4698 printf "%s\n" "$ac_ct_CC" >&6; }
4700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701 printf "%s\n" "no" >&6; }
4704 if test "x$ac_ct_CC" = x; then
4707 case $cross_compiling:$ac_tool_warned in
4709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4710 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4711 ac_tool_warned=yes ;;
4722 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4723 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4724 as_fn_error $? "no acceptable C compiler found in \$PATH
4725 See \`config.log' for more details" "$LINENO" 5; }
4727 # Provide some information about the compiler.
4728 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4731 for ac_option in --version -v -V -qversion -version; do
4732 { { ac_try="$ac_compiler $ac_option >&5"
4734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4735 *) ac_try_echo=$ac_try;;
4737 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4738 printf "%s\n" "$ac_try_echo"; } >&5
4739 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4741 if test -s conftest.err; then
4743 ... rest of stderr output deleted ...
4744 10q' conftest.err >conftest.er1
4745 cat conftest.er1 >&5
4747 rm -f conftest.er1 conftest.err
4748 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4749 test $ac_status = 0; }
4752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4753 /* end confdefs.h. */
4763 ac_clean_files_save=$ac_clean_files
4764 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4765 # Try to create an executable without -o first, disregard a.out.
4766 # It will help us diagnose broken compilers, and finding out an intuition
4768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4769 printf %s "checking whether the C compiler works... " >&6; }
4770 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4772 # The possible output files:
4773 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4776 for ac_file in $ac_files
4779 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4780 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4785 if { { ac_try="$ac_link_default"
4787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4788 *) ac_try_echo=$ac_try;;
4790 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4791 printf "%s\n" "$ac_try_echo"; } >&5
4792 (eval "$ac_link_default") 2>&5
4794 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4795 test $ac_status = 0; }
4797 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4798 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4799 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4800 # so that the user can short-circuit this test for compilers unknown to
4802 for ac_file in $ac_files ''
4804 test -f "$ac_file" || continue
4806 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4809 # We found the default executable, but exeext='' is most
4813 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4815 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4817 # We set ac_cv_exeext here because the later test for it is not
4818 # safe: cross compilers may not add the suffix if given an `-o'
4819 # argument, so we may need to know it at that point already.
4820 # Even if this section looks crufty: it has the advantage of
4827 test "$ac_cv_exeext" = no && ac_cv_exeext=
4832 if test -z "$ac_file"
4834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835 printf "%s\n" "no" >&6; }
4836 printf "%s\n" "$as_me: failed program was:" >&5
4837 sed 's/^/| /' conftest.$ac_ext >&5
4839 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4840 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4841 as_fn_error 77 "C compiler cannot create executables
4842 See \`config.log' for more details" "$LINENO" 5; }
4844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4845 printf "%s\n" "yes" >&6; }
4847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4848 printf %s "checking for C compiler default output file name... " >&6; }
4849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4850 printf "%s\n" "$ac_file" >&6; }
4851 ac_exeext=$ac_cv_exeext
4853 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4854 ac_clean_files=$ac_clean_files_save
4855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4856 printf %s "checking for suffix of executables... " >&6; }
4857 if { { ac_try="$ac_link"
4859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4860 *) ac_try_echo=$ac_try;;
4862 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4863 printf "%s\n" "$ac_try_echo"; } >&5
4864 (eval "$ac_link") 2>&5
4866 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4867 test $ac_status = 0; }
4869 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4870 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4871 # work properly (i.e., refer to `conftest.exe'), while it won't with
4873 for ac_file in conftest.exe conftest conftest.*; do
4874 test -f "$ac_file" || continue
4876 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4877 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4883 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4884 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4885 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4886 See \`config.log' for more details" "$LINENO" 5; }
4888 rm -f conftest conftest$ac_cv_exeext
4889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4890 printf "%s\n" "$ac_cv_exeext" >&6; }
4892 rm -f conftest.$ac_ext
4893 EXEEXT=$ac_cv_exeext
4895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4896 /* end confdefs.h. */
4901 FILE *f = fopen ("conftest.out", "w");
4902 return ferror (f) || fclose (f) != 0;
4908 ac_clean_files="$ac_clean_files conftest.out"
4909 # Check that the compiler produces executables we can run. If not, either
4910 # the compiler is broken, or we cross compile.
4911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4912 printf %s "checking whether we are cross compiling... " >&6; }
4913 if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
4915 elif test "$cross_compiling" != yes; then
4916 { { ac_try="$ac_link"
4918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4919 *) ac_try_echo=$ac_try;;
4921 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4922 printf "%s\n" "$ac_try_echo"; } >&5
4923 (eval "$ac_link") 2>&5
4925 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4926 test $ac_status = 0; }
4927 if { ac_try='./conftest$ac_cv_exeext'
4928 { { case "(($ac_try" in
4929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4930 *) ac_try_echo=$ac_try;;
4932 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4933 printf "%s\n" "$ac_try_echo"; } >&5
4934 (eval "$ac_try") 2>&5
4936 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4937 test $ac_status = 0; }; }; then
4940 if test "$cross_compiling" = maybe; then
4943 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4944 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4945 as_fn_error $? "cannot run C compiled programs.
4946 If you meant to cross compile, use \`--host'.
4947 See \`config.log' for more details" "$LINENO" 5; }
4951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4952 printf "%s\n" "$cross_compiling" >&6; }
4954 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4955 ac_clean_files=$ac_clean_files_save
4956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4957 printf %s "checking for suffix of object files... " >&6; }
4958 if test ${ac_cv_objext+y}
4960 printf %s "(cached) " >&6
4962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4963 /* end confdefs.h. */
4973 rm -f conftest.o conftest.obj
4974 if { { ac_try="$ac_compile"
4976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4977 *) ac_try_echo=$ac_try;;
4979 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4980 printf "%s\n" "$ac_try_echo"; } >&5
4981 (eval "$ac_compile") 2>&5
4983 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4984 test $ac_status = 0; }
4986 for ac_file in conftest.o conftest.obj conftest.*; do
4987 test -f "$ac_file" || continue;
4989 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4990 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4995 printf "%s\n" "$as_me: failed program was:" >&5
4996 sed 's/^/| /' conftest.$ac_ext >&5
4998 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4999 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5000 as_fn_error $? "cannot compute suffix of object files: cannot compile
5001 See \`config.log' for more details" "$LINENO" 5; }
5003 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5006 printf "%s\n" "$ac_cv_objext" >&6; }
5007 OBJEXT=$ac_cv_objext
5009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5010 printf %s "checking whether the compiler supports GNU C... " >&6; }
5011 if test ${ac_cv_c_compiler_gnu+y}
5013 printf %s "(cached) " >&6
5015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5016 /* end confdefs.h. */
5029 if ac_fn_c_try_compile "$LINENO"
5035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5036 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5040 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5041 if test $ac_compiler_gnu = yes; then
5046 ac_test_CFLAGS=${CFLAGS+y}
5047 ac_save_CFLAGS=$CFLAGS
5048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5049 printf %s "checking whether $CC accepts -g... " >&6; }
5050 if test ${ac_cv_prog_cc_g+y}
5052 printf %s "(cached) " >&6
5054 ac_save_c_werror_flag=$ac_c_werror_flag
5055 ac_c_werror_flag=yes
5058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5059 /* end confdefs.h. */
5069 if ac_fn_c_try_compile "$LINENO"
5074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5075 /* end confdefs.h. */
5085 if ac_fn_c_try_compile "$LINENO"
5089 ac_c_werror_flag=$ac_save_c_werror_flag
5091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5092 /* end confdefs.h. */
5102 if ac_fn_c_try_compile "$LINENO"
5106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5111 ac_c_werror_flag=$ac_save_c_werror_flag
5113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5114 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5115 if test $ac_test_CFLAGS; then
5116 CFLAGS=$ac_save_CFLAGS
5117 elif test $ac_cv_prog_cc_g = yes; then
5118 if test "$GCC" = yes; then
5124 if test "$GCC" = yes; then
5130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5131 printf %s "checking for $CC option to enable C11 features... " >&6; }
5132 if test ${ac_cv_prog_cc_c11+y}
5134 printf %s "(cached) " >&6
5136 ac_cv_prog_cc_c11=no
5138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5139 /* end confdefs.h. */
5141 #include <stdbool.h>
5147 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5148 #define debug(...) fprintf (stderr, __VA_ARGS__)
5149 #define showlist(...) puts (#__VA_ARGS__)
5150 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5152 test_varargs_macros (void)
5157 debug ("X = %d\n", x);
5158 showlist (The first, second, and third items.);
5159 report (x>y, "x is %d but y is %d", x, y);
5162 // Check long long types.
5163 #define BIG64 18446744073709551615ull
5164 #define BIG32 4294967295ul
5165 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5167 your preprocessor is broken;
5171 your preprocessor is broken;
5173 static long long int bignum = -9223372036854775807LL;
5174 static unsigned long long int ubignum = BIG64;
5176 struct incomplete_array
5184 const wchar_t *name;
5188 typedef const char *ccp;
5191 test_restrict (ccp restrict text)
5193 // See if C++-style comments work.
5194 // Iterate through items via the restricted pointer.
5195 // Also check for declarations in for loops.
5196 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5201 // Check varargs and va_copy.
5203 test_varargs (const char *format, ...)
5206 va_start (args, format);
5208 va_copy (args_copy, args);
5210 const char *str = "";
5219 str = va_arg (args_copy, const char *);
5222 number = va_arg (args_copy, int);
5225 fnumber = va_arg (args_copy, double);
5234 return *str && number && fnumber;
5237 char _Alignas (double) aligned_as_double;
5238 char _Alignas (0) no_special_alignment;
5239 extern char aligned_as_int;
5240 char _Alignas (0) _Alignas (int) aligned_as_int;
5245 int_alignment = _Alignof (int),
5246 int_array_alignment = _Alignof (int[100]),
5247 char_alignment = _Alignof (char)
5249 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5252 int _Noreturn does_not_return (void) { for (;;) continue; }
5254 // Check _Static_assert.
5255 struct test_static_assert
5258 _Static_assert (sizeof (int) <= sizeof (long int),
5259 "_Static_assert does not work in struct");
5263 // Check UTF-8 literals.
5264 #define u8 syntax error!
5265 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5267 // Check duplicate typedefs.
5268 typedef long *long_ptr;
5269 typedef long int *long_ptr;
5270 typedef long_ptr long_ptr;
5272 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5276 struct { int i; int j; };
5277 struct { int k; long int l; } w;
5287 _Bool success = false;
5290 if (test_restrict ("String literal") == 0)
5292 char *restrict newvar = "Another string";
5295 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5296 test_varargs_macros ();
5298 // Check flexible array members.
5299 struct incomplete_array *ia =
5300 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5302 for (int i = 0; i < ia->datasize; ++i)
5303 ia->data[i] = i * 1.234;
5305 // Check named initializers.
5306 struct named_init ni = {
5308 .name = L"Test wide string",
5309 .average = 543.34343,
5314 int dynamic_array[ni.number];
5315 dynamic_array[ni.number - 1] = 543;
5317 // work around unused variable warnings
5318 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5319 || dynamic_array[ni.number - 1] != 543);
5323 _Static_assert ((offsetof (struct anonymous, i)
5324 == offsetof (struct anonymous, w.k)),
5325 "Anonymous union alignment botch");
5331 for ac_arg in '' -std=gnu11
5333 CC="$ac_save_CC $ac_arg"
5334 if ac_fn_c_try_compile "$LINENO"
5336 ac_cv_prog_cc_c11=$ac_arg
5338 rm -f core conftest.err conftest.$ac_objext
5339 test "x$ac_cv_prog_cc_c11" != "xno" && break
5341 rm -f conftest.$ac_ext
5346 ac_prog_cc_stdc_options=
5347 case "x$ac_cv_prog_cc_c11" in
5349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5350 printf "%s\n" "none needed" >&6; } ;;
5352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5353 printf "%s\n" "unsupported" >&6; } ;;
5355 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5356 CC=$CC$ac_prog_cc_stdc_options
5357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5358 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5360 if test "x$ac_cv_prog_cc_c11" != xno
5363 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5366 printf %s "checking for $CC option to enable C99 features... " >&6; }
5367 if test ${ac_cv_prog_cc_c99+y}
5369 printf %s "(cached) " >&6
5371 ac_cv_prog_cc_c99=no
5373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374 /* end confdefs.h. */
5376 #include <stdbool.h>
5382 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5383 #define debug(...) fprintf (stderr, __VA_ARGS__)
5384 #define showlist(...) puts (#__VA_ARGS__)
5385 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5387 test_varargs_macros (void)
5392 debug ("X = %d\n", x);
5393 showlist (The first, second, and third items.);
5394 report (x>y, "x is %d but y is %d", x, y);
5397 // Check long long types.
5398 #define BIG64 18446744073709551615ull
5399 #define BIG32 4294967295ul
5400 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5402 your preprocessor is broken;
5406 your preprocessor is broken;
5408 static long long int bignum = -9223372036854775807LL;
5409 static unsigned long long int ubignum = BIG64;
5411 struct incomplete_array
5419 const wchar_t *name;
5423 typedef const char *ccp;
5426 test_restrict (ccp restrict text)
5428 // See if C++-style comments work.
5429 // Iterate through items via the restricted pointer.
5430 // Also check for declarations in for loops.
5431 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5436 // Check varargs and va_copy.
5438 test_varargs (const char *format, ...)
5441 va_start (args, format);
5443 va_copy (args_copy, args);
5445 const char *str = "";
5454 str = va_arg (args_copy, const char *);
5457 number = va_arg (args_copy, int);
5460 fnumber = va_arg (args_copy, double);
5469 return *str && number && fnumber;
5476 _Bool success = false;
5479 if (test_restrict ("String literal") == 0)
5481 char *restrict newvar = "Another string";
5484 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5485 test_varargs_macros ();
5487 // Check flexible array members.
5488 struct incomplete_array *ia =
5489 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5491 for (int i = 0; i < ia->datasize; ++i)
5492 ia->data[i] = i * 1.234;
5494 // Check named initializers.
5495 struct named_init ni = {
5497 .name = L"Test wide string",
5498 .average = 543.34343,
5503 int dynamic_array[ni.number];
5504 dynamic_array[ni.number - 1] = 543;
5506 // work around unused variable warnings
5507 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5508 || dynamic_array[ni.number - 1] != 543);
5514 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5516 CC="$ac_save_CC $ac_arg"
5517 if ac_fn_c_try_compile "$LINENO"
5519 ac_cv_prog_cc_c99=$ac_arg
5521 rm -f core conftest.err conftest.$ac_objext
5522 test "x$ac_cv_prog_cc_c99" != "xno" && break
5524 rm -f conftest.$ac_ext
5529 ac_prog_cc_stdc_options=
5530 case "x$ac_cv_prog_cc_c99" in
5532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5533 printf "%s\n" "none needed" >&6; } ;;
5535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5536 printf "%s\n" "unsupported" >&6; } ;;
5538 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5539 CC=$CC$ac_prog_cc_stdc_options
5540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5541 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5543 if test "x$ac_cv_prog_cc_c99" != xno
5546 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5549 printf %s "checking for $CC option to enable C89 features... " >&6; }
5550 if test ${ac_cv_prog_cc_c89+y}
5552 printf %s "(cached) " >&6
5554 ac_cv_prog_cc_c89=no
5556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5557 /* end confdefs.h. */
5561 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5562 struct buf { int x; };
5563 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5564 static char *e (p, i)
5570 static char *f (char * (*g) (char **, int), char **p, ...)
5575 s = g (p, va_arg (v,int));
5580 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5581 function prototypes and stuff, but not '\xHH' hex character constants.
5582 These don't provoke an error unfortunately, instead are silently treated
5583 as 'x'. The following induces an error, until -std is added to get
5584 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5585 array size at least. It's necessary to write '\x00'==0 to get something
5586 that's true only with -std. */
5587 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5589 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5590 inside strings and character constants. */
5592 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5594 int test (int i, double x);
5595 struct s1 {int (*f) (int a);};
5596 struct s2 {int (*f) (double a);};
5597 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5603 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5608 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5609 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5611 CC="$ac_save_CC $ac_arg"
5612 if ac_fn_c_try_compile "$LINENO"
5614 ac_cv_prog_cc_c89=$ac_arg
5616 rm -f core conftest.err conftest.$ac_objext
5617 test "x$ac_cv_prog_cc_c89" != "xno" && break
5619 rm -f conftest.$ac_ext
5624 ac_prog_cc_stdc_options=
5625 case "x$ac_cv_prog_cc_c89" in
5627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5628 printf "%s\n" "none needed" >&6; } ;;
5630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5631 printf "%s\n" "unsupported" >&6; } ;;
5633 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5634 CC=$CC$ac_prog_cc_stdc_options
5635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5636 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5638 if test "x$ac_cv_prog_cc_c89" != xno
5641 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5644 ac_cv_prog_cc_stdc=no
5652 ac_cpp='$CPP $CPPFLAGS'
5653 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5654 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5655 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5658 ac_cpp='$CPP $CPPFLAGS'
5659 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5660 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5661 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5663 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5664 if test ${am_cv_prog_cc_c_o+y}
5666 printf %s "(cached) " >&6
5668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5669 /* end confdefs.h. */
5679 # Make sure it works both with $CC and with simple cc.
5680 # Following AC_PROG_CC_C_O, we do the test twice because some
5681 # compilers refuse to overwrite an existing .o file with -o,
5682 # though they will create one.
5683 am_cv_prog_cc_c_o=yes
5685 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5686 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689 (exit $ac_status); } \
5690 && test -f conftest2.$ac_objext; then
5693 am_cv_prog_cc_c_o=no
5697 rm -f core conftest*
5700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5701 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5702 if test "$am_cv_prog_cc_c_o" != yes; then
5703 # Losing compiler, so override with the script.
5704 # FIXME: It is wrong to rewrite CC.
5705 # But if we don't then we get into trouble of one sort or another.
5706 # A longer-term fix would be to have automake use am__CC in this case,
5707 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5708 CC="$am_aux_dir/compile $CC"
5711 ac_cpp='$CPP $CPPFLAGS'
5712 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5713 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5714 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5717 depcc="$CC" am_compiler_list=
5719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5720 printf %s "checking dependency style of $depcc... " >&6; }
5721 if test ${am_cv_CC_dependencies_compiler_type+y}
5723 printf %s "(cached) " >&6
5725 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5726 # We make a subdir and do the tests there. Otherwise we can end up
5727 # making bogus files that we don't know about and never remove. For
5728 # instance it was reported that on HP-UX the gcc test will end up
5729 # making a dummy file named 'D' -- because '-MD' means "put the output
5733 # Copy depcomp to subdir because otherwise we won't find it if we're
5734 # using a relative directory.
5735 cp "$am_depcomp" conftest.dir
5737 # We will build objects and dependencies in a subdirectory because
5738 # it helps to detect inapplicable dependency modes. For instance
5739 # both Tru64's cc and ICC support -MD to output dependencies as a
5740 # side effect of compilation, but ICC will put the dependencies in
5741 # the current directory while Tru64 will put them in the object
5745 am_cv_CC_dependencies_compiler_type=none
5746 if test "$am_compiler_list" = ""; then
5747 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5750 case " $depcc " in #(
5751 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5754 for depmode in $am_compiler_list; do
5755 # Setup a source with many dependencies, because some compilers
5756 # like to wrap large dependency lists on column 80 (with \), and
5757 # we should not choose a depcomp mode which is confused by this.
5759 # We need to recreate these files for each test, as the compiler may
5760 # overwrite some of them when testing with obscure command lines.
5761 # This happens at least with the AIX C compiler.
5763 for i in 1 2 3 4 5 6; do
5764 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5765 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5766 # Solaris 10 /bin/sh.
5767 echo '/* dummy */' > sub/conftst$i.h
5769 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5771 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5772 # mode. It turns out that the SunPro C++ compiler does not properly
5773 # handle '-M -o', and we need to detect this. Also, some Intel
5774 # versions had trouble with output in subdirs.
5775 am__obj=sub/conftest.${OBJEXT-o}
5776 am__minus_obj="-o $am__obj"
5779 # This depmode causes a compiler race in universal mode.
5780 test "$am__universal" = false || continue
5783 # After this tag, mechanisms are not by side-effect, so they'll
5784 # only be used when explicitly requested.
5785 if test "x$enable_dependency_tracking" = xyes; then
5791 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5792 # This compiler won't grok '-c -o', but also, the minuso test has
5793 # not run yet. These depmodes are late enough in the game, and
5794 # so weak that their functioning should not be impacted.
5795 am__obj=conftest.${OBJEXT-o}
5800 if depmode=$depmode \
5801 source=sub/conftest.c object=$am__obj \
5802 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5803 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5804 >/dev/null 2>conftest.err &&
5805 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5806 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5807 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5808 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5809 # icc doesn't choke on unknown options, it will just issue warnings
5810 # or remarks (even with -Werror). So we grep stderr for any message
5811 # that says an option was ignored or not supported.
5812 # When given -MP, icc 7.0 and 7.1 complain thusly:
5813 # icc: Command line warning: ignoring option '-M'; no argument required
5814 # The diagnosis changed in icc 8.0:
5815 # icc: Command line remark: option '-MP' not supported
5816 if (grep 'ignoring option' conftest.err ||
5817 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5818 am_cv_CC_dependencies_compiler_type=$depmode
5827 am_cv_CC_dependencies_compiler_type=none
5831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5832 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5833 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5836 test "x$enable_dependency_tracking" != xno \
5837 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5839 am__fastdepCC_FALSE='#'
5841 am__fastdepCC_TRUE='#'
5842 am__fastdepCC_FALSE=
5849 ac_cpp='$CPP $CPPFLAGS'
5850 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5851 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5852 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5854 printf %s "checking how to run the C preprocessor... " >&6; }
5855 # On Suns, sometimes $CPP names a directory.
5856 if test -n "$CPP" && test -d "$CPP"; then
5859 if test -z "$CPP"; then
5860 if test ${ac_cv_prog_CPP+y}
5862 printf %s "(cached) " >&6
5864 # Double quotes because CPP needs to be expanded
5865 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5868 for ac_c_preproc_warn_flag in '' yes
5870 # Use a header file that comes with gcc, so configuring glibc
5871 # with a fresh cross-compiler works.
5872 # On the NeXT, cc -E runs the code through the compiler's parser,
5873 # not just through cpp. "Syntax error" is here to catch this case.
5874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5875 /* end confdefs.h. */
5879 if ac_fn_c_try_cpp "$LINENO"
5883 # Broken: fails on valid input.
5886 rm -f conftest.err conftest.i conftest.$ac_ext
5888 # OK, works on sane cases. Now check whether nonexistent headers
5889 # can be detected and how.
5890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5891 /* end confdefs.h. */
5892 #include <ac_nonexistent.h>
5894 if ac_fn_c_try_cpp "$LINENO"
5896 # Broken: success on invalid input.
5899 # Passes both tests.
5903 rm -f conftest.err conftest.i conftest.$ac_ext
5906 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5907 rm -f conftest.i conftest.err conftest.$ac_ext
5921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5922 printf "%s\n" "$CPP" >&6; }
5924 for ac_c_preproc_warn_flag in '' yes
5926 # Use a header file that comes with gcc, so configuring glibc
5927 # with a fresh cross-compiler works.
5928 # On the NeXT, cc -E runs the code through the compiler's parser,
5929 # not just through cpp. "Syntax error" is here to catch this case.
5930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5931 /* end confdefs.h. */
5935 if ac_fn_c_try_cpp "$LINENO"
5939 # Broken: fails on valid input.
5942 rm -f conftest.err conftest.i conftest.$ac_ext
5944 # OK, works on sane cases. Now check whether nonexistent headers
5945 # can be detected and how.
5946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5947 /* end confdefs.h. */
5948 #include <ac_nonexistent.h>
5950 if ac_fn_c_try_cpp "$LINENO"
5952 # Broken: success on invalid input.
5955 # Passes both tests.
5959 rm -f conftest.err conftest.i conftest.$ac_ext
5962 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5963 rm -f conftest.i conftest.err conftest.$ac_ext
5968 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5969 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5970 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5971 See \`config.log' for more details" "$LINENO" 5; }
5975 ac_cpp='$CPP $CPPFLAGS'
5976 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5977 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5978 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5981 printf %s "checking for grep that handles long lines and -e... " >&6; }
5982 if test ${ac_cv_path_GREP+y}
5984 printf %s "(cached) " >&6
5986 if test -z "$GREP"; then
5987 ac_path_GREP_found=false
5988 # Loop through the user's path and test for each of PROGNAME-LIST
5989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5990 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5993 case $as_dir in #(((
5996 *) as_dir=$as_dir/ ;;
5998 for ac_prog in grep ggrep
6000 for ac_exec_ext in '' $ac_executable_extensions; do
6001 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
6002 as_fn_executable_p "$ac_path_GREP" || continue
6003 # Check for GNU ac_path_GREP and select it if it is found.
6004 # Check for GNU $ac_path_GREP
6005 case `"$ac_path_GREP" --version 2>&1` in
6007 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6010 printf %s 0123456789 >"conftest.in"
6013 cat "conftest.in" "conftest.in" >"conftest.tmp"
6014 mv "conftest.tmp" "conftest.in"
6015 cp "conftest.in" "conftest.nl"
6016 printf "%s\n" 'GREP' >> "conftest.nl"
6017 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6018 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6019 as_fn_arith $ac_count + 1 && ac_count=$as_val
6020 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6021 # Best one so far, save it but keep looking for a better one
6022 ac_cv_path_GREP="$ac_path_GREP"
6023 ac_path_GREP_max=$ac_count
6025 # 10*(2^10) chars as input seems more than enough
6026 test $ac_count -gt 10 && break
6028 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6031 $ac_path_GREP_found && break 3
6036 if test -z "$ac_cv_path_GREP"; then
6037 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6040 ac_cv_path_GREP=$GREP
6044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6045 printf "%s\n" "$ac_cv_path_GREP" >&6; }
6046 GREP="$ac_cv_path_GREP"
6049 if test -n "$ac_tool_prefix"; then
6050 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
6051 set dummy ${ac_tool_prefix}nm; ac_word=$2
6052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053 printf %s "checking for $ac_word... " >&6; }
6054 if test ${ac_cv_prog_NM+y}
6056 printf %s "(cached) " >&6
6058 if test -n "$NM"; then
6059 ac_cv_prog_NM="$NM" # Let the user override the test.
6061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065 case $as_dir in #(((
6068 *) as_dir=$as_dir/ ;;
6070 for ac_exec_ext in '' $ac_executable_extensions; do
6071 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6072 ac_cv_prog_NM="${ac_tool_prefix}nm"
6073 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6083 if test -n "$NM"; then
6084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
6085 printf "%s\n" "$NM" >&6; }
6087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6088 printf "%s\n" "no" >&6; }
6093 if test -z "$ac_cv_prog_NM"; then
6095 # Extract the first word of "nm", so it can be a program name with args.
6096 set dummy nm; ac_word=$2
6097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6098 printf %s "checking for $ac_word... " >&6; }
6099 if test ${ac_cv_prog_ac_ct_NM+y}
6101 printf %s "(cached) " >&6
6103 if test -n "$ac_ct_NM"; then
6104 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
6106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6110 case $as_dir in #(((
6113 *) as_dir=$as_dir/ ;;
6115 for ac_exec_ext in '' $ac_executable_extensions; do
6116 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6117 ac_cv_prog_ac_ct_NM="nm"
6118 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6127 ac_ct_NM=$ac_cv_prog_ac_ct_NM
6128 if test -n "$ac_ct_NM"; then
6129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
6130 printf "%s\n" "$ac_ct_NM" >&6; }
6132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6133 printf "%s\n" "no" >&6; }
6136 if test "x$ac_ct_NM" = x; then
6139 case $cross_compiling:$ac_tool_warned in
6141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6142 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6143 ac_tool_warned=yes ;;
6151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6152 printf %s "checking whether ln -s works... " >&6; }
6154 if test "$LN_S" = "ln -s"; then
6155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6156 printf "%s\n" "yes" >&6; }
6158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6159 printf "%s\n" "no, using $LN_S" >&6; }
6162 if test -n "$ac_tool_prefix"; then
6163 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6164 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166 printf %s "checking for $ac_word... " >&6; }
6167 if test ${ac_cv_prog_RANLIB+y}
6169 printf %s "(cached) " >&6
6171 if test -n "$RANLIB"; then
6172 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178 case $as_dir in #(((
6181 *) as_dir=$as_dir/ ;;
6183 for ac_exec_ext in '' $ac_executable_extensions; do
6184 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6185 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6186 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6195 RANLIB=$ac_cv_prog_RANLIB
6196 if test -n "$RANLIB"; then
6197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6198 printf "%s\n" "$RANLIB" >&6; }
6200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6201 printf "%s\n" "no" >&6; }
6206 if test -z "$ac_cv_prog_RANLIB"; then
6207 ac_ct_RANLIB=$RANLIB
6208 # Extract the first word of "ranlib", so it can be a program name with args.
6209 set dummy ranlib; ac_word=$2
6210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6211 printf %s "checking for $ac_word... " >&6; }
6212 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6214 printf %s "(cached) " >&6
6216 if test -n "$ac_ct_RANLIB"; then
6217 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6223 case $as_dir in #(((
6226 *) as_dir=$as_dir/ ;;
6228 for ac_exec_ext in '' $ac_executable_extensions; do
6229 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6230 ac_cv_prog_ac_ct_RANLIB="ranlib"
6231 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6240 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6241 if test -n "$ac_ct_RANLIB"; then
6242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6243 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6246 printf "%s\n" "no" >&6; }
6249 if test "x$ac_ct_RANLIB" = x; then
6252 case $cross_compiling:$ac_tool_warned in
6254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6255 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6256 ac_tool_warned=yes ;;
6258 RANLIB=$ac_ct_RANLIB
6261 RANLIB="$ac_cv_prog_RANLIB"
6264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
6265 printf %s "checking for a POSIX-compliant shell... " >&6; }
6266 if test ${ac_cv_path_shell+y}
6268 printf %s "(cached) " >&6
6271 # Test the noclobber option, using the portable POSIX.2 syntax.
6275 >|conftest.c || exit
6276 !>conftest.c || exit
6277 # Test that $(...) works.
6278 test "$(expr 3 + 4)" -eq 7 || exit
6280 # Solaris 11 /bin/sh (AT&T Research) 93u 2011-02-08 has a file
6281 # descriptor bug that breaks zgrep and is hard to test for
6282 # directly. At some point $(...) is reading a pipe from the
6283 # subshell, but the pipe is also open in the parent shell, so
6284 # the read deadlocks. Prefer some other shell if available.
6285 ac_maybe_solaris_sh_bug='test "${.sh.version}"'
6292 if ("$SHELL" -c "$ac_command") 2>/dev/null; then
6293 "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null ||
6294 ac_cv_path_shell=$SHELL
6298 case $ac_cv_path_shell in
6300 # Prefer shells that are more likely to be installed in the
6301 # same place on all hosts of this platform. Therefore, prefer
6302 # shells in /bin and /usr/bin to shells in the installer's
6303 # PATH. Also, loop through PATH first and then through
6304 # shells, since less-"nice" shells in /bin and /usr/bin are
6305 # more likely to be installed than "nicer" shells elsewhere.
6306 ac_break_if_good_shell=:
6307 as_save_IFS=$IFS; IFS=:
6308 for as_dir in /bin /usr/bin $PATH
6313 for ac_base in sh bash ksh sh5; do
6315 if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
6316 if "$as_dir/$ac_base" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null
6318 test "$ac_cv_path_shell" = no
6320 ac_break_if_good_shell=break
6322 fi && ac_cv_path_shell=$as_dir/$ac_base
6323 $ac_break_if_good_shell
6326 $ac_break_if_good_shell
6333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
6334 printf "%s\n" "$ac_cv_path_shell" >&6; }
6335 SHELL=$ac_cv_path_shell
6336 if test "$SHELL" = no; then
6338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
6339 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
6341 if "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null; then
6342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it may have file descriptor bugs" >&5
6343 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it may have file descriptor bugs" >&2;}
6348 ac_header= ac_cache=
6349 for ac_item in $ac_header_c_list
6351 if test $ac_cache; then
6352 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6353 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6354 printf "%s\n" "#define $ac_item 1" >> confdefs.h
6356 ac_header= ac_cache=
6357 elif test $ac_header; then
6369 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
6371 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
6373 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6376 ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6377 if test "x$ac_cv_header_minix_config_h" = xyes
6384 if test "$MINIX" = yes; then
6386 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6389 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6392 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6395 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6401 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6402 if test ${ac_cv_safe_to_define___extensions__+y}
6404 printf %s "(cached) " >&6
6406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6407 /* end confdefs.h. */
6409 # define __EXTENSIONS__ 1
6410 $ac_includes_default
6419 if ac_fn_c_try_compile "$LINENO"
6421 ac_cv_safe_to_define___extensions__=yes
6423 ac_cv_safe_to_define___extensions__=no
6425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6428 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6429 test $ac_cv_safe_to_define___extensions__ = yes &&
6430 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6432 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6434 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6436 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6438 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6440 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6442 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6444 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6446 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6448 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6450 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6452 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6454 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6456 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6458 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6461 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6462 if test ${ac_cv_should_define__xopen_source+y}
6464 printf %s "(cached) " >&6
6466 ac_cv_should_define__xopen_source=no
6467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6468 /* end confdefs.h. */
6480 if ac_fn_c_try_compile "$LINENO"
6484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6485 /* end confdefs.h. */
6487 #define _XOPEN_SOURCE 500
6498 if ac_fn_c_try_compile "$LINENO"
6500 ac_cv_should_define__xopen_source=yes
6502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6507 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6508 test $ac_cv_should_define__xopen_source = yes &&
6509 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6511 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6522 printf %s "checking for egrep... " >&6; }
6523 if test ${ac_cv_path_EGREP+y}
6525 printf %s "(cached) " >&6
6527 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6528 then ac_cv_path_EGREP="$GREP -E"
6530 if test -z "$EGREP"; then
6531 ac_path_EGREP_found=false
6532 # Loop through the user's path and test for each of PROGNAME-LIST
6533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6537 case $as_dir in #(((
6540 *) as_dir=$as_dir/ ;;
6542 for ac_prog in egrep
6544 for ac_exec_ext in '' $ac_executable_extensions; do
6545 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6546 as_fn_executable_p "$ac_path_EGREP" || continue
6547 # Check for GNU ac_path_EGREP and select it if it is found.
6548 # Check for GNU $ac_path_EGREP
6549 case `"$ac_path_EGREP" --version 2>&1` in
6551 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6554 printf %s 0123456789 >"conftest.in"
6557 cat "conftest.in" "conftest.in" >"conftest.tmp"
6558 mv "conftest.tmp" "conftest.in"
6559 cp "conftest.in" "conftest.nl"
6560 printf "%s\n" 'EGREP' >> "conftest.nl"
6561 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6562 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6563 as_fn_arith $ac_count + 1 && ac_count=$as_val
6564 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6565 # Best one so far, save it but keep looking for a better one
6566 ac_cv_path_EGREP="$ac_path_EGREP"
6567 ac_path_EGREP_max=$ac_count
6569 # 10*(2^10) chars as input seems more than enough
6570 test $ac_count -gt 10 && break
6572 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6575 $ac_path_EGREP_found && break 3
6580 if test -z "$ac_cv_path_EGREP"; then
6581 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6584 ac_cv_path_EGREP=$EGREP
6589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6590 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6591 EGREP="$ac_cv_path_EGREP"
6597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6598 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6599 if test ${gl_cv_c_amsterdam_compiler+y}
6601 printf %s "(cached) " >&6
6604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6605 /* end confdefs.h. */
6612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6613 $EGREP "Amsterdam" >/dev/null 2>&1
6615 gl_cv_c_amsterdam_compiler=yes
6617 gl_cv_c_amsterdam_compiler=no
6623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6624 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6626 if test $gl_cv_c_amsterdam_compiler = yes; then
6627 if test -z "$AR"; then
6630 if test -z "$ARFLAGS"; then
6637 if test -n "$ac_tool_prefix"; then
6638 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6639 set dummy ${ac_tool_prefix}ar; ac_word=$2
6640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6641 printf %s "checking for $ac_word... " >&6; }
6642 if test ${ac_cv_prog_AR+y}
6644 printf %s "(cached) " >&6
6646 if test -n "$AR"; then
6647 ac_cv_prog_AR="$AR" # Let the user override the test.
6649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6653 case $as_dir in #(((
6656 *) as_dir=$as_dir/ ;;
6658 for ac_exec_ext in '' $ac_executable_extensions; do
6659 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6660 ac_cv_prog_AR="${ac_tool_prefix}ar"
6661 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6671 if test -n "$AR"; then
6672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6673 printf "%s\n" "$AR" >&6; }
6675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6676 printf "%s\n" "no" >&6; }
6681 if test -z "$ac_cv_prog_AR"; then
6683 # Extract the first word of "ar", so it can be a program name with args.
6684 set dummy ar; ac_word=$2
6685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686 printf %s "checking for $ac_word... " >&6; }
6687 if test ${ac_cv_prog_ac_ct_AR+y}
6689 printf %s "(cached) " >&6
6691 if test -n "$ac_ct_AR"; then
6692 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698 case $as_dir in #(((
6701 *) as_dir=$as_dir/ ;;
6703 for ac_exec_ext in '' $ac_executable_extensions; do
6704 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6705 ac_cv_prog_ac_ct_AR="ar"
6706 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6715 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6716 if test -n "$ac_ct_AR"; then
6717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6718 printf "%s\n" "$ac_ct_AR" >&6; }
6720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721 printf "%s\n" "no" >&6; }
6724 if test "x$ac_ct_AR" = x; then
6727 case $cross_compiling:$ac_tool_warned in
6729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6730 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6731 ac_tool_warned=yes ;;
6739 if test -z "$ARFLAGS"; then
6745 if test -z "$RANLIB"; then
6746 if test $gl_cv_c_amsterdam_compiler = yes; then
6749 if test -n "$ac_tool_prefix"; then
6750 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6751 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6753 printf %s "checking for $ac_word... " >&6; }
6754 if test ${ac_cv_prog_RANLIB+y}
6756 printf %s "(cached) " >&6
6758 if test -n "$RANLIB"; then
6759 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6765 case $as_dir in #(((
6768 *) as_dir=$as_dir/ ;;
6770 for ac_exec_ext in '' $ac_executable_extensions; do
6771 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6772 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6773 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6782 RANLIB=$ac_cv_prog_RANLIB
6783 if test -n "$RANLIB"; then
6784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6785 printf "%s\n" "$RANLIB" >&6; }
6787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6788 printf "%s\n" "no" >&6; }
6793 if test -z "$ac_cv_prog_RANLIB"; then
6794 ac_ct_RANLIB=$RANLIB
6795 # Extract the first word of "ranlib", so it can be a program name with args.
6796 set dummy ranlib; ac_word=$2
6797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6798 printf %s "checking for $ac_word... " >&6; }
6799 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6801 printf %s "(cached) " >&6
6803 if test -n "$ac_ct_RANLIB"; then
6804 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6810 case $as_dir in #(((
6813 *) as_dir=$as_dir/ ;;
6815 for ac_exec_ext in '' $ac_executable_extensions; do
6816 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6817 ac_cv_prog_ac_ct_RANLIB="ranlib"
6818 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6827 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6828 if test -n "$ac_ct_RANLIB"; then
6829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6830 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833 printf "%s\n" "no" >&6; }
6836 if test "x$ac_ct_RANLIB" = x; then
6839 case $cross_compiling:$ac_tool_warned in
6841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6842 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6843 ac_tool_warned=yes ;;
6845 RANLIB=$ac_ct_RANLIB
6848 RANLIB="$ac_cv_prog_RANLIB"
6855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6856 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6857 if test ${ac_cv_sys_largefile_source+y}
6859 printf %s "(cached) " >&6
6862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6863 /* end confdefs.h. */
6864 #include <sys/types.h> /* for off_t */
6869 int (*fp) (FILE *, off_t, int) = fseeko;
6870 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6875 if ac_fn_c_try_link "$LINENO"
6877 ac_cv_sys_largefile_source=no; break
6879 rm -f core conftest.err conftest.$ac_objext \
6880 conftest$ac_exeext conftest.$ac_ext
6881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6882 /* end confdefs.h. */
6883 #define _LARGEFILE_SOURCE 1
6884 #include <sys/types.h> /* for off_t */
6889 int (*fp) (FILE *, off_t, int) = fseeko;
6890 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6895 if ac_fn_c_try_link "$LINENO"
6897 ac_cv_sys_largefile_source=1; break
6899 rm -f core conftest.err conftest.$ac_objext \
6900 conftest$ac_exeext conftest.$ac_ext
6901 ac_cv_sys_largefile_source=unknown
6905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6906 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
6907 case $ac_cv_sys_largefile_source in #(
6910 printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
6915 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6916 # in glibc 2.1.3, but that breaks too many other things.
6917 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6918 if test $ac_cv_sys_largefile_source != unknown; then
6920 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
6924 # Make sure we can run config.sub.
6925 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6926 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6929 printf %s "checking build system type... " >&6; }
6930 if test ${ac_cv_build+y}
6932 printf %s "(cached) " >&6
6934 ac_build_alias=$build_alias
6935 test "x$ac_build_alias" = x &&
6936 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6937 test "x$ac_build_alias" = x &&
6938 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6939 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6940 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6944 printf "%s\n" "$ac_cv_build" >&6; }
6945 case $ac_cv_build in
6947 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6950 ac_save_IFS=$IFS; IFS='-'
6956 # Remember, the first character of IFS is used to create $*,
6957 # except with old shells:
6960 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6964 printf %s "checking host system type... " >&6; }
6965 if test ${ac_cv_host+y}
6967 printf %s "(cached) " >&6
6969 if test "x$host_alias" = x; then
6970 ac_cv_host=$ac_cv_build
6972 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6973 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6978 printf "%s\n" "$ac_cv_host" >&6; }
6981 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6984 ac_save_IFS=$IFS; IFS='-'
6990 # Remember, the first character of IFS is used to create $*,
6991 # except with old shells:
6994 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7000 # IEEE behaviour is the default on all CPUs except Alpha and SH
7001 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7002 # and the GCC 4.1.2 manual).
7005 # On Alpha systems, a compiler option provides the behaviour.
7006 # See the ieee(3) manual page, also available at
7007 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7008 if test -n "$GCC"; then
7009 # GCC has the option -mieee.
7010 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7011 CPPFLAGS="$CPPFLAGS -mieee"
7013 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
7014 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
7015 CPPFLAGS="$CPPFLAGS -ieee"
7019 if test -n "$GCC"; then
7020 # GCC has the option -mieee.
7021 CPPFLAGS="$CPPFLAGS -mieee"
7026 # Check whether --enable-largefile was given.
7027 if test ${enable_largefile+y}
7029 enableval=$enable_largefile;
7032 if test "$enable_largefile" != no; then
7034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7035 printf %s "checking for special C compiler options needed for large files... " >&6; }
7036 if test ${ac_cv_sys_largefile_CC+y}
7038 printf %s "(cached) " >&6
7040 ac_cv_sys_largefile_CC=no
7041 if test "$GCC" != yes; then
7044 # IRIX 6.2 and later do not support large files by default,
7045 # so use the C compiler's -n32 option if that helps.
7046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7047 /* end confdefs.h. */
7048 #include <sys/types.h>
7049 /* Check that off_t can represent 2**63 - 1 correctly.
7050 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7051 since some C++ compilers masquerading as C compilers
7052 incorrectly reject 9223372036854775807. */
7053 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7054 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7055 && LARGE_OFF_T % 2147483647 == 1)
7065 if ac_fn_c_try_compile "$LINENO"
7069 rm -f core conftest.err conftest.$ac_objext
7071 if ac_fn_c_try_compile "$LINENO"
7073 ac_cv_sys_largefile_CC=' -n32'; break
7075 rm -f core conftest.err conftest.$ac_objext
7079 rm -f conftest.$ac_ext
7082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7083 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
7084 if test "$ac_cv_sys_largefile_CC" != no; then
7085 CC=$CC$ac_cv_sys_largefile_CC
7088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7089 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7090 if test ${ac_cv_sys_file_offset_bits+y}
7092 printf %s "(cached) " >&6
7095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7096 /* end confdefs.h. */
7097 #include <sys/types.h>
7098 /* Check that off_t can represent 2**63 - 1 correctly.
7099 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7100 since some C++ compilers masquerading as C compilers
7101 incorrectly reject 9223372036854775807. */
7102 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7103 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7104 && LARGE_OFF_T % 2147483647 == 1)
7114 if ac_fn_c_try_compile "$LINENO"
7116 ac_cv_sys_file_offset_bits=no; break
7118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120 /* end confdefs.h. */
7121 #define _FILE_OFFSET_BITS 64
7122 #include <sys/types.h>
7123 /* Check that off_t can represent 2**63 - 1 correctly.
7124 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7125 since some C++ compilers masquerading as C compilers
7126 incorrectly reject 9223372036854775807. */
7127 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7128 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7129 && LARGE_OFF_T % 2147483647 == 1)
7139 if ac_fn_c_try_compile "$LINENO"
7141 ac_cv_sys_file_offset_bits=64; break
7143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7144 ac_cv_sys_file_offset_bits=unknown
7148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7149 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
7150 case $ac_cv_sys_file_offset_bits in #(
7153 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
7157 if test $ac_cv_sys_file_offset_bits = unknown; then
7158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7159 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7160 if test ${ac_cv_sys_large_files+y}
7162 printf %s "(cached) " >&6
7165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166 /* end confdefs.h. */
7167 #include <sys/types.h>
7168 /* Check that off_t can represent 2**63 - 1 correctly.
7169 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7170 since some C++ compilers masquerading as C compilers
7171 incorrectly reject 9223372036854775807. */
7172 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7173 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7174 && LARGE_OFF_T % 2147483647 == 1)
7184 if ac_fn_c_try_compile "$LINENO"
7186 ac_cv_sys_large_files=no; break
7188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7190 /* end confdefs.h. */
7191 #define _LARGE_FILES 1
7192 #include <sys/types.h>
7193 /* Check that off_t can represent 2**63 - 1 correctly.
7194 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7195 since some C++ compilers masquerading as C compilers
7196 incorrectly reject 9223372036854775807. */
7197 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7198 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7199 && LARGE_OFF_T % 2147483647 == 1)
7209 if ac_fn_c_try_compile "$LINENO"
7211 ac_cv_sys_large_files=1; break
7213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7214 ac_cv_sys_large_files=unknown
7218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7219 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7220 case $ac_cv_sys_large_files in #(
7223 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
7230 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7239 # Check whether --enable-threads was given.
7240 if test ${enable_threads+y}
7242 enableval=$enable_threads; gl_use_threads=$enableval
7244 if test -n "$gl_use_threads_default"; then
7245 gl_use_threads="$gl_use_threads_default"
7248 osf*) gl_use_threads=no ;;
7251 1.[0-5].*) gl_use_threads=no ;;
7252 *) gl_use_threads=yes ;;
7255 *) gl_use_threads=yes ;;
7261 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7262 # For using <pthread.h>:
7265 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7266 # groks <pthread.h>. cc also understands the flag -pthread, but
7267 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7268 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7269 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7270 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7271 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7274 # Some systems optimize for single-threaded programs by default, and
7275 # need special flags to disable these optimizations. For example, the
7276 # definition of 'errno' in <errno.h>.
7278 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7279 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7288 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
7295 # Pre-early section.
7300 # Code from module absolute-header:
7301 # Code from module alloca-opt:
7302 # Code from module announce-gen:
7303 # Code from module assure:
7304 # Code from module at-internal:
7305 # Code from module calloc:
7306 # Code from module calloc-gnu:
7307 # Code from module calloc-posix:
7308 # Code from module chdir:
7309 # Code from module chdir-long:
7310 # Code from module clock-time:
7311 # Code from module cloexec:
7312 # Code from module close:
7313 # Code from module closedir:
7314 # Code from module dirent:
7315 # Code from module dirent-safer:
7316 # Code from module dirfd:
7317 # Code from module dirname-lgpl:
7318 # Code from module do-release-commit-and-tag:
7319 # Code from module dosname:
7320 # Code from module double-slash-root:
7321 # Code from module dup:
7322 # Code from module dup2:
7323 # Code from module errno:
7324 # Code from module error:
7325 # Code from module exitfail:
7326 # Code from module extensions:
7327 # Code from module extern-inline:
7328 # Code from module fchdir:
7329 # Code from module fclose:
7330 # Code from module fcntl:
7331 # Code from module fcntl-h:
7332 # Code from module fcntl-safer:
7333 # Code from module fd-hook:
7334 # Code from module fd-safer-flag:
7335 # Code from module fdatasync:
7336 # Code from module fdl:
7337 # Code from module fdopendir:
7338 # Code from module fflush:
7340 # Code from module filename:
7341 # Code from module filenamecat-lgpl:
7342 # Code from module float:
7343 # Code from module fpieee:
7345 # Code from module fprintf-posix:
7346 # Code from module fpucw:
7347 # Code from module fpurge:
7348 # Code from module freading:
7349 # Code from module frexp-nolibm:
7350 # Code from module frexpl-nolibm:
7351 # Code from module fseek:
7352 # Code from module fseeko:
7354 # Code from module fseterr:
7355 # Code from module fstat:
7356 # Code from module fstatat:
7357 # Code from module fsync:
7358 # Code from module ftell:
7359 # Code from module ftello:
7361 # Code from module gendocs:
7362 # Code from module getcwd-lgpl:
7363 # Code from module getdtablesize:
7364 # Code from module getopt-gnu:
7365 # Code from module getopt-posix:
7366 # Code from module getprogname:
7367 # Code from module gettext-h:
7368 # Code from module gettime:
7369 # Code from module gettimeofday:
7370 # Code from module git-version-gen:
7371 # Code from module gitlog-to-changelog:
7372 # Code from module gnu-make:
7373 # Code from module gnu-web-doc-update:
7374 # Code from module gnumakefile:
7375 # Code from module gnupload:
7376 # Code from module havelib:
7377 # Code from module ignore-value:
7378 # Code from module include_next:
7379 # Code from module intprops:
7380 # Code from module isnand-nolibm:
7381 # Code from module isnanf-nolibm:
7382 # Code from module isnanl-nolibm:
7383 # Code from module largefile:
7385 # Code from module lib-ignore:
7386 # Code from module limits-h:
7387 # Code from module localtime-buffer:
7388 # Code from module lock:
7389 # Code from module lseek:
7390 # Code from module lstat:
7391 # Code from module maintainer-makefile:
7392 # Code from module malloc-gnu:
7393 # Code from module malloc-posix:
7394 # Code from module malloca:
7395 # Code from module manywarnings:
7396 # Code from module math:
7397 # Code from module memchr:
7398 # Code from module mempcpy:
7399 # Code from module memrchr:
7400 # Code from module msvc-inval:
7401 # Code from module msvc-nothrow:
7402 # Code from module multiarch:
7403 # Code from module nocrash:
7404 # Code from module open:
7405 # Code from module openat:
7406 # Code from module openat-die:
7407 # Code from module openat-h:
7408 # Code from module openat-safer:
7409 # Code from module opendir:
7410 # Code from module pathmax:
7411 # Code from module perror:
7412 # Code from module printf-frexp:
7413 # Code from module printf-frexpl:
7414 # Code from module printf-posix:
7415 # Code from module printf-safe:
7416 # Code from module raise:
7417 # Code from module readdir:
7418 # Code from module readme-release:
7419 # Code from module realloc-gnu:
7420 # Code from module realloc-posix:
7421 # Code from module rmdir:
7422 # Code from module save-cwd:
7423 # Code from module savedir:
7424 # Code from module sigaction:
7425 # Code from module signal-h:
7426 # Code from module signbit:
7427 # Code from module sigprocmask:
7428 # Code from module size_max:
7429 # Code from module snippet/_Noreturn:
7430 # Code from module snippet/arg-nonnull:
7431 # Code from module snippet/c++defs:
7432 # Code from module snippet/unused-parameter:
7433 # Code from module snippet/warn-on-use:
7434 # Code from module ssize_t:
7435 # Code from module stat:
7436 # Code from module stat-time:
7437 # Code from module statat:
7438 # Code from module stdbool:
7439 # Code from module stddef:
7440 # Code from module stdint:
7441 # Code from module stdio:
7442 # Code from module stdlib:
7443 # Code from module stdnoreturn:
7444 # Code from module stpcpy:
7445 # Code from module strdup-posix:
7446 # Code from module strerror:
7447 # Code from module strerror-override:
7448 # Code from module strerror_r-posix:
7449 # Code from module string:
7450 # Code from module sys_stat:
7451 # Code from module sys_time:
7452 # Code from module sys_types:
7453 # Code from module threadlib:
7457 # Code from module time:
7458 # Code from module timespec:
7459 # Code from module unistd:
7460 # Code from module unistd-safer:
7461 # Code from module unlink:
7462 # Code from module unlinkat:
7463 # Code from module update-copyright:
7464 # Code from module useless-if-before-free:
7465 # Code from module utime:
7466 # Code from module utime-h:
7467 # Code from module utimens:
7468 # Code from module vasnprintf:
7469 # Code from module vc-list-files:
7470 # Code from module verify:
7471 # Code from module vfprintf-posix:
7472 # Code from module warnings:
7473 # Code from module wchar:
7474 # Code from module xalloc:
7475 # Code from module xalloc-die:
7476 # Code from module xalloc-oversized:
7477 # Code from module xsize:
7478 # Code from module year2038:
7480 # Code from module yesno:
7488 LIBC_FATAL_STDERR_=1
7489 export LIBC_FATAL_STDERR_
7491 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7492 if test "x$ac_cv_type_size_t" = xyes
7497 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
7501 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7502 # for constant arguments. Useless!
7503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7504 printf %s "checking for working alloca.h... " >&6; }
7505 if test ${ac_cv_working_alloca_h+y}
7507 printf %s "(cached) " >&6
7509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7510 /* end confdefs.h. */
7515 char *p = (char *) alloca (2 * sizeof (int));
7521 if ac_fn_c_try_link "$LINENO"
7523 ac_cv_working_alloca_h=yes
7525 ac_cv_working_alloca_h=no
7527 rm -f core conftest.err conftest.$ac_objext \
7528 conftest$ac_exeext conftest.$ac_ext
7530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7531 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7532 if test $ac_cv_working_alloca_h = yes; then
7534 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7539 printf %s "checking for alloca... " >&6; }
7540 if test ${ac_cv_func_alloca_works+y}
7542 printf %s "(cached) " >&6
7544 if test $ac_cv_working_alloca_h = yes; then
7545 ac_cv_func_alloca_works=yes
7547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7548 /* end confdefs.h. */
7553 # define alloca __builtin_alloca
7554 # elif defined _MSC_VER
7555 # include <malloc.h>
7556 # define alloca _alloca
7561 void *alloca (size_t);
7568 char *p = (char *) alloca (1);
7574 if ac_fn_c_try_link "$LINENO"
7576 ac_cv_func_alloca_works=yes
7578 ac_cv_func_alloca_works=no
7580 rm -f core conftest.err conftest.$ac_objext \
7581 conftest$ac_exeext conftest.$ac_ext
7583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7584 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7587 if test $ac_cv_func_alloca_works = yes; then
7589 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7592 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7593 # that cause trouble. Some versions do not even contain alloca or
7594 # contain a buggy version. If you still want to use their alloca,
7595 # use ar to extract alloca.o from them instead of compiling alloca.c.
7601 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7603 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7607 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7608 if test ${ac_cv_os_cray+y}
7610 printf %s "(cached) " >&6
7612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7613 /* end confdefs.h. */
7614 #if defined CRAY && ! defined CRAY2
7621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7622 $EGREP "webecray" >/dev/null 2>&1
7631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7632 printf "%s\n" "$ac_cv_os_cray" >&6; }
7633 if test $ac_cv_os_cray = yes; then
7634 for ac_func in _getb67 GETB67 getb67; do
7635 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7636 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7637 if eval test \"x\$"$as_ac_var"\" = x"yes"
7640 printf "%s\n" "#define CRAY_STACKSEG_END $ac_func" >>confdefs.h
7648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7649 printf %s "checking stack direction for C alloca... " >&6; }
7650 if test ${ac_cv_c_stack_direction+y}
7652 printf %s "(cached) " >&6
7654 if test "$cross_compiling" = yes
7656 ac_cv_c_stack_direction=0
7658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7659 /* end confdefs.h. */
7660 $ac_includes_default
7662 find_stack_direction (int *addr, int depth)
7667 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7668 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7673 main (int argc, char **argv)
7675 return find_stack_direction (0, argc + !argv + 20) < 0;
7678 if ac_fn_c_try_run "$LINENO"
7680 ac_cv_c_stack_direction=1
7682 ac_cv_c_stack_direction=-1
7684 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7685 conftest.$ac_objext conftest.beam conftest.$ac_ext
7689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7690 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7691 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
7699 GNULIB_CALLOC_POSIX=0;
7700 GNULIB_CANONICALIZE_FILE_NAME=0;
7701 GNULIB_GETLOADAVG=0;
7704 GNULIB_MALLOC_POSIX=0;
7711 GNULIB_POSIX_OPENPT=0;
7718 GNULIB_REALLOCARRAY=0;
7719 GNULIB_REALLOC_POSIX=0;
7722 GNULIB_SECURE_GETENV=0;
7727 GNULIB_SYSTEM_POSIX=0;
7733 HAVE_CANONICALIZE_FILE_NAME=1;
7734 HAVE_DECL_GETLOADAVG=1;
7737 HAVE_DECL_INITSTATE=1;
7743 HAVE_POSIX_OPENPT=1;
7750 HAVE_REALLOCARRAY=1;
7753 HAVE_SECURE_GETENV=1;
7756 HAVE_DECL_SETSTATE=1;
7760 HAVE_STRUCT_RANDOM_DATA=1;
7761 HAVE_SYS_LOADAVG_H=0;
7763 HAVE_DECL_UNSETENV=1;
7765 REPLACE_CANONICALIZE_FILE_NAME=0;
7770 REPLACE_PTSNAME_R=0;
7782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7783 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7784 if test ${gl_cv_func_malloc_posix+y}
7786 printf %s "(cached) " >&6
7789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7790 /* end confdefs.h. */
7795 #if defined _WIN32 && ! defined __CYGWIN__
7803 if ac_fn_c_try_compile "$LINENO"
7805 gl_cv_func_malloc_posix=yes
7807 gl_cv_func_malloc_posix=no
7809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7813 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
7823 GNULIB_EUIDACCESS=0;
7831 GNULIB_GETDOMAINNAME=0;
7832 GNULIB_GETDTABLESIZE=0;
7834 GNULIB_GETHOSTNAME=0;
7836 GNULIB_GETLOGIN_R=0;
7837 GNULIB_GETPAGESIZE=0;
7839 GNULIB_GETUSERSHELL=0;
7840 GNULIB_GROUP_MEMBER=0;
7852 GNULIB_READLINKAT=0;
7854 GNULIB_SETHOSTNAME=0;
7860 GNULIB_UNISTD_H_NONBLOCKING=0;
7861 GNULIB_UNISTD_H_SIGPIPE=0;
7876 HAVE_GETDTABLESIZE=1;
7882 HAVE_GROUP_MEMBER=1;
7898 HAVE_DECL_ENVIRON=1;
7900 HAVE_DECL_FDATASYNC=1;
7901 HAVE_DECL_GETDOMAINNAME=1;
7902 HAVE_DECL_GETLOGIN=1;
7903 HAVE_DECL_GETLOGIN_R=1;
7904 HAVE_DECL_GETPAGESIZE=1;
7905 HAVE_DECL_GETUSERSHELL=1;
7906 HAVE_DECL_SETHOSTNAME=1;
7907 HAVE_DECL_TRUNCATE=1;
7908 HAVE_DECL_TTYNAME_R=1;
7915 REPLACE_FACCESSAT=0;
7917 REPLACE_FTRUNCATE=0;
7919 REPLACE_GETDOMAINNAME=0;
7920 REPLACE_GETDTABLESIZE=0;
7921 REPLACE_GETLOGIN_R=0;
7922 REPLACE_GETGROUPS=0;
7923 REPLACE_GETPAGESIZE=0;
7934 REPLACE_READLINKAT=0;
7938 REPLACE_SYMLINKAT=0;
7940 REPLACE_TTYNAME_R=0;
7945 UNISTD_H_HAVE_WINSOCK2_H=0;
7946 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7954 for ac_item in $ac_func_c_list
7956 if test $ac_func; then
7957 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
7958 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
7959 echo "#define $ac_item 1" >> confdefs.h
7968 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7969 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7971 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7974 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7994 HAVE_DECL_FDOPENDIR=1;
8001 REPLACE_FDOPENDIR=0;
8005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
8006 printf %s "checking whether the preprocessor supports include_next... " >&6; }
8007 if test ${gl_cv_have_include_next+y}
8009 printf %s "(cached) " >&6
8011 rm -rf conftestd1a conftestd1b conftestd2
8012 mkdir conftestd1a conftestd1b conftestd2
8013 cat <<EOF > conftestd1a/conftest.h
8014 #define DEFINED_IN_CONFTESTD1
8015 #include_next <conftest.h>
8016 #ifdef DEFINED_IN_CONFTESTD2
8019 #error "include_next doesn't work"
8022 cat <<EOF > conftestd1b/conftest.h
8023 #define DEFINED_IN_CONFTESTD1
8025 #include_next <conftest.h>
8026 #ifdef DEFINED_IN_CONFTESTD2
8029 #error "include_next doesn't work"
8032 cat <<EOF > conftestd2/conftest.h
8033 #ifndef DEFINED_IN_CONFTESTD1
8034 #error "include_next test doesn't work"
8036 #define DEFINED_IN_CONFTESTD2
8038 gl_save_CPPFLAGS="$CPPFLAGS"
8039 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
8040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8041 /* end confdefs.h. */
8042 #include <conftest.h>
8044 if ac_fn_c_try_compile "$LINENO"
8046 gl_cv_have_include_next=yes
8048 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
8049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8050 /* end confdefs.h. */
8051 #include <conftest.h>
8053 if ac_fn_c_try_compile "$LINENO"
8055 gl_cv_have_include_next=buggy
8057 gl_cv_have_include_next=no
8059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8063 CPPFLAGS="$gl_save_CPPFLAGS"
8064 rm -rf conftestd1a conftestd1b conftestd2
8067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8068 printf "%s\n" "$gl_cv_have_include_next" >&6; }
8069 PRAGMA_SYSTEM_HEADER=
8070 if test $gl_cv_have_include_next = yes; then
8071 INCLUDE_NEXT=include_next
8072 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8073 if test -n "$GCC"; then
8074 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8077 if test $gl_cv_have_include_next = buggy; then
8078 INCLUDE_NEXT=include
8079 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8081 INCLUDE_NEXT=include
8082 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
8089 printf %s "checking whether system header files limit the line length... " >&6; }
8090 if test ${gl_cv_pragma_columns+y}
8092 printf %s "(cached) " >&6
8094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8095 /* end confdefs.h. */
8102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8103 $EGREP "choke me" >/dev/null 2>&1
8105 gl_cv_pragma_columns=yes
8107 gl_cv_pragma_columns=no
8113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
8114 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
8115 if test $gl_cv_pragma_columns = yes; then
8116 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
8124 # The Clang compiler raises a warning for an undeclared identifier that matches
8125 # a compiler builtin function. All extant Clang versions are affected, as of
8126 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
8127 # C and Objective C languages, but Clang does report an error under C++ and
8130 # Passing -fno-builtin to the compiler would suppress this problem. That
8131 # strategy would have the advantage of being insensitive to stray warnings, but
8132 # it would make tests less realistic.
8133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
8134 printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
8135 if test ${ac_cv_c_decl_report+y}
8137 printf %s "(cached) " >&6
8139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8140 /* end confdefs.h. */
8150 if ac_fn_c_try_compile "$LINENO"
8152 if test -s conftest.err
8154 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
8155 # valid AC_CHECK_DECL input. No library function is consistently available
8156 # on freestanding implementations, so test against a dummy declaration.
8157 # Include always-available headers on the off chance that they somehow
8159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8160 /* end confdefs.h. */
8165 extern void ac_decl (int, char *);
8170 (void) ac_decl ((int) 0, (char *) 0);
8180 if ac_fn_c_try_compile "$LINENO"
8182 if test -s conftest.err
8184 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8185 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8186 as_fn_error $? "cannot detect from compiler exit status or warnings
8187 See \`config.log' for more details" "$LINENO" 5; }
8189 ac_cv_c_decl_report=warning
8192 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8193 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8194 as_fn_error $? "cannot compile a simple declaration test
8195 See \`config.log' for more details" "$LINENO" 5; }
8197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8199 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8200 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8201 as_fn_error $? "compiler does not report undeclared identifiers
8202 See \`config.log' for more details" "$LINENO" 5; }
8205 ac_cv_c_decl_report=error
8207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
8210 printf "%s\n" "$ac_cv_c_decl_report" >&6; }
8212 case $ac_cv_c_decl_report in
8213 warning) ac_c_decl_warn_flag=yes ;;
8214 *) ac_c_decl_warn_flag= ;;
8219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8220 printf %s "checking whether // is distinct from /... " >&6; }
8221 if test ${gl_cv_double_slash_root+y}
8223 printf %s "(cached) " >&6
8225 if test x"$cross_compiling" = xyes ; then
8226 # When cross-compiling, there is no way to tell whether // is special
8227 # short of a list of hosts. However, the only known hosts to date
8228 # that have a distinct // are Apollo DomainOS (too old to port to),
8229 # Cygwin, and z/OS. If anyone knows of another system for which // has
8230 # special semantics and is distinct from /, please report it to
8231 # <bug-gnulib@gnu.org>.
8233 *-cygwin | i370-ibm-openedition)
8234 gl_cv_double_slash_root=yes ;;
8236 # Be optimistic and assume that / and // are the same when we
8238 gl_cv_double_slash_root='unknown, assuming no' ;;
8241 set x `ls -di / // 2>/dev/null`
8242 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8243 gl_cv_double_slash_root=no
8245 gl_cv_double_slash_root=yes
8249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8250 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
8251 if test "$gl_cv_double_slash_root" = yes; then
8253 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8260 printf %s "checking for complete errno.h... " >&6; }
8261 if test ${gl_cv_header_errno_h_complete+y}
8263 printf %s "(cached) " >&6
8266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8267 /* end confdefs.h. */
8270 #if !defined ETXTBSY
8279 #if !defined ENOLINK
8285 #if !defined EMULTIHOP
8288 #if !defined EBADMSG
8291 #if !defined EOVERFLOW
8294 #if !defined ENOTSUP
8297 #if !defined ENETRESET
8300 #if !defined ECONNABORTED
8309 #if !defined ECANCELED
8312 #if !defined EOWNERDEAD
8315 #if !defined ENOTRECOVERABLE
8323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8324 $EGREP "booboo" >/dev/null 2>&1
8326 gl_cv_header_errno_h_complete=no
8328 gl_cv_header_errno_h_complete=yes
8334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8335 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
8336 if test $gl_cv_header_errno_h_complete = yes; then
8347 if test $gl_cv_have_include_next = yes; then
8348 gl_cv_next_errno_h='<'errno.h'>'
8350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8351 printf %s "checking absolute name of <errno.h>... " >&6; }
8352 if test ${gl_cv_next_errno_h+y}
8354 printf %s "(cached) " >&6
8359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8360 /* end confdefs.h. */
8364 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8365 *) gl_absname_cpp="$ac_cpp" ;;
8370 gl_dirsep_regex='[/\\]'
8373 gl_dirsep_regex='\/'
8376 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8377 gl_header_literal_regex=`echo 'errno.h' \
8378 | sed -e "$gl_make_literal_regex_sed"`
8379 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8380 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8386 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8387 sed -n "$gl_absolute_header_sed"`
8389 gl_header=$gl_cv_absolute_errno_h
8390 gl_cv_next_errno_h='"'$gl_header'"'
8394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8395 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
8397 NEXT_ERRNO_H=$gl_cv_next_errno_h
8399 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8400 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8401 gl_next_as_first_directive='<'errno.h'>'
8403 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8404 gl_next_as_first_directive=$gl_cv_next_errno_h
8406 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8414 if test -n "$ERRNO_H"; then
8415 GL_GENERATE_ERRNO_H_TRUE=
8416 GL_GENERATE_ERRNO_H_FALSE='#'
8418 GL_GENERATE_ERRNO_H_TRUE='#'
8419 GL_GENERATE_ERRNO_H_FALSE=
8423 if test -n "$ERRNO_H"; then
8424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8425 printf %s "checking for EMULTIHOP value... " >&6; }
8426 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
8428 printf %s "(cached) " >&6
8431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8432 /* end confdefs.h. */
8440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8441 $EGREP "yes" >/dev/null 2>&1
8443 gl_cv_header_errno_h_EMULTIHOP=yes
8445 gl_cv_header_errno_h_EMULTIHOP=no
8449 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8451 /* end confdefs.h. */
8453 #define _XOPEN_SOURCE_EXTENDED 1
8460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8461 $EGREP "yes" >/dev/null 2>&1
8463 gl_cv_header_errno_h_EMULTIHOP=hidden
8467 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8468 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8469 #define _XOPEN_SOURCE_EXTENDED 1
8471 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8484 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8485 case $gl_cv_header_errno_h_EMULTIHOP in
8487 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8490 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8498 if test -n "$ERRNO_H"; then
8499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8500 printf %s "checking for ENOLINK value... " >&6; }
8501 if test ${gl_cv_header_errno_h_ENOLINK+y}
8503 printf %s "(cached) " >&6
8506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8507 /* end confdefs.h. */
8515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8516 $EGREP "yes" >/dev/null 2>&1
8518 gl_cv_header_errno_h_ENOLINK=yes
8520 gl_cv_header_errno_h_ENOLINK=no
8524 if test $gl_cv_header_errno_h_ENOLINK = no; then
8525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8526 /* end confdefs.h. */
8528 #define _XOPEN_SOURCE_EXTENDED 1
8535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8536 $EGREP "yes" >/dev/null 2>&1
8538 gl_cv_header_errno_h_ENOLINK=hidden
8542 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8543 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8544 #define _XOPEN_SOURCE_EXTENDED 1
8546 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8559 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
8560 case $gl_cv_header_errno_h_ENOLINK in
8562 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8565 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8573 if test -n "$ERRNO_H"; then
8574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8575 printf %s "checking for EOVERFLOW value... " >&6; }
8576 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
8578 printf %s "(cached) " >&6
8581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8582 /* end confdefs.h. */
8590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8591 $EGREP "yes" >/dev/null 2>&1
8593 gl_cv_header_errno_h_EOVERFLOW=yes
8595 gl_cv_header_errno_h_EOVERFLOW=no
8599 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8601 /* end confdefs.h. */
8603 #define _XOPEN_SOURCE_EXTENDED 1
8610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8611 $EGREP "yes" >/dev/null 2>&1
8613 gl_cv_header_errno_h_EOVERFLOW=hidden
8617 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8618 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8619 #define _XOPEN_SOURCE_EXTENDED 1
8621 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8634 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8635 case $gl_cv_header_errno_h_EOVERFLOW in
8637 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8640 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8648 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8649 if test "x$ac_cv_have_decl_strerror_r" = xyes
8656 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
8661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8662 printf %s "checking whether strerror_r returns char *... " >&6; }
8663 if test ${ac_cv_func_strerror_r_char_p+y}
8665 printf %s "(cached) " >&6
8668 ac_cv_func_strerror_r_char_p=no
8669 if test $ac_cv_have_decl_strerror_r = yes; then
8670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8671 /* end confdefs.h. */
8672 $ac_includes_default
8678 char x = *strerror_r (0, buf, sizeof buf);
8679 char *p = strerror_r (0, buf, sizeof buf);
8686 if ac_fn_c_try_compile "$LINENO"
8688 ac_cv_func_strerror_r_char_p=yes
8690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8692 # strerror_r is not declared. Choose between
8693 # systems that have relatively inaccessible declarations for the
8694 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8695 # former has a strerror_r that returns char*, while the latter
8696 # has a strerror_r that returns `int'.
8697 # This test should segfault on the DEC system.
8698 if test "$cross_compiling" = yes
8702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8703 /* end confdefs.h. */
8704 $ac_includes_default
8705 extern char *strerror_r ();
8710 char x = *strerror_r (0, buf, sizeof buf);
8711 return ! isalpha (x);
8716 if ac_fn_c_try_run "$LINENO"
8718 ac_cv_func_strerror_r_char_p=yes
8720 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8721 conftest.$ac_objext conftest.beam conftest.$ac_ext
8727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8728 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
8729 if test $ac_cv_func_strerror_r_char_p = yes; then
8731 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8736 XGETTEXT_EXTRA_OPTIONS=
8741 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8742 if test "x$ac_cv_have_decl_fchdir" = xyes
8749 printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h
8760 GNULIB_FPRINTF_POSIX=0;
8776 GNULIB_OBSTACK_PRINTF=0;
8777 GNULIB_OBSTACK_PRINTF_POSIX=0;
8782 GNULIB_PRINTF_POSIX=0;
8791 GNULIB_SPRINTF_POSIX=0;
8792 GNULIB_STDIO_H_NONBLOCKING=0;
8793 GNULIB_STDIO_H_SIGPIPE=0;
8800 GNULIB_VFPRINTF_POSIX=0;
8802 GNULIB_VPRINTF_POSIX=0;
8804 GNULIB_VSPRINTF_POSIX=0;
8808 HAVE_DECL_GETDELIM=1;
8809 HAVE_DECL_GETLINE=1;
8810 HAVE_DECL_OBSTACK_PRINTF=1;
8811 HAVE_DECL_SNPRINTF=1;
8812 HAVE_DECL_VSNPRINTF=1;
8835 REPLACE_OBSTACK_PRINTF=0;
8844 REPLACE_STDIO_READ_FUNCS=0;
8845 REPLACE_STDIO_WRITE_FUNCS=0;
8847 REPLACE_VASPRINTF=0;
8851 REPLACE_VSNPRINTF=0;
8856 GNULIB_NONBLOCKING=0;
8872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8873 printf %s "checking for working fcntl.h... " >&6; }
8874 if test ${gl_cv_header_working_fcntl_h+y}
8876 printf %s "(cached) " >&6
8878 if test "$cross_compiling" = yes
8881 # Guess 'no' on native Windows.
8882 mingw*) gl_cv_header_working_fcntl_h='no' ;;
8883 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
8887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8888 /* end confdefs.h. */
8889 #include <sys/types.h>
8890 #include <sys/stat.h>
8892 # include <unistd.h>
8893 #else /* on Windows with MSVC */
8895 # include <stdlib.h>
8896 # defined sleep(n) _sleep ((n) * 1000)
8903 #define O_NOFOLLOW 0
8905 static int const constants[] =
8907 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8908 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8915 int result = !constants;
8918 static char const sym[] = "conftest.sym";
8919 if (symlink ("/dev/null", sym) != 0)
8923 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8930 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8934 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8945 static char const file[] = "confdefs.h";
8946 int fd = open (file, O_RDONLY | O_NOATIME);
8952 if (fstat (fd, &st0) != 0)
8958 if (read (fd, &c, 1) != 1)
8962 if (close (fd) != 0)
8967 if (stat (file, &st1) != 0)
8970 if (st0.st_atime != st1.st_atime)
8982 if ac_fn_c_try_run "$LINENO"
8984 gl_cv_header_working_fcntl_h=yes
8987 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8988 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8989 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8990 *) gl_cv_header_working_fcntl_h='no';;
8993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8994 conftest.$ac_objext conftest.beam conftest.$ac_ext
8999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9000 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
9002 case $gl_cv_header_working_fcntl_h in #(
9003 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9007 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
9010 case $gl_cv_header_working_fcntl_h in #(
9011 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9015 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
9018 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9019 if test "x$ac_cv_type_pid_t" = xyes
9024 printf "%s\n" "#define pid_t int" >>confdefs.h
9028 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9029 if test "x$ac_cv_type_mode_t" = xyes
9034 printf "%s\n" "#define mode_t int" >>confdefs.h
9040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
9041 printf %s "checking for promoted mode_t type... " >&6; }
9042 if test ${gl_cv_promoted_mode_t+y}
9044 printf %s "(cached) " >&6
9047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9048 /* end confdefs.h. */
9049 #include <sys/types.h>
9053 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
9058 if ac_fn_c_try_compile "$LINENO"
9060 gl_cv_promoted_mode_t='int'
9062 gl_cv_promoted_mode_t='mode_t'
9064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
9068 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
9070 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
9073 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
9074 if test "x$ac_cv_have_decl_fdatasync" = xyes
9081 printf "%s\n" "#define HAVE_DECL_FDATASYNC $ac_have_decl" >>confdefs.h
9085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
9086 printf %s "checking for stdint.h... " >&6; }
9087 if test ${gl_cv_header_stdint_h+y}
9089 printf %s "(cached) " >&6
9091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9092 /* end confdefs.h. */
9093 #include <sys/types.h>
9098 uintmax_t i = (uintmax_t) -1; return !i;
9103 if ac_fn_c_try_compile "$LINENO"
9105 gl_cv_header_stdint_h=yes
9107 gl_cv_header_stdint_h=no
9109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
9112 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
9113 if test $gl_cv_header_stdint_h = yes; then
9115 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
9120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
9121 printf %s "checking for inttypes.h... " >&6; }
9122 if test ${gl_cv_header_inttypes_h+y}
9124 printf %s "(cached) " >&6
9126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9127 /* end confdefs.h. */
9129 #include <sys/types.h>
9130 #include <inttypes.h>
9135 uintmax_t i = (uintmax_t) -1; return !i;
9140 if ac_fn_c_try_compile "$LINENO"
9142 gl_cv_header_inttypes_h=yes
9144 gl_cv_header_inttypes_h=no
9146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
9149 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
9150 if test $gl_cv_header_inttypes_h = yes; then
9152 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
9160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
9161 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
9162 if test ${gl_cv_func_printf_sizes_c99+y}
9164 printf %s "(cached) " >&6
9167 if test "$cross_compiling" = yes
9171 # Guess yes on glibc systems.
9172 *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
9173 # Guess yes on FreeBSD >= 5.
9174 freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
9175 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9176 # Guess yes on Mac OS X >= 10.3.
9177 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
9178 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
9179 # Guess yes on OpenBSD >= 3.9.
9180 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
9181 gl_cv_func_printf_sizes_c99="guessing no";;
9182 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9183 # Guess yes on Solaris >= 2.10.
9184 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9185 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
9186 # Guess yes on NetBSD >= 3.
9187 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9188 gl_cv_func_printf_sizes_c99="guessing no";;
9189 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9190 # Guess yes on MSVC, no on mingw.
9191 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9192 /* end confdefs.h. */
9199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9200 $EGREP "Known" >/dev/null 2>&1
9202 gl_cv_func_printf_sizes_c99="guessing yes"
9204 gl_cv_func_printf_sizes_c99="guessing no"
9209 # If we don't know, assume the worst.
9210 *) gl_cv_func_printf_sizes_c99="guessing no";;
9214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9215 /* end confdefs.h. */
9220 #include <sys/types.h>
9221 #if HAVE_STDINT_H_WITH_UINTMAX
9222 # include <stdint.h>
9224 #if HAVE_INTTYPES_H_WITH_UINTMAX
9225 # include <inttypes.h>
9227 static char buf[100];
9231 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
9233 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
9234 || strcmp (buf, "12345671 33") != 0)
9240 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
9241 || strcmp (buf, "12345672 33") != 0)
9244 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
9245 || strcmp (buf, "12345673 33") != 0)
9248 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
9249 || strcmp (buf, "1.5 33") != 0)
9254 if ac_fn_c_try_run "$LINENO"
9256 gl_cv_func_printf_sizes_c99=yes
9258 gl_cv_func_printf_sizes_c99=no
9260 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9261 conftest.$ac_objext conftest.beam conftest.$ac_ext
9266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
9267 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
9271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
9272 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
9273 if test ${gl_cv_func_printf_long_double+y}
9275 printf %s "(cached) " >&6
9278 if test "$cross_compiling" = yes
9281 beos*) gl_cv_func_printf_long_double="guessing no";;
9282 # Guess yes on MSVC, no on mingw.
9283 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9284 /* end confdefs.h. */
9291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9292 $EGREP "Known" >/dev/null 2>&1
9294 gl_cv_func_printf_long_double="guessing yes"
9296 gl_cv_func_printf_long_double="guessing no"
9301 *) gl_cv_func_printf_long_double="guessing yes";;
9305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9306 /* end confdefs.h. */
9310 static char buf[10000];
9315 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
9316 || strcmp (buf, "1.750000 33") != 0)
9319 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
9320 || strcmp (buf, "1.750000e+00 33") != 0)
9323 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
9324 || strcmp (buf, "1.75 33") != 0)
9329 if ac_fn_c_try_run "$LINENO"
9331 gl_cv_func_printf_long_double=yes
9333 gl_cv_func_printf_long_double=no
9335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9336 conftest.$ac_objext conftest.beam conftest.$ac_ext
9341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
9342 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
9346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
9347 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
9348 if test ${gl_cv_func_printf_infinite+y}
9350 printf %s "(cached) " >&6
9353 if test "$cross_compiling" = yes
9357 # Guess yes on glibc systems.
9358 *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";;
9359 # Guess yes on FreeBSD >= 6.
9360 freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
9361 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
9362 # Guess yes on Mac OS X >= 10.3.
9363 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
9364 darwin*) gl_cv_func_printf_infinite="guessing yes";;
9365 # Guess yes on HP-UX >= 11.
9366 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
9367 hpux*) gl_cv_func_printf_infinite="guessing yes";;
9368 # Guess yes on NetBSD >= 3.
9369 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9370 gl_cv_func_printf_infinite="guessing no";;
9371 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
9372 # Guess yes on BeOS.
9373 beos*) gl_cv_func_printf_infinite="guessing yes";;
9374 # Guess yes on MSVC, no on mingw.
9375 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9376 /* end confdefs.h. */
9383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9384 $EGREP "Known" >/dev/null 2>&1
9386 gl_cv_func_printf_infinite="guessing yes"
9388 gl_cv_func_printf_infinite="guessing no"
9393 # If we don't know, assume the worst.
9394 *) gl_cv_func_printf_infinite="guessing no";;
9398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9399 /* end confdefs.h. */
9404 strisnan (const char *string, size_t start_index, size_t end_index)
9406 if (start_index < end_index)
9408 if (string[start_index] == '-')
9410 if (start_index + 3 <= end_index
9411 && memcmp (string + start_index, "nan", 3) == 0)
9414 if (start_index == end_index
9415 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9424 static double plus_zero = 0.0;
9425 double minus_zero = - plus_zero;
9426 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
9428 static char buf[10000];
9429 static double zero = 0.0;
9433 if (sprintf (buf, "%f", 1.0 / zero) < 0
9434 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9436 if (sprintf (buf, "%f", -1.0 / zero) < 0
9437 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9439 if (sprintf (buf, "%f", zero / zero) < 0
9440 || !strisnan (buf, 0, strlen (buf)))
9442 if (sprintf (buf, "%e", 1.0 / zero) < 0
9443 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9445 if (sprintf (buf, "%e", -1.0 / zero) < 0
9446 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9448 if (sprintf (buf, "%e", zero / zero) < 0
9449 || !strisnan (buf, 0, strlen (buf)))
9451 if (sprintf (buf, "%g", 1.0 / zero) < 0
9452 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9454 if (sprintf (buf, "%g", -1.0 / zero) < 0
9455 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9457 if (sprintf (buf, "%g", zero / zero) < 0
9458 || !strisnan (buf, 0, strlen (buf)))
9460 /* This test fails on HP-UX 10.20. */
9461 if (have_minus_zero ())
9462 if (sprintf (buf, "%g", - zero) < 0
9463 || strcmp (buf, "-0") != 0)
9468 if ac_fn_c_try_run "$LINENO"
9470 gl_cv_func_printf_infinite=yes
9472 gl_cv_func_printf_infinite=no
9474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9475 conftest.$ac_objext conftest.beam conftest.$ac_ext
9480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
9481 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
9484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9485 printf %s "checking whether byte ordering is bigendian... " >&6; }
9486 if test ${ac_cv_c_bigendian+y}
9488 printf %s "(cached) " >&6
9490 ac_cv_c_bigendian=unknown
9491 # See if we're dealing with a universal compiler.
9492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9493 /* end confdefs.h. */
9494 #ifndef __APPLE_CC__
9495 not a universal capable compiler
9500 if ac_fn_c_try_compile "$LINENO"
9503 # Check for potential -arch flags. It is not universal unless
9504 # there are at least two -arch flags with different values.
9507 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9508 if test -n "$ac_prev"; then
9510 i?86 | x86_64 | ppc | ppc64)
9511 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9514 ac_cv_c_bigendian=universal
9520 elif test "x$ac_word" = "x-arch"; then
9525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9526 if test $ac_cv_c_bigendian = unknown; then
9527 # See if sys/param.h defines the BYTE_ORDER macro.
9528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9529 /* end confdefs.h. */
9530 #include <sys/types.h>
9531 #include <sys/param.h>
9536 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9537 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9546 if ac_fn_c_try_compile "$LINENO"
9548 # It does; now see whether it defined to BIG_ENDIAN or not.
9549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9550 /* end confdefs.h. */
9551 #include <sys/types.h>
9552 #include <sys/param.h>
9557 #if BYTE_ORDER != BIG_ENDIAN
9565 if ac_fn_c_try_compile "$LINENO"
9567 ac_cv_c_bigendian=yes
9569 ac_cv_c_bigendian=no
9571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9575 if test $ac_cv_c_bigendian = unknown; then
9576 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9578 /* end confdefs.h. */
9584 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9592 if ac_fn_c_try_compile "$LINENO"
9594 # It does; now see whether it defined to _BIG_ENDIAN or not.
9595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9596 /* end confdefs.h. */
9610 if ac_fn_c_try_compile "$LINENO"
9612 ac_cv_c_bigendian=yes
9614 ac_cv_c_bigendian=no
9616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9620 if test $ac_cv_c_bigendian = unknown; then
9621 # Compile a test program.
9622 if test "$cross_compiling" = yes
9624 # Try to guess by grepping values from an object file.
9625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626 /* end confdefs.h. */
9627 short int ascii_mm[] =
9628 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9629 short int ascii_ii[] =
9630 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9631 int use_ascii (int i) {
9632 return ascii_mm[i] + ascii_ii[i];
9634 short int ebcdic_ii[] =
9635 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9636 short int ebcdic_mm[] =
9637 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9638 int use_ebcdic (int i) {
9639 return ebcdic_mm[i] + ebcdic_ii[i];
9646 return use_ascii (foo) == use_ebcdic (foo);
9651 if ac_fn_c_try_compile "$LINENO"
9653 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9654 ac_cv_c_bigendian=yes
9656 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9657 if test "$ac_cv_c_bigendian" = unknown; then
9658 ac_cv_c_bigendian=no
9660 # finding both strings is unlikely to happen, but who knows?
9661 ac_cv_c_bigendian=unknown
9665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9668 /* end confdefs.h. */
9669 $ac_includes_default
9674 /* Are we little or big endian? From Harbison&Steele. */
9678 char c[sizeof (long int)];
9681 return u.c[sizeof (long int) - 1] == 1;
9687 if ac_fn_c_try_run "$LINENO"
9689 ac_cv_c_bigendian=no
9691 ac_cv_c_bigendian=yes
9693 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9694 conftest.$ac_objext conftest.beam conftest.$ac_ext
9699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9700 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
9701 case $ac_cv_c_bigendian in #(
9703 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
9709 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9713 as_fn_error $? "unknown endianness
9714 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9720 printf %s "checking whether long double and double are the same... " >&6; }
9721 if test ${gl_cv_long_double_equals_double+y}
9723 printf %s "(cached) " >&6
9725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9726 /* end confdefs.h. */
9731 typedef int check[sizeof (long double) == sizeof (double)
9732 && LDBL_MANT_DIG == DBL_MANT_DIG
9733 && LDBL_MAX_EXP == DBL_MAX_EXP
9734 && LDBL_MIN_EXP == DBL_MIN_EXP
9741 if ac_fn_c_try_compile "$LINENO"
9743 gl_cv_long_double_equals_double=yes
9745 gl_cv_long_double_equals_double=no
9747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9751 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
9752 if test $gl_cv_long_double_equals_double = yes; then
9754 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9756 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9758 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9767 if test -n "$gl_printf_safe"; then
9769 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9772 case "$gl_cv_func_printf_long_double" in
9774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9775 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
9776 if test ${gl_cv_func_printf_infinite_long_double+y}
9778 printf %s "(cached) " >&6
9781 if test "$cross_compiling" = yes
9784 # Guess no on ia64, x86_64, i386.
9785 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9788 # Guess yes on glibc systems.
9789 *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9790 # Guess yes on FreeBSD >= 6.
9791 freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
9792 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9793 # Guess yes on HP-UX >= 11.
9794 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9795 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9796 # Guess yes on MSVC, no on mingw.
9797 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9798 /* end confdefs.h. */
9805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9806 $EGREP "Known" >/dev/null 2>&1
9808 gl_cv_func_printf_infinite_long_double="guessing yes"
9810 gl_cv_func_printf_infinite_long_double="guessing no"
9815 # If we don't know, assume the worst.
9816 *) gl_cv_func_printf_infinite_long_double="guessing no";;
9822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9823 /* end confdefs.h. */
9827 #if defined __MACH__ && defined __APPLE__
9828 /* Avoid a crash on Mac OS X. */
9829 #include <mach/mach.h>
9830 #include <mach/mach_error.h>
9831 #include <mach/thread_status.h>
9832 #include <mach/exception.h>
9833 #include <mach/task.h>
9834 #include <pthread.h>
9835 /* The exception port on which our thread listens. */
9836 static mach_port_t our_exception_port;
9837 /* The main function of the thread listening for exceptions of type
9840 mach_exception_thread (void *arg)
9842 /* Buffer for a message to be received. */
9844 mach_msg_header_t head;
9845 mach_msg_body_t msgh_body;
9848 mach_msg_return_t retval;
9849 /* Wait for a message on the exception port. */
9850 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9851 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9852 if (retval != MACH_MSG_SUCCESS)
9859 mach_port_t self = mach_task_self ();
9860 /* Allocate a port on which the thread shall listen for exceptions. */
9861 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9863 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9864 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9865 MACH_MSG_TYPE_MAKE_SEND)
9867 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9869 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9870 /* Create the thread listening on the exception port. */
9871 pthread_attr_t attr;
9873 if (pthread_attr_init (&attr) == 0
9874 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9875 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9876 pthread_attr_destroy (&attr);
9877 /* Replace the exception port info for these exceptions with our own.
9878 Note that we replace the exception port for the entire task, not only
9879 for a particular thread. This has the effect that when our exception
9880 port gets the message, the thread specific exception port has already
9881 been asked, and we don't need to bother about it.
9882 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9883 task_set_exception_ports (self, mask, our_exception_port,
9884 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9889 #elif defined _WIN32 && ! defined __CYGWIN__
9890 /* Avoid a crash on native Windows. */
9891 #define WIN32_LEAN_AND_MEAN
9892 #include <windows.h>
9893 #include <winerror.h>
9895 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9897 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9899 case EXCEPTION_ACCESS_VIOLATION:
9900 case EXCEPTION_IN_PAGE_ERROR:
9901 case EXCEPTION_STACK_OVERFLOW:
9902 case EXCEPTION_GUARD_PAGE:
9903 case EXCEPTION_PRIV_INSTRUCTION:
9904 case EXCEPTION_ILLEGAL_INSTRUCTION:
9905 case EXCEPTION_DATATYPE_MISALIGNMENT:
9906 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9907 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9910 return EXCEPTION_CONTINUE_SEARCH;
9915 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9918 /* Avoid a crash on POSIX systems. */
9921 /* A POSIX signal handler. */
9923 exception_handler (int sig)
9931 signal (SIGSEGV, exception_handler);
9934 signal (SIGBUS, exception_handler);
9943 strisnan (const char *string, size_t start_index, size_t end_index)
9945 if (start_index < end_index)
9947 if (string[start_index] == '-')
9949 if (start_index + 3 <= end_index
9950 && memcmp (string + start_index, "nan", 3) == 0)
9953 if (start_index == end_index
9954 || (string[start_index] == '(' && string[end_index - 1] == ')'))
9960 static char buf[10000];
9961 static long double zeroL = 0.0L;
9966 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9967 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9969 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9970 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9972 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9973 || !strisnan (buf, 0, strlen (buf)))
9975 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9976 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9978 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9979 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9981 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9982 || !strisnan (buf, 0, strlen (buf)))
9984 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9985 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9987 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9988 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9990 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9991 || !strisnan (buf, 0, strlen (buf)))
9993 #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
9994 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9995 of 'unsigned int' words. */
9996 # ifdef WORDS_BIGENDIAN
9997 # define LDBL80_WORDS(exponent,manthi,mantlo) \
9998 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9999 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
10000 (unsigned int) (mantlo) << 16 \
10003 # define LDBL80_WORDS(exponent,manthi,mantlo) \
10004 { mantlo, manthi, exponent }
10007 static union { unsigned int word[4]; long double value; } x =
10008 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
10009 if (sprintf (buf, "%Lf", x.value) < 0
10010 || !strisnan (buf, 0, strlen (buf)))
10012 if (sprintf (buf, "%Le", x.value) < 0
10013 || !strisnan (buf, 0, strlen (buf)))
10015 if (sprintf (buf, "%Lg", x.value) < 0
10016 || !strisnan (buf, 0, strlen (buf)))
10020 /* Signalling NaN. */
10021 static union { unsigned int word[4]; long double value; } x =
10022 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
10023 if (sprintf (buf, "%Lf", x.value) < 0
10024 || !strisnan (buf, 0, strlen (buf)))
10026 if (sprintf (buf, "%Le", x.value) < 0
10027 || !strisnan (buf, 0, strlen (buf)))
10029 if (sprintf (buf, "%Lg", x.value) < 0
10030 || !strisnan (buf, 0, strlen (buf)))
10033 { /* Pseudo-NaN. */
10034 static union { unsigned int word[4]; long double value; } x =
10035 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
10036 if (sprintf (buf, "%Lf", x.value) <= 0)
10038 if (sprintf (buf, "%Le", x.value) <= 0)
10040 if (sprintf (buf, "%Lg", x.value) <= 0)
10043 { /* Pseudo-Infinity. */
10044 static union { unsigned int word[4]; long double value; } x =
10045 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
10046 if (sprintf (buf, "%Lf", x.value) <= 0)
10048 if (sprintf (buf, "%Le", x.value) <= 0)
10050 if (sprintf (buf, "%Lg", x.value) <= 0)
10053 { /* Pseudo-Zero. */
10054 static union { unsigned int word[4]; long double value; } x =
10055 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
10056 if (sprintf (buf, "%Lf", x.value) <= 0)
10058 if (sprintf (buf, "%Le", x.value) <= 0)
10060 if (sprintf (buf, "%Lg", x.value) <= 0)
10063 { /* Unnormalized number. */
10064 static union { unsigned int word[4]; long double value; } x =
10065 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
10066 if (sprintf (buf, "%Lf", x.value) <= 0)
10068 if (sprintf (buf, "%Le", x.value) <= 0)
10070 if (sprintf (buf, "%Lg", x.value) <= 0)
10073 { /* Pseudo-Denormal. */
10074 static union { unsigned int word[4]; long double value; } x =
10075 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
10076 if (sprintf (buf, "%Lf", x.value) <= 0)
10078 if (sprintf (buf, "%Le", x.value) <= 0)
10080 if (sprintf (buf, "%Lg", x.value) <= 0)
10087 if ac_fn_c_try_run "$LINENO"
10089 gl_cv_func_printf_infinite_long_double=yes
10091 gl_cv_func_printf_infinite_long_double=no
10093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10094 conftest.$ac_objext conftest.beam conftest.$ac_ext
10099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
10100 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
10103 gl_cv_func_printf_infinite_long_double="irrelevant"
10109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
10110 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
10111 if test ${gl_cv_func_printf_directive_a+y}
10113 printf %s "(cached) " >&6
10116 if test "$cross_compiling" = yes
10120 # Guess yes on glibc >= 2.5 systems.
10122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10123 /* end confdefs.h. */
10125 #include <features.h>
10126 #ifdef __GNU_LIBRARY__
10127 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
10133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10134 $EGREP "BZ2908" >/dev/null 2>&1
10136 gl_cv_func_printf_directive_a="guessing yes"
10138 gl_cv_func_printf_directive_a="guessing no"
10143 # Guess no on native Windows.
10144 mingw*) gl_cv_func_printf_directive_a="guessing no";;
10145 # If we don't know, assume the worst.
10146 *) gl_cv_func_printf_directive_a="guessing no";;
10150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10151 /* end confdefs.h. */
10154 #include <string.h>
10155 static char buf[100];
10156 static double zero = 0.0;
10160 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
10161 || (strcmp (buf, "0x1.922p+1 33") != 0
10162 && strcmp (buf, "0x3.244p+0 33") != 0
10163 && strcmp (buf, "0x6.488p-1 33") != 0
10164 && strcmp (buf, "0xc.91p-2 33") != 0))
10166 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
10167 || (strcmp (buf, "-0X1.922P+1 33") != 0
10168 && strcmp (buf, "-0X3.244P+0 33") != 0
10169 && strcmp (buf, "-0X6.488P-1 33") != 0
10170 && strcmp (buf, "-0XC.91P-2 33") != 0))
10172 /* This catches a FreeBSD 6.1 bug: it doesn't round. */
10173 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
10174 || (strcmp (buf, "0x1.83p+0 33") != 0
10175 && strcmp (buf, "0x3.05p-1 33") != 0
10176 && strcmp (buf, "0x6.0ap-2 33") != 0
10177 && strcmp (buf, "0xc.14p-3 33") != 0))
10179 /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
10180 if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
10181 || (strcmp (buf, "0x2p+0 33") != 0
10182 && strcmp (buf, "0x3p-1 33") != 0
10183 && strcmp (buf, "0x6p-2 33") != 0
10184 && strcmp (buf, "0xcp-3 33") != 0))
10186 /* This catches a FreeBSD 6.1 bug. See
10187 <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
10188 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
10191 /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
10192 if (sprintf (buf, "%.1a", 1.999) < 0
10193 || (strcmp (buf, "0x1.0p+1") != 0
10194 && strcmp (buf, "0x2.0p+0") != 0
10195 && strcmp (buf, "0x4.0p-1") != 0
10196 && strcmp (buf, "0x8.0p-2") != 0))
10198 /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
10199 glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
10200 if (sprintf (buf, "%.1La", 1.999L) < 0
10201 || (strcmp (buf, "0x1.0p+1") != 0
10202 && strcmp (buf, "0x2.0p+0") != 0
10203 && strcmp (buf, "0x4.0p-1") != 0
10204 && strcmp (buf, "0x8.0p-2") != 0))
10209 if ac_fn_c_try_run "$LINENO"
10211 gl_cv_func_printf_directive_a=yes
10213 gl_cv_func_printf_directive_a=no
10215 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10216 conftest.$ac_objext conftest.beam conftest.$ac_ext
10221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
10222 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
10226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
10227 printf %s "checking whether printf supports the 'F' directive... " >&6; }
10228 if test ${gl_cv_func_printf_directive_f+y}
10230 printf %s "(cached) " >&6
10233 if test "$cross_compiling" = yes
10237 # Guess yes on glibc systems.
10238 *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";;
10239 # Guess yes on FreeBSD >= 6.
10240 freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
10241 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
10242 # Guess yes on Mac OS X >= 10.3.
10243 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
10244 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
10245 # Guess yes on Solaris >= 2.10.
10246 solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
10247 solaris*) gl_cv_func_printf_directive_f="guessing no";;
10248 # Guess yes on MSVC, no on mingw.
10249 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10250 /* end confdefs.h. */
10257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10258 $EGREP "Known" >/dev/null 2>&1
10260 gl_cv_func_printf_directive_f="guessing yes"
10262 gl_cv_func_printf_directive_f="guessing no"
10267 # If we don't know, assume the worst.
10268 *) gl_cv_func_printf_directive_f="guessing no";;
10272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10273 /* end confdefs.h. */
10276 #include <string.h>
10277 static char buf[100];
10278 static double zero = 0.0;
10282 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
10283 || strcmp (buf, "1234567.000000 33") != 0)
10285 if (sprintf (buf, "%F", 1.0 / zero) < 0
10286 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
10288 /* This catches a Cygwin 1.5.x bug. */
10289 if (sprintf (buf, "%.F", 1234.0) < 0
10290 || strcmp (buf, "1234") != 0)
10295 if ac_fn_c_try_run "$LINENO"
10297 gl_cv_func_printf_directive_f=yes
10299 gl_cv_func_printf_directive_f=no
10301 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10302 conftest.$ac_objext conftest.beam conftest.$ac_ext
10307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
10308 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
10312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
10313 printf %s "checking whether printf supports the 'n' directive... " >&6; }
10314 if test ${gl_cv_func_printf_directive_n+y}
10316 printf %s "(cached) " >&6
10319 if test "$cross_compiling" = yes
10322 # Guess no on native Windows.
10323 mingw*) gl_cv_func_printf_directive_n="guessing no";;
10324 *) gl_cv_func_printf_directive_n="guessing yes";;
10328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10329 /* end confdefs.h. */
10332 #include <stdlib.h>
10333 #include <string.h>
10335 /* See page about "Parameter Validation" on msdn.microsoft.com. */
10337 invalid_parameter_handler (const wchar_t *expression,
10338 const wchar_t *function,
10339 const wchar_t *file, unsigned int line,
10345 static char fmtstring[10];
10346 static char buf[100];
10351 _set_invalid_parameter_handler (invalid_parameter_handler);
10353 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
10354 support %n in format strings in read-only memory but not in writable
10356 strcpy (fmtstring, "%d %n");
10357 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
10358 || strcmp (buf, "123 ") != 0
10364 if ac_fn_c_try_run "$LINENO"
10366 gl_cv_func_printf_directive_n=yes
10368 gl_cv_func_printf_directive_n=no
10370 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10371 conftest.$ac_objext conftest.beam conftest.$ac_ext
10376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
10377 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
10381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
10382 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
10383 if test ${gl_cv_func_printf_directive_ls+y}
10385 printf %s "(cached) " >&6
10388 if test "$cross_compiling" = yes
10392 openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
10393 irix*) gl_cv_func_printf_directive_ls="guessing no";;
10394 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
10395 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
10396 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
10397 # Guess yes on native Windows.
10398 mingw*) gl_cv_func_printf_directive_ls="guessing yes";;
10399 *) gl_cv_func_printf_directive_ls="guessing yes";;
10403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10404 /* end confdefs.h. */
10406 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10408 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10409 included before <wchar.h>. */
10410 #include <stddef.h>
10414 #include <string.h>
10419 /* Test whether %ls works at all.
10420 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
10423 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
10425 if (sprintf (buf, "%ls", wstring) < 0
10426 || strcmp (buf, "abc") != 0)
10429 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
10430 assertion failure inside libc), but not on OpenBSD 4.0. */
10432 static const wchar_t wstring[] = { 'a', 0 };
10434 if (sprintf (buf, "%ls", wstring) < 0
10435 || strcmp (buf, "a") != 0)
10438 /* Test whether precisions in %ls are supported as specified in ISO C 99
10440 "If a precision is specified, no more than that many bytes are written
10441 (including shift sequences, if any), and the array shall contain a
10442 null wide character if, to equal the multibyte character sequence
10443 length given by the precision, the function would need to access a
10444 wide character one past the end of the array."
10445 This test fails on Solaris 10. */
10447 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
10449 if (sprintf (buf, "%.2ls", wstring) < 0
10450 || strcmp (buf, "ab") != 0)
10456 if ac_fn_c_try_run "$LINENO"
10458 gl_cv_func_printf_directive_ls=yes
10460 gl_cv_func_printf_directive_ls=no
10462 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10463 conftest.$ac_objext conftest.beam conftest.$ac_ext
10468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
10469 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
10473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
10474 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
10475 if test ${gl_cv_func_printf_positions+y}
10477 printf %s "(cached) " >&6
10480 if test "$cross_compiling" = yes
10484 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
10485 gl_cv_func_printf_positions="guessing no";;
10486 beos*) gl_cv_func_printf_positions="guessing no";;
10487 # Guess no on native Windows.
10488 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
10489 *) gl_cv_func_printf_positions="guessing yes";;
10493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10494 /* end confdefs.h. */
10497 #include <string.h>
10498 /* The string "%2$d %1$d", with dollar characters protected from the shell's
10499 dollar expansion (possibly an autoconf bug). */
10500 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
10501 static char buf[100];
10504 sprintf (buf, format, 33, 55);
10505 return (strcmp (buf, "55 33") != 0);
10508 if ac_fn_c_try_run "$LINENO"
10510 gl_cv_func_printf_positions=yes
10512 gl_cv_func_printf_positions=no
10514 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10515 conftest.$ac_objext conftest.beam conftest.$ac_ext
10520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
10521 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
10525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
10526 printf %s "checking whether printf supports the grouping flag... " >&6; }
10527 if test ${gl_cv_func_printf_flag_grouping+y}
10529 printf %s "(cached) " >&6
10532 if test "$cross_compiling" = yes
10536 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
10537 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
10538 # Guess no on native Windows.
10539 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
10540 *) gl_cv_func_printf_flag_grouping="guessing yes";;
10544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10545 /* end confdefs.h. */
10548 #include <string.h>
10549 static char buf[100];
10552 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
10553 || buf[strlen (buf) - 1] != '9')
10558 if ac_fn_c_try_run "$LINENO"
10560 gl_cv_func_printf_flag_grouping=yes
10562 gl_cv_func_printf_flag_grouping=no
10564 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10565 conftest.$ac_objext conftest.beam conftest.$ac_ext
10570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
10571 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
10575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
10576 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
10577 if test ${gl_cv_func_printf_flag_leftadjust+y}
10579 printf %s "(cached) " >&6
10582 if test "$cross_compiling" = yes
10586 # Guess yes on HP-UX 11.
10587 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10588 # Guess no on HP-UX 10 and older.
10589 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
10590 # Guess yes on native Windows.
10591 mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10592 # Guess yes otherwise.
10593 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598 /* end confdefs.h. */
10601 #include <string.h>
10602 static char buf[100];
10605 /* Check that a '-' flag is not annihilated by a negative width. */
10606 if (sprintf (buf, "a%-*sc", -3, "b") < 0
10607 || strcmp (buf, "ab c") != 0)
10612 if ac_fn_c_try_run "$LINENO"
10614 gl_cv_func_printf_flag_leftadjust=yes
10616 gl_cv_func_printf_flag_leftadjust=no
10618 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10619 conftest.$ac_objext conftest.beam conftest.$ac_ext
10624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10625 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
10629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10630 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
10631 if test ${gl_cv_func_printf_flag_zero+y}
10633 printf %s "(cached) " >&6
10636 if test "$cross_compiling" = yes
10640 # Guess yes on glibc systems.
10641 *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10642 # Guess yes on BeOS.
10643 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
10644 # Guess no on native Windows.
10645 mingw*) gl_cv_func_printf_flag_zero="guessing no";;
10646 # If we don't know, assume the worst.
10647 *) gl_cv_func_printf_flag_zero="guessing no";;
10651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10652 /* end confdefs.h. */
10655 #include <string.h>
10656 static char buf[100];
10657 static double zero = 0.0;
10660 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10661 || (strcmp (buf, " inf") != 0
10662 && strcmp (buf, " infinity") != 0))
10667 if ac_fn_c_try_run "$LINENO"
10669 gl_cv_func_printf_flag_zero=yes
10671 gl_cv_func_printf_flag_zero=no
10673 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10674 conftest.$ac_objext conftest.beam conftest.$ac_ext
10679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10680 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
10684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10685 printf %s "checking whether printf supports large precisions... " >&6; }
10686 if test ${gl_cv_func_printf_precision+y}
10688 printf %s "(cached) " >&6
10691 if test "$cross_compiling" = yes
10695 # Guess no only on Solaris, native Windows, and BeOS systems.
10696 solaris*) gl_cv_func_printf_precision="guessing no" ;;
10697 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10698 beos*) gl_cv_func_printf_precision="guessing no" ;;
10699 *) gl_cv_func_printf_precision="guessing yes" ;;
10703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10704 /* end confdefs.h. */
10707 #include <string.h>
10708 static char buf[5000];
10713 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
10716 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10718 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10720 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10723 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10729 if ac_fn_c_try_run "$LINENO"
10731 gl_cv_func_printf_precision=yes
10733 gl_cv_func_printf_precision=no
10735 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10736 conftest.$ac_objext conftest.beam conftest.$ac_ext
10741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10742 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
10745 gl_cv_c_multiarch=no
10746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10747 /* end confdefs.h. */
10748 #ifndef __APPLE_CC__
10749 not a universal capable compiler
10754 if ac_fn_c_try_compile "$LINENO"
10759 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10760 if test -n "$prev"; then
10762 i?86 | x86_64 | ppc | ppc64)
10763 if test -z "$arch" || test "$arch" = "$word"; then
10766 gl_cv_c_multiarch=yes
10772 if test "x$word" = "x-arch"; then
10779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10780 if test $gl_cv_c_multiarch = yes; then
10781 APPLE_UNIVERSAL_BUILD=1
10783 APPLE_UNIVERSAL_BUILD=0
10790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10791 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
10792 if test ${gl_cv_func_printf_enomem+y}
10794 printf %s "(cached) " >&6
10797 gl_cv_func_printf_enomem="guessing no"
10798 if test "$cross_compiling" = no; then
10799 if test $APPLE_UNIVERSAL_BUILD = 0; then
10800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10801 /* end confdefs.h. */
10804 #include <stdlib.h>
10805 #if defined __MACH__ && defined __APPLE__
10806 /* Avoid a crash on Mac OS X. */
10807 #include <mach/mach.h>
10808 #include <mach/mach_error.h>
10809 #include <mach/thread_status.h>
10810 #include <mach/exception.h>
10811 #include <mach/task.h>
10812 #include <pthread.h>
10813 /* The exception port on which our thread listens. */
10814 static mach_port_t our_exception_port;
10815 /* The main function of the thread listening for exceptions of type
10818 mach_exception_thread (void *arg)
10820 /* Buffer for a message to be received. */
10822 mach_msg_header_t head;
10823 mach_msg_body_t msgh_body;
10826 mach_msg_return_t retval;
10827 /* Wait for a message on the exception port. */
10828 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10829 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10830 if (retval != MACH_MSG_SUCCESS)
10835 nocrash_init (void)
10837 mach_port_t self = mach_task_self ();
10838 /* Allocate a port on which the thread shall listen for exceptions. */
10839 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10841 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
10842 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10843 MACH_MSG_TYPE_MAKE_SEND)
10845 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
10847 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10848 /* Create the thread listening on the exception port. */
10849 pthread_attr_t attr;
10851 if (pthread_attr_init (&attr) == 0
10852 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10853 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10854 pthread_attr_destroy (&attr);
10855 /* Replace the exception port info for these exceptions with our own.
10856 Note that we replace the exception port for the entire task, not only
10857 for a particular thread. This has the effect that when our exception
10858 port gets the message, the thread specific exception port has already
10859 been asked, and we don't need to bother about it.
10860 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
10861 task_set_exception_ports (self, mask, our_exception_port,
10862 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10867 #elif defined _WIN32 && ! defined __CYGWIN__
10868 /* Avoid a crash on native Windows. */
10869 #define WIN32_LEAN_AND_MEAN
10870 #include <windows.h>
10871 #include <winerror.h>
10873 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10875 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10877 case EXCEPTION_ACCESS_VIOLATION:
10878 case EXCEPTION_IN_PAGE_ERROR:
10879 case EXCEPTION_STACK_OVERFLOW:
10880 case EXCEPTION_GUARD_PAGE:
10881 case EXCEPTION_PRIV_INSTRUCTION:
10882 case EXCEPTION_ILLEGAL_INSTRUCTION:
10883 case EXCEPTION_DATATYPE_MISALIGNMENT:
10884 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10885 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10888 return EXCEPTION_CONTINUE_SEARCH;
10891 nocrash_init (void)
10893 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10896 /* Avoid a crash on POSIX systems. */
10897 #include <signal.h>
10898 #include <unistd.h>
10899 /* A POSIX signal handler. */
10901 exception_handler (int sig)
10906 nocrash_init (void)
10909 signal (SIGSEGV, exception_handler);
10912 signal (SIGBUS, exception_handler);
10918 #include <sys/types.h>
10919 #include <sys/time.h>
10920 #include <sys/resource.h>
10924 struct rlimit limit;
10927 /* Some printf implementations allocate temporary space with malloc. */
10928 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
10930 if (getrlimit (RLIMIT_DATA, &limit) < 0)
10932 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10933 limit.rlim_max = 5000000;
10934 limit.rlim_cur = limit.rlim_max;
10935 if (setrlimit (RLIMIT_DATA, &limit) < 0)
10938 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
10940 if (getrlimit (RLIMIT_AS, &limit) < 0)
10942 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10943 limit.rlim_max = 5000000;
10944 limit.rlim_cur = limit.rlim_max;
10945 if (setrlimit (RLIMIT_AS, &limit) < 0)
10948 /* Some printf implementations allocate temporary space on the stack. */
10949 #ifdef RLIMIT_STACK
10950 if (getrlimit (RLIMIT_STACK, &limit) < 0)
10952 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10953 limit.rlim_max = 5000000;
10954 limit.rlim_cur = limit.rlim_max;
10955 if (setrlimit (RLIMIT_STACK, &limit) < 0)
10958 ret = printf ("%.5000000f", 1.0);
10959 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10963 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10964 (eval $ac_link) 2>&5
10966 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10967 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10970 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
10971 if test $result != 0 && test $result != 77; then result=1; fi
10973 ) >/dev/null 2>/dev/null
10975 0) gl_cv_func_printf_enomem="yes" ;;
10976 77) gl_cv_func_printf_enomem="guessing no" ;;
10977 *) gl_cv_func_printf_enomem="no" ;;
10980 gl_cv_func_printf_enomem="guessing no"
10984 gl_cv_func_printf_enomem="guessing no"
10987 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10989 # Guess yes on glibc systems.
10990 *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";;
10991 # Guess yes on Solaris.
10992 solaris*) gl_cv_func_printf_enomem="guessing yes";;
10993 # Guess yes on AIX.
10994 aix*) gl_cv_func_printf_enomem="guessing yes";;
10995 # Guess yes on HP-UX/hppa.
10996 hpux*) case "$host_cpu" in
10997 hppa*) gl_cv_func_printf_enomem="guessing yes";;
10998 *) gl_cv_func_printf_enomem="guessing no";;
11001 # Guess yes on IRIX.
11002 irix*) gl_cv_func_printf_enomem="guessing yes";;
11003 # Guess yes on OSF/1.
11004 osf*) gl_cv_func_printf_enomem="guessing yes";;
11005 # Guess yes on BeOS.
11006 beos*) gl_cv_func_printf_enomem="guessing yes";;
11007 # Guess yes on Haiku.
11008 haiku*) gl_cv_func_printf_enomem="guessing yes";;
11009 # If we don't know, assume the worst.
11010 *) gl_cv_func_printf_enomem="guessing no";;
11015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
11016 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
11020 case "$gl_cv_func_printf_long_double" in
11025 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
11032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11033 printf %s "checking for unsigned long long int... " >&6; }
11034 if test ${ac_cv_type_unsigned_long_long_int+y}
11036 printf %s "(cached) " >&6
11038 ac_cv_type_unsigned_long_long_int=yes
11039 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11041 /* end confdefs.h. */
11043 /* For now, do not test the preprocessor; as of 2007 there are too many
11044 implementations with broken preprocessors. Perhaps this can
11045 be revisited in 2012. In the meantime, code should not expect
11046 #if to work with literals wider than 32 bits. */
11047 /* Test literals. */
11048 long long int ll = 9223372036854775807ll;
11049 long long int nll = -9223372036854775807LL;
11050 unsigned long long int ull = 18446744073709551615ULL;
11051 /* Test constant expressions. */
11052 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11054 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11060 /* Test availability of runtime routines for shift and division. */
11061 long long int llmax = 9223372036854775807ll;
11062 unsigned long long int ullmax = 18446744073709551615ull;
11063 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11064 | (llmax / ll) | (llmax % ll)
11065 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11066 | (ullmax / ull) | (ullmax % ull));
11072 if ac_fn_c_try_link "$LINENO"
11076 ac_cv_type_unsigned_long_long_int=no
11078 rm -f core conftest.err conftest.$ac_objext \
11079 conftest$ac_exeext conftest.$ac_ext
11082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11083 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
11084 if test $ac_cv_type_unsigned_long_long_int = yes; then
11086 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11093 printf %s "checking for long long int... " >&6; }
11094 if test ${ac_cv_type_long_long_int+y}
11096 printf %s "(cached) " >&6
11098 ac_cv_type_long_long_int=yes
11099 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11100 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11101 if test $ac_cv_type_long_long_int = yes; then
11102 if test "$cross_compiling" = yes
11106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11107 /* end confdefs.h. */
11108 #include <limits.h>
11111 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11112 # define LLONG_MAX (HALF - 1 + HALF)
11117 long long int n = 1;
11121 long long int m = n << i;
11124 if (LLONG_MAX / 2 < m)
11132 if ac_fn_c_try_run "$LINENO"
11136 ac_cv_type_long_long_int=no
11138 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11139 conftest.$ac_objext conftest.beam conftest.$ac_ext
11145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11146 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
11147 if test $ac_cv_type_long_long_int = yes; then
11149 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
11155 printf %s "checking for wchar_t... " >&6; }
11156 if test ${gt_cv_c_wchar_t+y}
11158 printf %s "(cached) " >&6
11160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11161 /* end confdefs.h. */
11162 #include <stddef.h>
11163 wchar_t foo = (wchar_t)'\0';
11172 if ac_fn_c_try_compile "$LINENO"
11174 gt_cv_c_wchar_t=yes
11178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
11181 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
11182 if test $gt_cv_c_wchar_t = yes; then
11184 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
11189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11190 printf %s "checking for wint_t... " >&6; }
11191 if test ${gt_cv_c_wint_t+y}
11193 printf %s "(cached) " >&6
11195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11196 /* end confdefs.h. */
11198 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11200 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11201 before <wchar.h>. */
11202 #include <stddef.h>
11206 wint_t foo = (wchar_t)'\0';
11215 if ac_fn_c_try_compile "$LINENO"
11221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11224 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
11225 if test $gt_cv_c_wint_t = yes; then
11227 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
11230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
11231 printf %s "checking whether wint_t is too small... " >&6; }
11232 if test ${gl_cv_type_wint_t_too_small+y}
11234 printf %s "(cached) " >&6
11236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11237 /* end confdefs.h. */
11239 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11241 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11242 included before <wchar.h>. */
11243 #if !(defined __GLIBC__ && !defined __UCLIBC__)
11244 # include <stddef.h>
11245 # include <stdio.h>
11249 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
11259 if ac_fn_c_try_compile "$LINENO"
11261 gl_cv_type_wint_t_too_small=no
11263 gl_cv_type_wint_t_too_small=yes
11265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
11268 printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; }
11269 if test $gl_cv_type_wint_t_too_small = yes; then
11270 GNULIB_OVERRIDES_WINT_T=1
11272 GNULIB_OVERRIDES_WINT_T=0
11275 GNULIB_OVERRIDES_WINT_T=0
11282 if test $ac_cv_header_features_h = yes; then
11292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
11293 printf %s "checking for intmax_t... " >&6; }
11294 if test ${gt_cv_c_intmax_t+y}
11296 printf %s "(cached) " >&6
11298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11299 /* end confdefs.h. */
11301 #include <stddef.h>
11302 #include <stdlib.h>
11303 #if HAVE_STDINT_H_WITH_UINTMAX
11304 #include <stdint.h>
11306 #if HAVE_INTTYPES_H_WITH_UINTMAX
11307 #include <inttypes.h>
11313 intmax_t x = -1; return !x;
11318 if ac_fn_c_try_compile "$LINENO"
11320 gt_cv_c_intmax_t=yes
11322 gt_cv_c_intmax_t=no
11324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
11327 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
11328 if test $gt_cv_c_intmax_t = yes; then
11330 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
11334 test $ac_cv_type_long_long_int = yes \
11335 && ac_type='long long' \
11338 printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
11343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11344 printf %s "checking where to find the exponent in a 'double'... " >&6; }
11345 if test ${gl_cv_cc_double_expbit0+y}
11347 printf %s "(cached) " >&6
11350 if test "$cross_compiling" = yes
11353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11354 /* end confdefs.h. */
11356 #if defined arm || defined __arm || defined __arm__
11361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11362 $EGREP "mixed_endianness" >/dev/null 2>&1
11364 gl_cv_cc_double_expbit0="unknown"
11368 if test ${ac_cv_c_bigendian+y}
11370 printf %s "(cached) " >&6
11372 ac_cv_c_bigendian=unknown
11373 # See if we're dealing with a universal compiler.
11374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11375 /* end confdefs.h. */
11376 #ifndef __APPLE_CC__
11377 not a universal capable compiler
11382 if ac_fn_c_try_compile "$LINENO"
11385 # Check for potential -arch flags. It is not universal unless
11386 # there are at least two -arch flags with different values.
11389 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11390 if test -n "$ac_prev"; then
11392 i?86 | x86_64 | ppc | ppc64)
11393 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11396 ac_cv_c_bigendian=universal
11402 elif test "x$ac_word" = "x-arch"; then
11407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11408 if test $ac_cv_c_bigendian = unknown; then
11409 # See if sys/param.h defines the BYTE_ORDER macro.
11410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11411 /* end confdefs.h. */
11412 #include <sys/types.h>
11413 #include <sys/param.h>
11418 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11419 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11421 bogus endian macros
11428 if ac_fn_c_try_compile "$LINENO"
11430 # It does; now see whether it defined to BIG_ENDIAN or not.
11431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11432 /* end confdefs.h. */
11433 #include <sys/types.h>
11434 #include <sys/param.h>
11439 #if BYTE_ORDER != BIG_ENDIAN
11447 if ac_fn_c_try_compile "$LINENO"
11449 ac_cv_c_bigendian=yes
11451 ac_cv_c_bigendian=no
11453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11457 if test $ac_cv_c_bigendian = unknown; then
11458 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460 /* end confdefs.h. */
11461 #include <limits.h>
11466 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11467 bogus endian macros
11474 if ac_fn_c_try_compile "$LINENO"
11476 # It does; now see whether it defined to _BIG_ENDIAN or not.
11477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11478 /* end confdefs.h. */
11479 #include <limits.h>
11484 #ifndef _BIG_ENDIAN
11492 if ac_fn_c_try_compile "$LINENO"
11494 ac_cv_c_bigendian=yes
11496 ac_cv_c_bigendian=no
11498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11502 if test $ac_cv_c_bigendian = unknown; then
11503 # Compile a test program.
11504 if test "$cross_compiling" = yes
11506 # Try to guess by grepping values from an object file.
11507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11508 /* end confdefs.h. */
11509 short int ascii_mm[] =
11510 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11511 short int ascii_ii[] =
11512 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11513 int use_ascii (int i) {
11514 return ascii_mm[i] + ascii_ii[i];
11516 short int ebcdic_ii[] =
11517 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11518 short int ebcdic_mm[] =
11519 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11520 int use_ebcdic (int i) {
11521 return ebcdic_mm[i] + ebcdic_ii[i];
11528 return use_ascii (foo) == use_ebcdic (foo);
11533 if ac_fn_c_try_compile "$LINENO"
11535 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11536 ac_cv_c_bigendian=yes
11538 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11539 if test "$ac_cv_c_bigendian" = unknown; then
11540 ac_cv_c_bigendian=no
11542 # finding both strings is unlikely to happen, but who knows?
11543 ac_cv_c_bigendian=unknown
11547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11550 /* end confdefs.h. */
11551 $ac_includes_default
11556 /* Are we little or big endian? From Harbison&Steele. */
11560 char c[sizeof (long int)];
11563 return u.c[sizeof (long int) - 1] == 1;
11569 if ac_fn_c_try_run "$LINENO"
11571 ac_cv_c_bigendian=no
11573 ac_cv_c_bigendian=yes
11575 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11576 conftest.$ac_objext conftest.beam conftest.$ac_ext
11582 case $ac_cv_c_bigendian in #(
11584 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
11586 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
11589 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11593 gl_cv_cc_double_expbit0="unknown" ;;
11602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11603 /* end confdefs.h. */
11606 #include <stddef.h>
11608 #include <string.h>
11610 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11611 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11612 static unsigned int ored_words[NWORDS];
11613 static unsigned int anded_words[NWORDS];
11614 static void add_to_ored_words (double x)
11618 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11619 memset (&m, 0, sizeof (memory_double));
11621 for (i = 0; i < NWORDS; i++)
11623 ored_words[i] |= m.word[i];
11624 anded_words[i] &= m.word[i];
11630 FILE *fp = fopen ("conftest.out", "w");
11633 for (j = 0; j < NWORDS; j++)
11634 anded_words[j] = ~ (unsigned int) 0;
11635 add_to_ored_words (0.25);
11636 add_to_ored_words (0.5);
11637 add_to_ored_words (1.0);
11638 add_to_ored_words (2.0);
11639 add_to_ored_words (4.0);
11640 /* Remove bits that are common (e.g. if representation of the first mantissa
11641 bit is explicit). */
11642 for (j = 0; j < NWORDS; j++)
11643 ored_words[j] &= ~anded_words[j];
11644 /* Now find the nonzero word. */
11645 for (j = 0; j < NWORDS; j++)
11646 if (ored_words[j] != 0)
11651 for (i = j + 1; i < NWORDS; i++)
11652 if (ored_words[i] != 0)
11654 fprintf (fp, "unknown");
11655 return (fclose (fp) != 0);
11658 if ((ored_words[j] >> i) & 1)
11660 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11661 return (fclose (fp) != 0);
11664 fprintf (fp, "unknown");
11665 return (fclose (fp) != 0);
11669 if ac_fn_c_try_run "$LINENO"
11671 gl_cv_cc_double_expbit0=`cat conftest.out`
11673 gl_cv_cc_double_expbit0="unknown"
11675 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11676 conftest.$ac_objext conftest.beam conftest.$ac_ext
11682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11683 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
11684 case "$gl_cv_cc_double_expbit0" in
11686 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11687 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
11689 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
11692 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
11704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11705 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
11706 if test ${gl_cv_func_snprintf_retval_c99+y}
11708 printf %s "(cached) " >&6
11711 if test "$cross_compiling" = yes
11714 # Guess yes on glibc systems.
11715 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11716 # Guess yes on FreeBSD >= 5.
11717 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
11718 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11719 # Guess yes on Mac OS X >= 10.3.
11720 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
11721 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11722 # Guess yes on OpenBSD >= 3.9.
11723 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11724 gl_cv_func_snprintf_retval_c99="guessing no";;
11725 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11726 # Guess yes on Solaris >= 2.10.
11727 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11728 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
11729 # Guess yes on AIX >= 4.
11730 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
11731 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11732 # Guess yes on NetBSD >= 3.
11733 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11734 gl_cv_func_snprintf_retval_c99="guessing no";;
11735 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11736 # Guess yes on BeOS.
11737 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11738 # Guess yes on MSVC, no on mingw.
11739 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11740 /* end confdefs.h. */
11747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11748 $EGREP "Known" >/dev/null 2>&1
11750 gl_cv_func_snprintf_retval_c99="guessing yes"
11752 gl_cv_func_snprintf_retval_c99="guessing no"
11757 # If we don't know, assume the worst.
11758 *) gl_cv_func_snprintf_retval_c99="guessing no";;
11762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11763 /* end confdefs.h. */
11766 #include <string.h>
11768 # define my_snprintf snprintf
11770 # include <stdarg.h>
11771 static int my_snprintf (char *buf, int size, const char *format, ...)
11775 va_start (args, format);
11776 ret = vsnprintf (buf, size, format, args);
11781 static char buf[100];
11784 strcpy (buf, "ABCDEF");
11785 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11787 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11789 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11794 if ac_fn_c_try_run "$LINENO"
11796 gl_cv_func_snprintf_retval_c99=yes
11798 gl_cv_func_snprintf_retval_c99=no
11800 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11801 conftest.$ac_objext conftest.beam conftest.$ac_ext
11806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11807 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
11814 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11815 if test "x$ac_cv_func_snprintf" = xyes
11817 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
11820 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
11821 if test "x$ac_cv_func_strnlen" = xyes
11823 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
11826 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
11827 if test "x$ac_cv_func_wcslen" = xyes
11829 printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
11832 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
11833 if test "x$ac_cv_func_wcsnlen" = xyes
11835 printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
11838 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
11839 if test "x$ac_cv_func_mbrtowc" = xyes
11841 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
11844 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
11845 if test "x$ac_cv_func_wcrtomb" = xyes
11847 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
11851 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11853 if test "x$ac_cv_have_decl__snprintf" = xyes
11860 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
11864 case "$gl_cv_func_snprintf_retval_c99" in
11867 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11890 GNULIB_COPYSIGNF=0;
11891 GNULIB_COPYSIGNL=0;
11950 GNULIB_REMAINDER=0;
11951 GNULIB_REMAINDERF=0;
11952 GNULIB_REMAINDERL=0;
12038 HAVE_DECL_COPYSIGNF=1;
12044 HAVE_DECL_EXPM1L=1;
12045 HAVE_DECL_FLOORF=1;
12046 HAVE_DECL_FLOORL=1;
12047 HAVE_DECL_FREXPL=1;
12048 HAVE_DECL_LDEXPL=1;
12050 HAVE_DECL_LOG10L=1;
12055 HAVE_DECL_REMAINDER=1;
12056 HAVE_DECL_REMAINDERL=1;
12059 HAVE_DECL_ROUNDF=1;
12060 HAVE_DECL_ROUNDL=1;
12065 HAVE_DECL_TRUNCF=1;
12066 HAVE_DECL_TRUNCL=1;
12096 REPLACE_HUGE_VAL=0;
12103 REPLACE_ISFINITE=0;
12126 REPLACE_REMAINDER=0;
12127 REPLACE_REMAINDERF=0;
12128 REPLACE_REMAINDERL=0;
12133 REPLACE_SIGNBIT_USING_GCC=0;
12145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
12146 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
12147 if test ${gl_cv_func_frexp_no_libm+y}
12149 printf %s "(cached) " >&6
12152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12153 /* end confdefs.h. */
12159 int e; return frexp (x, &e) > 0;
12164 if ac_fn_c_try_link "$LINENO"
12166 gl_cv_func_frexp_no_libm=yes
12168 gl_cv_func_frexp_no_libm=no
12170 rm -f core conftest.err conftest.$ac_objext \
12171 conftest$ac_exeext conftest.$ac_ext
12174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
12175 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
12177 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
12178 if test "x$ac_cv_have_decl_alarm" = xyes
12185 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
12188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
12189 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
12190 if test ${gl_cv_var_stdin_large_offset+y}
12192 printf %s "(cached) " >&6
12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195 /* end confdefs.h. */
12200 #if defined __SL64 && defined __SCLE /* cygwin */
12201 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
12202 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
12203 it is easier to do a version check than building a runtime test. */
12204 # include <cygwin/version.h>
12205 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
12213 if ac_fn_c_try_link "$LINENO"
12215 gl_cv_var_stdin_large_offset=yes
12217 gl_cv_var_stdin_large_offset=no
12219 rm -f core conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext conftest.$ac_ext
12222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
12223 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
12231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
12232 printf %s "checking for 64-bit off_t... " >&6; }
12233 if test ${gl_cv_type_off_t_64+y}
12235 printf %s "(cached) " >&6
12237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12238 /* end confdefs.h. */
12239 #include <sys/types.h>
12240 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
12250 if ac_fn_c_try_compile "$LINENO"
12252 gl_cv_type_off_t_64=yes
12254 gl_cv_type_off_t_64=no
12256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
12260 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
12261 if test $gl_cv_type_off_t_64 = no; then
12262 WINDOWS_64_BIT_OFF_T=1
12264 WINDOWS_64_BIT_OFF_T=0
12266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
12267 printf %s "checking for 64-bit st_size... " >&6; }
12268 if test ${gl_cv_member_st_size_64+y}
12270 printf %s "(cached) " >&6
12272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12273 /* end confdefs.h. */
12274 #include <sys/types.h>
12276 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
12286 if ac_fn_c_try_compile "$LINENO"
12288 gl_cv_member_st_size_64=yes
12290 gl_cv_member_st_size_64=no
12292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
12296 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
12297 if test $gl_cv_member_st_size_64 = no; then
12298 WINDOWS_64_BIT_ST_SIZE=1
12300 WINDOWS_64_BIT_ST_SIZE=0
12304 WINDOWS_64_BIT_OFF_T=0
12305 WINDOWS_64_BIT_ST_SIZE=0
12317 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
12329 if test $gl_cv_have_include_next = yes; then
12330 gl_cv_next_sys_types_h='<'sys/types.h'>'
12332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12333 printf %s "checking absolute name of <sys/types.h>... " >&6; }
12334 if test ${gl_cv_next_sys_types_h+y}
12336 printf %s "(cached) " >&6
12341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12342 /* end confdefs.h. */
12343 #include <sys/types.h>
12346 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12347 *) gl_absname_cpp="$ac_cpp" ;;
12352 gl_dirsep_regex='[/\\]'
12355 gl_dirsep_regex='\/'
12358 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12359 gl_header_literal_regex=`echo 'sys/types.h' \
12360 | sed -e "$gl_make_literal_regex_sed"`
12361 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12362 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12368 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12369 sed -n "$gl_absolute_header_sed"`
12371 gl_header=$gl_cv_absolute_sys_types_h
12372 gl_cv_next_sys_types_h='"'$gl_header'"'
12376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12377 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
12379 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12381 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12382 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12383 gl_next_as_first_directive='<'sys/types.h'>'
12385 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12386 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12388 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12401 WINDOWS_STAT_INODES=0
12405 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
12406 if test "x$ac_cv_have_decl_fseeko" = xyes
12413 printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
12423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
12424 printf %s "checking for fseeko... " >&6; }
12425 if test ${gl_cv_func_fseeko+y}
12427 printf %s "(cached) " >&6
12430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12431 /* end confdefs.h. */
12437 fseeko (stdin, 0, 0);
12442 if ac_fn_c_try_link "$LINENO"
12444 gl_cv_func_fseeko=yes
12446 gl_cv_func_fseeko=no
12448 rm -f core conftest.err conftest.$ac_objext \
12449 conftest$ac_exeext conftest.$ac_ext
12452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
12453 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
12456 if test $ac_cv_have_decl_fseeko = no; then
12460 if test $gl_cv_func_fseeko = no; then
12463 if test $WINDOWS_64_BIT_OFF_T = 1; then
12466 if test $gl_cv_var_stdin_large_offset = no; then
12472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
12473 printf %s "checking whether fflush works on input streams... " >&6; }
12474 if test ${gl_cv_func_fflush_stdin+y}
12476 printf %s "(cached) " >&6
12478 echo hello world > conftest.txt
12479 if test "$cross_compiling" = yes
12482 # Guess no on native Windows.
12483 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
12484 *) gl_cv_func_fflush_stdin=cross ;;
12488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12489 /* end confdefs.h. */
12493 # include <unistd.h>
12494 #else /* on Windows with MSVC */
12501 FILE *f = fopen ("conftest.txt", "r");
12508 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
12509 { fclose (f); return 2; }
12510 /* For deterministic results, ensure f read a bigger buffer. */
12511 if (lseek (fd, 0, SEEK_CUR) == 5)
12512 { fclose (f); return 3; }
12513 /* POSIX requires fflush-fseek to set file offset of fd. This fails
12514 on BSD systems and on mingw. */
12515 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
12516 { fclose (f); return 4; }
12517 if (lseek (fd, 0, SEEK_CUR) != 5)
12518 { fclose (f); return 5; }
12519 /* Verify behaviour of fflush after ungetc. See
12520 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
12521 /* Verify behaviour of fflush after a backup ungetc. This fails on
12526 if (fgetc (f) != c)
12527 { fclose (f); return 6; }
12528 /* Verify behaviour of fflush after a non-backup ungetc. This fails
12529 on glibc 2.8 and on BSD systems. */
12533 if (fgetc (f) != c)
12534 { fclose (f); return 7; }
12542 if ac_fn_c_try_run "$LINENO"
12544 gl_cv_func_fflush_stdin=yes
12546 gl_cv_func_fflush_stdin=no
12548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12549 conftest.$ac_objext conftest.beam conftest.$ac_ext
12555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
12556 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
12557 case "$gl_cv_func_fflush_stdin" in
12558 *yes) gl_func_fflush_stdin=1 ;;
12559 *no) gl_func_fflush_stdin=0 ;;
12560 *) gl_func_fflush_stdin='(-1)' ;;
12563 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
12566 case "$gl_cv_func_fflush_stdin" in
12568 *) REPLACE_FSEEKO=1 ;;
12587 GNULIB_UTIMENSAT=0;
12588 GNULIB_OVERRIDES_STRUCT_STAT=0;
12602 REPLACE_FUTIMENS=0;
12608 REPLACE_UTIMENSAT=0;
12610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12611 printf %s "checking whether stat file-mode macros are broken... " >&6; }
12612 if test ${ac_cv_header_stat_broken+y}
12614 printf %s "(cached) " >&6
12616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12617 /* end confdefs.h. */
12618 #include <sys/types.h>
12619 #include <sys/stat.h>
12621 #if defined S_ISBLK && defined S_IFDIR
12622 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12625 #if defined S_ISBLK && defined S_IFCHR
12626 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12629 #if defined S_ISLNK && defined S_IFREG
12630 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12633 #if defined S_ISSOCK && defined S_IFREG
12634 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12638 if ac_fn_c_try_compile "$LINENO"
12640 ac_cv_header_stat_broken=no
12642 ac_cv_header_stat_broken=yes
12644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12647 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
12648 if test $ac_cv_header_stat_broken = yes; then
12650 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12668 if test $gl_cv_have_include_next = yes; then
12669 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12672 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
12673 if test ${gl_cv_next_sys_stat_h+y}
12675 printf %s "(cached) " >&6
12678 if test $ac_cv_header_sys_stat_h = yes; then
12683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12684 /* end confdefs.h. */
12685 #include <sys/stat.h>
12688 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12689 *) gl_absname_cpp="$ac_cpp" ;;
12694 gl_dirsep_regex='[/\\]'
12697 gl_dirsep_regex='\/'
12700 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12701 gl_header_literal_regex=`echo 'sys/stat.h' \
12702 | sed -e "$gl_make_literal_regex_sed"`
12703 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12704 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12710 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12711 sed -n "$gl_absolute_header_sed"`
12713 gl_header=$gl_cv_absolute_sys_stat_h
12714 gl_cv_next_sys_stat_h='"'$gl_header'"'
12716 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12722 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
12724 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12726 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12727 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12728 gl_next_as_first_directive='<'sys/stat.h'>'
12730 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12731 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12733 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12742 WINDOWS_STAT_TIMESPEC=0
12751 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12752 #include <sys/stat.h>
12754 if test "x$ac_cv_type_nlink_t" = xyes
12759 printf "%s\n" "#define nlink_t int" >>confdefs.h
12767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
12768 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
12769 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
12771 printf %s "(cached) " >&6
12773 rm -f conftest.sym conftest.file
12774 echo >conftest.file
12775 if test "$cross_compiling" = yes
12779 # Guess yes on Linux systems.
12780 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
12782 # Guess yes on glibc systems.
12783 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
12785 # Guess no on native Windows.
12786 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
12788 # If we don't know, assume the worst.
12789 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
12793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12794 /* end confdefs.h. */
12795 $ac_includes_default
12800 if (symlink ("conftest.file", "conftest.sym") != 0)
12802 /* Linux will dereference the symlink and fail, as required by
12803 POSIX. That is better in the sense that it means we will not
12804 have to compile and use the lstat wrapper. */
12805 return lstat ("conftest.sym/", &sbuf) == 0;
12811 if ac_fn_c_try_run "$LINENO"
12813 gl_cv_func_lstat_dereferences_slashed_symlink=yes
12815 gl_cv_func_lstat_dereferences_slashed_symlink=no
12817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12818 conftest.$ac_objext conftest.beam conftest.$ac_ext
12821 rm -f conftest.sym conftest.file
12824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
12825 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12826 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
12829 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
12836 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12837 if test "x$ac_cv_have_decl_ftello" = xyes
12844 printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
12855 if test $ac_cv_have_decl_ftello = no; then
12859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12860 printf %s "checking for ftello... " >&6; }
12861 if test ${gl_cv_func_ftello+y}
12863 printf %s "(cached) " >&6
12866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12867 /* end confdefs.h. */
12877 if ac_fn_c_try_link "$LINENO"
12879 gl_cv_func_ftello=yes
12881 gl_cv_func_ftello=no
12883 rm -f core conftest.err conftest.$ac_objext \
12884 conftest$ac_exeext conftest.$ac_ext
12887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12888 printf "%s\n" "$gl_cv_func_ftello" >&6; }
12889 if test $gl_cv_func_ftello = no; then
12892 if test $WINDOWS_64_BIT_OFF_T = 1; then
12895 if test $gl_cv_var_stdin_large_offset = no; then
12898 if test $REPLACE_FTELLO = 0; then
12900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12901 printf %s "checking whether ftello works... " >&6; }
12902 if test ${gl_cv_func_ftello_works+y}
12904 printf %s "(cached) " >&6
12908 # Guess no on Solaris.
12909 solaris*) gl_cv_func_ftello_works="guessing no" ;;
12910 # Guess yes on native Windows.
12911 mingw*) gl_cv_func_ftello_works="guessing yes" ;;
12912 # Guess yes otherwise.
12913 *) gl_cv_func_ftello_works="guessing yes" ;;
12915 if test "$cross_compiling" = yes
12919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12920 /* end confdefs.h. */
12923 #include <stdlib.h>
12924 #include <string.h>
12925 #define TESTFILE "conftest.tmp"
12931 /* Create a file with some contents. */
12932 fp = fopen (TESTFILE, "w");
12935 if (fwrite ("foogarsh", 1, 8, fp) < 8)
12936 { fclose (fp); return 71; }
12940 /* The file's contents is now "foogarsh". */
12942 /* Try writing after reading to EOF. */
12943 fp = fopen (TESTFILE, "r+");
12946 if (fseek (fp, -1, SEEK_END))
12947 { fclose (fp); return 74; }
12948 if (!(getc (fp) == 'h'))
12949 { fclose (fp); return 1; }
12950 if (!(getc (fp) == EOF))
12951 { fclose (fp); return 2; }
12952 if (!(ftell (fp) == 8))
12953 { fclose (fp); return 3; }
12954 if (!(ftell (fp) == 8))
12955 { fclose (fp); return 4; }
12956 if (!(putc ('!', fp) == '!'))
12957 { fclose (fp); return 5; }
12958 if (!(ftell (fp) == 9))
12959 { fclose (fp); return 6; }
12960 if (!(fclose (fp) == 0))
12962 fp = fopen (TESTFILE, "r");
12967 if (!(fread (buf, 1, 10, fp) == 9))
12968 { fclose (fp); return 10; }
12969 if (!(memcmp (buf, "foogarsh!", 9) == 0))
12970 { fclose (fp); return 11; }
12972 if (!(fclose (fp) == 0))
12975 /* The file's contents is now "foogarsh!". */
12980 if ac_fn_c_try_run "$LINENO"
12982 gl_cv_func_ftello_works=yes
12984 gl_cv_func_ftello_works=no
12986 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12987 conftest.$ac_objext conftest.beam conftest.$ac_ext
12992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12993 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
12994 case "$gl_cv_func_ftello_works" in
12999 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
13008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
13009 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
13010 if test ${gl_cv_func_getcwd_null+y}
13012 printf %s "(cached) " >&6
13014 if test "$cross_compiling" = yes
13017 # Guess yes on glibc systems.
13018 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
13019 # Guess yes on Cygwin.
13020 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
13021 # If we don't know, assume the worst.
13022 *) gl_cv_func_getcwd_null="guessing no";;
13026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027 /* end confdefs.h. */
13029 # include <stdlib.h>
13031 # include <unistd.h>
13032 # else /* on Windows with MSVC */
13033 # include <direct.h>
13043 #if defined _WIN32 && ! defined __CYGWIN__
13044 /* mingw cwd does not start with '/', but getcwd does allocate.
13045 However, mingw fails to honor non-zero size. */
13047 if (chdir ("/") != 0)
13051 char *f = getcwd (NULL, 0);
13055 { free (f); return 3; }
13057 { free (f); return 4; }
13067 if ac_fn_c_try_run "$LINENO"
13069 gl_cv_func_getcwd_null=yes
13071 gl_cv_func_getcwd_null=no
13073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13074 conftest.$ac_objext conftest.beam conftest.$ac_ext
13078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
13079 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
13082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
13083 printf %s "checking for getcwd with POSIX signature... " >&6; }
13084 if test ${gl_cv_func_getcwd_posix_signature+y}
13086 printf %s "(cached) " >&6
13088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13089 /* end confdefs.h. */
13090 #include <unistd.h>
13098 char *getcwd (char *, size_t);
13105 if ac_fn_c_try_compile "$LINENO"
13107 gl_cv_func_getcwd_posix_signature=yes
13109 gl_cv_func_getcwd_posix_signature=no
13111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
13115 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
13118 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
13119 if test "x$ac_cv_have_decl_getdtablesize" = xyes
13126 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
13142 if test $gl_cv_have_include_next = yes; then
13143 gl_cv_next_getopt_h='<'getopt.h'>'
13145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
13146 printf %s "checking absolute name of <getopt.h>... " >&6; }
13147 if test ${gl_cv_next_getopt_h+y}
13149 printf %s "(cached) " >&6
13152 if test $ac_cv_header_getopt_h = yes; then
13157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13158 /* end confdefs.h. */
13159 #include <getopt.h>
13162 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13163 *) gl_absname_cpp="$ac_cpp" ;;
13168 gl_dirsep_regex='[/\\]'
13171 gl_dirsep_regex='\/'
13174 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13175 gl_header_literal_regex=`echo 'getopt.h' \
13176 | sed -e "$gl_make_literal_regex_sed"`
13177 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13178 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13184 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13185 sed -n "$gl_absolute_header_sed"`
13187 gl_header=$gl_cv_absolute_getopt_h
13188 gl_cv_next_getopt_h='"'$gl_header'"'
13190 gl_cv_next_getopt_h='<'getopt.h'>'
13195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
13196 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
13198 NEXT_GETOPT_H=$gl_cv_next_getopt_h
13200 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13201 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13202 gl_next_as_first_directive='<'getopt.h'>'
13204 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13205 gl_next_as_first_directive=$gl_cv_next_getopt_h
13207 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
13212 if test $ac_cv_header_getopt_h = yes; then
13221 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13222 for ac_header in getopt.h
13224 ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
13225 if test "x$ac_cv_header_getopt_h" = xyes
13227 printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
13230 gl_replace_getopt=yes
13236 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13237 for ac_func in getopt_long_only
13239 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
13240 if test "x$ac_cv_func_getopt_long_only" = xyes
13242 printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
13245 gl_replace_getopt=yes
13251 if test -z "$gl_replace_getopt"; then
13252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
13253 printf %s "checking whether getopt is POSIX compatible... " >&6; }
13254 if test ${gl_cv_func_getopt_posix+y}
13256 printf %s "(cached) " >&6
13259 if test $cross_compiling = no; then
13260 if test "$cross_compiling" = yes
13262 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13263 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13264 as_fn_error $? "cannot run test program while cross compiling
13265 See \`config.log' for more details" "$LINENO" 5; }
13267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13268 /* end confdefs.h. */
13270 #include <unistd.h>
13271 #include <stdlib.h>
13272 #include <string.h>
13277 static char program[] = "program";
13278 static char a[] = "-a";
13279 static char foo[] = "foo";
13280 static char bar[] = "bar";
13281 char *argv[] = { program, a, foo, bar, NULL };
13284 c = getopt (4, argv, "ab");
13287 c = getopt (4, argv, "ab");
13290 if (!(optind == 2))
13296 if ac_fn_c_try_run "$LINENO"
13298 gl_cv_func_getopt_posix=maybe
13300 gl_cv_func_getopt_posix=no
13302 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13303 conftest.$ac_objext conftest.beam conftest.$ac_ext
13306 if test $gl_cv_func_getopt_posix = maybe; then
13307 if test "$cross_compiling" = yes
13309 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13310 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13311 as_fn_error $? "cannot run test program while cross compiling
13312 See \`config.log' for more details" "$LINENO" 5; }
13314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13315 /* end confdefs.h. */
13317 #include <unistd.h>
13318 #include <stdlib.h>
13319 #include <string.h>
13324 static char program[] = "program";
13325 static char donald[] = "donald";
13326 static char p[] = "-p";
13327 static char billy[] = "billy";
13328 static char duck[] = "duck";
13329 static char a[] = "-a";
13330 static char bar[] = "bar";
13331 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
13334 c = getopt (7, argv, "+abp:q:");
13337 if (!(strcmp (argv[0], "program") == 0))
13339 if (!(strcmp (argv[1], "donald") == 0))
13341 if (!(strcmp (argv[2], "-p") == 0))
13343 if (!(strcmp (argv[3], "billy") == 0))
13345 if (!(strcmp (argv[4], "duck") == 0))
13347 if (!(strcmp (argv[5], "-a") == 0))
13349 if (!(strcmp (argv[6], "bar") == 0))
13351 if (!(optind == 1))
13357 if ac_fn_c_try_run "$LINENO"
13359 gl_cv_func_getopt_posix=maybe
13361 gl_cv_func_getopt_posix=no
13363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13364 conftest.$ac_objext conftest.beam conftest.$ac_ext
13368 if test $gl_cv_func_getopt_posix = maybe; then
13369 if test "$cross_compiling" = yes
13371 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13372 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13373 as_fn_error $? "cannot run test program while cross compiling
13374 See \`config.log' for more details" "$LINENO" 5; }
13376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13377 /* end confdefs.h. */
13379 #include <unistd.h>
13380 #include <stdlib.h>
13381 #include <string.h>
13386 static char program[] = "program";
13387 static char ab[] = "-ab";
13388 char *argv[3] = { program, ab, NULL };
13389 if (getopt (2, argv, "ab:") != 'a')
13391 if (getopt (2, argv, "ab:") != '?')
13401 if ac_fn_c_try_run "$LINENO"
13403 gl_cv_func_getopt_posix=yes
13405 gl_cv_func_getopt_posix=no
13407 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13408 conftest.$ac_objext conftest.beam conftest.$ac_ext
13414 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
13415 *) gl_cv_func_getopt_posix="guessing yes";;
13420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
13421 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
13422 case "$gl_cv_func_getopt_posix" in
13423 *no) gl_replace_getopt=yes ;;
13427 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
13429 printf %s "checking for working GNU getopt function... " >&6; }
13430 if test ${gl_cv_func_getopt_gnu+y}
13432 printf %s "(cached) " >&6
13434 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
13435 # optstring is necessary for programs like m4 that have POSIX-mandated
13436 # semantics for supporting options interspersed with files.
13437 # Also, since getopt_long is a GNU extension, we require optind=0.
13438 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
13439 # so take care to revert to the correct (non-)export state.
13440 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
13441 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
13442 xx) gl_had_POSIXLY_CORRECT=exported ;;
13443 x) gl_had_POSIXLY_CORRECT=yes ;;
13444 *) gl_had_POSIXLY_CORRECT= ;;
13447 export POSIXLY_CORRECT
13448 if test "$cross_compiling" = yes
13450 gl_cv_func_getopt_gnu="guessing no"
13453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13454 /* end confdefs.h. */
13455 #include <getopt.h>
13456 #include <stddef.h>
13457 #include <string.h>
13459 #include <stdlib.h>
13460 #if defined __MACH__ && defined __APPLE__
13461 /* Avoid a crash on Mac OS X. */
13462 #include <mach/mach.h>
13463 #include <mach/mach_error.h>
13464 #include <mach/thread_status.h>
13465 #include <mach/exception.h>
13466 #include <mach/task.h>
13467 #include <pthread.h>
13468 /* The exception port on which our thread listens. */
13469 static mach_port_t our_exception_port;
13470 /* The main function of the thread listening for exceptions of type
13473 mach_exception_thread (void *arg)
13475 /* Buffer for a message to be received. */
13477 mach_msg_header_t head;
13478 mach_msg_body_t msgh_body;
13481 mach_msg_return_t retval;
13482 /* Wait for a message on the exception port. */
13483 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
13484 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
13485 if (retval != MACH_MSG_SUCCESS)
13490 nocrash_init (void)
13492 mach_port_t self = mach_task_self ();
13493 /* Allocate a port on which the thread shall listen for exceptions. */
13494 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
13496 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
13497 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
13498 MACH_MSG_TYPE_MAKE_SEND)
13500 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
13502 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
13503 /* Create the thread listening on the exception port. */
13504 pthread_attr_t attr;
13506 if (pthread_attr_init (&attr) == 0
13507 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
13508 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
13509 pthread_attr_destroy (&attr);
13510 /* Replace the exception port info for these exceptions with our own.
13511 Note that we replace the exception port for the entire task, not only
13512 for a particular thread. This has the effect that when our exception
13513 port gets the message, the thread specific exception port has already
13514 been asked, and we don't need to bother about it.
13515 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
13516 task_set_exception_ports (self, mask, our_exception_port,
13517 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
13522 #elif defined _WIN32 && ! defined __CYGWIN__
13523 /* Avoid a crash on native Windows. */
13524 #define WIN32_LEAN_AND_MEAN
13525 #include <windows.h>
13526 #include <winerror.h>
13528 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
13530 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
13532 case EXCEPTION_ACCESS_VIOLATION:
13533 case EXCEPTION_IN_PAGE_ERROR:
13534 case EXCEPTION_STACK_OVERFLOW:
13535 case EXCEPTION_GUARD_PAGE:
13536 case EXCEPTION_PRIV_INSTRUCTION:
13537 case EXCEPTION_ILLEGAL_INSTRUCTION:
13538 case EXCEPTION_DATATYPE_MISALIGNMENT:
13539 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
13540 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
13543 return EXCEPTION_CONTINUE_SEARCH;
13546 nocrash_init (void)
13548 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
13551 /* Avoid a crash on POSIX systems. */
13552 #include <signal.h>
13553 #include <unistd.h>
13554 /* A POSIX signal handler. */
13556 exception_handler (int sig)
13561 nocrash_init (void)
13564 signal (SIGSEGV, exception_handler);
13567 signal (SIGBUS, exception_handler);
13581 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
13582 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
13583 OSF/1 5.1, Solaris 10. */
13585 static char conftest[] = "conftest";
13586 static char plus[] = "-+";
13587 char *argv[3] = { conftest, plus, NULL };
13589 if (getopt (2, argv, "+a") != '?')
13592 /* This code succeeds on glibc 2.8, mingw,
13593 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
13594 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
13596 static char program[] = "program";
13597 static char p[] = "-p";
13598 static char foo[] = "foo";
13599 static char bar[] = "bar";
13600 char *argv[] = { program, p, foo, bar, NULL };
13603 if (getopt (4, argv, "p::") != 'p')
13605 else if (optarg != NULL)
13607 else if (getopt (4, argv, "p::") != -1)
13609 else if (optind != 2)
13612 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
13614 static char program[] = "program";
13615 static char foo[] = "foo";
13616 static char p[] = "-p";
13617 char *argv[] = { program, foo, p, NULL };
13619 if (getopt (3, argv, "-p") != 1)
13621 else if (getopt (3, argv, "-p") != 'p')
13624 /* This code fails on glibc 2.11. */
13626 static char program[] = "program";
13627 static char b[] = "-b";
13628 static char a[] = "-a";
13629 char *argv[] = { program, b, a, NULL };
13630 optind = opterr = 0;
13631 if (getopt (3, argv, "+:a:b") != 'b')
13633 else if (getopt (3, argv, "+:a:b") != ':')
13636 /* This code dumps core on glibc 2.14. */
13638 static char program[] = "program";
13639 static char w[] = "-W";
13640 static char dummy[] = "dummy";
13641 char *argv[] = { program, w, dummy, NULL };
13642 optind = opterr = 1;
13643 if (getopt (3, argv, "W;") != 'W')
13652 if ac_fn_c_try_run "$LINENO"
13654 gl_cv_func_getopt_gnu=yes
13656 gl_cv_func_getopt_gnu=no
13658 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13659 conftest.$ac_objext conftest.beam conftest.$ac_ext
13662 case $gl_had_POSIXLY_CORRECT in
13664 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
13665 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
13669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
13670 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
13671 if test "$gl_cv_func_getopt_gnu" != yes; then
13672 gl_replace_getopt=yes
13674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
13675 printf %s "checking for working GNU getopt_long function... " >&6; }
13676 if test ${gl_cv_func_getopt_long_gnu+y}
13678 printf %s "(cached) " >&6
13680 if test "$cross_compiling" = yes
13683 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
13684 *) gl_cv_func_getopt_long_gnu="guessing yes";;
13688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13689 /* end confdefs.h. */
13690 #include <getopt.h>
13691 #include <stddef.h>
13692 #include <string.h>
13697 static const struct option long_options[] =
13699 { "xtremely-",no_argument, NULL, 1003 },
13700 { "xtra", no_argument, NULL, 1001 },
13701 { "xtreme", no_argument, NULL, 1002 },
13702 { "xtremely", no_argument, NULL, 1003 },
13703 { NULL, 0, NULL, 0 }
13705 /* This code fails on OpenBSD 5.0. */
13707 static char program[] = "program";
13708 static char xtremel[] = "--xtremel";
13709 char *argv[] = { program, xtremel, NULL };
13711 optind = 1; opterr = 0;
13712 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
13721 if ac_fn_c_try_run "$LINENO"
13723 gl_cv_func_getopt_long_gnu=yes
13725 gl_cv_func_getopt_long_gnu=no
13727 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13728 conftest.$ac_objext conftest.beam conftest.$ac_ext
13733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
13734 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
13735 case "$gl_cv_func_getopt_long_gnu" in
13737 *) gl_replace_getopt=yes ;;
13748 GNULIB_GETTIMEOFDAY=0;
13749 HAVE_GETTIMEOFDAY=1;
13750 HAVE_STRUCT_TIMEVAL=1;
13752 REPLACE_GETTIMEOFDAY=0;
13753 REPLACE_STRUCT_TIMEVAL=0;
13755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13756 printf %s "checking for C/C++ restrict keyword... " >&6; }
13757 if test ${ac_cv_c_restrict+y}
13759 printf %s "(cached) " >&6
13761 ac_cv_c_restrict=no
13762 # The order here caters to the fact that C++ does not require restrict.
13763 for ac_kw in __restrict __restrict__ _Restrict restrict; do
13764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13765 /* end confdefs.h. */
13766 typedef int *int_ptr;
13767 int foo (int_ptr $ac_kw ip) { return ip[0]; }
13768 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
13769 int bar (int ip[$ac_kw]) { return ip[0]; }
13777 return foo (t) + bar (t);
13783 if ac_fn_c_try_compile "$LINENO"
13785 ac_cv_c_restrict=$ac_kw
13787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13788 test "$ac_cv_c_restrict" != no && break
13792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
13793 printf "%s\n" "$ac_cv_c_restrict" >&6; }
13795 case $ac_cv_c_restrict in
13797 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
13799 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
13817 if test $gl_cv_have_include_next = yes; then
13818 gl_cv_next_sys_time_h='<'sys/time.h'>'
13820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13821 printf %s "checking absolute name of <sys/time.h>... " >&6; }
13822 if test ${gl_cv_next_sys_time_h+y}
13824 printf %s "(cached) " >&6
13827 if test $ac_cv_header_sys_time_h = yes; then
13832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13833 /* end confdefs.h. */
13834 #include <sys/time.h>
13837 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13838 *) gl_absname_cpp="$ac_cpp" ;;
13843 gl_dirsep_regex='[/\\]'
13846 gl_dirsep_regex='\/'
13849 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13850 gl_header_literal_regex=`echo 'sys/time.h' \
13851 | sed -e "$gl_make_literal_regex_sed"`
13852 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13853 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13859 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13860 sed -n "$gl_absolute_header_sed"`
13862 gl_header=$gl_cv_absolute_sys_time_h
13863 gl_cv_next_sys_time_h='"'$gl_header'"'
13865 gl_cv_next_sys_time_h='<'sys/time.h'>'
13870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13871 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
13873 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13875 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13876 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13877 gl_next_as_first_directive='<'sys/time.h'>'
13879 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13880 gl_next_as_first_directive=$gl_cv_next_sys_time_h
13882 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13888 if test $ac_cv_header_sys_time_h != yes; then
13896 if test $ac_cv_header_sys_socket_h != yes; then
13897 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13898 if test "x$ac_cv_header_winsock2_h" = xyes
13900 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
13905 if test "$ac_cv_header_winsock2_h" = yes; then
13907 UNISTD_H_HAVE_WINSOCK2_H=1
13908 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13915 printf %s "checking for struct timeval... " >&6; }
13916 if test ${gl_cv_sys_struct_timeval+y}
13918 printf %s "(cached) " >&6
13920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13921 /* end confdefs.h. */
13922 #if HAVE_SYS_TIME_H
13923 #include <sys/time.h>
13926 #if HAVE_WINSOCK2_H
13927 # include <winsock2.h>
13933 static struct timeval x; x.tv_sec = x.tv_usec;
13938 if ac_fn_c_try_compile "$LINENO"
13940 gl_cv_sys_struct_timeval=yes
13942 gl_cv_sys_struct_timeval=no
13944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13948 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
13949 if test $gl_cv_sys_struct_timeval != yes; then
13950 HAVE_STRUCT_TIMEVAL=0
13952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13953 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13954 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
13956 printf %s "(cached) " >&6
13958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959 /* end confdefs.h. */
13960 #if HAVE_SYS_TIME_H
13961 #include <sys/time.h>
13964 #if HAVE_WINSOCK2_H
13965 # include <winsock2.h>
13971 static struct timeval x;
13972 typedef int verify_tv_sec_type[
13973 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13980 if ac_fn_c_try_compile "$LINENO"
13982 gl_cv_sys_struct_timeval_tv_sec=yes
13984 gl_cv_sys_struct_timeval_tv_sec=no
13986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13990 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13991 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13992 REPLACE_STRUCT_TIMEVAL=1
14002 NEED_LOCALTIME_BUFFER=0
14007 GNULIB_LOCALTIME=0;
14008 GNULIB_NANOSLEEP=0;
14015 HAVE_DECL_LOCALTIME_R=1;
14021 REPLACE_CTIME=GNULIB_PORTCHECK;
14022 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14023 REPLACE_MKTIME=GNULIB_PORTCHECK;
14024 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14025 REPLACE_STRFTIME=GNULIB_PORTCHECK;
14026 REPLACE_TIMEGM=GNULIB_PORTCHECK;
14027 REPLACE_TZSET=GNULIB_PORTCHECK;
14029 : ${GNULIB_GETTIMEOFDAY=0};
14031 REPLACE_LOCALTIME=0;
14034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
14035 printf %s "checking where to find the exponent in a 'float'... " >&6; }
14036 if test ${gl_cv_cc_float_expbit0+y}
14038 printf %s "(cached) " >&6
14041 if test "$cross_compiling" = yes
14043 gl_cv_cc_float_expbit0="word 0 bit 23"
14045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14046 /* end confdefs.h. */
14049 #include <stddef.h>
14051 #include <string.h>
14053 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14054 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
14055 static unsigned int ored_words[NWORDS];
14056 static unsigned int anded_words[NWORDS];
14057 static void add_to_ored_words (float x)
14061 /* Clear it first, in case
14062 sizeof (float) < sizeof (memory_float). */
14063 memset (&m, 0, sizeof (memory_float));
14065 for (i = 0; i < NWORDS; i++)
14067 ored_words[i] |= m.word[i];
14068 anded_words[i] &= m.word[i];
14074 FILE *fp = fopen ("conftest.out", "w");
14077 for (j = 0; j < NWORDS; j++)
14078 anded_words[j] = ~ (unsigned int) 0;
14079 add_to_ored_words (0.25f);
14080 add_to_ored_words (0.5f);
14081 add_to_ored_words (1.0f);
14082 add_to_ored_words (2.0f);
14083 add_to_ored_words (4.0f);
14084 /* Remove bits that are common (e.g. if representation of the first mantissa
14085 bit is explicit). */
14086 for (j = 0; j < NWORDS; j++)
14087 ored_words[j] &= ~anded_words[j];
14088 /* Now find the nonzero word. */
14089 for (j = 0; j < NWORDS; j++)
14090 if (ored_words[j] != 0)
14095 for (i = j + 1; i < NWORDS; i++)
14096 if (ored_words[i] != 0)
14098 fprintf (fp, "unknown");
14099 return (fclose (fp) != 0);
14102 if ((ored_words[j] >> i) & 1)
14104 fprintf (fp, "word %d bit %d", (int) j, (int) i);
14105 return (fclose (fp) != 0);
14108 fprintf (fp, "unknown");
14109 return (fclose (fp) != 0);
14113 if ac_fn_c_try_run "$LINENO"
14115 gl_cv_cc_float_expbit0=`cat conftest.out`
14117 gl_cv_cc_float_expbit0="unknown"
14119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14120 conftest.$ac_objext conftest.beam conftest.$ac_ext
14126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
14127 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
14128 case "$gl_cv_cc_float_expbit0" in
14130 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14131 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
14133 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
14136 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
14152 if test $gl_cv_have_include_next = yes; then
14153 gl_cv_next_limits_h='<'limits.h'>'
14155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
14156 printf %s "checking absolute name of <limits.h>... " >&6; }
14157 if test ${gl_cv_next_limits_h+y}
14159 printf %s "(cached) " >&6
14162 if test $ac_cv_header_limits_h = yes; then
14167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14168 /* end confdefs.h. */
14169 #include <limits.h>
14172 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14173 *) gl_absname_cpp="$ac_cpp" ;;
14178 gl_dirsep_regex='[/\\]'
14181 gl_dirsep_regex='\/'
14184 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14185 gl_header_literal_regex=`echo 'limits.h' \
14186 | sed -e "$gl_make_literal_regex_sed"`
14187 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14188 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14194 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14195 sed -n "$gl_absolute_header_sed"`
14197 gl_header=$gl_cv_absolute_limits_h
14198 gl_cv_next_limits_h='"'$gl_header'"'
14200 gl_cv_next_limits_h='<'limits.h'>'
14205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
14206 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
14208 NEXT_LIMITS_H=$gl_cv_next_limits_h
14210 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14211 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14212 gl_next_as_first_directive='<'limits.h'>'
14214 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14215 gl_next_as_first_directive=$gl_cv_next_limits_h
14217 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
14223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
14224 printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
14225 if test ${gl_cv_header_limits_width+y}
14227 printf %s "(cached) " >&6
14229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14230 /* end confdefs.h. */
14231 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
14232 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
14234 #include <limits.h>
14235 long long llm = LLONG_MAX;
14237 int ullw = ULLONG_WIDTH;
14247 if ac_fn_c_try_compile "$LINENO"
14249 gl_cv_header_limits_width=yes
14251 gl_cv_header_limits_width=no
14253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
14256 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
14257 if test "$gl_cv_header_limits_width" = yes; then
14263 if test -n "$LIMITS_H"; then
14264 GL_GENERATE_LIMITS_H_TRUE=
14265 GL_GENERATE_LIMITS_H_FALSE='#'
14267 GL_GENERATE_LIMITS_H_TRUE='#'
14268 GL_GENERATE_LIMITS_H_FALSE=
14273 if test "X$prefix" = "XNONE"; then
14274 acl_final_prefix="$ac_default_prefix"
14276 acl_final_prefix="$prefix"
14278 if test "X$exec_prefix" = "XNONE"; then
14279 acl_final_exec_prefix='${prefix}'
14281 acl_final_exec_prefix="$exec_prefix"
14283 acl_save_prefix="$prefix"
14284 prefix="$acl_final_prefix"
14285 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
14286 prefix="$acl_save_prefix"
14290 # Check whether --with-gnu-ld was given.
14291 if test ${with_gnu_ld+y}
14293 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
14298 # Prepare PATH_SEPARATOR.
14299 # The user is always right.
14300 if test "${PATH_SEPARATOR+set}" != set; then
14301 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
14302 # contains only /bin. Note that ksh looks also at the FPATH variable,
14303 # so we have to set that as well for the test.
14305 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
14306 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
14307 || PATH_SEPARATOR=';'
14311 if test -n "$LD"; then
14312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
14313 printf %s "checking for ld... " >&6; }
14314 elif test "$GCC" = yes; then
14315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
14316 printf %s "checking for ld used by $CC... " >&6; }
14317 elif test "$with_gnu_ld" = yes; then
14318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
14319 printf %s "checking for GNU ld... " >&6; }
14321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
14322 printf %s "checking for non-GNU ld... " >&6; }
14324 if test -n "$LD"; then
14325 # Let the user override the test with a path.
14328 if test ${acl_cv_path_LD+y}
14330 printf %s "(cached) " >&6
14333 acl_cv_path_LD= # Final result of this test
14334 ac_prog=ld # Program to search in $PATH
14335 if test "$GCC" = yes; then
14336 # Check if gcc -print-prog-name=ld gives a path.
14339 # gcc leaves a trailing carriage return which upsets mingw
14340 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
14342 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
14344 case $acl_output in
14345 # Accept absolute paths.
14347 re_direlt='/[^/][^/]*/\.\./'
14348 # Canonicalize the pathname of ld
14349 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
14350 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
14351 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
14353 # Got the pathname. No search in PATH is needed.
14354 acl_cv_path_LD="$acl_output"
14358 # If it fails, then pretend we aren't using GCC.
14361 # If it is relative, then search for the first ld in PATH.
14362 with_gnu_ld=unknown
14366 if test -n "$ac_prog"; then
14367 # Search for $ac_prog in $PATH.
14368 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14369 for ac_dir in $PATH; do
14370 IFS="$acl_save_ifs"
14371 test -z "$ac_dir" && ac_dir=.
14372 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14373 acl_cv_path_LD="$ac_dir/$ac_prog"
14374 # Check to see if the program is GNU ld. I'd rather use --version,
14375 # but apparently some variants of GNU ld only accept -v.
14376 # Break only if it was the GNU/non-GNU ld that we prefer.
14377 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
14378 *GNU* | *'with BFD'*)
14379 test "$with_gnu_ld" != no && break
14382 test "$with_gnu_ld" != yes && break
14387 IFS="$acl_save_ifs"
14391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14392 /* end confdefs.h. */
14393 #if defined __powerpc64__ || defined _ARCH_PPC64
14400 if ac_fn_c_try_compile "$LINENO"
14402 # The compiler produces 64-bit code. Add option '-b64' so that the
14403 # linker groks 64-bit object files.
14404 case "$acl_cv_path_LD " in
14406 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
14410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14414 /* end confdefs.h. */
14415 #if defined __sparcv9 || defined __arch64__
14422 if ac_fn_c_try_compile "$LINENO"
14426 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
14427 # so that the linker groks 32-bit object files.
14428 case "$acl_cv_path_LD " in
14429 *" -m elf32_sparc "*) ;;
14430 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
14434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14440 LD="$acl_cv_path_LD"
14442 if test -n "$LD"; then
14443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
14444 printf "%s\n" "$LD" >&6; }
14446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14447 printf "%s\n" "no" >&6; }
14448 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
14450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
14451 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
14452 if test ${acl_cv_prog_gnu_ld+y}
14454 printf %s "(cached) " >&6
14456 # I'd rather use --version here, but apparently some GNU lds only accept -v.
14457 case `$LD -v 2>&1 </dev/null` in
14458 *GNU* | *'with BFD'*)
14459 acl_cv_prog_gnu_ld=yes
14462 acl_cv_prog_gnu_ld=no
14466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
14467 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
14468 with_gnu_ld=$acl_cv_prog_gnu_ld
14473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
14474 printf %s "checking for shared library run path origin... " >&6; }
14475 if test ${acl_cv_rpath+y}
14477 printf %s "(cached) " >&6
14480 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
14481 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
14483 rm -f ./conftest.sh
14487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
14488 printf "%s\n" "$acl_cv_rpath" >&6; }
14490 acl_libext="$acl_cv_libext"
14491 acl_shlibext="$acl_cv_shlibext"
14492 acl_libname_spec="$acl_cv_libname_spec"
14493 acl_library_names_spec="$acl_cv_library_names_spec"
14494 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
14495 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
14496 acl_hardcode_direct="$acl_cv_hardcode_direct"
14497 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
14498 # Check whether --enable-rpath was given.
14499 if test ${enable_rpath+y}
14501 enableval=$enable_rpath; :
14509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
14510 printf %s "checking 32-bit host C ABI... " >&6; }
14511 if test ${gl_cv_host_cpu_c_abi_32bit+y}
14513 printf %s "(cached) " >&6
14515 if test -n "$gl_cv_host_cpu_c_abi"; then
14516 case "$gl_cv_host_cpu_c_abi" in
14517 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
14518 gl_cv_host_cpu_c_abi_32bit=yes ;;
14520 gl_cv_host_cpu_c_abi_32bit=no ;;
14523 case "$host_cpu" in
14526 gl_cv_host_cpu_c_abi_32bit=yes
14530 # On x86_64 systems, the C compiler may be generating code in one of
14532 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
14533 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
14534 # with native Windows (mingw, MSVC).
14535 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
14536 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
14537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538 /* end confdefs.h. */
14539 #if (defined __x86_64__ || defined __amd64__ \
14540 || defined _M_X64 || defined _M_AMD64) \
14541 && !(defined __ILP32__ || defined _ILP32)
14548 if ac_fn_c_try_compile "$LINENO"
14550 gl_cv_host_cpu_c_abi_32bit=no
14552 gl_cv_host_cpu_c_abi_32bit=yes
14554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14558 # Assume arm with EABI.
14559 # On arm64 systems, the C compiler may be generating code in one of
14561 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
14562 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
14563 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
14564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14565 /* end confdefs.h. */
14566 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
14573 if ac_fn_c_try_compile "$LINENO"
14575 gl_cv_host_cpu_c_abi_32bit=no
14577 gl_cv_host_cpu_c_abi_32bit=yes
14579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14582 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
14583 # On hppa, the C compiler may be generating 32-bit code or 64-bit
14584 # code. In the latter case, it defines _LP64 and __LP64__.
14585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14586 /* end confdefs.h. */
14594 if ac_fn_c_try_compile "$LINENO"
14596 gl_cv_host_cpu_c_abi_32bit=no
14598 gl_cv_host_cpu_c_abi_32bit=yes
14600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14604 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
14605 # 32-bit code. In the latter case, it defines _ILP32.
14606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14607 /* end confdefs.h. */
14615 if ac_fn_c_try_compile "$LINENO"
14617 gl_cv_host_cpu_c_abi_32bit=yes
14619 gl_cv_host_cpu_c_abi_32bit=no
14621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14625 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h. */
14629 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
14636 if ac_fn_c_try_compile "$LINENO"
14638 gl_cv_host_cpu_c_abi_32bit=no
14640 gl_cv_host_cpu_c_abi_32bit=yes
14642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14646 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
14647 # No need to distinguish them here; the caller may distinguish
14648 # them based on the OS.
14649 # On powerpc64 systems, the C compiler may still be generating
14650 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
14651 # be generating 64-bit code.
14652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14653 /* end confdefs.h. */
14654 #if defined __powerpc64__ || defined _ARCH_PPC64
14661 if ac_fn_c_try_compile "$LINENO"
14663 gl_cv_host_cpu_c_abi_32bit=no
14665 gl_cv_host_cpu_c_abi_32bit=yes
14667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14671 gl_cv_host_cpu_c_abi_32bit=yes
14674 riscv32 | riscv64 )
14675 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
14676 # Size of 'long' and 'void *':
14677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14678 /* end confdefs.h. */
14679 #if defined __LP64__
14686 if ac_fn_c_try_compile "$LINENO"
14688 gl_cv_host_cpu_c_abi_32bit=no
14690 gl_cv_host_cpu_c_abi_32bit=yes
14692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14696 # On s390x, the C compiler may be generating 64-bit (= s390x) code
14697 # or 31-bit (= s390) code.
14698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14699 /* end confdefs.h. */
14700 #if defined __LP64__ || defined __s390x__
14707 if ac_fn_c_try_compile "$LINENO"
14709 gl_cv_host_cpu_c_abi_32bit=no
14711 gl_cv_host_cpu_c_abi_32bit=yes
14713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14717 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
14718 # C compiler still generates 32-bit code.
14719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14720 /* end confdefs.h. */
14721 #if defined __sparcv9 || defined __arch64__
14728 if ac_fn_c_try_compile "$LINENO"
14730 gl_cv_host_cpu_c_abi_32bit=no
14732 gl_cv_host_cpu_c_abi_32bit=yes
14734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14738 gl_cv_host_cpu_c_abi_32bit=no
14744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
14745 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
14747 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
14755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
14756 printf %s "checking for 64-bit host... " >&6; }
14757 if test ${gl_cv_solaris_64bit+y}
14759 printf %s "(cached) " >&6
14761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14762 /* end confdefs.h. */
14770 if ac_fn_c_try_compile "$LINENO"
14772 gl_cv_solaris_64bit=yes
14774 gl_cv_solaris_64bit=no
14776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
14780 printf "%s\n" "$gl_cv_solaris_64bit" >&6; };;
14783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
14784 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
14785 if test ${acl_cv_libdirstems+y}
14787 printf %s "(cached) " >&6
14793 if test $gl_cv_solaris_64bit = yes; then
14794 acl_libdirstem=lib/64
14795 case "$host_cpu" in
14796 sparc*) acl_libdirstem2=lib/sparcv9 ;;
14797 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
14802 if test "$HOST_CPU_C_ABI_32BIT" != yes; then
14803 searchpath=`(if test -f /usr/bin/gcc \
14804 && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
14805 LC_ALL=C /usr/bin/gcc -print-search-dirs; \
14807 LC_ALL=C $CC -print-search-dirs; \
14809 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
14810 if test -n "$searchpath"; then
14811 acl_save_IFS="${IFS= }"; IFS=":"
14812 for searchdir in $searchpath; do
14813 if test -d "$searchdir"; then
14814 case "$searchdir" in
14815 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
14817 # Better ignore directories of this form. They are misleading.
14819 *) searchdir=`cd "$searchdir" && pwd`
14820 case "$searchdir" in
14821 */lib64 ) acl_libdirstem=lib64 ;;
14826 IFS="$acl_save_IFS"
14831 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
14832 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
14835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
14836 printf "%s\n" "$acl_cv_libdirstems" >&6; }
14837 # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
14838 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
14839 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
14843 gl_threads_api=none
14848 if test "$gl_use_threads" != no; then
14849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14850 printf %s "checking whether imported symbols can be declared weak... " >&6; }
14851 if test ${gl_cv_have_weak+y}
14853 printf %s "(cached) " >&6
14856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14857 /* end confdefs.h. */
14858 extern void xyzzy ();
14868 if ac_fn_c_try_link "$LINENO"
14870 gl_cv_have_weak=maybe
14872 rm -f core conftest.err conftest.$ac_objext \
14873 conftest$ac_exeext conftest.$ac_ext
14874 if test $gl_cv_have_weak = maybe; then
14875 if test "$cross_compiling" = yes
14877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14878 /* end confdefs.h. */
14880 Extensible Linking Format
14884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14885 $EGREP "Extensible Linking Format" >/dev/null 2>&1
14887 gl_cv_have_weak="guessing yes"
14889 gl_cv_have_weak="guessing no"
14895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14896 /* end confdefs.h. */
14902 return (fputs == NULL);
14905 if ac_fn_c_try_run "$LINENO"
14907 gl_cv_have_weak=yes
14911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14912 conftest.$ac_objext conftest.beam conftest.$ac_ext
14916 case " $LDFLAGS " in
14917 *" -static "*) gl_cv_have_weak=no ;;
14921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14922 printf "%s\n" "$gl_cv_have_weak" >&6; }
14923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker supports --as-needed" >&5
14924 printf %s "checking whether the linker supports --as-needed... " >&6; }
14925 if test ${gl_cv_linker_have_as_needed+y}
14927 printf %s "(cached) " >&6
14929 if test -n "$GCC"; then
14930 gl_saved_ldflags="$LDFLAGS"
14931 LDFLAGS="$gl_saved_ldflags -Wl,--as-needed -Wl,--no-as-needed"
14932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14933 /* end confdefs.h. */
14943 if ac_fn_c_try_link "$LINENO"
14945 gl_cv_linker_have_as_needed=yes
14947 gl_cv_linker_have_as_needed=no
14949 rm -f core conftest.err conftest.$ac_objext \
14950 conftest$ac_exeext conftest.$ac_ext
14951 LDFLAGS="$gl_saved_ldflags"
14953 gl_cv_linker_have_as_needed=no
14957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_linker_have_as_needed" >&5
14958 printf "%s\n" "$gl_cv_linker_have_as_needed" >&6; }
14959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker supports --push-state" >&5
14960 printf %s "checking whether the linker supports --push-state... " >&6; }
14961 if test ${gl_cv_linker_have_push_state+y}
14963 printf %s "(cached) " >&6
14965 if test -n "$GCC"; then
14966 gl_saved_ldflags="$LDFLAGS"
14967 LDFLAGS="$gl_saved_ldflags -Wl,--push-state -Wl,--pop-state"
14968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14969 /* end confdefs.h. */
14979 if ac_fn_c_try_link "$LINENO"
14981 gl_cv_linker_have_push_state=yes
14983 gl_cv_linker_have_push_state=no
14985 rm -f core conftest.err conftest.$ac_objext \
14986 conftest$ac_exeext conftest.$ac_ext
14987 LDFLAGS="$gl_saved_ldflags"
14989 gl_cv_linker_have_push_state=no
14993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_linker_have_push_state" >&5
14994 printf "%s\n" "$gl_cv_linker_have_push_state" >&6; }
14995 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
14996 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14997 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
14998 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14999 if test "x$ac_cv_header_pthread_h" = xyes
15001 gl_have_pthread_h=yes
15003 gl_have_pthread_h=no
15006 if test "$gl_have_pthread_h" = yes; then
15007 # Other possible tests:
15008 # -lpthreads (FSU threads, PCthreads)
15011 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
15012 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
15013 # the second one only in libpthread, and lock.c needs it.
15015 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
15016 # needs -pthread for some reason. See:
15017 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
15019 for gl_pthread in '' '-pthread'; do
15020 LIBS="$LIBS $gl_pthread"
15021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15022 /* end confdefs.h. */
15023 #include <pthread.h>
15025 pthread_mutexattr_t ma;
15030 pthread_mutex_lock (&m);
15031 pthread_mutexattr_init (&ma);
15036 if ac_fn_c_try_link "$LINENO"
15038 gl_have_pthread=yes
15039 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
15040 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
15042 rm -f core conftest.err conftest.$ac_objext \
15043 conftest$ac_exeext conftest.$ac_ext
15045 test -n "$gl_have_pthread" && break
15048 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15049 # since it is defined as a macro on OSF/1.)
15050 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
15051 # The program links fine without libpthread. But it may actually
15052 # need to link with libpthread in order to create multiple threads.
15053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15054 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15055 if test ${ac_cv_lib_pthread_pthread_kill+y}
15057 printf %s "(cached) " >&6
15059 ac_check_lib_save_LIBS=$LIBS
15060 LIBS="-lpthread $LIBS"
15061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15062 /* end confdefs.h. */
15064 /* Override any GCC internal prototype to avoid an error.
15065 Use char because int might match the return type of a GCC
15066 builtin and then its argument prototype would still apply. */
15070 char pthread_kill ();
15074 return pthread_kill ();
15079 if ac_fn_c_try_link "$LINENO"
15081 ac_cv_lib_pthread_pthread_kill=yes
15083 ac_cv_lib_pthread_pthread_kill=no
15085 rm -f core conftest.err conftest.$ac_objext \
15086 conftest$ac_exeext conftest.$ac_ext
15087 LIBS=$ac_check_lib_save_LIBS
15089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15090 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15091 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15093 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15094 # On Solaris and HP-UX, most pthread functions exist also in libc.
15095 # Therefore pthread_in_use() needs to actually try to create a
15096 # thread: pthread_create from libc will fail, whereas
15097 # pthread_create will actually create a thread.
15098 # On Solaris 10 or newer, this test is no longer needed, because
15099 # libc contains the fully functional pthread functions.
15101 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15103 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15109 elif test -z "$gl_have_pthread"; then
15110 # Some library is needed. Try libpthread and libc_r.
15111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15112 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15113 if test ${ac_cv_lib_pthread_pthread_kill+y}
15115 printf %s "(cached) " >&6
15117 ac_check_lib_save_LIBS=$LIBS
15118 LIBS="-lpthread $LIBS"
15119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15120 /* end confdefs.h. */
15122 /* Override any GCC internal prototype to avoid an error.
15123 Use char because int might match the return type of a GCC
15124 builtin and then its argument prototype would still apply. */
15128 char pthread_kill ();
15132 return pthread_kill ();
15137 if ac_fn_c_try_link "$LINENO"
15139 ac_cv_lib_pthread_pthread_kill=yes
15141 ac_cv_lib_pthread_pthread_kill=no
15143 rm -f core conftest.err conftest.$ac_objext \
15144 conftest$ac_exeext conftest.$ac_ext
15145 LIBS=$ac_check_lib_save_LIBS
15147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15148 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15149 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15151 gl_have_pthread=yes
15152 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
15153 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15156 if test -z "$gl_have_pthread"; then
15158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15159 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15160 if test ${ac_cv_lib_c_r_pthread_kill+y}
15162 printf %s "(cached) " >&6
15164 ac_check_lib_save_LIBS=$LIBS
15166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15167 /* end confdefs.h. */
15169 /* Override any GCC internal prototype to avoid an error.
15170 Use char because int might match the return type of a GCC
15171 builtin and then its argument prototype would still apply. */
15175 char pthread_kill ();
15179 return pthread_kill ();
15184 if ac_fn_c_try_link "$LINENO"
15186 ac_cv_lib_c_r_pthread_kill=yes
15188 ac_cv_lib_c_r_pthread_kill=no
15190 rm -f core conftest.err conftest.$ac_objext \
15191 conftest$ac_exeext conftest.$ac_ext
15192 LIBS=$ac_check_lib_save_LIBS
15194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15195 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15196 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15198 gl_have_pthread=yes
15199 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
15200 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
15205 if test -n "$gl_have_pthread"; then
15206 gl_threads_api=posix
15208 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
15210 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15211 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15213 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
15217 case "$LIBMULTITHREAD" in
15220 if test $gl_cv_linker_have_as_needed = yes; then
15221 if test $gl_cv_linker_have_push_state = yes; then
15222 LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state"
15224 LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--no-as-needed -lpthread"
15229 if test $gl_cv_linker_have_as_needed = yes; then
15230 if test $gl_cv_linker_have_push_state = yes; then
15231 LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
15233 LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
15238 # TODO: May need to modify LTLIBMULTITHREAD similarly.
15244 if test -z "$gl_have_pthread"; then
15245 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
15246 gl_have_solaristhread=
15247 gl_save_LIBS="$LIBS"
15248 LIBS="$LIBS -lthread"
15249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15250 /* end confdefs.h. */
15252 #include <thread.h>
15263 if ac_fn_c_try_link "$LINENO"
15265 gl_have_solaristhread=yes
15267 rm -f core conftest.err conftest.$ac_objext \
15268 conftest$ac_exeext conftest.$ac_ext
15269 LIBS="$gl_save_LIBS"
15270 if test -n "$gl_have_solaristhread"; then
15271 gl_threads_api=solaris
15273 LTLIBTHREAD=-lthread
15274 LIBMULTITHREAD="$LIBTHREAD"
15275 LTLIBMULTITHREAD="$LTLIBTHREAD"
15277 printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
15279 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15281 printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
15285 if test $gl_cv_linker_have_as_needed = yes; then
15286 if test $gl_cv_linker_have_push_state = yes; then
15287 LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
15289 LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
15292 # TODO: May need to modify LTLIBMULTITHREAD similarly.
15297 if test "$gl_use_threads" = pth; then
15298 gl_save_CPPFLAGS="$CPPFLAGS"
15304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
15305 printf %s "checking how to link with libpth... " >&6; }
15306 if test ${ac_cv_libpth_libs+y}
15308 printf %s "(cached) " >&6
15319 acl_save_prefix="$prefix"
15320 prefix="$acl_final_prefix"
15321 acl_save_exec_prefix="$exec_prefix"
15322 exec_prefix="$acl_final_exec_prefix"
15324 eval additional_includedir=\"$includedir\"
15325 eval additional_libdir=\"$libdir\"
15327 exec_prefix="$acl_save_exec_prefix"
15328 prefix="$acl_save_prefix"
15331 # Check whether --with-libpth-prefix was given.
15332 if test ${with_libpth_prefix+y}
15334 withval=$with_libpth_prefix;
15335 if test "X$withval" = "Xno"; then
15338 if test "X$withval" = "X"; then
15340 acl_save_prefix="$prefix"
15341 prefix="$acl_final_prefix"
15342 acl_save_exec_prefix="$exec_prefix"
15343 exec_prefix="$acl_final_exec_prefix"
15345 eval additional_includedir=\"$includedir\"
15346 eval additional_libdir=\"$libdir\"
15348 exec_prefix="$acl_save_exec_prefix"
15349 prefix="$acl_save_prefix"
15352 additional_includedir="$withval/include"
15353 additional_libdir="$withval/$acl_libdirstem"
15354 if test "$acl_libdirstem2" != "$acl_libdirstem" \
15355 && test ! -d "$withval/$acl_libdirstem"; then
15356 additional_libdir="$withval/$acl_libdirstem2"
15370 names_already_handled=
15371 names_next_round='pth '
15372 while test -n "$names_next_round"; do
15373 names_this_round="$names_next_round"
15375 for name in $names_this_round; do
15377 for n in $names_already_handled; do
15378 if test "$n" = "$name"; then
15379 already_handled=yes
15383 if test -z "$already_handled"; then
15384 names_already_handled="$names_already_handled $name"
15385 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
15386 eval value=\"\$HAVE_LIB$uppername\"
15387 if test -n "$value"; then
15388 if test "$value" = yes; then
15389 eval value=\"\$LIB$uppername\"
15390 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
15391 eval value=\"\$LTLIB$uppername\"
15392 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
15401 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
15402 if test -n "$acl_shlibext"; then
15403 shrext=".$acl_shlibext" # typically: shrext=.so
15407 if test $use_additional = yes; then
15408 dir="$additional_libdir"
15409 if test -n "$acl_shlibext"; then
15410 if test -f "$dir/$libname$shrext"; then
15412 found_so="$dir/$libname$shrext"
15414 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15415 ver=`(cd "$dir" && \
15416 for f in "$libname$shrext".*; do echo "$f"; done \
15417 | sed -e "s,^$libname$shrext\\\\.,," \
15418 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15419 | sed 1q ) 2>/dev/null`
15420 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15422 found_so="$dir/$libname$shrext.$ver"
15425 eval library_names=\"$acl_library_names_spec\"
15426 for f in $library_names; do
15427 if test -f "$dir/$f"; then
15436 if test "X$found_dir" = "X"; then
15437 if test -f "$dir/$libname.$acl_libext"; then
15439 found_a="$dir/$libname.$acl_libext"
15442 if test "X$found_dir" != "X"; then
15443 if test -f "$dir/$libname.la"; then
15444 found_la="$dir/$libname.la"
15448 if test "X$found_dir" = "X"; then
15449 for x in $LDFLAGS $LTLIBPTH; do
15451 acl_save_prefix="$prefix"
15452 prefix="$acl_final_prefix"
15453 acl_save_exec_prefix="$exec_prefix"
15454 exec_prefix="$acl_final_exec_prefix"
15456 exec_prefix="$acl_save_exec_prefix"
15457 prefix="$acl_save_prefix"
15461 dir=`echo "X$x" | sed -e 's/^X-L//'`
15462 if test -n "$acl_shlibext"; then
15463 if test -f "$dir/$libname$shrext"; then
15465 found_so="$dir/$libname$shrext"
15467 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15468 ver=`(cd "$dir" && \
15469 for f in "$libname$shrext".*; do echo "$f"; done \
15470 | sed -e "s,^$libname$shrext\\\\.,," \
15471 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15472 | sed 1q ) 2>/dev/null`
15473 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15475 found_so="$dir/$libname$shrext.$ver"
15478 eval library_names=\"$acl_library_names_spec\"
15479 for f in $library_names; do
15480 if test -f "$dir/$f"; then
15489 if test "X$found_dir" = "X"; then
15490 if test -f "$dir/$libname.$acl_libext"; then
15492 found_a="$dir/$libname.$acl_libext"
15495 if test "X$found_dir" != "X"; then
15496 if test -f "$dir/$libname.la"; then
15497 found_la="$dir/$libname.la"
15502 if test "X$found_dir" != "X"; then
15507 if test "X$found_dir" != "X"; then
15508 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
15509 if test "X$found_so" != "X"; then
15510 if test "$enable_rpath" = no \
15511 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
15512 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
15513 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15516 for x in $ltrpathdirs; do
15517 if test "X$x" = "X$found_dir"; then
15522 if test -z "$haveit"; then
15523 ltrpathdirs="$ltrpathdirs $found_dir"
15525 if test "$acl_hardcode_direct" = yes; then
15526 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15528 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
15529 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15531 for x in $rpathdirs; do
15532 if test "X$x" = "X$found_dir"; then
15537 if test -z "$haveit"; then
15538 rpathdirs="$rpathdirs $found_dir"
15542 for x in $LDFLAGS $LIBPTH; do
15544 acl_save_prefix="$prefix"
15545 prefix="$acl_final_prefix"
15546 acl_save_exec_prefix="$exec_prefix"
15547 exec_prefix="$acl_final_exec_prefix"
15549 exec_prefix="$acl_save_exec_prefix"
15550 prefix="$acl_save_prefix"
15552 if test "X$x" = "X-L$found_dir"; then
15557 if test -z "$haveit"; then
15558 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
15560 if test "$acl_hardcode_minus_L" != no; then
15561 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15563 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15569 if test "X$found_a" != "X"; then
15570 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
15572 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
15575 additional_includedir=
15576 case "$found_dir" in
15577 */$acl_libdirstem | */$acl_libdirstem/)
15578 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
15579 if test "$name" = 'pth'; then
15580 LIBPTH_PREFIX="$basedir"
15582 additional_includedir="$basedir/include"
15584 */$acl_libdirstem2 | */$acl_libdirstem2/)
15585 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
15586 if test "$name" = 'pth'; then
15587 LIBPTH_PREFIX="$basedir"
15589 additional_includedir="$basedir/include"
15592 if test "X$additional_includedir" != "X"; then
15593 if test "X$additional_includedir" != "X/usr/include"; then
15595 if test "X$additional_includedir" = "X/usr/local/include"; then
15596 if test -n "$GCC"; then
15598 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15602 if test -z "$haveit"; then
15603 for x in $CPPFLAGS $INCPTH; do
15605 acl_save_prefix="$prefix"
15606 prefix="$acl_final_prefix"
15607 acl_save_exec_prefix="$exec_prefix"
15608 exec_prefix="$acl_final_exec_prefix"
15610 exec_prefix="$acl_save_exec_prefix"
15611 prefix="$acl_save_prefix"
15613 if test "X$x" = "X-I$additional_includedir"; then
15618 if test -z "$haveit"; then
15619 if test -d "$additional_includedir"; then
15620 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
15626 if test -n "$found_la"; then
15627 save_libdir="$libdir"
15628 case "$found_la" in
15629 */* | *\\*) . "$found_la" ;;
15630 *) . "./$found_la" ;;
15632 libdir="$save_libdir"
15633 for dep in $dependency_libs; do
15636 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15637 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
15638 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
15640 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
15641 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
15642 if test -n "$GCC"; then
15644 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15648 if test -z "$haveit"; then
15650 for x in $LDFLAGS $LIBPTH; do
15652 acl_save_prefix="$prefix"
15653 prefix="$acl_final_prefix"
15654 acl_save_exec_prefix="$exec_prefix"
15655 exec_prefix="$acl_final_exec_prefix"
15657 exec_prefix="$acl_save_exec_prefix"
15658 prefix="$acl_save_prefix"
15660 if test "X$x" = "X-L$additional_libdir"; then
15665 if test -z "$haveit"; then
15666 if test -d "$additional_libdir"; then
15667 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
15671 for x in $LDFLAGS $LTLIBPTH; do
15673 acl_save_prefix="$prefix"
15674 prefix="$acl_final_prefix"
15675 acl_save_exec_prefix="$exec_prefix"
15676 exec_prefix="$acl_final_exec_prefix"
15678 exec_prefix="$acl_save_exec_prefix"
15679 prefix="$acl_save_prefix"
15681 if test "X$x" = "X-L$additional_libdir"; then
15686 if test -z "$haveit"; then
15687 if test -d "$additional_libdir"; then
15688 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
15695 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15696 if test "$enable_rpath" != no; then
15698 for x in $rpathdirs; do
15699 if test "X$x" = "X$dir"; then
15704 if test -z "$haveit"; then
15705 rpathdirs="$rpathdirs $dir"
15708 for x in $ltrpathdirs; do
15709 if test "X$x" = "X$dir"; then
15714 if test -z "$haveit"; then
15715 ltrpathdirs="$ltrpathdirs $dir"
15720 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15723 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15726 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
15727 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
15733 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15734 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
15740 if test "X$rpathdirs" != "X"; then
15741 if test -n "$acl_hardcode_libdir_separator"; then
15743 for found_dir in $rpathdirs; do
15744 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
15746 acl_save_libdir="$libdir"
15748 eval flag=\"$acl_hardcode_libdir_flag_spec\"
15749 libdir="$acl_save_libdir"
15750 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
15752 for found_dir in $rpathdirs; do
15753 acl_save_libdir="$libdir"
15754 libdir="$found_dir"
15755 eval flag=\"$acl_hardcode_libdir_flag_spec\"
15756 libdir="$acl_save_libdir"
15757 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
15761 if test "X$ltrpathdirs" != "X"; then
15762 for found_dir in $ltrpathdirs; do
15763 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
15771 ac_cv_libpth_libs="$LIBPTH"
15772 ac_cv_libpth_ltlibs="$LTLIBPTH"
15773 ac_cv_libpth_cppflags="$INCPTH"
15774 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
15777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
15778 printf "%s\n" "$ac_cv_libpth_libs" >&6; }
15779 LIBPTH="$ac_cv_libpth_libs"
15780 LTLIBPTH="$ac_cv_libpth_ltlibs"
15781 INCPTH="$ac_cv_libpth_cppflags"
15782 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
15784 for element in $INCPTH; do
15786 for x in $CPPFLAGS; do
15788 acl_save_prefix="$prefix"
15789 prefix="$acl_final_prefix"
15790 acl_save_exec_prefix="$exec_prefix"
15791 exec_prefix="$acl_final_exec_prefix"
15793 exec_prefix="$acl_save_exec_prefix"
15794 prefix="$acl_save_prefix"
15796 if test "X$x" = "X$element"; then
15801 if test -z "$haveit"; then
15802 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15814 gl_save_LIBS="$LIBS"
15815 LIBS="$LIBS $LIBPTH"
15816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15817 /* end confdefs.h. */
15827 if ac_fn_c_try_link "$LINENO"
15831 rm -f core conftest.err conftest.$ac_objext \
15832 conftest$ac_exeext conftest.$ac_ext
15833 LIBS="$gl_save_LIBS"
15834 if test -n "$gl_have_pth"; then
15836 LIBTHREAD="$LIBPTH"
15837 LTLIBTHREAD="$LTLIBPTH"
15838 LIBMULTITHREAD="$LIBTHREAD"
15839 LTLIBMULTITHREAD="$LTLIBTHREAD"
15841 printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
15843 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15844 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15846 printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
15850 if test $gl_cv_linker_have_as_needed = yes; then
15851 if test $gl_cv_linker_have_push_state = yes; then
15852 LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
15854 LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
15857 # TODO: May need to modify LTLIBMULTITHREAD similarly.
15861 CPPFLAGS="$gl_save_CPPFLAGS"
15864 if test -z "$gl_have_pthread"; then
15865 case "$gl_use_threads" in
15866 yes | windows | win32) # The 'win32' is for backward compatibility.
15867 if { case "$host_os" in
15872 gl_threads_api=windows
15874 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15882 printf %s "checking for multithread API to use... " >&6; }
15883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15884 printf "%s\n" "$gl_threads_api" >&6; }
15895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
15896 printf %s "checking for a sed that does not truncate output... " >&6; }
15897 if test ${ac_cv_path_SED+y}
15899 printf %s "(cached) " >&6
15901 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15902 for ac_i in 1 2 3 4 5 6 7; do
15903 ac_script="$ac_script$as_nl$ac_script"
15905 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15906 { ac_script=; unset ac_script;}
15907 if test -z "$SED"; then
15908 ac_path_SED_found=false
15909 # Loop through the user's path and test for each of PROGNAME-LIST
15910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15911 for as_dir in $PATH
15914 case $as_dir in #(((
15917 *) as_dir=$as_dir/ ;;
15919 for ac_prog in sed gsed
15921 for ac_exec_ext in '' $ac_executable_extensions; do
15922 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
15923 as_fn_executable_p "$ac_path_SED" || continue
15924 # Check for GNU ac_path_SED and select it if it is found.
15925 # Check for GNU $ac_path_SED
15926 case `"$ac_path_SED" --version 2>&1` in
15928 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15931 printf %s 0123456789 >"conftest.in"
15934 cat "conftest.in" "conftest.in" >"conftest.tmp"
15935 mv "conftest.tmp" "conftest.in"
15936 cp "conftest.in" "conftest.nl"
15937 printf "%s\n" '' >> "conftest.nl"
15938 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15939 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15940 as_fn_arith $ac_count + 1 && ac_count=$as_val
15941 if test $ac_count -gt ${ac_path_SED_max-0}; then
15942 # Best one so far, save it but keep looking for a better one
15943 ac_cv_path_SED="$ac_path_SED"
15944 ac_path_SED_max=$ac_count
15946 # 10*(2^10) chars as input seems more than enough
15947 test $ac_count -gt 10 && break
15949 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15952 $ac_path_SED_found && break 3
15957 if test -z "$ac_cv_path_SED"; then
15958 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15961 ac_cv_path_SED=$SED
15965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15966 printf "%s\n" "$ac_cv_path_SED" >&6; }
15967 SED="$ac_cv_path_SED"
15970 # Autoupdate added the following line to ensure that your configure
15971 # script's behavior did not change. It is probably safe to remove.
15975 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
15976 if test "x$ac_cv_header_stdlib_h" = xyes
15978 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
15982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15983 printf %s "checking for GNU libc compatible malloc... " >&6; }
15984 if test ${ac_cv_func_malloc_0_nonnull+y}
15986 printf %s "(cached) " >&6
15988 if test "$cross_compiling" = yes
15991 # Guess yes on platforms where we know the result.
15992 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
15993 | hpux* | solaris* | cygwin* | mingw*)
15994 ac_cv_func_malloc_0_nonnull=yes ;;
15995 # If we don't know, assume the worst.
15996 *) ac_cv_func_malloc_0_nonnull=no ;;
16000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16001 /* end confdefs.h. */
16002 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16003 # include <stdlib.h>
16011 char *p = malloc (0);
16020 if ac_fn_c_try_run "$LINENO"
16022 ac_cv_func_malloc_0_nonnull=yes
16024 ac_cv_func_malloc_0_nonnull=no
16026 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16027 conftest.$ac_objext conftest.beam conftest.$ac_ext
16032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
16033 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
16034 if test $ac_cv_func_malloc_0_nonnull = yes
16036 gl_cv_func_malloc_0_nonnull=1
16038 gl_cv_func_malloc_0_nonnull=0
16042 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
16049 GNULIB_EXPLICIT_BZERO=0;
16056 GNULIB_RAWMEMCHR=0;
16059 GNULIB_STRCHRNUL=0;
16067 GNULIB_STRCASESTR=0;
16074 GNULIB_MBSCASECMP=0;
16075 GNULIB_MBSNCASECMP=0;
16076 GNULIB_MBSPCASECMP=0;
16077 GNULIB_MBSCASESTR=0;
16084 GNULIB_STRERROR_R=0;
16085 GNULIB_STRSIGNAL=0;
16086 GNULIB_STRVERSCMP=0;
16088 HAVE_EXPLICIT_BZERO=1;
16092 HAVE_DECL_MEMMEM=1;
16094 HAVE_DECL_MEMRCHR=1;
16099 HAVE_DECL_STRDUP=1;
16100 HAVE_DECL_STRNDUP=1;
16101 HAVE_DECL_STRNLEN=1;
16105 HAVE_DECL_STRTOK_R=1;
16106 HAVE_DECL_STRERROR_R=1;
16107 HAVE_DECL_STRSIGNAL=1;
16112 REPLACE_STRCHRNUL=0;
16118 REPLACE_STRCASESTR=0;
16119 REPLACE_STRTOK_R=0;
16120 REPLACE_STRERROR=0;
16121 REPLACE_STRERROR_R=0;
16122 REPLACE_STRSIGNAL=0;
16123 UNDEFINE_STRTOK_R=0;
16130 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16131 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16132 # irrelevant for anonymous mappings.
16133 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16134 if test "x$ac_cv_func_mmap" = xyes
16142 # Try to allow MAP_ANONYMOUS.
16143 gl_have_mmap_anonymous=no
16144 if test $gl_have_mmap = yes; then
16145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16146 printf %s "checking for MAP_ANONYMOUS... " >&6; }
16147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148 /* end confdefs.h. */
16150 #include <sys/mman.h>
16151 #ifdef MAP_ANONYMOUS
16152 I cannot identify this map
16156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16157 $EGREP "I cannot identify this map" >/dev/null 2>&1
16159 gl_have_mmap_anonymous=yes
16163 if test $gl_have_mmap_anonymous != yes; then
16164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16165 /* end confdefs.h. */
16167 #include <sys/mman.h>
16169 I cannot identify this map
16173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16174 $EGREP "I cannot identify this map" >/dev/null 2>&1
16177 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16179 gl_have_mmap_anonymous=yes
16184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16185 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
16186 if test $gl_have_mmap_anonymous = yes; then
16188 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16198 if test $HAVE_MEMCHR = 1; then
16199 # Detect platform-specific bugs in some versions of glibc:
16200 # memchr should not dereference anything with length 0
16201 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
16202 # memchr should not dereference overestimated length after a match
16203 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16204 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16205 # Assume that memchr works on platforms that lack mprotect.
16206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16207 printf %s "checking whether memchr works... " >&6; }
16208 if test ${gl_cv_func_memchr_works+y}
16210 printf %s "(cached) " >&6
16212 if test "$cross_compiling" = yes
16215 # Guess yes on native Windows.
16216 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
16217 # Be pessimistic for now.
16218 *) gl_cv_func_memchr_works="guessing no" ;;
16222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16223 /* end confdefs.h. */
16225 #include <string.h>
16226 #if HAVE_SYS_MMAN_H
16227 # include <fcntl.h>
16228 # include <unistd.h>
16229 # include <sys/types.h>
16230 # include <sys/mman.h>
16232 # define MAP_FILE 0
16241 char *fence = NULL;
16242 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16243 # if HAVE_MAP_ANONYMOUS
16244 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16246 # else /* !HAVE_MAP_ANONYMOUS */
16247 const int flags = MAP_FILE | MAP_PRIVATE;
16248 int fd = open ("/dev/zero", O_RDONLY, 0666);
16252 int pagesize = getpagesize ();
16254 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16256 if (two_pages != (char *)(-1)
16257 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16258 fence = two_pages + pagesize;
16263 if (memchr (fence, 0, 0))
16265 strcpy (fence - 9, "12345678");
16266 if (memchr (fence - 9, 0, 79) != fence - 1)
16268 if (memchr (fence - 1, 0, 3) != fence - 1)
16277 if ac_fn_c_try_run "$LINENO"
16279 gl_cv_func_memchr_works=yes
16281 gl_cv_func_memchr_works=no
16283 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16284 conftest.$ac_objext conftest.beam conftest.$ac_ext
16289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16290 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
16291 case "$gl_cv_func_memchr_works" in
16293 *) REPLACE_MEMCHR=1 ;;
16297 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16298 if test "x$ac_cv_have_decl_memrchr" = xyes
16305 printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
16311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16312 printf %s "checking for O_CLOEXEC... " >&6; }
16313 if test ${gl_cv_macro_O_CLOEXEC+y}
16315 printf %s "(cached) " >&6
16317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16318 /* end confdefs.h. */
16332 if ac_fn_c_try_compile "$LINENO"
16334 gl_cv_macro_O_CLOEXEC=yes
16336 gl_cv_macro_O_CLOEXEC=no
16338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16341 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
16345 REPLACE_STRERROR_0=0
16346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16347 printf %s "checking whether strerror(0) succeeds... " >&6; }
16348 if test ${gl_cv_func_strerror_0_works+y}
16350 printf %s "(cached) " >&6
16352 if test "$cross_compiling" = yes
16355 # Guess yes on glibc systems.
16356 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16357 # Guess yes on native Windows.
16358 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
16359 # If we don't know, assume the worst.
16360 *) gl_cv_func_strerror_0_works="guessing no" ;;
16364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16365 /* end confdefs.h. */
16366 #include <string.h>
16375 str = strerror (0);
16376 if (!*str) result |= 1;
16377 if (errno) result |= 2;
16378 if (strstr (str, "nknown") || strstr (str, "ndefined"))
16385 if ac_fn_c_try_run "$LINENO"
16387 gl_cv_func_strerror_0_works=yes
16389 gl_cv_func_strerror_0_works=no
16391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16392 conftest.$ac_objext conftest.beam conftest.$ac_ext
16397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16398 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
16399 case "$gl_cv_func_strerror_0_works" in
16402 REPLACE_STRERROR_0=1
16404 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
16415 if test $ac_cv_func_strerror_r = yes; then
16416 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16418 printf %s "checking for strerror_r with POSIX signature... " >&6; }
16419 if test ${gl_cv_func_strerror_r_posix_signature+y}
16421 printf %s "(cached) " >&6
16423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16424 /* end confdefs.h. */
16425 #include <string.h>
16426 int strerror_r (int, char *, size_t);
16436 if ac_fn_c_try_compile "$LINENO"
16438 gl_cv_func_strerror_r_posix_signature=yes
16440 gl_cv_func_strerror_r_posix_signature=no
16442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16446 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
16447 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16449 printf %s "checking whether strerror_r works... " >&6; }
16450 if test ${gl_cv_func_strerror_r_works+y}
16452 printf %s "(cached) " >&6
16454 if test "$cross_compiling" = yes
16459 aix*) gl_cv_func_strerror_r_works="guessing no";;
16460 # Guess no on HP-UX.
16461 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16462 # Guess no on BSD variants.
16463 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
16464 # Guess yes otherwise.
16465 *) gl_cv_func_strerror_r_works="guessing yes";;
16469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16470 /* end confdefs.h. */
16472 #include <string.h>
16479 if (strerror_r (EACCES, buf, 0) < 0)
16482 if (strerror_r (EACCES, buf, sizeof buf) != 0)
16484 strcpy (buf, "Unknown");
16485 if (strerror_r (0, buf, sizeof buf) != 0)
16489 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16493 if (strerror_r (-3, buf, sizeof buf) < 0)
16505 if ac_fn_c_try_run "$LINENO"
16507 gl_cv_func_strerror_r_works=yes
16509 gl_cv_func_strerror_r_works=no
16511 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16512 conftest.$ac_objext conftest.beam conftest.$ac_ext
16517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16518 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16521 if test $ac_cv_func___xpg_strerror_r = yes; then
16522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16523 printf %s "checking whether __xpg_strerror_r works... " >&6; }
16524 if test ${gl_cv_func_strerror_r_works+y}
16526 printf %s "(cached) " >&6
16528 if test "$cross_compiling" = yes
16530 gl_cv_func_strerror_r_works="guessing no"
16533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16534 /* end confdefs.h. */
16536 #include <string.h>
16541 int __xpg_strerror_r(int, char *, size_t);
16547 char buf[256] = "^";
16549 char *str = strerror (-1);
16550 strcpy (copy, str);
16551 if (__xpg_strerror_r (-2, buf, 1) == 0)
16555 __xpg_strerror_r (-2, buf, 256);
16556 if (strcmp (str, copy))
16564 if ac_fn_c_try_run "$LINENO"
16566 gl_cv_func_strerror_r_works=yes
16568 gl_cv_func_strerror_r_works=no
16570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16571 conftest.$ac_objext conftest.beam conftest.$ac_ext
16576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16577 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16590 if test $ac_cv_have_decl_strerror_r = no; then
16591 HAVE_DECL_STRERROR_R=0
16594 if test $ac_cv_func_strerror_r = yes; then
16595 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16596 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16597 case "$gl_cv_func_strerror_r_works" in
16598 *no) REPLACE_STRERROR_R=1 ;;
16601 REPLACE_STRERROR_R=1
16604 REPLACE_STRERROR_R=1
16623 gl_cv_func_vfprintf_posix=no
16624 case "$gl_cv_func_printf_sizes_c99" in
16626 case "$gl_cv_func_printf_long_double" in
16628 case "$gl_cv_func_printf_infinite" in
16630 case "$gl_cv_func_printf_infinite_long_double" in
16632 case "$gl_cv_func_printf_directive_a" in
16634 case "$gl_cv_func_printf_directive_f" in
16636 case "$gl_cv_func_printf_directive_n" in
16638 case "$gl_cv_func_printf_directive_ls" in
16640 case "$gl_cv_func_printf_positions" in
16642 case "$gl_cv_func_printf_flag_grouping" in
16644 case "$gl_cv_func_printf_flag_leftadjust" in
16646 case "$gl_cv_func_printf_flag_zero" in
16648 case "$gl_cv_func_printf_precision" in
16650 case "$gl_cv_func_printf_enomem" in
16652 # vfprintf exists and is
16653 # already POSIX compliant.
16654 gl_cv_func_vfprintf_posix=yes
16683 if test $gl_cv_func_vfprintf_posix = no; then
16687 case "$gl_cv_func_printf_infinite" in
16692 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
16700 case "$gl_cv_func_printf_long_double" in
16702 case "$gl_cv_func_printf_infinite_long_double" in
16707 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
16716 case "$gl_cv_func_printf_directive_a" in
16721 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
16723 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
16724 if test "x$ac_cv_func_nl_langinfo" = xyes
16726 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
16735 case "$gl_cv_func_printf_directive_f" in
16740 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
16747 case "$gl_cv_func_printf_directive_ls" in
16752 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
16759 case "$gl_cv_func_printf_flag_grouping" in
16764 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
16771 case "$gl_cv_func_printf_flag_leftadjust" in
16776 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
16783 case "$gl_cv_func_printf_flag_zero" in
16788 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
16795 case "$gl_cv_func_printf_precision" in
16800 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
16803 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
16806 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
16813 case "$gl_cv_func_printf_enomem" in
16818 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
16821 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
16824 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
16839 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
16849 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
16859 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
16869 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
16871 if test $ac_cv_func_vasnprintf = yes; then
16873 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
16887 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16888 if test "x$ac_cv_type_ptrdiff_t" = xyes
16893 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
16914 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
16918 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
16925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16926 /* end confdefs.h. */
16933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16934 $EGREP "MicrosoftCompiler" >/dev/null 2>&1
16937 gl_c_asm_opt='-c -Fa'
16950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
16951 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
16952 if test ${gl_cv_prog_as_underscore+y}
16954 printf %s "(cached) " >&6
16956 cat > conftest.c <<EOF
16958 extern "C" int foo (void);
16960 int foo(void) { return 0; }
16962 # Look for the assembly language name in the .s file.
16963 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16964 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16965 (eval $ac_try) 2>&5
16967 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16968 test $ac_status = 0; }; } >/dev/null 2>&1
16969 if LC_ALL=C $EGREP '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
16970 gl_cv_prog_as_underscore=yes
16972 gl_cv_prog_as_underscore=no
16977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16978 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
16979 if test $gl_cv_prog_as_underscore = yes; then
16980 USER_LABEL_PREFIX=_
16985 printf "%s\n" "#define USER_LABEL_PREFIX $USER_LABEL_PREFIX" >>confdefs.h
16987 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16991 GNULIB_PTHREAD_SIGMASK=0;
16993 GNULIB_SIGNAL_H_SIGPIPE=0;
16994 GNULIB_SIGPROCMASK=0;
16995 GNULIB_SIGACTION=0;
16996 HAVE_POSIX_SIGNALBLOCKING=1;
16997 HAVE_PTHREAD_SIGMASK=1;
17002 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
17004 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
17006 HAVE_SIGHANDLER_T=1;
17007 REPLACE_PTHREAD_SIGMASK=0;
17011 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
17012 #include <signal.h>
17013 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
17014 #include <sys/types.h>
17017 if test "x$ac_cv_type_sigset_t" = xyes
17020 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
17022 gl_cv_type_sigset_t=yes
17024 gl_cv_type_sigset_t=no
17027 if test $gl_cv_type_sigset_t != yes; then
17032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
17033 printf %s "checking for uid_t in sys/types.h... " >&6; }
17034 if test ${ac_cv_type_uid_t+y}
17036 printf %s "(cached) " >&6
17038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17039 /* end confdefs.h. */
17040 #include <sys/types.h>
17043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17044 $EGREP "uid_t" >/dev/null 2>&1
17046 ac_cv_type_uid_t=yes
17048 ac_cv_type_uid_t=no
17053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
17054 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
17055 if test $ac_cv_type_uid_t = no; then
17057 printf "%s\n" "#define uid_t int" >>confdefs.h
17060 printf "%s\n" "#define gid_t int" >>confdefs.h
17067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
17068 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
17069 if test ${ac_cv_header_stdbool_h+y}
17071 printf %s "(cached) " >&6
17073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17074 /* end confdefs.h. */
17076 #include <stdbool.h>
17081 typedef _Bool Bool;
17083 "error: bool is not defined"
17086 "error: false is not defined"
17089 "error: false is not 0"
17092 "error: true is not defined"
17095 "error: true is not 1"
17099 #ifndef __bool_true_false_are_defined
17100 "error: __bool_true_false_are_defined is not defined"
17103 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
17105 char a[true == 1 ? 1 : -1];
17106 char b[false == 0 ? 1 : -1];
17107 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
17108 char d[(bool) 0.5 == true ? 1 : -1];
17109 /* See body of main program for 'e'. */
17110 char f[(Bool) 0.0 == false ? 1 : -1];
17112 char h[sizeof (Bool)];
17113 char i[sizeof s.t];
17114 enum { j = false, k = true, l = false * true, m = true * 256 };
17115 /* The following fails for
17116 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
17118 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
17119 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
17120 /* Catch a bug in an HP-UX C compiler. See
17121 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
17122 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
17133 *pq |= q; *pq |= ! q;
17134 *qq |= q; *qq |= ! q;
17135 /* Refer to every declared value, to avoid compiler optimizations. */
17136 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
17137 + !m + !n + !o + !p + !q + !pq + !qq);
17143 if ac_fn_c_try_compile "$LINENO"
17145 ac_cv_header_stdbool_h=yes
17147 ac_cv_header_stdbool_h=no
17149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
17152 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
17153 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
17154 if test "x$ac_cv_type__Bool" = xyes
17157 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
17165 HAVE_MAX_ALIGN_T=1;
17175 if test $ac_cv_type_long_long_int = yes; then
17176 HAVE_LONG_LONG_INT=1
17178 HAVE_LONG_LONG_INT=0
17182 if test $ac_cv_type_unsigned_long_long_int = yes; then
17183 HAVE_UNSIGNED_LONG_LONG_INT=1
17185 HAVE_UNSIGNED_LONG_LONG_INT=0
17190 if test $ac_cv_header_wchar_h = yes; then
17197 if test $ac_cv_header_inttypes_h = yes; then
17204 if test $ac_cv_header_sys_types_h = yes; then
17220 if test $gl_cv_have_include_next = yes; then
17221 gl_cv_next_stdint_h='<'stdint.h'>'
17223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17224 printf %s "checking absolute name of <stdint.h>... " >&6; }
17225 if test ${gl_cv_next_stdint_h+y}
17227 printf %s "(cached) " >&6
17230 if test $ac_cv_header_stdint_h = yes; then
17235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17236 /* end confdefs.h. */
17237 #include <stdint.h>
17240 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17241 *) gl_absname_cpp="$ac_cpp" ;;
17246 gl_dirsep_regex='[/\\]'
17249 gl_dirsep_regex='\/'
17252 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17253 gl_header_literal_regex=`echo 'stdint.h' \
17254 | sed -e "$gl_make_literal_regex_sed"`
17255 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17256 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17262 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17263 sed -n "$gl_absolute_header_sed"`
17265 gl_header=$gl_cv_absolute_stdint_h
17266 gl_cv_next_stdint_h='"'$gl_header'"'
17268 gl_cv_next_stdint_h='<'stdint.h'>'
17273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17274 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
17276 NEXT_STDINT_H=$gl_cv_next_stdint_h
17278 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17279 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17280 gl_next_as_first_directive='<'stdint.h'>'
17282 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17283 gl_next_as_first_directive=$gl_cv_next_stdint_h
17285 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
17290 if test $ac_cv_header_stdint_h = yes; then
17297 if test $ac_cv_header_stdint_h = yes; then
17298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17299 printf %s "checking whether stdint.h conforms to C99... " >&6; }
17300 if test ${gl_cv_header_working_stdint_h+y}
17302 printf %s "(cached) " >&6
17304 gl_cv_header_working_stdint_h=no
17305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17306 /* end confdefs.h. */
17309 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17310 #define __STDC_CONSTANT_MACROS 1
17311 #define __STDC_LIMIT_MACROS 1
17312 #include <stdint.h>
17313 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
17314 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
17315 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17319 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17320 included before <wchar.h>. */
17321 #include <stddef.h>
17322 #include <signal.h>
17324 # include <stdio.h>
17326 # include <wchar.h>
17331 int8_t a1 = INT8_MAX;
17332 int8_t a1min = INT8_MIN;
17335 int16_t a2 = INT16_MAX;
17336 int16_t a2min = INT16_MIN;
17339 int32_t a3 = INT32_MAX;
17340 int32_t a3min = INT32_MIN;
17343 int64_t a4 = INT64_MAX;
17344 int64_t a4min = INT64_MIN;
17347 uint8_t b1 = UINT8_MAX;
17349 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17352 uint16_t b2 = UINT16_MAX;
17355 uint32_t b3 = UINT32_MAX;
17358 uint64_t b4 = UINT64_MAX;
17360 int_least8_t c1 = INT8_C (0x7f);
17361 int_least8_t c1max = INT_LEAST8_MAX;
17362 int_least8_t c1min = INT_LEAST8_MIN;
17363 int_least16_t c2 = INT16_C (0x7fff);
17364 int_least16_t c2max = INT_LEAST16_MAX;
17365 int_least16_t c2min = INT_LEAST16_MIN;
17366 int_least32_t c3 = INT32_C (0x7fffffff);
17367 int_least32_t c3max = INT_LEAST32_MAX;
17368 int_least32_t c3min = INT_LEAST32_MIN;
17369 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17370 int_least64_t c4max = INT_LEAST64_MAX;
17371 int_least64_t c4min = INT_LEAST64_MIN;
17372 uint_least8_t d1 = UINT8_C (0xff);
17373 uint_least8_t d1max = UINT_LEAST8_MAX;
17374 uint_least16_t d2 = UINT16_C (0xffff);
17375 uint_least16_t d2max = UINT_LEAST16_MAX;
17376 uint_least32_t d3 = UINT32_C (0xffffffff);
17377 uint_least32_t d3max = UINT_LEAST32_MAX;
17378 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17379 uint_least64_t d4max = UINT_LEAST64_MAX;
17380 int_fast8_t e1 = INT_FAST8_MAX;
17381 int_fast8_t e1min = INT_FAST8_MIN;
17382 int_fast16_t e2 = INT_FAST16_MAX;
17383 int_fast16_t e2min = INT_FAST16_MIN;
17384 int_fast32_t e3 = INT_FAST32_MAX;
17385 int_fast32_t e3min = INT_FAST32_MIN;
17386 int_fast64_t e4 = INT_FAST64_MAX;
17387 int_fast64_t e4min = INT_FAST64_MIN;
17388 uint_fast8_t f1 = UINT_FAST8_MAX;
17389 uint_fast16_t f2 = UINT_FAST16_MAX;
17390 uint_fast32_t f3 = UINT_FAST32_MAX;
17391 uint_fast64_t f4 = UINT_FAST64_MAX;
17393 intptr_t g = INTPTR_MAX;
17394 intptr_t gmin = INTPTR_MIN;
17397 uintptr_t h = UINTPTR_MAX;
17399 intmax_t i = INTMAX_MAX;
17400 uintmax_t j = UINTMAX_MAX;
17402 /* Check that SIZE_MAX has the correct type, if possible. */
17403 #if 201112 <= __STDC_VERSION__
17404 int k = _Generic (SIZE_MAX, size_t: 0);
17405 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
17406 || (0x5110 <= __SUNPRO_C && !__STDC__))
17408 extern __typeof__ (SIZE_MAX) k;
17411 #include <limits.h> /* for CHAR_BIT */
17412 #define TYPE_MINIMUM(t) \
17413 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17414 #define TYPE_MAXIMUM(t) \
17415 ((t) ((t) 0 < (t) -1 \
17417 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17420 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17421 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17423 /* Detect bug in FreeBSD 6.0 / ia64. */
17424 int check_SIG_ATOMIC:
17425 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17426 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17428 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17430 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17431 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17433 /* Detect bug in mingw. */
17435 WINT_MIN == TYPE_MINIMUM (wint_t)
17436 && WINT_MAX == TYPE_MAXIMUM (wint_t)
17439 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
17441 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17442 int check_UINT16_C:
17443 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
17445 /* Detect bugs in OpenBSD 3.9 stdint.h. */
17447 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
17450 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17453 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17456 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17458 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17459 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17460 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17461 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17462 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17463 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17464 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17465 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17466 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17467 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17468 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17479 if ac_fn_c_try_compile "$LINENO"
17481 if test "$cross_compiling" = yes
17484 # Guess yes on native Windows.
17485 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
17486 # In general, assume it works.
17487 *) gl_cv_header_working_stdint_h="guessing yes" ;;
17491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17492 /* end confdefs.h. */
17495 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17496 #define __STDC_CONSTANT_MACROS 1
17497 #define __STDC_LIMIT_MACROS 1
17498 #include <stdint.h>
17501 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17502 included before <wchar.h>. */
17503 #include <stddef.h>
17504 #include <signal.h>
17506 # include <stdio.h>
17508 # include <wchar.h>
17513 #include <string.h>
17514 #define MVAL(macro) MVAL1(macro)
17515 #define MVAL1(expression) #expression
17516 static const char *macro_values[] =
17550 for (mv = macro_values; *mv != NULL; mv++)
17552 const char *value = *mv;
17553 /* Test whether it looks like a cast expression. */
17554 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17555 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17556 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17557 || strncmp (value, "((int)"/*)*/, 6) == 0
17558 || strncmp (value, "((signed short)"/*)*/, 15) == 0
17559 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17560 return mv - macro_values + 1;
17568 if ac_fn_c_try_run "$LINENO"
17570 gl_cv_header_working_stdint_h=yes
17572 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17573 conftest.$ac_objext conftest.beam conftest.$ac_ext
17578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17582 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
17585 HAVE_C99_STDINT_H=0
17586 HAVE_SYS_BITYPES_H=0
17587 HAVE_SYS_INTTYPES_H=0
17589 case "$gl_cv_header_working_stdint_h" in
17591 HAVE_C99_STDINT_H=1
17592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
17593 printf %s "checking whether stdint.h predates C++11... " >&6; }
17594 if test ${gl_cv_header_stdint_predates_cxx11_h+y}
17596 printf %s "(cached) " >&6
17598 gl_cv_header_stdint_predates_cxx11_h=yes
17599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17600 /* end confdefs.h. */
17603 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17604 #include <stdint.h>
17607 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17608 included before <wchar.h>. */
17609 #include <stddef.h>
17610 #include <signal.h>
17612 # include <stdio.h>
17614 # include <wchar.h>
17618 intmax_t im = INTMAX_MAX;
17619 int32_t i32 = INT32_C (0x7fffffff);
17629 if ac_fn_c_try_compile "$LINENO"
17631 gl_cv_header_stdint_predates_cxx11_h=no
17633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
17636 printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
17638 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
17640 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
17643 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
17646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
17647 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
17648 if test ${gl_cv_header_stdint_width+y}
17650 printf %s "(cached) " >&6
17652 gl_cv_header_stdint_width=no
17653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17654 /* end confdefs.h. */
17656 /* Work if build is not clean. */
17657 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
17658 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17659 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17661 #include <stdint.h>
17663 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17664 included before <wchar.h>. */
17665 #include <stddef.h>
17666 #include <signal.h>
17668 # include <stdio.h>
17670 # include <wchar.h>
17673 int iw = UINTMAX_WIDTH;
17683 if ac_fn_c_try_compile "$LINENO"
17685 gl_cv_header_stdint_width=yes
17687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
17690 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
17691 if test "$gl_cv_header_stdint_width" = yes; then
17696 ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
17697 if test "x$ac_cv_header_sys_inttypes_h" = xyes
17699 printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
17702 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
17703 if test "x$ac_cv_header_sys_bitypes_h" = xyes
17705 printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
17709 if test $ac_cv_header_sys_inttypes_h = yes; then
17710 HAVE_SYS_INTTYPES_H=1
17712 if test $ac_cv_header_sys_bitypes_h = yes; then
17713 HAVE_SYS_BITYPES_H=1
17717 if test $APPLE_UNIVERSAL_BUILD = 0; then
17720 for gltype in ptrdiff_t size_t ; do
17721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17722 printf %s "checking for bit size of $gltype... " >&6; }
17723 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17725 printf %s "(cached) " >&6
17727 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17728 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17729 included before <wchar.h>. */
17730 #include <stddef.h>
17731 #include <signal.h>
17733 # include <stdio.h>
17735 # include <wchar.h>
17738 #include <limits.h>"
17745 eval gl_cv_bitsizeof_${gltype}=\$result
17748 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17750 printf "%s\n" "$ac_res" >&6; }
17751 eval result=\$gl_cv_bitsizeof_${gltype}
17752 if test $result = unknown; then
17755 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17756 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17758 eval BITSIZEOF_${GLTYPE}=\$result
17765 for gltype in sig_atomic_t wchar_t wint_t ; do
17766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17767 printf %s "checking for bit size of $gltype... " >&6; }
17768 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17770 printf %s "(cached) " >&6
17772 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17773 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17774 included before <wchar.h>. */
17775 #include <stddef.h>
17776 #include <signal.h>
17778 # include <stdio.h>
17780 # include <wchar.h>
17783 #include <limits.h>"
17790 eval gl_cv_bitsizeof_${gltype}=\$result
17793 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17795 printf "%s\n" "$ac_res" >&6; }
17796 eval result=\$gl_cv_bitsizeof_${gltype}
17797 if test $result = unknown; then
17800 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17801 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17803 eval BITSIZEOF_${GLTYPE}=\$result
17809 for gltype in sig_atomic_t wchar_t wint_t ; do
17810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17811 printf %s "checking whether $gltype is signed... " >&6; }
17812 if eval test \${gl_cv_type_${gltype}_signed+y}
17814 printf %s "(cached) " >&6
17816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17817 /* end confdefs.h. */
17819 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17820 included before <wchar.h>. */
17821 #include <stddef.h>
17822 #include <signal.h>
17824 # include <stdio.h>
17826 # include <wchar.h>
17829 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
17838 if ac_fn_c_try_compile "$LINENO"
17844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17845 eval gl_cv_type_${gltype}_signed=\$result
17848 eval ac_res=\$gl_cv_type_${gltype}_signed
17849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17850 printf "%s\n" "$ac_res" >&6; }
17851 eval result=\$gl_cv_type_${gltype}_signed
17852 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17853 if test "$result" = yes; then
17854 printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
17856 eval HAVE_SIGNED_${GLTYPE}=1
17858 eval HAVE_SIGNED_${GLTYPE}=0
17863 gl_cv_type_ptrdiff_t_signed=yes
17864 gl_cv_type_size_t_signed=no
17865 if test $APPLE_UNIVERSAL_BUILD = 0; then
17868 for gltype in ptrdiff_t size_t ; do
17869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17870 printf %s "checking for $gltype integer literal suffix... " >&6; }
17871 if eval test \${gl_cv_type_${gltype}_suffix+y}
17873 printf %s "(cached) " >&6
17875 eval gl_cv_type_${gltype}_suffix=no
17876 eval result=\$gl_cv_type_${gltype}_signed
17877 if test "$result" = yes; then
17882 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17884 '') gltype1='int';;
17885 l) gltype1='long int';;
17886 ll) gltype1='long long int';;
17887 i64) gltype1='__int64';;
17888 u) gltype1='unsigned int';;
17889 ul) gltype1='unsigned long int';;
17890 ull) gltype1='unsigned long long int';;
17891 ui64)gltype1='unsigned __int64';;
17893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17894 /* end confdefs.h. */
17896 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17897 included before <wchar.h>. */
17898 #include <stddef.h>
17899 #include <signal.h>
17901 # include <stdio.h>
17903 # include <wchar.h>
17906 extern $gltype foo;
17907 extern $gltype1 foo;
17916 if ac_fn_c_try_compile "$LINENO"
17918 eval gl_cv_type_${gltype}_suffix=\$glsuf
17920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17921 eval result=\$gl_cv_type_${gltype}_suffix
17922 test "$result" != no && break
17925 eval ac_res=\$gl_cv_type_${gltype}_suffix
17926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17927 printf "%s\n" "$ac_res" >&6; }
17928 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17929 eval result=\$gl_cv_type_${gltype}_suffix
17930 test "$result" = no && result=
17931 eval ${GLTYPE}_SUFFIX=\$result
17932 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
17940 for gltype in sig_atomic_t wchar_t wint_t ; do
17941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17942 printf %s "checking for $gltype integer literal suffix... " >&6; }
17943 if eval test \${gl_cv_type_${gltype}_suffix+y}
17945 printf %s "(cached) " >&6
17947 eval gl_cv_type_${gltype}_suffix=no
17948 eval result=\$gl_cv_type_${gltype}_signed
17949 if test "$result" = yes; then
17954 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17956 '') gltype1='int';;
17957 l) gltype1='long int';;
17958 ll) gltype1='long long int';;
17959 i64) gltype1='__int64';;
17960 u) gltype1='unsigned int';;
17961 ul) gltype1='unsigned long int';;
17962 ull) gltype1='unsigned long long int';;
17963 ui64)gltype1='unsigned __int64';;
17965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17966 /* end confdefs.h. */
17968 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17969 included before <wchar.h>. */
17970 #include <stddef.h>
17971 #include <signal.h>
17973 # include <stdio.h>
17975 # include <wchar.h>
17978 extern $gltype foo;
17979 extern $gltype1 foo;
17988 if ac_fn_c_try_compile "$LINENO"
17990 eval gl_cv_type_${gltype}_suffix=\$glsuf
17992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17993 eval result=\$gl_cv_type_${gltype}_suffix
17994 test "$result" != no && break
17997 eval ac_res=\$gl_cv_type_${gltype}_suffix
17998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17999 printf "%s\n" "$ac_res" >&6; }
18000 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18001 eval result=\$gl_cv_type_${gltype}_suffix
18002 test "$result" = no && result=
18003 eval ${GLTYPE}_SUFFIX=\$result
18004 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
18010 if test $GNULIB_OVERRIDES_WINT_T = 1; then
18011 BITSIZEOF_WINT_T=32
18019 LIMITS_H='limits.h'
18020 if test -n "$LIMITS_H"; then
18021 GL_GENERATE_LIMITS_H_TRUE=
18022 GL_GENERATE_LIMITS_H_FALSE='#'
18024 GL_GENERATE_LIMITS_H_TRUE='#'
18025 GL_GENERATE_LIMITS_H_FALSE=
18034 if test -n "$STDINT_H"; then
18035 GL_GENERATE_STDINT_H_TRUE=
18036 GL_GENERATE_STDINT_H_FALSE='#'
18038 GL_GENERATE_STDINT_H_TRUE='#'
18039 GL_GENERATE_STDINT_H_FALSE=
18044 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
18045 if test "x$ac_cv_have_decl_strdup" = xyes
18052 printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
18066 if test $gl_cv_have_include_next = yes; then
18067 gl_cv_next_string_h='<'string.h'>'
18069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
18070 printf %s "checking absolute name of <string.h>... " >&6; }
18071 if test ${gl_cv_next_string_h+y}
18073 printf %s "(cached) " >&6
18078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18079 /* end confdefs.h. */
18080 #include <string.h>
18083 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18084 *) gl_absname_cpp="$ac_cpp" ;;
18089 gl_dirsep_regex='[/\\]'
18092 gl_dirsep_regex='\/'
18095 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18096 gl_header_literal_regex=`echo 'string.h' \
18097 | sed -e "$gl_make_literal_regex_sed"`
18098 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18099 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18105 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18106 sed -n "$gl_absolute_header_sed"`
18108 gl_header=$gl_cv_absolute_string_h
18109 gl_cv_next_string_h='"'$gl_header'"'
18113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
18114 printf "%s\n" "$gl_cv_next_string_h" >&6; }
18116 NEXT_STRING_H=$gl_cv_next_string_h
18118 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18119 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18120 gl_next_as_first_directive='<'string.h'>'
18122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18123 gl_next_as_first_directive=$gl_cv_next_string_h
18125 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
18135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
18136 printf %s "checking for struct timespec in <time.h>... " >&6; }
18137 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
18139 printf %s "(cached) " >&6
18141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18142 /* end confdefs.h. */
18148 static struct timespec x; x.tv_sec = x.tv_nsec;
18153 if ac_fn_c_try_compile "$LINENO"
18155 gl_cv_sys_struct_timespec_in_time_h=yes
18157 gl_cv_sys_struct_timespec_in_time_h=no
18159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
18162 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
18164 TIME_H_DEFINES_STRUCT_TIMESPEC=0
18165 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
18166 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
18167 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
18168 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
18169 TIME_H_DEFINES_STRUCT_TIMESPEC=1
18171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
18172 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
18173 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
18175 printf %s "(cached) " >&6
18177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18178 /* end confdefs.h. */
18179 #include <sys/time.h>
18184 static struct timespec x; x.tv_sec = x.tv_nsec;
18189 if ac_fn_c_try_compile "$LINENO"
18191 gl_cv_sys_struct_timespec_in_sys_time_h=yes
18193 gl_cv_sys_struct_timespec_in_sys_time_h=no
18195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
18198 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
18199 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
18200 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
18202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
18203 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
18204 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
18206 printf %s "(cached) " >&6
18208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18209 /* end confdefs.h. */
18210 #include <pthread.h>
18215 static struct timespec x; x.tv_sec = x.tv_nsec;
18220 if ac_fn_c_try_compile "$LINENO"
18222 gl_cv_sys_struct_timespec_in_pthread_h=yes
18224 gl_cv_sys_struct_timespec_in_pthread_h=no
18226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
18229 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
18230 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
18231 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
18233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
18234 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
18235 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
18237 printf %s "(cached) " >&6
18239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18240 /* end confdefs.h. */
18241 #include <unistd.h>
18246 static struct timespec x; x.tv_sec = x.tv_nsec;
18251 if ac_fn_c_try_compile "$LINENO"
18253 gl_cv_sys_struct_timespec_in_unistd_h=yes
18255 gl_cv_sys_struct_timespec_in_unistd_h=no
18257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
18260 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
18261 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
18262 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
18283 if test $gl_cv_have_include_next = yes; then
18284 gl_cv_next_time_h='<'time.h'>'
18286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
18287 printf %s "checking absolute name of <time.h>... " >&6; }
18288 if test ${gl_cv_next_time_h+y}
18290 printf %s "(cached) " >&6
18295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18296 /* end confdefs.h. */
18300 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18301 *) gl_absname_cpp="$ac_cpp" ;;
18306 gl_dirsep_regex='[/\\]'
18309 gl_dirsep_regex='\/'
18312 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18313 gl_header_literal_regex=`echo 'time.h' \
18314 | sed -e "$gl_make_literal_regex_sed"`
18315 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18316 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18322 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18323 sed -n "$gl_absolute_header_sed"`
18325 gl_header=$gl_cv_absolute_time_h
18326 gl_cv_next_time_h='"'$gl_header'"'
18330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
18331 printf "%s\n" "$gl_cv_next_time_h" >&6; }
18333 NEXT_TIME_H=$gl_cv_next_time_h
18335 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18336 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18337 gl_next_as_first_directive='<'time.h'>'
18339 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18340 gl_next_as_first_directive=$gl_cv_next_time_h
18342 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
18359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
18360 printf %s "checking whether the utimes function works... " >&6; }
18361 if test ${gl_cv_func_working_utimes+y}
18363 printf %s "(cached) " >&6
18365 if test "$cross_compiling" = yes
18368 # Guess no on native Windows.
18369 mingw*) gl_cv_func_working_utimes="guessing no" ;;
18370 *) gl_cv_func_working_utimes="guessing no" ;;
18374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18375 /* end confdefs.h. */
18377 #include <sys/types.h>
18378 #include <sys/stat.h>
18380 #include <sys/time.h>
18382 #include <unistd.h>
18383 #include <stdlib.h>
18389 inorder (time_t a, time_t b, time_t c)
18391 return a <= b && b <= c;
18398 char const *file = "conftest.utimes";
18399 /* On OS/2, file timestamps must be on or after 1980 in local time,
18400 with an even number of seconds. */
18401 static struct timeval timeval[2] = {{315620000 + 10, 10},
18402 {315620000 + 1000000, 999998}};
18404 /* Test whether utimes() essentially works. */
18407 FILE *f = fopen (file, "w");
18410 else if (fclose (f) != 0)
18412 else if (utimes (file, timeval) != 0)
18414 else if (lstat (file, &sbuf) != 0)
18416 else if (!(sbuf.st_atime == timeval[0].tv_sec
18417 && sbuf.st_mtime == timeval[1].tv_sec))
18419 if (unlink (file) != 0)
18423 /* Test whether utimes() with a NULL argument sets the file's timestamp
18424 to the current time. Use 'fstat' as well as 'time' to
18425 determine the "current" time, to accommodate NFS file systems
18426 if there is a time skew between the host and the NFS server. */
18428 int fd = open (file, O_WRONLY|O_CREAT, 0644);
18434 struct stat st0, st1, st2;
18435 if (time (&t0) == (time_t) -1)
18437 else if (fstat (fd, &st0) != 0)
18439 else if (utimes (file, timeval) != 0
18440 && (errno != EACCES
18441 /* OS/2 kLIBC utimes fails on opened files. */
18443 || utimes (file, timeval) != 0
18444 || (fd = open (file, O_WRONLY)) < 0))
18446 else if (utimes (file, NULL) != 0
18447 && (errno != EACCES
18448 /* OS/2 kLIBC utimes fails on opened files. */
18450 || utimes (file, NULL) != 0
18451 || (fd = open (file, O_WRONLY)) < 0))
18453 else if (fstat (fd, &st1) != 0)
18455 else if (write (fd, "\n", 1) != 1)
18457 else if (fstat (fd, &st2) != 0)
18459 else if (time (&t2) == (time_t) -1)
18463 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
18464 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
18465 if (! (st1.st_atime == st1.st_mtime))
18467 if (! (m_ok_POSIX || m_ok_NFS))
18470 if (close (fd) != 0)
18473 if (unlink (file) != 0)
18477 /* Test whether utimes() with a NULL argument works on read-only files. */
18479 int fd = open (file, O_WRONLY|O_CREAT, 0444);
18482 else if (close (fd) != 0)
18484 else if (utimes (file, NULL) != 0)
18486 if (unlink (file) != 0)
18494 if ac_fn_c_try_run "$LINENO"
18496 gl_cv_func_working_utimes=yes
18498 gl_cv_func_working_utimes=no
18500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18501 conftest.$ac_objext conftest.beam conftest.$ac_ext
18506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
18507 printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
18509 case "$gl_cv_func_working_utimes" in
18512 printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
18528 GNULIB_MBSRTOWCS=0;
18529 GNULIB_MBSNRTOWCS=0;
18531 GNULIB_WCSRTOMBS=0;
18532 GNULIB_WCSNRTOMBS=0;
18549 GNULIB_WCSCASECMP=0;
18550 GNULIB_WCSNCASECMP=0;
18588 HAVE_WCSNCASECMP=1;
18602 HAVE_DECL_WCWIDTH=1;
18603 REPLACE_MBSTATE_T=0;
18609 REPLACE_MBSRTOWCS=0;
18610 REPLACE_MBSNRTOWCS=0;
18612 REPLACE_WCSRTOMBS=0;
18613 REPLACE_WCSNRTOMBS=0;
18615 REPLACE_WCSWIDTH=0;
18616 REPLACE_WCSFTIME=0;
18619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
18620 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
18621 if test ${gl_cv_header_wchar_h_correct_inline+y}
18623 printf %s "(cached) " >&6
18625 gl_cv_header_wchar_h_correct_inline=yes
18626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18627 /* end confdefs.h. */
18629 #define wcstod renamed_wcstod
18630 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18632 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18633 included before <wchar.h>. */
18634 #include <stddef.h>
18638 extern int zero (void);
18639 int main () { return zero(); }
18642 save_ac_compile="$ac_compile"
18643 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
18644 if echo '#include "conftest.c"' >conftest1.c &&
18645 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18646 (eval $ac_compile) 2>&5
18648 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18649 test $ac_status = 0; }; then
18650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18651 /* end confdefs.h. */
18653 #define wcstod renamed_wcstod
18654 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18656 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18657 included before <wchar.h>. */
18658 #include <stddef.h>
18662 int zero (void) { return 0; }
18665 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
18666 if echo '#include "conftest.c"' >conftest2.c &&
18667 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18668 (eval $ac_compile) 2>&5
18670 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18671 test $ac_status = 0; }; then
18672 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
18675 gl_cv_header_wchar_h_correct_inline=no
18679 ac_compile="$save_ac_compile"
18680 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
18683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
18684 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
18685 if test $gl_cv_header_wchar_h_correct_inline = no; then
18686 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
18687 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
18688 C99 mode. You have four options:
18689 - Add the flag -fgnu89-inline to CC and reconfigure, or
18690 - Fix your include files, using parts of
18691 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
18692 - Use a gcc version older than 4.3, or
18693 - Don't use the flags -std=c99 or -std=gnu99.
18694 Configuration aborted." "$LINENO" 5
18700 if test $ac_cv_header_crtdefs_h = yes; then
18708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t" >&5
18709 printf %s "checking for 64-bit time_t... " >&6; }
18710 if test ${gl_cv_type_time_t_64+y}
18712 printf %s "(cached) " >&6
18714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18715 /* end confdefs.h. */
18717 int verify_time_t_size[sizeof (time_t) >= 8 ? 1 : -1];
18727 if ac_fn_c_try_compile "$LINENO"
18729 gl_cv_type_time_t_64=yes
18731 gl_cv_type_time_t_64=no
18733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_64" >&5
18737 printf "%s\n" "$gl_cv_type_time_t_64" >&6; }
18738 if test $gl_cv_type_time_t_64 = no; then
18739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18740 /* end confdefs.h. */
18741 #ifdef _USE_32BIT_TIME_T
18748 if ac_fn_c_try_compile "$LINENO"
18750 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18751 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18752 as_fn_error $? "This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.
18753 See \`config.log' for more details" "$LINENO" 5; }
18755 # If TIME_T_32_BIT_OK is "no" (the default) and not cross-compiling
18756 # and 'touch' works with a large timestamp, then evidently 64-bit time_t
18757 # is desired and supported, so fail and ask the builder to fix the
18758 # problem. Otherwise, just warn the builder.
18759 if test "${TIME_T_32_BIT_OK-no}" = no \
18760 && test $cross_compiling = no \
18761 && TZ=UTC0 touch -t 210602070628.16 conftest.time 2>/dev/null; then
18762 rm -f conftest.time
18763 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18764 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18765 as_fn_error $? "This package requires a 64-bit 'time_t' type, which your system appears to support. You might try configuring with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'. To build with a 32-bit time_t anyway (not recommended), configure with 'TIME_T_32_BIT_OK=yes'.
18766 See \`config.log' for more details" "$LINENO" 5; }
18768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&5
18769 printf "%s\n" "$as_me: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&2;}
18773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18778 GL_COND_LIBTOOL_TRUE=
18779 GL_COND_LIBTOOL_FALSE='#'
18781 GL_COND_LIBTOOL_TRUE='#'
18782 GL_COND_LIBTOOL_FALSE=
18785 gl_cond_libtool=false
18798 gl_source_base='lib'
18801 if test $ac_cv_func_alloca_works = no; then
18805 # Define an additional variable used in the Makefile substitution.
18806 if test $ac_cv_working_alloca_h = yes; then
18807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
18808 printf %s "checking for alloca as a compiler built-in... " >&6; }
18809 if test ${gl_cv_rpl_alloca+y}
18811 printf %s "(cached) " >&6
18814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18815 /* end confdefs.h. */
18817 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
18822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18823 $EGREP "Need own alloca" >/dev/null 2>&1
18825 gl_cv_rpl_alloca=yes
18827 gl_cv_rpl_alloca=no
18833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
18834 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
18835 if test $gl_cv_rpl_alloca = yes; then
18837 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
18847 if test -n "$ALLOCA_H"; then
18848 GL_GENERATE_ALLOCA_H_TRUE=
18849 GL_GENERATE_ALLOCA_H_FALSE='#'
18851 GL_GENERATE_ALLOCA_H_TRUE='#'
18852 GL_GENERATE_ALLOCA_H_FALSE=
18864 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
18869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
18870 printf %s "checking for GNU libc compatible calloc... " >&6; }
18871 if test ${ac_cv_func_calloc_0_nonnull+y}
18873 printf %s "(cached) " >&6
18875 if test "$cross_compiling" = yes
18878 # Guess yes on glibc systems.
18879 *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
18880 # Guess yes on native Windows.
18881 mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
18882 # If we don't know, assume the worst.
18883 *) ac_cv_func_calloc_0_nonnull="guessing no" ;;
18887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18888 /* end confdefs.h. */
18889 $ac_includes_default
18894 char *p = calloc (0, 0);
18898 p = calloc ((size_t) -1 / 8 + 1, 8);
18908 if ac_fn_c_try_run "$LINENO"
18910 ac_cv_func_calloc_0_nonnull=yes
18912 ac_cv_func_calloc_0_nonnull=no
18914 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18915 conftest.$ac_objext conftest.beam conftest.$ac_ext
18919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
18920 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
18921 case "$ac_cv_func_calloc_0_nonnull" in
18924 printf "%s\n" "#define HAVE_CALLOC_GNU 1" >>confdefs.h
18928 printf "%s\n" "#define HAVE_CALLOC_GNU 0" >>confdefs.h
18936 if test $REPLACE_CALLOC = 1; then
18945 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
18950 printf "%s\n" "#define GNULIB_CALLOC_GNU 1" >>confdefs.h
18956 if test $gl_cv_func_malloc_posix = yes; then
18958 printf "%s\n" "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
18964 if test $REPLACE_CALLOC = 1; then
18973 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
18981 GNULIB_CALLOC_POSIX=1
18987 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
19002 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
19008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
19009 printf %s "checking whether this system has an arbitrary file name length limit... " >&6; }
19010 if test ${gl_cv_have_arbitrary_file_name_length_limit+y}
19012 printf %s "(cached) " >&6
19014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19015 /* end confdefs.h. */
19017 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19019 # include <unistd.h>
19021 #include <limits.h>
19022 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19023 # include <sys/param.h>
19025 #if !defined PATH_MAX && defined MAXPATHLEN
19026 # define PATH_MAX MAXPATHLEN
19030 # define PATH_MAX 1024
19032 #if defined _WIN32 && ! defined __CYGWIN__
19034 # define PATH_MAX 260
19038 have_arbitrary_file_name_length_limit
19041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19042 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
19044 gl_cv_have_arbitrary_file_name_length_limit=yes
19046 gl_cv_have_arbitrary_file_name_length_limit=no
19051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
19052 printf "%s\n" "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
19054 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
19063 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
19070 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
19071 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
19073 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
19074 # programs in the package would end up linked with that potentially-shared
19075 # library, inducing unnecessary run-time overhead.
19078 gl_saved_libs=$LIBS
19079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19080 printf %s "checking for library containing clock_gettime... " >&6; }
19081 if test ${ac_cv_search_clock_gettime+y}
19083 printf %s "(cached) " >&6
19085 ac_func_search_save_LIBS=$LIBS
19086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19087 /* end confdefs.h. */
19089 /* Override any GCC internal prototype to avoid an error.
19090 Use char because int might match the return type of a GCC
19091 builtin and then its argument prototype would still apply. */
19095 char clock_gettime ();
19099 return clock_gettime ();
19104 for ac_lib in '' rt posix4
19106 if test -z "$ac_lib"; then
19107 ac_res="none required"
19110 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19112 if ac_fn_c_try_link "$LINENO"
19114 ac_cv_search_clock_gettime=$ac_res
19116 rm -f core conftest.err conftest.$ac_objext \
19118 if test ${ac_cv_search_clock_gettime+y}
19123 if test ${ac_cv_search_clock_gettime+y}
19127 ac_cv_search_clock_gettime=no
19129 rm conftest.$ac_ext
19130 LIBS=$ac_func_search_save_LIBS
19132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19133 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
19134 ac_res=$ac_cv_search_clock_gettime
19135 if test "$ac_res" != no
19137 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19138 test "$ac_cv_search_clock_gettime" = "none required" ||
19139 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
19142 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
19143 if test "x$ac_cv_func_clock_gettime" = xyes
19145 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
19148 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
19149 if test "x$ac_cv_func_clock_settime" = xyes
19151 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
19155 LIBS=$gl_saved_libs
19159 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
19166 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19175 if test $ac_cv_header_sys_socket_h != yes; then
19176 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19177 if test "x$ac_cv_header_winsock2_h" = xyes
19179 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19184 if test "$ac_cv_header_winsock2_h" = yes; then
19186 UNISTD_H_HAVE_WINSOCK2_H=1
19187 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19193 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
19198 if test $REPLACE_CLOSE = 0; then
19202 if test $ac_cv_func_fchdir = no; then
19206 if test $HAVE_FCHDIR = 0; then
19212 if test $REPLACE_CLOSE = 1; then
19221 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
19235 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
19242 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
19243 if test "x$ac_cv_func_closedir" = xyes
19245 printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
19249 if test $ac_cv_func_closedir = no; then
19256 if test $ac_cv_func_fchdir = no; then
19260 if test $HAVE_FCHDIR = 0; then
19261 if test $HAVE_CLOSEDIR = 1; then
19266 case $host_os,$HAVE_CLOSEDIR in
19268 REPLACE_CLOSEDIR=1;;
19271 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
19280 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
19294 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
19310 if test $gl_cv_have_include_next = yes; then
19311 gl_cv_next_dirent_h='<'dirent.h'>'
19313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
19314 printf %s "checking absolute name of <dirent.h>... " >&6; }
19315 if test ${gl_cv_next_dirent_h+y}
19317 printf %s "(cached) " >&6
19320 if test $ac_cv_header_dirent_h = yes; then
19325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19326 /* end confdefs.h. */
19327 #include <dirent.h>
19330 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19331 *) gl_absname_cpp="$ac_cpp" ;;
19336 gl_dirsep_regex='[/\\]'
19339 gl_dirsep_regex='\/'
19342 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19343 gl_header_literal_regex=`echo 'dirent.h' \
19344 | sed -e "$gl_make_literal_regex_sed"`
19345 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19346 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19352 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19353 sed -n "$gl_absolute_header_sed"`
19355 gl_header=$gl_cv_absolute_dirent_h
19356 gl_cv_next_dirent_h='"'$gl_header'"'
19358 gl_cv_next_dirent_h='<'dirent.h'>'
19363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
19364 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
19366 NEXT_DIRENT_H=$gl_cv_next_dirent_h
19368 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19369 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19370 gl_next_as_first_directive='<'dirent.h'>'
19372 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19373 gl_next_as_first_directive=$gl_cv_next_dirent_h
19375 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
19380 if test $ac_cv_header_dirent_h = yes; then
19394 printf "%s\n" "#define GNULIB_DIRENT_SAFER 1" >>confdefs.h
19402 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
19403 if test "x$ac_cv_func_dirfd" = xyes
19405 printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
19409 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
19410 #include <dirent.h>
19412 if test "x$ac_cv_have_decl_dirfd" = xyes
19419 printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
19421 if test $ac_cv_have_decl_dirfd = no; then
19425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
19426 printf %s "checking whether dirfd is a macro... " >&6; }
19427 if test ${gl_cv_func_dirfd_macro+y}
19429 printf %s "(cached) " >&6
19431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19432 /* end confdefs.h. */
19434 #include <sys/types.h>
19435 #include <dirent.h>
19437 dirent_header_defines_dirfd
19440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19441 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
19443 gl_cv_func_dirfd_macro=yes
19445 gl_cv_func_dirfd_macro=no
19450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
19451 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
19453 # Use the replacement if we have no function or macro with that name,
19454 # or if OS/2 kLIBC whose dirfd() does not work.
19455 # Replace only if the system declares dirfd already.
19456 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
19457 no,no,*,yes | *,*,os2*,yes)
19460 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
19464 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
19465 || test $REPLACE_DIRFD = 1; then
19474 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
19477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
19478 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
19479 if test ${gl_cv_sys_dir_fd_member_name+y}
19481 printf %s "(cached) " >&6
19484 dirfd_save_CFLAGS=$CFLAGS
19485 for ac_expr in d_fd dd_fd; do
19487 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
19488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19489 /* end confdefs.h. */
19491 #include <sys/types.h>
19492 #include <dirent.h>
19496 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
19501 if ac_fn_c_try_compile "$LINENO"
19506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19507 CFLAGS=$dirfd_save_CFLAGS
19508 test "$dir_fd_found" = yes && break
19510 test "$dir_fd_found" = yes || ac_expr=no_such_member
19512 gl_cv_sys_dir_fd_member_name=$ac_expr
19516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
19517 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
19518 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
19520 printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
19537 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
19547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
19548 printf %s "checking whether // is distinct from /... " >&6; }
19549 if test ${gl_cv_double_slash_root+y}
19551 printf %s "(cached) " >&6
19553 if test x"$cross_compiling" = xyes ; then
19554 # When cross-compiling, there is no way to tell whether // is special
19555 # short of a list of hosts. However, the only known hosts to date
19556 # that have a distinct // are Apollo DomainOS (too old to port to),
19557 # Cygwin, and z/OS. If anyone knows of another system for which // has
19558 # special semantics and is distinct from /, please report it to
19559 # <bug-gnulib@gnu.org>.
19561 *-cygwin | i370-ibm-openedition)
19562 gl_cv_double_slash_root=yes ;;
19564 # Be optimistic and assume that / and // are the same when we
19566 gl_cv_double_slash_root='unknown, assuming no' ;;
19569 set x `ls -di / // 2>/dev/null`
19570 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
19571 gl_cv_double_slash_root=no
19573 gl_cv_double_slash_root=yes
19577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
19578 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
19579 if test "$gl_cv_double_slash_root" = yes; then
19581 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
19589 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19597 if test $ac_cv_func_fchdir = no; then
19601 if test $HAVE_FCHDIR = 0; then
19605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
19606 printf %s "checking whether dup works... " >&6; }
19607 if test ${gl_cv_func_dup_works+y}
19609 printf %s "(cached) " >&6
19611 if test "$cross_compiling" = yes
19614 # Guess no on native Windows.
19615 mingw*) gl_cv_func_dup_works="guessing no" ;;
19616 *) gl_cv_func_dup_works="guessing yes" ;;
19620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19621 /* end confdefs.h. */
19622 #include <unistd.h>
19628 /* On OS/2 kLIBC, dup does not work on a directory fd. */
19629 int fd = open (".", O_RDONLY);
19630 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
19637 if ac_fn_c_try_run "$LINENO"
19639 gl_cv_func_dup_works=yes
19641 gl_cv_func_dup_works=no
19643 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19644 conftest.$ac_objext conftest.beam conftest.$ac_ext
19649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
19650 printf "%s\n" "$gl_cv_func_dup_works" >&6; }
19651 case "$gl_cv_func_dup_works" in
19658 if test $REPLACE_DUP = 1; then
19667 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
19682 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
19691 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
19694 if test $HAVE_DUP2 = 1; then
19695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19696 printf %s "checking whether dup2 works... " >&6; }
19697 if test ${gl_cv_func_dup2_works+y}
19699 printf %s "(cached) " >&6
19701 if test "$cross_compiling" = yes
19704 mingw*) # on this platform, dup2 always returns 0 for success
19705 gl_cv_func_dup2_works="guessing no" ;;
19706 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19707 gl_cv_func_dup2_works="guessing no" ;;
19709 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
19711 gl_cv_func_dup2_works="guessing no" ;;
19712 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19713 gl_cv_func_dup2_works="guessing no" ;;
19714 *-android*) # implemented using dup3(), which fails if oldfd == newfd
19715 gl_cv_func_dup2_works="guessing no" ;;
19716 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
19717 gl_cv_func_dup2_works="guessing no" ;;
19718 *) gl_cv_func_dup2_works="guessing yes" ;;
19721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19722 /* end confdefs.h. */
19726 #include <limits.h>
19727 #include <sys/resource.h>
19728 #include <unistd.h>
19729 #ifndef RLIM_SAVED_CUR
19730 # define RLIM_SAVED_CUR RLIM_INFINITY
19732 #ifndef RLIM_SAVED_MAX
19733 # define RLIM_SAVED_MAX RLIM_INFINITY
19740 int bad_fd = INT_MAX;
19741 struct rlimit rlim;
19742 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19743 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19744 && rlim.rlim_cur != RLIM_INFINITY
19745 && rlim.rlim_cur != RLIM_SAVED_MAX
19746 && rlim.rlim_cur != RLIM_SAVED_CUR)
19747 bad_fd = rlim.rlim_cur;
19749 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19752 if (dup2 (1, 1) != 1)
19755 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19759 if (dup2 (0, 0) != -1)
19761 /* Many gnulib modules require POSIX conformance of EBADF. */
19762 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
19764 /* Flush out some cygwin core dumps. */
19765 if (dup2 (2, -1) != -1 || errno != EBADF)
19769 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
19771 int fd = open (".", O_RDONLY);
19774 else if (dup2 (fd, fd + 1) == -1)
19785 if ac_fn_c_try_run "$LINENO"
19787 gl_cv_func_dup2_works=yes
19789 gl_cv_func_dup2_works=no
19791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19792 conftest.$ac_objext conftest.beam conftest.$ac_ext
19797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19798 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
19799 case "$gl_cv_func_dup2_works" in
19803 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
19804 if test "x$ac_cv_func_setdtablesize" = xyes
19806 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
19817 if test $ac_cv_func_fchdir = no; then
19821 if test $HAVE_FCHDIR = 0; then
19822 if test $HAVE_DUP2 = 1; then
19828 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
19837 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
19852 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
19858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
19859 printf %s "checking for error_at_line... " >&6; }
19860 if test ${ac_cv_lib_error_at_line+y}
19862 printf %s "(cached) " >&6
19864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19865 /* end confdefs.h. */
19870 error_at_line (0, 0, "", 0, "an error occurred");
19875 if ac_fn_c_try_link "$LINENO"
19877 ac_cv_lib_error_at_line=yes
19879 ac_cv_lib_error_at_line=no
19881 rm -f core conftest.err conftest.$ac_objext \
19882 conftest$ac_exeext conftest.$ac_ext
19884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
19885 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
19887 if test $ac_cv_lib_error_at_line = no; then
19896 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
19905 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
19909 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
19917 if test $ac_cv_have_decl_fchdir = no; then
19922 if test $HAVE_FCHDIR = 0; then
19931 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
19935 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
19937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
19938 printf %s "checking whether open can visit directories... " >&6; }
19939 if test ${gl_cv_func_open_directory_works+y}
19941 printf %s "(cached) " >&6
19943 if test "$cross_compiling" = yes
19946 # Guess yes on Linux systems.
19947 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
19948 # Guess yes on glibc systems.
19949 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
19950 # Guess no on native Windows.
19951 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
19952 # If we don't know, assume the worst.
19953 *) gl_cv_func_open_directory_works="guessing no" ;;
19957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19958 /* end confdefs.h. */
19964 return open(".", O_RDONLY) < 0;
19969 if ac_fn_c_try_run "$LINENO"
19971 gl_cv_func_open_directory_works=yes
19973 gl_cv_func_open_directory_works=no
19975 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19976 conftest.$ac_objext conftest.beam conftest.$ac_ext
19980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
19981 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
19982 case "$gl_cv_func_open_directory_works" in
19986 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
20003 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
20013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20014 printf %s "checking whether fflush works on input streams... " >&6; }
20015 if test ${gl_cv_func_fflush_stdin+y}
20017 printf %s "(cached) " >&6
20019 echo hello world > conftest.txt
20020 if test "$cross_compiling" = yes
20023 # Guess no on native Windows.
20024 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
20025 *) gl_cv_func_fflush_stdin=cross ;;
20029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20030 /* end confdefs.h. */
20034 # include <unistd.h>
20035 #else /* on Windows with MSVC */
20042 FILE *f = fopen ("conftest.txt", "r");
20049 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20050 { fclose (f); return 2; }
20051 /* For deterministic results, ensure f read a bigger buffer. */
20052 if (lseek (fd, 0, SEEK_CUR) == 5)
20053 { fclose (f); return 3; }
20054 /* POSIX requires fflush-fseek to set file offset of fd. This fails
20055 on BSD systems and on mingw. */
20056 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20057 { fclose (f); return 4; }
20058 if (lseek (fd, 0, SEEK_CUR) != 5)
20059 { fclose (f); return 5; }
20060 /* Verify behaviour of fflush after ungetc. See
20061 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
20062 /* Verify behaviour of fflush after a backup ungetc. This fails on
20067 if (fgetc (f) != c)
20068 { fclose (f); return 6; }
20069 /* Verify behaviour of fflush after a non-backup ungetc. This fails
20070 on glibc 2.8 and on BSD systems. */
20074 if (fgetc (f) != c)
20075 { fclose (f); return 7; }
20083 if ac_fn_c_try_run "$LINENO"
20085 gl_cv_func_fflush_stdin=yes
20087 gl_cv_func_fflush_stdin=no
20089 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20090 conftest.$ac_objext conftest.beam conftest.$ac_ext
20096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20097 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
20098 case "$gl_cv_func_fflush_stdin" in
20099 *yes) gl_func_fflush_stdin=1 ;;
20100 *no) gl_func_fflush_stdin=0 ;;
20101 *) gl_func_fflush_stdin='(-1)' ;;
20104 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
20107 case "$gl_cv_func_fflush_stdin" in
20109 *) REPLACE_FCLOSE=1 ;;
20113 if test $REPLACE_CLOSE = 1; then
20118 openedition) REPLACE_FCLOSE=1 ;;
20121 if test $REPLACE_FCLOSE = 1; then
20130 gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
20144 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
20153 if test $ac_cv_func_fcntl = no; then
20157 if test $ac_cv_func_fcntl = no; then
20164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
20165 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
20166 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
20168 printf %s "(cached) " >&6
20170 if test "$cross_compiling" = yes
20173 aix* | cygwin* | haiku*)
20174 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
20175 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
20178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20179 /* end confdefs.h. */
20182 #include <limits.h>
20183 #include <sys/resource.h>
20184 #include <unistd.h>
20185 #ifndef RLIM_SAVED_CUR
20186 # define RLIM_SAVED_CUR RLIM_INFINITY
20188 #ifndef RLIM_SAVED_MAX
20189 # define RLIM_SAVED_MAX RLIM_INFINITY
20196 int bad_fd = INT_MAX;
20197 struct rlimit rlim;
20198 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
20199 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
20200 && rlim.rlim_cur != RLIM_INFINITY
20201 && rlim.rlim_cur != RLIM_SAVED_MAX
20202 && rlim.rlim_cur != RLIM_SAVED_CUR)
20203 bad_fd = rlim.rlim_cur;
20204 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
20205 if (errno != EINVAL) result |= 2;
20206 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
20207 if (errno != EINVAL) result |= 8;
20208 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
20211 fd = open (".", O_RDONLY);
20214 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
20224 if ac_fn_c_try_run "$LINENO"
20226 gl_cv_func_fcntl_f_dupfd_works=yes
20228 gl_cv_func_fcntl_f_dupfd_works=no
20230 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20231 conftest.$ac_objext conftest.beam conftest.$ac_ext
20235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
20236 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
20237 case $gl_cv_func_fcntl_f_dupfd_works in
20242 if test $ac_cv_func_fcntl = no; then
20249 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
20253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
20254 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
20255 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
20257 printf %s "(cached) " >&6
20259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20260 /* end confdefs.h. */
20263 #ifndef F_DUPFD_CLOEXEC
20275 if ac_fn_c_try_compile "$LINENO"
20277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20278 /* end confdefs.h. */
20281 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
20282 it to support the semantics on older kernels that failed with EINVAL. */
20294 if ac_fn_c_try_compile "$LINENO"
20296 gl_cv_func_fcntl_f_dupfd_cloexec=yes
20298 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
20300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20302 gl_cv_func_fcntl_f_dupfd_cloexec=no
20304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
20307 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
20308 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
20312 if test $ac_cv_func_fcntl = no; then
20324 if test $ac_cv_func_fchdir = no; then
20328 if test $HAVE_FCHDIR = 0; then
20332 if test $ac_cv_func_fcntl = no; then
20341 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
20350 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20364 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
20379 if test $gl_cv_have_include_next = yes; then
20380 gl_cv_next_fcntl_h='<'fcntl.h'>'
20382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20383 printf %s "checking absolute name of <fcntl.h>... " >&6; }
20384 if test ${gl_cv_next_fcntl_h+y}
20386 printf %s "(cached) " >&6
20391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20392 /* end confdefs.h. */
20396 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20397 *) gl_absname_cpp="$ac_cpp" ;;
20402 gl_dirsep_regex='[/\\]'
20405 gl_dirsep_regex='\/'
20408 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20409 gl_header_literal_regex=`echo 'fcntl.h' \
20410 | sed -e "$gl_make_literal_regex_sed"`
20411 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20412 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20418 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20419 sed -n "$gl_absolute_header_sed"`
20421 gl_header=$gl_cv_absolute_fcntl_h
20422 gl_cv_next_fcntl_h='"'$gl_header'"'
20426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20427 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
20429 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20431 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20432 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20433 gl_next_as_first_directive='<'fcntl.h'>'
20435 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20436 gl_next_as_first_directive=$gl_cv_next_fcntl_h
20438 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20455 printf "%s\n" "#define GNULIB_FCNTL_SAFER 1" >>confdefs.h
20460 printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
20470 if test $ac_cv_have_decl_fdatasync = no; then
20471 HAVE_DECL_FDATASYNC=0
20472 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
20473 if test "x$ac_cv_func_fdatasync" = xyes
20475 printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
20479 if test $ac_cv_func_fdatasync = no; then
20483 gl_saved_libs=$LIBS
20484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
20485 printf %s "checking for library containing fdatasync... " >&6; }
20486 if test ${ac_cv_search_fdatasync+y}
20488 printf %s "(cached) " >&6
20490 ac_func_search_save_LIBS=$LIBS
20491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20492 /* end confdefs.h. */
20494 /* Override any GCC internal prototype to avoid an error.
20495 Use char because int might match the return type of a GCC
20496 builtin and then its argument prototype would still apply. */
20504 return fdatasync ();
20509 for ac_lib in '' rt posix4
20511 if test -z "$ac_lib"; then
20512 ac_res="none required"
20515 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20517 if ac_fn_c_try_link "$LINENO"
20519 ac_cv_search_fdatasync=$ac_res
20521 rm -f core conftest.err conftest.$ac_objext \
20523 if test ${ac_cv_search_fdatasync+y}
20528 if test ${ac_cv_search_fdatasync+y}
20532 ac_cv_search_fdatasync=no
20534 rm conftest.$ac_ext
20535 LIBS=$ac_func_search_save_LIBS
20537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
20538 printf "%s\n" "$ac_cv_search_fdatasync" >&6; }
20539 ac_res=$ac_cv_search_fdatasync
20540 if test "$ac_res" != no
20542 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20543 test "$ac_cv_search_fdatasync" = "none required" ||
20544 LIB_FDATASYNC=$ac_cv_search_fdatasync
20547 LIBS=$gl_saved_libs
20550 if test $HAVE_FDATASYNC = 0; then
20559 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
20573 printf "%s\n" "#define GNULIB_TEST_FDATASYNC 1" >>confdefs.h
20582 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
20583 #include <dirent.h>
20586 if test "x$ac_cv_have_decl_fdopendir" = xyes
20593 printf "%s\n" "#define HAVE_DECL_FDOPENDIR $ac_have_decl" >>confdefs.h
20594 if test $ac_have_decl = 1
20598 HAVE_DECL_FDOPENDIR=0
20602 if test $ac_cv_func_fdopendir = no; then
20605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
20606 printf %s "checking whether fdopendir works... " >&6; }
20607 if test ${gl_cv_func_fdopendir_works+y}
20609 printf %s "(cached) " >&6
20611 if test "$cross_compiling" = yes
20614 # Guess yes on glibc systems.
20615 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
20616 # If we don't know, assume the worst.
20617 *) gl_cv_func_fdopendir_works="guessing no" ;;
20621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20622 /* end confdefs.h. */
20624 #include <dirent.h>
20626 #include <unistd.h>
20627 #if !HAVE_DECL_FDOPENDIR
20629 # ifdef __cplusplus
20632 DIR *fdopendir (int);
20639 int fd = open ("conftest.c", O_RDONLY);
20640 if (fd < 0) result |= 1;
20641 if (fdopendir (fd)) result |= 2;
20642 if (close (fd)) result |= 4;
20648 if ac_fn_c_try_run "$LINENO"
20650 gl_cv_func_fdopendir_works=yes
20652 gl_cv_func_fdopendir_works=no
20654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20655 conftest.$ac_objext conftest.beam conftest.$ac_ext
20659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
20660 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
20661 case "$gl_cv_func_fdopendir_works" in
20664 REPLACE_FDOPENDIR=1
20669 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
20678 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
20692 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
20698 printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h
20705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20706 printf %s "checking whether fflush works on input streams... " >&6; }
20707 if test ${gl_cv_func_fflush_stdin+y}
20709 printf %s "(cached) " >&6
20711 echo hello world > conftest.txt
20712 if test "$cross_compiling" = yes
20715 # Guess no on native Windows.
20716 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
20717 *) gl_cv_func_fflush_stdin=cross ;;
20721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20722 /* end confdefs.h. */
20726 # include <unistd.h>
20727 #else /* on Windows with MSVC */
20734 FILE *f = fopen ("conftest.txt", "r");
20741 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20742 { fclose (f); return 2; }
20743 /* For deterministic results, ensure f read a bigger buffer. */
20744 if (lseek (fd, 0, SEEK_CUR) == 5)
20745 { fclose (f); return 3; }
20746 /* POSIX requires fflush-fseek to set file offset of fd. This fails
20747 on BSD systems and on mingw. */
20748 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20749 { fclose (f); return 4; }
20750 if (lseek (fd, 0, SEEK_CUR) != 5)
20751 { fclose (f); return 5; }
20752 /* Verify behaviour of fflush after ungetc. See
20753 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
20754 /* Verify behaviour of fflush after a backup ungetc. This fails on
20759 if (fgetc (f) != c)
20760 { fclose (f); return 6; }
20761 /* Verify behaviour of fflush after a non-backup ungetc. This fails
20762 on glibc 2.8 and on BSD systems. */
20766 if (fgetc (f) != c)
20767 { fclose (f); return 7; }
20775 if ac_fn_c_try_run "$LINENO"
20777 gl_cv_func_fflush_stdin=yes
20779 gl_cv_func_fflush_stdin=no
20781 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20782 conftest.$ac_objext conftest.beam conftest.$ac_ext
20788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20789 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
20790 case "$gl_cv_func_fflush_stdin" in
20791 *yes) gl_func_fflush_stdin=1 ;;
20792 *no) gl_func_fflush_stdin=0 ;;
20793 *) gl_func_fflush_stdin='(-1)' ;;
20796 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
20799 case "$gl_cv_func_fflush_stdin" in
20801 *) REPLACE_FFLUSH=1 ;;
20804 if test $REPLACE_FFLUSH = 1; then
20813 gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
20819 printf "%s\n" "#define GNULIB_FFLUSH 1" >>confdefs.h
20833 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
20844 REPLACE_FLOAT_LDBL=0
20846 aix* | beos* | openbsd* | mirbsd* | irix*)
20849 freebsd* | dragonfly*)
20850 case "$host_cpu" in
20855 # On x86_64 systems, the C compiler may still be generating
20857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20858 /* end confdefs.h. */
20859 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
20866 if ac_fn_c_try_compile "$LINENO"
20872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20877 case "$host_cpu" in
20885 aix* | freebsd* | dragonfly* | linux*)
20886 if test -n "$FLOAT_H"; then
20887 REPLACE_FLOAT_LDBL=1
20893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20894 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
20895 if test ${gl_cv_func_itold_works+y}
20897 printf %s "(cached) " >&6
20900 if test "$cross_compiling" = yes
20904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20905 /* end confdefs.h. */
20906 #if defined __LP64__ || defined __arch64__
20913 if ac_fn_c_try_compile "$LINENO"
20915 gl_cv_func_itold_works="guessing no"
20917 gl_cv_func_itold_works="guessing yes"
20919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20921 # Guess yes on native Windows.
20922 mingw*) gl_cv_func_itold_works="guessing yes" ;;
20923 *) gl_cv_func_itold_works="guessing yes" ;;
20927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20928 /* end confdefs.h. */
20931 volatile long double ld;
20940 if ac_fn_c_try_run "$LINENO"
20942 gl_cv_func_itold_works=yes
20944 gl_cv_func_itold_works=no
20946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20947 conftest.$ac_objext conftest.beam conftest.$ac_ext
20952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20953 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
20954 case "$gl_cv_func_itold_works" in
20961 if test -n "$FLOAT_H"; then
20970 if test $gl_cv_have_include_next = yes; then
20971 gl_cv_next_float_h='<'float.h'>'
20973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20974 printf %s "checking absolute name of <float.h>... " >&6; }
20975 if test ${gl_cv_next_float_h+y}
20977 printf %s "(cached) " >&6
20982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20983 /* end confdefs.h. */
20987 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20988 *) gl_absname_cpp="$ac_cpp" ;;
20993 gl_dirsep_regex='[/\\]'
20996 gl_dirsep_regex='\/'
20999 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21000 gl_header_literal_regex=`echo 'float.h' \
21001 | sed -e "$gl_make_literal_regex_sed"`
21002 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21003 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21009 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21010 sed -n "$gl_absolute_header_sed"`
21012 gl_header=$gl_cv_absolute_float_h
21013 gl_cv_next_float_h='"'$gl_header'"'
21017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
21018 printf "%s\n" "$gl_cv_next_float_h" >&6; }
21020 NEXT_FLOAT_H=$gl_cv_next_float_h
21022 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21023 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21024 gl_next_as_first_directive='<'float.h'>'
21026 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21027 gl_next_as_first_directive=$gl_cv_next_float_h
21029 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
21036 if test -n "$FLOAT_H"; then
21037 GL_GENERATE_FLOAT_H_TRUE=
21038 GL_GENERATE_FLOAT_H_FALSE='#'
21040 GL_GENERATE_FLOAT_H_TRUE='#'
21041 GL_GENERATE_FLOAT_H_FALSE=
21046 if test $REPLACE_FLOAT_LDBL = 1; then
21055 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
21058 if test $REPLACE_ITOLD = 1; then
21067 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
21085 gl_cv_func_fprintf_posix=no
21086 case "$gl_cv_func_printf_sizes_c99" in
21088 case "$gl_cv_func_printf_long_double" in
21090 case "$gl_cv_func_printf_infinite" in
21092 case "$gl_cv_func_printf_infinite_long_double" in
21094 case "$gl_cv_func_printf_directive_a" in
21096 case "$gl_cv_func_printf_directive_f" in
21098 case "$gl_cv_func_printf_directive_n" in
21100 case "$gl_cv_func_printf_directive_ls" in
21102 case "$gl_cv_func_printf_positions" in
21104 case "$gl_cv_func_printf_flag_grouping" in
21106 case "$gl_cv_func_printf_flag_leftadjust" in
21108 case "$gl_cv_func_printf_flag_zero" in
21110 case "$gl_cv_func_printf_precision" in
21112 case "$gl_cv_func_printf_enomem" in
21114 # fprintf exists and is
21115 # already POSIX compliant.
21116 gl_cv_func_fprintf_posix=yes
21145 if test $gl_cv_func_fprintf_posix = no; then
21149 case "$gl_cv_func_printf_infinite" in
21154 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
21162 case "$gl_cv_func_printf_long_double" in
21164 case "$gl_cv_func_printf_infinite_long_double" in
21169 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
21178 case "$gl_cv_func_printf_directive_a" in
21183 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
21185 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
21186 if test "x$ac_cv_func_nl_langinfo" = xyes
21188 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
21197 case "$gl_cv_func_printf_directive_f" in
21202 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
21209 case "$gl_cv_func_printf_directive_ls" in
21214 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
21221 case "$gl_cv_func_printf_flag_grouping" in
21226 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
21233 case "$gl_cv_func_printf_flag_leftadjust" in
21238 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
21245 case "$gl_cv_func_printf_flag_zero" in
21250 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
21257 case "$gl_cv_func_printf_precision" in
21262 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
21265 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
21268 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
21275 case "$gl_cv_func_printf_enomem" in
21280 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
21283 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
21286 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
21301 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
21311 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
21321 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
21331 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
21333 if test $ac_cv_func_vasnprintf = yes; then
21335 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
21349 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
21350 if test "x$ac_cv_type_ptrdiff_t" = xyes
21355 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
21376 gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
21380 printf "%s\n" "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
21391 GNULIB_FPRINTF_POSIX=1
21397 printf "%s\n" "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
21405 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
21407 if test "x$ac_cv_have_decl_fpurge" = xyes
21414 printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
21416 if test "x$ac_cv_func_fpurge" = xyes; then
21418 # Detect BSD bug. Only cygwin 1.7 is known to be immune.
21419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
21420 printf %s "checking whether fpurge works... " >&6; }
21421 if test ${gl_cv_func_fpurge_works+y}
21423 printf %s "(cached) " >&6
21425 if test "$cross_compiling" = yes
21427 gl_cv_func_fpurge_works='guessing no'
21429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21430 /* end confdefs.h. */
21436 FILE *f = fopen ("conftest.txt", "w+");
21439 if (fputc ('a', f) != 'a')
21440 { fclose (f); return 2; }
21442 if (fgetc (f) != 'a')
21443 { fclose (f); return 3; }
21444 if (fgetc (f) != EOF)
21445 { fclose (f); return 4; }
21446 if (fpurge (f) != 0)
21447 { fclose (f); return 5; }
21448 if (putc ('b', f) != 'b')
21449 { fclose (f); return 6; }
21450 if (fclose (f) != 0)
21452 if ((f = fopen ("conftest.txt", "r")) == NULL)
21454 if (fgetc (f) != 'a')
21455 { fclose (f); return 9; }
21456 if (fgetc (f) != 'b')
21457 { fclose (f); return 10; }
21458 if (fgetc (f) != EOF)
21459 { fclose (f); return 11; }
21460 if (fclose (f) != 0)
21462 if (remove ("conftest.txt") != 0)
21470 if ac_fn_c_try_run "$LINENO"
21472 gl_cv_func_fpurge_works=yes
21474 gl_cv_func_fpurge_works=no
21476 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21477 conftest.$ac_objext conftest.beam conftest.$ac_ext
21481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
21482 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
21483 if test "x$gl_cv_func_fpurge_works" != xyes; then
21489 if test "x$ac_cv_have_decl_fpurge" = xno; then
21493 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
21502 gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
21516 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
21526 if test $gl_cv_func_frexp_no_libm = yes; then
21530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
21531 printf %s "checking whether frexp works... " >&6; }
21532 if test ${gl_cv_func_frexp_works+y}
21534 printf %s "(cached) " >&6
21537 if test "$cross_compiling" = yes
21540 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
21541 mingw*) # Guess yes with MSVC, no with mingw.
21542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21543 /* end confdefs.h. */
21550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21551 $EGREP "Good" >/dev/null 2>&1
21553 gl_cv_func_frexp_works="guessing yes"
21555 gl_cv_func_frexp_works="guessing no"
21560 *) gl_cv_func_frexp_works="guessing yes" ;;
21564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21565 /* end confdefs.h. */
21569 #include <string.h>
21570 #if HAVE_DECL_ALARM
21571 # include <signal.h>
21572 # include <unistd.h>
21574 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
21575 ICC 10.0 has a bug when optimizing the expression -zero.
21576 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
21577 to PowerPC on Mac OS X 10.5. */
21578 #if defined __hpux || defined __sgi || defined __ICC
21580 compute_minus_zero (void)
21582 return -DBL_MIN * DBL_MIN;
21584 # define minus_zero compute_minus_zero ()
21586 double minus_zero = -0.0;
21594 #if HAVE_DECL_ALARM
21595 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
21596 number. Let the test fail in this case. */
21597 signal (SIGALRM, SIG_DFL);
21600 /* Test on denormalized numbers. */
21601 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
21606 double y = frexp (x, &exp);
21607 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
21608 On NetBSD: y = 0.75. Correct: y = 0.5. */
21612 /* Test on infinite numbers. */
21616 double y = frexp (x, &exp);
21620 /* Test on negative zero. */
21624 double y = frexp (x, &exp);
21625 if (memcmp (&y, &x, sizeof x))
21631 if ac_fn_c_try_run "$LINENO"
21633 gl_cv_func_frexp_works=yes
21635 gl_cv_func_frexp_works=no
21637 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21638 conftest.$ac_objext conftest.beam conftest.$ac_ext
21643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
21644 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
21646 case "$gl_cv_func_frexp_works" in
21647 *yes) gl_func_frexp_no_libm=yes ;;
21648 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
21651 gl_func_frexp_no_libm=no
21654 if test $gl_func_frexp_no_libm = yes; then
21656 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
21660 if test $gl_func_frexp_no_libm != yes; then
21669 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
21683 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
21690 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
21692 if test "x$ac_cv_have_decl_frexpl" = xyes
21699 if test $HAVE_DECL_FREXPL = 1; then
21701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
21702 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
21703 if test ${gl_cv_func_frexpl_no_libm+y}
21705 printf %s "(cached) " >&6
21708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21709 /* end confdefs.h. */
21715 int e; return frexpl (x, &e) > 0;
21720 if ac_fn_c_try_link "$LINENO"
21722 gl_cv_func_frexpl_no_libm=yes
21724 gl_cv_func_frexpl_no_libm=no
21726 rm -f core conftest.err conftest.$ac_objext \
21727 conftest$ac_exeext conftest.$ac_ext
21730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
21731 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
21733 if test $gl_cv_func_frexpl_no_libm = yes; then
21736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
21737 printf %s "checking whether frexpl works... " >&6; }
21738 if test ${gl_cv_func_frexpl_works+y}
21740 printf %s "(cached) " >&6
21743 if test "$cross_compiling" = yes
21747 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
21748 gl_cv_func_frexpl_works="guessing no";;
21749 *) gl_cv_func_frexpl_works="guessing yes";;
21753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21754 /* end confdefs.h. */
21758 /* Override the values of <float.h>, like done in float.in.h. */
21759 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
21760 # undef LDBL_MIN_EXP
21761 # define LDBL_MIN_EXP (-16381)
21763 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
21764 # undef LDBL_MIN_EXP
21765 # define LDBL_MIN_EXP (-16381)
21767 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
21768 # undef LDBL_MIN_EXP
21769 # define LDBL_MIN_EXP DBL_MIN_EXP
21771 #if defined __sgi && (LDBL_MANT_DIG >= 106)
21772 # if defined __GNUC__
21773 # undef LDBL_MIN_EXP
21774 # define LDBL_MIN_EXP DBL_MIN_EXP
21781 long double frexpl (long double, int *);
21785 volatile long double x;
21786 /* Test on finite numbers that fails on AIX 5.1. */
21794 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
21795 function returns an invalid (incorrectly normalized) value: it returns
21796 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
21797 but the correct result is
21798 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
21802 long double y = frexpl (x, &exp);
21803 if (!(exp == 1 && y == 0.505L))
21806 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
21807 LDBL_MAX_EXP = 16384.
21808 In the loop end test, we test x against Infinity, rather than comparing
21809 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
21812 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
21823 /* Test on denormalized numbers. */
21826 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
21831 long double y = frexpl (x, &exp);
21832 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
21833 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
21834 if (exp != LDBL_MIN_EXP - 1)
21838 /* Test on infinite numbers. */
21842 long double y = frexpl (x, &exp);
21849 if ac_fn_c_try_run "$LINENO"
21851 gl_cv_func_frexpl_works=yes
21853 gl_cv_func_frexpl_works=no
21855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21856 conftest.$ac_objext conftest.beam conftest.$ac_ext
21861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
21862 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
21864 case "$gl_cv_func_frexpl_works" in
21865 *yes) gl_func_frexpl_no_libm=yes ;;
21866 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
21869 gl_func_frexpl_no_libm=no
21872 if test $gl_func_frexpl_no_libm = yes; then
21874 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
21879 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
21888 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
21902 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
21909 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
21913 if test $REPLACE_FSEEK = 1; then
21922 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
21936 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
21948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
21949 printf %s "checking for fseeko... " >&6; }
21950 if test ${gl_cv_func_fseeko+y}
21952 printf %s "(cached) " >&6
21955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21956 /* end confdefs.h. */
21962 fseeko (stdin, 0, 0);
21967 if ac_fn_c_try_link "$LINENO"
21969 gl_cv_func_fseeko=yes
21971 gl_cv_func_fseeko=no
21973 rm -f core conftest.err conftest.$ac_objext \
21974 conftest$ac_exeext conftest.$ac_ext
21977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
21978 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
21981 if test $ac_cv_have_decl_fseeko = no; then
21985 if test $gl_cv_func_fseeko = no; then
21988 if test $WINDOWS_64_BIT_OFF_T = 1; then
21991 if test $gl_cv_var_stdin_large_offset = no; then
21997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
21998 printf %s "checking whether fflush works on input streams... " >&6; }
21999 if test ${gl_cv_func_fflush_stdin+y}
22001 printf %s "(cached) " >&6
22003 echo hello world > conftest.txt
22004 if test "$cross_compiling" = yes
22007 # Guess no on native Windows.
22008 mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
22009 *) gl_cv_func_fflush_stdin=cross ;;
22013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22014 /* end confdefs.h. */
22018 # include <unistd.h>
22019 #else /* on Windows with MSVC */
22026 FILE *f = fopen ("conftest.txt", "r");
22033 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
22034 { fclose (f); return 2; }
22035 /* For deterministic results, ensure f read a bigger buffer. */
22036 if (lseek (fd, 0, SEEK_CUR) == 5)
22037 { fclose (f); return 3; }
22038 /* POSIX requires fflush-fseek to set file offset of fd. This fails
22039 on BSD systems and on mingw. */
22040 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
22041 { fclose (f); return 4; }
22042 if (lseek (fd, 0, SEEK_CUR) != 5)
22043 { fclose (f); return 5; }
22044 /* Verify behaviour of fflush after ungetc. See
22045 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
22046 /* Verify behaviour of fflush after a backup ungetc. This fails on
22051 if (fgetc (f) != c)
22052 { fclose (f); return 6; }
22053 /* Verify behaviour of fflush after a non-backup ungetc. This fails
22054 on glibc 2.8 and on BSD systems. */
22058 if (fgetc (f) != c)
22059 { fclose (f); return 7; }
22067 if ac_fn_c_try_run "$LINENO"
22069 gl_cv_func_fflush_stdin=yes
22071 gl_cv_func_fflush_stdin=no
22073 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22074 conftest.$ac_objext conftest.beam conftest.$ac_ext
22080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
22081 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
22082 case "$gl_cv_func_fflush_stdin" in
22083 *yes) gl_func_fflush_stdin=1 ;;
22084 *no) gl_func_fflush_stdin=0 ;;
22085 *) gl_func_fflush_stdin='(-1)' ;;
22088 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
22091 case "$gl_cv_func_fflush_stdin" in
22093 *) REPLACE_FSEEKO=1 ;;
22098 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
22107 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
22110 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
22111 if test "x$ac_cv_func__fseeki64" = xyes
22113 printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
22117 if test $ac_cv_func__fseeki64 = yes; then
22118 ac_fn_c_check_decl "$LINENO" "_fseeki64" "ac_cv_have_decl__fseeki64" "$ac_includes_default"
22119 if test "x$ac_cv_have_decl__fseeki64" = xyes
22126 printf "%s\n" "#define HAVE_DECL__FSEEKI64 $ac_have_decl" >>confdefs.h
22142 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
22149 if test $ac_cv_func___fseterr = no; then
22158 gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
22175 if test $ac_cv_func_fchdir = no; then
22179 if test $HAVE_FCHDIR = 0; then
22180 case "$gl_cv_func_open_directory_works" in
22189 if test $REPLACE_FSTAT = 1; then
22198 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
22210 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
22230 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
22241 if test $ac_cv_func_fstatat = no; then
22244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
22245 printf %s "checking whether fstatat (..., 0) works... " >&6; }
22246 if test ${gl_cv_func_fstatat_zero_flag+y}
22248 printf %s "(cached) " >&6
22250 if test "$cross_compiling" = yes
22253 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
22254 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
22258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22259 /* end confdefs.h. */
22262 #include <sys/stat.h>
22267 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
22271 if ac_fn_c_try_run "$LINENO"
22273 gl_cv_func_fstatat_zero_flag=yes
22275 gl_cv_func_fstatat_zero_flag=no
22277 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22278 conftest.$ac_objext conftest.beam conftest.$ac_ext
22283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
22284 printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
22286 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
22288 *) REPLACE_FSTATAT=1 ;;
22293 REPLACE_FSTATAT=1 ;;
22296 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
22299 printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
22305 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
22314 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
22328 printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
22335 if test $ac_cv_func_fsync = no; then
22339 if test $HAVE_FSYNC = 0; then
22348 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
22363 printf "%s\n" "#define GNULIB_TEST_FSYNC 1" >>confdefs.h
22370 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22374 if test $REPLACE_FTELL = 1; then
22383 gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
22397 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
22410 if test $ac_cv_have_decl_ftello = no; then
22414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
22415 printf %s "checking for ftello... " >&6; }
22416 if test ${gl_cv_func_ftello+y}
22418 printf %s "(cached) " >&6
22421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22422 /* end confdefs.h. */
22432 if ac_fn_c_try_link "$LINENO"
22434 gl_cv_func_ftello=yes
22436 gl_cv_func_ftello=no
22438 rm -f core conftest.err conftest.$ac_objext \
22439 conftest$ac_exeext conftest.$ac_ext
22442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
22443 printf "%s\n" "$gl_cv_func_ftello" >&6; }
22444 if test $gl_cv_func_ftello = no; then
22447 if test $WINDOWS_64_BIT_OFF_T = 1; then
22450 if test $gl_cv_var_stdin_large_offset = no; then
22453 if test $REPLACE_FTELLO = 0; then
22455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
22456 printf %s "checking whether ftello works... " >&6; }
22457 if test ${gl_cv_func_ftello_works+y}
22459 printf %s "(cached) " >&6
22463 # Guess no on Solaris.
22464 solaris*) gl_cv_func_ftello_works="guessing no" ;;
22465 # Guess yes on native Windows.
22466 mingw*) gl_cv_func_ftello_works="guessing yes" ;;
22467 # Guess yes otherwise.
22468 *) gl_cv_func_ftello_works="guessing yes" ;;
22470 if test "$cross_compiling" = yes
22474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22475 /* end confdefs.h. */
22478 #include <stdlib.h>
22479 #include <string.h>
22480 #define TESTFILE "conftest.tmp"
22486 /* Create a file with some contents. */
22487 fp = fopen (TESTFILE, "w");
22490 if (fwrite ("foogarsh", 1, 8, fp) < 8)
22491 { fclose (fp); return 71; }
22495 /* The file's contents is now "foogarsh". */
22497 /* Try writing after reading to EOF. */
22498 fp = fopen (TESTFILE, "r+");
22501 if (fseek (fp, -1, SEEK_END))
22502 { fclose (fp); return 74; }
22503 if (!(getc (fp) == 'h'))
22504 { fclose (fp); return 1; }
22505 if (!(getc (fp) == EOF))
22506 { fclose (fp); return 2; }
22507 if (!(ftell (fp) == 8))
22508 { fclose (fp); return 3; }
22509 if (!(ftell (fp) == 8))
22510 { fclose (fp); return 4; }
22511 if (!(putc ('!', fp) == '!'))
22512 { fclose (fp); return 5; }
22513 if (!(ftell (fp) == 9))
22514 { fclose (fp); return 6; }
22515 if (!(fclose (fp) == 0))
22517 fp = fopen (TESTFILE, "r");
22522 if (!(fread (buf, 1, 10, fp) == 9))
22523 { fclose (fp); return 10; }
22524 if (!(memcmp (buf, "foogarsh!", 9) == 0))
22525 { fclose (fp); return 11; }
22527 if (!(fclose (fp) == 0))
22530 /* The file's contents is now "foogarsh!". */
22535 if ac_fn_c_try_run "$LINENO"
22537 gl_cv_func_ftello_works=yes
22539 gl_cv_func_ftello_works=no
22541 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22542 conftest.$ac_objext conftest.beam conftest.$ac_ext
22547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
22548 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
22549 case "$gl_cv_func_ftello_works" in
22554 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
22561 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22570 gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
22573 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
22574 if test "x$ac_cv_func__ftelli64" = xyes
22576 printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
22593 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
22602 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
22609 if test $REPLACE_GETCWD = 1; then
22618 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
22632 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
22641 if test $ac_cv_func_getdtablesize = yes &&
22642 test $ac_cv_have_decl_getdtablesize = yes; then
22643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
22644 printf %s "checking whether getdtablesize works... " >&6; }
22645 if test ${gl_cv_func_getdtablesize_works+y}
22647 printf %s "(cached) " >&6
22650 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
22652 if test "$cross_compiling" = yes
22655 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
22656 gl_cv_func_getdtablesize_works="guessing no" ;;
22657 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
22661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22662 /* end confdefs.h. */
22664 #include <unistd.h>
22668 int size = getdtablesize();
22669 if (dup2 (0, getdtablesize()) != -1)
22671 if (size != getdtablesize())
22678 if ac_fn_c_try_run "$LINENO"
22680 gl_cv_func_getdtablesize_works=yes
22682 gl_cv_func_getdtablesize_works=no
22684 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22685 conftest.$ac_objext conftest.beam conftest.$ac_ext
22692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
22693 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
22694 case "$gl_cv_func_getdtablesize_works" in
22695 *yes | "no (limitation)") ;;
22696 *) REPLACE_GETDTABLESIZE=1 ;;
22699 HAVE_GETDTABLESIZE=0
22702 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
22711 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
22720 GNULIB_GETDTABLESIZE=1
22726 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
22740 if test -n "$gl_replace_getopt"; then
22744 if test $REPLACE_GETOPT = 1; then
22747 if test $ac_cv_header_sys_cdefs_h = yes; then
22755 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22758 GETOPT_CDEFS_H=getopt-cdefs.h
22764 if test $REPLACE_GETOPT = 1; then
22773 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22783 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22785 GNULIB_GL_UNISTD_H_GETOPT=1
22792 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
22794 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
22801 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
22802 if test $ac_have_decl = 1
22807 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
22809 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
22816 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
22817 if test $ac_have_decl = 1
22822 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
22824 if test "x$ac_cv_have_decl___argv" = xyes
22831 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
22832 if test $ac_have_decl = 1
22838 # Incur the cost of this test only if none of the above worked.
22839 if test $ac_found = 0; then
22840 # On OpenBSD 5.1, using the global __progname variable appears to be
22841 # the only way to implement getprogname.
22842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
22843 printf %s "checking whether __progname is defined in default libraries... " >&6; }
22844 if test ${gl_cv_var___progname+y}
22846 printf %s "(cached) " >&6
22849 gl_cv_var___progname=
22850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22851 /* end confdefs.h. */
22852 extern char *__progname;
22856 return *__progname;
22862 if ac_fn_c_try_link "$LINENO"
22864 gl_cv_var___progname=yes
22867 rm -f core conftest.err conftest.$ac_objext \
22868 conftest$ac_exeext conftest.$ac_ext
22872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
22873 printf "%s\n" "$gl_cv_var___progname" >&6; }
22874 if test "$gl_cv_var___progname" = yes; then
22876 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
22895 gl_gettimeofday_timezone=void
22896 if test $ac_cv_func_gettimeofday != yes; then
22897 HAVE_GETTIMEOFDAY=0
22903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
22904 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
22905 if test ${gl_cv_func_gettimeofday_clobber+y}
22907 printf %s "(cached) " >&6
22909 if test "$cross_compiling" = yes
22911 # When cross-compiling:
22913 # Guess all is fine on glibc systems.
22914 *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
22915 # Guess no on native Windows.
22916 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
22917 # If we don't know, assume the worst.
22918 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
22922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22923 /* end confdefs.h. */
22924 #include <string.h>
22925 #include <sys/time.h>
22927 #include <stdlib.h>
22935 struct tm saved_lt;
22937 lt = localtime (&t);
22939 gettimeofday (&tv, NULL);
22940 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
22946 if ac_fn_c_try_run "$LINENO"
22948 gl_cv_func_gettimeofday_clobber=no
22950 gl_cv_func_gettimeofday_clobber=yes
22952 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22953 conftest.$ac_objext conftest.beam conftest.$ac_ext
22957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
22958 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
22960 case "$gl_cv_func_gettimeofday_clobber" in
22962 REPLACE_GETTIMEOFDAY=1
22964 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
22969 NEED_LOCALTIME_BUFFER=1
22971 REPLACE_LOCALTIME=1
22976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22977 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
22978 if test ${gl_cv_func_gettimeofday_posix_signature+y}
22980 printf %s "(cached) " >&6
22982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22983 /* end confdefs.h. */
22984 #include <sys/time.h>
22986 int gettimeofday (struct timeval *restrict, void *restrict);
22991 /* glibc uses struct timezone * rather than the POSIX void *
22992 if _GNU_SOURCE is defined. However, since the only portable
22993 use of gettimeofday uses NULL as the second parameter, and
22994 since the glibc definition is actually more typesafe, it is
22995 not worth wrapping this to get a compliant signature. */
22996 int (*f) (struct timeval *restrict, void *restrict)
22999 return !(x | c.tv_sec | c.tv_usec);
23005 if ac_fn_c_try_compile "$LINENO"
23007 gl_cv_func_gettimeofday_posix_signature=yes
23009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23010 /* end confdefs.h. */
23011 #include <sys/time.h>
23012 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23022 if ac_fn_c_try_compile "$LINENO"
23024 gl_cv_func_gettimeofday_posix_signature=almost
23026 gl_cv_func_gettimeofday_posix_signature=no
23028 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23033 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23034 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23035 gl_gettimeofday_timezone='struct timezone'
23036 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23037 REPLACE_GETTIMEOFDAY=1
23039 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23040 REPLACE_GETTIMEOFDAY=1
23043 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
23047 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
23050 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23059 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
23068 GNULIB_GETTIMEOFDAY=1
23074 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
23079 if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
23088 # Autoconf 2.61a.99 and earlier don't support linking a file only
23089 # in VPATH builds. But since GNUmakefile is for maintainer use
23090 # only, it does not matter if we skip the link with older autoconf.
23091 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
23092 # builds, so use a shell variable to bypass this.
23093 GNUmakefile=GNUmakefile
23094 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
23098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
23099 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
23100 if test ${gl_cv_func_isnand_no_libm+y}
23102 printf %s "(cached) " >&6
23105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23106 /* end confdefs.h. */
23110 # define isnand(x) __builtin_isnan ((double)(x))
23113 # define isnand(x) isnan ((double)(x))
23124 if ac_fn_c_try_link "$LINENO"
23126 gl_cv_func_isnand_no_libm=yes
23128 gl_cv_func_isnand_no_libm=no
23130 rm -f core conftest.err conftest.$ac_objext \
23131 conftest$ac_exeext conftest.$ac_ext
23134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
23135 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
23137 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
23138 if test $gl_cv_func_isnand_no_libm = yes; then
23140 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
23144 if test $gl_func_isnand_no_libm != yes; then
23153 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
23161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
23162 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
23163 if test ${gl_cv_func_isnanf_no_libm+y}
23165 printf %s "(cached) " >&6
23168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23169 /* end confdefs.h. */
23173 # define isnanf(x) __builtin_isnanf ((float)(x))
23174 #elif defined isnan
23176 # define isnanf(x) isnan ((float)(x))
23187 if ac_fn_c_try_link "$LINENO"
23189 gl_cv_func_isnanf_no_libm=yes
23191 gl_cv_func_isnanf_no_libm=no
23193 rm -f core conftest.err conftest.$ac_objext \
23194 conftest$ac_exeext conftest.$ac_ext
23197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
23198 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
23200 if test $gl_cv_func_isnanf_no_libm = yes; then
23204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
23205 printf %s "checking whether isnan(float) works... " >&6; }
23206 if test ${gl_cv_func_isnanf_works+y}
23208 printf %s "(cached) " >&6
23211 if test "$cross_compiling" = yes
23214 irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
23215 mingw*) # Guess yes on mingw, no on MSVC.
23216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23217 /* end confdefs.h. */
23224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23225 $EGREP "Known" >/dev/null 2>&1
23227 gl_cv_func_isnanf_works="guessing yes"
23229 gl_cv_func_isnanf_works="guessing no"
23234 *) gl_cv_func_isnanf_works="guessing yes" ;;
23238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23239 /* end confdefs.h. */
23244 # define isnanf(x) __builtin_isnanf ((float)(x))
23245 #elif defined isnan
23247 # define isnanf(x) isnan ((float)(x))
23249 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
23254 static float zero = 0.0f;
23255 return zero / zero;
23258 # define NaN() (0.0f / 0.0f)
23261 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23262 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
23267 if (isnanf (1.0f / 0.0f))
23270 if (!isnanf (NaN ()))
23273 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
23274 /* The isnanf function should be immune against changes in the sign bit and
23275 in the mantissa bits. The xor operation twiddles a bit that can only be
23276 a sign bit or a mantissa bit. */
23277 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
23282 /* Set the bits below the exponent to 01111...111. */
23283 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
23284 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
23285 if (!isnanf (m.value))
23293 if ac_fn_c_try_run "$LINENO"
23295 gl_cv_func_isnanf_works=yes
23297 gl_cv_func_isnanf_works=no
23299 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23300 conftest.$ac_objext conftest.beam conftest.$ac_ext
23305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
23306 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
23309 if test $gl_cv_func_isnanf_no_libm = yes \
23310 && { case "$gl_cv_func_isnanf_works" in
23315 gl_func_isnanf_no_libm=yes
23317 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
23320 gl_func_isnanf_no_libm=no
23323 if test $gl_func_isnanf_no_libm != yes; then
23332 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
23336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
23337 printf %s "checking where to find the exponent in a 'float'... " >&6; }
23338 if test ${gl_cv_cc_float_expbit0+y}
23340 printf %s "(cached) " >&6
23343 if test "$cross_compiling" = yes
23345 gl_cv_cc_float_expbit0="word 0 bit 23"
23347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23348 /* end confdefs.h. */
23351 #include <stddef.h>
23353 #include <string.h>
23355 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23356 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
23357 static unsigned int ored_words[NWORDS];
23358 static unsigned int anded_words[NWORDS];
23359 static void add_to_ored_words (float x)
23363 /* Clear it first, in case
23364 sizeof (float) < sizeof (memory_float). */
23365 memset (&m, 0, sizeof (memory_float));
23367 for (i = 0; i < NWORDS; i++)
23369 ored_words[i] |= m.word[i];
23370 anded_words[i] &= m.word[i];
23376 FILE *fp = fopen ("conftest.out", "w");
23379 for (j = 0; j < NWORDS; j++)
23380 anded_words[j] = ~ (unsigned int) 0;
23381 add_to_ored_words (0.25f);
23382 add_to_ored_words (0.5f);
23383 add_to_ored_words (1.0f);
23384 add_to_ored_words (2.0f);
23385 add_to_ored_words (4.0f);
23386 /* Remove bits that are common (e.g. if representation of the first mantissa
23387 bit is explicit). */
23388 for (j = 0; j < NWORDS; j++)
23389 ored_words[j] &= ~anded_words[j];
23390 /* Now find the nonzero word. */
23391 for (j = 0; j < NWORDS; j++)
23392 if (ored_words[j] != 0)
23397 for (i = j + 1; i < NWORDS; i++)
23398 if (ored_words[i] != 0)
23400 fprintf (fp, "unknown");
23401 return (fclose (fp) != 0);
23404 if ((ored_words[j] >> i) & 1)
23406 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23407 return (fclose (fp) != 0);
23410 fprintf (fp, "unknown");
23411 return (fclose (fp) != 0);
23415 if ac_fn_c_try_run "$LINENO"
23417 gl_cv_cc_float_expbit0=`cat conftest.out`
23419 gl_cv_cc_float_expbit0="unknown"
23421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23422 conftest.$ac_objext conftest.beam conftest.$ac_ext
23428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
23429 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
23430 case "$gl_cv_cc_float_expbit0" in
23432 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23433 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
23435 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
23438 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
23447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
23448 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
23449 if test ${gl_cv_func_isnanl_no_libm+y}
23451 printf %s "(cached) " >&6
23454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23455 /* end confdefs.h. */
23459 # define isnanl(x) __builtin_isnanl ((long double)(x))
23460 #elif defined isnan
23462 # define isnanl(x) isnan ((long double)(x))
23473 if ac_fn_c_try_link "$LINENO"
23475 gl_cv_func_isnanl_no_libm=yes
23477 gl_cv_func_isnanl_no_libm=no
23479 rm -f core conftest.err conftest.$ac_objext \
23480 conftest$ac_exeext conftest.$ac_ext
23483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
23484 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
23486 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
23487 if test $gl_func_isnanl_no_libm = yes; then
23492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
23493 printf %s "checking whether isnanl works... " >&6; }
23494 if test ${gl_cv_func_isnanl_works+y}
23496 printf %s "(cached) " >&6
23499 if test "$cross_compiling" = yes
23502 mingw*) # Guess yes on mingw, no on MSVC.
23503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23504 /* end confdefs.h. */
23511 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23512 $EGREP "Known" >/dev/null 2>&1
23514 gl_cv_func_isnanl_works="guessing yes"
23516 gl_cv_func_isnanl_works="guessing no"
23521 *) gl_cv_func_isnanl_works="guessing yes" ;;
23525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23526 /* end confdefs.h. */
23529 #include <limits.h>
23533 # define isnanl(x) __builtin_isnanl ((long double)(x))
23534 #elif defined isnan
23536 # define isnanl(x) isnan ((long double)(x))
23539 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23540 typedef union { unsigned int word[NWORDS]; long double value; }
23541 memory_long_double;
23542 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
23543 runtime type conversion. */
23545 static long double NaNl ()
23548 return zero / zero;
23551 # define NaNl() (0.0L / 0.0L)
23557 if (!isnanl (NaNl ()))
23561 memory_long_double m;
23564 /* The isnanl function should be immune against changes in the sign bit and
23565 in the mantissa bits. The xor operation twiddles a bit that can only be
23566 a sign bit or a mantissa bit (since the exponent never extends to
23569 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
23570 for (i = 0; i < NWORDS; i++)
23572 if (!isnanl (m.value))
23576 #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
23577 /* Representation of an 80-bit 'long double' as an initializer for a sequence
23578 of 'unsigned int' words. */
23579 # ifdef WORDS_BIGENDIAN
23580 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23581 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
23582 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
23583 (unsigned int) (mantlo) << 16 \
23586 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23587 { mantlo, manthi, exponent }
23590 static memory_long_double x =
23591 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
23592 if (!isnanl (x.value))
23596 /* Signalling NaN. */
23597 static memory_long_double x =
23598 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
23599 if (!isnanl (x.value))
23602 /* isnanl should return something even for noncanonical values. */
23603 { /* Pseudo-NaN. */
23604 static memory_long_double x =
23605 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
23606 if (isnanl (x.value) && !isnanl (x.value))
23609 { /* Pseudo-Infinity. */
23610 static memory_long_double x =
23611 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
23612 if (isnanl (x.value) && !isnanl (x.value))
23615 { /* Pseudo-Zero. */
23616 static memory_long_double x =
23617 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
23618 if (isnanl (x.value) && !isnanl (x.value))
23621 { /* Unnormalized number. */
23622 static memory_long_double x =
23623 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23624 if (isnanl (x.value) && !isnanl (x.value))
23627 { /* Pseudo-Denormal. */
23628 static memory_long_double x =
23629 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23630 if (isnanl (x.value) && !isnanl (x.value))
23638 if ac_fn_c_try_run "$LINENO"
23640 gl_cv_func_isnanl_works=yes
23642 gl_cv_func_isnanl_works=no
23644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23645 conftest.$ac_objext conftest.beam conftest.$ac_ext
23650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23651 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
23653 case "$gl_cv_func_isnanl_works" in
23655 *) gl_func_isnanl_no_libm=no ;;
23658 if test $gl_func_isnanl_no_libm = yes; then
23660 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23664 if test $gl_func_isnanl_no_libm != yes; then
23673 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
23678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23679 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
23680 if test ${gl_cv_cc_long_double_expbit0+y}
23682 printf %s "(cached) " >&6
23685 if test "$cross_compiling" = yes
23688 gl_cv_cc_long_double_expbit0="unknown"
23690 mingw*) # On native Windows (little-endian), we know the result
23691 # in two cases: mingw, MSVC.
23692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23693 /* end confdefs.h. */
23700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23701 $EGREP "Known" >/dev/null 2>&1
23703 gl_cv_cc_long_double_expbit0="word 2 bit 0"
23707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23708 /* end confdefs.h. */
23715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23716 $EGREP "Known" >/dev/null 2>&1
23718 gl_cv_cc_long_double_expbit0="word 1 bit 20"
23726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23727 /* end confdefs.h. */
23730 #include <stddef.h>
23732 #include <string.h>
23734 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23735 typedef union { long double value; unsigned int word[NWORDS]; }
23736 memory_long_double;
23737 static unsigned int ored_words[NWORDS];
23738 static unsigned int anded_words[NWORDS];
23739 static void add_to_ored_words (long double x)
23741 memory_long_double m;
23743 /* Clear it first, in case
23744 sizeof (long double) < sizeof (memory_long_double). */
23745 memset (&m, 0, sizeof (memory_long_double));
23747 for (i = 0; i < NWORDS; i++)
23749 ored_words[i] |= m.word[i];
23750 anded_words[i] &= m.word[i];
23756 FILE *fp = fopen ("conftest.out", "w");
23759 for (j = 0; j < NWORDS; j++)
23760 anded_words[j] = ~ (unsigned int) 0;
23761 add_to_ored_words (0.25L);
23762 add_to_ored_words (0.5L);
23763 add_to_ored_words (1.0L);
23764 add_to_ored_words (2.0L);
23765 add_to_ored_words (4.0L);
23766 /* Remove bits that are common (e.g. if representation of the first mantissa
23767 bit is explicit). */
23768 for (j = 0; j < NWORDS; j++)
23769 ored_words[j] &= ~anded_words[j];
23770 /* Now find the nonzero word. */
23771 for (j = 0; j < NWORDS; j++)
23772 if (ored_words[j] != 0)
23777 for (i = j + 1; i < NWORDS; i++)
23778 if (ored_words[i] != 0)
23780 fprintf (fp, "unknown");
23781 return (fclose (fp) != 0);
23784 if ((ored_words[j] >> i) & 1)
23786 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23787 return (fclose (fp) != 0);
23790 fprintf (fp, "unknown");
23791 return (fclose (fp) != 0);
23795 if ac_fn_c_try_run "$LINENO"
23797 gl_cv_cc_long_double_expbit0=`cat conftest.out`
23799 gl_cv_cc_long_double_expbit0="unknown"
23801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23802 conftest.$ac_objext conftest.beam conftest.$ac_ext
23808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23809 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
23810 case "$gl_cv_cc_long_double_expbit0" in
23812 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23813 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23815 printf "%s\n" "#define LDBL_EXPBIT0_WORD $word" >>confdefs.h
23818 printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h
23828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
23829 printf %s "checking for C compiler flag to ignore unused libraries... " >&6; }
23830 if test ${gl_cv_prog_c_ignore_unused_libraries+y}
23832 printf %s "(cached) " >&6
23834 gl_cv_prog_c_ignore_unused_libraries=none
23835 gl_saved_ldflags=$LDFLAGS
23836 gl_saved_libs=$LIBS
23837 # Link with -lm to detect binutils 2.16 bug with --as-needed; see
23838 # <https://lists.gnu.org/r/bug-gnulib/2006-06/msg00131.html>.
23840 # Use long option sequences like '-z ignore' to test for the feature,
23841 # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
23842 # GCC + binutils likes '-Wl,--as-needed'.
23843 # GCC + Solaris ld likes '-Wl,-z,ignore'.
23844 # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
23845 # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
23846 # native cc issues annoying warnings and then ignores it,
23847 # which would cause us to incorrectly conclude that it worked.
23848 for gl_flags in '-Wl,--as-needed' \
23853 LDFLAGS="$gl_flags $LDFLAGS"
23854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23855 /* end confdefs.h. */
23865 if ac_fn_c_try_link "$LINENO"
23867 gl_cv_prog_c_ignore_unused_libraries=$gl_flags
23869 rm -f core conftest.err conftest.$ac_objext \
23870 conftest$ac_exeext conftest.$ac_ext
23871 LDFLAGS=$gl_saved_ldflags
23872 test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
23875 LIBS=$gl_saved_libs
23878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
23879 printf "%s\n" "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
23880 IGNORE_UNUSED_LIBRARIES_CFLAGS=
23881 if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
23882 IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
23896 gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
23900 if test "$gl_threads_api" = posix; then
23901 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23902 # pthread_rwlock_* functions.
23904 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23906 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
23910 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23914 if $has_rwlock; then
23917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23918 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23919 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
23921 printf %s "(cached) " >&6
23924 LIBS="$LIBS $LIBMULTITHREAD"
23925 if test "$cross_compiling" = yes
23927 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
23929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23930 /* end confdefs.h. */
23933 #include <pthread.h>
23934 #include <stdlib.h>
23935 #include <unistd.h>
23937 #define SUCCEED() exit (0)
23938 #define FAILURE() exit (1)
23939 #define UNEXPECTED(n) (exit (10 + (n)))
23941 /* The main thread creates the waiting writer and the requesting reader threads
23942 in the default way; this guarantees that they have the same priority.
23943 We can reuse the main thread as first reader thread. */
23945 static pthread_rwlock_t lock;
23946 static pthread_t reader1;
23947 static pthread_t writer;
23948 static pthread_t reader2;
23949 static pthread_t timer;
23950 /* Used to pass control from writer to reader2 and from reader2 to timer,
23951 as in a relay race.
23952 Passing control from one running thread to another running thread
23953 is most likely faster than to create the second thread. */
23954 static pthread_mutex_t baton;
23957 timer_func (void *ignored)
23959 /* Step 13 (can be before or after step 12):
23960 The timer thread takes the baton, then waits a moment to make sure
23961 it can tell whether the second reader thread is blocked at step 12. */
23962 if (pthread_mutex_lock (&baton))
23965 /* By the time we get here, it's clear that the second reader thread is
23966 blocked at step 12. This is the desired behaviour. */
23971 reader2_func (void *ignored)
23975 /* Step 8 (can be before or after step 7):
23976 The second reader thread takes the baton, then waits a moment to make sure
23977 the writer thread has reached step 7. */
23978 if (pthread_mutex_lock (&baton))
23981 /* Step 9: The second reader thread requests the lock. */
23982 err = pthread_rwlock_tryrdlock (&lock);
23985 else if (err != EBUSY)
23987 /* Step 10: Launch a timer, to test whether the next call blocks. */
23988 if (pthread_create (&timer, NULL, timer_func, NULL))
23990 /* Step 11: Release the baton. */
23991 if (pthread_mutex_unlock (&baton))
23993 /* Step 12: The second reader thread requests the lock. */
23994 err = pthread_rwlock_rdlock (&lock);
24002 writer_func (void *ignored)
24004 /* Step 4: Take the baton, so that the second reader thread does not go ahead
24006 if (pthread_mutex_lock (&baton))
24008 /* Step 5: Create the second reader thread. */
24009 if (pthread_create (&reader2, NULL, reader2_func, NULL))
24011 /* Step 6: Release the baton. */
24012 if (pthread_mutex_unlock (&baton))
24014 /* Step 7: The writer thread requests the lock. */
24015 if (pthread_rwlock_wrlock (&lock))
24023 reader1 = pthread_self ();
24025 /* Step 1: The main thread initializes the lock and the baton. */
24026 if (pthread_rwlock_init (&lock, NULL))
24028 if (pthread_mutex_init (&baton, NULL))
24030 /* Step 2: The main thread acquires the lock as a reader. */
24031 if (pthread_rwlock_rdlock (&lock))
24033 /* Step 3: Create the writer thread. */
24034 if (pthread_create (&writer, NULL, writer_func, NULL))
24036 /* Job done. Go to sleep. */
24044 if ac_fn_c_try_run "$LINENO"
24046 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
24048 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
24050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24051 conftest.$ac_objext conftest.beam conftest.$ac_ext
24057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
24058 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
24059 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
24062 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
24068 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24070 /* end confdefs.h. */
24072 #include <pthread.h>
24077 #if __FreeBSD__ == 4
24078 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24079 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
24080 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
24081 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24083 int x = (int)PTHREAD_MUTEX_RECURSIVE;
24091 if ac_fn_c_try_compile "$LINENO"
24094 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24103 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
24112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
24113 printf %s "checking whether lseek detects pipes... " >&6; }
24114 if test ${gl_cv_func_lseek_pipe+y}
24116 printf %s "(cached) " >&6
24120 gl_cv_func_lseek_pipe=no
24123 if test $cross_compiling = no; then
24124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24125 /* end confdefs.h. */
24127 #include <sys/types.h> /* for off_t */
24128 #include <stdio.h> /* for SEEK_CUR */
24130 # include <unistd.h>
24131 #else /* on Windows with MSVC */
24139 /* Exit with success only if stdin is seekable. */
24140 return lseek (0, (off_t)0, SEEK_CUR) < 0;
24146 if ac_fn_c_try_link "$LINENO"
24148 if test -s conftest$ac_exeext \
24149 && ./conftest$ac_exeext < conftest.$ac_ext \
24150 && test 1 = "`echo hi \
24151 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
24152 gl_cv_func_lseek_pipe=yes
24154 gl_cv_func_lseek_pipe=no
24158 gl_cv_func_lseek_pipe=no
24160 rm -f core conftest.err conftest.$ac_objext \
24161 conftest$ac_exeext conftest.$ac_ext
24163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24164 /* end confdefs.h. */
24166 #if defined __BEOS__
24167 /* BeOS mistakenly return 0 when trying to seek on pipes. */
24171 if ac_fn_c_try_compile "$LINENO"
24173 gl_cv_func_lseek_pipe=yes
24175 gl_cv_func_lseek_pipe=no
24177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
24184 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
24185 if test $gl_cv_func_lseek_pipe = no; then
24188 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
24193 if test $WINDOWS_64_BIT_OFF_T = 1; then
24197 if test $REPLACE_LSEEK = 1; then
24206 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
24220 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
24228 if test $ac_cv_func_lstat = yes; then
24230 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
24239 if test $REPLACE_LSTAT = 1; then
24248 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24263 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
24272 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24273 if test "x$ac_cv_header_stdlib_h" = xyes
24275 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
24279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
24280 printf %s "checking for GNU libc compatible malloc... " >&6; }
24281 if test ${ac_cv_func_malloc_0_nonnull+y}
24283 printf %s "(cached) " >&6
24285 if test "$cross_compiling" = yes
24288 # Guess yes on platforms where we know the result.
24289 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
24290 | hpux* | solaris* | cygwin* | mingw*)
24291 ac_cv_func_malloc_0_nonnull=yes ;;
24292 # If we don't know, assume the worst.
24293 *) ac_cv_func_malloc_0_nonnull=no ;;
24297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24298 /* end confdefs.h. */
24299 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
24300 # include <stdlib.h>
24308 char *p = malloc (0);
24317 if ac_fn_c_try_run "$LINENO"
24319 ac_cv_func_malloc_0_nonnull=yes
24321 ac_cv_func_malloc_0_nonnull=no
24323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24324 conftest.$ac_objext conftest.beam conftest.$ac_ext
24329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
24330 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
24331 if test $ac_cv_func_malloc_0_nonnull = yes
24334 printf "%s\n" "#define HAVE_MALLOC_GNU 1" >>confdefs.h
24337 printf "%s\n" "#define HAVE_MALLOC_GNU 0" >>confdefs.h
24344 if test $REPLACE_MALLOC = 1; then
24353 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24358 printf "%s\n" "#define GNULIB_MALLOC_GNU 1" >>confdefs.h
24364 if test $gl_cv_func_malloc_posix = yes; then
24366 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
24372 if test $REPLACE_MALLOC = 1; then
24381 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24389 GNULIB_MALLOC_POSIX=1
24395 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
24414 if test $gl_cv_have_include_next = yes; then
24415 gl_cv_next_math_h='<'math.h'>'
24417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
24418 printf %s "checking absolute name of <math.h>... " >&6; }
24419 if test ${gl_cv_next_math_h+y}
24421 printf %s "(cached) " >&6
24424 if test $ac_cv_header_math_h = yes; then
24429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24430 /* end confdefs.h. */
24434 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24435 *) gl_absname_cpp="$ac_cpp" ;;
24440 gl_dirsep_regex='[/\\]'
24443 gl_dirsep_regex='\/'
24446 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24447 gl_header_literal_regex=`echo 'math.h' \
24448 | sed -e "$gl_make_literal_regex_sed"`
24449 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24450 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24456 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24457 sed -n "$gl_absolute_header_sed"`
24459 gl_header=$gl_cv_absolute_math_h
24460 gl_cv_next_math_h='"'$gl_header'"'
24462 gl_cv_next_math_h='<'math.h'>'
24467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
24468 printf "%s\n" "$gl_cv_next_math_h" >&6; }
24470 NEXT_MATH_H=$gl_cv_next_math_h
24472 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24473 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24474 gl_next_as_first_directive='<'math.h'>'
24476 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24477 gl_next_as_first_directive=$gl_cv_next_math_h
24479 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
24485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
24486 printf %s "checking whether NAN macro works... " >&6; }
24487 if test ${gl_cv_header_math_nan_works+y}
24489 printf %s "(cached) " >&6
24491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24492 /* end confdefs.h. */
24497 /* Solaris 10 has a broken definition of NAN. Other platforms
24498 fail to provide NAN, or provide it only in C99 mode; this
24499 test only needs to fail when NAN is provided but wrong. */
24509 if ac_fn_c_try_compile "$LINENO"
24511 gl_cv_header_math_nan_works=yes
24513 gl_cv_header_math_nan_works=no
24515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
24518 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
24519 if test $gl_cv_header_math_nan_works = no; then
24522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
24523 printf %s "checking whether HUGE_VAL works... " >&6; }
24524 if test ${gl_cv_header_math_huge_val_works+y}
24526 printf %s "(cached) " >&6
24528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24529 /* end confdefs.h. */
24534 /* Solaris 10 has a broken definition of HUGE_VAL. */
24535 double d = HUGE_VAL;
24541 if ac_fn_c_try_compile "$LINENO"
24543 gl_cv_header_math_huge_val_works=yes
24545 gl_cv_header_math_huge_val_works=no
24547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
24550 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
24551 if test $gl_cv_header_math_huge_val_works = no; then
24558 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
24567 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
24570 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
24571 if test "x$ac_cv_header_bp_sym_h" = xyes
24573 printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
24590 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
24600 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
24601 if test "x$ac_cv_func_mempcpy" = xyes
24603 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
24607 if test $ac_cv_func_mempcpy = no; then
24611 if test $HAVE_MEMPCPY = 0; then
24620 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
24637 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
24646 if test $ac_cv_have_decl_memrchr = no; then
24647 HAVE_DECL_MEMRCHR=0
24650 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24651 if test "x$ac_cv_func_memrchr" = xyes
24653 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
24658 if test $ac_cv_func_memrchr = no; then
24667 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24682 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
24687 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24696 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
24700 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24709 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
24714 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
24727 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
24730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
24731 printf %s "checking whether open recognizes a trailing slash... " >&6; }
24732 if test ${gl_cv_func_open_slash+y}
24734 printf %s "(cached) " >&6
24736 # Assume that if we have lstat, we can also check symlinks.
24737 if test $ac_cv_func_lstat = yes; then
24739 ln -s conftest.tmp conftest.lnk
24741 if test "$cross_compiling" = yes
24745 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
24746 gl_cv_func_open_slash="guessing no" ;;
24748 gl_cv_func_open_slash="guessing yes" ;;
24752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24753 /* end confdefs.h. */
24757 # include <unistd.h>
24763 if (open ("conftest.lnk/", O_RDONLY) != -1)
24766 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
24771 if ac_fn_c_try_run "$LINENO"
24773 gl_cv_func_open_slash=yes
24775 gl_cv_func_open_slash=no
24777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24778 conftest.$ac_objext conftest.beam conftest.$ac_ext
24781 rm -f conftest.sl conftest.tmp conftest.lnk
24784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
24785 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
24786 case "$gl_cv_func_open_slash" in
24789 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
24797 if test $REPLACE_OPEN = 0; then
24801 if test $ac_cv_func_fchdir = no; then
24805 if test $HAVE_FCHDIR = 0; then
24812 if test $REPLACE_OPEN = 1; then
24821 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
24839 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
24849 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
24853 # Solaris 10 lacks O_CLOEXEC.
24854 # Solaris 9 has *at functions, but uniformly mishandles trailing
24855 # slash in all of them.
24863 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
24872 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
24881 printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h
24894 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
24903 printf "%s\n" "#define GNULIB_OPENAT_SAFER 1" >>confdefs.h
24909 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
24910 if test "x$ac_cv_func_opendir" = xyes
24912 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
24916 if test $ac_cv_func_opendir = no; then
24923 if test $ac_cv_func_fchdir = no; then
24927 if test $HAVE_FCHDIR = 0; then
24928 if test $HAVE_OPENDIR = 1; then
24933 case $host_os,$HAVE_OPENDIR in
24935 REPLACE_OPENDIR=1;;
24938 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
24947 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
24961 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
24973 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
24976 case ${gl_cv_func_strerror_r_works-unset} in
24978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
24979 printf %s "checking whether perror matches strerror... " >&6; }
24980 if test ${gl_cv_func_perror_works+y}
24982 printf %s "(cached) " >&6
24984 if test "$cross_compiling" = yes
24987 # Guess yes on native Windows.
24988 mingw*) gl_cv_func_perror_works="guessing yes" ;;
24989 # Otherwise guess no.
24990 *) gl_cv_func_perror_works="guessing no" ;;
24994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24995 /* end confdefs.h. */
24998 #include <stdlib.h>
24999 #include <string.h>
25004 char *str = strerror (-1);
25005 if (!getenv("CONFTEST_OUTPUT")) return 0;
25006 if (!str) str = "";
25016 if ac_fn_c_try_run "$LINENO"
25018 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
25019 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
25020 gl_cv_func_perror_works=yes
25022 gl_cv_func_perror_works=no
25024 rm -rf conftest.txt1 conftest.txt2
25026 gl_cv_func_perror_works=no
25028 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25029 conftest.$ac_objext conftest.beam conftest.$ac_ext
25034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
25035 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
25036 case "$gl_cv_func_perror_works" in
25038 *) REPLACE_PERROR=1 ;;
25046 if test $REPLACE_PERROR = 1; then
25055 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
25069 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
25075 if test $gl_cv_func_frexp_no_libm = yes; then
25079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
25080 printf %s "checking whether frexp works... " >&6; }
25081 if test ${gl_cv_func_frexp_works+y}
25083 printf %s "(cached) " >&6
25086 if test "$cross_compiling" = yes
25089 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
25090 mingw*) # Guess yes with MSVC, no with mingw.
25091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25092 /* end confdefs.h. */
25099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25100 $EGREP "Good" >/dev/null 2>&1
25102 gl_cv_func_frexp_works="guessing yes"
25104 gl_cv_func_frexp_works="guessing no"
25109 *) gl_cv_func_frexp_works="guessing yes" ;;
25113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25114 /* end confdefs.h. */
25118 #include <string.h>
25119 #if HAVE_DECL_ALARM
25120 # include <signal.h>
25121 # include <unistd.h>
25123 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
25124 ICC 10.0 has a bug when optimizing the expression -zero.
25125 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
25126 to PowerPC on Mac OS X 10.5. */
25127 #if defined __hpux || defined __sgi || defined __ICC
25129 compute_minus_zero (void)
25131 return -DBL_MIN * DBL_MIN;
25133 # define minus_zero compute_minus_zero ()
25135 double minus_zero = -0.0;
25143 #if HAVE_DECL_ALARM
25144 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
25145 number. Let the test fail in this case. */
25146 signal (SIGALRM, SIG_DFL);
25149 /* Test on denormalized numbers. */
25150 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
25155 double y = frexp (x, &exp);
25156 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
25157 On NetBSD: y = 0.75. Correct: y = 0.5. */
25161 /* Test on infinite numbers. */
25165 double y = frexp (x, &exp);
25169 /* Test on negative zero. */
25173 double y = frexp (x, &exp);
25174 if (memcmp (&y, &x, sizeof x))
25180 if ac_fn_c_try_run "$LINENO"
25182 gl_cv_func_frexp_works=yes
25184 gl_cv_func_frexp_works=no
25186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25187 conftest.$ac_objext conftest.beam conftest.$ac_ext
25192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
25193 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
25195 case "$gl_cv_func_frexp_works" in
25198 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
25204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
25205 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
25206 if test ${gl_cv_func_ldexp_no_libm+y}
25208 printf %s "(cached) " >&6
25211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25212 /* end confdefs.h. */
25219 return ldexp (x, y) < 1;
25224 if ac_fn_c_try_link "$LINENO"
25226 gl_cv_func_ldexp_no_libm=yes
25228 gl_cv_func_ldexp_no_libm=no
25230 rm -f core conftest.err conftest.$ac_objext \
25231 conftest$ac_exeext conftest.$ac_ext
25234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
25235 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
25236 if test $gl_cv_func_ldexp_no_libm = yes; then
25238 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
25247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
25248 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
25249 if test ${gl_cv_func_frexpl_no_libm+y}
25251 printf %s "(cached) " >&6
25254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25255 /* end confdefs.h. */
25261 int e; return frexpl (x, &e) > 0;
25266 if ac_fn_c_try_link "$LINENO"
25268 gl_cv_func_frexpl_no_libm=yes
25270 gl_cv_func_frexpl_no_libm=no
25272 rm -f core conftest.err conftest.$ac_objext \
25273 conftest$ac_exeext conftest.$ac_ext
25276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
25277 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
25279 if test $gl_cv_func_frexpl_no_libm = yes; then
25282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
25283 printf %s "checking whether frexpl works... " >&6; }
25284 if test ${gl_cv_func_frexpl_works+y}
25286 printf %s "(cached) " >&6
25289 if test "$cross_compiling" = yes
25293 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
25294 gl_cv_func_frexpl_works="guessing no";;
25295 *) gl_cv_func_frexpl_works="guessing yes";;
25299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25300 /* end confdefs.h. */
25304 /* Override the values of <float.h>, like done in float.in.h. */
25305 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
25306 # undef LDBL_MIN_EXP
25307 # define LDBL_MIN_EXP (-16381)
25309 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
25310 # undef LDBL_MIN_EXP
25311 # define LDBL_MIN_EXP (-16381)
25313 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
25314 # undef LDBL_MIN_EXP
25315 # define LDBL_MIN_EXP DBL_MIN_EXP
25317 #if defined __sgi && (LDBL_MANT_DIG >= 106)
25318 # if defined __GNUC__
25319 # undef LDBL_MIN_EXP
25320 # define LDBL_MIN_EXP DBL_MIN_EXP
25327 long double frexpl (long double, int *);
25331 volatile long double x;
25332 /* Test on finite numbers that fails on AIX 5.1. */
25340 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
25341 function returns an invalid (incorrectly normalized) value: it returns
25342 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
25343 but the correct result is
25344 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
25348 long double y = frexpl (x, &exp);
25349 if (!(exp == 1 && y == 0.505L))
25352 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
25353 LDBL_MAX_EXP = 16384.
25354 In the loop end test, we test x against Infinity, rather than comparing
25355 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
25358 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
25369 /* Test on denormalized numbers. */
25372 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
25377 long double y = frexpl (x, &exp);
25378 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
25379 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
25380 if (exp != LDBL_MIN_EXP - 1)
25384 /* Test on infinite numbers. */
25388 long double y = frexpl (x, &exp);
25395 if ac_fn_c_try_run "$LINENO"
25397 gl_cv_func_frexpl_works=yes
25399 gl_cv_func_frexpl_works=no
25401 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25402 conftest.$ac_objext conftest.beam conftest.$ac_ext
25407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
25408 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
25410 case "$gl_cv_func_frexpl_works" in
25411 *yes) gl_func_frexpl_no_libm=yes ;;
25412 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
25415 gl_func_frexpl_no_libm=no
25418 if test $gl_func_frexpl_no_libm = yes; then
25420 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
25422 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
25424 if test "x$ac_cv_have_decl_frexpl" = xyes
25434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
25435 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
25436 if test ${gl_cv_func_ldexpl_no_libm+y}
25438 printf %s "(cached) " >&6
25441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25442 /* end confdefs.h. */
25448 return ldexpl (x, -1) > 0;
25453 if ac_fn_c_try_link "$LINENO"
25455 gl_cv_func_ldexpl_no_libm=yes
25457 gl_cv_func_ldexpl_no_libm=no
25459 rm -f core conftest.err conftest.$ac_objext \
25460 conftest$ac_exeext conftest.$ac_ext
25463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
25464 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
25466 if test $gl_cv_func_ldexpl_no_libm = yes; then
25469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
25470 printf %s "checking whether ldexpl works... " >&6; }
25471 if test ${gl_cv_func_ldexpl_works+y}
25473 printf %s "(cached) " >&6
25476 if test "$cross_compiling" = yes
25480 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
25481 # Guess yes on native Windows.
25482 mingw*) gl_cv_func_ldexpl_works="guessing yes" ;;
25483 *) gl_cv_func_ldexpl_works="guessing yes" ;;
25487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25488 /* end confdefs.h. */
25495 long double ldexpl (long double, int);
25500 volatile long double x = 1.0;
25501 volatile long double y = ldexpl (x, -1);
25506 volatile long double x = 1.73205L;
25507 volatile long double y = ldexpl (x, 0);
25514 if ac_fn_c_try_run "$LINENO"
25516 gl_cv_func_ldexpl_works=yes
25518 gl_cv_func_ldexpl_works=no
25520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25521 conftest.$ac_objext conftest.beam conftest.$ac_ext
25526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
25527 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
25529 case "$gl_cv_func_ldexpl_works" in
25532 printf "%s\n" "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
25534 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
25536 if test "x$ac_cv_have_decl_ldexpl" = xyes
25549 if test $gl_cv_func_vfprintf_posix = no; then
25561 gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
25565 printf "%s\n" "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
25576 GNULIB_PRINTF_POSIX=1
25582 printf "%s\n" "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
25590 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
25591 if test "x$ac_cv_func_raise" = xyes
25593 printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
25597 if test $ac_cv_func_raise = no; then
25602 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25610 if test $gl_cv_type_sigset_t = yes; then
25611 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
25612 if test "x$ac_cv_func_sigprocmask" = xyes
25614 gl_cv_func_sigprocmask=1
25618 if test -z "$gl_cv_func_sigprocmask"; then
25619 HAVE_POSIX_SIGNALBLOCKING=0
25622 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
25628 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
25637 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
25652 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
25659 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
25660 if test "x$ac_cv_func_readdir" = xyes
25662 printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
25666 if test $ac_cv_func_readdir = no; then
25670 if test $HAVE_READDIR = 0; then
25679 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
25693 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
25700 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
25701 if test "x$ac_cv_header_stdlib_h" = xyes
25703 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
25707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
25708 printf %s "checking for GNU libc compatible realloc... " >&6; }
25709 if test ${ac_cv_func_realloc_0_nonnull+y}
25711 printf %s "(cached) " >&6
25713 if test "$cross_compiling" = yes
25716 # Guess yes on platforms where we know the result.
25717 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
25718 | hpux* | solaris* | cygwin* | mingw*)
25719 ac_cv_func_realloc_0_nonnull=yes ;;
25720 # If we don't know, assume the worst.
25721 *) ac_cv_func_realloc_0_nonnull=no ;;
25725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25726 /* end confdefs.h. */
25727 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
25728 # include <stdlib.h>
25736 char *p = realloc (0, 0);
25745 if ac_fn_c_try_run "$LINENO"
25747 ac_cv_func_realloc_0_nonnull=yes
25749 ac_cv_func_realloc_0_nonnull=no
25751 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25752 conftest.$ac_objext conftest.beam conftest.$ac_ext
25757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
25758 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
25759 if test $ac_cv_func_realloc_0_nonnull = yes
25762 printf "%s\n" "#define HAVE_REALLOC_GNU 1" >>confdefs.h
25765 printf "%s\n" "#define HAVE_REALLOC_GNU 0" >>confdefs.h
25772 if test $REPLACE_REALLOC = 1; then
25781 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
25786 printf "%s\n" "#define GNULIB_REALLOC_GNU 1" >>confdefs.h
25792 if test $gl_cv_func_malloc_posix = yes; then
25794 printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
25800 if test $REPLACE_REALLOC = 1; then
25809 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
25817 GNULIB_REALLOC_POSIX=1
25823 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
25830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
25831 printf %s "checking whether rmdir works... " >&6; }
25832 if test ${gl_cv_func_rmdir_works+y}
25834 printf %s "(cached) " >&6
25837 touch conftest.file
25838 if test "$cross_compiling" = yes
25841 # Guess yes on Linux systems.
25842 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
25843 # Guess yes on glibc systems.
25844 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
25845 # Guess no on native Windows.
25846 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
25847 # If we don't know, assume the worst.
25848 *) gl_cv_func_rmdir_works="guessing no" ;;
25852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25853 /* end confdefs.h. */
25857 # include <unistd.h>
25858 #else /* on Windows with MSVC */
25859 # include <direct.h>
25866 if (!rmdir ("conftest.file/"))
25868 else if (errno != ENOTDIR)
25870 if (!rmdir ("conftest.dir/./"))
25878 if ac_fn_c_try_run "$LINENO"
25880 gl_cv_func_rmdir_works=yes
25882 gl_cv_func_rmdir_works=no
25884 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25885 conftest.$ac_objext conftest.beam conftest.$ac_ext
25888 rm -rf conftest.dir conftest.file
25890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
25891 printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
25892 case "$gl_cv_func_rmdir_works" in
25899 if test $REPLACE_RMDIR = 1; then
25908 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
25922 printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
25935 if test $ac_cv_func_sigaction = yes; then
25936 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
25938 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
25941 printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
25946 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
25947 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
25953 if test $HAVE_SIGACTION = 0; then
25962 gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
25970 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
25971 #include <signal.h>
25974 if test "x$ac_cv_type_siginfo_t" = xyes
25977 printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
25982 if test $ac_cv_type_siginfo_t = no; then
25998 printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
26013 if test $gl_cv_have_include_next = yes; then
26014 gl_cv_next_signal_h='<'signal.h'>'
26016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
26017 printf %s "checking absolute name of <signal.h>... " >&6; }
26018 if test ${gl_cv_next_signal_h+y}
26020 printf %s "(cached) " >&6
26025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26026 /* end confdefs.h. */
26027 #include <signal.h>
26030 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26031 *) gl_absname_cpp="$ac_cpp" ;;
26036 gl_dirsep_regex='[/\\]'
26039 gl_dirsep_regex='\/'
26042 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26043 gl_header_literal_regex=`echo 'signal.h' \
26044 | sed -e "$gl_make_literal_regex_sed"`
26045 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26046 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26052 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26053 sed -n "$gl_absolute_header_sed"`
26055 gl_header=$gl_cv_absolute_signal_h
26056 gl_cv_next_signal_h='"'$gl_header'"'
26060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
26061 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
26063 NEXT_SIGNAL_H=$gl_cv_next_signal_h
26065 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26066 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26067 gl_next_as_first_directive='<'signal.h'>'
26069 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26070 gl_next_as_first_directive=$gl_cv_next_signal_h
26072 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
26078 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
26079 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
26080 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
26081 #include <signal.h>
26084 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
26088 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
26097 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
26098 #include <signal.h>
26101 if test "x$ac_cv_type_sighandler_t" = xyes
26105 HAVE_SIGHANDLER_T=0
26113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
26114 printf %s "checking for signbit macro... " >&6; }
26115 if test ${gl_cv_func_signbit+y}
26117 printf %s "(cached) " >&6
26120 if test "$cross_compiling" = yes
26123 # Guess yes on glibc systems.
26124 *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
26125 # Guess yes on native Windows.
26126 mingw*) gl_cv_func_signbit="guessing yes" ;;
26127 # If we don't know, assume the worst.
26128 *) gl_cv_func_signbit="guessing no" ;;
26132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26133 /* end confdefs.h. */
26136 /* If signbit is defined as a function, don't use it, since calling it for
26137 'float' or 'long double' arguments would involve conversions.
26138 If signbit is not declared at all but exists as a library function, don't
26139 use it, since the prototype may not match.
26140 If signbit is not declared at all but exists as a compiler built-in, don't
26141 use it, since it's preferable to use __builtin_signbit* (no warnings,
26142 no conversions). */
26144 # error "signbit should be a macro"
26146 #include <string.h>
26148 /* Global variables.
26149 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
26150 but cannot constant-fold __builtin_signbitl (variable). */
26156 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
26157 So we use -p0f and -p0d instead. */
26162 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
26163 So we use another constant expression instead.
26164 But that expression does not work on other platforms, such as when
26165 cross-compiling to PowerPC on Mac OS X 10.5. */
26166 long double p0l = 0.0L;
26167 #if defined __hpux || defined __sgi
26168 long double m0l = -LDBL_MIN * LDBL_MIN;
26170 long double m0l = -p0l;
26173 if (signbit (vf)) /* link check */
26176 float plus_inf = 1.0f / p0f;
26177 float minus_inf = -1.0f / p0f;
26178 if (!(!signbit (255.0f)
26179 && signbit (-255.0f)
26181 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
26182 && !signbit (plus_inf)
26183 && signbit (minus_inf)))
26186 if (signbit (vd)) /* link check */
26189 double plus_inf = 1.0 / p0d;
26190 double minus_inf = -1.0 / p0d;
26191 if (!(!signbit (255.0)
26192 && signbit (-255.0)
26194 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
26195 && !signbit (plus_inf)
26196 && signbit (minus_inf)))
26199 if (signbit (vl)) /* link check */
26202 long double plus_inf = 1.0L / p0l;
26203 long double minus_inf = -1.0L / p0l;
26204 if (signbit (255.0L))
26206 if (!signbit (-255.0L))
26210 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
26212 if (signbit (plus_inf))
26214 if (!signbit (minus_inf))
26222 if ac_fn_c_try_run "$LINENO"
26224 gl_cv_func_signbit=yes
26226 gl_cv_func_signbit=no
26228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26229 conftest.$ac_objext conftest.beam conftest.$ac_ext
26234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
26235 printf "%s\n" "$gl_cv_func_signbit" >&6; }
26236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
26237 printf %s "checking for signbit compiler built-ins... " >&6; }
26238 if test ${gl_cv_func_signbit_gcc+y}
26240 printf %s "(cached) " >&6
26243 if test "$cross_compiling" = yes
26246 # Guess yes on glibc systems.
26247 *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
26248 # Guess yes on mingw, no on MSVC.
26249 mingw*) if test -n "$GCC"; then
26250 gl_cv_func_signbit_gcc="guessing yes"
26252 gl_cv_func_signbit_gcc="guessing no"
26255 # If we don't know, assume the worst.
26256 *) gl_cv_func_signbit_gcc="guessing no" ;;
26260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26261 /* end confdefs.h. */
26264 # define signbit(x) \
26265 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
26266 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
26267 __builtin_signbitf (x))
26269 # error "signbit should be three compiler built-ins"
26271 #include <string.h>
26273 /* Global variables.
26274 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
26275 but cannot constant-fold __builtin_signbitl (variable). */
26281 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
26282 So we use -p0f and -p0d instead. */
26287 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
26288 So we use another constant expression instead.
26289 But that expression does not work on other platforms, such as when
26290 cross-compiling to PowerPC on Mac OS X 10.5. */
26291 long double p0l = 0.0L;
26292 #if defined __hpux || defined __sgi
26293 long double m0l = -LDBL_MIN * LDBL_MIN;
26295 long double m0l = -p0l;
26298 if (signbit (vf)) /* link check */
26301 float plus_inf = 1.0f / p0f;
26302 float minus_inf = -1.0f / p0f;
26303 if (!(!signbit (255.0f)
26304 && signbit (-255.0f)
26306 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
26307 && !signbit (plus_inf)
26308 && signbit (minus_inf)))
26311 if (signbit (vd)) /* link check */
26314 double plus_inf = 1.0 / p0d;
26315 double minus_inf = -1.0 / p0d;
26316 if (!(!signbit (255.0)
26317 && signbit (-255.0)
26319 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
26320 && !signbit (plus_inf)
26321 && signbit (minus_inf)))
26324 if (signbit (vl)) /* link check */
26327 long double plus_inf = 1.0L / p0l;
26328 long double minus_inf = -1.0L / p0l;
26329 if (signbit (255.0L))
26331 if (!signbit (-255.0L))
26335 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
26337 if (signbit (plus_inf))
26339 if (!signbit (minus_inf))
26347 if ac_fn_c_try_run "$LINENO"
26349 gl_cv_func_signbit_gcc=yes
26351 gl_cv_func_signbit_gcc=no
26353 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26354 conftest.$ac_objext conftest.beam conftest.$ac_ext
26359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
26360 printf "%s\n" "$gl_cv_func_signbit_gcc" >&6; }
26361 case "$gl_cv_func_signbit_gcc" in
26363 REPLACE_SIGNBIT_USING_GCC=1
26366 case "$gl_cv_func_signbit" in
26372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
26373 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
26374 if test ${gl_cv_cc_float_signbit+y}
26376 printf %s "(cached) " >&6
26379 if test "$cross_compiling" = yes
26382 gl_cv_cc_float_signbit="unknown"
26385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26386 /* end confdefs.h. */
26388 #include <stddef.h>
26391 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26392 typedef union { float value; unsigned int word[NWORDS]; }
26394 static memory_float plus = { 1.0f };
26395 static memory_float minus = { -1.0f };
26400 FILE *fp = fopen ("conftest.out", "w");
26403 /* Find the different bit. */
26405 for (j = 0; j < NWORDS; j++)
26407 unsigned int x = plus.word[j] ^ minus.word[j];
26408 if ((x & (x - 1)) || (x && m))
26410 /* More than one bit difference. */
26411 fprintf (fp, "unknown");
26423 /* No difference. */
26424 fprintf (fp, "unknown");
26428 /* Now m = plus.word[k] ^ ~minus.word[k]. */
26429 if (plus.word[k] & ~minus.word[k])
26431 /* Oh? The sign bit is set in the positive and cleared in the negative
26433 fprintf (fp, "unknown");
26440 fprintf (fp, "word %d bit %d", (int) k, (int) i);
26441 if (fclose (fp) != 0)
26447 if ac_fn_c_try_run "$LINENO"
26449 gl_cv_cc_float_signbit=`cat conftest.out`
26451 gl_cv_cc_float_signbit="unknown"
26453 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26454 conftest.$ac_objext conftest.beam conftest.$ac_ext
26460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
26461 printf "%s\n" "$gl_cv_cc_float_signbit" >&6; }
26462 case "$gl_cv_cc_float_signbit" in
26464 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26465 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
26467 printf "%s\n" "#define FLT_SIGNBIT_WORD $word" >>confdefs.h
26470 printf "%s\n" "#define FLT_SIGNBIT_BIT $bit" >>confdefs.h
26478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
26479 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
26480 if test ${gl_cv_cc_double_signbit+y}
26482 printf %s "(cached) " >&6
26485 if test "$cross_compiling" = yes
26488 gl_cv_cc_double_signbit="unknown"
26491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26492 /* end confdefs.h. */
26494 #include <stddef.h>
26497 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26498 typedef union { double value; unsigned int word[NWORDS]; }
26500 static memory_float plus = { 1.0 };
26501 static memory_float minus = { -1.0 };
26506 FILE *fp = fopen ("conftest.out", "w");
26509 /* Find the different bit. */
26511 for (j = 0; j < NWORDS; j++)
26513 unsigned int x = plus.word[j] ^ minus.word[j];
26514 if ((x & (x - 1)) || (x && m))
26516 /* More than one bit difference. */
26517 fprintf (fp, "unknown");
26529 /* No difference. */
26530 fprintf (fp, "unknown");
26534 /* Now m = plus.word[k] ^ ~minus.word[k]. */
26535 if (plus.word[k] & ~minus.word[k])
26537 /* Oh? The sign bit is set in the positive and cleared in the negative
26539 fprintf (fp, "unknown");
26546 fprintf (fp, "word %d bit %d", (int) k, (int) i);
26547 if (fclose (fp) != 0)
26553 if ac_fn_c_try_run "$LINENO"
26555 gl_cv_cc_double_signbit=`cat conftest.out`
26557 gl_cv_cc_double_signbit="unknown"
26559 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26560 conftest.$ac_objext conftest.beam conftest.$ac_ext
26566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
26567 printf "%s\n" "$gl_cv_cc_double_signbit" >&6; }
26568 case "$gl_cv_cc_double_signbit" in
26570 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26571 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
26573 printf "%s\n" "#define DBL_SIGNBIT_WORD $word" >>confdefs.h
26576 printf "%s\n" "#define DBL_SIGNBIT_BIT $bit" >>confdefs.h
26584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
26585 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
26586 if test ${gl_cv_cc_long_double_signbit+y}
26588 printf %s "(cached) " >&6
26591 if test "$cross_compiling" = yes
26594 gl_cv_cc_long_double_signbit="unknown"
26597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26598 /* end confdefs.h. */
26600 #include <stddef.h>
26603 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26604 typedef union { long double value; unsigned int word[NWORDS]; }
26606 static memory_float plus = { 1.0L };
26607 static memory_float minus = { -1.0L };
26612 FILE *fp = fopen ("conftest.out", "w");
26615 /* Find the different bit. */
26617 for (j = 0; j < NWORDS; j++)
26619 unsigned int x = plus.word[j] ^ minus.word[j];
26620 if ((x & (x - 1)) || (x && m))
26622 /* More than one bit difference. */
26623 fprintf (fp, "unknown");
26635 /* No difference. */
26636 fprintf (fp, "unknown");
26640 /* Now m = plus.word[k] ^ ~minus.word[k]. */
26641 if (plus.word[k] & ~minus.word[k])
26643 /* Oh? The sign bit is set in the positive and cleared in the negative
26645 fprintf (fp, "unknown");
26652 fprintf (fp, "word %d bit %d", (int) k, (int) i);
26653 if (fclose (fp) != 0)
26659 if ac_fn_c_try_run "$LINENO"
26661 gl_cv_cc_long_double_signbit=`cat conftest.out`
26663 gl_cv_cc_long_double_signbit="unknown"
26665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26666 conftest.$ac_objext conftest.beam conftest.$ac_ext
26672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
26673 printf "%s\n" "$gl_cv_cc_long_double_signbit" >&6; }
26674 case "$gl_cv_cc_long_double_signbit" in
26676 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26677 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
26679 printf "%s\n" "#define LDBL_SIGNBIT_WORD $word" >>confdefs.h
26682 printf "%s\n" "#define LDBL_SIGNBIT_BIT $bit" >>confdefs.h
26688 if test "$gl_cv_cc_float_signbit" = unknown; then
26689 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
26691 if test "x$ac_cv_have_decl_copysignf" = xyes
26698 printf "%s\n" "#define HAVE_DECL_COPYSIGNF $ac_have_decl" >>confdefs.h
26700 if test "$ac_cv_have_decl_copysignf" = yes; then
26701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
26702 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
26703 if test ${gl_cv_func_copysignf_no_libm+y}
26705 printf %s "(cached) " >&6
26708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26709 /* end confdefs.h. */
26715 return copysignf (x, y) < 0;
26720 if ac_fn_c_try_link "$LINENO"
26722 gl_cv_func_copysignf_no_libm=yes
26724 gl_cv_func_copysignf_no_libm=no
26726 rm -f core conftest.err conftest.$ac_objext \
26727 conftest$ac_exeext conftest.$ac_ext
26730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
26731 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
26732 if test $gl_cv_func_copysignf_no_libm = yes; then
26734 printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
26739 if test "$gl_cv_cc_double_signbit" = unknown; then
26740 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
26742 if test "x$ac_cv_have_decl_copysign" = xyes
26749 printf "%s\n" "#define HAVE_DECL_COPYSIGN $ac_have_decl" >>confdefs.h
26751 if test "$ac_cv_have_decl_copysign" = yes; then
26752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
26753 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
26754 if test ${gl_cv_func_copysign_no_libm+y}
26756 printf %s "(cached) " >&6
26759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26760 /* end confdefs.h. */
26766 return copysign (x, y) < 0;
26771 if ac_fn_c_try_link "$LINENO"
26773 gl_cv_func_copysign_no_libm=yes
26775 gl_cv_func_copysign_no_libm=no
26777 rm -f core conftest.err conftest.$ac_objext \
26778 conftest$ac_exeext conftest.$ac_ext
26781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
26782 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
26783 if test $gl_cv_func_copysign_no_libm = yes; then
26785 printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
26790 if test "$gl_cv_cc_long_double_signbit" = unknown; then
26791 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
26793 if test "x$ac_cv_have_decl_copysignl" = xyes
26800 printf "%s\n" "#define HAVE_DECL_COPYSIGNL $ac_have_decl" >>confdefs.h
26802 if test "$ac_cv_have_decl_copysignl" = yes; then
26803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
26804 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
26805 if test ${gl_cv_func_copysignl_no_libm+y}
26807 printf %s "(cached) " >&6
26810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26811 /* end confdefs.h. */
26817 return copysignl (x, y) < 0;
26822 if ac_fn_c_try_link "$LINENO"
26824 gl_cv_func_copysignl_no_libm=yes
26826 gl_cv_func_copysignl_no_libm=no
26828 rm -f core conftest.err conftest.$ac_objext \
26829 conftest$ac_exeext conftest.$ac_ext
26832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
26833 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
26834 if test $gl_cv_func_copysignl_no_libm = yes; then
26836 printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
26846 if test $REPLACE_SIGNBIT = 1; then
26855 gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
26865 gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
26875 gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
26889 printf "%s\n" "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
26896 if test $gl_cv_type_sigset_t = yes; then
26897 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
26898 if test "x$ac_cv_func_sigprocmask" = xyes
26900 gl_cv_func_sigprocmask=1
26904 if test -z "$gl_cv_func_sigprocmask"; then
26905 HAVE_POSIX_SIGNALBLOCKING=0
26908 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
26917 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
26926 GNULIB_SIGPROCMASK=1
26932 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
26937 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
26938 if test "x$ac_cv_header_stdint_h" = xyes
26940 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
26944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
26945 printf %s "checking for SIZE_MAX... " >&6; }
26946 if test ${gl_cv_size_max+y}
26948 printf %s "(cached) " >&6
26952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26953 /* end confdefs.h. */
26955 #include <limits.h>
26957 #include <stdint.h>
26964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26965 $EGREP "Found it" >/dev/null 2>&1
26971 if test -z "$gl_cv_size_max"; then
26972 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
26973 #include <limits.h>"
26977 size_t_bits_minus_1=
26980 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
26987 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
26988 if test $fits_in_uint = 1; then
26989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26990 /* end confdefs.h. */
26991 #include <stddef.h>
26993 extern unsigned long foo;
27003 if ac_fn_c_try_compile "$LINENO"
27007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27009 if test $fits_in_uint = 1; then
27010 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
27012 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
27015 gl_cv_size_max='((size_t)~(size_t)0)'
27020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
27021 printf "%s\n" "$gl_cv_size_max" >&6; }
27022 if test "$gl_cv_size_max" != yes; then
27024 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
27030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
27031 printf %s "checking for ssize_t... " >&6; }
27032 if test ${gt_cv_ssize_t+y}
27034 printf %s "(cached) " >&6
27036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27037 /* end confdefs.h. */
27038 #include <sys/types.h>
27042 int x = sizeof (ssize_t *) + sizeof (ssize_t);
27048 if ac_fn_c_try_compile "$LINENO"
27054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
27057 printf "%s\n" "$gt_cv_ssize_t" >&6; }
27058 if test $gt_cv_ssize_t = no; then
27060 printf "%s\n" "#define ssize_t int" >>confdefs.h
27073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27074 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
27075 if test ${gl_cv_func_stat_file_slash+y}
27077 printf %s "(cached) " >&6
27080 # Assume that if we have lstat, we can also check symlinks.
27081 if test $ac_cv_func_lstat = yes; then
27082 ln -s conftest.tmp conftest.lnk
27084 if test "$cross_compiling" = yes
27087 # Guess yes on Linux systems.
27088 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
27089 # Guess yes on glibc systems.
27090 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
27091 # If we don't know, assume the worst.
27092 *) gl_cv_func_stat_file_slash="guessing no" ;;
27096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27097 /* end confdefs.h. */
27098 #include <sys/stat.h>
27105 if (!stat ("conftest.tmp/", &st))
27108 if (!stat ("conftest.lnk/", &st))
27117 if ac_fn_c_try_run "$LINENO"
27119 gl_cv_func_stat_file_slash=yes
27121 gl_cv_func_stat_file_slash=no
27123 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27124 conftest.$ac_objext conftest.beam conftest.$ac_ext
27127 rm -f conftest.tmp conftest.lnk
27129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
27130 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
27131 case $gl_cv_func_stat_file_slash in
27135 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
27145 if test $REPLACE_STAT = 1; then
27154 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
27166 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
27186 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
27194 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>
27195 #include <sys/stat.h>
27197 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
27200 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
27202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
27203 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
27204 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
27206 printf %s "(cached) " >&6
27208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27209 /* end confdefs.h. */
27211 #include <sys/types.h>
27212 #include <sys/stat.h>
27213 #if HAVE_SYS_TIME_H
27214 # include <sys/time.h>
27217 struct timespec ts;
27230 if ac_fn_c_try_compile "$LINENO"
27232 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
27234 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
27236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
27239 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
27240 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
27242 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
27246 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>
27247 #include <sys/stat.h>
27249 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
27252 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
27256 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
27257 #include <sys/stat.h>
27259 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
27262 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
27266 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>
27267 #include <sys/stat.h>
27269 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
27272 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
27287 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>
27288 #include <sys/stat.h>
27290 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
27293 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
27297 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
27298 #include <sys/stat.h>
27300 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
27303 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
27307 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>
27308 #include <sys/stat.h>
27310 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
27313 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
27325 printf "%s\n" "#define GNULIB_STATAT 1" >>confdefs.h
27330 # Define two additional variables used in the Makefile substitution.
27332 if test "$ac_cv_header_stdbool_h" = yes; then
27335 STDBOOL_H='stdbool.h'
27338 if test -n "$STDBOOL_H"; then
27339 GL_GENERATE_STDBOOL_H_TRUE=
27340 GL_GENERATE_STDBOOL_H_FALSE='#'
27342 GL_GENERATE_STDBOOL_H_TRUE='#'
27343 GL_GENERATE_STDBOOL_H_FALSE=
27347 if test "$ac_cv_type__Bool" = yes; then
27359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
27360 printf %s "checking for good max_align_t... " >&6; }
27361 if test ${gl_cv_type_max_align_t+y}
27363 printf %s "(cached) " >&6
27365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27366 /* end confdefs.h. */
27367 #include <stddef.h>
27368 unsigned int s = sizeof (max_align_t);
27369 #if defined __GNUC__ || defined __IBM__ALIGNOF__
27370 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
27371 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
27382 if ac_fn_c_try_compile "$LINENO"
27384 gl_cv_type_max_align_t=yes
27386 gl_cv_type_max_align_t=no
27388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
27392 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
27393 if test $gl_cv_type_max_align_t = no; then
27398 if test $gt_cv_c_wchar_t = no; then
27403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
27404 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
27405 if test ${gl_cv_decl_null_works+y}
27407 printf %s "(cached) " >&6
27409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27410 /* end confdefs.h. */
27411 #include <stddef.h>
27412 int test[2 * (sizeof NULL == sizeof (void *)) -1];
27422 if ac_fn_c_try_compile "$LINENO"
27424 gl_cv_decl_null_works=yes
27426 gl_cv_decl_null_works=no
27428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
27431 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
27432 if test $gl_cv_decl_null_works = no; then
27438 if test -n "$STDDEF_H"; then
27439 GL_GENERATE_STDDEF_H_TRUE=
27440 GL_GENERATE_STDDEF_H_FALSE='#'
27442 GL_GENERATE_STDDEF_H_TRUE='#'
27443 GL_GENERATE_STDDEF_H_FALSE=
27446 if test -n "$STDDEF_H"; then
27455 if test $gl_cv_have_include_next = yes; then
27456 gl_cv_next_stddef_h='<'stddef.h'>'
27458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
27459 printf %s "checking absolute name of <stddef.h>... " >&6; }
27460 if test ${gl_cv_next_stddef_h+y}
27462 printf %s "(cached) " >&6
27467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27468 /* end confdefs.h. */
27469 #include <stddef.h>
27472 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27473 *) gl_absname_cpp="$ac_cpp" ;;
27478 gl_dirsep_regex='[/\\]'
27481 gl_dirsep_regex='\/'
27484 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27485 gl_header_literal_regex=`echo 'stddef.h' \
27486 | sed -e "$gl_make_literal_regex_sed"`
27487 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27488 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27494 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27495 sed -n "$gl_absolute_header_sed"`
27497 gl_header=$gl_cv_absolute_stddef_h
27498 gl_cv_next_stddef_h='"'$gl_header'"'
27502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27503 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
27505 NEXT_STDDEF_H=$gl_cv_next_stddef_h
27507 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27508 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27509 gl_next_as_first_directive='<'stddef.h'>'
27511 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27512 gl_next_as_first_directive=$gl_cv_next_stddef_h
27514 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27524 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27535 if test $gl_cv_have_include_next = yes; then
27536 gl_cv_next_stdio_h='<'stdio.h'>'
27538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
27539 printf %s "checking absolute name of <stdio.h>... " >&6; }
27540 if test ${gl_cv_next_stdio_h+y}
27542 printf %s "(cached) " >&6
27547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27548 /* end confdefs.h. */
27552 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27553 *) gl_absname_cpp="$ac_cpp" ;;
27558 gl_dirsep_regex='[/\\]'
27561 gl_dirsep_regex='\/'
27564 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27565 gl_header_literal_regex=`echo 'stdio.h' \
27566 | sed -e "$gl_make_literal_regex_sed"`
27567 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27568 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27574 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27575 sed -n "$gl_absolute_header_sed"`
27577 gl_header=$gl_cv_absolute_stdio_h
27578 gl_cv_next_stdio_h='"'$gl_header'"'
27582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
27583 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
27585 NEXT_STDIO_H=$gl_cv_next_stdio_h
27587 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27588 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27589 gl_next_as_first_directive='<'stdio.h'>'
27591 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27592 gl_next_as_first_directive=$gl_cv_next_stdio_h
27594 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
27600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
27601 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
27602 if test ${gl_cv_func_printf_attribute_flavor+y}
27604 printf %s "(cached) " >&6
27606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27607 /* end confdefs.h. */
27609 #define __STDC_FORMAT_MACROS 1
27611 #include <inttypes.h>
27612 /* For non-mingw systems, compilation will trivially succeed.
27613 For mingw, compilation will succeed for older mingw (system
27614 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
27615 #if (defined _WIN32 && ! defined __CYGWIN__) && \
27616 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
27617 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
27628 if ac_fn_c_try_compile "$LINENO"
27630 gl_cv_func_printf_attribute_flavor=system
27632 gl_cv_func_printf_attribute_flavor=gnu
27634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
27637 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
27638 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
27640 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
27647 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
27653 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
27688 if test $gl_cv_have_include_next = yes; then
27689 gl_cv_next_stdlib_h='<'stdlib.h'>'
27691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
27692 printf %s "checking absolute name of <stdlib.h>... " >&6; }
27693 if test ${gl_cv_next_stdlib_h+y}
27695 printf %s "(cached) " >&6
27700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27701 /* end confdefs.h. */
27702 #include <stdlib.h>
27705 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27706 *) gl_absname_cpp="$ac_cpp" ;;
27711 gl_dirsep_regex='[/\\]'
27714 gl_dirsep_regex='\/'
27717 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27718 gl_header_literal_regex=`echo 'stdlib.h' \
27719 | sed -e "$gl_make_literal_regex_sed"`
27720 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27721 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27727 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27728 sed -n "$gl_absolute_header_sed"`
27730 gl_header=$gl_cv_absolute_stdlib_h
27731 gl_cv_next_stdlib_h='"'$gl_header'"'
27735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
27736 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
27738 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
27740 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27741 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27742 gl_next_as_first_directive='<'stdlib.h'>'
27744 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27745 gl_next_as_first_directive=$gl_cv_next_stdlib_h
27747 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
27759 STDNORETURN_H='stdnoreturn.h'
27762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
27763 printf %s "checking for working stdnoreturn.h... " >&6; }
27764 if test ${gl_cv_header_working_stdnoreturn_h+y}
27766 printf %s "(cached) " >&6
27768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27769 /* end confdefs.h. */
27770 #include <stdlib.h>
27771 #include <stdnoreturn.h>
27772 /* Do not check for 'noreturn' after the return type.
27773 C11 allows it, but it's rarely done that way
27774 and circa-2012 bleeding-edge GCC rejects it when given
27775 -Werror=old-style-declaration. */
27776 noreturn void foo1 (void) { exit (0); }
27777 _Noreturn void foo2 (void) { exit (0); }
27778 int testit (int argc, char **argv)
27782 (argv[0][0] ? foo1 : foo2) ();
27793 if ac_fn_c_try_compile "$LINENO"
27795 gl_cv_header_working_stdnoreturn_h=yes
27797 gl_cv_header_working_stdnoreturn_h=no
27799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
27802 printf "%s\n" "$gl_cv_header_working_stdnoreturn_h" >&6; }
27803 if test $gl_cv_header_working_stdnoreturn_h = yes; then
27806 STDNORETURN_H='stdnoreturn.h'
27811 if test -n "$STDNORETURN_H"; then
27812 GL_GENERATE_STDNORETURN_H_TRUE=
27813 GL_GENERATE_STDNORETURN_H_FALSE='#'
27815 GL_GENERATE_STDNORETURN_H_TRUE='#'
27816 GL_GENERATE_STDNORETURN_H_FALSE=
27826 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
27827 if test "x$ac_cv_func_stpcpy" = xyes
27829 printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
27833 if test $ac_cv_func_stpcpy = no; then
27837 if test $HAVE_STPCPY = 0; then
27846 gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
27863 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
27871 if test $ac_cv_func_strdup = yes; then
27872 if test $gl_cv_func_malloc_posix != yes; then
27877 if test $ac_cv_have_decl_strdup = no; then
27881 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
27890 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
27905 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
27916 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
27918 printf %s "checking for working strerror function... " >&6; }
27919 if test ${gl_cv_func_working_strerror+y}
27921 printf %s "(cached) " >&6
27923 if test "$cross_compiling" = yes
27926 # Guess yes on glibc systems.
27927 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
27928 # If we don't know, assume the worst.
27929 *) gl_cv_func_working_strerror="guessing no" ;;
27933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27934 /* end confdefs.h. */
27935 #include <string.h>
27940 if (!*strerror (-2)) return 1;
27945 if ac_fn_c_try_run "$LINENO"
27947 gl_cv_func_working_strerror=yes
27949 gl_cv_func_working_strerror=no
27951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27952 conftest.$ac_objext conftest.beam conftest.$ac_ext
27957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
27958 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
27959 case "$gl_cv_func_working_strerror" in
27966 case "$gl_cv_func_strerror_r_works" in
27967 *no) REPLACE_STRERROR=1 ;;
27974 if test $REPLACE_STRERROR = 1; then
27983 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
27988 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
28002 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
28008 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
28017 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
28023 if test $ac_cv_header_sys_socket_h != yes; then
28024 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
28025 if test "x$ac_cv_header_winsock2_h" = xyes
28027 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
28032 if test "$ac_cv_header_winsock2_h" = yes; then
28034 UNISTD_H_HAVE_WINSOCK2_H=1
28035 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
28049 if test $ac_cv_have_decl_strerror_r = no; then
28050 HAVE_DECL_STRERROR_R=0
28053 if test $ac_cv_func_strerror_r = yes; then
28054 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
28055 if test $gl_cv_func_strerror_r_posix_signature = yes; then
28056 case "$gl_cv_func_strerror_r_works" in
28057 *no) REPLACE_STRERROR_R=1 ;;
28060 REPLACE_STRERROR_R=1
28063 REPLACE_STRERROR_R=1
28067 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
28076 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
28089 GNULIB_STRERROR_R=1
28095 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
28101 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX 1" >>confdefs.h
28121 if test $gl_cv_have_include_next = yes; then
28122 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
28125 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
28126 if test ${gl_cv_next_sys_stat_h+y}
28128 printf %s "(cached) " >&6
28131 if test $ac_cv_header_sys_stat_h = yes; then
28136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28137 /* end confdefs.h. */
28138 #include <sys/stat.h>
28141 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28142 *) gl_absname_cpp="$ac_cpp" ;;
28147 gl_dirsep_regex='[/\\]'
28150 gl_dirsep_regex='\/'
28153 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28154 gl_header_literal_regex=`echo 'sys/stat.h' \
28155 | sed -e "$gl_make_literal_regex_sed"`
28156 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28157 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28163 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28164 sed -n "$gl_absolute_header_sed"`
28166 gl_header=$gl_cv_absolute_sys_stat_h
28167 gl_cv_next_sys_stat_h='"'$gl_header'"'
28169 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
28175 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
28177 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
28179 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28180 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28181 gl_next_as_first_directive='<'sys/stat.h'>'
28183 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28184 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
28186 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
28195 WINDOWS_STAT_TIMESPEC=0
28204 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
28205 #include <sys/stat.h>
28207 if test "x$ac_cv_type_nlink_t" = xyes
28212 printf "%s\n" "#define nlink_t int" >>confdefs.h
28246 if test $gl_cv_have_include_next = yes; then
28247 gl_cv_next_unistd_h='<'unistd.h'>'
28249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
28250 printf %s "checking absolute name of <unistd.h>... " >&6; }
28251 if test ${gl_cv_next_unistd_h+y}
28253 printf %s "(cached) " >&6
28256 if test $ac_cv_header_unistd_h = yes; then
28261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28262 /* end confdefs.h. */
28263 #include <unistd.h>
28266 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28267 *) gl_absname_cpp="$ac_cpp" ;;
28272 gl_dirsep_regex='[/\\]'
28275 gl_dirsep_regex='\/'
28278 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28279 gl_header_literal_regex=`echo 'unistd.h' \
28280 | sed -e "$gl_make_literal_regex_sed"`
28281 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28282 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28288 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28289 sed -n "$gl_absolute_header_sed"`
28291 gl_header=$gl_cv_absolute_unistd_h
28292 gl_cv_next_unistd_h='"'$gl_header'"'
28294 gl_cv_next_unistd_h='<'unistd.h'>'
28299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
28300 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
28302 NEXT_UNISTD_H=$gl_cv_next_unistd_h
28304 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28305 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28306 gl_next_as_first_directive='<'unistd.h'>'
28308 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28309 gl_next_as_first_directive=$gl_cv_next_unistd_h
28311 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
28316 if test $ac_cv_header_unistd_h = yes; then
28337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
28338 printf %s "checking whether unlink honors trailing slashes... " >&6; }
28339 if test ${gl_cv_func_unlink_honors_slashes+y}
28341 printf %s "(cached) " >&6
28343 touch conftest.file
28344 # Assume that if we have lstat, we can also check symlinks.
28345 if test $ac_cv_func_lstat = yes; then
28346 ln -s conftest.file conftest.lnk
28348 if test "$cross_compiling" = yes
28351 # Guess yes on Linux systems.
28352 linux-* | linux) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
28353 # Guess yes on glibc systems.
28354 *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
28355 # Guess no on native Windows.
28356 mingw*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
28357 # If we don't know, assume the worst.
28358 *) gl_cv_func_unlink_honors_slashes="guessing no" ;;
28362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28363 /* end confdefs.h. */
28365 # include <unistd.h>
28366 #else /* on Windows with MSVC */
28375 if (!unlink ("conftest.file/"))
28377 else if (errno != ENOTDIR)
28380 if (!unlink ("conftest.lnk/"))
28382 else if (errno != ENOTDIR)
28391 if ac_fn_c_try_run "$LINENO"
28393 gl_cv_func_unlink_honors_slashes=yes
28395 gl_cv_func_unlink_honors_slashes=no
28397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28398 conftest.$ac_objext conftest.beam conftest.$ac_ext
28401 rm -f conftest.file conftest.lnk
28403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
28404 printf "%s\n" "$gl_cv_func_unlink_honors_slashes" >&6; }
28405 case "$gl_cv_func_unlink_honors_slashes" in
28411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
28412 printf %s "checking whether unlink of a parent directory fails as it should... " >&6; }
28413 if test ${gl_cv_func_unlink_parent_fails+y}
28415 printf %s "(cached) " >&6
28420 # Use the mktemp program if available. If not available, hide the error
28422 tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
28423 test -n "$tmp" && test -d "$tmp"
28426 # Use a simple mkdir command. It is guaranteed to fail if the directory
28427 # already exists. $RANDOM is bash specific and expands to empty in shells
28428 # other than bash, ksh and zsh. Its use does not increase security;
28429 # rather, it minimizes the probability of failure in a very cluttered /tmp
28431 tmp=/tmp/gt$$-$RANDOM
28432 (umask 077 && mkdir "$tmp")
28434 mkdir "$tmp/subdir"
28435 GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
28436 export GL_SUBDIR_FOR_UNLINK
28437 if test "$cross_compiling" = yes
28439 # If we don't know, assume the worst.
28440 gl_cv_func_unlink_parent_fails="guessing no"
28443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28444 /* end confdefs.h. */
28446 #include <stdlib.h>
28448 # include <unistd.h>
28449 #else /* on Windows with MSVC */
28450 # include <direct.h>
28456 if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
28458 else if (unlink ("..") == 0)
28464 if ac_fn_c_try_run "$LINENO"
28466 gl_cv_func_unlink_parent_fails=yes
28468 gl_cv_func_unlink_parent_fails=no
28470 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28471 conftest.$ac_objext conftest.beam conftest.$ac_ext
28474 unset GL_SUBDIR_FOR_UNLINK
28477 gl_cv_func_unlink_parent_fails="guessing no"
28481 gl_cv_func_unlink_parent_fails="guessing yes"
28486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
28487 printf "%s\n" "$gl_cv_func_unlink_parent_fails" >&6; }
28488 case "$gl_cv_func_unlink_parent_fails" in
28492 printf "%s\n" "#define UNLINK_PARENT_BUG 1" >>confdefs.h
28497 if test $REPLACE_UNLINK = 1; then
28506 gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
28520 printf "%s\n" "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
28530 if test $ac_cv_func_unlinkat = no; then
28533 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
28535 # Solaris 9 has *at functions, but uniformly mishandles trailing
28536 # slash in all of them.
28540 # GNU/Hurd has unlinkat, but it has the same bug as unlink.
28541 # Darwin has unlinkat, but it has the same UNLINK_PARENT_BUG.
28542 if test $REPLACE_UNLINK = 1; then
28549 if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
28558 gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
28572 printf "%s\n" "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
28580 if test $ac_cv_func_utime = no; then
28590 if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then
28599 gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext"
28614 printf "%s\n" "#define GNULIB_TEST_UTIME 1" >>confdefs.h
28632 if test $gl_cv_have_include_next = yes; then
28633 gl_cv_next_utime_h='<'utime.h'>'
28635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5
28636 printf %s "checking absolute name of <utime.h>... " >&6; }
28637 if test ${gl_cv_next_utime_h+y}
28639 printf %s "(cached) " >&6
28642 if test $ac_cv_header_utime_h = yes; then
28647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28648 /* end confdefs.h. */
28652 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28653 *) gl_absname_cpp="$ac_cpp" ;;
28658 gl_dirsep_regex='[/\\]'
28661 gl_dirsep_regex='\/'
28664 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28665 gl_header_literal_regex=`echo 'utime.h' \
28666 | sed -e "$gl_make_literal_regex_sed"`
28667 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28668 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28674 gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28675 sed -n "$gl_absolute_header_sed"`
28677 gl_header=$gl_cv_absolute_utime_h
28678 gl_cv_next_utime_h='"'$gl_header'"'
28680 gl_cv_next_utime_h='<'utime.h'>'
28685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5
28686 printf "%s\n" "$gl_cv_next_utime_h" >&6; }
28688 NEXT_UTIME_H=$gl_cv_next_utime_h
28690 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28691 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28692 gl_next_as_first_directive='<'utime.h'>'
28694 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28695 gl_next_as_first_directive=$gl_cv_next_utime_h
28697 NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive
28703 if test $ac_cv_header_utime_h = yes; then
28714 if test $ac_cv_header_utime_h != yes; then
28718 mingw*) UTIME_H=utime.h
28725 if test -n "$UTIME_H"; then
28726 GL_GENERATE_UTIME_H_TRUE=
28727 GL_GENERATE_UTIME_H_FALSE='#'
28729 GL_GENERATE_UTIME_H_TRUE='#'
28730 GL_GENERATE_UTIME_H_FALSE=
28741 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
28742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
28743 printf %s "checking whether futimesat handles NULL file... " >&6; }
28744 if test ${gl_cv_func_futimesat_works+y}
28746 printf %s "(cached) " >&6
28748 touch conftest.file
28749 if test "$cross_compiling" = yes
28752 # Guess yes on Linux systems.
28753 linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
28754 # Guess yes on glibc systems.
28755 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
28756 # If we don't know, assume the worst.
28757 *) gl_cv_func_futimesat_works="guessing no" ;;
28761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28762 /* end confdefs.h. */
28764 #include <stddef.h>
28765 #include <sys/times.h>
28771 int fd = open ("conftest.file", O_RDWR);
28772 if (fd < 0) return 1;
28773 if (futimesat (fd, NULL, NULL)) return 2;
28779 if ac_fn_c_try_run "$LINENO"
28781 gl_cv_func_futimesat_works=yes
28783 gl_cv_func_futimesat_works=no
28785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28786 conftest.$ac_objext conftest.beam conftest.$ac_ext
28789 rm -f conftest.file
28791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
28792 printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
28793 case "$gl_cv_func_futimesat_works" in
28797 printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
28805 if test $ac_cv_func_vasnprintf = no; then
28816 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
28826 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
28836 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
28846 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
28848 if test $ac_cv_func_vasnprintf = yes; then
28850 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28864 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28865 if test "x$ac_cv_type_ptrdiff_t" = xyes
28870 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
28898 gl_cv_func_vfprintf_posix=no
28899 case "$gl_cv_func_printf_sizes_c99" in
28901 case "$gl_cv_func_printf_long_double" in
28903 case "$gl_cv_func_printf_infinite" in
28905 case "$gl_cv_func_printf_infinite_long_double" in
28907 case "$gl_cv_func_printf_directive_a" in
28909 case "$gl_cv_func_printf_directive_f" in
28911 case "$gl_cv_func_printf_directive_n" in
28913 case "$gl_cv_func_printf_directive_ls" in
28915 case "$gl_cv_func_printf_positions" in
28917 case "$gl_cv_func_printf_flag_grouping" in
28919 case "$gl_cv_func_printf_flag_leftadjust" in
28921 case "$gl_cv_func_printf_flag_zero" in
28923 case "$gl_cv_func_printf_precision" in
28925 case "$gl_cv_func_printf_enomem" in
28927 # vfprintf exists and is
28928 # already POSIX compliant.
28929 gl_cv_func_vfprintf_posix=yes
28958 if test $gl_cv_func_vfprintf_posix = no; then
28962 case "$gl_cv_func_printf_infinite" in
28967 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
28975 case "$gl_cv_func_printf_long_double" in
28977 case "$gl_cv_func_printf_infinite_long_double" in
28982 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
28991 case "$gl_cv_func_printf_directive_a" in
28996 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
28998 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
28999 if test "x$ac_cv_func_nl_langinfo" = xyes
29001 printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
29010 case "$gl_cv_func_printf_directive_f" in
29015 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
29022 case "$gl_cv_func_printf_directive_ls" in
29027 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
29034 case "$gl_cv_func_printf_flag_grouping" in
29039 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
29046 case "$gl_cv_func_printf_flag_leftadjust" in
29051 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
29058 case "$gl_cv_func_printf_flag_zero" in
29063 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
29070 case "$gl_cv_func_printf_precision" in
29075 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
29078 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
29081 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
29088 case "$gl_cv_func_printf_enomem" in
29093 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
29096 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
29099 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
29114 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
29124 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
29134 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
29144 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
29146 if test $ac_cv_func_vasnprintf = yes; then
29148 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
29162 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
29163 if test "x$ac_cv_type_ptrdiff_t" = xyes
29168 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
29189 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
29193 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
29204 GNULIB_VFPRINTF_POSIX=1
29210 printf "%s\n" "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
29226 if test $gl_cv_have_include_next = yes; then
29227 gl_cv_next_wchar_h='<'wchar.h'>'
29229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
29230 printf %s "checking absolute name of <wchar.h>... " >&6; }
29231 if test ${gl_cv_next_wchar_h+y}
29233 printf %s "(cached) " >&6
29236 if test $ac_cv_header_wchar_h = yes; then
29241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29242 /* end confdefs.h. */
29246 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29247 *) gl_absname_cpp="$ac_cpp" ;;
29252 gl_dirsep_regex='[/\\]'
29255 gl_dirsep_regex='\/'
29258 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29259 gl_header_literal_regex=`echo 'wchar.h' \
29260 | sed -e "$gl_make_literal_regex_sed"`
29261 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29262 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29268 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29269 sed -n "$gl_absolute_header_sed"`
29271 gl_header=$gl_cv_absolute_wchar_h
29272 gl_cv_next_wchar_h='"'$gl_header'"'
29274 gl_cv_next_wchar_h='<'wchar.h'>'
29279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
29280 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
29282 NEXT_WCHAR_H=$gl_cv_next_wchar_h
29284 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29285 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29286 gl_next_as_first_directive='<'wchar.h'>'
29288 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29289 gl_next_as_first_directive=$gl_cv_next_wchar_h
29291 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
29296 if test $ac_cv_header_wchar_h = yes; then
29306 if test $gt_cv_c_wint_t = yes; then
29320 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29321 if test "x$ac_cv_header_stdint_h" = xyes
29323 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
29332 # End of code from modules
29353 gl_source_base='tests'
29354 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
29356 gl_module_indicator_condition=$gltests_WITNESS
29366 LIBGZIP_LIBDEPS="$gl_libdeps"
29368 LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
29372 # Check whether --enable-gcc-warnings was given.
29373 if test ${enable_gcc_warnings+y}
29375 enableval=$enable_gcc_warnings; case $enableval in
29377 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
29379 gl_gcc_warnings=$enableval
29381 if test -d "$srcdir"/.git; then
29382 gl_gcc_warnings=yes
29390 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
29391 # ------------------------------------------------
29392 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
29393 # Otherwise, run RUN-IF-NOT-FOUND.
29396 if test "$gl_gcc_warnings" = yes; then
29399 ac_cpp='$CPP $CPPFLAGS'
29400 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29401 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29402 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
29406 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
29407 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
29409 printf %s "(cached) " >&6
29412 gl_save_compiler_FLAGS="$CFLAGS"
29413 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
29414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29415 /* end confdefs.h. */
29425 if ac_fn_c_try_link "$LINENO"
29427 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
29429 gl_cv_warn_c__Werror__Wunknown_warning_option=no
29431 rm -f core conftest.err conftest.$ac_objext \
29432 conftest$ac_exeext conftest.$ac_ext
29433 CFLAGS="$gl_save_compiler_FLAGS"
29436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
29437 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
29438 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
29440 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
29442 gl_unknown_warnings_are_errors=
29446 ac_cpp='$CPP $CPPFLAGS'
29447 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29448 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29449 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
29455 printf %s "checking whether C compiler handles -Werror... " >&6; }
29456 if test ${gl_cv_warn_c__Werror+y}
29458 printf %s "(cached) " >&6
29461 gl_save_compiler_FLAGS="$CFLAGS"
29462 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
29463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29464 /* end confdefs.h. */
29474 if ac_fn_c_try_link "$LINENO"
29476 gl_cv_warn_c__Werror=yes
29478 gl_cv_warn_c__Werror=no
29480 rm -f core conftest.err conftest.$ac_objext \
29481 conftest$ac_exeext conftest.$ac_ext
29482 CFLAGS="$gl_save_compiler_FLAGS"
29485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
29486 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
29487 if test "x$gl_cv_warn_c__Werror" = xyes
29489 as_fn_append WERROR_CFLAGS " -Werror"
29496 # This, $nw, is the list of warnings we disable.
29497 nw="$nw -Wdeclaration-after-statement" # too useful to forbid
29498 nw="$nw -Waggregate-return" # anachronistic
29499 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
29500 nw="$nw -Wc++-compat" # We don't care about C++ compilers
29501 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
29502 nw="$nw -Wtraditional" # Warns on #elif which we use often
29503 nw="$nw -Wcast-qual" # Too many warnings for now
29504 nw="$nw -Wconversion" # Too many warnings for now
29505 nw="$nw -Wduplicated-branches" # Too many false alarms
29506 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
29507 nw="$nw -Wsign-conversion" # Too many warnings for now
29508 nw="$nw -Wtraditional-conversion" # Too many warnings for now
29509 nw="$nw -Wpadded" # Our structs are not padded
29510 nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat
29511 nw="$nw -Wlogical-op" # any use of fwrite provokes this
29512 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
29513 nw="$nw -Wvla" # warnings in gettext.h
29514 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
29515 nw="$nw -Wswitch-enum" # Too many warnings for now
29516 nw="$nw -Wswitch-default" # Too many warnings for now
29517 nw="$nw -Wstack-protector" # not worth working around
29518 # things I might fix soon:
29519 nw="$nw -Wfloat-equal" # sort.c, seq.c
29520 nw="$nw -Wmissing-format-attribute" # copy.c
29521 nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
29522 nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
29524 # Warnings that gzip runs afoul of but coreutils does not.
29525 nw="$nw -Wold-style-definition"
29527 nw="$nw -Wstrict-overflow"
29529 # Using -Wstrict-overflow is a pain, but the alternative is worse.
29530 # For an example, see the code that provoked this report:
29531 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
29532 # Code like that still infloops with gcc-4.6.0 and -O2. Scary indeed.
29536 ac_cpp='$CPP $CPPFLAGS'
29537 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29538 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29539 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29543 if test -n "$GCC"; then
29545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
29546 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
29547 if test ${gl_cv_cc_nomfi_supported+y}
29549 printf %s "(cached) " >&6
29551 gl_save_CFLAGS="$CFLAGS"
29552 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
29553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29554 /* end confdefs.h. */
29564 if ac_fn_c_try_compile "$LINENO"
29566 gl_cv_cc_nomfi_supported=yes
29568 gl_cv_cc_nomfi_supported=no
29570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29571 CFLAGS="$gl_save_CFLAGS"
29574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
29575 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
29577 if test "$gl_cv_cc_nomfi_supported" = yes; then
29578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
29579 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
29580 if test ${gl_cv_cc_nomfi_needed+y}
29582 printf %s "(cached) " >&6
29584 gl_save_CFLAGS="$CFLAGS"
29585 CFLAGS="$CFLAGS -W -Werror"
29586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29587 /* end confdefs.h. */
29590 typedef struct { int a; int b; } s_t;
29603 if ac_fn_c_try_compile "$LINENO"
29605 gl_cv_cc_nomfi_needed=no
29607 gl_cv_cc_nomfi_needed=yes
29609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29610 CFLAGS="$gl_save_CFLAGS"
29613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
29614 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
29617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
29618 printf %s "checking whether -Wuninitialized is supported... " >&6; }
29619 if test ${gl_cv_cc_uninitialized_supported+y}
29621 printf %s "(cached) " >&6
29623 gl_save_CFLAGS="$CFLAGS"
29624 CFLAGS="$CFLAGS -Werror -Wuninitialized"
29625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29626 /* end confdefs.h. */
29636 if ac_fn_c_try_compile "$LINENO"
29638 gl_cv_cc_uninitialized_supported=yes
29640 gl_cv_cc_uninitialized_supported=no
29642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29643 CFLAGS="$gl_save_CFLAGS"
29646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
29647 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
29651 # List all gcc warning categories.
29652 # To compare this list to your installed GCC's, run this Bash command:
29655 # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
29656 # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
29657 # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
29660 for gl_manywarn_item in -fno-common \
29663 -Waggressive-loop-optimizations \
29665 -Wattribute-alias \
29667 -Wbad-function-cast \
29670 -Wbuiltin-declaration-mismatch \
29671 -Wbuiltin-macro-redefined \
29673 -Wcast-align=strict \
29674 -Wcast-function-type \
29675 -Wchar-subscripts \
29679 -Wcoverage-mismatch \
29684 -Wdeprecated-declarations \
29685 -Wdesignated-init \
29686 -Wdisabled-optimization \
29687 -Wdiscarded-array-qualifiers \
29688 -Wdiscarded-qualifiers \
29690 -Wdouble-promotion \
29691 -Wduplicated-branches \
29692 -Wduplicated-cond \
29693 -Wduplicate-decl-specifier \
29697 -Wexpansion-to-defined \
29699 -Wformat-contains-nul \
29700 -Wformat-extra-args \
29701 -Wformat-nonliteral \
29702 -Wformat-security \
29703 -Wformat-signedness \
29705 -Wformat-zero-length \
29707 -Wfree-nonheap-object \
29710 -Wignored-attributes \
29711 -Wignored-qualifiers \
29713 -Wimplicit-function-declaration \
29715 -Wincompatible-pointer-types \
29719 -Wint-in-bool-context \
29720 -Wint-to-pointer-cast \
29721 -Winvalid-memory-model \
29723 -Wlogical-not-parentheses \
29726 -Wmaybe-uninitialized \
29727 -Wmemset-elt-size \
29728 -Wmemset-transposed-args \
29729 -Wmisleading-indentation \
29730 -Wmissing-attributes \
29732 -Wmissing-declarations \
29733 -Wmissing-field-initializers \
29734 -Wmissing-include-dirs \
29735 -Wmissing-parameter-type \
29736 -Wmissing-prototypes \
29738 -Wmultistatement-macros \
29742 -Wnonnull-compare \
29743 -Wnull-dereference \
29745 -Wold-style-declaration \
29746 -Wold-style-definition \
29749 -Woverlength-strings \
29752 -Wpacked-bitfield-compat \
29753 -Wpacked-not-aligned \
29756 -Wpointer-compare \
29758 -Wpointer-to-int-cast \
29762 -Wreturn-local-addr \
29764 -Wscalar-storage-order \
29767 -Wshift-count-negative \
29768 -Wshift-count-overflow \
29769 -Wshift-negative-value \
29770 -Wsizeof-array-argument \
29771 -Wsizeof-pointer-div \
29772 -Wsizeof-pointer-memaccess \
29773 -Wstack-protector \
29774 -Wstrict-aliasing \
29775 -Wstrict-overflow \
29776 -Wstrict-prototypes \
29777 -Wstringop-truncation \
29778 -Wsuggest-attribute=cold \
29779 -Wsuggest-attribute=const \
29780 -Wsuggest-attribute=format \
29781 -Wsuggest-attribute=malloc \
29782 -Wsuggest-attribute=noreturn \
29783 -Wsuggest-attribute=pure \
29784 -Wsuggest-final-methods \
29785 -Wsuggest-final-types \
29788 -Wswitch-unreachable \
29791 -Wtautological-compare \
29796 -Wunknown-pragmas \
29797 -Wunsafe-loop-optimizations \
29799 -Wunused-but-set-parameter \
29800 -Wunused-but-set-variable \
29801 -Wunused-function \
29803 -Wunused-local-typedefs \
29805 -Wunused-parameter \
29808 -Wunused-variable \
29810 -Wvariadic-macros \
29811 -Wvector-operation-performance \
29813 -Wvolatile-register-var \
29817 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
29820 # gcc --help=warnings outputs an unusual form for these options; list
29821 # them here so that the above 'comm' command doesn't report a false match.
29822 # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
29823 # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
29824 # the only platforms where it does not fit in a long, so make that
29826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5
29827 printf %s "checking max safe object size... " >&6; }
29828 if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
29830 : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max" "#include <limits.h>
29831 #include <stddef.h>
29832 #include <stdint.h>
29837 gl_alloc_max=2147483647
29840 case $gl_alloc_max in
29841 -1) gl_alloc_max=9223372036854775807;;
29843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5
29844 printf "%s\n" "$gl_alloc_max" >&6; }
29845 gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
29846 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
29847 gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
29848 gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
29849 gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
29850 gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
29851 gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
29852 gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
29853 gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
29854 gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
29856 # These are needed for older GCC versions.
29857 if test -n "$GCC"; then
29858 case `($CC --version) 2>/dev/null` in
29859 'gcc (GCC) '[0-3].* | \
29860 'gcc (GCC) '4.[0-7].*)
29861 gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
29862 gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
29867 # Disable specific options as needed.
29868 if test "$gl_cv_cc_nomfi_needed" = yes; then
29869 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
29872 if test "$gl_cv_cc_uninitialized_supported" = no; then
29873 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
29876 ws=$gl_manywarn_set
29879 ac_cpp='$CPP $CPPFLAGS'
29880 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29881 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29882 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29891 *" $gl_warn_item "*)
29894 gl_warn_set="$gl_warn_set $gl_warn_item"
29903 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
29905 case $gl_positive in
29906 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
29908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
29909 printf %s "checking whether C compiler handles $w... " >&6; }
29910 if eval test \${$as_gl_Warn+y}
29912 printf %s "(cached) " >&6
29915 gl_save_compiler_FLAGS="$CFLAGS"
29916 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
29917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29918 /* end confdefs.h. */
29928 if ac_fn_c_try_link "$LINENO"
29930 eval "$as_gl_Warn=yes"
29932 eval "$as_gl_Warn=no"
29934 rm -f core conftest.err conftest.$ac_objext \
29935 conftest$ac_exeext conftest.$ac_ext
29936 CFLAGS="$gl_save_compiler_FLAGS"
29939 eval ac_res=\$$as_gl_Warn
29940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29941 printf "%s\n" "$ac_res" >&6; }
29942 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
29944 as_fn_append WARN_CFLAGS " $w"
29951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
29952 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
29953 if test ${gl_cv_warn_c__Wno_sign_compare+y}
29955 printf %s "(cached) " >&6
29958 gl_save_compiler_FLAGS="$CFLAGS"
29959 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
29960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29961 /* end confdefs.h. */
29971 if ac_fn_c_try_link "$LINENO"
29973 gl_cv_warn_c__Wno_sign_compare=yes
29975 gl_cv_warn_c__Wno_sign_compare=no
29977 rm -f core conftest.err conftest.$ac_objext \
29978 conftest$ac_exeext conftest.$ac_ext
29979 CFLAGS="$gl_save_compiler_FLAGS"
29982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
29983 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
29984 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
29986 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
29989 # Too many warnings for now
29992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
29993 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
29994 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
29996 printf %s "(cached) " >&6
29999 gl_save_compiler_FLAGS="$CFLAGS"
30000 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
30001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30002 /* end confdefs.h. */
30012 if ac_fn_c_try_link "$LINENO"
30014 gl_cv_warn_c__Wno_unused_parameter=yes
30016 gl_cv_warn_c__Wno_unused_parameter=no
30018 rm -f core conftest.err conftest.$ac_objext \
30019 conftest$ac_exeext conftest.$ac_ext
30020 CFLAGS="$gl_save_compiler_FLAGS"
30023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
30024 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
30025 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
30027 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
30030 # Too many warnings for now
30033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5
30034 printf %s "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; }
30035 if test ${gl_cv_warn_c__Wsuggest_attribute_const+y}
30037 printf %s "(cached) " >&6
30040 gl_save_compiler_FLAGS="$CFLAGS"
30041 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=const"
30042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30043 /* end confdefs.h. */
30053 if ac_fn_c_try_link "$LINENO"
30055 gl_cv_warn_c__Wsuggest_attribute_const=yes
30057 gl_cv_warn_c__Wsuggest_attribute_const=no
30059 rm -f core conftest.err conftest.$ac_objext \
30060 conftest$ac_exeext conftest.$ac_ext
30061 CFLAGS="$gl_save_compiler_FLAGS"
30064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_const" >&5
30065 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_const" >&6; }
30066 if test "x$gl_cv_warn_c__Wsuggest_attribute_const" = xyes
30068 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=const"
30074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=noreturn" >&5
30075 printf %s "checking whether C compiler handles -Wsuggest-attribute=noreturn... " >&6; }
30076 if test ${gl_cv_warn_c__Wsuggest_attribute_noreturn+y}
30078 printf %s "(cached) " >&6
30081 gl_save_compiler_FLAGS="$CFLAGS"
30082 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=noreturn"
30083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30084 /* end confdefs.h. */
30094 if ac_fn_c_try_link "$LINENO"
30096 gl_cv_warn_c__Wsuggest_attribute_noreturn=yes
30098 gl_cv_warn_c__Wsuggest_attribute_noreturn=no
30100 rm -f core conftest.err conftest.$ac_objext \
30101 conftest$ac_exeext conftest.$ac_ext
30102 CFLAGS="$gl_save_compiler_FLAGS"
30105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_noreturn" >&5
30106 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_noreturn" >&6; }
30107 if test "x$gl_cv_warn_c__Wsuggest_attribute_noreturn" = xyes
30109 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
30115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
30116 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
30117 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
30119 printf %s "(cached) " >&6
30122 gl_save_compiler_FLAGS="$CFLAGS"
30123 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
30124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30125 /* end confdefs.h. */
30135 if ac_fn_c_try_link "$LINENO"
30137 gl_cv_warn_c__Wno_format_nonliteral=yes
30139 gl_cv_warn_c__Wno_format_nonliteral=no
30141 rm -f core conftest.err conftest.$ac_objext \
30142 conftest$ac_exeext conftest.$ac_ext
30143 CFLAGS="$gl_save_compiler_FLAGS"
30146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
30147 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
30148 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
30150 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
30155 # Enable this warning only with gcc-4.7 and newer. With 4.6.2 20111027,
30156 # it suggests test.c's advance function may be pure, even though it
30157 # increments a global variable. Oops.
30158 # Normally we'd write code to test for the precise failure, but that
30159 # requires a relatively large input to make gcc exhibit the failure.
30160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30161 /* end confdefs.h. */
30163 #if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
30166 # error "your version of gcc is older than 4.7"
30178 if ac_fn_c_try_cpp "$LINENO"
30182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5
30183 printf %s "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; }
30184 if test ${gl_cv_warn_c__Wsuggest_attribute_pure+y}
30186 printf %s "(cached) " >&6
30189 gl_save_compiler_FLAGS="$CFLAGS"
30190 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=pure"
30191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30192 /* end confdefs.h. */
30202 if ac_fn_c_try_link "$LINENO"
30204 gl_cv_warn_c__Wsuggest_attribute_pure=yes
30206 gl_cv_warn_c__Wsuggest_attribute_pure=no
30208 rm -f core conftest.err conftest.$ac_objext \
30209 conftest$ac_exeext conftest.$ac_ext
30210 CFLAGS="$gl_save_compiler_FLAGS"
30213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_pure" >&5
30214 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_pure" >&6; }
30215 if test "x$gl_cv_warn_c__Wsuggest_attribute_pure" = xyes
30217 as_fn_append WARN_CFLAGS " -Wsuggest-attribute=pure"
30222 rm -f conftest.err conftest.i conftest.$ac_ext
30226 # In spite of excluding -Wlogical-op above, it is enabled, as of
30227 # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
30230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
30231 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
30232 if test ${gl_cv_warn_c__Wno_logical_op+y}
30234 printf %s "(cached) " >&6
30237 gl_save_compiler_FLAGS="$CFLAGS"
30238 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
30239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30240 /* end confdefs.h. */
30250 if ac_fn_c_try_link "$LINENO"
30252 gl_cv_warn_c__Wno_logical_op=yes
30254 gl_cv_warn_c__Wno_logical_op=no
30256 rm -f core conftest.err conftest.$ac_objext \
30257 conftest$ac_exeext conftest.$ac_ext
30258 CFLAGS="$gl_save_compiler_FLAGS"
30261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
30262 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
30263 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes
30265 as_fn_append WARN_CFLAGS " -Wno-logical-op"
30272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
30273 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
30274 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
30276 printf %s "(cached) " >&6
30279 gl_save_compiler_FLAGS="$CFLAGS"
30280 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
30281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30282 /* end confdefs.h. */
30292 if ac_fn_c_try_link "$LINENO"
30294 gl_cv_warn_c__fdiagnostics_show_option=yes
30296 gl_cv_warn_c__fdiagnostics_show_option=no
30298 rm -f core conftest.err conftest.$ac_objext \
30299 conftest$ac_exeext conftest.$ac_ext
30300 CFLAGS="$gl_save_compiler_FLAGS"
30303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
30304 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
30305 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
30307 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
30313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
30314 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
30315 if test ${gl_cv_warn_c__funit_at_a_time+y}
30317 printf %s "(cached) " >&6
30320 gl_save_compiler_FLAGS="$CFLAGS"
30321 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
30322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30323 /* end confdefs.h. */
30333 if ac_fn_c_try_link "$LINENO"
30335 gl_cv_warn_c__funit_at_a_time=yes
30337 gl_cv_warn_c__funit_at_a_time=no
30339 rm -f core conftest.err conftest.$ac_objext \
30340 conftest$ac_exeext conftest.$ac_ext
30341 CFLAGS="$gl_save_compiler_FLAGS"
30344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
30345 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
30346 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
30348 as_fn_append WARN_CFLAGS " -funit-at-a-time"
30356 printf "%s\n" "#define lint 1" >>confdefs.h
30360 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
30363 # We use a slightly smaller set of warning options for lib/.
30364 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
30366 nw="$nw -Wstrict-overflow"
30367 nw="$nw -Wformat-truncation=2"
30368 nw="$nw -Wuninitialized"
30369 nw="$nw -Wunused-macros"
30370 nw="$nw -Wmissing-prototypes"
30371 nw="$nw -Wold-style-definition"
30374 set x $WARN_CFLAGS; shift
30378 *" $gl_warn_item "*)
30381 gl_warn_set="$gl_warn_set $gl_warn_item"
30385 GNULIB_WARN_CFLAGS=$gl_warn_set
30390 # cc -E produces incorrect asm files on SVR4, so postprocess it.
30391 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
30394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
30395 printf %s "checking for underline in external names... " >&6; }
30396 if test ${gzip_cv_underline+y}
30398 printf %s "(cached) " >&6
30400 gzip_cv_underline=yes
30401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30402 /* end confdefs.h. */
30403 int foo() {return 0;}
30412 if ac_fn_c_try_compile "$LINENO"
30414 $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
30415 gzip_cv_underline=no
30417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
30420 printf "%s\n" "$gzip_cv_underline" >&6; }
30422 if test $gzip_cv_underline = no; then
30423 ASCPPFLAGS='-DNO_UNDERLINE'
30428 # Try to assemble match.S.
30429 # "gcc -E match.s" ignores -E, so we must use _match.S.
30430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
30431 printf %s "checking for an assembler syntax supported by this package... " >&6; }
30432 if test ${gzip_cv_assembler+y}
30434 printf %s "(cached) " >&6
30436 gzip_cv_assembler=no
30440 if cp $srcdir/lib/match.c _match.S &&
30441 eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
30442 eval "$ASCPPPOST < _match.i > match_.s"; then
30443 if test ! -s match_.s || grep error < match_.s > /dev/null; then
30445 elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
30446 test -f match_.$OBJEXT; then
30447 rm -f match_.$OBJEXT
30448 gzip_cv_assembler=yes
30449 if echo 'void foo (void) {}' > conftest.c &&
30450 eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
30451 grep '\.note\.GNU-stack' conftest.s >/dev/null &&
30452 eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
30453 test -f match_.$OBJEXT; then
30454 gzip_cv_assembler='yes, with -Wa,--noexecstack'
30458 rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
30461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
30462 printf "%s\n" "$gzip_cv_assembler" >&6; }
30463 if test "$gzip_cv_assembler" != no; then
30465 printf "%s\n" "#define ASMV /**/" >>confdefs.h
30467 case " $LIBOBJS " in
30468 *" match.$ac_objext "* ) ;;
30469 *) LIBOBJS="$LIBOBJS match.$ac_objext"
30474 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
30475 ASFLAGS_config='-Wa,--noexecstack'
30481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
30482 printf %s "checking for library containing strerror... " >&6; }
30483 if test ${ac_cv_search_strerror+y}
30485 printf %s "(cached) " >&6
30487 ac_func_search_save_LIBS=$LIBS
30488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30489 /* end confdefs.h. */
30491 /* Override any GCC internal prototype to avoid an error.
30492 Use char because int might match the return type of a GCC
30493 builtin and then its argument prototype would still apply. */
30501 return strerror ();
30506 for ac_lib in '' cposix
30508 if test -z "$ac_lib"; then
30509 ac_res="none required"
30512 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
30514 if ac_fn_c_try_link "$LINENO"
30516 ac_cv_search_strerror=$ac_res
30518 rm -f core conftest.err conftest.$ac_objext \
30520 if test ${ac_cv_search_strerror+y}
30525 if test ${ac_cv_search_strerror+y}
30529 ac_cv_search_strerror=no
30531 rm conftest.$ac_ext
30532 LIBS=$ac_func_search_save_LIBS
30534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
30535 printf "%s\n" "$ac_cv_search_strerror" >&6; }
30536 ac_res=$ac_cv_search_strerror
30537 if test "$ac_res" != no
30539 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
30544 printf %s "checking for an ANSI C-conforming const... " >&6; }
30545 if test ${ac_cv_c_const+y}
30547 printf %s "(cached) " >&6
30549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30550 /* end confdefs.h. */
30556 #ifndef __cplusplus
30557 /* Ultrix mips cc rejects this sort of thing. */
30558 typedef int charset[2];
30559 const charset cs = { 0, 0 };
30560 /* SunOS 4.1.1 cc rejects this. */
30561 char const *const *pcpcc;
30563 /* NEC SVR4.0.2 mips cc rejects this. */
30564 struct point {int x, y;};
30565 static struct point const zero = {0,0};
30566 /* IBM XL C 1.02.0.0 rejects this.
30567 It does not let you subtract one const X* pointer from another in
30568 an arm of an if-expression whose if-part is not a constant
30570 const char *g = "string";
30571 pcpcc = &g + (g ? g-g : 0);
30572 /* HPUX 7.0 cc rejects these. */
30574 ppc = (char**) pcpcc;
30575 pcpcc = (char const *const *) ppc;
30576 { /* SCO 3.2v4 cc rejects this sort of thing. */
30579 char const *s = 0 ? (char *) 0 : (char const *) 0;
30584 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
30585 int x[] = {25, 17};
30586 const int *foo = &x[0];
30589 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
30590 typedef const int *iptr;
30594 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
30595 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
30596 struct s { int j; const int *ap[3]; } bx;
30597 struct s *b = &bx; b->j = 5;
30599 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
30600 const int foo = 10;
30601 if (!foo) return 0;
30603 return !cs[0] && !zero.x;
30610 if ac_fn_c_try_compile "$LINENO"
30616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
30619 printf "%s\n" "$ac_cv_c_const" >&6; }
30620 if test $ac_cv_c_const = no; then
30622 printf "%s\n" "#define const /**/" >>confdefs.h
30626 # Autoupdate added the following line to ensure that your configure
30627 # script's behavior did not change. It is probably safe to remove.
30637 ac_header_dirent=no
30638 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
30639 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
30640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
30641 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
30642 if eval test \${$as_ac_Header+y}
30644 printf %s "(cached) " >&6
30646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30647 /* end confdefs.h. */
30648 #include <sys/types.h>
30660 if ac_fn_c_try_compile "$LINENO"
30662 eval "$as_ac_Header=yes"
30664 eval "$as_ac_Header=no"
30666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30668 eval ac_res=\$$as_ac_Header
30669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30670 printf "%s\n" "$ac_res" >&6; }
30671 if eval test \"x\$"$as_ac_Header"\" = x"yes"
30673 cat >>confdefs.h <<_ACEOF
30674 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
30677 ac_header_dirent=$ac_hdr; break
30681 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
30682 if test $ac_header_dirent = dirent.h; then
30683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
30684 printf %s "checking for library containing opendir... " >&6; }
30685 if test ${ac_cv_search_opendir+y}
30687 printf %s "(cached) " >&6
30689 ac_func_search_save_LIBS=$LIBS
30690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30691 /* end confdefs.h. */
30693 /* Override any GCC internal prototype to avoid an error.
30694 Use char because int might match the return type of a GCC
30695 builtin and then its argument prototype would still apply. */
30708 for ac_lib in '' dir
30710 if test -z "$ac_lib"; then
30711 ac_res="none required"
30714 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
30716 if ac_fn_c_try_link "$LINENO"
30718 ac_cv_search_opendir=$ac_res
30720 rm -f core conftest.err conftest.$ac_objext \
30722 if test ${ac_cv_search_opendir+y}
30727 if test ${ac_cv_search_opendir+y}
30731 ac_cv_search_opendir=no
30733 rm conftest.$ac_ext
30734 LIBS=$ac_func_search_save_LIBS
30736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
30737 printf "%s\n" "$ac_cv_search_opendir" >&6; }
30738 ac_res=$ac_cv_search_opendir
30739 if test "$ac_res" != no
30741 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
30747 printf %s "checking for library containing opendir... " >&6; }
30748 if test ${ac_cv_search_opendir+y}
30750 printf %s "(cached) " >&6
30752 ac_func_search_save_LIBS=$LIBS
30753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30754 /* end confdefs.h. */
30756 /* Override any GCC internal prototype to avoid an error.
30757 Use char because int might match the return type of a GCC
30758 builtin and then its argument prototype would still apply. */
30773 if test -z "$ac_lib"; then
30774 ac_res="none required"
30777 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
30779 if ac_fn_c_try_link "$LINENO"
30781 ac_cv_search_opendir=$ac_res
30783 rm -f core conftest.err conftest.$ac_objext \
30785 if test ${ac_cv_search_opendir+y}
30790 if test ${ac_cv_search_opendir+y}
30794 ac_cv_search_opendir=no
30796 rm conftest.$ac_ext
30797 LIBS=$ac_func_search_save_LIBS
30799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
30800 printf "%s\n" "$ac_cv_search_opendir" >&6; }
30801 ac_res=$ac_cv_search_opendir
30802 if test "$ac_res" != no
30804 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
30811 printf %s "checking return type of signal handlers... " >&6; }
30812 if test ${ac_cv_type_signal+y}
30814 printf %s "(cached) " >&6
30816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30817 /* end confdefs.h. */
30818 #include <sys/types.h>
30819 #include <signal.h>
30824 return *(signal (0, 0)) (0) == 1;
30829 if ac_fn_c_try_compile "$LINENO"
30831 ac_cv_type_signal=int
30833 ac_cv_type_signal=void
30835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
30838 printf "%s\n" "$ac_cv_type_signal" >&6; }
30840 printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h
30843 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
30844 if test "x$ac_cv_type_size_t" = xyes
30849 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
30853 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
30854 if test "x$ac_cv_type_off_t" = xyes
30859 printf "%s\n" "#define off_t long int" >>confdefs.h
30864 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
30866 cat >confcache <<\_ACEOF
30867 # This file is a shell script that caches the results of configure
30868 # tests run on this system so they can be shared between configure
30869 # scripts and configure runs, see configure's option --config-cache.
30870 # It is not useful on other systems. If it contains results you don't
30871 # want to keep, you may remove or edit it.
30873 # config.status only pays attention to the cache file if you give it
30874 # the --recheck option to rerun configure.
30876 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30877 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30878 # following values.
30882 # The following way of writing the cache mishandles newlines in values,
30883 # but we know of no workaround that is simple, portable, and efficient.
30884 # So, we kill variables containing newlines.
30885 # Ultrix sh set writes to stderr and can't be redirected directly,
30886 # and sets the high bit in the cache file unless we assign to the vars.
30888 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30889 eval ac_val=\$$ac_var
30893 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30894 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30897 _ | IFS | as_nl) ;; #(
30898 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30899 *) { eval $ac_var=; unset $ac_var;} ;;
30905 case $as_nl`(ac_space=' '; set) 2>&1` in #(
30906 *${as_nl}ac_space=\ *)
30907 # `set' does not quote correctly, so add quotes: double-quote
30908 # substitution turns \\\\ into \\, and sed turns \\ into \.
30911 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30914 # `set' quotes correctly as required by POSIX, so do not add quotes.
30915 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30924 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
30926 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30928 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30929 if test -w "$cache_file"; then
30930 if test "x$cache_file" != "x/dev/null"; then
30931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30932 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
30933 if test ! -f "$cache_file" || test -h "$cache_file"; then
30934 cat confcache >"$cache_file"
30936 case $cache_file in #(
30938 mv -f confcache "$cache_file"$$ &&
30939 mv -f "$cache_file"$$ "$cache_file" ;; #(
30941 mv -f confcache "$cache_file" ;;
30946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30947 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
30952 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30953 # Let make expand exec_prefix.
30954 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30956 DEFS=-DHAVE_CONFIG_H
30961 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30962 # 1. Remove the extension, and $U if already installed.
30963 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30964 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
30965 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
30966 # will be set to the directory where LIBOBJS objects are built.
30967 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30968 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30970 LIBOBJS=$ac_libobjs
30972 LTLIBOBJS=$ac_ltlibobjs
30975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30976 printf %s "checking that generated files are newer than configure... " >&6; }
30977 if test -n "$am_sleep_pid"; then
30978 # Hide warnings about reused PIDs.
30979 wait $am_sleep_pid 2>/dev/null
30981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
30982 printf "%s\n" "done" >&6; }
30983 if test -n "$EXEEXT"; then
30985 am__EXEEXT_FALSE='#'
30987 am__EXEEXT_TRUE='#'
30991 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30992 as_fn_error $? "conditional \"AMDEP\" was never defined.
30993 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30995 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30996 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30997 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30999 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
31000 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
31001 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31003 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
31004 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
31005 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31007 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
31008 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
31009 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31011 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
31012 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
31013 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31017 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
31018 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
31019 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31021 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
31022 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
31023 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31025 CONFIG_INCLUDE=lib/config.h
31027 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
31028 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
31029 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31031 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
31032 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
31033 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31035 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
31036 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
31037 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31039 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
31040 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
31041 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31043 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
31044 as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
31045 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31047 if test -z "${GL_GENERATE_UTIME_H_TRUE}" && test -z "${GL_GENERATE_UTIME_H_FALSE}"; then
31048 as_fn_error $? "conditional \"GL_GENERATE_UTIME_H\" was never defined.
31049 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31054 if test -n "$gl_LIBOBJS"; then
31055 # Remove the extension.
31056 sed_drop_objext='s/\.o$//;s/\.obj$//'
31057 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
31058 gl_libobjs="$gl_libobjs $i.$ac_objext"
31059 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
31062 gl_LIBOBJS=$gl_libobjs
31064 gl_LTLIBOBJS=$gl_ltlibobjs
31070 if test -n "$gltests_LIBOBJS"; then
31071 # Remove the extension.
31072 sed_drop_objext='s/\.o$//;s/\.obj$//'
31073 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
31074 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
31075 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
31078 gltests_LIBOBJS=$gltests_libobjs
31080 gltests_LTLIBOBJS=$gltests_ltlibobjs
31084 : "${CONFIG_STATUS=./config.status}"
31086 ac_clean_files_save=$ac_clean_files
31087 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31089 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
31091 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31093 # Generated by $as_me.
31094 # Run this file to recreate the current configuration.
31095 # Compiler output produced by configure, useful for debugging
31096 # configure, is in config.log if it exists.
31099 ac_cs_recheck=false
31102 SHELL=\${CONFIG_SHELL-$SHELL}
31105 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31106 ## -------------------- ##
31107 ## M4sh Initialization. ##
31108 ## -------------------- ##
31110 # Be more Bourne compatible
31111 DUALCASE=1; export DUALCASE # for MKS sh
31112 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
31116 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31117 # is contrary to our usage. Disable this feature.
31118 alias -g '${1+"$@"}'='"$@"'
31119 setopt NO_GLOB_SUBST
31121 case `(set -o) 2>/dev/null` in #(
31130 # The user is always right.
31131 if ${PATH_SEPARATOR+false} :; then
31133 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31134 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31141 # We need space, tab and new line, in precisely that order. Quoting is
31142 # there to prevent editors from complaining about space-tab.
31143 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
31144 # splitting by setting IFS to empty value.)
31150 # Find who we are. Look in the path if we contain no directory separator.
31153 *[\\/]* ) as_myself=$0 ;;
31154 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31155 for as_dir in $PATH
31158 case $as_dir in #(((
31161 *) as_dir=$as_dir/ ;;
31163 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
31169 # We did not find ourselves, most probably we were run as `sh COMMAND'
31170 # in which case we are not to be found in the path.
31171 if test "x$as_myself" = x; then
31174 if test ! -f "$as_myself"; then
31175 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31179 # Unset variables that we do not need and which cause bugs (e.g. in
31180 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
31181 # suppresses any "Segmentation fault" message there. '((' could
31182 # trigger a bug in pdksh 5.2.14.
31183 for as_var in BASH_ENV ENV MAIL MAILPATH
31184 do eval test \${$as_var+y} \
31185 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31198 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31201 # as_fn_error STATUS ERROR [LINENO LOG_FD]
31202 # ----------------------------------------
31203 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31204 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31205 # script with STATUS, using 1 if that was 0.
31208 as_status=$1; test $as_status -eq 0 && as_status=1
31210 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31211 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31213 printf "%s\n" "$as_me: error: $2" >&2
31214 as_fn_exit $as_status
31218 # as_fn_set_status STATUS
31219 # -----------------------
31220 # Set $? to STATUS, without forking.
31221 as_fn_set_status ()
31224 } # as_fn_set_status
31226 # as_fn_exit STATUS
31227 # -----------------
31228 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31232 as_fn_set_status $1
31238 # Portably unset VAR.
31241 { eval $1=; unset $1;}
31243 as_unset=as_fn_unset
31244 # as_fn_append VAR VALUE
31245 # ----------------------
31246 # Append the text in VALUE to the end of the definition contained in VAR. Take
31247 # advantage of any shell optimizations that allow amortized linear growth over
31248 # repeated appends, instead of the typical quadratic growth present in naive
31250 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
31252 eval 'as_fn_append ()
31263 # as_fn_arith ARG...
31264 # ------------------
31265 # Perform arithmetic evaluation on the ARGs, and store the result in the
31266 # global $as_val. Take advantage of shells that can avoid forks. The arguments
31267 # must be portable across $(()) and expr.
31268 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
31270 eval 'as_fn_arith ()
31277 as_val=`expr "$@" || test $? -eq 1`
31282 if expr a : '\(a\)' >/dev/null 2>&1 &&
31283 test "X`expr 00001 : '.*\(...\)'`" = X001; then
31289 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31290 as_basename=basename
31295 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31301 as_me=`$as_basename -- "$0" ||
31302 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31303 X"$0" : 'X\(//\)$' \| \
31304 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31305 printf "%s\n" X/"$0" |
31306 sed '/^.*\/\([^/][^/]*\)\/*$/{
31320 # Avoid depending upon Character Ranges.
31321 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31322 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31323 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31324 as_cr_digits='0123456789'
31325 as_cr_alnum=$as_cr_Letters$as_cr_digits
31327 ECHO_C= ECHO_N= ECHO_T=
31328 case `echo -n x` in #(((((
31330 case `echo 'xy\c'` in
31331 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
31333 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
31340 rm -f conf$$ conf$$.exe conf$$.file
31341 if test -d conf$$.dir; then
31342 rm -f conf$$.dir/conf$$.file
31345 mkdir conf$$.dir 2>/dev/null
31347 if (echo >conf$$.file) 2>/dev/null; then
31348 if ln -s conf$$.file conf$$ 2>/dev/null; then
31350 # ... but there are two gotchas:
31351 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31352 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31353 # In both cases, we have to default to `cp -pR'.
31354 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31356 elif ln conf$$.file conf$$ 2>/dev/null; then
31364 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31365 rmdir conf$$.dir 2>/dev/null
31370 # Create "$as_dir" as a directory, including parents if necessary.
31375 -*) as_dir=./$as_dir;;
31377 test -d "$as_dir" || eval $as_mkdir_p || {
31381 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31382 *) as_qdir=$as_dir;;
31384 as_dirs="'$as_qdir' $as_dirs"
31385 as_dir=`$as_dirname -- "$as_dir" ||
31386 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31387 X"$as_dir" : 'X\(//\)[^/]' \| \
31388 X"$as_dir" : 'X\(//\)$' \| \
31389 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31390 printf "%s\n" X"$as_dir" |
31391 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31395 /^X\(\/\/\)[^/].*/{
31408 test -d "$as_dir" && break
31410 test -z "$as_dirs" || eval "mkdir $as_dirs"
31411 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31415 if mkdir -p . 2>/dev/null; then
31416 as_mkdir_p='mkdir -p "$as_dir"'
31418 test -d ./-p && rmdir ./-p
31423 # as_fn_executable_p FILE
31424 # -----------------------
31425 # Test if FILE is an executable regular file.
31426 as_fn_executable_p ()
31428 test -f "$1" && test -x "$1"
31429 } # as_fn_executable_p
31430 as_test_x='test -x'
31431 as_executable_p=as_fn_executable_p
31433 # Sed expression to map a string onto a valid CPP name.
31434 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31436 # Sed expression to map a string onto a valid variable name.
31437 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31441 ## ----------------------------------- ##
31442 ## Main body of $CONFIG_STATUS script. ##
31443 ## ----------------------------------- ##
31445 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31447 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31448 # Save the log message, to keep $0 and so on meaningful, and to
31449 # report actual input values of CONFIG_FILES etc. instead of their
31450 # values after options handling.
31452 This file was extended by gzip $as_me 1.10, which was
31453 generated by GNU Autoconf 2.69.197-b8fd7. Invocation command line was
31455 CONFIG_FILES = $CONFIG_FILES
31456 CONFIG_HEADERS = $CONFIG_HEADERS
31457 CONFIG_LINKS = $CONFIG_LINKS
31458 CONFIG_COMMANDS = $CONFIG_COMMANDS
31461 on `(hostname || uname -n) 2>/dev/null | sed 1q`
31466 case $ac_config_files in *"
31467 "*) set x $ac_config_files; shift; ac_config_files=$*;;
31470 case $ac_config_headers in *"
31471 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31475 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31476 # Files that config.status was made for.
31477 config_files="$ac_config_files"
31478 config_headers="$ac_config_headers"
31479 config_links="$ac_config_links"
31480 config_commands="$ac_config_commands"
31484 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31486 \`$as_me' instantiates files and other configuration actions
31487 from templates according to the current configuration. Unless the files
31488 and actions are specified as TAGs, all are instantiated by default.
31490 Usage: $0 [OPTION]... [TAG]...
31492 -h, --help print this help, then exit
31493 -V, --version print version number and configuration settings, then exit
31494 --config print configuration, then exit
31495 -q, --quiet, --silent
31496 do not print progress messages
31497 -d, --debug don't remove temporary files
31498 --recheck update $as_me by reconfiguring in the same conditions
31499 --file=FILE[:TEMPLATE]
31500 instantiate the configuration file FILE
31501 --header=FILE[:TEMPLATE]
31502 instantiate the configuration header FILE
31504 Configuration files:
31507 Configuration headers:
31510 Configuration links:
31513 Configuration commands:
31516 Report bugs to <bug-gzip@gnu.org>."
31519 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
31520 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
31521 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31522 ac_cs_config='$ac_cs_config_escaped'
31524 gzip config.status 1.10
31525 configured by $0, generated by GNU Autoconf 2.69.197-b8fd7,
31526 with options \\"\$ac_cs_config\\"
31528 Copyright (C) 2017 Free Software Foundation, Inc.
31529 This config.status script is free software; the Free Software Foundation
31530 gives unlimited permission to copy, distribute and modify it."
31537 test -n "\$AWK" || AWK=awk
31540 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31541 # The default lists apply if the user does not specify any file.
31547 ac_option=`expr "X$1" : 'X\([^=]*\)='`
31548 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31552 ac_option=`expr "X$1" : 'X\([^=]*\)='`
31564 # Handling of the options.
31565 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31567 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31568 printf "%s\n" "$ac_cs_version"; exit ;;
31569 --config | --confi | --conf | --con | --co | --c )
31570 printf "%s\n" "$ac_cs_config"; exit ;;
31571 --debug | --debu | --deb | --de | --d | -d )
31573 --file | --fil | --fi | --f )
31576 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31577 '') as_fn_error $? "missing file argument" ;;
31579 as_fn_append CONFIG_FILES " '$ac_optarg'"
31580 ac_need_defaults=false;;
31581 --header | --heade | --head | --hea )
31584 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31586 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31587 ac_need_defaults=false;;
31589 # Conflict between --help and --header
31590 as_fn_error $? "ambiguous option: \`$1'
31591 Try \`$0 --help' for more information.";;
31592 --help | --hel | -h )
31593 printf "%s\n" "$ac_cs_usage"; exit ;;
31594 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31595 | -silent | --silent | --silen | --sile | --sil | --si | --s)
31598 # This is an error.
31599 -*) as_fn_error $? "unrecognized option: \`$1'
31600 Try \`$0 --help' for more information." ;;
31602 *) as_fn_append ac_config_targets " $1"
31603 ac_need_defaults=false ;;
31609 ac_configure_extra_args=
31611 if $ac_cs_silent; then
31613 ac_configure_extra_args="$ac_configure_extra_args --silent"
31617 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31618 if \$ac_cs_recheck; then
31619 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31621 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
31622 CONFIG_SHELL='$SHELL'
31623 export CONFIG_SHELL
31628 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31632 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31633 ## Running $as_me. ##
31635 printf "%s\n" "$ac_log"
31639 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31643 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
31644 GNUmakefile=$GNUmakefile
31648 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31650 # Handling of arguments.
31651 for ac_config_target in $ac_config_targets
31653 case $ac_config_target in
31654 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
31655 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
31656 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
31657 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
31658 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
31659 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
31660 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
31662 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31667 # If the user did not use the arguments to specify the items to instantiate,
31668 # then the envvar interface is used. Set only those that are not.
31669 # We use the long form for the default assignment because of an extremely
31670 # bizarre bug on SunOS 4.1.3.
31671 if $ac_need_defaults; then
31672 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
31673 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
31674 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
31675 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
31678 # Have a temporary directory for convenience. Make it in the build tree
31679 # simply because there is no reason against having it here, and in addition,
31680 # creating and moving files from /tmp can sometimes cause problems.
31681 # Hook for its removal unless debugging.
31682 # Note that there is a small window in which the directory will not be cleaned:
31683 # after its creation but before its name has been assigned to `$tmp'.
31687 trap 'exit_status=$?
31688 : "${ac_tmp:=$tmp}"
31689 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31691 trap 'as_fn_exit 1' 1 2 13 15
31693 # Create a (secure) tmp directory for tmp files.
31696 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31700 tmp=./conf$$-$RANDOM
31701 (umask 077 && mkdir "$tmp")
31702 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31705 # Set up the scripts for CONFIG_FILES section.
31706 # No need to generate them if there are no CONFIG_FILES.
31707 # This happens for instance with `./config.status config.h'.
31708 if test -n "$CONFIG_FILES"; then
31711 ac_cr=`echo X | tr X '\015'`
31712 # On cygwin, bash can eat \r inside `` if the user requested igncr.
31713 # But we know of no other shell where ac_cr would be empty at this
31714 # point, so we can use a bashism as a fallback.
31715 if test "x$ac_cr" = x; then
31716 eval ac_cr=\$\'\\r\'
31718 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31719 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31722 ac_cs_awk_cr=$ac_cr
31725 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
31730 echo "cat >conf$$subs.awk <<_ACEOF" &&
31731 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31733 } >conf$$subs.sh ||
31734 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31735 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31737 for ac_last_try in false false false false false :; do
31738 . ./conf$$subs.sh ||
31739 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31741 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31742 if test $ac_delim_n = $ac_delim_num; then
31744 elif $ac_last_try; then
31745 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31747 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31750 rm -f conf$$subs.sh
31752 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31753 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31757 s/^/S["/; s/!.*/"]=/
31767 s/\(.\{148\}\)..*/\1/
31769 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31774 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31781 s/\(.\{148\}\)..*/\1/
31783 s/["\\]/\\&/g; s/^/"/; s/$/"/
31787 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31792 ' <conf$$subs.awk | sed '
31797 ' >>$CONFIG_STATUS || ac_write_fail=1
31798 rm -f conf$$subs.awk
31799 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31801 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31802 for (key in S) S_is_set[key] = 1
31808 nfields = split(line, field, "@")
31810 len = length(field[1])
31811 for (i = 2; i < nfields; i++) {
31813 keylen = length(key)
31814 if (S_is_set[key]) {
31816 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31817 len += length(value) + length(field[++i])
31828 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31829 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31830 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31833 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31834 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31837 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31838 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31839 # trailing colons and then remove the whole line if VPATH becomes empty
31840 # (actually we leave an empty line to preserve line numbers).
31841 if test "x$srcdir" = x.; then
31842 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
31860 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31861 fi # test -n "$CONFIG_FILES"
31863 # Set up the scripts for CONFIG_HEADERS section.
31864 # No need to generate them if there are no CONFIG_HEADERS.
31865 # This happens for instance with `./config.status Makefile'.
31866 if test -n "$CONFIG_HEADERS"; then
31867 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31871 # Transform confdefs.h into an awk script `defines.awk', embedded as
31872 # here-document in config.status, that substitutes the proper values into
31873 # config.h.in to produce config.h.
31875 # Create a delimiter string that does not exist in confdefs.h, to ease
31876 # handling of long lines.
31878 for ac_last_try in false false :; do
31879 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31880 if test -z "$ac_tt"; then
31882 elif $ac_last_try; then
31883 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31885 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31889 # For the awk script, D is an array of macro values keyed by name,
31890 # likewise P contains macro parameters if any. Preserve backslash
31891 # newline sequences.
31893 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31895 s/.\{148\}/&'"$ac_delim"'/g
31898 s/^[ ]*#[ ]*define[ ][ ]*/ /
31905 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31907 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
31911 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31912 D["\1"]=" \3\\\\\\n"\\/p
31914 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31919 s/.\{148\}/&'"$ac_delim"'/g
31924 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31927 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31929 ' <confdefs.h | sed '
31930 s/'"$ac_delim"'/"\\\
31931 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31933 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31934 for (key in D) D_is_set[key] = 1
31937 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31939 split(line, arg, " ")
31940 if (arg[1] == "#") {
31944 defundef = substr(arg[1], 2)
31947 split(mac1, mac2, "(") #)
31949 prefix = substr(line, 1, index(line, defundef) - 1)
31950 if (D_is_set[macro]) {
31951 # Preserve the white space surrounding the "#".
31952 print prefix "define", macro P[macro] D[macro]
31955 # Replace #undef with comments. This is necessary, for example,
31956 # in the case of _POSIX_SOURCE, which is predefined and required
31957 # on some systems where configure will not decide to define it.
31958 if (defundef == "undef") {
31959 print "/*", prefix defundef, macro, "*/"
31967 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31968 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
31969 fi # test -n "$CONFIG_HEADERS"
31972 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
31977 :[FHLC]) ac_mode=$ac_tag; continue;;
31979 case $ac_mode$ac_tag in
31981 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
31982 :[FH]-) ac_tag=-:-;;
31983 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32000 -) ac_f="$ac_tmp/stdin";;
32001 *) # Look for the file first in the build tree, then in the source tree
32002 # (if the path is not absolute). The absolute path cannot be DOS-style,
32003 # because $ac_f cannot contain `:'.
32007 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32009 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32011 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32012 as_fn_append ac_file_inputs " '$ac_f'"
32015 # Let's still pretend it is `configure' which instantiates (i.e., don't
32016 # use $as_me), people would be surprised to read:
32017 # /* config.h. Generated by config.status. */
32018 configure_input='Generated from '`
32019 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32021 if test x"$ac_file" != x-; then
32022 configure_input="$ac_file. $configure_input"
32023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32024 printf "%s\n" "$as_me: creating $ac_file" >&6;}
32026 # Neutralize special characters interpreted by sed in replacement strings.
32027 case $configure_input in #(
32028 *\&* | *\|* | *\\* )
32029 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
32030 sed 's/[\\\\&|]/\\\\&/g'`;; #(
32031 *) ac_sed_conf_input=$configure_input;;
32035 *:-:* | *:-) cat >"$ac_tmp/stdin" \
32036 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32041 ac_dir=`$as_dirname -- "$ac_file" ||
32042 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32043 X"$ac_file" : 'X\(//\)[^/]' \| \
32044 X"$ac_file" : 'X\(//\)$' \| \
32045 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32046 printf "%s\n" X"$ac_file" |
32047 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32051 /^X\(\/\/\)[^/].*/{
32064 as_dir="$ac_dir"; as_fn_mkdir_p
32068 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32070 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
32071 # A ".." for each directory in $ac_dir_suffix.
32072 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32073 case $ac_top_builddir_sub in
32074 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32075 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32078 ac_abs_top_builddir=$ac_pwd
32079 ac_abs_builddir=$ac_pwd$ac_dir_suffix
32080 # for backward compatibility:
32081 ac_top_builddir=$ac_top_build_prefix
32084 .) # We are building in place.
32086 ac_top_srcdir=$ac_top_builddir_sub
32087 ac_abs_top_srcdir=$ac_pwd ;;
32088 [\\/]* | ?:[\\/]* ) # Absolute name.
32089 ac_srcdir=$srcdir$ac_dir_suffix;
32090 ac_top_srcdir=$srcdir
32091 ac_abs_top_srcdir=$srcdir ;;
32092 *) # Relative name.
32093 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32094 ac_top_srcdir=$ac_top_build_prefix$srcdir
32095 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32097 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32107 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
32108 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
32110 ac_MKDIR_P=$MKDIR_P
32112 [\\/$]* | ?:[\\/]* ) ;;
32113 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
32117 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32118 # If the template does not know about datarootdir, expand it.
32119 # FIXME: This hack should be removed a few years after 2.60.
32120 ac_datarootdir_hack=; ac_datarootdir_seen=
32131 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32132 *datarootdir*) ac_datarootdir_seen=yes;;
32133 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32135 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32137 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32138 ac_datarootdir_hack='
32139 s&@datadir@&$datadir&g
32140 s&@docdir@&$docdir&g
32141 s&@infodir@&$infodir&g
32142 s&@localedir@&$localedir&g
32143 s&@mandir@&$mandir&g
32144 s&\\\${datarootdir}&$datarootdir&g' ;;
32148 # Neutralize VPATH when `$srcdir' = `.'.
32149 # Shell code in configure.ac might set extrasub.
32150 # FIXME: do we really want to maintain this feature?
32151 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32152 ac_sed_extra="$ac_vpsub
32155 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32157 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32158 s|@configure_input@|$ac_sed_conf_input|;t t
32159 s&@top_builddir@&$ac_top_builddir_sub&;t t
32160 s&@top_build_prefix@&$ac_top_build_prefix&;t t
32161 s&@srcdir@&$ac_srcdir&;t t
32162 s&@abs_srcdir@&$ac_abs_srcdir&;t t
32163 s&@top_srcdir@&$ac_top_srcdir&;t t
32164 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32165 s&@builddir@&$ac_builddir&;t t
32166 s&@abs_builddir@&$ac_abs_builddir&;t t
32167 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32168 s&@INSTALL@&$ac_INSTALL&;t t
32169 s&@MKDIR_P@&$ac_MKDIR_P&;t t
32170 $ac_datarootdir_hack
32172 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32173 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32175 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32176 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32177 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
32178 "$ac_tmp/out"`; test -z "$ac_out"; } &&
32179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32180 which seems to be undefined. Please make sure it is defined" >&5
32181 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32182 which seems to be undefined. Please make sure it is defined" >&2;}
32184 rm -f "$ac_tmp/stdin"
32186 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32187 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32189 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32195 if test x"$ac_file" != x-; then
32197 printf "%s\n" "/* $configure_input */" \
32198 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
32199 } >"$ac_tmp/config.h" \
32200 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32201 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
32202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32203 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
32206 mv "$ac_tmp/config.h" "$ac_file" \
32207 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32210 printf "%s\n" "/* $configure_input */" \
32211 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
32212 || as_fn_error $? "could not create -" "$LINENO" 5
32214 # Compute "$ac_file"'s index in $config_headers.
32217 for _am_header in $config_headers :; do
32218 case $_am_header in
32219 $_am_arg | $_am_arg:* )
32222 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
32225 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
32226 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32227 X"$_am_arg" : 'X\(//\)[^/]' \| \
32228 X"$_am_arg" : 'X\(//\)$' \| \
32229 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
32230 printf "%s\n" X"$_am_arg" |
32231 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32235 /^X\(\/\/\)[^/].*/{
32247 s/.*/./; q'`/stamp-h$_am_stamp_count
32254 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
32257 # Prefer the file from the source tree if names are identical.
32258 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
32259 ac_source=$srcdir/$ac_source
32262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
32263 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
32265 if test ! -r "$ac_source"; then
32266 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
32270 # Try a relative symlink, then a hard link, then a copy.
32272 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
32273 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
32275 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
32276 ln "$ac_source" "$ac_file" 2>/dev/null ||
32277 cp -p "$ac_source" "$ac_file" ||
32278 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
32281 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
32282 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
32287 case $ac_file$ac_mode in
32288 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
32289 # Older Autoconf quotes --file arguments for eval, but not when files
32290 # are listed without --file. Let's play safe and only enable the eval
32291 # if we detect the quoting.
32292 # TODO: see whether this extra hack can be removed once we start
32293 # requiring Autoconf 2.70 or later.
32294 case $CONFIG_FILES in #(
32296 eval set x "$CONFIG_FILES" ;; #(
32298 set x $CONFIG_FILES ;; #(
32303 # Used to flag and report bootstrapping failures.
32307 # Strip MF so we end up with the name of the file.
32308 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
32309 # Check whether this is an Automake generated Makefile which includes
32310 # dependency-tracking related rules and includes.
32311 # Grep'ing the whole file directly is not great: AIX grep has a line
32312 # limit of 2048, but all sed's we know have understand at least 4000.
32313 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
32315 am_dirpart=`$as_dirname -- "$am_mf" ||
32316 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32317 X"$am_mf" : 'X\(//\)[^/]' \| \
32318 X"$am_mf" : 'X\(//\)$' \| \
32319 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
32320 printf "%s\n" X"$am_mf" |
32321 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32325 /^X\(\/\/\)[^/].*/{
32338 am_filepart=`$as_basename -- "$am_mf" ||
32339 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
32340 X"$am_mf" : 'X\(//\)$' \| \
32341 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
32342 printf "%s\n" X/"$am_mf" |
32343 sed '/^.*\/\([^/][^/]*\)\/*$/{
32356 { echo "$as_me:$LINENO: cd "$am_dirpart" \
32357 && sed -e '/# am--include-marker/d' "$am_filepart" \
32358 | $MAKE -f - am--depfiles" >&5
32359 (cd "$am_dirpart" \
32360 && sed -e '/# am--include-marker/d' "$am_filepart" \
32361 | $MAKE -f - am--depfiles) >&5 2>&5
32363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
32364 (exit $ac_status); } || am_rc=$?
32366 if test $am_rc -ne 0; then
32367 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32368 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
32369 as_fn_error $? "Something went wrong bootstrapping makefile fragments
32370 for automatic dependency tracking. Try re-running configure with the
32371 '--disable-dependency-tracking' option to at least be able to build
32372 the package (albeit without support for automatic dependency tracking).
32373 See \`config.log' for more details" "$LINENO" 5; }
32375 { am_dirpart=; unset am_dirpart;}
32376 { am_filepart=; unset am_filepart;}
32377 { am_mf=; unset am_mf;}
32378 { am_rc=; unset am_rc;}
32379 rm -f conftest-deps.mk
32389 ac_clean_files=$ac_clean_files_save
32391 test $ac_write_fail = 0 ||
32392 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32395 # configure is writing to config.log, and then calls config.status.
32396 # config.status does its own redirection, appending to config.log.
32397 # Unfortunately, on DOS this fails, as config.log is still kept open
32398 # by configure, so config.status won't be able to write to it; its
32399 # output is simply discarded. So we exec the FD to /dev/null,
32400 # effectively closing config.log, so it can be properly (re)opened and
32401 # appended to by config.status. When coming back to configure, we
32402 # need to make the FD available again.
32403 if test "$no_create" != yes; then
32405 ac_config_status_args=
32406 test "$silent" = yes &&
32407 ac_config_status_args="$ac_config_status_args --quiet"
32409 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32411 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32412 # would make configure fail if this is the last instruction.
32413 $ac_cs_success || as_fn_exit 1
32415 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32417 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}