2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU Bison 3.0.5.
5 # Report bugs to <bug-bison@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
27 case `(set -o) 2>/dev/null` in #(
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 as_echo_n='sh -c $as_echo_n_body as_echo'
71 as_echo='sh -c $as_echo_body as_echo'
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
91 # Find who we are. Look in the path if we contain no directory separator.
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
111 if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there. '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137 # Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149 *v*x* | *x*v* ) as_opts=-vx ;;
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 case \`(set -o) 2>/dev/null\` in #(
179 as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193 exitcode=1; echo positional parameters were not saved.
195 test x\$exitcode = x0 || exit 1
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 test -z "$as_dir" && as_dir=.
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
240 if test "x$CONFIG_SHELL" != x; then :
242 # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250 *v*x* | *x*v* ) as_opts=-vx ;;
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-bison@gnu.org
270 $0: about your system, including any error possibly output
271 $0: before this message. Then install a modern shell, or
272 $0: manually run the script under such a shell if you do
279 SHELL=${CONFIG_SHELL-/bin/sh}
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
290 # Portably unset VAR.
293 { eval $1=; unset $1;}
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317 # Create "$as_dir" as a directory, including parents if necessary.
322 -*) as_dir=./$as_dir;;
324 test -d "$as_dir" || eval $as_mkdir_p || {
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
355 test -d "$as_dir" && break
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
368 test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
401 as_val=`expr "$@" || test $? -eq 1`
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
413 as_status=$1; test $as_status -eq 0 && as_status=1
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
418 $as_echo "$as_me: error: $2" >&2
419 as_fn_exit $as_status
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
446 sed '/^.*\/\([^/][^/]*\)\/*$/{
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
488 chmod +x "$as_me.lineno" ||
489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
497 # original and so on. Autoconf is especially sensitive to this).
499 # Exit status is that of the last command.
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
506 case `echo 'xy\c'` in
507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
521 mkdir conf$$.dir 2>/dev/null
523 if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529 # In both cases, we have to default to `cp -pR'.
530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
532 elif ln conf$$.file conf$$ 2>/dev/null; then
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
543 if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
546 test -d ./-p && rmdir ./-p
551 as_executable_p=as_fn_executable_p
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560 test -n "$DJDIR" || exec 7<&0 </dev/null
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 ac_default_prefix=/usr/local
573 ac_config_libobj_dir=.
580 # Identity of this package.
581 PACKAGE_NAME='GNU Bison'
582 PACKAGE_TARNAME='bison'
583 PACKAGE_VERSION='3.0.5'
584 PACKAGE_STRING='GNU Bison 3.0.5'
585 PACKAGE_BUGREPORT='bug-bison@gnu.org'
586 PACKAGE_URL='http://www.gnu.org/software/bison/'
588 # Factoring default headers for most tests.
589 ac_includes_default="\
591 #ifdef HAVE_SYS_TYPES_H
592 # include <sys/types.h>
594 #ifdef HAVE_SYS_STAT_H
595 # include <sys/stat.h>
601 # ifdef HAVE_STDLIB_H
606 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 #ifdef HAVE_STRINGS_H
612 # include <strings.h>
614 #ifdef HAVE_INTTYPES_H
615 # include <inttypes.h>
624 gl_use_threads_default=
627 gl_getopt_required=POSIX
629 ac_config_libobj_dir=lib
630 ac_subst_vars='gltests_LTLIBOBJS
661 CROSS_COMPILING_FALSE
663 VALGRIND_OPTS_SUPPRESSION
672 XGETTEXT_EXTRA_OPTIONS
680 GETTEXT_MACRO_VERSION
688 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
702 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
704 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
705 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
706 LIBUNISTRING_UNIWIDTH_H
707 LIBUNISTRING_UNITYPES_H
709 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
711 UNISTD_H_DEFINES_STRUCT_TIMESPEC
712 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
713 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
714 TIME_H_DEFINES_STRUCT_TIMESPEC
715 NEXT_AS_FIRST_DIRECTIVE_TIME_H
732 HAVE_DECL_LOCALTIME_R
743 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
748 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
750 NEXT_AS_FIRST_DIRECTIVE_STRING_H
752 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
754 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
756 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
758 GL_GENERATE_STDDEF_H_FALSE
759 GL_GENERATE_STDDEF_H_TRUE
765 GL_GENERATE_STDBOOL_H_FALSE
766 GL_GENERATE_STDBOOL_H_TRUE
769 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
771 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
773 GL_GENERATE_SCHED_H_FALSE
774 GL_GENERATE_SCHED_H_TRUE
776 HAVE_STRUCT_SCHED_PARAM
778 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
781 REPLACE_PTHREAD_SIGMASK
783 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
784 HAVE_STRUCT_SIGACTION_SA_SIGACTION
790 HAVE_POSIX_SIGNALBLOCKING
793 GNULIB_SIGNAL_H_SIGPIPE
795 GNULIB_PTHREAD_SIGMASK
798 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
799 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
800 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
802 HAVE_POSIX_SPAWN_FILE_ACTIONS_T
803 HAVE_POSIX_SPAWNATTR_T
805 GNULIB_POSIX_SPAWNATTR_DESTROY
806 GNULIB_POSIX_SPAWNATTR_SETSIGMASK
807 GNULIB_POSIX_SPAWNATTR_GETSIGMASK
808 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
809 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
810 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
811 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
812 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
813 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
814 GNULIB_POSIX_SPAWNATTR_SETPGROUP
815 GNULIB_POSIX_SPAWNATTR_GETPGROUP
816 GNULIB_POSIX_SPAWNATTR_SETFLAGS
817 GNULIB_POSIX_SPAWNATTR_GETFLAGS
818 GNULIB_POSIX_SPAWNATTR_INIT
819 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
820 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
821 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
822 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
823 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
900 GNULIB_EXPLICIT_BZERO
998 NEXT_AS_FIRST_DIRECTIVE_MATH_H
1008 LOCALCHARSET_TESTS_ENVIRONMENT
1016 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1018 UINT64_MAX_EQ_ULONG_MAX
1019 UINT32_MAX_LT_UINTMAX_MAX
1022 INT64_MAX_EQ_LONG_MAX
1023 INT32_MAX_LT_INTMAX_MAX
1034 GL_GENERATE_STDINT_H_FALSE
1035 GL_GENERATE_STDINT_H_TRUE
1047 HAVE_SIGNED_SIG_ATOMIC_T
1050 BITSIZEOF_SIG_ATOMIC_T
1054 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1059 HAVE_UNSIGNED_LONG_LONG_INT
1061 GL_GENERATE_LIMITS_H_FALSE
1062 GL_GENERATE_LIMITS_H_TRUE
1064 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1070 GNULIB_GL_UNISTD_H_GETOPT
1075 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1077 WINDOWS_64_BIT_ST_SIZE
1078 WINDOWS_STAT_TIMESPEC
1079 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1101 GNULIB_OVERRIDES_STRUCT_STAT
1124 REPLACE_SIGNBIT_USING_GCC
1201 HAVE_DECL_REMAINDERL
1383 GNULIB_OVERRIDES_WINT_T
1384 APPLE_UNIVERSAL_BUILD
1385 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1393 REPLACE_STDIO_WRITE_FUNCS
1394 REPLACE_STDIO_READ_FUNCS
1403 REPLACE_OBSTACK_PRINTF
1428 HAVE_DECL_OBSTACK_PRINTF
1434 GNULIB_VSPRINTF_POSIX
1436 GNULIB_VPRINTF_POSIX
1438 GNULIB_VFPRINTF_POSIX
1445 GNULIB_STDIO_H_SIGPIPE
1446 GNULIB_STDIO_H_NONBLOCKING
1447 GNULIB_SPRINTF_POSIX
1461 GNULIB_OBSTACK_PRINTF_POSIX
1462 GNULIB_OBSTACK_PRINTF
1478 GNULIB_FPRINTF_POSIX
1488 GL_GENERATE_FLOAT_H_FALSE
1489 GL_GENERATE_FLOAT_H_TRUE
1491 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1493 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1510 GL_GENERATE_ERRNO_H_FALSE
1511 GL_GENERATE_ERRNO_H_TRUE
1513 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1516 PRAGMA_SYSTEM_HEADER
1517 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1522 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1523 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1524 UNISTD_H_HAVE_WINSOCK2_H
1548 REPLACE_GETDTABLESIZE
1549 REPLACE_GETDOMAINNAME
1561 HAVE_DECL_SETHOSTNAME
1562 HAVE_DECL_GETUSERSHELL
1563 HAVE_DECL_GETPAGESIZE
1564 HAVE_DECL_GETLOGIN_R
1566 HAVE_DECL_GETDOMAINNAME
1606 GNULIB_UNISTD_H_SIGPIPE
1607 GNULIB_UNISTD_H_NONBLOCKING
1634 GNULIB_GETDTABLESIZE
1635 GNULIB_GETDOMAINNAME
1665 REPLACE_CANONICALIZE_FILE_NAME
1670 HAVE_STRUCT_RANDOM_DATA
1696 HAVE_DECL_GETLOADAVG
1697 HAVE_CANONICALIZE_FILE_NAME
1708 GNULIB_SECURE_GETENV
1711 GNULIB_REALLOC_POSIX
1730 GNULIB_CANONICALIZE_FILE_NAME
1734 GL_GENERATE_ALLOCA_H_FALSE
1735 GL_GENERATE_ALLOCA_H_TRUE
1738 GL_COND_LIBTOOL_FALSE
1739 GL_COND_LIBTOOL_TRUE
1748 FLEX_CXX_WORKS_FALSE
1757 CXX_COMPILER_POSIXLY_CORRECT
1758 BISON_CXX_WORKS_FALSE
1759 BISON_CXX_WORKS_TRUE
1761 C_COMPILER_POSIXLY_CORRECT
1763 FLEX_SCANNER_CXXFLAGS
1770 ENABLE_GCC_WARNINGS_FALSE
1771 ENABLE_GCC_WARNINGS_TRUE
1786 am__fastdepCXX_FALSE
1810 AM_DEFAULT_VERBOSITY
1821 INSTALL_STRIP_PROGRAM
1836 PACKAGE_COPYRIGHT_YEAR
1865 program_transform_name
1878 enable_option_checking
1880 enable_dependency_tracking
1891 with_libiconv_prefix
1894 ac_precious_vars='build_alias
1911 # Initialize some variables set by options.
1913 ac_init_version=false
1914 ac_unrecognized_opts=
1915 ac_unrecognized_sep=
1916 # The variables have the same names as the options, with
1917 # dashes changed to underlines.
1918 cache_file=/dev/null
1925 program_transform_name=s,x,x,
1933 # Installation directory options.
1934 # These are left unexpanded so users can "make install exec_prefix=/foo"
1935 # and all the variables that are supposed to be based on exec_prefix
1936 # by default will actually change.
1937 # Use braces instead of parens because sh, perl, etc. also accept them.
1938 # (The list follows the same order as the GNU Coding Standards.)
1939 bindir='${exec_prefix}/bin'
1940 sbindir='${exec_prefix}/sbin'
1941 libexecdir='${exec_prefix}/libexec'
1942 datarootdir='${prefix}/share'
1943 datadir='${datarootdir}'
1944 sysconfdir='${prefix}/etc'
1945 sharedstatedir='${prefix}/com'
1946 localstatedir='${prefix}/var'
1947 runstatedir='${localstatedir}/run'
1948 includedir='${prefix}/include'
1949 oldincludedir='/usr/include'
1950 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1951 infodir='${datarootdir}/info'
1956 libdir='${exec_prefix}/lib'
1957 localedir='${datarootdir}/locale'
1958 mandir='${datarootdir}/man'
1964 # If the previous option needs an argument, assign it.
1965 if test -n "$ac_prev"; then
1966 eval $ac_prev=\$ac_option
1972 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1977 # Accept the important Cygnus configure options, so we can diagnose typos.
1979 case $ac_dashdash$ac_option in
1983 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1985 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1986 bindir=$ac_optarg ;;
1988 -build | --build | --buil | --bui | --bu)
1989 ac_prev=build_alias ;;
1990 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1991 build_alias=$ac_optarg ;;
1993 -cache-file | --cache-file | --cache-fil | --cache-fi \
1994 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1995 ac_prev=cache_file ;;
1996 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1997 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1998 cache_file=$ac_optarg ;;
2000 --config-cache | -C)
2001 cache_file=config.cache ;;
2003 -datadir | --datadir | --datadi | --datad)
2005 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2006 datadir=$ac_optarg ;;
2008 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2009 | --dataroo | --dataro | --datar)
2010 ac_prev=datarootdir ;;
2011 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2012 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2013 datarootdir=$ac_optarg ;;
2015 -disable-* | --disable-*)
2016 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2017 # Reject names that are not valid shell variable names.
2018 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2019 as_fn_error $? "invalid feature name: $ac_useropt"
2020 ac_useropt_orig=$ac_useropt
2021 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2022 case $ac_user_opts in
2024 "enable_$ac_useropt"
2026 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2027 ac_unrecognized_sep=', ';;
2029 eval enable_$ac_useropt=no ;;
2031 -docdir | --docdir | --docdi | --doc | --do)
2033 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2034 docdir=$ac_optarg ;;
2036 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2038 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2039 dvidir=$ac_optarg ;;
2041 -enable-* | --enable-*)
2042 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2043 # Reject names that are not valid shell variable names.
2044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2045 as_fn_error $? "invalid feature name: $ac_useropt"
2046 ac_useropt_orig=$ac_useropt
2047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2048 case $ac_user_opts in
2050 "enable_$ac_useropt"
2052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2053 ac_unrecognized_sep=', ';;
2055 eval enable_$ac_useropt=\$ac_optarg ;;
2057 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2058 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2059 | --exec | --exe | --ex)
2060 ac_prev=exec_prefix ;;
2061 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2062 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2063 | --exec=* | --exe=* | --ex=*)
2064 exec_prefix=$ac_optarg ;;
2066 -gas | --gas | --ga | --g)
2067 # Obsolete; use --with-gas.
2070 -help | --help | --hel | --he | -h)
2071 ac_init_help=long ;;
2072 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2073 ac_init_help=recursive ;;
2074 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2075 ac_init_help=short ;;
2077 -host | --host | --hos | --ho)
2078 ac_prev=host_alias ;;
2079 -host=* | --host=* | --hos=* | --ho=*)
2080 host_alias=$ac_optarg ;;
2082 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2084 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2086 htmldir=$ac_optarg ;;
2088 -includedir | --includedir | --includedi | --included | --include \
2089 | --includ | --inclu | --incl | --inc)
2090 ac_prev=includedir ;;
2091 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2092 | --includ=* | --inclu=* | --incl=* | --inc=*)
2093 includedir=$ac_optarg ;;
2095 -infodir | --infodir | --infodi | --infod | --info | --inf)
2097 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2098 infodir=$ac_optarg ;;
2100 -libdir | --libdir | --libdi | --libd)
2102 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2103 libdir=$ac_optarg ;;
2105 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2106 | --libexe | --libex | --libe)
2107 ac_prev=libexecdir ;;
2108 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2109 | --libexe=* | --libex=* | --libe=*)
2110 libexecdir=$ac_optarg ;;
2112 -localedir | --localedir | --localedi | --localed | --locale)
2113 ac_prev=localedir ;;
2114 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2115 localedir=$ac_optarg ;;
2117 -localstatedir | --localstatedir | --localstatedi | --localstated \
2118 | --localstate | --localstat | --localsta | --localst | --locals)
2119 ac_prev=localstatedir ;;
2120 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2121 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2122 localstatedir=$ac_optarg ;;
2124 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2126 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2127 mandir=$ac_optarg ;;
2129 -nfp | --nfp | --nf)
2130 # Obsolete; use --without-fp.
2133 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2134 | --no-cr | --no-c | -n)
2137 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2138 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2141 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2142 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2143 | --oldin | --oldi | --old | --ol | --o)
2144 ac_prev=oldincludedir ;;
2145 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2146 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2147 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2148 oldincludedir=$ac_optarg ;;
2150 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2152 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2153 prefix=$ac_optarg ;;
2155 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2156 | --program-pre | --program-pr | --program-p)
2157 ac_prev=program_prefix ;;
2158 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2159 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2160 program_prefix=$ac_optarg ;;
2162 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2163 | --program-suf | --program-su | --program-s)
2164 ac_prev=program_suffix ;;
2165 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2166 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2167 program_suffix=$ac_optarg ;;
2169 -program-transform-name | --program-transform-name \
2170 | --program-transform-nam | --program-transform-na \
2171 | --program-transform-n | --program-transform- \
2172 | --program-transform | --program-transfor \
2173 | --program-transfo | --program-transf \
2174 | --program-trans | --program-tran \
2175 | --progr-tra | --program-tr | --program-t)
2176 ac_prev=program_transform_name ;;
2177 -program-transform-name=* | --program-transform-name=* \
2178 | --program-transform-nam=* | --program-transform-na=* \
2179 | --program-transform-n=* | --program-transform-=* \
2180 | --program-transform=* | --program-transfor=* \
2181 | --program-transfo=* | --program-transf=* \
2182 | --program-trans=* | --program-tran=* \
2183 | --progr-tra=* | --program-tr=* | --program-t=*)
2184 program_transform_name=$ac_optarg ;;
2186 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2188 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2189 pdfdir=$ac_optarg ;;
2191 -psdir | --psdir | --psdi | --psd | --ps)
2193 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2196 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2197 | -silent | --silent | --silen | --sile | --sil)
2200 -runstatedir | --runstatedir | --runstatedi | --runstated \
2201 | --runstate | --runstat | --runsta | --runst | --runs \
2202 | --run | --ru | --r)
2203 ac_prev=runstatedir ;;
2204 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2205 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2206 | --run=* | --ru=* | --r=*)
2207 runstatedir=$ac_optarg ;;
2209 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2211 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2213 sbindir=$ac_optarg ;;
2215 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2216 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2217 | --sharedst | --shareds | --shared | --share | --shar \
2219 ac_prev=sharedstatedir ;;
2220 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2221 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2222 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2224 sharedstatedir=$ac_optarg ;;
2226 -site | --site | --sit)
2228 -site=* | --site=* | --sit=*)
2231 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2233 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2234 srcdir=$ac_optarg ;;
2236 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2237 | --syscon | --sysco | --sysc | --sys | --sy)
2238 ac_prev=sysconfdir ;;
2239 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2240 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2241 sysconfdir=$ac_optarg ;;
2243 -target | --target | --targe | --targ | --tar | --ta | --t)
2244 ac_prev=target_alias ;;
2245 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2246 target_alias=$ac_optarg ;;
2248 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2251 -version | --version | --versio | --versi | --vers | -V)
2252 ac_init_version=: ;;
2255 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2256 # Reject names that are not valid shell variable names.
2257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2258 as_fn_error $? "invalid package name: $ac_useropt"
2259 ac_useropt_orig=$ac_useropt
2260 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2261 case $ac_user_opts in
2265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2266 ac_unrecognized_sep=', ';;
2268 eval with_$ac_useropt=\$ac_optarg ;;
2270 -without-* | --without-*)
2271 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2272 # Reject names that are not valid shell variable names.
2273 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2274 as_fn_error $? "invalid package name: $ac_useropt"
2275 ac_useropt_orig=$ac_useropt
2276 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2277 case $ac_user_opts in
2281 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2282 ac_unrecognized_sep=', ';;
2284 eval with_$ac_useropt=no ;;
2287 # Obsolete; use --with-x.
2290 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2291 | --x-incl | --x-inc | --x-in | --x-i)
2292 ac_prev=x_includes ;;
2293 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2294 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2295 x_includes=$ac_optarg ;;
2297 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2298 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2299 ac_prev=x_libraries ;;
2300 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2301 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2302 x_libraries=$ac_optarg ;;
2304 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2305 Try \`$0 --help' for more information"
2309 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2310 # Reject names that are not valid shell variable names.
2311 case $ac_envvar in #(
2312 '' | [0-9]* | *[!_$as_cr_alnum]* )
2313 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2315 eval $ac_envvar=\$ac_optarg
2316 export $ac_envvar ;;
2319 # FIXME: should be removed in autoconf 3.0.
2320 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2321 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2322 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2323 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2329 if test -n "$ac_prev"; then
2330 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2331 as_fn_error $? "missing argument to $ac_option"
2334 if test -n "$ac_unrecognized_opts"; then
2335 case $enable_option_checking in
2337 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2338 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2342 # Check all directory arguments for consistency.
2343 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2344 datadir sysconfdir sharedstatedir localstatedir includedir \
2345 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2346 libdir localedir mandir runstatedir
2348 eval ac_val=\$$ac_var
2349 # Remove trailing slashes.
2352 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2353 eval $ac_var=\$ac_val;;
2355 # Be sure to have absolute directory names.
2357 [\\/$]* | ?:[\\/]* ) continue;;
2358 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2360 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2363 # There might be people who depend on the old broken behavior: `$host'
2364 # used to hold the argument of --host etc.
2365 # FIXME: To remove some day.
2368 target=$target_alias
2370 # FIXME: To remove some day.
2371 if test "x$host_alias" != x; then
2372 if test "x$build_alias" = x; then
2373 cross_compiling=maybe
2374 elif test "x$build_alias" != "x$host_alias"; then
2380 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2382 test "$silent" = yes && exec 6>/dev/null
2385 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2386 ac_ls_di=`ls -di .` &&
2387 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2388 as_fn_error $? "working directory cannot be determined"
2389 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2390 as_fn_error $? "pwd does not report name of working directory"
2393 # Find the source files, if location was not specified.
2394 if test -z "$srcdir"; then
2395 ac_srcdir_defaulted=yes
2396 # Try the directory containing this script, then the parent directory.
2397 ac_confdir=`$as_dirname -- "$as_myself" ||
2398 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2399 X"$as_myself" : 'X\(//\)[^/]' \| \
2400 X"$as_myself" : 'X\(//\)$' \| \
2401 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2402 $as_echo X"$as_myself" |
2403 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2421 if test ! -r "$srcdir/$ac_unique_file"; then
2425 ac_srcdir_defaulted=no
2427 if test ! -r "$srcdir/$ac_unique_file"; then
2428 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2429 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2431 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2433 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2435 # When building in place, set srcdir=.
2436 if test "$ac_abs_confdir" = "$ac_pwd"; then
2439 # Remove unnecessary trailing slashes from srcdir.
2440 # Double slashes in file names in object file debugging info
2441 # mess up M-x gdb in Emacs.
2443 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2445 for ac_var in $ac_precious_vars; do
2446 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2447 eval ac_env_${ac_var}_value=\$${ac_var}
2448 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2449 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2453 # Report the --help message.
2455 if test "$ac_init_help" = "long"; then
2456 # Omit some internal or obsolete options to make the list less imposing.
2457 # This message is too long to be a string in the A/UX 3.1 sh.
2459 \`configure' configures GNU Bison 3.0.5 to adapt to many kinds of systems.
2461 Usage: $0 [OPTION]... [VAR=VALUE]...
2463 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2464 VAR=VALUE. See below for descriptions of some of the useful variables.
2466 Defaults for the options are specified in brackets.
2469 -h, --help display this help and exit
2470 --help=short display options specific to this package
2471 --help=recursive display the short help of all the included packages
2472 -V, --version display version information and exit
2473 -q, --quiet, --silent do not print \`checking ...' messages
2474 --cache-file=FILE cache test results in FILE [disabled]
2475 -C, --config-cache alias for \`--cache-file=config.cache'
2476 -n, --no-create do not create output files
2477 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2479 Installation directories:
2480 --prefix=PREFIX install architecture-independent files in PREFIX
2481 [$ac_default_prefix]
2482 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2485 By default, \`make install' will install all the files in
2486 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2487 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2488 for instance \`--prefix=\$HOME'.
2490 For better control, use the options below.
2492 Fine tuning of the installation directories:
2493 --bindir=DIR user executables [EPREFIX/bin]
2494 --sbindir=DIR system admin executables [EPREFIX/sbin]
2495 --libexecdir=DIR program executables [EPREFIX/libexec]
2496 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2497 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2498 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2499 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2500 --libdir=DIR object code libraries [EPREFIX/lib]
2501 --includedir=DIR C header files [PREFIX/include]
2502 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2503 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2504 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2505 --infodir=DIR info documentation [DATAROOTDIR/info]
2506 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2507 --mandir=DIR man documentation [DATAROOTDIR/man]
2508 --docdir=DIR documentation root [DATAROOTDIR/doc/bison]
2509 --htmldir=DIR html documentation [DOCDIR]
2510 --dvidir=DIR dvi documentation [DOCDIR]
2511 --pdfdir=DIR pdf documentation [DOCDIR]
2512 --psdir=DIR ps documentation [DOCDIR]
2518 --program-prefix=PREFIX prepend PREFIX to installed program names
2519 --program-suffix=SUFFIX append SUFFIX to installed program names
2520 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2523 --build=BUILD configure for building on BUILD [guessed]
2524 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2528 if test -n "$ac_init_help"; then
2529 case $ac_init_help in
2530 short | recursive ) echo "Configuration of GNU Bison 3.0.5:";;
2535 --disable-option-checking ignore unrecognized --enable/--with options
2536 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2537 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2538 --enable-silent-rules less verbose build output (undo: "make V=1")
2539 --disable-silent-rules verbose build output (undo: "make V=0")
2540 --enable-dependency-tracking
2541 do not reject slow dependency extractors
2542 --disable-dependency-tracking
2543 speeds up one-time build
2544 --disable-largefile omit support for large files
2545 --enable-threads={posix|solaris|pth|windows}
2546 specify multithreading API
2547 --disable-threads build without multithread safety
2548 --enable-gcc-warnings turn on lots of GCC warnings (not recommended).
2549 Also, issue synclines from the examples/ to
2550 the corresponding source in the Texinfo doc.
2551 --disable-yacc do not build a yacc command or an -ly library
2552 --disable-assert turn off assertions
2553 --disable-rpath do not hardcode runtime library paths
2554 --disable-nls do not use Native Language Support
2557 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2558 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2559 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2560 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2561 --without-libpth-prefix don't search for libpth in includedir and libdir
2562 --with-dmalloc use dmalloc, as in
2563 http://www.dmalloc.com/dmalloc.tar.gz
2564 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2565 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2566 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2567 --without-libintl-prefix don't search for libintl in includedir and libdir
2569 Some influential environment variables:
2570 CC C compiler command
2571 CFLAGS C compiler flags
2572 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2573 nonstandard directory <lib dir>
2574 LIBS libraries to pass to the linker, e.g. -l<library>
2575 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2576 you have headers in a nonstandard directory <include dir>
2577 CXX C++ compiler command
2578 CXXFLAGS C++ compiler flags
2580 YACC The `Yet Another Compiler Compiler' implementation to use.
2581 Defaults to the first program found out of: `bison -y', `byacc',
2583 YFLAGS The list of arguments that will be passed by default to $YACC.
2584 This script will default YFLAGS to the empty string to avoid a
2585 default value of `-d' given by some make applications.
2586 M4 Location of GNU M4 1.4.6 or later. Defaults to the first program
2587 of 'm4', 'gm4', or 'gnum4' on PATH that meets Autoconf needs.
2589 Use these variables to override the choices made by `configure' or to help
2590 it to find libraries and programs with nonstandard names/locations.
2592 Report bugs to <bug-bison@gnu.org>.
2593 GNU Bison home page: <http://www.gnu.org/software/bison/>.
2594 General help using GNU software: <http://www.gnu.org/gethelp/>.
2599 if test "$ac_init_help" = "recursive"; then
2600 # If there are subdirs, report their specific --help.
2601 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2602 test -d "$ac_dir" ||
2603 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2608 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2610 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2611 # A ".." for each directory in $ac_dir_suffix.
2612 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2613 case $ac_top_builddir_sub in
2614 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2615 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2618 ac_abs_top_builddir=$ac_pwd
2619 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2620 # for backward compatibility:
2621 ac_top_builddir=$ac_top_build_prefix
2624 .) # We are building in place.
2626 ac_top_srcdir=$ac_top_builddir_sub
2627 ac_abs_top_srcdir=$ac_pwd ;;
2628 [\\/]* | ?:[\\/]* ) # Absolute name.
2629 ac_srcdir=$srcdir$ac_dir_suffix;
2630 ac_top_srcdir=$srcdir
2631 ac_abs_top_srcdir=$srcdir ;;
2633 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2634 ac_top_srcdir=$ac_top_build_prefix$srcdir
2635 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2637 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2639 cd "$ac_dir" || { ac_status=$?; continue; }
2640 # Check for guested configure.
2641 if test -f "$ac_srcdir/configure.gnu"; then
2643 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2644 elif test -f "$ac_srcdir/configure"; then
2646 $SHELL "$ac_srcdir/configure" --help=recursive
2648 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2650 cd "$ac_pwd" || { ac_status=$?; break; }
2654 test -n "$ac_init_help" && exit $ac_status
2655 if $ac_init_version; then
2657 GNU Bison configure 3.0.5
2658 generated by GNU Autoconf 2.69
2660 Copyright (C) 2012 Free Software Foundation, Inc.
2661 This configure script is free software; the Free Software Foundation
2662 gives unlimited permission to copy, distribute and modify it.
2667 ## ------------------------ ##
2668 ## Autoconf initialization. ##
2669 ## ------------------------ ##
2671 # ac_fn_c_try_compile LINENO
2672 # --------------------------
2673 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2674 ac_fn_c_try_compile ()
2676 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2677 rm -f conftest.$ac_objext
2678 if { { ac_try="$ac_compile"
2680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2681 *) ac_try_echo=$ac_try;;
2683 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2684 $as_echo "$ac_try_echo"; } >&5
2685 (eval "$ac_compile") 2>conftest.err
2687 if test -s conftest.err; then
2688 grep -v '^ *+' conftest.err >conftest.er1
2689 cat conftest.er1 >&5
2690 mv -f conftest.er1 conftest.err
2692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2693 test $ac_status = 0; } && {
2694 test -z "$ac_c_werror_flag" ||
2695 test ! -s conftest.err
2696 } && test -s conftest.$ac_objext; then :
2699 $as_echo "$as_me: failed program was:" >&5
2700 sed 's/^/| /' conftest.$ac_ext >&5
2704 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2705 as_fn_set_status $ac_retval
2707 } # ac_fn_c_try_compile
2709 # ac_fn_cxx_try_compile LINENO
2710 # ----------------------------
2711 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2712 ac_fn_cxx_try_compile ()
2714 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2715 rm -f conftest.$ac_objext
2716 if { { ac_try="$ac_compile"
2718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2719 *) ac_try_echo=$ac_try;;
2721 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2722 $as_echo "$ac_try_echo"; } >&5
2723 (eval "$ac_compile") 2>conftest.err
2725 if test -s conftest.err; then
2726 grep -v '^ *+' conftest.err >conftest.er1
2727 cat conftest.er1 >&5
2728 mv -f conftest.er1 conftest.err
2730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2731 test $ac_status = 0; } && {
2732 test -z "$ac_cxx_werror_flag" ||
2733 test ! -s conftest.err
2734 } && test -s conftest.$ac_objext; then :
2737 $as_echo "$as_me: failed program was:" >&5
2738 sed 's/^/| /' conftest.$ac_ext >&5
2742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2743 as_fn_set_status $ac_retval
2745 } # ac_fn_cxx_try_compile
2747 # ac_fn_c_try_cpp LINENO
2748 # ----------------------
2749 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2753 if { { ac_try="$ac_cpp conftest.$ac_ext"
2755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2756 *) ac_try_echo=$ac_try;;
2758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2759 $as_echo "$ac_try_echo"; } >&5
2760 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2762 if test -s conftest.err; then
2763 grep -v '^ *+' conftest.err >conftest.er1
2764 cat conftest.er1 >&5
2765 mv -f conftest.er1 conftest.err
2767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2768 test $ac_status = 0; } > conftest.i && {
2769 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2770 test ! -s conftest.err
2774 $as_echo "$as_me: failed program was:" >&5
2775 sed 's/^/| /' conftest.$ac_ext >&5
2779 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2780 as_fn_set_status $ac_retval
2784 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2785 # -------------------------------------------------------
2786 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2787 # the include files in INCLUDES and setting the cache variable VAR
2789 ac_fn_c_check_header_mongrel ()
2791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2792 if eval \${$3+:} false; then :
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2794 $as_echo_n "checking for $2... " >&6; }
2795 if eval \${$3+:} false; then :
2796 $as_echo_n "(cached) " >&6
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2800 $as_echo "$ac_res" >&6; }
2802 # Is the header compilable?
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2804 $as_echo_n "checking $2 usability... " >&6; }
2805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806 /* end confdefs.h. */
2810 if ac_fn_c_try_compile "$LINENO"; then :
2811 ac_header_compiler=yes
2813 ac_header_compiler=no
2815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2817 $as_echo "$ac_header_compiler" >&6; }
2819 # Is the header present?
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2821 $as_echo_n "checking $2 presence... " >&6; }
2822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823 /* end confdefs.h. */
2826 if ac_fn_c_try_cpp "$LINENO"; then :
2827 ac_header_preproc=yes
2829 ac_header_preproc=no
2831 rm -f conftest.err conftest.i conftest.$ac_ext
2832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2833 $as_echo "$ac_header_preproc" >&6; }
2835 # So? What about this header?
2836 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2839 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2841 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2845 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2847 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2849 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2851 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2853 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2854 ( $as_echo "## -------------------------------- ##
2855 ## Report this to bug-bison@gnu.org ##
2856 ## -------------------------------- ##"
2857 ) | sed "s/^/$as_me: WARNING: /" >&2
2860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2861 $as_echo_n "checking for $2... " >&6; }
2862 if eval \${$3+:} false; then :
2863 $as_echo_n "(cached) " >&6
2865 eval "$3=\$ac_header_compiler"
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2869 $as_echo "$ac_res" >&6; }
2871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873 } # ac_fn_c_check_header_mongrel
2875 # ac_fn_c_try_run LINENO
2876 # ----------------------
2877 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2878 # that executables *can* be run.
2881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882 if { { ac_try="$ac_link"
2884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2885 *) ac_try_echo=$ac_try;;
2887 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2888 $as_echo "$ac_try_echo"; } >&5
2889 (eval "$ac_link") 2>&5
2891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2892 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2893 { { case "(($ac_try" in
2894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2895 *) ac_try_echo=$ac_try;;
2897 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2898 $as_echo "$ac_try_echo"; } >&5
2899 (eval "$ac_try") 2>&5
2901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2902 test $ac_status = 0; }; }; then :
2905 $as_echo "$as_me: program exited with status $ac_status" >&5
2906 $as_echo "$as_me: failed program was:" >&5
2907 sed 's/^/| /' conftest.$ac_ext >&5
2909 ac_retval=$ac_status
2911 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2912 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2913 as_fn_set_status $ac_retval
2917 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2918 # -------------------------------------------------------
2919 # Tests whether HEADER exists and can be compiled using the include files in
2920 # INCLUDES, setting the cache variable VAR accordingly.
2921 ac_fn_c_check_header_compile ()
2923 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2925 $as_echo_n "checking for $2... " >&6; }
2926 if eval \${$3+:} false; then :
2927 $as_echo_n "(cached) " >&6
2929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2930 /* end confdefs.h. */
2934 if ac_fn_c_try_compile "$LINENO"; then :
2939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2943 $as_echo "$ac_res" >&6; }
2944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2946 } # ac_fn_c_check_header_compile
2948 # ac_fn_c_try_link LINENO
2949 # -----------------------
2950 # Try to link conftest.$ac_ext, and return whether this succeeded.
2953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2954 rm -f conftest.$ac_objext conftest$ac_exeext
2955 if { { ac_try="$ac_link"
2957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2958 *) ac_try_echo=$ac_try;;
2960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2961 $as_echo "$ac_try_echo"; } >&5
2962 (eval "$ac_link") 2>conftest.err
2964 if test -s conftest.err; then
2965 grep -v '^ *+' conftest.err >conftest.er1
2966 cat conftest.er1 >&5
2967 mv -f conftest.er1 conftest.err
2969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2970 test $ac_status = 0; } && {
2971 test -z "$ac_c_werror_flag" ||
2972 test ! -s conftest.err
2973 } && test -s conftest$ac_exeext && {
2974 test "$cross_compiling" = yes ||
2975 test -x conftest$ac_exeext
2979 $as_echo "$as_me: failed program was:" >&5
2980 sed 's/^/| /' conftest.$ac_ext >&5
2984 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2985 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2986 # interfere with the next link command; also delete a directory that is
2987 # left behind by Apple's compiler. We do this before executing the actions.
2988 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2990 as_fn_set_status $ac_retval
2992 } # ac_fn_c_try_link
2994 # ac_fn_cxx_try_link LINENO
2995 # -------------------------
2996 # Try to link conftest.$ac_ext, and return whether this succeeded.
2997 ac_fn_cxx_try_link ()
2999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3000 rm -f conftest.$ac_objext conftest$ac_exeext
3001 if { { ac_try="$ac_link"
3003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3004 *) ac_try_echo=$ac_try;;
3006 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3007 $as_echo "$ac_try_echo"; } >&5
3008 (eval "$ac_link") 2>conftest.err
3010 if test -s conftest.err; then
3011 grep -v '^ *+' conftest.err >conftest.er1
3012 cat conftest.er1 >&5
3013 mv -f conftest.er1 conftest.err
3015 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3016 test $ac_status = 0; } && {
3017 test -z "$ac_cxx_werror_flag" ||
3018 test ! -s conftest.err
3019 } && test -s conftest$ac_exeext && {
3020 test "$cross_compiling" = yes ||
3021 test -x conftest$ac_exeext
3025 $as_echo "$as_me: failed program was:" >&5
3026 sed 's/^/| /' conftest.$ac_ext >&5
3030 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3031 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3032 # interfere with the next link command; also delete a directory that is
3033 # left behind by Apple's compiler. We do this before executing the actions.
3034 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3035 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3036 as_fn_set_status $ac_retval
3038 } # ac_fn_cxx_try_link
3040 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3041 # -------------------------------------------
3042 # Tests whether TYPE exists after having included INCLUDES, setting cache
3043 # variable VAR accordingly.
3044 ac_fn_c_check_type ()
3046 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3048 $as_echo_n "checking for $2... " >&6; }
3049 if eval \${$3+:} false; then :
3050 $as_echo_n "(cached) " >&6
3053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3054 /* end confdefs.h. */
3065 if ac_fn_c_try_compile "$LINENO"; then :
3066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3067 /* end confdefs.h. */
3078 if ac_fn_c_try_compile "$LINENO"; then :
3083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3089 $as_echo "$ac_res" >&6; }
3090 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3092 } # ac_fn_c_check_type
3094 # ac_fn_c_check_func LINENO FUNC VAR
3095 # ----------------------------------
3096 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3097 ac_fn_c_check_func ()
3099 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3101 $as_echo_n "checking for $2... " >&6; }
3102 if eval \${$3+:} false; then :
3103 $as_echo_n "(cached) " >&6
3105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3106 /* end confdefs.h. */
3107 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3108 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3109 #define $2 innocuous_$2
3111 /* System header to define __stub macros and hopefully few prototypes,
3112 which can conflict with char $2 (); below.
3113 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3114 <limits.h> exists even on freestanding compilers. */
3117 # include <limits.h>
3119 # include <assert.h>
3124 /* Override any GCC internal prototype to avoid an error.
3125 Use char because int might match the return type of a GCC
3126 builtin and then its argument prototype would still apply. */
3131 /* The GNU C library defines this for functions which it implements
3132 to always fail with ENOSYS. Some functions are actually named
3133 something starting with __ and the normal name is an alias. */
3134 #if defined __stub_$2 || defined __stub___$2
3146 if ac_fn_c_try_link "$LINENO"; then :
3151 rm -f core conftest.err conftest.$ac_objext \
3152 conftest$ac_exeext conftest.$ac_ext
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3156 $as_echo "$ac_res" >&6; }
3157 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3159 } # ac_fn_c_check_func
3161 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3162 # --------------------------------------------
3163 # Tries to find the compile-time value of EXPR in a program that includes
3164 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3166 ac_fn_c_compute_int ()
3168 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3169 if test "$cross_compiling" = yes; then
3170 # Depending upon the size, compute the lo and hi bounds.
3171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3172 /* end confdefs.h. */
3177 static int test_array [1 - 2 * !(($2) >= 0)];
3179 return test_array [0];
3185 if ac_fn_c_try_compile "$LINENO"; then :
3188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3189 /* end confdefs.h. */
3194 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3196 return test_array [0];
3202 if ac_fn_c_try_compile "$LINENO"; then :
3203 ac_hi=$ac_mid; break
3205 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3206 if test $ac_lo -le $ac_mid; then
3210 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3216 /* end confdefs.h. */
3221 static int test_array [1 - 2 * !(($2) < 0)];
3223 return test_array [0];
3229 if ac_fn_c_try_compile "$LINENO"; then :
3232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3233 /* end confdefs.h. */
3238 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3240 return test_array [0];
3246 if ac_fn_c_try_compile "$LINENO"; then :
3247 ac_lo=$ac_mid; break
3249 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3250 if test $ac_mid -le $ac_hi; then
3254 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3264 # Binary search between lo and hi bounds.
3265 while test "x$ac_lo" != "x$ac_hi"; do
3266 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3268 /* end confdefs.h. */
3273 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3275 return test_array [0];
3281 if ac_fn_c_try_compile "$LINENO"; then :
3284 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3289 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3294 /* end confdefs.h. */
3296 static long int longval () { return $2; }
3297 static unsigned long int ulongval () { return $2; }
3304 FILE *f = fopen ("conftest.val", "w");
3309 long int i = longval ();
3312 fprintf (f, "%ld", i);
3316 unsigned long int i = ulongval ();
3319 fprintf (f, "%lu", i);
3321 /* Do not output a trailing newline, as this causes \r\n confusion
3322 on some platforms. */
3323 return ferror (f) || fclose (f) != 0;
3329 if ac_fn_c_try_run "$LINENO"; then :
3330 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3335 conftest.$ac_objext conftest.beam conftest.$ac_ext
3339 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3340 as_fn_set_status $ac_retval
3342 } # ac_fn_c_compute_int
3344 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3345 # ---------------------------------------------
3346 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3348 ac_fn_c_check_decl ()
3350 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3351 as_decl_name=`echo $2|sed 's/ *(.*//'`
3352 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3354 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3355 if eval \${$3+:} false; then :
3356 $as_echo_n "(cached) " >&6
3358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3359 /* end confdefs.h. */
3364 #ifndef $as_decl_name
3366 (void) $as_decl_use;
3368 (void) $as_decl_name;
3376 if ac_fn_c_try_compile "$LINENO"; then :
3381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3385 $as_echo "$ac_res" >&6; }
3386 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3388 } # ac_fn_c_check_decl
3390 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3391 # ----------------------------------------------------
3392 # Tries to find if the field MEMBER exists in type AGGR, after including
3393 # INCLUDES, setting cache variable VAR accordingly.
3394 ac_fn_c_check_member ()
3396 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3398 $as_echo_n "checking for $2.$3... " >&6; }
3399 if eval \${$4+:} false; then :
3400 $as_echo_n "(cached) " >&6
3402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3403 /* end confdefs.h. */
3415 if ac_fn_c_try_compile "$LINENO"; then :
3418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3419 /* end confdefs.h. */
3425 if (sizeof ac_aggr.$3)
3431 if ac_fn_c_try_compile "$LINENO"; then :
3436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3442 $as_echo "$ac_res" >&6; }
3443 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3445 } # ac_fn_c_check_member
3446 cat >config.log <<_ACEOF
3447 This file contains any messages produced by compilers while
3448 running configure, to aid debugging if configure makes a mistake.
3450 It was created by GNU Bison $as_me 3.0.5, which was
3451 generated by GNU Autoconf 2.69. Invocation command line was
3463 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3464 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3465 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3466 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3467 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3469 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3470 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3472 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3473 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3474 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3475 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3476 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3477 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3478 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3486 test -z "$as_dir" && as_dir=.
3487 $as_echo "PATH: $as_dir"
3503 # Keep a trace of the command line.
3504 # Strip out --no-create and --no-recursion so they do not pile up.
3505 # Strip out --silent because we don't want to record it for future runs.
3506 # Also quote any args containing shell meta-characters.
3507 # Make two passes to allow for proper duplicate-argument suppression.
3511 ac_must_keep_next=false
3517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3519 | -silent | --silent | --silen | --sile | --sil)
3522 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3525 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3527 as_fn_append ac_configure_args1 " '$ac_arg'"
3528 if test $ac_must_keep_next = true; then
3529 ac_must_keep_next=false # Got value, back to normal.
3532 *=* | --config-cache | -C | -disable-* | --disable-* \
3533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3535 | -with-* | --with-* | -without-* | --without-* | --x)
3536 case "$ac_configure_args0 " in
3537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3540 -* ) ac_must_keep_next=true ;;
3543 as_fn_append ac_configure_args " '$ac_arg'"
3548 { ac_configure_args0=; unset ac_configure_args0;}
3549 { ac_configure_args1=; unset ac_configure_args1;}
3551 # When interrupted or exit'd, cleanup temporary files, and complete
3552 # config.log. We remove comments because anyway the quotes in there
3553 # would cause problems or look ugly.
3554 # WARNING: Use '\'' to represent an apostrophe within the trap.
3555 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3556 trap 'exit_status=$?
3557 # Save into config.log some information that might help in debugging.
3561 $as_echo "## ---------------- ##
3562 ## Cache variables. ##
3563 ## ---------------- ##"
3565 # The following way of writing the cache mishandles newlines in values,
3567 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3568 eval ac_val=\$$ac_var
3572 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3573 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3576 _ | IFS | as_nl) ;; #(
3577 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3578 *) { eval $ac_var=; unset $ac_var;} ;;
3583 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3584 *${as_nl}ac_space=\ *)
3586 "s/'\''/'\''\\\\'\'''\''/g;
3587 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3590 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3597 $as_echo "## ----------------- ##
3598 ## Output variables. ##
3599 ## ----------------- ##"
3601 for ac_var in $ac_subst_vars
3603 eval ac_val=\$$ac_var
3605 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3607 $as_echo "$ac_var='\''$ac_val'\''"
3611 if test -n "$ac_subst_files"; then
3612 $as_echo "## ------------------- ##
3613 ## File substitutions. ##
3614 ## ------------------- ##"
3616 for ac_var in $ac_subst_files
3618 eval ac_val=\$$ac_var
3620 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3622 $as_echo "$ac_var='\''$ac_val'\''"
3627 if test -s confdefs.h; then
3628 $as_echo "## ----------- ##
3635 test "$ac_signal" != 0 &&
3636 $as_echo "$as_me: caught signal $ac_signal"
3637 $as_echo "$as_me: exit $exit_status"
3639 rm -f core *.core core.conftest.* &&
3640 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3643 for ac_signal in 1 2 13 15; do
3644 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3648 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3649 rm -f -r conftest* confdefs.h
3651 $as_echo "/* confdefs.h */" > confdefs.h
3653 # Predefined preprocessor variables.
3655 cat >>confdefs.h <<_ACEOF
3656 #define PACKAGE_NAME "$PACKAGE_NAME"
3659 cat >>confdefs.h <<_ACEOF
3660 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3663 cat >>confdefs.h <<_ACEOF
3664 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3667 cat >>confdefs.h <<_ACEOF
3668 #define PACKAGE_STRING "$PACKAGE_STRING"
3671 cat >>confdefs.h <<_ACEOF
3672 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3675 cat >>confdefs.h <<_ACEOF
3676 #define PACKAGE_URL "$PACKAGE_URL"
3680 # Let the site file select an alternate cache file if it wants to.
3681 # Prefer an explicitly selected file to automatically selected ones.
3684 if test -n "$CONFIG_SITE"; then
3685 # We do not want a PATH search for config.site.
3686 case $CONFIG_SITE in #((
3687 -*) ac_site_file1=./$CONFIG_SITE;;
3688 */*) ac_site_file1=$CONFIG_SITE;;
3689 *) ac_site_file1=./$CONFIG_SITE;;
3691 elif test "x$prefix" != xNONE; then
3692 ac_site_file1=$prefix/share/config.site
3693 ac_site_file2=$prefix/etc/config.site
3695 ac_site_file1=$ac_default_prefix/share/config.site
3696 ac_site_file2=$ac_default_prefix/etc/config.site
3698 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3700 test "x$ac_site_file" = xNONE && continue
3701 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3702 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3703 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3704 sed 's/^/| /' "$ac_site_file" >&5
3706 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3708 as_fn_error $? "failed to load site script $ac_site_file
3709 See \`config.log' for more details" "$LINENO" 5; }
3713 if test -r "$cache_file"; then
3714 # Some versions of bash will fail to source /dev/null (special files
3715 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3716 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3718 $as_echo "$as_me: loading cache $cache_file" >&6;}
3720 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3721 *) . "./$cache_file";;
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3726 $as_echo "$as_me: creating cache $cache_file" >&6;}
3730 as_fn_append ac_header_list " locale.h"
3731 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3732 as_fn_append ac_header_list " sys/socket.h"
3733 as_fn_append ac_header_list " unistd.h"
3734 as_fn_append ac_func_list " fcntl"
3735 as_fn_append ac_func_list " symlink"
3736 as_fn_append ac_header_list " stdio_ext.h"
3737 as_fn_append ac_func_list " vasnprintf"
3738 as_fn_append ac_header_list " features.h"
3739 as_fn_append ac_func_list " snprintf"
3740 as_fn_append ac_func_list " __fseterr"
3741 as_fn_append ac_header_list " sys/stat.h"
3742 as_fn_append ac_func_list " getdtablesize"
3743 gl_getopt_required=GNU
3744 as_fn_append ac_header_list " getopt.h"
3745 as_fn_append ac_header_list " sys/cdefs.h"
3746 as_fn_append ac_func_list " getprogname"
3747 as_fn_append ac_func_list " getexecname"
3748 as_fn_append ac_header_list " limits.h"
3749 as_fn_append ac_header_list " wchar.h"
3750 as_fn_append ac_header_list " stdint.h"
3751 as_fn_append ac_header_list " inttypes.h"
3752 as_fn_append ac_func_list " lstat"
3753 as_fn_append ac_header_list " math.h"
3754 as_fn_append ac_func_list " mbsinit"
3755 as_fn_append ac_func_list " mbrtowc"
3756 as_fn_append ac_func_list " isascii"
3757 as_fn_append ac_header_list " sys/mman.h"
3758 as_fn_append ac_func_list " mprotect"
3759 as_fn_append ac_func_list " obstack_printf"
3760 as_fn_append ac_header_list " sys/param.h"
3761 as_fn_append ac_func_list " strerror_r"
3762 as_fn_append ac_func_list " __xpg_strerror_r"
3763 as_fn_append ac_func_list " pipe2"
3765 as_fn_append ac_func_list " sigaction"
3766 as_fn_append ac_func_list " sigaltstack"
3767 as_fn_append ac_func_list " siginterrupt"
3768 as_fn_append ac_header_list " spawn.h"
3769 as_fn_append ac_header_list " sys/time.h"
3770 as_fn_append ac_func_list " strdup"
3771 as_fn_append ac_func_list " catgets"
3772 as_fn_append ac_func_list " strndup"
3773 as_fn_append ac_header_list " sys/wait.h"
3774 as_fn_append ac_func_list " pipe"
3775 as_fn_append ac_header_list " crtdefs.h"
3776 as_fn_append ac_func_list " iswcntrl"
3777 as_fn_append ac_header_list " wctype.h"
3778 as_fn_append ac_func_list " wcwidth"
3779 as_fn_append ac_func_list " setlocale"
3780 gt_needs="$gt_needs need-ngettext"
3781 # Check that the precious variables saved in the cache have kept the same
3783 ac_cache_corrupted=false
3784 for ac_var in $ac_precious_vars; do
3785 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3786 eval ac_new_set=\$ac_env_${ac_var}_set
3787 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3788 eval ac_new_val=\$ac_env_${ac_var}_value
3789 case $ac_old_set,$ac_new_set in
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3792 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3793 ac_cache_corrupted=: ;;
3795 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3796 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3797 ac_cache_corrupted=: ;;
3800 if test "x$ac_old_val" != "x$ac_new_val"; then
3801 # differences in whitespace do not lead to failure.
3802 ac_old_val_w=`echo x $ac_old_val`
3803 ac_new_val_w=`echo x $ac_new_val`
3804 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3805 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3806 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3807 ac_cache_corrupted=:
3809 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3810 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3811 eval $ac_var=\$ac_old_val
3813 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3814 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3816 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3819 # Pass precious variables to config.status.
3820 if test "$ac_new_set" = set; then
3822 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3823 *) ac_arg=$ac_var=$ac_new_val ;;
3825 case " $ac_configure_args " in
3826 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3827 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3831 if $ac_cache_corrupted; then
3832 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3833 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3834 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3835 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3836 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3838 ## -------------------- ##
3839 ## Main body of script. ##
3840 ## -------------------- ##
3843 ac_cpp='$CPP $CPPFLAGS'
3844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3849 PACKAGE_COPYRIGHT_YEAR=2018
3852 cat >>confdefs.h <<_ACEOF
3853 #define PACKAGE_COPYRIGHT_YEAR $PACKAGE_COPYRIGHT_YEAR
3858 for ac_dir in build-aux "$srcdir"/build-aux; do
3859 if test -f "$ac_dir/install-sh"; then
3861 ac_install_sh="$ac_aux_dir/install-sh -c"
3863 elif test -f "$ac_dir/install.sh"; then
3865 ac_install_sh="$ac_aux_dir/install.sh -c"
3867 elif test -f "$ac_dir/shtool"; then
3869 ac_install_sh="$ac_aux_dir/shtool install -c"
3873 if test -z "$ac_aux_dir"; then
3874 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3877 # These three variables are undocumented and unsupported,
3878 # and are intended to be withdrawn in a future Autoconf release.
3879 # They can cause serious problems if a builder's source tree is in a directory
3880 # whose full name contains unusual characters.
3881 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3882 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3883 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3888 # We use Automake 1.14's %D% and %C%.
3890 # We want gnits strictness only when rolling a stable release. For
3891 # release candidates, we use version strings like 2.4.3_rc1, but gnits
3892 # doesn't like that, so we let the underscore disable gnits. Between
3893 # releases, we want to be able run make dist without being required to
3894 # add a bogus NEWS entry. In that case, the version string
3895 # automatically contains a dash, which we also let disable gnits.
3896 am__api_version='1.15'
3898 # Find a good install program. We prefer a C program (faster),
3899 # so one script is as good as another. But avoid the broken or
3900 # incompatible versions:
3901 # SysV /etc/install, /usr/sbin/install
3902 # SunOS /usr/etc/install
3903 # IRIX /sbin/install
3905 # AmigaOS /C/install, which installs bootblocks on floppy discs
3906 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3907 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3908 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3909 # OS/2's system install, which has a completely different semantic
3910 # ./install, which can be erroneously created by make from ./install.sh.
3911 # Reject install programs that cannot install multiple files.
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3913 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3914 if test -z "$INSTALL"; then
3915 if ${ac_cv_path_install+:} false; then :
3916 $as_echo_n "(cached) " >&6
3918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922 test -z "$as_dir" && as_dir=.
3923 # Account for people who put trailing slashes in PATH elements.
3924 case $as_dir/ in #((
3925 ./ | .// | /[cC]/* | \
3926 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3927 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3930 # OSF1 and SCO ODT 3.0 have their own names for install.
3931 # Don't use installbsd from OSF since it installs stuff as root
3933 for ac_prog in ginstall scoinst install; do
3934 for ac_exec_ext in '' $ac_executable_extensions; do
3935 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3936 if test $ac_prog = install &&
3937 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3938 # AIX install. It has an incompatible calling convention.
3940 elif test $ac_prog = install &&
3941 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3942 # program-specific install script used by HP pwplus--don't use.
3945 rm -rf conftest.one conftest.two conftest.dir
3946 echo one > conftest.one
3947 echo two > conftest.two
3949 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3950 test -s conftest.one && test -s conftest.two &&
3951 test -s conftest.dir/conftest.one &&
3952 test -s conftest.dir/conftest.two
3954 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3967 rm -rf conftest.one conftest.two conftest.dir
3970 if test "${ac_cv_path_install+set}" = set; then
3971 INSTALL=$ac_cv_path_install
3973 # As a last resort, use the slow shell script. Don't cache a
3974 # value for INSTALL within a source directory, because that will
3975 # break other packages using the cache if that directory is
3976 # removed, or if the value is a relative name.
3977 INSTALL=$ac_install_sh
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3981 $as_echo "$INSTALL" >&6; }
3983 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3984 # It thinks the first close brace ends the variable substitution.
3985 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3987 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3989 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3992 $as_echo_n "checking whether build environment is sane... " >&6; }
3993 # Reject unsafe characters in $srcdir or the absolute working directory
3994 # name. Accept space and tab only in the latter.
3998 *[\\\"\#\$\&\'\`$am_lf]*)
3999 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4002 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
4003 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4006 # Do 'set' in a subshell so we don't clobber the current shell's
4007 # arguments. Must try -L first in case configure is actually a
4008 # symlink; some systems play weird games with the mod time of symlinks
4009 # (eg FreeBSD returns the mod time of the symlink's containing
4013 for am_try in 1 2; do
4014 echo "timestamp, slept: $am_has_slept" > conftest.file
4015 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4016 if test "$*" = "X"; then
4018 set X `ls -t "$srcdir/configure" conftest.file`
4020 if test "$*" != "X $srcdir/configure conftest.file" \
4021 && test "$*" != "X conftest.file $srcdir/configure"; then
4023 # If neither matched, then we have a broken ls. This can happen
4024 # if, for instance, CONFIG_SHELL is bash and it inherits a
4025 # broken ls alias from the environment. This has actually
4026 # happened. Such a system could not be considered "sane".
4027 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
4028 alias in your environment" "$LINENO" 5
4030 if test "$2" = conftest.file || test $am_try -eq 2; then
4037 test "$2" = conftest.file
4043 as_fn_error $? "newly created file is older than distributed files!
4044 Check your system clock" "$LINENO" 5
4046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4047 $as_echo "yes" >&6; }
4048 # If we didn't sleep, we still need to ensure time stamps of config.status and
4049 # generated files are strictly newer.
4051 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4058 test "$program_prefix" != NONE &&
4059 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4060 # Use a double $ so make ignores it.
4061 test "$program_suffix" != NONE &&
4062 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4063 # Double any \ or $.
4064 # By default was `s,x,x', remove it if useless.
4065 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4066 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4068 # Expand $ac_aux_dir to an absolute path.
4069 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4071 if test x"${MISSING+set}" != xset; then
4074 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
4076 MISSING="\${SHELL} $am_aux_dir/missing" ;;
4079 # Use eval to expand $SHELL
4080 if eval "$MISSING --is-lightweight"; then
4081 am_missing_run="$MISSING "
4084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4085 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4088 if test x"${install_sh+set}" != xset; then
4091 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4093 install_sh="\${SHELL} $am_aux_dir/install-sh"
4097 # Installed binaries are usually stripped using 'strip' when the user
4098 # run "make install-strip". However 'strip' might not be the right
4099 # tool to use in cross-compilation environments, therefore Automake
4100 # will honor the 'STRIP' environment variable to overrule this program.
4101 if test "$cross_compiling" != no; then
4102 if test -n "$ac_tool_prefix"; then
4103 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4104 set dummy ${ac_tool_prefix}strip; ac_word=$2
4105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4106 $as_echo_n "checking for $ac_word... " >&6; }
4107 if ${ac_cv_prog_STRIP+:} false; then :
4108 $as_echo_n "(cached) " >&6
4110 if test -n "$STRIP"; then
4111 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4117 test -z "$as_dir" && as_dir=.
4118 for ac_exec_ext in '' $ac_executable_extensions; do
4119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4120 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4130 STRIP=$ac_cv_prog_STRIP
4131 if test -n "$STRIP"; then
4132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4133 $as_echo "$STRIP" >&6; }
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4136 $as_echo "no" >&6; }
4141 if test -z "$ac_cv_prog_STRIP"; then
4143 # Extract the first word of "strip", so it can be a program name with args.
4144 set dummy strip; ac_word=$2
4145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4146 $as_echo_n "checking for $ac_word... " >&6; }
4147 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4148 $as_echo_n "(cached) " >&6
4150 if test -n "$ac_ct_STRIP"; then
4151 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157 test -z "$as_dir" && as_dir=.
4158 for ac_exec_ext in '' $ac_executable_extensions; do
4159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4160 ac_cv_prog_ac_ct_STRIP="strip"
4161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4170 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4171 if test -n "$ac_ct_STRIP"; then
4172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4173 $as_echo "$ac_ct_STRIP" >&6; }
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4176 $as_echo "no" >&6; }
4179 if test "x$ac_ct_STRIP" = x; then
4182 case $cross_compiling:$ac_tool_warned in
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4185 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4186 ac_tool_warned=yes ;;
4191 STRIP="$ac_cv_prog_STRIP"
4195 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4198 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4199 if test -z "$MKDIR_P"; then
4200 if ${ac_cv_path_mkdir+:} false; then :
4201 $as_echo_n "(cached) " >&6
4203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4204 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4207 test -z "$as_dir" && as_dir=.
4208 for ac_prog in mkdir gmkdir; do
4209 for ac_exec_ext in '' $ac_executable_extensions; do
4210 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4211 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4212 'mkdir (GNU coreutils) '* | \
4213 'mkdir (coreutils) '* | \
4214 'mkdir (fileutils) '4.1*)
4215 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4225 test -d ./--version && rmdir ./--version
4226 if test "${ac_cv_path_mkdir+set}" = set; then
4227 MKDIR_P="$ac_cv_path_mkdir -p"
4229 # As a last resort, use the slow shell script. Don't cache a
4230 # value for MKDIR_P within a source directory, because that will
4231 # break other packages using the cache if that directory is
4232 # removed, or if the value is a relative name.
4233 MKDIR_P="$ac_install_sh -d"
4236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4237 $as_echo "$MKDIR_P" >&6; }
4239 for ac_prog in gawk mawk nawk awk
4241 # Extract the first word of "$ac_prog", so it can be a program name with args.
4242 set dummy $ac_prog; ac_word=$2
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4244 $as_echo_n "checking for $ac_word... " >&6; }
4245 if ${ac_cv_prog_AWK+:} false; then :
4246 $as_echo_n "(cached) " >&6
4248 if test -n "$AWK"; then
4249 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255 test -z "$as_dir" && as_dir=.
4256 for ac_exec_ext in '' $ac_executable_extensions; do
4257 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4258 ac_cv_prog_AWK="$ac_prog"
4259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4269 if test -n "$AWK"; then
4270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4271 $as_echo "$AWK" >&6; }
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4274 $as_echo "no" >&6; }
4278 test -n "$AWK" && break
4281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4282 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4284 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4285 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4286 $as_echo_n "(cached) " >&6
4288 cat >conftest.make <<\_ACEOF
4291 @echo '@@@%%%=$(MAKE)=@@@%%%'
4293 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4294 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4296 eval ac_cv_prog_make_${ac_make}_set=yes;;
4298 eval ac_cv_prog_make_${ac_make}_set=no;;
4302 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4304 $as_echo "yes" >&6; }
4307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4308 $as_echo "no" >&6; }
4309 SET_MAKE="MAKE=${MAKE-make}"
4312 rm -rf .tst 2>/dev/null
4313 mkdir .tst 2>/dev/null
4314 if test -d .tst; then
4319 rmdir .tst 2>/dev/null
4321 # Check whether --enable-silent-rules was given.
4322 if test "${enable_silent_rules+set}" = set; then :
4323 enableval=$enable_silent_rules;
4326 case $enable_silent_rules in # (((
4327 yes) AM_DEFAULT_VERBOSITY=0;;
4328 no) AM_DEFAULT_VERBOSITY=1;;
4329 *) AM_DEFAULT_VERBOSITY=1;;
4331 am_make=${MAKE-make}
4332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4333 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4334 if ${am_cv_make_support_nested_variables+:} false; then :
4335 $as_echo_n "(cached) " >&6
4337 if $as_echo 'TRUE=$(BAR$(V))
4343 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4344 am_cv_make_support_nested_variables=yes
4346 am_cv_make_support_nested_variables=no
4349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4350 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4351 if test $am_cv_make_support_nested_variables = yes; then
4353 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4355 AM_V=$AM_DEFAULT_VERBOSITY
4356 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4360 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4361 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4362 # is not polluted with repeated "-I."
4363 am__isrc=' -I$(srcdir)'
4364 # test to see if srcdir already configured
4365 if test -f $srcdir/config.status; then
4366 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4370 # test whether we have cygpath
4371 if test -z "$CYGPATH_W"; then
4372 if (cygpath --version) >/dev/null 2>/dev/null; then
4373 CYGPATH_W='cygpath -w'
4380 # Define the identity of the package.
4385 cat >>confdefs.h <<_ACEOF
4386 #define PACKAGE "$PACKAGE"
4390 cat >>confdefs.h <<_ACEOF
4391 #define VERSION "$VERSION"
4394 # Some tools Automake needs.
4396 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4399 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4402 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4405 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4408 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4410 # For better backward compatibility. To be removed once Automake 1.9.x
4411 # dies out for good. For more background, see:
4412 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4413 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4414 mkdir_p='$(MKDIR_P)'
4416 # We need awk for the "check" target (and possibly the TAP driver). The
4417 # system "awk" is bad on some platforms.
4418 # Always define AMTAR for backward compatibility. Yes, it's still used
4419 # in the wild :-( We should find a proper way to deprecate it ...
4423 # We'll loop over all known methods to create a tar archive until one works.
4424 _am_tools='gnutar pax cpio none'
4426 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4433 # POSIX will say in a future version that running "rm -f" with no argument
4434 # is OK; and we want to be able to make that assumption in our Makefile
4435 # recipes. So use an aggressive probe to check that the usage we want is
4436 # actually supported "in the wild" to an acceptable degree.
4437 # See automake bug#10828.
4438 # To make any issue more visible, cause the running configure to be aborted
4439 # by default if the 'rm' program in use doesn't match our expectations; the
4440 # user can still override this though.
4441 if rm -f && rm -fr && rm -rf; then : OK; else
4445 Your 'rm' program seems unable to run without file operands specified
4446 on the command line, even when the '-f' option is present. This is contrary
4447 to the behaviour of most rm programs out there, and not conforming with
4448 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4450 Please tell bug-automake@gnu.org about your system, including the value
4451 of your $PATH and any error possibly output before this message. This
4452 can help us improve future automake versions.
4455 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4456 echo 'Configuration will proceed anyway, since you have set the' >&2
4457 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4461 Aborting the configuration process, to ensure you take notice of the issue.
4463 You can download and install GNU coreutils to get an 'rm' implementation
4464 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4466 If you want to complete the configuration process using your problematic
4467 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4468 to "yes", and re-run configure.
4471 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4475 # Check whether --enable-silent-rules was given.
4476 if test "${enable_silent_rules+set}" = set; then :
4477 enableval=$enable_silent_rules;
4480 case $enable_silent_rules in # (((
4481 yes) AM_DEFAULT_VERBOSITY=0;;
4482 no) AM_DEFAULT_VERBOSITY=1;;
4483 *) AM_DEFAULT_VERBOSITY=0;;
4485 am_make=${MAKE-make}
4486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4487 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4488 if ${am_cv_make_support_nested_variables+:} false; then :
4489 $as_echo_n "(cached) " >&6
4491 if $as_echo 'TRUE=$(BAR$(V))
4497 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4498 am_cv_make_support_nested_variables=yes
4500 am_cv_make_support_nested_variables=no
4503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4504 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4505 if test $am_cv_make_support_nested_variables = yes; then
4507 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4509 AM_V=$AM_DEFAULT_VERBOSITY
4510 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4514 ac_config_headers="$ac_config_headers lib/config.h:lib/config.in.h"
4517 # Checks for the compiler.
4518 DEPDIR="${am__leading_dot}deps"
4520 ac_config_commands="$ac_config_commands depfiles"
4523 am_make=${MAKE-make}
4524 cat > confinc << 'END'
4526 @echo this is the am__doit target
4529 # If we don't find an include directive, just comment out the code.
4530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4531 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4535 # First try GNU make style include.
4536 echo "include confinc" > confmf
4537 # Ignore all kinds of additional output from 'make'.
4538 case `$am_make -s -f confmf 2> /dev/null` in #(
4539 *the\ am__doit\ target*)
4545 # Now try BSD make style include.
4546 if test "$am__include" = "#"; then
4547 echo '.include "confinc"' > confmf
4548 case `$am_make -s -f confmf 2> /dev/null` in #(
4549 *the\ am__doit\ target*)
4550 am__include=.include
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4559 $as_echo "$_am_result" >&6; }
4560 rm -f confinc confmf
4562 # Check whether --enable-dependency-tracking was given.
4563 if test "${enable_dependency_tracking+set}" = set; then :
4564 enableval=$enable_dependency_tracking;
4567 if test "x$enable_dependency_tracking" != xno; then
4568 am_depcomp="$ac_aux_dir/depcomp"
4572 if test "x$enable_dependency_tracking" != xno; then
4582 ac_cpp='$CPP $CPPFLAGS'
4583 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4584 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4585 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4586 if test -n "$ac_tool_prefix"; then
4587 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4588 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590 $as_echo_n "checking for $ac_word... " >&6; }
4591 if ${ac_cv_prog_CC+:} false; then :
4592 $as_echo_n "(cached) " >&6
4594 if test -n "$CC"; then
4595 ac_cv_prog_CC="$CC" # Let the user override the test.
4597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4601 test -z "$as_dir" && as_dir=.
4602 for ac_exec_ext in '' $ac_executable_extensions; do
4603 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4604 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615 if test -n "$CC"; then
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4617 $as_echo "$CC" >&6; }
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620 $as_echo "no" >&6; }
4625 if test -z "$ac_cv_prog_CC"; then
4627 # Extract the first word of "gcc", so it can be a program name with args.
4628 set dummy gcc; ac_word=$2
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630 $as_echo_n "checking for $ac_word... " >&6; }
4631 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4632 $as_echo_n "(cached) " >&6
4634 if test -n "$ac_ct_CC"; then
4635 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641 test -z "$as_dir" && as_dir=.
4642 for ac_exec_ext in '' $ac_executable_extensions; do
4643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644 ac_cv_prog_ac_ct_CC="gcc"
4645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4654 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4655 if test -n "$ac_ct_CC"; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4657 $as_echo "$ac_ct_CC" >&6; }
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660 $as_echo "no" >&6; }
4663 if test "x$ac_ct_CC" = x; then
4666 case $cross_compiling:$ac_tool_warned in
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4669 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4670 ac_tool_warned=yes ;;
4678 if test -z "$CC"; then
4679 if test -n "$ac_tool_prefix"; then
4680 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4681 set dummy ${ac_tool_prefix}cc; ac_word=$2
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683 $as_echo_n "checking for $ac_word... " >&6; }
4684 if ${ac_cv_prog_CC+:} false; then :
4685 $as_echo_n "(cached) " >&6
4687 if test -n "$CC"; then
4688 ac_cv_prog_CC="$CC" # Let the user override the test.
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694 test -z "$as_dir" && as_dir=.
4695 for ac_exec_ext in '' $ac_executable_extensions; do
4696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697 ac_cv_prog_CC="${ac_tool_prefix}cc"
4698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4708 if test -n "$CC"; then
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4710 $as_echo "$CC" >&6; }
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713 $as_echo "no" >&6; }
4719 if test -z "$CC"; then
4720 # Extract the first word of "cc", so it can be a program name with args.
4721 set dummy cc; ac_word=$2
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4723 $as_echo_n "checking for $ac_word... " >&6; }
4724 if ${ac_cv_prog_CC+:} false; then :
4725 $as_echo_n "(cached) " >&6
4727 if test -n "$CC"; then
4728 ac_cv_prog_CC="$CC" # Let the user override the test.
4731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735 test -z "$as_dir" && as_dir=.
4736 for ac_exec_ext in '' $ac_executable_extensions; do
4737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4738 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4739 ac_prog_rejected=yes
4743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750 if test $ac_prog_rejected = yes; then
4751 # We found a bogon in the path, so make sure we never use it.
4752 set dummy $ac_cv_prog_CC
4754 if test $# != 0; then
4755 # We chose a different compiler from the bogus one.
4756 # However, it has the same basename, so the bogon will be chosen
4757 # first if we set CC to just the basename; use the full file name.
4759 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4765 if test -n "$CC"; then
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4767 $as_echo "$CC" >&6; }
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770 $as_echo "no" >&6; }
4775 if test -z "$CC"; then
4776 if test -n "$ac_tool_prefix"; then
4777 for ac_prog in cl.exe
4779 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4780 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4782 $as_echo_n "checking for $ac_word... " >&6; }
4783 if ${ac_cv_prog_CC+:} false; then :
4784 $as_echo_n "(cached) " >&6
4786 if test -n "$CC"; then
4787 ac_cv_prog_CC="$CC" # Let the user override the test.
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793 test -z "$as_dir" && as_dir=.
4794 for ac_exec_ext in '' $ac_executable_extensions; do
4795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4796 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4797 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4807 if test -n "$CC"; then
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4809 $as_echo "$CC" >&6; }
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812 $as_echo "no" >&6; }
4816 test -n "$CC" && break
4819 if test -z "$CC"; then
4821 for ac_prog in cl.exe
4823 # Extract the first word of "$ac_prog", so it can be a program name with args.
4824 set dummy $ac_prog; ac_word=$2
4825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826 $as_echo_n "checking for $ac_word... " >&6; }
4827 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4828 $as_echo_n "(cached) " >&6
4830 if test -n "$ac_ct_CC"; then
4831 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4837 test -z "$as_dir" && as_dir=.
4838 for ac_exec_ext in '' $ac_executable_extensions; do
4839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4840 ac_cv_prog_ac_ct_CC="$ac_prog"
4841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4850 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4851 if test -n "$ac_ct_CC"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4853 $as_echo "$ac_ct_CC" >&6; }
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856 $as_echo "no" >&6; }
4860 test -n "$ac_ct_CC" && break
4863 if test "x$ac_ct_CC" = x; then
4866 case $cross_compiling:$ac_tool_warned in
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4869 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4870 ac_tool_warned=yes ;;
4879 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4880 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4881 as_fn_error $? "no acceptable C compiler found in \$PATH
4882 See \`config.log' for more details" "$LINENO" 5; }
4884 # Provide some information about the compiler.
4885 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4888 for ac_option in --version -v -V -qversion; do
4889 { { ac_try="$ac_compiler $ac_option >&5"
4891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4892 *) ac_try_echo=$ac_try;;
4894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4895 $as_echo "$ac_try_echo"; } >&5
4896 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4898 if test -s conftest.err; then
4900 ... rest of stderr output deleted ...
4901 10q' conftest.err >conftest.er1
4902 cat conftest.er1 >&5
4904 rm -f conftest.er1 conftest.err
4905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4906 test $ac_status = 0; }
4909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4910 /* end confdefs.h. */
4920 ac_clean_files_save=$ac_clean_files
4921 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4922 # Try to create an executable without -o first, disregard a.out.
4923 # It will help us diagnose broken compilers, and finding out an intuition
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4926 $as_echo_n "checking whether the C compiler works... " >&6; }
4927 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4929 # The possible output files:
4930 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4933 for ac_file in $ac_files
4936 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4937 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4942 if { { ac_try="$ac_link_default"
4944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4945 *) ac_try_echo=$ac_try;;
4947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4948 $as_echo "$ac_try_echo"; } >&5
4949 (eval "$ac_link_default") 2>&5
4951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4952 test $ac_status = 0; }; then :
4953 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4954 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4955 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4956 # so that the user can short-circuit this test for compilers unknown to
4958 for ac_file in $ac_files ''
4960 test -f "$ac_file" || continue
4962 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4965 # We found the default executable, but exeext='' is most
4969 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4971 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4973 # We set ac_cv_exeext here because the later test for it is not
4974 # safe: cross compilers may not add the suffix if given an `-o'
4975 # argument, so we may need to know it at that point already.
4976 # Even if this section looks crufty: it has the advantage of
4983 test "$ac_cv_exeext" = no && ac_cv_exeext=
4988 if test -z "$ac_file"; then :
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990 $as_echo "no" >&6; }
4991 $as_echo "$as_me: failed program was:" >&5
4992 sed 's/^/| /' conftest.$ac_ext >&5
4994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4995 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4996 as_fn_error 77 "C compiler cannot create executables
4997 See \`config.log' for more details" "$LINENO" 5; }
4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5000 $as_echo "yes" >&6; }
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5003 $as_echo_n "checking for C compiler default output file name... " >&6; }
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5005 $as_echo "$ac_file" >&6; }
5006 ac_exeext=$ac_cv_exeext
5008 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5009 ac_clean_files=$ac_clean_files_save
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5011 $as_echo_n "checking for suffix of executables... " >&6; }
5012 if { { ac_try="$ac_link"
5014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5015 *) ac_try_echo=$ac_try;;
5017 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5018 $as_echo "$ac_try_echo"; } >&5
5019 (eval "$ac_link") 2>&5
5021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5022 test $ac_status = 0; }; then :
5023 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5024 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5025 # work properly (i.e., refer to `conftest.exe'), while it won't with
5027 for ac_file in conftest.exe conftest conftest.*; do
5028 test -f "$ac_file" || continue
5030 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5031 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5039 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5040 See \`config.log' for more details" "$LINENO" 5; }
5042 rm -f conftest conftest$ac_cv_exeext
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5044 $as_echo "$ac_cv_exeext" >&6; }
5046 rm -f conftest.$ac_ext
5047 EXEEXT=$ac_cv_exeext
5049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5050 /* end confdefs.h. */
5055 FILE *f = fopen ("conftest.out", "w");
5056 return ferror (f) || fclose (f) != 0;
5062 ac_clean_files="$ac_clean_files conftest.out"
5063 # Check that the compiler produces executables we can run. If not, either
5064 # the compiler is broken, or we cross compile.
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5066 $as_echo_n "checking whether we are cross compiling... " >&6; }
5067 if test "$cross_compiling" != yes; then
5068 { { ac_try="$ac_link"
5070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5071 *) ac_try_echo=$ac_try;;
5073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5074 $as_echo "$ac_try_echo"; } >&5
5075 (eval "$ac_link") 2>&5
5077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5078 test $ac_status = 0; }
5079 if { ac_try='./conftest$ac_cv_exeext'
5080 { { case "(($ac_try" in
5081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5082 *) ac_try_echo=$ac_try;;
5084 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5085 $as_echo "$ac_try_echo"; } >&5
5086 (eval "$ac_try") 2>&5
5088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5089 test $ac_status = 0; }; }; then
5092 if test "$cross_compiling" = maybe; then
5095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5096 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5097 as_fn_error $? "cannot run C compiled programs.
5098 If you meant to cross compile, use \`--host'.
5099 See \`config.log' for more details" "$LINENO" 5; }
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5104 $as_echo "$cross_compiling" >&6; }
5106 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5107 ac_clean_files=$ac_clean_files_save
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5109 $as_echo_n "checking for suffix of object files... " >&6; }
5110 if ${ac_cv_objext+:} false; then :
5111 $as_echo_n "(cached) " >&6
5113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5114 /* end confdefs.h. */
5124 rm -f conftest.o conftest.obj
5125 if { { ac_try="$ac_compile"
5127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5128 *) ac_try_echo=$ac_try;;
5130 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5131 $as_echo "$ac_try_echo"; } >&5
5132 (eval "$ac_compile") 2>&5
5134 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5135 test $ac_status = 0; }; then :
5136 for ac_file in conftest.o conftest.obj conftest.*; do
5137 test -f "$ac_file" || continue;
5139 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5140 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5145 $as_echo "$as_me: failed program was:" >&5
5146 sed 's/^/| /' conftest.$ac_ext >&5
5148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5149 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5150 as_fn_error $? "cannot compute suffix of object files: cannot compile
5151 See \`config.log' for more details" "$LINENO" 5; }
5153 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5156 $as_echo "$ac_cv_objext" >&6; }
5157 OBJEXT=$ac_cv_objext
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5160 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5161 if ${ac_cv_c_compiler_gnu+:} false; then :
5162 $as_echo_n "(cached) " >&6
5164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5165 /* end confdefs.h. */
5178 if ac_fn_c_try_compile "$LINENO"; then :
5183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5184 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5188 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5189 if test $ac_compiler_gnu = yes; then
5194 ac_test_CFLAGS=${CFLAGS+set}
5195 ac_save_CFLAGS=$CFLAGS
5196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5197 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5198 if ${ac_cv_prog_cc_g+:} false; then :
5199 $as_echo_n "(cached) " >&6
5201 ac_save_c_werror_flag=$ac_c_werror_flag
5202 ac_c_werror_flag=yes
5205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5206 /* end confdefs.h. */
5216 if ac_fn_c_try_compile "$LINENO"; then :
5220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5221 /* end confdefs.h. */
5231 if ac_fn_c_try_compile "$LINENO"; then :
5234 ac_c_werror_flag=$ac_save_c_werror_flag
5236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5237 /* end confdefs.h. */
5247 if ac_fn_c_try_compile "$LINENO"; then :
5250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5255 ac_c_werror_flag=$ac_save_c_werror_flag
5257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5258 $as_echo "$ac_cv_prog_cc_g" >&6; }
5259 if test "$ac_test_CFLAGS" = set; then
5260 CFLAGS=$ac_save_CFLAGS
5261 elif test $ac_cv_prog_cc_g = yes; then
5262 if test "$GCC" = yes; then
5268 if test "$GCC" = yes; then
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5275 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5276 if ${ac_cv_prog_cc_c89+:} false; then :
5277 $as_echo_n "(cached) " >&6
5279 ac_cv_prog_cc_c89=no
5281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5282 /* end confdefs.h. */
5286 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5287 struct buf { int x; };
5288 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5289 static char *e (p, i)
5295 static char *f (char * (*g) (char **, int), char **p, ...)
5300 s = g (p, va_arg (v,int));
5305 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5306 function prototypes and stuff, but not '\xHH' hex character constants.
5307 These don't provoke an error unfortunately, instead are silently treated
5308 as 'x'. The following induces an error, until -std is added to get
5309 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5310 array size at least. It's necessary to write '\x00'==0 to get something
5311 that's true only with -std. */
5312 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5314 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5315 inside strings and character constants. */
5317 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5319 int test (int i, double x);
5320 struct s1 {int (*f) (int a);};
5321 struct s2 {int (*f) (double a);};
5322 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5328 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5333 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5334 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5336 CC="$ac_save_CC $ac_arg"
5337 if ac_fn_c_try_compile "$LINENO"; then :
5338 ac_cv_prog_cc_c89=$ac_arg
5340 rm -f core conftest.err conftest.$ac_objext
5341 test "x$ac_cv_prog_cc_c89" != "xno" && break
5343 rm -f conftest.$ac_ext
5348 case "x$ac_cv_prog_cc_c89" in
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5351 $as_echo "none needed" >&6; } ;;
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5354 $as_echo "unsupported" >&6; } ;;
5356 CC="$CC $ac_cv_prog_cc_c89"
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5358 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5360 if test "x$ac_cv_prog_cc_c89" != xno; then :
5365 ac_cpp='$CPP $CPPFLAGS'
5366 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5367 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5368 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5371 ac_cpp='$CPP $CPPFLAGS'
5372 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5373 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5374 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5376 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5377 if ${am_cv_prog_cc_c_o+:} false; then :
5378 $as_echo_n "(cached) " >&6
5380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5381 /* end confdefs.h. */
5391 # Make sure it works both with $CC and with simple cc.
5392 # Following AC_PROG_CC_C_O, we do the test twice because some
5393 # compilers refuse to overwrite an existing .o file with -o,
5394 # though they will create one.
5395 am_cv_prog_cc_c_o=yes
5397 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5398 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401 (exit $ac_status); } \
5402 && test -f conftest2.$ac_objext; then
5405 am_cv_prog_cc_c_o=no
5409 rm -f core conftest*
5412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5413 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5414 if test "$am_cv_prog_cc_c_o" != yes; then
5415 # Losing compiler, so override with the script.
5416 # FIXME: It is wrong to rewrite CC.
5417 # But if we don't then we get into trouble of one sort or another.
5418 # A longer-term fix would be to have automake use am__CC in this case,
5419 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5420 CC="$am_aux_dir/compile $CC"
5423 ac_cpp='$CPP $CPPFLAGS'
5424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5429 depcc="$CC" am_compiler_list=
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5432 $as_echo_n "checking dependency style of $depcc... " >&6; }
5433 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5434 $as_echo_n "(cached) " >&6
5436 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5437 # We make a subdir and do the tests there. Otherwise we can end up
5438 # making bogus files that we don't know about and never remove. For
5439 # instance it was reported that on HP-UX the gcc test will end up
5440 # making a dummy file named 'D' -- because '-MD' means "put the output
5444 # Copy depcomp to subdir because otherwise we won't find it if we're
5445 # using a relative directory.
5446 cp "$am_depcomp" conftest.dir
5448 # We will build objects and dependencies in a subdirectory because
5449 # it helps to detect inapplicable dependency modes. For instance
5450 # both Tru64's cc and ICC support -MD to output dependencies as a
5451 # side effect of compilation, but ICC will put the dependencies in
5452 # the current directory while Tru64 will put them in the object
5456 am_cv_CC_dependencies_compiler_type=none
5457 if test "$am_compiler_list" = ""; then
5458 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5461 case " $depcc " in #(
5462 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5465 for depmode in $am_compiler_list; do
5466 # Setup a source with many dependencies, because some compilers
5467 # like to wrap large dependency lists on column 80 (with \), and
5468 # we should not choose a depcomp mode which is confused by this.
5470 # We need to recreate these files for each test, as the compiler may
5471 # overwrite some of them when testing with obscure command lines.
5472 # This happens at least with the AIX C compiler.
5474 for i in 1 2 3 4 5 6; do
5475 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5476 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5477 # Solaris 10 /bin/sh.
5478 echo '/* dummy */' > sub/conftst$i.h
5480 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5482 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5483 # mode. It turns out that the SunPro C++ compiler does not properly
5484 # handle '-M -o', and we need to detect this. Also, some Intel
5485 # versions had trouble with output in subdirs.
5486 am__obj=sub/conftest.${OBJEXT-o}
5487 am__minus_obj="-o $am__obj"
5490 # This depmode causes a compiler race in universal mode.
5491 test "$am__universal" = false || continue
5494 # After this tag, mechanisms are not by side-effect, so they'll
5495 # only be used when explicitly requested.
5496 if test "x$enable_dependency_tracking" = xyes; then
5502 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5503 # This compiler won't grok '-c -o', but also, the minuso test has
5504 # not run yet. These depmodes are late enough in the game, and
5505 # so weak that their functioning should not be impacted.
5506 am__obj=conftest.${OBJEXT-o}
5511 if depmode=$depmode \
5512 source=sub/conftest.c object=$am__obj \
5513 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5514 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5515 >/dev/null 2>conftest.err &&
5516 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5517 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5518 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5519 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5520 # icc doesn't choke on unknown options, it will just issue warnings
5521 # or remarks (even with -Werror). So we grep stderr for any message
5522 # that says an option was ignored or not supported.
5523 # When given -MP, icc 7.0 and 7.1 complain thusly:
5524 # icc: Command line warning: ignoring option '-M'; no argument required
5525 # The diagnosis changed in icc 8.0:
5526 # icc: Command line remark: option '-MP' not supported
5527 if (grep 'ignoring option' conftest.err ||
5528 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5529 am_cv_CC_dependencies_compiler_type=$depmode
5538 am_cv_CC_dependencies_compiler_type=none
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5543 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5544 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5547 test "x$enable_dependency_tracking" != xno \
5548 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5550 am__fastdepCC_FALSE='#'
5552 am__fastdepCC_TRUE='#'
5553 am__fastdepCC_FALSE=
5557 case $ac_cv_prog_cc_stdc in #(
5559 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5562 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5563 if ${ac_cv_prog_cc_c99+:} false; then :
5564 $as_echo_n "(cached) " >&6
5566 ac_cv_prog_cc_c99=no
5568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5569 /* end confdefs.h. */
5571 #include <stdbool.h>
5576 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5577 #define debug(...) fprintf (stderr, __VA_ARGS__)
5578 #define showlist(...) puts (#__VA_ARGS__)
5579 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5581 test_varargs_macros (void)
5586 debug ("X = %d\n", x);
5587 showlist (The first, second, and third items.);
5588 report (x>y, "x is %d but y is %d", x, y);
5591 // Check long long types.
5592 #define BIG64 18446744073709551615ull
5593 #define BIG32 4294967295ul
5594 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5596 your preprocessor is broken;
5600 your preprocessor is broken;
5602 static long long int bignum = -9223372036854775807LL;
5603 static unsigned long long int ubignum = BIG64;
5605 struct incomplete_array
5613 const wchar_t *name;
5617 typedef const char *ccp;
5620 test_restrict (ccp restrict text)
5622 // See if C++-style comments work.
5623 // Iterate through items via the restricted pointer.
5624 // Also check for declarations in for loops.
5625 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5630 // Check varargs and va_copy.
5632 test_varargs (const char *format, ...)
5635 va_start (args, format);
5637 va_copy (args_copy, args);
5648 str = va_arg (args_copy, const char *);
5651 number = va_arg (args_copy, int);
5654 fnumber = va_arg (args_copy, double);
5669 _Bool success = false;
5672 if (test_restrict ("String literal") == 0)
5674 char *restrict newvar = "Another string";
5677 test_varargs ("s, d' f .", "string", 65, 34.234);
5678 test_varargs_macros ();
5680 // Check flexible array members.
5681 struct incomplete_array *ia =
5682 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5684 for (int i = 0; i < ia->datasize; ++i)
5685 ia->data[i] = i * 1.234;
5687 // Check named initializers.
5688 struct named_init ni = {
5690 .name = L"Test wide string",
5691 .average = 543.34343,
5696 int dynamic_array[ni.number];
5697 dynamic_array[ni.number - 1] = 543;
5699 // work around unused variable warnings
5700 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5701 || dynamic_array[ni.number - 1] != 543);
5707 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5709 CC="$ac_save_CC $ac_arg"
5710 if ac_fn_c_try_compile "$LINENO"; then :
5711 ac_cv_prog_cc_c99=$ac_arg
5713 rm -f core conftest.err conftest.$ac_objext
5714 test "x$ac_cv_prog_cc_c99" != "xno" && break
5716 rm -f conftest.$ac_ext
5721 case "x$ac_cv_prog_cc_c99" in
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5724 $as_echo "none needed" >&6; } ;;
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5727 $as_echo "unsupported" >&6; } ;;
5729 CC="$CC $ac_cv_prog_cc_c99"
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5731 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5733 if test "x$ac_cv_prog_cc_c99" != xno; then :
5734 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5737 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5738 if ${ac_cv_prog_cc_c89+:} false; then :
5739 $as_echo_n "(cached) " >&6
5741 ac_cv_prog_cc_c89=no
5743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5744 /* end confdefs.h. */
5748 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5749 struct buf { int x; };
5750 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5751 static char *e (p, i)
5757 static char *f (char * (*g) (char **, int), char **p, ...)
5762 s = g (p, va_arg (v,int));
5767 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5768 function prototypes and stuff, but not '\xHH' hex character constants.
5769 These don't provoke an error unfortunately, instead are silently treated
5770 as 'x'. The following induces an error, until -std is added to get
5771 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5772 array size at least. It's necessary to write '\x00'==0 to get something
5773 that's true only with -std. */
5774 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5776 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5777 inside strings and character constants. */
5779 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5781 int test (int i, double x);
5782 struct s1 {int (*f) (int a);};
5783 struct s2 {int (*f) (double a);};
5784 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5790 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5795 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5796 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5798 CC="$ac_save_CC $ac_arg"
5799 if ac_fn_c_try_compile "$LINENO"; then :
5800 ac_cv_prog_cc_c89=$ac_arg
5802 rm -f core conftest.err conftest.$ac_objext
5803 test "x$ac_cv_prog_cc_c89" != "xno" && break
5805 rm -f conftest.$ac_ext
5810 case "x$ac_cv_prog_cc_c89" in
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5813 $as_echo "none needed" >&6; } ;;
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5816 $as_echo "unsupported" >&6; } ;;
5818 CC="$CC $ac_cv_prog_cc_c89"
5819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5820 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5822 if test "x$ac_cv_prog_cc_c89" != xno; then :
5823 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5825 ac_cv_prog_cc_stdc=no
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5832 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5833 if ${ac_cv_prog_cc_stdc+:} false; then :
5834 $as_echo_n "(cached) " >&6
5837 case $ac_cv_prog_cc_stdc in #(
5839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5840 $as_echo "unsupported" >&6; } ;; #(
5842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5843 $as_echo "none needed" >&6; } ;; #(
5845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5846 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5850 ac_cpp='$CXXCPP $CPPFLAGS'
5851 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5852 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5853 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5854 if test -z "$CXX"; then
5855 if test -n "$CCC"; then
5858 if test -n "$ac_tool_prefix"; then
5859 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
5861 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5862 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864 $as_echo_n "checking for $ac_word... " >&6; }
5865 if ${ac_cv_prog_CXX+:} false; then :
5866 $as_echo_n "(cached) " >&6
5868 if test -n "$CXX"; then
5869 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5875 test -z "$as_dir" && as_dir=.
5876 for ac_exec_ext in '' $ac_executable_extensions; do
5877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5878 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
5879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5889 if test -n "$CXX"; then
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5891 $as_echo "$CXX" >&6; }
5893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894 $as_echo "no" >&6; }
5898 test -n "$CXX" && break
5901 if test -z "$CXX"; then
5903 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
5905 # Extract the first word of "$ac_prog", so it can be a program name with args.
5906 set dummy $ac_prog; ac_word=$2
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5908 $as_echo_n "checking for $ac_word... " >&6; }
5909 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5910 $as_echo_n "(cached) " >&6
5912 if test -n "$ac_ct_CXX"; then
5913 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919 test -z "$as_dir" && as_dir=.
5920 for ac_exec_ext in '' $ac_executable_extensions; do
5921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5922 ac_cv_prog_ac_ct_CXX="$ac_prog"
5923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5933 if test -n "$ac_ct_CXX"; then
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5935 $as_echo "$ac_ct_CXX" >&6; }
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938 $as_echo "no" >&6; }
5942 test -n "$ac_ct_CXX" && break
5945 if test "x$ac_ct_CXX" = x; then
5948 case $cross_compiling:$ac_tool_warned in
5950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5951 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5952 ac_tool_warned=yes ;;
5960 # Provide some information about the compiler.
5961 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
5964 for ac_option in --version -v -V -qversion; do
5965 { { ac_try="$ac_compiler $ac_option >&5"
5967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5968 *) ac_try_echo=$ac_try;;
5970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5971 $as_echo "$ac_try_echo"; } >&5
5972 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5974 if test -s conftest.err; then
5976 ... rest of stderr output deleted ...
5977 10q' conftest.err >conftest.er1
5978 cat conftest.er1 >&5
5980 rm -f conftest.er1 conftest.err
5981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5982 test $ac_status = 0; }
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
5986 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
5987 if ${ac_cv_cxx_compiler_gnu+:} false; then :
5988 $as_echo_n "(cached) " >&6
5990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5991 /* end confdefs.h. */
6004 if ac_fn_cxx_try_compile "$LINENO"; then :
6009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
6014 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
6015 if test $ac_compiler_gnu = yes; then
6020 ac_test_CXXFLAGS=${CXXFLAGS+set}
6021 ac_save_CXXFLAGS=$CXXFLAGS
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
6023 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
6024 if ${ac_cv_prog_cxx_g+:} false; then :
6025 $as_echo_n "(cached) " >&6
6027 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6028 ac_cxx_werror_flag=yes
6031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6032 /* end confdefs.h. */
6042 if ac_fn_cxx_try_compile "$LINENO"; then :
6043 ac_cv_prog_cxx_g=yes
6046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6047 /* end confdefs.h. */
6057 if ac_fn_cxx_try_compile "$LINENO"; then :
6060 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6063 /* end confdefs.h. */
6073 if ac_fn_cxx_try_compile "$LINENO"; then :
6074 ac_cv_prog_cxx_g=yes
6076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6081 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
6084 $as_echo "$ac_cv_prog_cxx_g" >&6; }
6085 if test "$ac_test_CXXFLAGS" = set; then
6086 CXXFLAGS=$ac_save_CXXFLAGS
6087 elif test $ac_cv_prog_cxx_g = yes; then
6088 if test "$GXX" = yes; then
6094 if test "$GXX" = yes; then
6101 ac_cpp='$CPP $CPPFLAGS'
6102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6106 depcc="$CXX" am_compiler_list=
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6109 $as_echo_n "checking dependency style of $depcc... " >&6; }
6110 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
6111 $as_echo_n "(cached) " >&6
6113 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6114 # We make a subdir and do the tests there. Otherwise we can end up
6115 # making bogus files that we don't know about and never remove. For
6116 # instance it was reported that on HP-UX the gcc test will end up
6117 # making a dummy file named 'D' -- because '-MD' means "put the output
6121 # Copy depcomp to subdir because otherwise we won't find it if we're
6122 # using a relative directory.
6123 cp "$am_depcomp" conftest.dir
6125 # We will build objects and dependencies in a subdirectory because
6126 # it helps to detect inapplicable dependency modes. For instance
6127 # both Tru64's cc and ICC support -MD to output dependencies as a
6128 # side effect of compilation, but ICC will put the dependencies in
6129 # the current directory while Tru64 will put them in the object
6133 am_cv_CXX_dependencies_compiler_type=none
6134 if test "$am_compiler_list" = ""; then
6135 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6138 case " $depcc " in #(
6139 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6142 for depmode in $am_compiler_list; do
6143 # Setup a source with many dependencies, because some compilers
6144 # like to wrap large dependency lists on column 80 (with \), and
6145 # we should not choose a depcomp mode which is confused by this.
6147 # We need to recreate these files for each test, as the compiler may
6148 # overwrite some of them when testing with obscure command lines.
6149 # This happens at least with the AIX C compiler.
6151 for i in 1 2 3 4 5 6; do
6152 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6153 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6154 # Solaris 10 /bin/sh.
6155 echo '/* dummy */' > sub/conftst$i.h
6157 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6159 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6160 # mode. It turns out that the SunPro C++ compiler does not properly
6161 # handle '-M -o', and we need to detect this. Also, some Intel
6162 # versions had trouble with output in subdirs.
6163 am__obj=sub/conftest.${OBJEXT-o}
6164 am__minus_obj="-o $am__obj"
6167 # This depmode causes a compiler race in universal mode.
6168 test "$am__universal" = false || continue
6171 # After this tag, mechanisms are not by side-effect, so they'll
6172 # only be used when explicitly requested.
6173 if test "x$enable_dependency_tracking" = xyes; then
6179 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6180 # This compiler won't grok '-c -o', but also, the minuso test has
6181 # not run yet. These depmodes are late enough in the game, and
6182 # so weak that their functioning should not be impacted.
6183 am__obj=conftest.${OBJEXT-o}
6188 if depmode=$depmode \
6189 source=sub/conftest.c object=$am__obj \
6190 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6191 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6192 >/dev/null 2>conftest.err &&
6193 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6194 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6195 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6196 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6197 # icc doesn't choke on unknown options, it will just issue warnings
6198 # or remarks (even with -Werror). So we grep stderr for any message
6199 # that says an option was ignored or not supported.
6200 # When given -MP, icc 7.0 and 7.1 complain thusly:
6201 # icc: Command line warning: ignoring option '-M'; no argument required
6202 # The diagnosis changed in icc 8.0:
6203 # icc: Command line remark: option '-MP' not supported
6204 if (grep 'ignoring option' conftest.err ||
6205 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6206 am_cv_CXX_dependencies_compiler_type=$depmode
6215 am_cv_CXX_dependencies_compiler_type=none
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
6220 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
6221 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
6224 test "x$enable_dependency_tracking" != xno \
6225 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
6226 am__fastdepCXX_TRUE=
6227 am__fastdepCXX_FALSE='#'
6229 am__fastdepCXX_TRUE='#'
6230 am__fastdepCXX_FALSE=
6235 # Gnulib (early checks).
6238 ac_cpp='$CPP $CPPFLAGS'
6239 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6240 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6241 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6243 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6244 # On Suns, sometimes $CPP names a directory.
6245 if test -n "$CPP" && test -d "$CPP"; then
6248 if test -z "$CPP"; then
6249 if ${ac_cv_prog_CPP+:} false; then :
6250 $as_echo_n "(cached) " >&6
6252 # Double quotes because CPP needs to be expanded
6253 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6256 for ac_c_preproc_warn_flag in '' yes
6258 # Use a header file that comes with gcc, so configuring glibc
6259 # with a fresh cross-compiler works.
6260 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6261 # <limits.h> exists even on freestanding compilers.
6262 # On the NeXT, cc -E runs the code through the compiler's parser,
6263 # not just through cpp. "Syntax error" is here to catch this case.
6264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6265 /* end confdefs.h. */
6267 # include <limits.h>
6269 # include <assert.h>
6273 if ac_fn_c_try_cpp "$LINENO"; then :
6276 # Broken: fails on valid input.
6279 rm -f conftest.err conftest.i conftest.$ac_ext
6281 # OK, works on sane cases. Now check whether nonexistent headers
6282 # can be detected and how.
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284 /* end confdefs.h. */
6285 #include <ac_nonexistent.h>
6287 if ac_fn_c_try_cpp "$LINENO"; then :
6288 # Broken: success on invalid input.
6291 # Passes both tests.
6295 rm -f conftest.err conftest.i conftest.$ac_ext
6298 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6299 rm -f conftest.i conftest.err conftest.$ac_ext
6300 if $ac_preproc_ok; then :
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6313 $as_echo "$CPP" >&6; }
6315 for ac_c_preproc_warn_flag in '' yes
6317 # Use a header file that comes with gcc, so configuring glibc
6318 # with a fresh cross-compiler works.
6319 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6320 # <limits.h> exists even on freestanding compilers.
6321 # On the NeXT, cc -E runs the code through the compiler's parser,
6322 # not just through cpp. "Syntax error" is here to catch this case.
6323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6324 /* end confdefs.h. */
6326 # include <limits.h>
6328 # include <assert.h>
6332 if ac_fn_c_try_cpp "$LINENO"; then :
6335 # Broken: fails on valid input.
6338 rm -f conftest.err conftest.i conftest.$ac_ext
6340 # OK, works on sane cases. Now check whether nonexistent headers
6341 # can be detected and how.
6342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6343 /* end confdefs.h. */
6344 #include <ac_nonexistent.h>
6346 if ac_fn_c_try_cpp "$LINENO"; then :
6347 # Broken: success on invalid input.
6350 # Passes both tests.
6354 rm -f conftest.err conftest.i conftest.$ac_ext
6357 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6358 rm -f conftest.i conftest.err conftest.$ac_ext
6359 if $ac_preproc_ok; then :
6362 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6363 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6364 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6365 See \`config.log' for more details" "$LINENO" 5; }
6369 ac_cpp='$CPP $CPPFLAGS'
6370 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6371 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6372 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6376 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6377 if ${ac_cv_path_GREP+:} false; then :
6378 $as_echo_n "(cached) " >&6
6380 if test -z "$GREP"; then
6381 ac_path_GREP_found=false
6382 # Loop through the user's path and test for each of PROGNAME-LIST
6383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6384 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6387 test -z "$as_dir" && as_dir=.
6388 for ac_prog in grep ggrep; do
6389 for ac_exec_ext in '' $ac_executable_extensions; do
6390 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6391 as_fn_executable_p "$ac_path_GREP" || continue
6392 # Check for GNU ac_path_GREP and select it if it is found.
6393 # Check for GNU $ac_path_GREP
6394 case `"$ac_path_GREP" --version 2>&1` in
6396 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6399 $as_echo_n 0123456789 >"conftest.in"
6402 cat "conftest.in" "conftest.in" >"conftest.tmp"
6403 mv "conftest.tmp" "conftest.in"
6404 cp "conftest.in" "conftest.nl"
6405 $as_echo 'GREP' >> "conftest.nl"
6406 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6407 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6408 as_fn_arith $ac_count + 1 && ac_count=$as_val
6409 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6410 # Best one so far, save it but keep looking for a better one
6411 ac_cv_path_GREP="$ac_path_GREP"
6412 ac_path_GREP_max=$ac_count
6414 # 10*(2^10) chars as input seems more than enough
6415 test $ac_count -gt 10 && break
6417 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6420 $ac_path_GREP_found && break 3
6425 if test -z "$ac_cv_path_GREP"; then
6426 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6429 ac_cv_path_GREP=$GREP
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6434 $as_echo "$ac_cv_path_GREP" >&6; }
6435 GREP="$ac_cv_path_GREP"
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6439 $as_echo_n "checking for egrep... " >&6; }
6440 if ${ac_cv_path_EGREP+:} false; then :
6441 $as_echo_n "(cached) " >&6
6443 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6444 then ac_cv_path_EGREP="$GREP -E"
6446 if test -z "$EGREP"; then
6447 ac_path_EGREP_found=false
6448 # Loop through the user's path and test for each of PROGNAME-LIST
6449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6453 test -z "$as_dir" && as_dir=.
6454 for ac_prog in egrep; do
6455 for ac_exec_ext in '' $ac_executable_extensions; do
6456 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6457 as_fn_executable_p "$ac_path_EGREP" || continue
6458 # Check for GNU ac_path_EGREP and select it if it is found.
6459 # Check for GNU $ac_path_EGREP
6460 case `"$ac_path_EGREP" --version 2>&1` in
6462 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6465 $as_echo_n 0123456789 >"conftest.in"
6468 cat "conftest.in" "conftest.in" >"conftest.tmp"
6469 mv "conftest.tmp" "conftest.in"
6470 cp "conftest.in" "conftest.nl"
6471 $as_echo 'EGREP' >> "conftest.nl"
6472 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6473 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6474 as_fn_arith $ac_count + 1 && ac_count=$as_val
6475 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6476 # Best one so far, save it but keep looking for a better one
6477 ac_cv_path_EGREP="$ac_path_EGREP"
6478 ac_path_EGREP_max=$ac_count
6480 # 10*(2^10) chars as input seems more than enough
6481 test $ac_count -gt 10 && break
6483 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6486 $ac_path_EGREP_found && break 3
6491 if test -z "$ac_cv_path_EGREP"; then
6492 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6495 ac_cv_path_EGREP=$EGREP
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6501 $as_echo "$ac_cv_path_EGREP" >&6; }
6502 EGREP="$ac_cv_path_EGREP"
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6506 $as_echo_n "checking for ANSI C header files... " >&6; }
6507 if ${ac_cv_header_stdc+:} false; then :
6508 $as_echo_n "(cached) " >&6
6510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6511 /* end confdefs.h. */
6525 if ac_fn_c_try_compile "$LINENO"; then :
6526 ac_cv_header_stdc=yes
6528 ac_cv_header_stdc=no
6530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6532 if test $ac_cv_header_stdc = yes; then
6533 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6535 /* end confdefs.h. */
6539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6540 $EGREP "memchr" >/dev/null 2>&1; then :
6543 ac_cv_header_stdc=no
6549 if test $ac_cv_header_stdc = yes; then
6550 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552 /* end confdefs.h. */
6556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6557 $EGREP "free" >/dev/null 2>&1; then :
6560 ac_cv_header_stdc=no
6566 if test $ac_cv_header_stdc = yes; then
6567 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6568 if test "$cross_compiling" = yes; then :
6571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6572 /* end confdefs.h. */
6575 #if ((' ' & 0x0FF) == 0x020)
6576 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6577 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6579 # define ISLOWER(c) \
6580 (('a' <= (c) && (c) <= 'i') \
6581 || ('j' <= (c) && (c) <= 'r') \
6582 || ('s' <= (c) && (c) <= 'z'))
6583 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6586 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6591 for (i = 0; i < 256; i++)
6592 if (XOR (islower (i), ISLOWER (i))
6593 || toupper (i) != TOUPPER (i))
6598 if ac_fn_c_try_run "$LINENO"; then :
6601 ac_cv_header_stdc=no
6603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6604 conftest.$ac_objext conftest.beam conftest.$ac_ext
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6610 $as_echo "$ac_cv_header_stdc" >&6; }
6611 if test $ac_cv_header_stdc = yes; then
6613 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6617 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6618 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6619 inttypes.h stdint.h unistd.h
6621 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6622 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6624 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6625 cat >>confdefs.h <<_ACEOF
6626 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6635 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6636 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6643 if test "$MINIX" = yes; then
6645 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6648 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6651 $as_echo "#define _MINIX 1" >>confdefs.h
6654 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6660 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6661 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6662 $as_echo_n "(cached) " >&6
6664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6665 /* end confdefs.h. */
6667 # define __EXTENSIONS__ 1
6668 $ac_includes_default
6677 if ac_fn_c_try_compile "$LINENO"; then :
6678 ac_cv_safe_to_define___extensions__=yes
6680 ac_cv_safe_to_define___extensions__=no
6682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6685 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6686 test $ac_cv_safe_to_define___extensions__ = yes &&
6687 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6689 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6691 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6693 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6695 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6697 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
6699 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6701 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6703 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6705 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6707 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6709 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6711 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6713 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6715 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6718 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6719 if ${ac_cv_should_define__xopen_source+:} false; then :
6720 $as_echo_n "(cached) " >&6
6722 ac_cv_should_define__xopen_source=no
6723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6724 /* end confdefs.h. */
6736 if ac_fn_c_try_compile "$LINENO"; then :
6739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6740 /* end confdefs.h. */
6742 #define _XOPEN_SOURCE 500
6753 if ac_fn_c_try_compile "$LINENO"; then :
6754 ac_cv_should_define__xopen_source=yes
6756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6761 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6762 test $ac_cv_should_define__xopen_source = yes &&
6763 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6765 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6778 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6779 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6780 $as_echo_n "(cached) " >&6
6783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6784 /* end confdefs.h. */
6791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6792 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6793 gl_cv_c_amsterdam_compiler=yes
6795 gl_cv_c_amsterdam_compiler=no
6801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6802 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6804 if test $gl_cv_c_amsterdam_compiler = yes; then
6805 if test -z "$AR"; then
6808 if test -z "$ARFLAGS"; then
6815 if test -n "$ac_tool_prefix"; then
6816 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6817 set dummy ${ac_tool_prefix}ar; ac_word=$2
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819 $as_echo_n "checking for $ac_word... " >&6; }
6820 if ${ac_cv_prog_AR+:} false; then :
6821 $as_echo_n "(cached) " >&6
6823 if test -n "$AR"; then
6824 ac_cv_prog_AR="$AR" # Let the user override the test.
6826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6830 test -z "$as_dir" && as_dir=.
6831 for ac_exec_ext in '' $ac_executable_extensions; do
6832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6833 ac_cv_prog_AR="${ac_tool_prefix}ar"
6834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6844 if test -n "$AR"; then
6845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6846 $as_echo "$AR" >&6; }
6848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849 $as_echo "no" >&6; }
6854 if test -z "$ac_cv_prog_AR"; then
6856 # Extract the first word of "ar", so it can be a program name with args.
6857 set dummy ar; ac_word=$2
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6859 $as_echo_n "checking for $ac_word... " >&6; }
6860 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6861 $as_echo_n "(cached) " >&6
6863 if test -n "$ac_ct_AR"; then
6864 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6870 test -z "$as_dir" && as_dir=.
6871 for ac_exec_ext in '' $ac_executable_extensions; do
6872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873 ac_cv_prog_ac_ct_AR="ar"
6874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6883 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6884 if test -n "$ac_ct_AR"; then
6885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6886 $as_echo "$ac_ct_AR" >&6; }
6888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6889 $as_echo "no" >&6; }
6892 if test "x$ac_ct_AR" = x; then
6895 case $cross_compiling:$ac_tool_warned in
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6898 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6899 ac_tool_warned=yes ;;
6907 if test -z "$ARFLAGS"; then
6913 if test -z "$RANLIB"; then
6914 if test $gl_cv_c_amsterdam_compiler = yes; then
6917 if test -n "$ac_tool_prefix"; then
6918 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6919 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6921 $as_echo_n "checking for $ac_word... " >&6; }
6922 if ${ac_cv_prog_RANLIB+:} false; then :
6923 $as_echo_n "(cached) " >&6
6925 if test -n "$RANLIB"; then
6926 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6932 test -z "$as_dir" && as_dir=.
6933 for ac_exec_ext in '' $ac_executable_extensions; do
6934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6945 RANLIB=$ac_cv_prog_RANLIB
6946 if test -n "$RANLIB"; then
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6948 $as_echo "$RANLIB" >&6; }
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6951 $as_echo "no" >&6; }
6956 if test -z "$ac_cv_prog_RANLIB"; then
6957 ac_ct_RANLIB=$RANLIB
6958 # Extract the first word of "ranlib", so it can be a program name with args.
6959 set dummy ranlib; ac_word=$2
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6961 $as_echo_n "checking for $ac_word... " >&6; }
6962 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6963 $as_echo_n "(cached) " >&6
6965 if test -n "$ac_ct_RANLIB"; then
6966 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6972 test -z "$as_dir" && as_dir=.
6973 for ac_exec_ext in '' $ac_executable_extensions; do
6974 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6975 ac_cv_prog_ac_ct_RANLIB="ranlib"
6976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6985 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6986 if test -n "$ac_ct_RANLIB"; then
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6988 $as_echo "$ac_ct_RANLIB" >&6; }
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6991 $as_echo "no" >&6; }
6994 if test "x$ac_ct_RANLIB" = x; then
6997 case $cross_compiling:$ac_tool_warned in
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7000 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7001 ac_tool_warned=yes ;;
7003 RANLIB=$ac_ct_RANLIB
7006 RANLIB="$ac_cv_prog_RANLIB"
7014 # Make sure we can run config.sub.
7015 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
7016 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7019 $as_echo_n "checking build system type... " >&6; }
7020 if ${ac_cv_build+:} false; then :
7021 $as_echo_n "(cached) " >&6
7023 ac_build_alias=$build_alias
7024 test "x$ac_build_alias" = x &&
7025 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
7026 test "x$ac_build_alias" = x &&
7027 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7028 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
7029 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
7032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7033 $as_echo "$ac_cv_build" >&6; }
7034 case $ac_cv_build in
7036 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7039 ac_save_IFS=$IFS; IFS='-'
7045 # Remember, the first character of IFS is used to create $*,
7046 # except with old shells:
7049 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7053 $as_echo_n "checking host system type... " >&6; }
7054 if ${ac_cv_host+:} false; then :
7055 $as_echo_n "(cached) " >&6
7057 if test "x$host_alias" = x; then
7058 ac_cv_host=$ac_cv_build
7060 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
7061 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7066 $as_echo "$ac_cv_host" >&6; }
7069 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7072 ac_save_IFS=$IFS; IFS='-'
7078 # Remember, the first character of IFS is used to create $*,
7079 # except with old shells:
7082 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7088 # IEEE behaviour is the default on all CPUs except Alpha and SH
7089 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7090 # and the GCC 4.1.2 manual).
7093 # On Alpha systems, a compiler option provides the behaviour.
7094 # See the ieee(3) manual page, also available at
7095 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7096 if test -n "$GCC"; then
7097 # GCC has the option -mieee.
7098 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7099 CPPFLAGS="$CPPFLAGS -mieee"
7101 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
7102 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
7103 CPPFLAGS="$CPPFLAGS -ieee"
7107 if test -n "$GCC"; then
7108 # GCC has the option -mieee.
7109 CPPFLAGS="$CPPFLAGS -mieee"
7114 # Check whether --enable-largefile was given.
7115 if test "${enable_largefile+set}" = set; then :
7116 enableval=$enable_largefile;
7119 if test "$enable_largefile" != no; then
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7122 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7123 if ${ac_cv_sys_largefile_CC+:} false; then :
7124 $as_echo_n "(cached) " >&6
7126 ac_cv_sys_largefile_CC=no
7127 if test "$GCC" != yes; then
7130 # IRIX 6.2 and later do not support large files by default,
7131 # so use the C compiler's -n32 option if that helps.
7132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7133 /* end confdefs.h. */
7134 #include <sys/types.h>
7135 /* Check that off_t can represent 2**63 - 1 correctly.
7136 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7137 since some C++ compilers masquerading as C compilers
7138 incorrectly reject 9223372036854775807. */
7139 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7140 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7141 && LARGE_OFF_T % 2147483647 == 1)
7151 if ac_fn_c_try_compile "$LINENO"; then :
7154 rm -f core conftest.err conftest.$ac_objext
7156 if ac_fn_c_try_compile "$LINENO"; then :
7157 ac_cv_sys_largefile_CC=' -n32'; break
7159 rm -f core conftest.err conftest.$ac_objext
7163 rm -f conftest.$ac_ext
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7167 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7168 if test "$ac_cv_sys_largefile_CC" != no; then
7169 CC=$CC$ac_cv_sys_largefile_CC
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7173 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7174 if ${ac_cv_sys_file_offset_bits+:} false; then :
7175 $as_echo_n "(cached) " >&6
7178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7179 /* end confdefs.h. */
7180 #include <sys/types.h>
7181 /* Check that off_t can represent 2**63 - 1 correctly.
7182 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7183 since some C++ compilers masquerading as C compilers
7184 incorrectly reject 9223372036854775807. */
7185 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7186 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7187 && LARGE_OFF_T % 2147483647 == 1)
7197 if ac_fn_c_try_compile "$LINENO"; then :
7198 ac_cv_sys_file_offset_bits=no; break
7200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7202 /* end confdefs.h. */
7203 #define _FILE_OFFSET_BITS 64
7204 #include <sys/types.h>
7205 /* Check that off_t can represent 2**63 - 1 correctly.
7206 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7207 since some C++ compilers masquerading as C compilers
7208 incorrectly reject 9223372036854775807. */
7209 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7210 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7211 && LARGE_OFF_T % 2147483647 == 1)
7221 if ac_fn_c_try_compile "$LINENO"; then :
7222 ac_cv_sys_file_offset_bits=64; break
7224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7225 ac_cv_sys_file_offset_bits=unknown
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7230 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7231 case $ac_cv_sys_file_offset_bits in #(
7234 cat >>confdefs.h <<_ACEOF
7235 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7240 if test $ac_cv_sys_file_offset_bits = unknown; then
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7242 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7243 if ${ac_cv_sys_large_files+:} false; then :
7244 $as_echo_n "(cached) " >&6
7247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7248 /* end confdefs.h. */
7249 #include <sys/types.h>
7250 /* Check that off_t can represent 2**63 - 1 correctly.
7251 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7252 since some C++ compilers masquerading as C compilers
7253 incorrectly reject 9223372036854775807. */
7254 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7255 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7256 && LARGE_OFF_T % 2147483647 == 1)
7266 if ac_fn_c_try_compile "$LINENO"; then :
7267 ac_cv_sys_large_files=no; break
7269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7271 /* end confdefs.h. */
7272 #define _LARGE_FILES 1
7273 #include <sys/types.h>
7274 /* Check that off_t can represent 2**63 - 1 correctly.
7275 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7276 since some C++ compilers masquerading as C compilers
7277 incorrectly reject 9223372036854775807. */
7278 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7279 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7280 && LARGE_OFF_T % 2147483647 == 1)
7290 if ac_fn_c_try_compile "$LINENO"; then :
7291 ac_cv_sys_large_files=1; break
7293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294 ac_cv_sys_large_files=unknown
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7299 $as_echo "$ac_cv_sys_large_files" >&6; }
7300 case $ac_cv_sys_large_files in #(
7303 cat >>confdefs.h <<_ACEOF
7304 #define _LARGE_FILES $ac_cv_sys_large_files
7312 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7321 # Check whether --enable-threads was given.
7322 if test "${enable_threads+set}" = set; then :
7323 enableval=$enable_threads; gl_use_threads=$enableval
7325 if test -n "$gl_use_threads_default"; then
7326 gl_use_threads="$gl_use_threads_default"
7329 osf*) gl_use_threads=no ;;
7332 1.[0-5].*) gl_use_threads=no ;;
7333 *) gl_use_threads=yes ;;
7336 *) gl_use_threads=yes ;;
7342 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7343 # For using <pthread.h>:
7346 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7347 # groks <pthread.h>. cc also understands the flag -pthread, but
7348 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7349 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7350 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7351 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7352 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7355 # Some systems optimize for single-threaded programs by default, and
7356 # need special flags to disable these optimizations. For example, the
7357 # definition of 'errno' in <errno.h>.
7359 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7360 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7366 # Pre-early section.
7371 # Code from module absolute-header:
7372 # Code from module alignof:
7373 # Code from module alloca-opt:
7374 # Code from module announce-gen:
7375 # Code from module argmatch:
7376 # Code from module assert:
7377 # Code from module binary-io:
7378 # Code from module bitrotate:
7379 # Code from module c-ctype:
7380 # Code from module c-strcase:
7381 # Code from module c-strcaseeq:
7382 # Code from module calloc-posix:
7383 # Code from module cloexec:
7384 # Code from module close:
7385 # Code from module close-stream:
7386 # Code from module closeout:
7387 # Code from module concat-filename:
7388 # Code from module config-h:
7389 # Code from module configmake:
7390 # Code from module dirname:
7391 # Code from module dirname-lgpl:
7392 # Code from module do-release-commit-and-tag:
7393 # Code from module dosname:
7394 # Code from module double-slash-root:
7395 # Code from module dup2:
7396 # Code from module environ:
7397 # Code from module errno:
7398 # Code from module error:
7399 # Code from module exitfail:
7400 # Code from module extensions:
7401 # Code from module extern-inline:
7402 # Code from module fatal-signal:
7403 # Code from module fcntl:
7404 # Code from module fcntl-h:
7405 # Code from module fd-hook:
7406 # Code from module fd-safer-flag:
7407 # Code from module fdl:
7408 # Code from module filename:
7409 # Code from module float:
7410 # Code from module fopen:
7411 # Code from module fopen-safer:
7412 # Code from module fpending:
7413 # Code from module fpieee:
7415 # Code from module fprintf-posix:
7416 # Code from module fpucw:
7417 # Code from module frexp-nolibm:
7418 # Code from module frexpl-nolibm:
7419 # Code from module fseterr:
7420 # Code from module fstat:
7421 # Code from module gendocs:
7422 # Code from module getdtablesize:
7423 # Code from module getopt-gnu:
7424 # Code from module getopt-posix:
7425 # Code from module getprogname:
7426 # Code from module gettext:
7427 # Code from module gettext-h:
7428 # Code from module git-version-gen:
7429 # Code from module gitlog-to-changelog:
7430 # Code from module gnu-web-doc-update:
7431 # Code from module gnumakefile:
7432 # Code from module gnupload:
7433 # Code from module gpl-3.0:
7434 # Code from module hard-locale:
7435 # Code from module hash:
7436 # Code from module havelib:
7437 # Code from module host-cpu-c-abi:
7438 # Code from module include_next:
7439 # Code from module intprops:
7440 # Code from module inttypes:
7441 # Code from module inttypes-incomplete:
7442 # Code from module isnan:
7443 # Code from module isnand:
7444 # Code from module isnand-nolibm:
7445 # Code from module isnanf:
7446 # Code from module isnanf-nolibm:
7447 # Code from module isnanl:
7448 # Code from module isnanl-nolibm:
7449 # Code from module javacomp-script:
7450 # Code from module javaexec-script:
7451 # Code from module largefile:
7453 # Code from module ldexp:
7454 # Code from module ldexpl:
7455 # Code from module limits-h:
7456 # Code from module localcharset:
7457 # Code from module lock:
7458 # Code from module lstat:
7459 # Code from module maintainer-makefile:
7460 # Code from module malloc-gnu:
7461 # Code from module malloc-posix:
7462 # Code from module malloca:
7463 # Code from module math:
7464 # Code from module mbrtowc:
7465 # Code from module mbsinit:
7466 # Code from module mbswidth:
7467 # Code from module memchr:
7468 # Code from module minmax:
7469 # Code from module msvc-inval:
7470 # Code from module msvc-nothrow:
7471 # Code from module multiarch:
7472 # Code from module nocrash:
7473 # Code from module non-recursive-gnulib-prefix-hack:
7474 # Code from module obstack:
7475 # Code from module obstack-printf:
7476 # Code from module open:
7477 # Code from module pathmax:
7478 # Code from module perror:
7479 # Code from module pipe2:
7480 # Code from module pipe2-safer:
7481 # Code from module posix_spawn-internal:
7482 # Code from module posix_spawn_file_actions_addclose:
7483 # Code from module posix_spawn_file_actions_adddup2:
7484 # Code from module posix_spawn_file_actions_addopen:
7485 # Code from module posix_spawn_file_actions_destroy:
7486 # Code from module posix_spawn_file_actions_init:
7487 # Code from module posix_spawnattr_destroy:
7488 # Code from module posix_spawnattr_init:
7489 # Code from module posix_spawnattr_setflags:
7490 # Code from module posix_spawnattr_setsigmask:
7491 # Code from module posix_spawnp:
7492 # Code from module printf-frexp:
7493 # Code from module printf-frexpl:
7494 # Code from module printf-posix:
7495 # Code from module printf-safe:
7496 # Code from module progname:
7497 # Code from module quote:
7498 # Code from module quotearg:
7499 # Code from module quotearg-simple:
7500 # Code from module raise:
7501 # Code from module rawmemchr:
7502 # Code from module readme-release:
7503 # Code from module realloc-posix:
7504 # Code from module sched:
7505 # Code from module sigaction:
7506 # Code from module signal-h:
7507 # Code from module signbit:
7508 # Code from module sigprocmask:
7509 # Code from module size_max:
7510 # Code from module snippet/_Noreturn:
7511 # Code from module snippet/arg-nonnull:
7512 # Code from module snippet/c++defs:
7513 # Code from module snippet/warn-on-use:
7514 # Code from module snprintf:
7515 # Code from module snprintf-posix:
7516 # Code from module spawn:
7517 # Code from module spawn-pipe:
7518 # Code from module sprintf-posix:
7519 # Code from module ssize_t:
7520 # Code from module stat:
7521 # Code from module stat-time:
7522 # Code from module stdbool:
7523 # Code from module stddef:
7524 # Code from module stdint:
7525 # Code from module stdio:
7526 # Code from module stdlib:
7527 # Code from module stpcpy:
7528 # Code from module strchrnul:
7529 # Code from module strdup-posix:
7530 # Code from module streq:
7531 # Code from module strerror:
7532 # Code from module strerror-override:
7533 # Code from module strerror_r-posix:
7534 # Code from module string:
7535 # Code from module strndup:
7536 # Code from module strnlen:
7537 # Code from module strverscmp:
7538 # Code from module sys_stat:
7539 # Code from module sys_types:
7540 # Code from module sys_wait:
7541 # Code from module threadlib:
7545 # Code from module time:
7546 # Code from module unistd:
7547 # Code from module unistd-safer:
7548 # Code from module unitypes:
7549 # Code from module uniwidth/base:
7550 # Code from module uniwidth/width:
7551 # Code from module unlink:
7552 # Code from module unlocked-io:
7553 # Code from module unsetenv:
7554 # Code from module update-copyright:
7555 # Code from module useless-if-before-free:
7556 # Code from module vasnprintf:
7557 # Code from module vc-list-files:
7558 # Code from module verify:
7559 # Code from module vfprintf-posix:
7560 # Code from module vsnprintf:
7561 # Code from module vsnprintf-posix:
7562 # Code from module vsprintf-posix:
7563 # Code from module wait-process:
7564 # Code from module waitpid:
7565 # Code from module warnings:
7566 # Code from module wchar:
7567 # Code from module wctype-h:
7568 # Code from module wcwidth:
7569 # Code from module xalloc:
7570 # Code from module xalloc-die:
7571 # Code from module xalloc-oversized:
7572 # Code from module xconcat-filename:
7573 # Code from module xmemdup0:
7574 # Code from module xsize:
7575 # Code from module xstrndup:
7578 # Gnulib uses '#pragma GCC diagnostic push' to silence some
7579 # warnings, but older gcc doesn't support this.
7580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
7581 $as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; }
7582 if ${lv_cv_gcc_pragma_push_works+:} false; then :
7583 $as_echo_n "(cached) " >&6
7587 CFLAGS='-Wunknown-pragmas -Werror'
7588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7589 /* end confdefs.h. */
7591 #pragma GCC diagnostic push
7592 #pragma GCC diagnostic pop
7602 if ac_fn_c_try_compile "$LINENO"; then :
7603 lv_cv_gcc_pragma_push_works=yes
7605 lv_cv_gcc_pragma_push_works=no
7607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lv_cv_gcc_pragma_push_works" >&5
7611 $as_echo "$lv_cv_gcc_pragma_push_works" >&6; }
7613 # Check whether --enable-gcc-warnings was given.
7614 if test "${enable_gcc_warnings+set}" = set; then :
7615 enableval=$enable_gcc_warnings; case $enable_gcc_warnings in
7617 *) as_fn_error $? "invalid value for --gcc-warnings: $enable_gcc_warnings" "$LINENO" 5;;
7620 enable_gcc_warnings=no
7623 if test "$enable_gcc_warnings" = yes; then
7624 ENABLE_GCC_WARNINGS_TRUE=
7625 ENABLE_GCC_WARNINGS_FALSE='#'
7627 ENABLE_GCC_WARNINGS_TRUE='#'
7628 ENABLE_GCC_WARNINGS_FALSE=
7631 if test "$enable_gcc_warnings" = yes; then
7632 warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -Wdocumentation
7633 -Wformat -Wnull-dereference -Wpointer-arith -Wwrite-strings'
7634 warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes'
7635 warn_cxx='-Wnoexcept'
7636 # Warnings for the test suite only.
7638 # -fno-color-diagnostics: Clang's use of colors in the error
7639 # messages is confusing the tests looking at the compiler's output
7640 # (e.g., synclines.at).
7642 # -Wno-keyword-macro: We use the "#define private public" dirty
7643 # trick in the test suite to check some private implementation
7644 # details for lalr1.cc.
7645 warn_tests='-Wundef -pedantic -Wdeprecated -Wsign-compare -fno-color-diagnostics
7649 ac_cpp='$CPP $CPPFLAGS'
7650 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7651 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7652 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7654 # Clang supports many of GCC's -W options, but only issues warnings
7655 # on the ones it does not recognize. In that case, gl_WARN_ADD
7656 # thinks the option is supported, and unknown options are then added
7657 # to CFLAGS. But then, when -Werror is added in the test suite for
7658 # instance, the warning about the unknown option turns into an
7661 # This should be addressed by gnulib's gl_WARN_ADD, but in the
7662 # meanwhile, turn warnings about unknown options into errors in
7663 # CFLAGS, and restore CFLAGS after the tests.
7667 ac_cpp='$CPP $CPPFLAGS'
7668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7674 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7675 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
7676 $as_echo_n "(cached) " >&6
7679 gl_save_compiler_FLAGS="$CFLAGS"
7680 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7682 /* end confdefs.h. */
7692 if ac_fn_c_try_link "$LINENO"; then :
7693 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7695 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7697 rm -f core conftest.err conftest.$ac_objext \
7698 conftest$ac_exeext conftest.$ac_ext
7699 CFLAGS="$gl_save_compiler_FLAGS"
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7703 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7704 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
7705 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7707 gl_unknown_warnings_are_errors=
7711 ac_cpp='$CPP $CPPFLAGS'
7712 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7713 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7714 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror=unknown-warning-option" >&5
7720 $as_echo_n "checking whether C compiler handles -Werror=unknown-warning-option... " >&6; }
7721 if ${gl_cv_warn_c__Werror_unknown_warning_option+:} false; then :
7722 $as_echo_n "(cached) " >&6
7725 gl_save_compiler_FLAGS="$CFLAGS"
7726 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror=unknown-warning-option"
7727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7728 /* end confdefs.h. */
7738 if ac_fn_c_try_link "$LINENO"; then :
7739 gl_cv_warn_c__Werror_unknown_warning_option=yes
7741 gl_cv_warn_c__Werror_unknown_warning_option=no
7743 rm -f core conftest.err conftest.$ac_objext \
7744 conftest$ac_exeext conftest.$ac_ext
7745 CFLAGS="$gl_save_compiler_FLAGS"
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror_unknown_warning_option" >&5
7749 $as_echo "$gl_cv_warn_c__Werror_unknown_warning_option" >&6; }
7750 if test "x$gl_cv_warn_c__Werror_unknown_warning_option" = xyes; then :
7751 as_fn_append CFLAGS " -Werror=unknown-warning-option"
7755 for i in $warn_common $warn_c;
7759 as_gl_Warn=`$as_echo "gl_cv_warn_c_$i" | $as_tr_sh`
7761 case $gl_positive in
7762 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
7764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $i" >&5
7765 $as_echo_n "checking whether C compiler handles $i... " >&6; }
7766 if eval \${$as_gl_Warn+:} false; then :
7767 $as_echo_n "(cached) " >&6
7770 gl_save_compiler_FLAGS="$CFLAGS"
7771 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
7772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7773 /* end confdefs.h. */
7783 if ac_fn_c_try_link "$LINENO"; then :
7784 eval "$as_gl_Warn=yes"
7786 eval "$as_gl_Warn=no"
7788 rm -f core conftest.err conftest.$ac_objext \
7789 conftest$ac_exeext conftest.$ac_ext
7790 CFLAGS="$gl_save_compiler_FLAGS"
7793 eval ac_res=\$$as_gl_Warn
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7795 $as_echo "$ac_res" >&6; }
7796 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
7797 as_fn_append WARN_CFLAGS " $i"
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7805 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7806 if ${gl_cv_warn_c__Werror+:} false; then :
7807 $as_echo_n "(cached) " >&6
7810 gl_save_compiler_FLAGS="$CFLAGS"
7811 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813 /* end confdefs.h. */
7823 if ac_fn_c_try_link "$LINENO"; then :
7824 gl_cv_warn_c__Werror=yes
7826 gl_cv_warn_c__Werror=no
7828 rm -f core conftest.err conftest.$ac_objext \
7829 conftest$ac_exeext conftest.$ac_ext
7830 CFLAGS="$gl_save_compiler_FLAGS"
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7834 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7835 if test "x$gl_cv_warn_c__Werror" = xyes; then :
7836 as_fn_append WERROR_CFLAGS " -Werror"
7841 # Warnings for the test suite, and maybe for bison if GCC is modern
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wmissing-declarations" >&5
7846 $as_echo_n "checking whether C compiler handles -Wmissing-declarations... " >&6; }
7847 if ${gl_cv_warn_c__Wmissing_declarations+:} false; then :
7848 $as_echo_n "(cached) " >&6
7851 gl_save_compiler_FLAGS="$CFLAGS"
7852 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-declarations"
7853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7854 /* end confdefs.h. */
7864 if ac_fn_c_try_link "$LINENO"; then :
7865 gl_cv_warn_c__Wmissing_declarations=yes
7867 gl_cv_warn_c__Wmissing_declarations=no
7869 rm -f core conftest.err conftest.$ac_objext \
7870 conftest$ac_exeext conftest.$ac_ext
7871 CFLAGS="$gl_save_compiler_FLAGS"
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wmissing_declarations" >&5
7875 $as_echo "$gl_cv_warn_c__Wmissing_declarations" >&6; }
7876 if test "x$gl_cv_warn_c__Wmissing_declarations" = xyes; then :
7877 as_fn_append WARN_CFLAGS_TEST " -Wmissing-declarations"
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wmissing-prototypes" >&5
7884 $as_echo_n "checking whether C compiler handles -Wmissing-prototypes... " >&6; }
7885 if ${gl_cv_warn_c__Wmissing_prototypes+:} false; then :
7886 $as_echo_n "(cached) " >&6
7889 gl_save_compiler_FLAGS="$CFLAGS"
7890 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-prototypes"
7891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7892 /* end confdefs.h. */
7902 if ac_fn_c_try_link "$LINENO"; then :
7903 gl_cv_warn_c__Wmissing_prototypes=yes
7905 gl_cv_warn_c__Wmissing_prototypes=no
7907 rm -f core conftest.err conftest.$ac_objext \
7908 conftest$ac_exeext conftest.$ac_ext
7909 CFLAGS="$gl_save_compiler_FLAGS"
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wmissing_prototypes" >&5
7913 $as_echo "$gl_cv_warn_c__Wmissing_prototypes" >&6; }
7914 if test "x$gl_cv_warn_c__Wmissing_prototypes" = xyes; then :
7915 as_fn_append WARN_CFLAGS_TEST " -Wmissing-prototypes"
7919 test $lv_cv_gcc_pragma_push_works = yes &&
7920 as_fn_append WARN_CFLAGS " $WARN_CFLAGS_TEST"
7922 # Warnings for the test suite only.
7923 for i in $warn_tests;
7927 as_gl_Warn=`$as_echo "gl_cv_warn_c_$i" | $as_tr_sh`
7929 case $gl_positive in
7930 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $i" >&5
7933 $as_echo_n "checking whether C compiler handles $i... " >&6; }
7934 if eval \${$as_gl_Warn+:} false; then :
7935 $as_echo_n "(cached) " >&6
7938 gl_save_compiler_FLAGS="$CFLAGS"
7939 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
7940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941 /* end confdefs.h. */
7951 if ac_fn_c_try_link "$LINENO"; then :
7952 eval "$as_gl_Warn=yes"
7954 eval "$as_gl_Warn=no"
7956 rm -f core conftest.err conftest.$ac_objext \
7957 conftest$ac_exeext conftest.$ac_ext
7958 CFLAGS="$gl_save_compiler_FLAGS"
7961 eval ac_res=\$$as_gl_Warn
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7963 $as_echo "$ac_res" >&6; }
7964 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
7965 as_fn_append WARN_CFLAGS_TEST " $i"
7972 ac_cpp='$CPP $CPPFLAGS'
7973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7979 ac_cpp='$CXXCPP $CPPFLAGS'
7980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7984 save_CXXFLAGS=$CXXFLAGS
7988 ac_cpp='$CXXCPP $CPPFLAGS'
7989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror -Wunknown-warning-option" >&5
7995 $as_echo_n "checking whether C++ compiler handles -Werror -Wunknown-warning-option... " >&6; }
7996 if ${gl_cv_warn_cxx__Werror__Wunknown_warning_option+:} false; then :
7997 $as_echo_n "(cached) " >&6
8000 gl_save_compiler_FLAGS="$CXXFLAGS"
8001 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
8002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8003 /* end confdefs.h. */
8013 if ac_fn_cxx_try_link "$LINENO"; then :
8014 gl_cv_warn_cxx__Werror__Wunknown_warning_option=yes
8016 gl_cv_warn_cxx__Werror__Wunknown_warning_option=no
8018 rm -f core conftest.err conftest.$ac_objext \
8019 conftest$ac_exeext conftest.$ac_ext
8020 CXXFLAGS="$gl_save_compiler_FLAGS"
8023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror__Wunknown_warning_option" >&5
8024 $as_echo "$gl_cv_warn_cxx__Werror__Wunknown_warning_option" >&6; }
8025 if test "x$gl_cv_warn_cxx__Werror__Wunknown_warning_option" = xyes; then :
8026 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
8028 gl_unknown_warnings_are_errors=
8032 ac_cpp='$CXXCPP $CPPFLAGS'
8033 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8034 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8035 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror=unknown-warning-option" >&5
8041 $as_echo_n "checking whether C++ compiler handles -Werror=unknown-warning-option... " >&6; }
8042 if ${gl_cv_warn_cxx__Werror_unknown_warning_option+:} false; then :
8043 $as_echo_n "(cached) " >&6
8046 gl_save_compiler_FLAGS="$CXXFLAGS"
8047 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Werror=unknown-warning-option"
8048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8049 /* end confdefs.h. */
8059 if ac_fn_cxx_try_link "$LINENO"; then :
8060 gl_cv_warn_cxx__Werror_unknown_warning_option=yes
8062 gl_cv_warn_cxx__Werror_unknown_warning_option=no
8064 rm -f core conftest.err conftest.$ac_objext \
8065 conftest$ac_exeext conftest.$ac_ext
8066 CXXFLAGS="$gl_save_compiler_FLAGS"
8069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror_unknown_warning_option" >&5
8070 $as_echo "$gl_cv_warn_cxx__Werror_unknown_warning_option" >&6; }
8071 if test "x$gl_cv_warn_cxx__Werror_unknown_warning_option" = xyes; then :
8072 as_fn_append CXXFLAGS " -Werror=unknown-warning-option"
8076 for i in $warn_common $warn_cxx;
8080 as_gl_Warn=`$as_echo "gl_cv_warn_cxx_$i" | $as_tr_sh`
8082 case $gl_positive in
8083 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
8085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles $i" >&5
8086 $as_echo_n "checking whether C++ compiler handles $i... " >&6; }
8087 if eval \${$as_gl_Warn+:} false; then :
8088 $as_echo_n "(cached) " >&6
8091 gl_save_compiler_FLAGS="$CXXFLAGS"
8092 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
8093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8094 /* end confdefs.h. */
8104 if ac_fn_cxx_try_link "$LINENO"; then :
8105 eval "$as_gl_Warn=yes"
8107 eval "$as_gl_Warn=no"
8109 rm -f core conftest.err conftest.$ac_objext \
8110 conftest$ac_exeext conftest.$ac_ext
8111 CXXFLAGS="$gl_save_compiler_FLAGS"
8114 eval ac_res=\$$as_gl_Warn
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8116 $as_echo "$ac_res" >&6; }
8117 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
8118 as_fn_append WARN_CXXFLAGS " $i"
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wzero-as-null-pointer-constant" >&5
8126 $as_echo_n "checking whether C++ compiler handles -Wzero-as-null-pointer-constant... " >&6; }
8127 if ${gl_cv_warn_cxx__Wzero_as_null_pointer_constant+:} false; then :
8128 $as_echo_n "(cached) " >&6
8131 gl_save_compiler_FLAGS="$CXXFLAGS"
8132 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Wzero-as-null-pointer-constant"
8133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8134 /* end confdefs.h. */
8144 if ac_fn_cxx_try_link "$LINENO"; then :
8145 gl_cv_warn_cxx__Wzero_as_null_pointer_constant=yes
8147 gl_cv_warn_cxx__Wzero_as_null_pointer_constant=no
8149 rm -f core conftest.err conftest.$ac_objext \
8150 conftest$ac_exeext conftest.$ac_ext
8151 CXXFLAGS="$gl_save_compiler_FLAGS"
8154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wzero_as_null_pointer_constant" >&5
8155 $as_echo "$gl_cv_warn_cxx__Wzero_as_null_pointer_constant" >&6; }
8156 if test "x$gl_cv_warn_cxx__Wzero_as_null_pointer_constant" = xyes; then :
8157 as_fn_append WARN_CXXFLAGS " -Wzero-as-null-pointer-constant"
8163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror" >&5
8164 $as_echo_n "checking whether C++ compiler handles -Werror... " >&6; }
8165 if ${gl_cv_warn_cxx__Werror+:} false; then :
8166 $as_echo_n "(cached) " >&6
8169 gl_save_compiler_FLAGS="$CXXFLAGS"
8170 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Werror"
8171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8172 /* end confdefs.h. */
8182 if ac_fn_cxx_try_link "$LINENO"; then :
8183 gl_cv_warn_cxx__Werror=yes
8185 gl_cv_warn_cxx__Werror=no
8187 rm -f core conftest.err conftest.$ac_objext \
8188 conftest$ac_exeext conftest.$ac_ext
8189 CXXFLAGS="$gl_save_compiler_FLAGS"
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror" >&5
8193 $as_echo "$gl_cv_warn_cxx__Werror" >&6; }
8194 if test "x$gl_cv_warn_cxx__Werror" = xyes; then :
8195 as_fn_append WERROR_CXXFLAGS " -Werror"
8199 # Warnings for the test suite only.
8200 for i in $warn_tests;
8204 as_gl_Warn=`$as_echo "gl_cv_warn_cxx_$i" | $as_tr_sh`
8206 case $gl_positive in
8207 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
8209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles $i" >&5
8210 $as_echo_n "checking whether C++ compiler handles $i... " >&6; }
8211 if eval \${$as_gl_Warn+:} false; then :
8212 $as_echo_n "(cached) " >&6
8215 gl_save_compiler_FLAGS="$CXXFLAGS"
8216 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
8217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8218 /* end confdefs.h. */
8228 if ac_fn_cxx_try_link "$LINENO"; then :
8229 eval "$as_gl_Warn=yes"
8231 eval "$as_gl_Warn=no"
8233 rm -f core conftest.err conftest.$ac_objext \
8234 conftest$ac_exeext conftest.$ac_ext
8235 CXXFLAGS="$gl_save_compiler_FLAGS"
8238 eval ac_res=\$$as_gl_Warn
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8240 $as_echo "$ac_res" >&6; }
8241 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
8242 as_fn_append WARN_CXXFLAGS_TEST " $i"
8247 # Clang++ 3.2+ reject C code generated by Flex.
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wno-null-conversion" >&5
8251 $as_echo_n "checking whether C++ compiler handles -Wno-null-conversion... " >&6; }
8252 if ${gl_cv_warn_cxx__Wno_null_conversion+:} false; then :
8253 $as_echo_n "(cached) " >&6
8256 gl_save_compiler_FLAGS="$CXXFLAGS"
8257 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Wnull-conversion"
8258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8259 /* end confdefs.h. */
8269 if ac_fn_cxx_try_link "$LINENO"; then :
8270 gl_cv_warn_cxx__Wno_null_conversion=yes
8272 gl_cv_warn_cxx__Wno_null_conversion=no
8274 rm -f core conftest.err conftest.$ac_objext \
8275 conftest$ac_exeext conftest.$ac_ext
8276 CXXFLAGS="$gl_save_compiler_FLAGS"
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wno_null_conversion" >&5
8280 $as_echo "$gl_cv_warn_cxx__Wno_null_conversion" >&6; }
8281 if test "x$gl_cv_warn_cxx__Wno_null_conversion" = xyes; then :
8282 as_fn_append FLEX_SCANNER_CXXFLAGS " -Wno-null-conversion"
8286 # So does G++ 4.8...
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wno-sign-compare" >&5
8290 $as_echo_n "checking whether C++ compiler handles -Wno-sign-compare... " >&6; }
8291 if ${gl_cv_warn_cxx__Wno_sign_compare+:} false; then :
8292 $as_echo_n "(cached) " >&6
8295 gl_save_compiler_FLAGS="$CXXFLAGS"
8296 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
8297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8298 /* end confdefs.h. */
8308 if ac_fn_cxx_try_link "$LINENO"; then :
8309 gl_cv_warn_cxx__Wno_sign_compare=yes
8311 gl_cv_warn_cxx__Wno_sign_compare=no
8313 rm -f core conftest.err conftest.$ac_objext \
8314 conftest$ac_exeext conftest.$ac_ext
8315 CXXFLAGS="$gl_save_compiler_FLAGS"
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wno_sign_compare" >&5
8319 $as_echo "$gl_cv_warn_cxx__Wno_sign_compare" >&6; }
8320 if test "x$gl_cv_warn_cxx__Wno_sign_compare" = xyes; then :
8321 as_fn_append FLEX_SCANNER_CXXFLAGS " -Wno-sign-compare"
8325 # ... possiby in std=c++11 mode.
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wno-zero-as-null-pointer-constant" >&5
8329 $as_echo_n "checking whether C++ compiler handles -Wno-zero-as-null-pointer-constant... " >&6; }
8330 if ${gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant+:} false; then :
8331 $as_echo_n "(cached) " >&6
8334 gl_save_compiler_FLAGS="$CXXFLAGS"
8335 as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Wzero-as-null-pointer-constant"
8336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8337 /* end confdefs.h. */
8347 if ac_fn_cxx_try_link "$LINENO"; then :
8348 gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant=yes
8350 gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant=no
8352 rm -f core conftest.err conftest.$ac_objext \
8353 conftest$ac_exeext conftest.$ac_ext
8354 CXXFLAGS="$gl_save_compiler_FLAGS"
8357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant" >&5
8358 $as_echo "$gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant" >&6; }
8359 if test "x$gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant" = xyes; then :
8360 as_fn_append FLEX_SCANNER_CXXFLAGS " -Wno-zero-as-null-pointer-constant"
8364 CXXFLAGS=$save_CXXFLAGS
8366 ac_cpp='$CPP $CPPFLAGS'
8367 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8368 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8369 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8375 /* end confdefs.h. */
8377 int test_array[CHAR_BIT];
8386 if ac_fn_c_try_compile "$LINENO"; then :
8389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8390 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8391 as_fn_error $? "cannot compile a simple C program
8392 See \`config.log' for more details" "$LINENO" 5; }
8394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8399 ac_cpp='$CPP $CPPFLAGS'
8400 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8401 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8402 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports POSIXLY_CORRECT=1" >&5
8405 $as_echo_n "checking whether $CC supports POSIXLY_CORRECT=1... " >&6; }
8406 if ${bison_cv_c_supports_posixly_correct+:} false; then :
8407 $as_echo_n "(cached) " >&6
8409 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
8410 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
8411 xx) gl_had_POSIXLY_CORRECT=exported ;;
8412 x) gl_had_POSIXLY_CORRECT=yes ;;
8413 *) gl_had_POSIXLY_CORRECT= ;;
8416 export POSIXLY_CORRECT
8417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8418 /* end confdefs.h. */
8428 if ac_fn_c_try_link "$LINENO"; then :
8429 bison_cv_c_supports_posixly_correct=yes
8431 bison_cv_c_supports_posixly_correct=no
8433 rm -f core conftest.err conftest.$ac_objext \
8434 conftest$ac_exeext conftest.$ac_ext
8435 case $gl_had_POSIXLY_CORRECT in
8437 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
8438 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_c_supports_posixly_correct" >&5
8443 $as_echo "$bison_cv_c_supports_posixly_correct" >&6; }
8444 case $bison_cv_c_supports_posixly_correct in
8445 yes) C_COMPILER_POSIXLY_CORRECT=true
8447 no) C_COMPILER_POSIXLY_CORRECT=false
8452 ac_cpp='$CPP $CPPFLAGS'
8453 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8454 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8455 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX builds executables that work" >&5
8460 $as_echo_n "checking whether $CXX builds executables that work... " >&6; }
8461 if ${bison_cv_cxx_works+:} false; then :
8462 $as_echo_n "(cached) " >&6
8465 ac_cpp='$CXXCPP $CPPFLAGS'
8466 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8467 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8468 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8470 bison_cv_cxx_works=no
8471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8472 /* end confdefs.h. */
8477 using namespace std;
8483 typedef std::pair<unsigned int, int> uipair;
8484 std::map<unsigned int, int> m;
8485 std::map<unsigned int, int>::iterator i;
8486 m.insert (uipair (4, -4));
8487 for (i = m.begin (); i != m.end (); ++i)
8494 if ac_fn_cxx_try_compile "$LINENO"; then :
8495 if { ac_try='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_objext $LIBS >&5'
8496 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8500 test $ac_status = 0; }; }; then :
8501 if test "$cross_compiling" = yes; then :
8502 bison_cv_cxx_works=cross
8504 if { ac_try='./conftest$ac_exeext'
8505 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8508 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8509 test $ac_status = 0; }; }; then :
8510 bison_cv_cxx_works=yes
8514 rm -f conftest$ac_exeext
8516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8518 ac_cpp='$CPP $CPPFLAGS'
8519 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8520 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8521 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_cxx_works" >&5
8525 $as_echo "$bison_cv_cxx_works" >&6; }
8527 case $bison_cv_cxx_works in
8529 BISON_CXX_WORKS=':';;
8531 BISON_CXX_WORKS='exit 77';;
8535 if test $bison_cv_cxx_works = yes; then
8536 BISON_CXX_WORKS_TRUE=
8537 BISON_CXX_WORKS_FALSE='#'
8539 BISON_CXX_WORKS_TRUE='#'
8540 BISON_CXX_WORKS_FALSE=
8545 ac_cpp='$CXXCPP $CPPFLAGS'
8546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8547 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports POSIXLY_CORRECT=1" >&5
8551 $as_echo_n "checking whether $CXX supports POSIXLY_CORRECT=1... " >&6; }
8552 if ${bison_cv_cxx_supports_posixly_correct+:} false; then :
8553 $as_echo_n "(cached) " >&6
8555 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
8556 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
8557 xx) gl_had_POSIXLY_CORRECT=exported ;;
8558 x) gl_had_POSIXLY_CORRECT=yes ;;
8559 *) gl_had_POSIXLY_CORRECT= ;;
8562 export POSIXLY_CORRECT
8563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8564 /* end confdefs.h. */
8574 if ac_fn_cxx_try_link "$LINENO"; then :
8575 bison_cv_cxx_supports_posixly_correct=yes
8577 bison_cv_cxx_supports_posixly_correct=no
8579 rm -f core conftest.err conftest.$ac_objext \
8580 conftest$ac_exeext conftest.$ac_ext
8581 case $gl_had_POSIXLY_CORRECT in
8583 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
8584 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_cxx_supports_posixly_correct" >&5
8589 $as_echo "$bison_cv_cxx_supports_posixly_correct" >&6; }
8590 case $bison_cv_cxx_supports_posixly_correct in
8591 yes) CXX_COMPILER_POSIXLY_CORRECT=true
8593 no) CXX_COMPILER_POSIXLY_CORRECT=false
8598 ac_cpp='$CPP $CPPFLAGS'
8599 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8600 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8601 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8605 # Check whether --enable-yacc was given.
8606 if test "${enable_yacc+set}" = set; then :
8607 enableval=$enable_yacc;
8612 if test "$enable_yacc" = yes; then
8614 ENABLE_YACC_FALSE='#'
8616 ENABLE_YACC_TRUE='#'
8621 # Checks for programs.
8623 DOT=${DOT-"${am_missing_run}dot"}
8625 for ac_prog in flex lex
8627 # Extract the first word of "$ac_prog", so it can be a program name with args.
8628 set dummy $ac_prog; ac_word=$2
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8630 $as_echo_n "checking for $ac_word... " >&6; }
8631 if ${ac_cv_prog_LEX+:} false; then :
8632 $as_echo_n "(cached) " >&6
8634 if test -n "$LEX"; then
8635 ac_cv_prog_LEX="$LEX" # Let the user override the test.
8637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8641 test -z "$as_dir" && as_dir=.
8642 for ac_exec_ext in '' $ac_executable_extensions; do
8643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8644 ac_cv_prog_LEX="$ac_prog"
8645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8655 if test -n "$LEX"; then
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
8657 $as_echo "$LEX" >&6; }
8659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8660 $as_echo "no" >&6; }
8664 test -n "$LEX" && break
8666 test -n "$LEX" || LEX=":"
8668 if test "x$LEX" != "x:"; then
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lex is flex" >&5
8670 $as_echo_n "checking whether lex is flex... " >&6; }
8671 if ${ac_cv_prog_lex_is_flex+:} false; then :
8672 $as_echo_n "(cached) " >&6
8674 cat >conftest.l <<_ACEOF
8675 %option debug nodefault noinput nounput noyywrap never-interactive
8678 a { BEGIN SC_CONF_TEST; }
8680 if { { ac_try="$LEX conftest.l"
8682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8683 *) ac_try_echo=$ac_try;;
8685 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8686 $as_echo "$ac_try_echo"; } >&5
8687 (eval "$LEX conftest.l") 2>&5
8689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8690 test $ac_status = 0; }; then
8691 ac_cv_prog_lex_is_flex=yes
8693 ac_cv_prog_lex_is_flex=no
8697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_is_flex" >&5
8698 $as_echo "$ac_cv_prog_lex_is_flex" >&6; }
8699 LEX_IS_FLEX=`test "$ac_cv_prog_lex_is_flex" = yes && echo true || echo false`
8701 cat >conftest.l <<_ACEOF
8707 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
8708 yyless ((input () != 0)); }
8709 f { unput (yytext[0]); }
8710 . { BEGIN INITIAL; }
8712 #ifdef YYTEXT_POINTER
8713 extern char *yytext;
8718 return ! yylex () + ! yywrap ();
8721 { { ac_try="$LEX conftest.l"
8723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8724 *) ac_try_echo=$ac_try;;
8726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8727 $as_echo "$ac_try_echo"; } >&5
8728 (eval "$LEX conftest.l") 2>&5
8730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8731 test $ac_status = 0; }
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
8733 $as_echo_n "checking lex output file root... " >&6; }
8734 if ${ac_cv_prog_lex_root+:} false; then :
8735 $as_echo_n "(cached) " >&6
8738 if test -f lex.yy.c; then
8739 ac_cv_prog_lex_root=lex.yy
8740 elif test -f lexyy.c; then
8741 ac_cv_prog_lex_root=lexyy
8743 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
8746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
8747 $as_echo "$ac_cv_prog_lex_root" >&6; }
8748 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8750 if test -z "${LEXLIB+set}"; then
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
8752 $as_echo_n "checking lex library... " >&6; }
8753 if ${ac_cv_lib_lex+:} false; then :
8754 $as_echo_n "(cached) " >&6
8758 ac_cv_lib_lex='none needed'
8759 for ac_lib in '' -lfl -ll; do
8760 LIBS="$ac_lib $ac_save_LIBS"
8761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8762 /* end confdefs.h. */
8763 `cat $LEX_OUTPUT_ROOT.c`
8765 if ac_fn_c_try_link "$LINENO"; then :
8766 ac_cv_lib_lex=$ac_lib
8768 rm -f core conftest.err conftest.$ac_objext \
8769 conftest$ac_exeext conftest.$ac_ext
8770 test "$ac_cv_lib_lex" != 'none needed' && break
8775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
8776 $as_echo "$ac_cv_lib_lex" >&6; }
8777 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
8782 $as_echo_n "checking whether yytext is a pointer... " >&6; }
8783 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
8784 $as_echo_n "(cached) " >&6
8786 # POSIX says lex can declare yytext either as a pointer or an array; the
8787 # default is implementation-dependent. Figure out which it is, since
8788 # not all implementations provide the %pointer and %array declarations.
8789 ac_cv_prog_lex_yytext_pointer=no
8791 LIBS="$LEXLIB $ac_save_LIBS"
8792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8793 /* end confdefs.h. */
8795 #define YYTEXT_POINTER 1
8796 `cat $LEX_OUTPUT_ROOT.c`
8798 if ac_fn_c_try_link "$LINENO"; then :
8799 ac_cv_prog_lex_yytext_pointer=yes
8801 rm -f core conftest.err conftest.$ac_objext \
8802 conftest$ac_exeext conftest.$ac_ext
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
8807 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
8808 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8810 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
8813 rm -f conftest.l $LEX_OUTPUT_ROOT.c
8816 $LEX_IS_FLEX || test "X$LEX" = X: || {
8817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bypassing lex because flex is required" >&5
8818 $as_echo "$as_me: WARNING: bypassing lex because flex is required" >&2;}
8821 if $LEX_IS_FLEX && test $bison_cv_cxx_works = yes; then
8822 FLEX_CXX_WORKS_TRUE=
8823 FLEX_CXX_WORKS_FALSE='#'
8825 FLEX_CXX_WORKS_TRUE='#'
8826 FLEX_CXX_WORKS_FALSE=
8829 for ac_prog in 'bison -y' byacc
8831 # Extract the first word of "$ac_prog", so it can be a program name with args.
8832 set dummy $ac_prog; ac_word=$2
8833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8834 $as_echo_n "checking for $ac_word... " >&6; }
8835 if ${ac_cv_prog_YACC+:} false; then :
8836 $as_echo_n "(cached) " >&6
8838 if test -n "$YACC"; then
8839 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8845 test -z "$as_dir" && as_dir=.
8846 for ac_exec_ext in '' $ac_executable_extensions; do
8847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8848 ac_cv_prog_YACC="$ac_prog"
8849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8858 YACC=$ac_cv_prog_YACC
8859 if test -n "$YACC"; then
8860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8861 $as_echo "$YACC" >&6; }
8863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8864 $as_echo "no" >&6; }
8868 test -n "$YACC" && break
8870 test -n "$YACC" || YACC="yacc"
8872 if test -n "$ac_tool_prefix"; then
8873 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8874 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8876 $as_echo_n "checking for $ac_word... " >&6; }
8877 if ${ac_cv_prog_RANLIB+:} false; then :
8878 $as_echo_n "(cached) " >&6
8880 if test -n "$RANLIB"; then
8881 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8887 test -z "$as_dir" && as_dir=.
8888 for ac_exec_ext in '' $ac_executable_extensions; do
8889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8890 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900 RANLIB=$ac_cv_prog_RANLIB
8901 if test -n "$RANLIB"; then
8902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8903 $as_echo "$RANLIB" >&6; }
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8906 $as_echo "no" >&6; }
8911 if test -z "$ac_cv_prog_RANLIB"; then
8912 ac_ct_RANLIB=$RANLIB
8913 # Extract the first word of "ranlib", so it can be a program name with args.
8914 set dummy ranlib; ac_word=$2
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8916 $as_echo_n "checking for $ac_word... " >&6; }
8917 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8918 $as_echo_n "(cached) " >&6
8920 if test -n "$ac_ct_RANLIB"; then
8921 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8927 test -z "$as_dir" && as_dir=.
8928 for ac_exec_ext in '' $ac_executable_extensions; do
8929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8930 ac_cv_prog_ac_ct_RANLIB="ranlib"
8931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8940 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8941 if test -n "$ac_ct_RANLIB"; then
8942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8943 $as_echo "$ac_ct_RANLIB" >&6; }
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8946 $as_echo "no" >&6; }
8949 if test "x$ac_ct_RANLIB" = x; then
8952 case $cross_compiling:$ac_tool_warned in
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8955 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8956 ac_tool_warned=yes ;;
8958 RANLIB=$ac_ct_RANLIB
8961 RANLIB="$ac_cv_prog_RANLIB"
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU M4 that supports accurate traces" >&5
8966 $as_echo_n "checking for GNU M4 that supports accurate traces... " >&6; }
8967 if ${ac_cv_path_M4+:} false; then :
8968 $as_echo_n "(cached) " >&6
8971 ac_had_posixly_correct=${POSIXLY_CORRECT:+yes}
8972 { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
8973 if test -z "$M4"; then
8974 ac_path_M4_found=false
8975 # Loop through the user's path and test for each of PROGNAME-LIST
8976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8980 test -z "$as_dir" && as_dir=.
8981 for ac_prog in m4 gm4 gnum4; do
8982 for ac_exec_ext in '' $ac_executable_extensions; do
8983 ac_path_M4="$as_dir/$ac_prog$ac_exec_ext"
8984 as_fn_executable_p "$ac_path_M4" || continue
8985 # Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F.
8986 # Root out GNU M4 1.4.15 with buggy false negative replacement strstr.
8987 # Root out Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 with buggy
8988 # false positive strstr.
8989 ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)'
8990 ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl
8991 ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(..wi.d.,.d.),-1,bug)'
8992 ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(;:11-:12-:12-:12-:12-:12-:12-:12-:12.:12.:12.:12.:12.:12.:12.:12.:12-,:12-:12-:12-:12-:12-:12-:12-:12-),-1,,strstr-bug2)'
8993 test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
8994 && test -z "`$as_echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
8995 && test -f conftest.m4f \
8996 && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
8998 $ac_path_M4_found && break 3
9003 if test -z "$ac_cv_path_M4"; then
9004 as_fn_error $? "no acceptable m4 could be found in \$PATH.
9005 GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
9006 GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
9007 Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug." "$LINENO" 5
9014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_M4" >&5
9015 $as_echo "$ac_cv_path_M4" >&6; }
9017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_cv_path_M4 accepts --gnu" >&5
9018 $as_echo_n "checking whether $ac_cv_path_M4 accepts --gnu... " >&6; }
9019 if ${ac_cv_prog_gnu_m4_gnu+:} false; then :
9020 $as_echo_n "(cached) " >&6
9022 case `$M4 --help < /dev/null 2>&1` in
9023 *--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;;
9024 *) ac_cv_prog_gnu_m4_gnu=no ;;
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_gnu" >&5
9028 $as_echo "$ac_cv_prog_gnu_m4_gnu" >&6; }
9029 if test "$ac_cv_prog_gnu_m4_gnu" = yes; then
9035 if test x$ac_had_posixly_correct = xyes; then
9037 if test $ac_cv_prog_gnu_m4_gnu = no; then
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the version of M4 that was found does not support -g" >&5
9039 $as_echo "$as_me: WARNING: the version of M4 that was found does not support -g" >&2;}
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using it with POSIXLY_CORRECT set may cause problems" >&5
9041 $as_echo "$as_me: WARNING: using it with POSIXLY_CORRECT set may cause problems" >&2;}
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how m4 supports trace files" >&5
9045 $as_echo_n "checking how m4 supports trace files... " >&6; }
9046 if ${ac_cv_prog_gnu_m4_debugfile+:} false; then :
9047 $as_echo_n "(cached) " >&6
9049 case `$M4 --help < /dev/null 2>&1` in
9050 *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;;
9051 *) ac_cv_prog_gnu_m4_debugfile=--error-output ;;
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_debugfile" >&5
9055 $as_echo "$ac_cv_prog_gnu_m4_debugfile" >&6; }
9056 M4_DEBUGFILE=$ac_cv_prog_gnu_m4_debugfile
9060 cat >>confdefs.h <<_ACEOF
9065 cat >>confdefs.h <<_ACEOF
9066 #define M4_GNU_OPTION "$M4_GNU"
9069 # Extract the first word of "perl", so it can be a program name with args.
9070 set dummy perl; ac_word=$2
9071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9072 $as_echo_n "checking for $ac_word... " >&6; }
9073 if ${ac_cv_path_PERL+:} false; then :
9074 $as_echo_n "(cached) " >&6
9078 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9085 test -z "$as_dir" && as_dir=.
9086 for ac_exec_ext in '' $ac_executable_extensions; do
9087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9088 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9099 PERL=$ac_cv_path_PERL
9100 if test -n "$PERL"; then
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9102 $as_echo "$PERL" >&6; }
9104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105 $as_echo "no" >&6; }
9109 if test -z "$PERL"; then
9110 as_fn_error $? "perl not found" "$LINENO" 5
9113 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
9115 # Extract the first word of "xsltproc", so it can be a program name with args.
9116 set dummy xsltproc; ac_word=$2
9117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9118 $as_echo_n "checking for $ac_word... " >&6; }
9119 if ${ac_cv_path_XSLTPROC+:} false; then :
9120 $as_echo_n "(cached) " >&6
9124 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
9127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9131 test -z "$as_dir" && as_dir=.
9132 for ac_exec_ext in '' $ac_executable_extensions; do
9133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9134 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
9135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9145 XSLTPROC=$ac_cv_path_XSLTPROC
9146 if test -n "$XSLTPROC"; then
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
9148 $as_echo "$XSLTPROC" >&6; }
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151 $as_echo "no" >&6; }
9157 # Checks for header files.
9161 for ac_header in $ac_header_list
9163 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9164 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9166 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9167 cat >>confdefs.h <<_ACEOF
9168 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9179 # Checks for compiler characteristics.
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9181 $as_echo_n "checking for inline... " >&6; }
9182 if ${ac_cv_c_inline+:} false; then :
9183 $as_echo_n "(cached) " >&6
9186 for ac_kw in inline __inline__ __inline; do
9187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9188 /* end confdefs.h. */
9191 static $ac_kw foo_t static_foo () {return 0; }
9192 $ac_kw foo_t foo () {return 0; }
9196 if ac_fn_c_try_compile "$LINENO"; then :
9197 ac_cv_c_inline=$ac_kw
9199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9200 test "$ac_cv_c_inline" != no && break
9204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9205 $as_echo "$ac_cv_c_inline" >&6; }
9207 case $ac_cv_c_inline in
9210 case $ac_cv_c_inline in
9212 *) ac_val=$ac_cv_c_inline;;
9214 cat >>confdefs.h <<_ACEOF
9216 #define inline $ac_val
9223 # Gnulib (later checks). Putting them here rather than right after
9224 # gl_EARLY avoids some redundant checks.
9230 LIBC_FATAL_STDERR_=1
9231 export LIBC_FATAL_STDERR_
9233 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
9234 if test "x$ac_cv_type_size_t" = xyes; then :
9238 cat >>confdefs.h <<_ACEOF
9239 #define size_t unsigned int
9244 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9245 # for constant arguments. Useless!
9246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9247 $as_echo_n "checking for working alloca.h... " >&6; }
9248 if ${ac_cv_working_alloca_h+:} false; then :
9249 $as_echo_n "(cached) " >&6
9251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252 /* end confdefs.h. */
9257 char *p = (char *) alloca (2 * sizeof (int));
9263 if ac_fn_c_try_link "$LINENO"; then :
9264 ac_cv_working_alloca_h=yes
9266 ac_cv_working_alloca_h=no
9268 rm -f core conftest.err conftest.$ac_objext \
9269 conftest$ac_exeext conftest.$ac_ext
9271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9272 $as_echo "$ac_cv_working_alloca_h" >&6; }
9273 if test $ac_cv_working_alloca_h = yes; then
9275 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9280 $as_echo_n "checking for alloca... " >&6; }
9281 if ${ac_cv_func_alloca_works+:} false; then :
9282 $as_echo_n "(cached) " >&6
9284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9285 /* end confdefs.h. */
9287 # define alloca __builtin_alloca
9290 # include <malloc.h>
9291 # define alloca _alloca
9293 # ifdef HAVE_ALLOCA_H
9294 # include <alloca.h>
9299 # ifndef alloca /* predefined by HP cc +Olibcalls */
9300 void *alloca (size_t);
9310 char *p = (char *) alloca (1);
9316 if ac_fn_c_try_link "$LINENO"; then :
9317 ac_cv_func_alloca_works=yes
9319 ac_cv_func_alloca_works=no
9321 rm -f core conftest.err conftest.$ac_objext \
9322 conftest$ac_exeext conftest.$ac_ext
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9325 $as_echo "$ac_cv_func_alloca_works" >&6; }
9327 if test $ac_cv_func_alloca_works = yes; then
9329 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
9332 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9333 # that cause trouble. Some versions do not even contain alloca or
9334 # contain a buggy version. If you still want to use their alloca,
9335 # use ar to extract alloca.o from them instead of compiling alloca.c.
9341 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9343 $as_echo "#define C_ALLOCA 1" >>confdefs.h
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9347 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9348 if ${ac_cv_os_cray+:} false; then :
9349 $as_echo_n "(cached) " >&6
9351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9352 /* end confdefs.h. */
9353 #if defined CRAY && ! defined CRAY2
9360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9361 $EGREP "webecray" >/dev/null 2>&1; then :
9369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9370 $as_echo "$ac_cv_os_cray" >&6; }
9371 if test $ac_cv_os_cray = yes; then
9372 for ac_func in _getb67 GETB67 getb67; do
9373 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9374 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9375 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9377 cat >>confdefs.h <<_ACEOF
9378 #define CRAY_STACKSEG_END $ac_func
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9388 $as_echo_n "checking stack direction for C alloca... " >&6; }
9389 if ${ac_cv_c_stack_direction+:} false; then :
9390 $as_echo_n "(cached) " >&6
9392 if test "$cross_compiling" = yes; then :
9393 ac_cv_c_stack_direction=0
9395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9396 /* end confdefs.h. */
9397 $ac_includes_default
9399 find_stack_direction (int *addr, int depth)
9404 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9405 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9410 main (int argc, char **argv)
9412 return find_stack_direction (0, argc + !argv + 20) < 0;
9415 if ac_fn_c_try_run "$LINENO"; then :
9416 ac_cv_c_stack_direction=1
9418 ac_cv_c_stack_direction=-1
9420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9421 conftest.$ac_objext conftest.beam conftest.$ac_ext
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9426 $as_echo "$ac_cv_c_stack_direction" >&6; }
9427 cat >>confdefs.h <<_ACEOF
9428 #define STACK_DIRECTION $ac_cv_c_stack_direction
9437 GNULIB_CALLOC_POSIX=0;
9438 GNULIB_CANONICALIZE_FILE_NAME=0;
9439 GNULIB_GETLOADAVG=0;
9442 GNULIB_MALLOC_POSIX=0;
9449 GNULIB_POSIX_OPENPT=0;
9456 GNULIB_REALLOCARRAY=0;
9457 GNULIB_REALLOC_POSIX=0;
9460 GNULIB_SECURE_GETENV=0;
9465 GNULIB_SYSTEM_POSIX=0;
9471 HAVE_CANONICALIZE_FILE_NAME=1;
9472 HAVE_DECL_GETLOADAVG=1;
9475 HAVE_DECL_INITSTATE=1;
9481 HAVE_POSIX_OPENPT=1;
9488 HAVE_REALLOCARRAY=1;
9491 HAVE_SECURE_GETENV=1;
9494 HAVE_DECL_SETSTATE=1;
9498 HAVE_STRUCT_RANDOM_DATA=1;
9499 HAVE_SYS_LOADAVG_H=0;
9501 HAVE_DECL_UNSETENV=1;
9503 REPLACE_CANONICALIZE_FILE_NAME=0;
9508 REPLACE_PTSNAME_R=0;
9520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
9521 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
9522 if ${gl_cv_func_malloc_posix+:} false; then :
9523 $as_echo_n "(cached) " >&6
9526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9527 /* end confdefs.h. */
9532 #if defined _WIN32 && ! defined __CYGWIN__
9540 if ac_fn_c_try_compile "$LINENO"; then :
9541 gl_cv_func_malloc_posix=yes
9543 gl_cv_func_malloc_posix=no
9545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
9549 $as_echo "$gl_cv_func_malloc_posix" >&6; }
9559 GNULIB_EUIDACCESS=0;
9567 GNULIB_GETDOMAINNAME=0;
9568 GNULIB_GETDTABLESIZE=0;
9570 GNULIB_GETHOSTNAME=0;
9572 GNULIB_GETLOGIN_R=0;
9573 GNULIB_GETPAGESIZE=0;
9574 GNULIB_GETUSERSHELL=0;
9575 GNULIB_GROUP_MEMBER=0;
9587 GNULIB_READLINKAT=0;
9589 GNULIB_SETHOSTNAME=0;
9595 GNULIB_UNISTD_H_NONBLOCKING=0;
9596 GNULIB_UNISTD_H_SIGPIPE=0;
9611 HAVE_GETDTABLESIZE=1;
9616 HAVE_GROUP_MEMBER=1;
9633 HAVE_DECL_ENVIRON=1;
9635 HAVE_DECL_FDATASYNC=1;
9636 HAVE_DECL_GETDOMAINNAME=1;
9637 HAVE_DECL_GETLOGIN=1;
9638 HAVE_DECL_GETLOGIN_R=1;
9639 HAVE_DECL_GETPAGESIZE=1;
9640 HAVE_DECL_GETUSERSHELL=1;
9641 HAVE_DECL_SETHOSTNAME=1;
9642 HAVE_DECL_TTYNAME_R=1;
9649 REPLACE_FACCESSAT=0;
9651 REPLACE_FTRUNCATE=0;
9653 REPLACE_GETDOMAINNAME=0;
9654 REPLACE_GETDTABLESIZE=0;
9655 REPLACE_GETLOGIN_R=0;
9656 REPLACE_GETGROUPS=0;
9657 REPLACE_GETPAGESIZE=0;
9667 REPLACE_READLINKAT=0;
9671 REPLACE_SYMLINKAT=0;
9673 REPLACE_TTYNAME_R=0;
9678 UNISTD_H_HAVE_WINSOCK2_H=0;
9679 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9685 for ac_func in $ac_func_list
9687 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9688 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9689 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9690 cat >>confdefs.h <<_ACEOF
9691 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9701 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9702 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9704 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9707 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9716 $as_echo_n "checking whether // is distinct from /... " >&6; }
9717 if ${gl_cv_double_slash_root+:} false; then :
9718 $as_echo_n "(cached) " >&6
9720 if test x"$cross_compiling" = xyes ; then
9721 # When cross-compiling, there is no way to tell whether // is special
9722 # short of a list of hosts. However, the only known hosts to date
9723 # that have a distinct // are Apollo DomainOS (too old to port to),
9724 # Cygwin, and z/OS. If anyone knows of another system for which // has
9725 # special semantics and is distinct from /, please report it to
9726 # <bug-gnulib@gnu.org>.
9728 *-cygwin | i370-ibm-openedition)
9729 gl_cv_double_slash_root=yes ;;
9731 # Be optimistic and assume that / and // are the same when we
9733 gl_cv_double_slash_root='unknown, assuming no' ;;
9736 set x `ls -di / // 2>/dev/null`
9737 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9738 gl_cv_double_slash_root=no
9740 gl_cv_double_slash_root=yes
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9745 $as_echo "$gl_cv_double_slash_root" >&6; }
9746 if test "$gl_cv_double_slash_root" = yes; then
9748 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9766 $as_echo_n "checking if environ is properly declared... " >&6; }
9767 if ${gt_cv_var_environ_declaration+:} false; then :
9768 $as_echo_n "(cached) " >&6
9771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9772 /* end confdefs.h. */
9776 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
9779 extern struct { int foo; } environ;
9788 if ac_fn_c_try_compile "$LINENO"; then :
9789 gt_cv_var_environ_declaration=no
9791 gt_cv_var_environ_declaration=yes
9793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9797 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9798 if test $gt_cv_var_environ_declaration = yes; then
9800 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9805 if test $gt_cv_var_environ_declaration != yes; then
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9812 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9813 if ${gl_cv_have_include_next+:} false; then :
9814 $as_echo_n "(cached) " >&6
9816 rm -rf conftestd1a conftestd1b conftestd2
9817 mkdir conftestd1a conftestd1b conftestd2
9818 cat <<EOF > conftestd1a/conftest.h
9819 #define DEFINED_IN_CONFTESTD1
9820 #include_next <conftest.h>
9821 #ifdef DEFINED_IN_CONFTESTD2
9824 #error "include_next doesn't work"
9827 cat <<EOF > conftestd1b/conftest.h
9828 #define DEFINED_IN_CONFTESTD1
9830 #include_next <conftest.h>
9831 #ifdef DEFINED_IN_CONFTESTD2
9834 #error "include_next doesn't work"
9837 cat <<EOF > conftestd2/conftest.h
9838 #ifndef DEFINED_IN_CONFTESTD1
9839 #error "include_next test doesn't work"
9841 #define DEFINED_IN_CONFTESTD2
9843 gl_save_CPPFLAGS="$CPPFLAGS"
9844 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9846 /* end confdefs.h. */
9847 #include <conftest.h>
9849 if ac_fn_c_try_compile "$LINENO"; then :
9850 gl_cv_have_include_next=yes
9852 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9854 /* end confdefs.h. */
9855 #include <conftest.h>
9857 if ac_fn_c_try_compile "$LINENO"; then :
9858 gl_cv_have_include_next=buggy
9860 gl_cv_have_include_next=no
9862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9866 CPPFLAGS="$gl_save_CPPFLAGS"
9867 rm -rf conftestd1a conftestd1b conftestd2
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9871 $as_echo "$gl_cv_have_include_next" >&6; }
9872 PRAGMA_SYSTEM_HEADER=
9873 if test $gl_cv_have_include_next = yes; then
9874 INCLUDE_NEXT=include_next
9875 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9876 if test -n "$GCC"; then
9877 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9880 if test $gl_cv_have_include_next = buggy; then
9881 INCLUDE_NEXT=include
9882 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9884 INCLUDE_NEXT=include
9885 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9892 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9893 if ${gl_cv_pragma_columns+:} false; then :
9894 $as_echo_n "(cached) " >&6
9896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897 /* end confdefs.h. */
9904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9905 $EGREP "choke me" >/dev/null 2>&1; then :
9906 gl_cv_pragma_columns=yes
9908 gl_cv_pragma_columns=no
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9915 $as_echo "$gl_cv_pragma_columns" >&6; }
9916 if test $gl_cv_pragma_columns = yes; then
9917 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9926 $as_echo_n "checking for complete errno.h... " >&6; }
9927 if ${gl_cv_header_errno_h_complete+:} false; then :
9928 $as_echo_n "(cached) " >&6
9931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9932 /* end confdefs.h. */
9935 #if !defined ETXTBSY
9944 #if !defined ENOLINK
9950 #if !defined EMULTIHOP
9953 #if !defined EBADMSG
9956 #if !defined EOVERFLOW
9959 #if !defined ENOTSUP
9962 #if !defined ENETRESET
9965 #if !defined ECONNABORTED
9974 #if !defined ECANCELED
9977 #if !defined EOWNERDEAD
9980 #if !defined ENOTRECOVERABLE
9988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9989 $EGREP "booboo" >/dev/null 2>&1; then :
9990 gl_cv_header_errno_h_complete=no
9992 gl_cv_header_errno_h_complete=yes
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9999 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
10000 if test $gl_cv_header_errno_h_complete = yes; then
10011 if test $gl_cv_have_include_next = yes; then
10012 gl_cv_next_errno_h='<'errno.h'>'
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10015 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
10016 if ${gl_cv_next_errno_h+:} false; then :
10017 $as_echo_n "(cached) " >&6
10022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10023 /* end confdefs.h. */
10027 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10028 *) gl_absname_cpp="$ac_cpp" ;;
10033 gl_dirsep_regex='[/\\]'
10036 gl_dirsep_regex='\/'
10039 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10040 gl_header_literal_regex=`echo 'errno.h' \
10041 | sed -e "$gl_make_literal_regex_sed"`
10042 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10043 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10049 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10050 sed -n "$gl_absolute_header_sed"`
10052 gl_header=$gl_cv_absolute_errno_h
10053 gl_cv_next_errno_h='"'$gl_header'"'
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10058 $as_echo "$gl_cv_next_errno_h" >&6; }
10060 NEXT_ERRNO_H=$gl_cv_next_errno_h
10062 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10063 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10064 gl_next_as_first_directive='<'errno.h'>'
10066 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10067 gl_next_as_first_directive=$gl_cv_next_errno_h
10069 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10077 if test -n "$ERRNO_H"; then
10078 GL_GENERATE_ERRNO_H_TRUE=
10079 GL_GENERATE_ERRNO_H_FALSE='#'
10081 GL_GENERATE_ERRNO_H_TRUE='#'
10082 GL_GENERATE_ERRNO_H_FALSE=
10086 if test -n "$ERRNO_H"; then
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10088 $as_echo_n "checking for EMULTIHOP value... " >&6; }
10089 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10090 $as_echo_n "(cached) " >&6
10093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10094 /* end confdefs.h. */
10102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10103 $EGREP "yes" >/dev/null 2>&1; then :
10104 gl_cv_header_errno_h_EMULTIHOP=yes
10106 gl_cv_header_errno_h_EMULTIHOP=no
10110 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10112 /* end confdefs.h. */
10114 #define _XOPEN_SOURCE_EXTENDED 1
10121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10122 $EGREP "yes" >/dev/null 2>&1; then :
10123 gl_cv_header_errno_h_EMULTIHOP=hidden
10127 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10128 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
10129 #define _XOPEN_SOURCE_EXTENDED 1
10131 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10133 #include <stdlib.h>
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10143 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10144 case $gl_cv_header_errno_h_EMULTIHOP in
10146 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10149 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10157 if test -n "$ERRNO_H"; then
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10159 $as_echo_n "checking for ENOLINK value... " >&6; }
10160 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10161 $as_echo_n "(cached) " >&6
10164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10165 /* end confdefs.h. */
10173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10174 $EGREP "yes" >/dev/null 2>&1; then :
10175 gl_cv_header_errno_h_ENOLINK=yes
10177 gl_cv_header_errno_h_ENOLINK=no
10181 if test $gl_cv_header_errno_h_ENOLINK = no; then
10182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10183 /* end confdefs.h. */
10185 #define _XOPEN_SOURCE_EXTENDED 1
10192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10193 $EGREP "yes" >/dev/null 2>&1; then :
10194 gl_cv_header_errno_h_ENOLINK=hidden
10198 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10199 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
10200 #define _XOPEN_SOURCE_EXTENDED 1
10202 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10204 #include <stdlib.h>
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10214 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10215 case $gl_cv_header_errno_h_ENOLINK in
10217 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10220 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10228 if test -n "$ERRNO_H"; then
10229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10230 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10231 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10232 $as_echo_n "(cached) " >&6
10235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10236 /* end confdefs.h. */
10244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10245 $EGREP "yes" >/dev/null 2>&1; then :
10246 gl_cv_header_errno_h_EOVERFLOW=yes
10248 gl_cv_header_errno_h_EOVERFLOW=no
10252 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10254 /* end confdefs.h. */
10256 #define _XOPEN_SOURCE_EXTENDED 1
10263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10264 $EGREP "yes" >/dev/null 2>&1; then :
10265 gl_cv_header_errno_h_EOVERFLOW=hidden
10269 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10270 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
10271 #define _XOPEN_SOURCE_EXTENDED 1
10273 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10275 #include <stdlib.h>
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10285 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10286 case $gl_cv_header_errno_h_EOVERFLOW in
10288 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10291 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10299 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10300 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10306 cat >>confdefs.h <<_ACEOF
10307 #define HAVE_DECL_STRERROR_R $ac_have_decl
10310 for ac_func in strerror_r
10312 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10313 if test "x$ac_cv_func_strerror_r" = xyes; then :
10314 cat >>confdefs.h <<_ACEOF
10315 #define HAVE_STRERROR_R 1
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10322 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10323 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10324 $as_echo_n "(cached) " >&6
10327 ac_cv_func_strerror_r_char_p=no
10328 if test $ac_cv_have_decl_strerror_r = yes; then
10329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h. */
10331 $ac_includes_default
10337 char x = *strerror_r (0, buf, sizeof buf);
10338 char *p = strerror_r (0, buf, sizeof buf);
10345 if ac_fn_c_try_compile "$LINENO"; then :
10346 ac_cv_func_strerror_r_char_p=yes
10348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10350 # strerror_r is not declared. Choose between
10351 # systems that have relatively inaccessible declarations for the
10352 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
10353 # former has a strerror_r that returns char*, while the latter
10354 # has a strerror_r that returns `int'.
10355 # This test should segfault on the DEC system.
10356 if test "$cross_compiling" = yes; then :
10359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10360 /* end confdefs.h. */
10361 $ac_includes_default
10362 extern char *strerror_r ();
10367 char x = *strerror_r (0, buf, sizeof buf);
10368 return ! isalpha (x);
10373 if ac_fn_c_try_run "$LINENO"; then :
10374 ac_cv_func_strerror_r_char_p=yes
10376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10377 conftest.$ac_objext conftest.beam conftest.$ac_ext
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10384 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10385 if test $ac_cv_func_strerror_r_char_p = yes; then
10387 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10392 XGETTEXT_EXTRA_OPTIONS=
10398 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
10400 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
10402 cat >>confdefs.h <<_ACEOF
10403 #define HAVE_SIG_ATOMIC_T 1
10409 $as_echo "#define sig_atomic_t int" >>confdefs.h
10416 GNULIB_NONBLOCKING=0;
10434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10435 $as_echo_n "checking for working fcntl.h... " >&6; }
10436 if ${gl_cv_header_working_fcntl_h+:} false; then :
10437 $as_echo_n "(cached) " >&6
10439 if test "$cross_compiling" = yes; then :
10441 # Guess 'no' on native Windows.
10442 mingw*) gl_cv_header_working_fcntl_h='no' ;;
10443 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
10447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10448 /* end confdefs.h. */
10449 #include <sys/types.h>
10450 #include <sys/stat.h>
10452 # include <unistd.h>
10453 #else /* on Windows with MSVC */
10455 # include <stdlib.h>
10456 # defined sleep(n) _sleep ((n) * 1000)
10460 #define O_NOATIME 0
10463 #define O_NOFOLLOW 0
10465 static int const constants[] =
10467 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10468 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10475 int result = !constants;
10478 static char const sym[] = "conftest.sym";
10479 if (symlink ("/dev/null", sym) != 0)
10483 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10490 if (unlink (sym) != 0 || symlink (".", sym) != 0)
10494 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10505 static char const file[] = "confdefs.h";
10506 int fd = open (file, O_RDONLY | O_NOATIME);
10512 if (fstat (fd, &st0) != 0)
10518 if (read (fd, &c, 1) != 1)
10522 if (close (fd) != 0)
10527 if (stat (file, &st1) != 0)
10530 if (st0.st_atime != st1.st_atime)
10542 if ac_fn_c_try_run "$LINENO"; then :
10543 gl_cv_header_working_fcntl_h=yes
10546 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10547 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10548 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10549 *) gl_cv_header_working_fcntl_h='no';;
10552 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10553 conftest.$ac_objext conftest.beam conftest.$ac_ext
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10559 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10561 case $gl_cv_header_working_fcntl_h in #(
10562 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10566 cat >>confdefs.h <<_ACEOF
10567 #define HAVE_WORKING_O_NOATIME $ac_val
10571 case $gl_cv_header_working_fcntl_h in #(
10572 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10576 cat >>confdefs.h <<_ACEOF
10577 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10581 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10582 if test "x$ac_cv_type_pid_t" = xyes; then :
10586 cat >>confdefs.h <<_ACEOF
10592 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10593 if test "x$ac_cv_type_mode_t" = xyes; then :
10597 cat >>confdefs.h <<_ACEOF
10612 GNULIB_FPRINTF_POSIX=0;
10628 GNULIB_OBSTACK_PRINTF=0;
10629 GNULIB_OBSTACK_PRINTF_POSIX=0;
10634 GNULIB_PRINTF_POSIX=0;
10643 GNULIB_SPRINTF_POSIX=0;
10644 GNULIB_STDIO_H_NONBLOCKING=0;
10645 GNULIB_STDIO_H_SIGPIPE=0;
10647 GNULIB_VASPRINTF=0;
10652 GNULIB_VFPRINTF_POSIX=0;
10654 GNULIB_VPRINTF_POSIX=0;
10655 GNULIB_VSNPRINTF=0;
10656 GNULIB_VSPRINTF_POSIX=0;
10657 HAVE_DECL_FPURGE=1;
10658 HAVE_DECL_FSEEKO=1;
10659 HAVE_DECL_FTELLO=1;
10660 HAVE_DECL_GETDELIM=1;
10661 HAVE_DECL_GETLINE=1;
10662 HAVE_DECL_OBSTACK_PRINTF=1;
10663 HAVE_DECL_SNPRINTF=1;
10664 HAVE_DECL_VSNPRINTF=1;
10685 REPLACE_GETDELIM=0;
10687 REPLACE_OBSTACK_PRINTF=0;
10693 REPLACE_RENAMEAT=0;
10694 REPLACE_SNPRINTF=0;
10696 REPLACE_STDIO_READ_FUNCS=0;
10697 REPLACE_STDIO_WRITE_FUNCS=0;
10699 REPLACE_VASPRINTF=0;
10700 REPLACE_VDPRINTF=0;
10701 REPLACE_VFPRINTF=0;
10703 REPLACE_VSNPRINTF=0;
10704 REPLACE_VSPRINTF=0;
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
10710 $as_echo_n "checking for stdint.h... " >&6; }
10711 if ${gl_cv_header_stdint_h+:} false; then :
10712 $as_echo_n "(cached) " >&6
10714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10715 /* end confdefs.h. */
10716 #include <sys/types.h>
10717 #include <stdint.h>
10721 uintmax_t i = (uintmax_t) -1; return !i;
10726 if ac_fn_c_try_compile "$LINENO"; then :
10727 gl_cv_header_stdint_h=yes
10729 gl_cv_header_stdint_h=no
10731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
10734 $as_echo "$gl_cv_header_stdint_h" >&6; }
10735 if test $gl_cv_header_stdint_h = yes; then
10737 cat >>confdefs.h <<_ACEOF
10738 #define HAVE_STDINT_H_WITH_UINTMAX 1
10744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
10745 $as_echo_n "checking for inttypes.h... " >&6; }
10746 if ${gl_cv_header_inttypes_h+:} false; then :
10747 $as_echo_n "(cached) " >&6
10749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10750 /* end confdefs.h. */
10752 #include <sys/types.h>
10753 #include <inttypes.h>
10758 uintmax_t i = (uintmax_t) -1; return !i;
10763 if ac_fn_c_try_compile "$LINENO"; then :
10764 gl_cv_header_inttypes_h=yes
10766 gl_cv_header_inttypes_h=no
10768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
10771 $as_echo "$gl_cv_header_inttypes_h" >&6; }
10772 if test $gl_cv_header_inttypes_h = yes; then
10774 cat >>confdefs.h <<_ACEOF
10775 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
10785 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
10786 if ${gl_cv_func_printf_sizes_c99+:} false; then :
10787 $as_echo_n "(cached) " >&6
10790 if test "$cross_compiling" = yes; then :
10793 # Guess yes on glibc systems.
10794 *-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
10795 # Guess yes on FreeBSD >= 5.
10796 freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
10797 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
10798 # Guess yes on Mac OS X >= 10.3.
10799 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
10800 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
10801 # Guess yes on OpenBSD >= 3.9.
10802 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
10803 gl_cv_func_printf_sizes_c99="guessing no";;
10804 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
10805 # Guess yes on Solaris >= 2.10.
10806 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
10807 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
10808 # Guess yes on NetBSD >= 3.
10809 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
10810 gl_cv_func_printf_sizes_c99="guessing no";;
10811 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
10812 # Guess yes on MSVC, no on mingw.
10813 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10814 /* end confdefs.h. */
10821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10822 $EGREP "Known" >/dev/null 2>&1; then :
10823 gl_cv_func_printf_sizes_c99="guessing yes"
10825 gl_cv_func_printf_sizes_c99="guessing no"
10830 # If we don't know, assume the worst.
10831 *) gl_cv_func_printf_sizes_c99="guessing no";;
10835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10836 /* end confdefs.h. */
10838 #include <stddef.h>
10840 #include <string.h>
10841 #include <sys/types.h>
10842 #if HAVE_STDINT_H_WITH_UINTMAX
10843 # include <stdint.h>
10845 #if HAVE_INTTYPES_H_WITH_UINTMAX
10846 # include <inttypes.h>
10848 static char buf[100];
10852 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
10854 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
10855 || strcmp (buf, "12345671 33") != 0)
10861 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
10862 || strcmp (buf, "12345672 33") != 0)
10865 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
10866 || strcmp (buf, "12345673 33") != 0)
10869 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
10870 || strcmp (buf, "1.5 33") != 0)
10875 if ac_fn_c_try_run "$LINENO"; then :
10876 gl_cv_func_printf_sizes_c99=yes
10878 gl_cv_func_printf_sizes_c99=no
10880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10881 conftest.$ac_objext conftest.beam conftest.$ac_ext
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
10887 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
10892 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
10893 if ${gl_cv_func_printf_long_double+:} false; then :
10894 $as_echo_n "(cached) " >&6
10897 if test "$cross_compiling" = yes; then :
10899 beos*) gl_cv_func_printf_long_double="guessing no";;
10900 # Guess yes on MSVC, no on mingw.
10901 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10902 /* end confdefs.h. */
10909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10910 $EGREP "Known" >/dev/null 2>&1; then :
10911 gl_cv_func_printf_long_double="guessing yes"
10913 gl_cv_func_printf_long_double="guessing no"
10918 *) gl_cv_func_printf_long_double="guessing yes";;
10922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10923 /* end confdefs.h. */
10926 #include <string.h>
10927 static char buf[10000];
10932 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
10933 || strcmp (buf, "1.750000 33") != 0)
10936 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
10937 || strcmp (buf, "1.750000e+00 33") != 0)
10940 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
10941 || strcmp (buf, "1.75 33") != 0)
10946 if ac_fn_c_try_run "$LINENO"; then :
10947 gl_cv_func_printf_long_double=yes
10949 gl_cv_func_printf_long_double=no
10951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10952 conftest.$ac_objext conftest.beam conftest.$ac_ext
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
10958 $as_echo "$gl_cv_func_printf_long_double" >&6; }
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
10963 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
10964 if ${gl_cv_func_printf_infinite+:} false; then :
10965 $as_echo_n "(cached) " >&6
10968 if test "$cross_compiling" = yes; then :
10971 # Guess yes on glibc systems.
10972 *-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";;
10973 # Guess yes on FreeBSD >= 6.
10974 freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
10975 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
10976 # Guess yes on Mac OS X >= 10.3.
10977 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
10978 darwin*) gl_cv_func_printf_infinite="guessing yes";;
10979 # Guess yes on HP-UX >= 11.
10980 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
10981 hpux*) gl_cv_func_printf_infinite="guessing yes";;
10982 # Guess yes on NetBSD >= 3.
10983 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
10984 gl_cv_func_printf_infinite="guessing no";;
10985 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
10986 # Guess yes on BeOS.
10987 beos*) gl_cv_func_printf_infinite="guessing yes";;
10988 # Guess yes on MSVC, no on mingw.
10989 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10990 /* end confdefs.h. */
10997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10998 $EGREP "Known" >/dev/null 2>&1; then :
10999 gl_cv_func_printf_infinite="guessing yes"
11001 gl_cv_func_printf_infinite="guessing no"
11006 # If we don't know, assume the worst.
11007 *) gl_cv_func_printf_infinite="guessing no";;
11011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11012 /* end confdefs.h. */
11015 #include <string.h>
11017 strisnan (const char *string, size_t start_index, size_t end_index)
11019 if (start_index < end_index)
11021 if (string[start_index] == '-')
11023 if (start_index + 3 <= end_index
11024 && memcmp (string + start_index, "nan", 3) == 0)
11027 if (start_index == end_index
11028 || (string[start_index] == '(' && string[end_index - 1] == ')'))
11037 static double plus_zero = 0.0;
11038 double minus_zero = - plus_zero;
11039 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
11041 static char buf[10000];
11042 static double zero = 0.0;
11046 if (sprintf (buf, "%f", 1.0 / zero) < 0
11047 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11049 if (sprintf (buf, "%f", -1.0 / zero) < 0
11050 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11052 if (sprintf (buf, "%f", zero / zero) < 0
11053 || !strisnan (buf, 0, strlen (buf)))
11055 if (sprintf (buf, "%e", 1.0 / zero) < 0
11056 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11058 if (sprintf (buf, "%e", -1.0 / zero) < 0
11059 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11061 if (sprintf (buf, "%e", zero / zero) < 0
11062 || !strisnan (buf, 0, strlen (buf)))
11064 if (sprintf (buf, "%g", 1.0 / zero) < 0
11065 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11067 if (sprintf (buf, "%g", -1.0 / zero) < 0
11068 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11070 if (sprintf (buf, "%g", zero / zero) < 0
11071 || !strisnan (buf, 0, strlen (buf)))
11073 /* This test fails on HP-UX 10.20. */
11074 if (have_minus_zero ())
11075 if (sprintf (buf, "%g", - zero) < 0
11076 || strcmp (buf, "-0") != 0)
11081 if ac_fn_c_try_run "$LINENO"; then :
11082 gl_cv_func_printf_infinite=yes
11084 gl_cv_func_printf_infinite=no
11086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11087 conftest.$ac_objext conftest.beam conftest.$ac_ext
11092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
11093 $as_echo "$gl_cv_func_printf_infinite" >&6; }
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11097 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11098 if ${ac_cv_c_bigendian+:} false; then :
11099 $as_echo_n "(cached) " >&6
11101 ac_cv_c_bigendian=unknown
11102 # See if we're dealing with a universal compiler.
11103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11104 /* end confdefs.h. */
11105 #ifndef __APPLE_CC__
11106 not a universal capable compiler
11111 if ac_fn_c_try_compile "$LINENO"; then :
11113 # Check for potential -arch flags. It is not universal unless
11114 # there are at least two -arch flags with different values.
11117 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11118 if test -n "$ac_prev"; then
11120 i?86 | x86_64 | ppc | ppc64)
11121 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11124 ac_cv_c_bigendian=universal
11130 elif test "x$ac_word" = "x-arch"; then
11135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11136 if test $ac_cv_c_bigendian = unknown; then
11137 # See if sys/param.h defines the BYTE_ORDER macro.
11138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11139 /* end confdefs.h. */
11140 #include <sys/types.h>
11141 #include <sys/param.h>
11146 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11147 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11149 bogus endian macros
11156 if ac_fn_c_try_compile "$LINENO"; then :
11157 # It does; now see whether it defined to BIG_ENDIAN or not.
11158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11159 /* end confdefs.h. */
11160 #include <sys/types.h>
11161 #include <sys/param.h>
11166 #if BYTE_ORDER != BIG_ENDIAN
11174 if ac_fn_c_try_compile "$LINENO"; then :
11175 ac_cv_c_bigendian=yes
11177 ac_cv_c_bigendian=no
11179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11183 if test $ac_cv_c_bigendian = unknown; then
11184 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11186 /* end confdefs.h. */
11187 #include <limits.h>
11192 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11193 bogus endian macros
11200 if ac_fn_c_try_compile "$LINENO"; then :
11201 # It does; now see whether it defined to _BIG_ENDIAN or not.
11202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11203 /* end confdefs.h. */
11204 #include <limits.h>
11209 #ifndef _BIG_ENDIAN
11217 if ac_fn_c_try_compile "$LINENO"; then :
11218 ac_cv_c_bigendian=yes
11220 ac_cv_c_bigendian=no
11222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11226 if test $ac_cv_c_bigendian = unknown; then
11227 # Compile a test program.
11228 if test "$cross_compiling" = yes; then :
11229 # Try to guess by grepping values from an object file.
11230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11231 /* end confdefs.h. */
11232 short int ascii_mm[] =
11233 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11234 short int ascii_ii[] =
11235 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11236 int use_ascii (int i) {
11237 return ascii_mm[i] + ascii_ii[i];
11239 short int ebcdic_ii[] =
11240 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11241 short int ebcdic_mm[] =
11242 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11243 int use_ebcdic (int i) {
11244 return ebcdic_mm[i] + ebcdic_ii[i];
11251 return use_ascii (foo) == use_ebcdic (foo);
11256 if ac_fn_c_try_compile "$LINENO"; then :
11257 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11258 ac_cv_c_bigendian=yes
11260 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11261 if test "$ac_cv_c_bigendian" = unknown; then
11262 ac_cv_c_bigendian=no
11264 # finding both strings is unlikely to happen, but who knows?
11265 ac_cv_c_bigendian=unknown
11269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11272 /* end confdefs.h. */
11273 $ac_includes_default
11278 /* Are we little or big endian? From Harbison&Steele. */
11282 char c[sizeof (long int)];
11285 return u.c[sizeof (long int) - 1] == 1;
11291 if ac_fn_c_try_run "$LINENO"; then :
11292 ac_cv_c_bigendian=no
11294 ac_cv_c_bigendian=yes
11296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11297 conftest.$ac_objext conftest.beam conftest.$ac_ext
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11303 $as_echo "$ac_cv_c_bigendian" >&6; }
11304 case $ac_cv_c_bigendian in #(
11306 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11312 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11316 as_fn_error $? "unknown endianness
11317 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
11323 $as_echo_n "checking whether long double and double are the same... " >&6; }
11324 if ${gl_cv_long_double_equals_double+:} false; then :
11325 $as_echo_n "(cached) " >&6
11327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328 /* end confdefs.h. */
11333 typedef int check[sizeof (long double) == sizeof (double)
11334 && LDBL_MANT_DIG == DBL_MANT_DIG
11335 && LDBL_MAX_EXP == DBL_MAX_EXP
11336 && LDBL_MIN_EXP == DBL_MIN_EXP
11343 if ac_fn_c_try_compile "$LINENO"; then :
11344 gl_cv_long_double_equals_double=yes
11346 gl_cv_long_double_equals_double=no
11348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
11352 $as_echo "$gl_cv_long_double_equals_double" >&6; }
11353 if test $gl_cv_long_double_equals_double = yes; then
11355 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
11357 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
11359 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
11368 if test -n "$gl_printf_safe"; then
11370 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
11373 case "$gl_cv_func_printf_long_double" in
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
11376 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
11377 if ${gl_cv_func_printf_infinite_long_double+:} false; then :
11378 $as_echo_n "(cached) " >&6
11381 if test "$cross_compiling" = yes; then :
11382 case "$host_cpu" in
11383 # Guess no on ia64, x86_64, i386.
11384 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
11387 # Guess yes on glibc systems.
11388 *-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
11389 # Guess yes on FreeBSD >= 6.
11390 freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
11391 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
11392 # Guess yes on HP-UX >= 11.
11393 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
11394 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
11395 # Guess yes on MSVC, no on mingw.
11396 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11397 /* end confdefs.h. */
11404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11405 $EGREP "Known" >/dev/null 2>&1; then :
11406 gl_cv_func_printf_infinite_long_double="guessing yes"
11408 gl_cv_func_printf_infinite_long_double="guessing no"
11413 # If we don't know, assume the worst.
11414 *) gl_cv_func_printf_infinite_long_double="guessing no";;
11420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11421 /* end confdefs.h. */
11424 #include <stdlib.h>
11425 #if defined __MACH__ && defined __APPLE__
11426 /* Avoid a crash on Mac OS X. */
11427 #include <mach/mach.h>
11428 #include <mach/mach_error.h>
11429 #include <mach/thread_status.h>
11430 #include <mach/exception.h>
11431 #include <mach/task.h>
11432 #include <pthread.h>
11433 /* The exception port on which our thread listens. */
11434 static mach_port_t our_exception_port;
11435 /* The main function of the thread listening for exceptions of type
11438 mach_exception_thread (void *arg)
11440 /* Buffer for a message to be received. */
11442 mach_msg_header_t head;
11443 mach_msg_body_t msgh_body;
11446 mach_msg_return_t retval;
11447 /* Wait for a message on the exception port. */
11448 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11449 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11450 if (retval != MACH_MSG_SUCCESS)
11455 nocrash_init (void)
11457 mach_port_t self = mach_task_self ();
11458 /* Allocate a port on which the thread shall listen for exceptions. */
11459 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11461 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
11462 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11463 MACH_MSG_TYPE_MAKE_SEND)
11465 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
11467 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11468 /* Create the thread listening on the exception port. */
11469 pthread_attr_t attr;
11471 if (pthread_attr_init (&attr) == 0
11472 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11473 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11474 pthread_attr_destroy (&attr);
11475 /* Replace the exception port info for these exceptions with our own.
11476 Note that we replace the exception port for the entire task, not only
11477 for a particular thread. This has the effect that when our exception
11478 port gets the message, the thread specific exception port has already
11479 been asked, and we don't need to bother about it.
11480 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
11481 task_set_exception_ports (self, mask, our_exception_port,
11482 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11487 #elif defined _WIN32 && ! defined __CYGWIN__
11488 /* Avoid a crash on native Windows. */
11489 #define WIN32_LEAN_AND_MEAN
11490 #include <windows.h>
11491 #include <winerror.h>
11493 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11495 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11497 case EXCEPTION_ACCESS_VIOLATION:
11498 case EXCEPTION_IN_PAGE_ERROR:
11499 case EXCEPTION_STACK_OVERFLOW:
11500 case EXCEPTION_GUARD_PAGE:
11501 case EXCEPTION_PRIV_INSTRUCTION:
11502 case EXCEPTION_ILLEGAL_INSTRUCTION:
11503 case EXCEPTION_DATATYPE_MISALIGNMENT:
11504 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11505 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11508 return EXCEPTION_CONTINUE_SEARCH;
11511 nocrash_init (void)
11513 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11516 /* Avoid a crash on POSIX systems. */
11517 #include <signal.h>
11518 #include <unistd.h>
11519 /* A POSIX signal handler. */
11521 exception_handler (int sig)
11526 nocrash_init (void)
11529 signal (SIGSEGV, exception_handler);
11532 signal (SIGBUS, exception_handler);
11539 #include <string.h>
11541 strisnan (const char *string, size_t start_index, size_t end_index)
11543 if (start_index < end_index)
11545 if (string[start_index] == '-')
11547 if (start_index + 3 <= end_index
11548 && memcmp (string + start_index, "nan", 3) == 0)
11551 if (start_index == end_index
11552 || (string[start_index] == '(' && string[end_index - 1] == ')'))
11558 static char buf[10000];
11559 static long double zeroL = 0.0L;
11564 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
11565 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11567 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
11568 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11570 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
11571 || !strisnan (buf, 0, strlen (buf)))
11573 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
11574 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11576 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
11577 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11579 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
11580 || !strisnan (buf, 0, strlen (buf)))
11582 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
11583 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11585 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
11586 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11588 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
11589 || !strisnan (buf, 0, strlen (buf)))
11591 #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
11592 /* Representation of an 80-bit 'long double' as an initializer for a sequence
11593 of 'unsigned int' words. */
11594 # ifdef WORDS_BIGENDIAN
11595 # define LDBL80_WORDS(exponent,manthi,mantlo) \
11596 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
11597 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
11598 (unsigned int) (mantlo) << 16 \
11601 # define LDBL80_WORDS(exponent,manthi,mantlo) \
11602 { mantlo, manthi, exponent }
11605 static union { unsigned int word[4]; long double value; } x =
11606 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
11607 if (sprintf (buf, "%Lf", x.value) < 0
11608 || !strisnan (buf, 0, strlen (buf)))
11610 if (sprintf (buf, "%Le", x.value) < 0
11611 || !strisnan (buf, 0, strlen (buf)))
11613 if (sprintf (buf, "%Lg", x.value) < 0
11614 || !strisnan (buf, 0, strlen (buf)))
11618 /* Signalling NaN. */
11619 static union { unsigned int word[4]; long double value; } x =
11620 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
11621 if (sprintf (buf, "%Lf", x.value) < 0
11622 || !strisnan (buf, 0, strlen (buf)))
11624 if (sprintf (buf, "%Le", x.value) < 0
11625 || !strisnan (buf, 0, strlen (buf)))
11627 if (sprintf (buf, "%Lg", x.value) < 0
11628 || !strisnan (buf, 0, strlen (buf)))
11631 { /* Pseudo-NaN. */
11632 static union { unsigned int word[4]; long double value; } x =
11633 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
11634 if (sprintf (buf, "%Lf", x.value) <= 0)
11636 if (sprintf (buf, "%Le", x.value) <= 0)
11638 if (sprintf (buf, "%Lg", x.value) <= 0)
11641 { /* Pseudo-Infinity. */
11642 static union { unsigned int word[4]; long double value; } x =
11643 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
11644 if (sprintf (buf, "%Lf", x.value) <= 0)
11646 if (sprintf (buf, "%Le", x.value) <= 0)
11648 if (sprintf (buf, "%Lg", x.value) <= 0)
11651 { /* Pseudo-Zero. */
11652 static union { unsigned int word[4]; long double value; } x =
11653 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
11654 if (sprintf (buf, "%Lf", x.value) <= 0)
11656 if (sprintf (buf, "%Le", x.value) <= 0)
11658 if (sprintf (buf, "%Lg", x.value) <= 0)
11661 { /* Unnormalized number. */
11662 static union { unsigned int word[4]; long double value; } x =
11663 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
11664 if (sprintf (buf, "%Lf", x.value) <= 0)
11666 if (sprintf (buf, "%Le", x.value) <= 0)
11668 if (sprintf (buf, "%Lg", x.value) <= 0)
11671 { /* Pseudo-Denormal. */
11672 static union { unsigned int word[4]; long double value; } x =
11673 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
11674 if (sprintf (buf, "%Lf", x.value) <= 0)
11676 if (sprintf (buf, "%Le", x.value) <= 0)
11678 if (sprintf (buf, "%Lg", x.value) <= 0)
11685 if ac_fn_c_try_run "$LINENO"; then :
11686 gl_cv_func_printf_infinite_long_double=yes
11688 gl_cv_func_printf_infinite_long_double=no
11690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11691 conftest.$ac_objext conftest.beam conftest.$ac_ext
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
11697 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
11700 gl_cv_func_printf_infinite_long_double="irrelevant"
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
11707 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
11708 if ${gl_cv_func_printf_directive_a+:} false; then :
11709 $as_echo_n "(cached) " >&6
11712 if test "$cross_compiling" = yes; then :
11715 # Guess yes on glibc >= 2.5 systems.
11717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11718 /* end confdefs.h. */
11720 #include <features.h>
11721 #ifdef __GNU_LIBRARY__
11722 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
11728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11729 $EGREP "BZ2908" >/dev/null 2>&1; then :
11730 gl_cv_func_printf_directive_a="guessing yes"
11732 gl_cv_func_printf_directive_a="guessing no"
11737 # Guess no on native Windows.
11738 mingw*) gl_cv_func_printf_directive_a="guessing no";;
11739 # If we don't know, assume the worst.
11740 *) gl_cv_func_printf_directive_a="guessing no";;
11744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11745 /* end confdefs.h. */
11748 #include <string.h>
11749 static char buf[100];
11750 static double zero = 0.0;
11754 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
11755 || (strcmp (buf, "0x1.922p+1 33") != 0
11756 && strcmp (buf, "0x3.244p+0 33") != 0
11757 && strcmp (buf, "0x6.488p-1 33") != 0
11758 && strcmp (buf, "0xc.91p-2 33") != 0))
11760 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
11761 || (strcmp (buf, "-0X1.922P+1 33") != 0
11762 && strcmp (buf, "-0X3.244P+0 33") != 0
11763 && strcmp (buf, "-0X6.488P-1 33") != 0
11764 && strcmp (buf, "-0XC.91P-2 33") != 0))
11766 /* This catches a FreeBSD 6.1 bug: it doesn't round. */
11767 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
11768 || (strcmp (buf, "0x1.83p+0 33") != 0
11769 && strcmp (buf, "0x3.05p-1 33") != 0
11770 && strcmp (buf, "0x6.0ap-2 33") != 0
11771 && strcmp (buf, "0xc.14p-3 33") != 0))
11773 /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
11774 if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
11775 || (strcmp (buf, "0x2p+0 33") != 0
11776 && strcmp (buf, "0x3p-1 33") != 0
11777 && strcmp (buf, "0x6p-2 33") != 0
11778 && strcmp (buf, "0xcp-3 33") != 0))
11780 /* This catches a FreeBSD 6.1 bug. See
11781 <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
11782 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
11785 /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
11786 if (sprintf (buf, "%.1a", 1.999) < 0
11787 || (strcmp (buf, "0x1.0p+1") != 0
11788 && strcmp (buf, "0x2.0p+0") != 0
11789 && strcmp (buf, "0x4.0p-1") != 0
11790 && strcmp (buf, "0x8.0p-2") != 0))
11792 /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
11793 glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
11794 if (sprintf (buf, "%.1La", 1.999L) < 0
11795 || (strcmp (buf, "0x1.0p+1") != 0
11796 && strcmp (buf, "0x2.0p+0") != 0
11797 && strcmp (buf, "0x4.0p-1") != 0
11798 && strcmp (buf, "0x8.0p-2") != 0))
11803 if ac_fn_c_try_run "$LINENO"; then :
11804 gl_cv_func_printf_directive_a=yes
11806 gl_cv_func_printf_directive_a=no
11808 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11809 conftest.$ac_objext conftest.beam conftest.$ac_ext
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
11815 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
11820 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
11821 if ${gl_cv_func_printf_directive_f+:} false; then :
11822 $as_echo_n "(cached) " >&6
11825 if test "$cross_compiling" = yes; then :
11828 # Guess yes on glibc systems.
11829 *-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";;
11830 # Guess yes on FreeBSD >= 6.
11831 freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
11832 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
11833 # Guess yes on Mac OS X >= 10.3.
11834 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
11835 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
11836 # Guess yes on Solaris >= 2.10.
11837 solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
11838 solaris*) gl_cv_func_printf_directive_f="guessing no";;
11839 # Guess yes on MSVC, no on mingw.
11840 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11841 /* end confdefs.h. */
11848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11849 $EGREP "Known" >/dev/null 2>&1; then :
11850 gl_cv_func_printf_directive_f="guessing yes"
11852 gl_cv_func_printf_directive_f="guessing no"
11857 # If we don't know, assume the worst.
11858 *) gl_cv_func_printf_directive_f="guessing no";;
11862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11863 /* end confdefs.h. */
11866 #include <string.h>
11867 static char buf[100];
11868 static double zero = 0.0;
11872 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
11873 || strcmp (buf, "1234567.000000 33") != 0)
11875 if (sprintf (buf, "%F", 1.0 / zero) < 0
11876 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
11878 /* This catches a Cygwin 1.5.x bug. */
11879 if (sprintf (buf, "%.F", 1234.0) < 0
11880 || strcmp (buf, "1234") != 0)
11885 if ac_fn_c_try_run "$LINENO"; then :
11886 gl_cv_func_printf_directive_f=yes
11888 gl_cv_func_printf_directive_f=no
11890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11891 conftest.$ac_objext conftest.beam conftest.$ac_ext
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
11897 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
11901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
11902 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
11903 if ${gl_cv_func_printf_directive_n+:} false; then :
11904 $as_echo_n "(cached) " >&6
11907 if test "$cross_compiling" = yes; then :
11909 # Guess no on native Windows.
11910 mingw*) gl_cv_func_printf_directive_n="guessing no";;
11911 *) gl_cv_func_printf_directive_n="guessing yes";;
11915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11916 /* end confdefs.h. */
11919 #include <stdlib.h>
11920 #include <string.h>
11922 /* See page about "Parameter Validation" on msdn.microsoft.com. */
11924 invalid_parameter_handler (const wchar_t *expression,
11925 const wchar_t *function,
11926 const wchar_t *file, unsigned int line,
11932 static char fmtstring[10];
11933 static char buf[100];
11938 _set_invalid_parameter_handler (invalid_parameter_handler);
11940 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
11941 support %n in format strings in read-only memory but not in writable
11943 strcpy (fmtstring, "%d %n");
11944 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
11945 || strcmp (buf, "123 ") != 0
11951 if ac_fn_c_try_run "$LINENO"; then :
11952 gl_cv_func_printf_directive_n=yes
11954 gl_cv_func_printf_directive_n=no
11956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11957 conftest.$ac_objext conftest.beam conftest.$ac_ext
11962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
11963 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
11967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
11968 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
11969 if ${gl_cv_func_printf_directive_ls+:} false; then :
11970 $as_echo_n "(cached) " >&6
11973 if test "$cross_compiling" = yes; then :
11976 openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
11977 irix*) gl_cv_func_printf_directive_ls="guessing no";;
11978 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
11979 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
11980 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
11981 # Guess yes on native Windows.
11982 mingw*) gl_cv_func_printf_directive_ls="guessing yes";;
11983 *) gl_cv_func_printf_directive_ls="guessing yes";;
11987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11988 /* end confdefs.h. */
11990 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11992 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11993 included before <wchar.h>. */
11994 #include <stddef.h>
11998 #include <string.h>
12003 /* Test whether %ls works at all.
12004 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
12007 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
12009 if (sprintf (buf, "%ls", wstring) < 0
12010 || strcmp (buf, "abc") != 0)
12013 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
12014 assertion failure inside libc), but not on OpenBSD 4.0. */
12016 static const wchar_t wstring[] = { 'a', 0 };
12018 if (sprintf (buf, "%ls", wstring) < 0
12019 || strcmp (buf, "a") != 0)
12022 /* Test whether precisions in %ls are supported as specified in ISO C 99
12024 "If a precision is specified, no more than that many bytes are written
12025 (including shift sequences, if any), and the array shall contain a
12026 null wide character if, to equal the multibyte character sequence
12027 length given by the precision, the function would need to access a
12028 wide character one past the end of the array."
12029 This test fails on Solaris 10. */
12031 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
12033 if (sprintf (buf, "%.2ls", wstring) < 0
12034 || strcmp (buf, "ab") != 0)
12040 if ac_fn_c_try_run "$LINENO"; then :
12041 gl_cv_func_printf_directive_ls=yes
12043 gl_cv_func_printf_directive_ls=no
12045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12046 conftest.$ac_objext conftest.beam conftest.$ac_ext
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
12052 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
12056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
12057 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
12058 if ${gl_cv_func_printf_positions+:} false; then :
12059 $as_echo_n "(cached) " >&6
12062 if test "$cross_compiling" = yes; then :
12065 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
12066 gl_cv_func_printf_positions="guessing no";;
12067 beos*) gl_cv_func_printf_positions="guessing no";;
12068 # Guess no on native Windows.
12069 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
12070 *) gl_cv_func_printf_positions="guessing yes";;
12074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12075 /* end confdefs.h. */
12078 #include <string.h>
12079 /* The string "%2$d %1$d", with dollar characters protected from the shell's
12080 dollar expansion (possibly an autoconf bug). */
12081 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
12082 static char buf[100];
12085 sprintf (buf, format, 33, 55);
12086 return (strcmp (buf, "55 33") != 0);
12089 if ac_fn_c_try_run "$LINENO"; then :
12090 gl_cv_func_printf_positions=yes
12092 gl_cv_func_printf_positions=no
12094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12095 conftest.$ac_objext conftest.beam conftest.$ac_ext
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
12101 $as_echo "$gl_cv_func_printf_positions" >&6; }
12105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
12106 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
12107 if ${gl_cv_func_printf_flag_grouping+:} false; then :
12108 $as_echo_n "(cached) " >&6
12111 if test "$cross_compiling" = yes; then :
12114 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
12115 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
12116 # Guess no on native Windows.
12117 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
12118 *) gl_cv_func_printf_flag_grouping="guessing yes";;
12122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12123 /* end confdefs.h. */
12126 #include <string.h>
12127 static char buf[100];
12130 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
12131 || buf[strlen (buf) - 1] != '9')
12136 if ac_fn_c_try_run "$LINENO"; then :
12137 gl_cv_func_printf_flag_grouping=yes
12139 gl_cv_func_printf_flag_grouping=no
12141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12142 conftest.$ac_objext conftest.beam conftest.$ac_ext
12147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
12148 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
12153 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
12154 if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
12155 $as_echo_n "(cached) " >&6
12158 if test "$cross_compiling" = yes; then :
12161 # Guess yes on HP-UX 11.
12162 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
12163 # Guess no on HP-UX 10 and older.
12164 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
12165 # Guess yes on native Windows.
12166 mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
12167 # Guess yes otherwise.
12168 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
12172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173 /* end confdefs.h. */
12176 #include <string.h>
12177 static char buf[100];
12180 /* Check that a '-' flag is not annihilated by a negative width. */
12181 if (sprintf (buf, "a%-*sc", -3, "b") < 0
12182 || strcmp (buf, "ab c") != 0)
12187 if ac_fn_c_try_run "$LINENO"; then :
12188 gl_cv_func_printf_flag_leftadjust=yes
12190 gl_cv_func_printf_flag_leftadjust=no
12192 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12193 conftest.$ac_objext conftest.beam conftest.$ac_ext
12198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
12199 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
12204 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
12205 if ${gl_cv_func_printf_flag_zero+:} false; then :
12206 $as_echo_n "(cached) " >&6
12209 if test "$cross_compiling" = yes; then :
12212 # Guess yes on glibc systems.
12213 *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
12214 # Guess yes on BeOS.
12215 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
12216 # Guess no on native Windows.
12217 mingw*) gl_cv_func_printf_flag_zero="guessing no";;
12218 # If we don't know, assume the worst.
12219 *) gl_cv_func_printf_flag_zero="guessing no";;
12223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12224 /* end confdefs.h. */
12227 #include <string.h>
12228 static char buf[100];
12229 static double zero = 0.0;
12232 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
12233 || (strcmp (buf, " inf") != 0
12234 && strcmp (buf, " infinity") != 0))
12239 if ac_fn_c_try_run "$LINENO"; then :
12240 gl_cv_func_printf_flag_zero=yes
12242 gl_cv_func_printf_flag_zero=no
12244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12245 conftest.$ac_objext conftest.beam conftest.$ac_ext
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
12251 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
12256 $as_echo_n "checking whether printf supports large precisions... " >&6; }
12257 if ${gl_cv_func_printf_precision+:} false; then :
12258 $as_echo_n "(cached) " >&6
12261 if test "$cross_compiling" = yes; then :
12264 # Guess no only on Solaris, native Windows, and BeOS systems.
12265 solaris*) gl_cv_func_printf_precision="guessing no" ;;
12266 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
12267 beos*) gl_cv_func_printf_precision="guessing no" ;;
12268 *) gl_cv_func_printf_precision="guessing yes" ;;
12272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12273 /* end confdefs.h. */
12276 #include <string.h>
12277 static char buf[5000];
12282 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
12285 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
12287 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
12289 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
12292 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
12298 if ac_fn_c_try_run "$LINENO"; then :
12299 gl_cv_func_printf_precision=yes
12301 gl_cv_func_printf_precision=no
12303 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12304 conftest.$ac_objext conftest.beam conftest.$ac_ext
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
12310 $as_echo "$gl_cv_func_printf_precision" >&6; }
12313 gl_cv_c_multiarch=no
12314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12315 /* end confdefs.h. */
12316 #ifndef __APPLE_CC__
12317 not a universal capable compiler
12322 if ac_fn_c_try_compile "$LINENO"; then :
12326 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12327 if test -n "$prev"; then
12329 i?86 | x86_64 | ppc | ppc64)
12330 if test -z "$arch" || test "$arch" = "$word"; then
12333 gl_cv_c_multiarch=yes
12339 if test "x$word" = "x-arch"; then
12346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12347 if test $gl_cv_c_multiarch = yes; then
12348 APPLE_UNIVERSAL_BUILD=1
12350 APPLE_UNIVERSAL_BUILD=0
12357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
12358 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
12359 if ${gl_cv_func_printf_enomem+:} false; then :
12360 $as_echo_n "(cached) " >&6
12363 gl_cv_func_printf_enomem="guessing no"
12364 if test "$cross_compiling" = no; then
12365 if test $APPLE_UNIVERSAL_BUILD = 0; then
12366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367 /* end confdefs.h. */
12370 #include <stdlib.h>
12371 #if defined __MACH__ && defined __APPLE__
12372 /* Avoid a crash on Mac OS X. */
12373 #include <mach/mach.h>
12374 #include <mach/mach_error.h>
12375 #include <mach/thread_status.h>
12376 #include <mach/exception.h>
12377 #include <mach/task.h>
12378 #include <pthread.h>
12379 /* The exception port on which our thread listens. */
12380 static mach_port_t our_exception_port;
12381 /* The main function of the thread listening for exceptions of type
12384 mach_exception_thread (void *arg)
12386 /* Buffer for a message to be received. */
12388 mach_msg_header_t head;
12389 mach_msg_body_t msgh_body;
12392 mach_msg_return_t retval;
12393 /* Wait for a message on the exception port. */
12394 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12395 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12396 if (retval != MACH_MSG_SUCCESS)
12401 nocrash_init (void)
12403 mach_port_t self = mach_task_self ();
12404 /* Allocate a port on which the thread shall listen for exceptions. */
12405 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12407 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
12408 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12409 MACH_MSG_TYPE_MAKE_SEND)
12411 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
12413 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12414 /* Create the thread listening on the exception port. */
12415 pthread_attr_t attr;
12417 if (pthread_attr_init (&attr) == 0
12418 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12419 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12420 pthread_attr_destroy (&attr);
12421 /* Replace the exception port info for these exceptions with our own.
12422 Note that we replace the exception port for the entire task, not only
12423 for a particular thread. This has the effect that when our exception
12424 port gets the message, the thread specific exception port has already
12425 been asked, and we don't need to bother about it.
12426 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
12427 task_set_exception_ports (self, mask, our_exception_port,
12428 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12433 #elif defined _WIN32 && ! defined __CYGWIN__
12434 /* Avoid a crash on native Windows. */
12435 #define WIN32_LEAN_AND_MEAN
12436 #include <windows.h>
12437 #include <winerror.h>
12439 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12441 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12443 case EXCEPTION_ACCESS_VIOLATION:
12444 case EXCEPTION_IN_PAGE_ERROR:
12445 case EXCEPTION_STACK_OVERFLOW:
12446 case EXCEPTION_GUARD_PAGE:
12447 case EXCEPTION_PRIV_INSTRUCTION:
12448 case EXCEPTION_ILLEGAL_INSTRUCTION:
12449 case EXCEPTION_DATATYPE_MISALIGNMENT:
12450 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12451 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12454 return EXCEPTION_CONTINUE_SEARCH;
12457 nocrash_init (void)
12459 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12462 /* Avoid a crash on POSIX systems. */
12463 #include <signal.h>
12464 #include <unistd.h>
12465 /* A POSIX signal handler. */
12467 exception_handler (int sig)
12472 nocrash_init (void)
12475 signal (SIGSEGV, exception_handler);
12478 signal (SIGBUS, exception_handler);
12484 #include <sys/types.h>
12485 #include <sys/time.h>
12486 #include <sys/resource.h>
12490 struct rlimit limit;
12493 /* Some printf implementations allocate temporary space with malloc. */
12494 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
12496 if (getrlimit (RLIMIT_DATA, &limit) < 0)
12498 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
12499 limit.rlim_max = 5000000;
12500 limit.rlim_cur = limit.rlim_max;
12501 if (setrlimit (RLIMIT_DATA, &limit) < 0)
12504 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
12506 if (getrlimit (RLIMIT_AS, &limit) < 0)
12508 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
12509 limit.rlim_max = 5000000;
12510 limit.rlim_cur = limit.rlim_max;
12511 if (setrlimit (RLIMIT_AS, &limit) < 0)
12514 /* Some printf implementations allocate temporary space on the stack. */
12515 #ifdef RLIMIT_STACK
12516 if (getrlimit (RLIMIT_STACK, &limit) < 0)
12518 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
12519 limit.rlim_max = 5000000;
12520 limit.rlim_cur = limit.rlim_max;
12521 if (setrlimit (RLIMIT_STACK, &limit) < 0)
12524 ret = printf ("%.5000000f", 1.0);
12525 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
12529 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12530 (eval $ac_link) 2>&5
12532 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12533 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12536 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
12537 if test $result != 0 && test $result != 77; then result=1; fi
12539 ) >/dev/null 2>/dev/null
12541 0) gl_cv_func_printf_enomem="yes" ;;
12542 77) gl_cv_func_printf_enomem="guessing no" ;;
12543 *) gl_cv_func_printf_enomem="no" ;;
12546 gl_cv_func_printf_enomem="guessing no"
12550 gl_cv_func_printf_enomem="guessing no"
12553 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
12555 # Guess yes on glibc systems.
12556 *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";;
12557 # Guess yes on Solaris.
12558 solaris*) gl_cv_func_printf_enomem="guessing yes";;
12559 # Guess yes on AIX.
12560 aix*) gl_cv_func_printf_enomem="guessing yes";;
12561 # Guess yes on HP-UX/hppa.
12562 hpux*) case "$host_cpu" in
12563 hppa*) gl_cv_func_printf_enomem="guessing yes";;
12564 *) gl_cv_func_printf_enomem="guessing no";;
12567 # Guess yes on IRIX.
12568 irix*) gl_cv_func_printf_enomem="guessing yes";;
12569 # Guess yes on OSF/1.
12570 osf*) gl_cv_func_printf_enomem="guessing yes";;
12571 # Guess yes on BeOS.
12572 beos*) gl_cv_func_printf_enomem="guessing yes";;
12573 # Guess yes on Haiku.
12574 haiku*) gl_cv_func_printf_enomem="guessing yes";;
12575 # If we don't know, assume the worst.
12576 *) gl_cv_func_printf_enomem="guessing no";;
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
12582 $as_echo "$gl_cv_func_printf_enomem" >&6; }
12586 case "$gl_cv_func_printf_long_double" in
12591 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
12599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12600 $as_echo_n "checking for unsigned long long int... " >&6; }
12601 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12602 $as_echo_n "(cached) " >&6
12604 ac_cv_type_unsigned_long_long_int=yes
12605 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12607 /* end confdefs.h. */
12609 /* For now, do not test the preprocessor; as of 2007 there are too many
12610 implementations with broken preprocessors. Perhaps this can
12611 be revisited in 2012. In the meantime, code should not expect
12612 #if to work with literals wider than 32 bits. */
12613 /* Test literals. */
12614 long long int ll = 9223372036854775807ll;
12615 long long int nll = -9223372036854775807LL;
12616 unsigned long long int ull = 18446744073709551615ULL;
12617 /* Test constant expressions. */
12618 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12620 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12626 /* Test availability of runtime routines for shift and division. */
12627 long long int llmax = 9223372036854775807ll;
12628 unsigned long long int ullmax = 18446744073709551615ull;
12629 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12630 | (llmax / ll) | (llmax % ll)
12631 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12632 | (ullmax / ull) | (ullmax % ull));
12638 if ac_fn_c_try_link "$LINENO"; then :
12641 ac_cv_type_unsigned_long_long_int=no
12643 rm -f core conftest.err conftest.$ac_objext \
12644 conftest$ac_exeext conftest.$ac_ext
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12648 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12649 if test $ac_cv_type_unsigned_long_long_int = yes; then
12651 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12658 $as_echo_n "checking for long long int... " >&6; }
12659 if ${ac_cv_type_long_long_int+:} false; then :
12660 $as_echo_n "(cached) " >&6
12662 ac_cv_type_long_long_int=yes
12663 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12664 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12665 if test $ac_cv_type_long_long_int = yes; then
12666 if test "$cross_compiling" = yes; then :
12669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12670 /* end confdefs.h. */
12671 #include <limits.h>
12674 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12675 # define LLONG_MAX (HALF - 1 + HALF)
12680 long long int n = 1;
12684 long long int m = n << i;
12687 if (LLONG_MAX / 2 < m)
12695 if ac_fn_c_try_run "$LINENO"; then :
12698 ac_cv_type_long_long_int=no
12700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12701 conftest.$ac_objext conftest.beam conftest.$ac_ext
12707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12708 $as_echo "$ac_cv_type_long_long_int" >&6; }
12709 if test $ac_cv_type_long_long_int = yes; then
12711 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
12717 $as_echo_n "checking for wchar_t... " >&6; }
12718 if ${gt_cv_c_wchar_t+:} false; then :
12719 $as_echo_n "(cached) " >&6
12721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12722 /* end confdefs.h. */
12723 #include <stddef.h>
12724 wchar_t foo = (wchar_t)'\0';
12733 if ac_fn_c_try_compile "$LINENO"; then :
12734 gt_cv_c_wchar_t=yes
12738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
12741 $as_echo "$gt_cv_c_wchar_t" >&6; }
12742 if test $gt_cv_c_wchar_t = yes; then
12744 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12750 $as_echo_n "checking for wint_t... " >&6; }
12751 if ${gt_cv_c_wint_t+:} false; then :
12752 $as_echo_n "(cached) " >&6
12754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12755 /* end confdefs.h. */
12757 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12759 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
12760 before <wchar.h>. */
12761 #include <stddef.h>
12765 wint_t foo = (wchar_t)'\0';
12774 if ac_fn_c_try_compile "$LINENO"; then :
12779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12782 $as_echo "$gt_cv_c_wint_t" >&6; }
12783 if test $gt_cv_c_wint_t = yes; then
12785 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
12789 $as_echo_n "checking whether wint_t is too small... " >&6; }
12790 if ${gl_cv_type_wint_t_too_small+:} false; then :
12791 $as_echo_n "(cached) " >&6
12793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12794 /* end confdefs.h. */
12796 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12798 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12799 included before <wchar.h>. */
12800 #if !(defined __GLIBC__ && !defined __UCLIBC__)
12801 # include <stddef.h>
12802 # include <stdio.h>
12806 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12816 if ac_fn_c_try_compile "$LINENO"; then :
12817 gl_cv_type_wint_t_too_small=no
12819 gl_cv_type_wint_t_too_small=yes
12821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
12824 $as_echo "$gl_cv_type_wint_t_too_small" >&6; }
12825 if test $gl_cv_type_wint_t_too_small = yes; then
12826 GNULIB_OVERRIDES_WINT_T=1
12828 GNULIB_OVERRIDES_WINT_T=0
12831 GNULIB_OVERRIDES_WINT_T=0
12839 if test $ac_cv_header_features_h = yes; then
12849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
12850 $as_echo_n "checking for intmax_t... " >&6; }
12851 if ${gt_cv_c_intmax_t+:} false; then :
12852 $as_echo_n "(cached) " >&6
12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12855 /* end confdefs.h. */
12857 #include <stddef.h>
12858 #include <stdlib.h>
12859 #if HAVE_STDINT_H_WITH_UINTMAX
12860 #include <stdint.h>
12862 #if HAVE_INTTYPES_H_WITH_UINTMAX
12863 #include <inttypes.h>
12869 intmax_t x = -1; return !x;
12874 if ac_fn_c_try_compile "$LINENO"; then :
12875 gt_cv_c_intmax_t=yes
12877 gt_cv_c_intmax_t=no
12879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
12882 $as_echo "$gt_cv_c_intmax_t" >&6; }
12883 if test $gt_cv_c_intmax_t = yes; then
12885 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
12889 test $ac_cv_type_long_long_int = yes \
12890 && ac_type='long long' \
12893 cat >>confdefs.h <<_ACEOF
12894 #define intmax_t $ac_type
12900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
12901 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
12902 if ${gl_cv_cc_double_expbit0+:} false; then :
12903 $as_echo_n "(cached) " >&6
12906 if test "$cross_compiling" = yes; then :
12908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12909 /* end confdefs.h. */
12911 #if defined arm || defined __arm || defined __arm__
12916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12917 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
12918 gl_cv_cc_double_expbit0="unknown"
12922 if ${ac_cv_c_bigendian+:} false; then :
12923 $as_echo_n "(cached) " >&6
12925 ac_cv_c_bigendian=unknown
12926 # See if we're dealing with a universal compiler.
12927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12928 /* end confdefs.h. */
12929 #ifndef __APPLE_CC__
12930 not a universal capable compiler
12935 if ac_fn_c_try_compile "$LINENO"; then :
12937 # Check for potential -arch flags. It is not universal unless
12938 # there are at least two -arch flags with different values.
12941 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12942 if test -n "$ac_prev"; then
12944 i?86 | x86_64 | ppc | ppc64)
12945 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12948 ac_cv_c_bigendian=universal
12954 elif test "x$ac_word" = "x-arch"; then
12959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12960 if test $ac_cv_c_bigendian = unknown; then
12961 # See if sys/param.h defines the BYTE_ORDER macro.
12962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12963 /* end confdefs.h. */
12964 #include <sys/types.h>
12965 #include <sys/param.h>
12970 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12971 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12973 bogus endian macros
12980 if ac_fn_c_try_compile "$LINENO"; then :
12981 # It does; now see whether it defined to BIG_ENDIAN or not.
12982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h. */
12984 #include <sys/types.h>
12985 #include <sys/param.h>
12990 #if BYTE_ORDER != BIG_ENDIAN
12998 if ac_fn_c_try_compile "$LINENO"; then :
12999 ac_cv_c_bigendian=yes
13001 ac_cv_c_bigendian=no
13003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13007 if test $ac_cv_c_bigendian = unknown; then
13008 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13010 /* end confdefs.h. */
13011 #include <limits.h>
13016 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13017 bogus endian macros
13024 if ac_fn_c_try_compile "$LINENO"; then :
13025 # It does; now see whether it defined to _BIG_ENDIAN or not.
13026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027 /* end confdefs.h. */
13028 #include <limits.h>
13033 #ifndef _BIG_ENDIAN
13041 if ac_fn_c_try_compile "$LINENO"; then :
13042 ac_cv_c_bigendian=yes
13044 ac_cv_c_bigendian=no
13046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13050 if test $ac_cv_c_bigendian = unknown; then
13051 # Compile a test program.
13052 if test "$cross_compiling" = yes; then :
13053 # Try to guess by grepping values from an object file.
13054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055 /* end confdefs.h. */
13056 short int ascii_mm[] =
13057 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13058 short int ascii_ii[] =
13059 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13060 int use_ascii (int i) {
13061 return ascii_mm[i] + ascii_ii[i];
13063 short int ebcdic_ii[] =
13064 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13065 short int ebcdic_mm[] =
13066 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13067 int use_ebcdic (int i) {
13068 return ebcdic_mm[i] + ebcdic_ii[i];
13075 return use_ascii (foo) == use_ebcdic (foo);
13080 if ac_fn_c_try_compile "$LINENO"; then :
13081 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13082 ac_cv_c_bigendian=yes
13084 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13085 if test "$ac_cv_c_bigendian" = unknown; then
13086 ac_cv_c_bigendian=no
13088 # finding both strings is unlikely to happen, but who knows?
13089 ac_cv_c_bigendian=unknown
13093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13096 /* end confdefs.h. */
13097 $ac_includes_default
13102 /* Are we little or big endian? From Harbison&Steele. */
13106 char c[sizeof (long int)];
13109 return u.c[sizeof (long int) - 1] == 1;
13115 if ac_fn_c_try_run "$LINENO"; then :
13116 ac_cv_c_bigendian=no
13118 ac_cv_c_bigendian=yes
13120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13121 conftest.$ac_objext conftest.beam conftest.$ac_ext
13127 case $ac_cv_c_bigendian in #(
13129 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13131 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13134 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13138 gl_cv_cc_double_expbit0="unknown" ;;
13147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148 /* end confdefs.h. */
13151 #include <stddef.h>
13153 #include <string.h>
13155 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13156 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13157 static unsigned int ored_words[NWORDS];
13158 static unsigned int anded_words[NWORDS];
13159 static void add_to_ored_words (double x)
13163 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
13164 memset (&m, 0, sizeof (memory_double));
13166 for (i = 0; i < NWORDS; i++)
13168 ored_words[i] |= m.word[i];
13169 anded_words[i] &= m.word[i];
13175 FILE *fp = fopen ("conftest.out", "w");
13178 for (j = 0; j < NWORDS; j++)
13179 anded_words[j] = ~ (unsigned int) 0;
13180 add_to_ored_words (0.25);
13181 add_to_ored_words (0.5);
13182 add_to_ored_words (1.0);
13183 add_to_ored_words (2.0);
13184 add_to_ored_words (4.0);
13185 /* Remove bits that are common (e.g. if representation of the first mantissa
13186 bit is explicit). */
13187 for (j = 0; j < NWORDS; j++)
13188 ored_words[j] &= ~anded_words[j];
13189 /* Now find the nonzero word. */
13190 for (j = 0; j < NWORDS; j++)
13191 if (ored_words[j] != 0)
13196 for (i = j + 1; i < NWORDS; i++)
13197 if (ored_words[i] != 0)
13199 fprintf (fp, "unknown");
13200 return (fclose (fp) != 0);
13203 if ((ored_words[j] >> i) & 1)
13205 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13206 return (fclose (fp) != 0);
13209 fprintf (fp, "unknown");
13210 return (fclose (fp) != 0);
13214 if ac_fn_c_try_run "$LINENO"; then :
13215 gl_cv_cc_double_expbit0=`cat conftest.out`
13217 gl_cv_cc_double_expbit0="unknown"
13219 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13220 conftest.$ac_objext conftest.beam conftest.$ac_ext
13226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13227 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13228 case "$gl_cv_cc_double_expbit0" in
13230 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13231 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13233 cat >>confdefs.h <<_ACEOF
13234 #define DBL_EXPBIT0_WORD $word
13238 cat >>confdefs.h <<_ACEOF
13239 #define DBL_EXPBIT0_BIT $bit
13253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
13254 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
13255 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
13256 $as_echo_n "(cached) " >&6
13259 if test "$cross_compiling" = yes; then :
13261 # Guess yes on glibc systems.
13262 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13263 # Guess yes on FreeBSD >= 5.
13264 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
13265 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13266 # Guess yes on Mac OS X >= 10.3.
13267 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
13268 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13269 # Guess yes on OpenBSD >= 3.9.
13270 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
13271 gl_cv_func_snprintf_retval_c99="guessing no";;
13272 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13273 # Guess yes on Solaris >= 2.10.
13274 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
13275 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
13276 # Guess yes on AIX >= 4.
13277 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
13278 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13279 # Guess yes on NetBSD >= 3.
13280 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
13281 gl_cv_func_snprintf_retval_c99="guessing no";;
13282 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13283 # Guess yes on BeOS.
13284 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13285 # Guess yes on MSVC, no on mingw.
13286 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13287 /* end confdefs.h. */
13294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13295 $EGREP "Known" >/dev/null 2>&1; then :
13296 gl_cv_func_snprintf_retval_c99="guessing yes"
13298 gl_cv_func_snprintf_retval_c99="guessing no"
13303 # If we don't know, assume the worst.
13304 *) gl_cv_func_snprintf_retval_c99="guessing no";;
13308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13309 /* end confdefs.h. */
13312 #include <string.h>
13314 # define my_snprintf snprintf
13316 # include <stdarg.h>
13317 static int my_snprintf (char *buf, int size, const char *format, ...)
13321 va_start (args, format);
13322 ret = vsnprintf (buf, size, format, args);
13327 static char buf[100];
13330 strcpy (buf, "ABCDEF");
13331 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
13333 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
13335 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
13340 if ac_fn_c_try_run "$LINENO"; then :
13341 gl_cv_func_snprintf_retval_c99=yes
13343 gl_cv_func_snprintf_retval_c99=no
13345 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13346 conftest.$ac_objext conftest.beam conftest.$ac_ext
13351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
13352 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
13359 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
13361 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13362 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13363 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13364 cat >>confdefs.h <<_ACEOF
13365 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13371 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
13373 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
13379 cat >>confdefs.h <<_ACEOF
13380 #define HAVE_DECL__SNPRINTF $ac_have_decl
13385 case "$gl_cv_func_snprintf_retval_c99" in
13388 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
13408 GNULIB_COPYSIGNF=0;
13409 GNULIB_COPYSIGNL=0;
13468 GNULIB_REMAINDER=0;
13469 GNULIB_REMAINDERF=0;
13470 GNULIB_REMAINDERL=0;
13556 HAVE_DECL_COPYSIGNF=1;
13562 HAVE_DECL_EXPM1L=1;
13563 HAVE_DECL_FLOORF=1;
13564 HAVE_DECL_FLOORL=1;
13565 HAVE_DECL_FREXPL=1;
13566 HAVE_DECL_LDEXPL=1;
13568 HAVE_DECL_LOG10L=1;
13573 HAVE_DECL_REMAINDER=1;
13574 HAVE_DECL_REMAINDERL=1;
13577 HAVE_DECL_ROUNDF=1;
13578 HAVE_DECL_ROUNDL=1;
13583 HAVE_DECL_TRUNCF=1;
13584 HAVE_DECL_TRUNCL=1;
13614 REPLACE_HUGE_VAL=0;
13621 REPLACE_ISFINITE=0;
13644 REPLACE_REMAINDER=0;
13645 REPLACE_REMAINDERF=0;
13646 REPLACE_REMAINDERL=0;
13651 REPLACE_SIGNBIT_USING_GCC=0;
13663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
13664 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
13665 if ${gl_cv_func_frexp_no_libm+:} false; then :
13666 $as_echo_n "(cached) " >&6
13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13670 /* end confdefs.h. */
13676 int e; return frexp (x, &e) > 0;
13681 if ac_fn_c_try_link "$LINENO"; then :
13682 gl_cv_func_frexp_no_libm=yes
13684 gl_cv_func_frexp_no_libm=no
13686 rm -f core conftest.err conftest.$ac_objext \
13687 conftest$ac_exeext conftest.$ac_ext
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
13691 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
13693 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
13694 if test "x$ac_cv_have_decl_alarm" = xyes; then :
13700 cat >>confdefs.h <<_ACEOF
13701 #define HAVE_DECL_ALARM $ac_have_decl
13719 GNULIB_UTIMENSAT=0;
13720 GNULIB_OVERRIDES_STRUCT_STAT=0;
13734 REPLACE_FUTIMENS=0;
13740 REPLACE_UTIMENSAT=0;
13742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
13743 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
13744 if ${ac_cv_header_stat_broken+:} false; then :
13745 $as_echo_n "(cached) " >&6
13747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13748 /* end confdefs.h. */
13749 #include <sys/types.h>
13750 #include <sys/stat.h>
13752 #if defined S_ISBLK && defined S_IFDIR
13753 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
13756 #if defined S_ISBLK && defined S_IFCHR
13757 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
13760 #if defined S_ISLNK && defined S_IFREG
13761 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
13764 #if defined S_ISSOCK && defined S_IFREG
13765 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
13769 if ac_fn_c_try_compile "$LINENO"; then :
13770 ac_cv_header_stat_broken=no
13772 ac_cv_header_stat_broken=yes
13774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
13777 $as_echo "$ac_cv_header_stat_broken" >&6; }
13778 if test $ac_cv_header_stat_broken = yes; then
13780 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
13790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
13791 $as_echo_n "checking for 64-bit off_t... " >&6; }
13792 if ${gl_cv_type_off_t_64+:} false; then :
13793 $as_echo_n "(cached) " >&6
13795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13796 /* end confdefs.h. */
13797 #include <sys/types.h>
13798 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
13808 if ac_fn_c_try_compile "$LINENO"; then :
13809 gl_cv_type_off_t_64=yes
13811 gl_cv_type_off_t_64=no
13813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
13817 $as_echo "$gl_cv_type_off_t_64" >&6; }
13818 if test $gl_cv_type_off_t_64 = no; then
13819 WINDOWS_64_BIT_OFF_T=1
13821 WINDOWS_64_BIT_OFF_T=0
13823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
13824 $as_echo_n "checking for 64-bit st_size... " >&6; }
13825 if ${gl_cv_member_st_size_64+:} false; then :
13826 $as_echo_n "(cached) " >&6
13828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h. */
13830 #include <sys/types.h>
13832 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
13842 if ac_fn_c_try_compile "$LINENO"; then :
13843 gl_cv_member_st_size_64=yes
13845 gl_cv_member_st_size_64=no
13847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
13851 $as_echo "$gl_cv_member_st_size_64" >&6; }
13852 if test $gl_cv_member_st_size_64 = no; then
13853 WINDOWS_64_BIT_ST_SIZE=1
13855 WINDOWS_64_BIT_ST_SIZE=0
13859 WINDOWS_64_BIT_OFF_T=0
13860 WINDOWS_64_BIT_ST_SIZE=0
13878 if test $gl_cv_have_include_next = yes; then
13879 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
13882 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
13883 if ${gl_cv_next_sys_stat_h+:} false; then :
13884 $as_echo_n "(cached) " >&6
13887 if test $ac_cv_header_sys_stat_h = yes; then
13892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h. */
13894 #include <sys/stat.h>
13897 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13898 *) gl_absname_cpp="$ac_cpp" ;;
13903 gl_dirsep_regex='[/\\]'
13906 gl_dirsep_regex='\/'
13909 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13910 gl_header_literal_regex=`echo 'sys/stat.h' \
13911 | sed -e "$gl_make_literal_regex_sed"`
13912 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13913 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13919 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13920 sed -n "$gl_absolute_header_sed"`
13922 gl_header=$gl_cv_absolute_sys_stat_h
13923 gl_cv_next_sys_stat_h='"'$gl_header'"'
13925 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
13931 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
13933 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
13935 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13936 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13937 gl_next_as_first_directive='<'sys/stat.h'>'
13939 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13940 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
13942 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
13951 WINDOWS_STAT_TIMESPEC=0
13960 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
13961 #include <sys/stat.h>
13963 if test "x$ac_cv_type_nlink_t" = xyes; then :
13967 $as_echo "#define nlink_t int" >>confdefs.h
13973 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
13974 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13976 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13977 if eval \${$as_gl_Symbol+:} false; then :
13978 $as_echo_n "(cached) " >&6
13980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13981 /* end confdefs.h. */
13982 #include <sys/stat.h>
13993 if ac_fn_c_try_compile "$LINENO"; then :
13994 eval "$as_gl_Symbol=yes"
13996 eval "$as_gl_Symbol=no"
13998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14000 eval ac_res=\$$as_gl_Symbol
14001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14002 $as_echo "$ac_res" >&6; }
14003 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14004 cat >>confdefs.h <<_ACEOF
14005 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14008 eval ac_cv_have_decl_$gl_func=yes
14015 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
14016 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
14022 cat >>confdefs.h <<_ACEOF
14023 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
14041 if test $gl_cv_have_include_next = yes; then
14042 gl_cv_next_getopt_h='<'getopt.h'>'
14044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
14045 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
14046 if ${gl_cv_next_getopt_h+:} false; then :
14047 $as_echo_n "(cached) " >&6
14050 if test $ac_cv_header_getopt_h = yes; then
14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14056 /* end confdefs.h. */
14057 #include <getopt.h>
14060 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14061 *) gl_absname_cpp="$ac_cpp" ;;
14066 gl_dirsep_regex='[/\\]'
14069 gl_dirsep_regex='\/'
14072 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14073 gl_header_literal_regex=`echo 'getopt.h' \
14074 | sed -e "$gl_make_literal_regex_sed"`
14075 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14076 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14082 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14083 sed -n "$gl_absolute_header_sed"`
14085 gl_header=$gl_cv_absolute_getopt_h
14086 gl_cv_next_getopt_h='"'$gl_header'"'
14088 gl_cv_next_getopt_h='<'getopt.h'>'
14093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
14094 $as_echo "$gl_cv_next_getopt_h" >&6; }
14096 NEXT_GETOPT_H=$gl_cv_next_getopt_h
14098 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14100 gl_next_as_first_directive='<'getopt.h'>'
14102 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14103 gl_next_as_first_directive=$gl_cv_next_getopt_h
14105 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
14110 if test $ac_cv_header_getopt_h = yes; then
14119 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14120 for ac_header in getopt.h
14122 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
14123 if test "x$ac_cv_header_getopt_h" = xyes; then :
14124 cat >>confdefs.h <<_ACEOF
14125 #define HAVE_GETOPT_H 1
14129 gl_replace_getopt=yes
14136 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14137 for ac_func in getopt_long_only
14139 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
14140 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
14141 cat >>confdefs.h <<_ACEOF
14142 #define HAVE_GETOPT_LONG_ONLY 1
14146 gl_replace_getopt=yes
14152 if test -z "$gl_replace_getopt"; then
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
14154 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
14155 if ${gl_cv_func_getopt_posix+:} false; then :
14156 $as_echo_n "(cached) " >&6
14159 if test $cross_compiling = no; then
14160 if test "$cross_compiling" = yes; then :
14161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14162 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14163 as_fn_error $? "cannot run test program while cross compiling
14164 See \`config.log' for more details" "$LINENO" 5; }
14166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167 /* end confdefs.h. */
14169 #include <unistd.h>
14170 #include <stdlib.h>
14171 #include <string.h>
14176 static char program[] = "program";
14177 static char a[] = "-a";
14178 static char foo[] = "foo";
14179 static char bar[] = "bar";
14180 char *argv[] = { program, a, foo, bar, NULL };
14183 c = getopt (4, argv, "ab");
14186 c = getopt (4, argv, "ab");
14189 if (!(optind == 2))
14195 if ac_fn_c_try_run "$LINENO"; then :
14196 gl_cv_func_getopt_posix=maybe
14198 gl_cv_func_getopt_posix=no
14200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14201 conftest.$ac_objext conftest.beam conftest.$ac_ext
14204 if test $gl_cv_func_getopt_posix = maybe; then
14205 if test "$cross_compiling" = yes; then :
14206 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14207 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14208 as_fn_error $? "cannot run test program while cross compiling
14209 See \`config.log' for more details" "$LINENO" 5; }
14211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14212 /* end confdefs.h. */
14214 #include <unistd.h>
14215 #include <stdlib.h>
14216 #include <string.h>
14221 static char program[] = "program";
14222 static char donald[] = "donald";
14223 static char p[] = "-p";
14224 static char billy[] = "billy";
14225 static char duck[] = "duck";
14226 static char a[] = "-a";
14227 static char bar[] = "bar";
14228 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
14231 c = getopt (7, argv, "+abp:q:");
14234 if (!(strcmp (argv[0], "program") == 0))
14236 if (!(strcmp (argv[1], "donald") == 0))
14238 if (!(strcmp (argv[2], "-p") == 0))
14240 if (!(strcmp (argv[3], "billy") == 0))
14242 if (!(strcmp (argv[4], "duck") == 0))
14244 if (!(strcmp (argv[5], "-a") == 0))
14246 if (!(strcmp (argv[6], "bar") == 0))
14248 if (!(optind == 1))
14254 if ac_fn_c_try_run "$LINENO"; then :
14255 gl_cv_func_getopt_posix=maybe
14257 gl_cv_func_getopt_posix=no
14259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14260 conftest.$ac_objext conftest.beam conftest.$ac_ext
14264 if test $gl_cv_func_getopt_posix = maybe; then
14265 if test "$cross_compiling" = yes; then :
14266 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14267 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14268 as_fn_error $? "cannot run test program while cross compiling
14269 See \`config.log' for more details" "$LINENO" 5; }
14271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272 /* end confdefs.h. */
14274 #include <unistd.h>
14275 #include <stdlib.h>
14276 #include <string.h>
14281 static char program[] = "program";
14282 static char ab[] = "-ab";
14283 char *argv[3] = { program, ab, NULL };
14284 if (getopt (2, argv, "ab:") != 'a')
14286 if (getopt (2, argv, "ab:") != '?')
14296 if ac_fn_c_try_run "$LINENO"; then :
14297 gl_cv_func_getopt_posix=yes
14299 gl_cv_func_getopt_posix=no
14301 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14302 conftest.$ac_objext conftest.beam conftest.$ac_ext
14308 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
14309 *) gl_cv_func_getopt_posix="guessing yes";;
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
14315 $as_echo "$gl_cv_func_getopt_posix" >&6; }
14316 case "$gl_cv_func_getopt_posix" in
14317 *no) gl_replace_getopt=yes ;;
14321 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
14323 $as_echo_n "checking for working GNU getopt function... " >&6; }
14324 if ${gl_cv_func_getopt_gnu+:} false; then :
14325 $as_echo_n "(cached) " >&6
14327 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
14328 # optstring is necessary for programs like m4 that have POSIX-mandated
14329 # semantics for supporting options interspersed with files.
14330 # Also, since getopt_long is a GNU extension, we require optind=0.
14331 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
14332 # so take care to revert to the correct (non-)export state.
14333 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
14334 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
14335 xx) gl_had_POSIXLY_CORRECT=exported ;;
14336 x) gl_had_POSIXLY_CORRECT=yes ;;
14337 *) gl_had_POSIXLY_CORRECT= ;;
14340 export POSIXLY_CORRECT
14341 if test "$cross_compiling" = yes; then :
14342 gl_cv_func_getopt_gnu="guessing no"
14345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14346 /* end confdefs.h. */
14347 #include <getopt.h>
14348 #include <stddef.h>
14349 #include <string.h>
14351 #include <stdlib.h>
14352 #if defined __MACH__ && defined __APPLE__
14353 /* Avoid a crash on Mac OS X. */
14354 #include <mach/mach.h>
14355 #include <mach/mach_error.h>
14356 #include <mach/thread_status.h>
14357 #include <mach/exception.h>
14358 #include <mach/task.h>
14359 #include <pthread.h>
14360 /* The exception port on which our thread listens. */
14361 static mach_port_t our_exception_port;
14362 /* The main function of the thread listening for exceptions of type
14365 mach_exception_thread (void *arg)
14367 /* Buffer for a message to be received. */
14369 mach_msg_header_t head;
14370 mach_msg_body_t msgh_body;
14373 mach_msg_return_t retval;
14374 /* Wait for a message on the exception port. */
14375 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
14376 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
14377 if (retval != MACH_MSG_SUCCESS)
14382 nocrash_init (void)
14384 mach_port_t self = mach_task_self ();
14385 /* Allocate a port on which the thread shall listen for exceptions. */
14386 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
14388 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
14389 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
14390 MACH_MSG_TYPE_MAKE_SEND)
14392 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
14394 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
14395 /* Create the thread listening on the exception port. */
14396 pthread_attr_t attr;
14398 if (pthread_attr_init (&attr) == 0
14399 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
14400 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
14401 pthread_attr_destroy (&attr);
14402 /* Replace the exception port info for these exceptions with our own.
14403 Note that we replace the exception port for the entire task, not only
14404 for a particular thread. This has the effect that when our exception
14405 port gets the message, the thread specific exception port has already
14406 been asked, and we don't need to bother about it.
14407 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
14408 task_set_exception_ports (self, mask, our_exception_port,
14409 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
14414 #elif defined _WIN32 && ! defined __CYGWIN__
14415 /* Avoid a crash on native Windows. */
14416 #define WIN32_LEAN_AND_MEAN
14417 #include <windows.h>
14418 #include <winerror.h>
14420 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
14422 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
14424 case EXCEPTION_ACCESS_VIOLATION:
14425 case EXCEPTION_IN_PAGE_ERROR:
14426 case EXCEPTION_STACK_OVERFLOW:
14427 case EXCEPTION_GUARD_PAGE:
14428 case EXCEPTION_PRIV_INSTRUCTION:
14429 case EXCEPTION_ILLEGAL_INSTRUCTION:
14430 case EXCEPTION_DATATYPE_MISALIGNMENT:
14431 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
14432 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
14435 return EXCEPTION_CONTINUE_SEARCH;
14438 nocrash_init (void)
14440 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
14443 /* Avoid a crash on POSIX systems. */
14444 #include <signal.h>
14445 #include <unistd.h>
14446 /* A POSIX signal handler. */
14448 exception_handler (int sig)
14453 nocrash_init (void)
14456 signal (SIGSEGV, exception_handler);
14459 signal (SIGBUS, exception_handler);
14473 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
14474 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
14475 OSF/1 5.1, Solaris 10. */
14477 static char conftest[] = "conftest";
14478 static char plus[] = "-+";
14479 char *argv[3] = { conftest, plus, NULL };
14481 if (getopt (2, argv, "+a") != '?')
14484 /* This code succeeds on glibc 2.8, mingw,
14485 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
14486 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
14488 static char program[] = "program";
14489 static char p[] = "-p";
14490 static char foo[] = "foo";
14491 static char bar[] = "bar";
14492 char *argv[] = { program, p, foo, bar, NULL };
14495 if (getopt (4, argv, "p::") != 'p')
14497 else if (optarg != NULL)
14499 else if (getopt (4, argv, "p::") != -1)
14501 else if (optind != 2)
14504 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
14506 static char program[] = "program";
14507 static char foo[] = "foo";
14508 static char p[] = "-p";
14509 char *argv[] = { program, foo, p, NULL };
14511 if (getopt (3, argv, "-p") != 1)
14513 else if (getopt (3, argv, "-p") != 'p')
14516 /* This code fails on glibc 2.11. */
14518 static char program[] = "program";
14519 static char b[] = "-b";
14520 static char a[] = "-a";
14521 char *argv[] = { program, b, a, NULL };
14522 optind = opterr = 0;
14523 if (getopt (3, argv, "+:a:b") != 'b')
14525 else if (getopt (3, argv, "+:a:b") != ':')
14528 /* This code dumps core on glibc 2.14. */
14530 static char program[] = "program";
14531 static char w[] = "-W";
14532 static char dummy[] = "dummy";
14533 char *argv[] = { program, w, dummy, NULL };
14534 optind = opterr = 1;
14535 if (getopt (3, argv, "W;") != 'W')
14544 if ac_fn_c_try_run "$LINENO"; then :
14545 gl_cv_func_getopt_gnu=yes
14547 gl_cv_func_getopt_gnu=no
14549 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14550 conftest.$ac_objext conftest.beam conftest.$ac_ext
14553 case $gl_had_POSIXLY_CORRECT in
14555 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
14556 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
14561 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
14562 if test "$gl_cv_func_getopt_gnu" != yes; then
14563 gl_replace_getopt=yes
14565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
14566 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
14567 if ${gl_cv_func_getopt_long_gnu+:} false; then :
14568 $as_echo_n "(cached) " >&6
14570 if test "$cross_compiling" = yes; then :
14572 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
14573 *) gl_cv_func_getopt_long_gnu="guessing yes";;
14577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14578 /* end confdefs.h. */
14579 #include <getopt.h>
14580 #include <stddef.h>
14581 #include <string.h>
14586 static const struct option long_options[] =
14588 { "xtremely-",no_argument, NULL, 1003 },
14589 { "xtra", no_argument, NULL, 1001 },
14590 { "xtreme", no_argument, NULL, 1002 },
14591 { "xtremely", no_argument, NULL, 1003 },
14592 { NULL, 0, NULL, 0 }
14594 /* This code fails on OpenBSD 5.0. */
14596 static char program[] = "program";
14597 static char xtremel[] = "--xtremel";
14598 char *argv[] = { program, xtremel, NULL };
14600 optind = 1; opterr = 0;
14601 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
14610 if ac_fn_c_try_run "$LINENO"; then :
14611 gl_cv_func_getopt_long_gnu=yes
14613 gl_cv_func_getopt_long_gnu=no
14615 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14616 conftest.$ac_objext conftest.beam conftest.$ac_ext
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
14622 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
14623 case "$gl_cv_func_getopt_long_gnu" in
14625 *) gl_replace_getopt=yes ;;
14637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638 /* end confdefs.h. */
14645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14646 $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
14648 gl_c_asm_opt='-c -Fa'
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
14662 $as_echo_n "checking host CPU and C ABI... " >&6; }
14663 if ${gl_cv_host_cpu_c_abi+:} false; then :
14664 $as_echo_n "(cached) " >&6
14666 case "$host_cpu" in
14669 gl_cv_host_cpu_c_abi=i386
14673 # On x86_64 systems, the C compiler may be generating code in one of
14675 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
14676 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
14677 # with native Windows (mingw, MSVC).
14678 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
14679 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
14680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14681 /* end confdefs.h. */
14682 #if (defined __x86_64__ || defined __amd64__ \
14683 || defined _M_X64 || defined _M_AMD64)
14690 if ac_fn_c_try_compile "$LINENO"; then :
14691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692 /* end confdefs.h. */
14693 #if defined __ILP32__ || defined _ILP32
14700 if ac_fn_c_try_compile "$LINENO"; then :
14701 gl_cv_host_cpu_c_abi=x86_64-x32
14703 gl_cv_host_cpu_c_abi=x86_64
14705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14707 gl_cv_host_cpu_c_abi=i386
14709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14712 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
14713 gl_cv_host_cpu_c_abi=alpha
14717 # Assume arm with EABI.
14718 # On arm64 systems, the C compiler may be generating code in one of
14720 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
14721 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
14722 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724 /* end confdefs.h. */
14732 if ac_fn_c_try_compile "$LINENO"; then :
14733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14734 /* end confdefs.h. */
14735 #if defined __ILP32__ || defined _ILP32
14742 if ac_fn_c_try_compile "$LINENO"; then :
14743 gl_cv_host_cpu_c_abi=arm64-ilp32
14745 gl_cv_host_cpu_c_abi=arm64
14747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14749 # Don't distinguish little-endian and big-endian arm, since they
14750 # don't require different machine code for simple operations and
14751 # since the user can distinguish them through the preprocessor
14752 # defines __ARMEL__ vs. __ARMEB__.
14753 # But distinguish arm which passes floating-point arguments and
14754 # return values in integer registers (r0, r1, ...) - this is
14755 # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
14756 # passes them in float registers (s0, s1, ...) and double registers
14757 # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
14758 # sets the preprocessor defines __ARM_PCS (for the first case) and
14759 # __ARM_PCS_VFP (for the second case), but older GCC does not.
14760 echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
14761 # Look for a reference to the register d0 in the .s file.
14762 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
14763 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
14764 (eval $ac_try) 2>&5
14766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14767 test $ac_status = 0; }; } >/dev/null 2>&1
14768 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
14769 gl_cv_host_cpu_c_abi=armhf
14771 gl_cv_host_cpu_c_abi=arm
14776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14779 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
14780 # On hppa, the C compiler may be generating 32-bit code or 64-bit
14781 # code. In the latter case, it defines _LP64 and __LP64__.
14782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14783 /* end confdefs.h. */
14791 if ac_fn_c_try_compile "$LINENO"; then :
14792 gl_cv_host_cpu_c_abi=hppa64
14794 gl_cv_host_cpu_c_abi=hppa
14796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14800 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
14801 # 32-bit code. In the latter case, it defines _ILP32.
14802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14803 /* end confdefs.h. */
14811 if ac_fn_c_try_compile "$LINENO"; then :
14812 gl_cv_host_cpu_c_abi=ia64-ilp32
14814 gl_cv_host_cpu_c_abi=ia64
14816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14820 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
14822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14823 /* end confdefs.h. */
14824 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
14831 if ac_fn_c_try_compile "$LINENO"; then :
14832 gl_cv_host_cpu_c_abi=mips64
14834 # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
14835 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
14836 # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
14837 # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
14838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14839 /* end confdefs.h. */
14840 #if (_MIPS_SIM == _ABIN32)
14847 if ac_fn_c_try_compile "$LINENO"; then :
14848 gl_cv_host_cpu_c_abi=mipsn32
14850 gl_cv_host_cpu_c_abi=mips
14852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
14859 # No need to distinguish them here; the caller may distinguish
14860 # them based on the OS.
14861 # On powerpc64 systems, the C compiler may still be generating
14862 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
14863 # be generating 64-bit code.
14864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14865 /* end confdefs.h. */
14866 #if defined __powerpc64__ || defined _ARCH_PPC64
14873 if ac_fn_c_try_compile "$LINENO"; then :
14874 # On powerpc64, there are two ABIs on Linux: The AIX compatible
14875 # one and the ELFv2 one. The latter defines _CALL_ELF=2.
14876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14877 /* end confdefs.h. */
14878 #if defined _CALL_ELF && _CALL_ELF == 2
14885 if ac_fn_c_try_compile "$LINENO"; then :
14886 gl_cv_host_cpu_c_abi=powerpc64-elfv2
14888 gl_cv_host_cpu_c_abi=powerpc64
14890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14893 gl_cv_host_cpu_c_abi=powerpc
14895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14899 gl_cv_host_cpu_c_abi=powerpc
14902 riscv32 | riscv64 )
14903 # There are 2 architectures (with variants): rv32* and rv64*.
14904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14905 /* end confdefs.h. */
14906 #if __riscv_xlen == 64
14913 if ac_fn_c_try_compile "$LINENO"; then :
14918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14919 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
14920 # Size of 'long' and 'void *':
14921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14922 /* end confdefs.h. */
14923 #if defined __LP64__
14930 if ac_fn_c_try_compile "$LINENO"; then :
14935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14937 # __riscv_float_abi_double:
14938 # 'float' and 'double' are passed in floating-point registers.
14939 # __riscv_float_abi_single:
14940 # 'float' are passed in floating-point registers.
14941 # __riscv_float_abi_soft:
14942 # No values are passed in floating-point registers.
14943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14944 /* end confdefs.h. */
14945 #if defined __riscv_float_abi_double
14952 if ac_fn_c_try_compile "$LINENO"; then :
14955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14956 /* end confdefs.h. */
14957 #if defined __riscv_float_abi_single
14964 if ac_fn_c_try_compile "$LINENO"; then :
14969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14973 gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
14977 # On s390x, the C compiler may be generating 64-bit (= s390x) code
14978 # or 31-bit (= s390) code.
14979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14980 /* end confdefs.h. */
14981 #if defined __LP64__ || defined __s390x__
14988 if ac_fn_c_try_compile "$LINENO"; then :
14989 gl_cv_host_cpu_c_abi=s390x
14991 gl_cv_host_cpu_c_abi=s390
14993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14997 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
14998 # C compiler still generates 32-bit code.
14999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15000 /* end confdefs.h. */
15001 #if defined __sparcv9 || defined __arch64__
15008 if ac_fn_c_try_compile "$LINENO"; then :
15009 gl_cv_host_cpu_c_abi=sparc64
15011 gl_cv_host_cpu_c_abi=sparc
15013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15017 gl_cv_host_cpu_c_abi="$host_cpu"
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
15023 $as_echo "$gl_cv_host_cpu_c_abi" >&6; }
15025 HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
15026 HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
15031 # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
15032 # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
15033 # earlier, but KAI C++ 3.2d doesn't like this.
15034 sed -e 's/-/_/g' >> confdefs.h <<EOF
15035 #ifndef __${HOST_CPU}__
15036 #define __${HOST_CPU}__ 1
15038 #ifndef __${HOST_CPU_C_ABI}__
15039 #define __${HOST_CPU_C_ABI}__ 1
15057 if test $gl_cv_have_include_next = yes; then
15058 gl_cv_next_limits_h='<'limits.h'>'
15060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
15061 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
15062 if ${gl_cv_next_limits_h+:} false; then :
15063 $as_echo_n "(cached) " >&6
15066 if test $ac_cv_header_limits_h = yes; then
15071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15072 /* end confdefs.h. */
15073 #include <limits.h>
15076 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15077 *) gl_absname_cpp="$ac_cpp" ;;
15082 gl_dirsep_regex='[/\\]'
15085 gl_dirsep_regex='\/'
15088 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15089 gl_header_literal_regex=`echo 'limits.h' \
15090 | sed -e "$gl_make_literal_regex_sed"`
15091 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15092 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15098 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15099 sed -n "$gl_absolute_header_sed"`
15101 gl_header=$gl_cv_absolute_limits_h
15102 gl_cv_next_limits_h='"'$gl_header'"'
15104 gl_cv_next_limits_h='<'limits.h'>'
15109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
15110 $as_echo "$gl_cv_next_limits_h" >&6; }
15112 NEXT_LIMITS_H=$gl_cv_next_limits_h
15114 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15115 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15116 gl_next_as_first_directive='<'limits.h'>'
15118 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15119 gl_next_as_first_directive=$gl_cv_next_limits_h
15121 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
15128 $as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
15129 if ${gl_cv_header_limits_width+:} false; then :
15130 $as_echo_n "(cached) " >&6
15132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133 /* end confdefs.h. */
15134 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15135 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15137 #include <limits.h>
15138 int ullw = ULLONG_WIDTH;
15147 if ac_fn_c_try_compile "$LINENO"; then :
15148 gl_cv_header_limits_width=yes
15150 gl_cv_header_limits_width=no
15152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
15155 $as_echo "$gl_cv_header_limits_width" >&6; }
15156 if test "$gl_cv_header_limits_width" = yes; then
15162 if test -n "$LIMITS_H"; then
15163 GL_GENERATE_LIMITS_H_TRUE=
15164 GL_GENERATE_LIMITS_H_FALSE='#'
15166 GL_GENERATE_LIMITS_H_TRUE='#'
15167 GL_GENERATE_LIMITS_H_FALSE=
15181 if test $ac_cv_type_long_long_int = yes; then
15182 HAVE_LONG_LONG_INT=1
15184 HAVE_LONG_LONG_INT=0
15188 if test $ac_cv_type_unsigned_long_long_int = yes; then
15189 HAVE_UNSIGNED_LONG_LONG_INT=1
15191 HAVE_UNSIGNED_LONG_LONG_INT=0
15196 if test $ac_cv_header_wchar_h = yes; then
15203 if test $ac_cv_header_inttypes_h = yes; then
15210 if test $ac_cv_header_sys_types_h = yes; then
15226 if test $gl_cv_have_include_next = yes; then
15227 gl_cv_next_stdint_h='<'stdint.h'>'
15229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
15230 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
15231 if ${gl_cv_next_stdint_h+:} false; then :
15232 $as_echo_n "(cached) " >&6
15235 if test $ac_cv_header_stdint_h = yes; then
15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h. */
15242 #include <stdint.h>
15245 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15246 *) gl_absname_cpp="$ac_cpp" ;;
15251 gl_dirsep_regex='[/\\]'
15254 gl_dirsep_regex='\/'
15257 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15258 gl_header_literal_regex=`echo 'stdint.h' \
15259 | sed -e "$gl_make_literal_regex_sed"`
15260 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15261 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15267 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15268 sed -n "$gl_absolute_header_sed"`
15270 gl_header=$gl_cv_absolute_stdint_h
15271 gl_cv_next_stdint_h='"'$gl_header'"'
15273 gl_cv_next_stdint_h='<'stdint.h'>'
15278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
15279 $as_echo "$gl_cv_next_stdint_h" >&6; }
15281 NEXT_STDINT_H=$gl_cv_next_stdint_h
15283 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15284 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15285 gl_next_as_first_directive='<'stdint.h'>'
15287 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15288 gl_next_as_first_directive=$gl_cv_next_stdint_h
15290 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
15295 if test $ac_cv_header_stdint_h = yes; then
15302 if test $ac_cv_header_stdint_h = yes; then
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
15304 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
15305 if ${gl_cv_header_working_stdint_h+:} false; then :
15306 $as_echo_n "(cached) " >&6
15308 gl_cv_header_working_stdint_h=no
15309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310 /* end confdefs.h. */
15313 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15314 #define __STDC_CONSTANT_MACROS 1
15315 #define __STDC_LIMIT_MACROS 1
15316 #include <stdint.h>
15317 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
15318 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
15319 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
15323 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15324 included before <wchar.h>. */
15325 #include <stddef.h>
15326 #include <signal.h>
15328 # include <stdio.h>
15330 # include <wchar.h>
15335 int8_t a1 = INT8_MAX;
15336 int8_t a1min = INT8_MIN;
15339 int16_t a2 = INT16_MAX;
15340 int16_t a2min = INT16_MIN;
15343 int32_t a3 = INT32_MAX;
15344 int32_t a3min = INT32_MIN;
15347 int64_t a4 = INT64_MAX;
15348 int64_t a4min = INT64_MIN;
15351 uint8_t b1 = UINT8_MAX;
15353 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
15356 uint16_t b2 = UINT16_MAX;
15359 uint32_t b3 = UINT32_MAX;
15362 uint64_t b4 = UINT64_MAX;
15364 int_least8_t c1 = INT8_C (0x7f);
15365 int_least8_t c1max = INT_LEAST8_MAX;
15366 int_least8_t c1min = INT_LEAST8_MIN;
15367 int_least16_t c2 = INT16_C (0x7fff);
15368 int_least16_t c2max = INT_LEAST16_MAX;
15369 int_least16_t c2min = INT_LEAST16_MIN;
15370 int_least32_t c3 = INT32_C (0x7fffffff);
15371 int_least32_t c3max = INT_LEAST32_MAX;
15372 int_least32_t c3min = INT_LEAST32_MIN;
15373 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
15374 int_least64_t c4max = INT_LEAST64_MAX;
15375 int_least64_t c4min = INT_LEAST64_MIN;
15376 uint_least8_t d1 = UINT8_C (0xff);
15377 uint_least8_t d1max = UINT_LEAST8_MAX;
15378 uint_least16_t d2 = UINT16_C (0xffff);
15379 uint_least16_t d2max = UINT_LEAST16_MAX;
15380 uint_least32_t d3 = UINT32_C (0xffffffff);
15381 uint_least32_t d3max = UINT_LEAST32_MAX;
15382 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
15383 uint_least64_t d4max = UINT_LEAST64_MAX;
15384 int_fast8_t e1 = INT_FAST8_MAX;
15385 int_fast8_t e1min = INT_FAST8_MIN;
15386 int_fast16_t e2 = INT_FAST16_MAX;
15387 int_fast16_t e2min = INT_FAST16_MIN;
15388 int_fast32_t e3 = INT_FAST32_MAX;
15389 int_fast32_t e3min = INT_FAST32_MIN;
15390 int_fast64_t e4 = INT_FAST64_MAX;
15391 int_fast64_t e4min = INT_FAST64_MIN;
15392 uint_fast8_t f1 = UINT_FAST8_MAX;
15393 uint_fast16_t f2 = UINT_FAST16_MAX;
15394 uint_fast32_t f3 = UINT_FAST32_MAX;
15395 uint_fast64_t f4 = UINT_FAST64_MAX;
15397 intptr_t g = INTPTR_MAX;
15398 intptr_t gmin = INTPTR_MIN;
15401 uintptr_t h = UINTPTR_MAX;
15403 intmax_t i = INTMAX_MAX;
15404 uintmax_t j = UINTMAX_MAX;
15406 /* Check that SIZE_MAX has the correct type, if possible. */
15407 #if 201112 <= __STDC_VERSION__
15408 int k = _Generic (SIZE_MAX, size_t: 0);
15409 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
15410 || (0x5110 <= __SUNPRO_C && !__STDC__))
15412 extern __typeof__ (SIZE_MAX) k;
15415 #include <limits.h> /* for CHAR_BIT */
15416 #define TYPE_MINIMUM(t) \
15417 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
15418 #define TYPE_MAXIMUM(t) \
15419 ((t) ((t) 0 < (t) -1 \
15421 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
15424 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
15425 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
15427 /* Detect bug in FreeBSD 6.0 / ia64. */
15428 int check_SIG_ATOMIC:
15429 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
15430 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
15432 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
15434 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
15435 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
15437 /* Detect bug in mingw. */
15439 WINT_MIN == TYPE_MINIMUM (wint_t)
15440 && WINT_MAX == TYPE_MAXIMUM (wint_t)
15443 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
15445 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
15446 int check_UINT16_C:
15447 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
15449 /* Detect bugs in OpenBSD 3.9 stdint.h. */
15451 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
15454 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
15457 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
15460 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
15462 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
15463 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
15464 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
15465 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
15466 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
15467 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
15468 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
15469 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
15470 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
15471 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
15472 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
15483 if ac_fn_c_try_compile "$LINENO"; then :
15484 if test "$cross_compiling" = yes; then :
15486 # Guess yes on native Windows.
15487 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
15488 # In general, assume it works.
15489 *) gl_cv_header_working_stdint_h="guessing yes" ;;
15493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15494 /* end confdefs.h. */
15497 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15498 #define __STDC_CONSTANT_MACROS 1
15499 #define __STDC_LIMIT_MACROS 1
15500 #include <stdint.h>
15503 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15504 included before <wchar.h>. */
15505 #include <stddef.h>
15506 #include <signal.h>
15508 # include <stdio.h>
15510 # include <wchar.h>
15515 #include <string.h>
15516 #define MVAL(macro) MVAL1(macro)
15517 #define MVAL1(expression) #expression
15518 static const char *macro_values[] =
15552 for (mv = macro_values; *mv != NULL; mv++)
15554 const char *value = *mv;
15555 /* Test whether it looks like a cast expression. */
15556 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
15557 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
15558 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
15559 || strncmp (value, "((int)"/*)*/, 6) == 0
15560 || strncmp (value, "((signed short)"/*)*/, 15) == 0
15561 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
15562 return mv - macro_values + 1;
15570 if ac_fn_c_try_run "$LINENO"; then :
15571 gl_cv_header_working_stdint_h=yes
15573 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15574 conftest.$ac_objext conftest.beam conftest.$ac_ext
15579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
15583 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
15586 HAVE_C99_STDINT_H=0
15587 HAVE_SYS_BITYPES_H=0
15588 HAVE_SYS_INTTYPES_H=0
15590 case "$gl_cv_header_working_stdint_h" in
15592 HAVE_C99_STDINT_H=1
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
15594 $as_echo_n "checking whether stdint.h predates C++11... " >&6; }
15595 if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
15596 $as_echo_n "(cached) " >&6
15598 gl_cv_header_stdint_predates_cxx11_h=yes
15599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15600 /* end confdefs.h. */
15603 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15604 #include <stdint.h>
15607 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15608 included before <wchar.h>. */
15609 #include <stddef.h>
15610 #include <signal.h>
15612 # include <stdio.h>
15614 # include <wchar.h>
15618 intmax_t im = INTMAX_MAX;
15619 int32_t i32 = INT32_C (0x7fffffff);
15629 if ac_fn_c_try_compile "$LINENO"; then :
15630 gl_cv_header_stdint_predates_cxx11_h=no
15632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
15635 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
15637 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
15639 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
15642 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
15645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
15646 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
15647 if ${gl_cv_header_stdint_width+:} false; then :
15648 $as_echo_n "(cached) " >&6
15650 gl_cv_header_stdint_width=no
15651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15652 /* end confdefs.h. */
15654 /* Work if build is not clean. */
15655 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
15656 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15657 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15659 #include <stdint.h>
15661 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15662 included before <wchar.h>. */
15663 #include <stddef.h>
15664 #include <signal.h>
15666 # include <stdio.h>
15668 # include <wchar.h>
15671 int iw = UINTMAX_WIDTH;
15681 if ac_fn_c_try_compile "$LINENO"; then :
15682 gl_cv_header_stdint_width=yes
15684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
15687 $as_echo "$gl_cv_header_stdint_width" >&6; }
15688 if test "$gl_cv_header_stdint_width" = yes; then
15693 for ac_header in sys/inttypes.h sys/bitypes.h
15695 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15696 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15697 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15698 cat >>confdefs.h <<_ACEOF
15699 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15706 if test $ac_cv_header_sys_inttypes_h = yes; then
15707 HAVE_SYS_INTTYPES_H=1
15709 if test $ac_cv_header_sys_bitypes_h = yes; then
15710 HAVE_SYS_BITYPES_H=1
15714 if test $APPLE_UNIVERSAL_BUILD = 0; then
15717 for gltype in ptrdiff_t size_t ; do
15718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15719 $as_echo_n "checking for bit size of $gltype... " >&6; }
15720 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
15721 $as_echo_n "(cached) " >&6
15723 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
15724 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15725 included before <wchar.h>. */
15726 #include <stddef.h>
15727 #include <signal.h>
15729 # include <stdio.h>
15731 # include <wchar.h>
15734 #include <limits.h>"; then :
15740 eval gl_cv_bitsizeof_${gltype}=\$result
15743 eval ac_res=\$gl_cv_bitsizeof_${gltype}
15744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15745 $as_echo "$ac_res" >&6; }
15746 eval result=\$gl_cv_bitsizeof_${gltype}
15747 if test $result = unknown; then
15750 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15751 cat >>confdefs.h <<_ACEOF
15752 #define BITSIZEOF_${GLTYPE} $result
15755 eval BITSIZEOF_${GLTYPE}=\$result
15762 for gltype in sig_atomic_t wchar_t wint_t ; do
15763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15764 $as_echo_n "checking for bit size of $gltype... " >&6; }
15765 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
15766 $as_echo_n "(cached) " >&6
15768 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
15769 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15770 included before <wchar.h>. */
15771 #include <stddef.h>
15772 #include <signal.h>
15774 # include <stdio.h>
15776 # include <wchar.h>
15779 #include <limits.h>"; then :
15785 eval gl_cv_bitsizeof_${gltype}=\$result
15788 eval ac_res=\$gl_cv_bitsizeof_${gltype}
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15790 $as_echo "$ac_res" >&6; }
15791 eval result=\$gl_cv_bitsizeof_${gltype}
15792 if test $result = unknown; then
15795 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15796 cat >>confdefs.h <<_ACEOF
15797 #define BITSIZEOF_${GLTYPE} $result
15800 eval BITSIZEOF_${GLTYPE}=\$result
15806 for gltype in sig_atomic_t wchar_t wint_t ; do
15807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
15808 $as_echo_n "checking whether $gltype is signed... " >&6; }
15809 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
15810 $as_echo_n "(cached) " >&6
15812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15813 /* end confdefs.h. */
15815 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15816 included before <wchar.h>. */
15817 #include <stddef.h>
15818 #include <signal.h>
15820 # include <stdio.h>
15822 # include <wchar.h>
15825 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
15834 if ac_fn_c_try_compile "$LINENO"; then :
15839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15840 eval gl_cv_type_${gltype}_signed=\$result
15843 eval ac_res=\$gl_cv_type_${gltype}_signed
15844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15845 $as_echo "$ac_res" >&6; }
15846 eval result=\$gl_cv_type_${gltype}_signed
15847 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15848 if test "$result" = yes; then
15849 cat >>confdefs.h <<_ACEOF
15850 #define HAVE_SIGNED_${GLTYPE} 1
15853 eval HAVE_SIGNED_${GLTYPE}=1
15855 eval HAVE_SIGNED_${GLTYPE}=0
15860 gl_cv_type_ptrdiff_t_signed=yes
15861 gl_cv_type_size_t_signed=no
15862 if test $APPLE_UNIVERSAL_BUILD = 0; then
15865 for gltype in ptrdiff_t size_t ; do
15866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
15867 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
15868 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
15869 $as_echo_n "(cached) " >&6
15871 eval gl_cv_type_${gltype}_suffix=no
15872 eval result=\$gl_cv_type_${gltype}_signed
15873 if test "$result" = yes; then
15878 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
15880 '') gltype1='int';;
15881 l) gltype1='long int';;
15882 ll) gltype1='long long int';;
15883 i64) gltype1='__int64';;
15884 u) gltype1='unsigned int';;
15885 ul) gltype1='unsigned long int';;
15886 ull) gltype1='unsigned long long int';;
15887 ui64)gltype1='unsigned __int64';;
15889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15890 /* end confdefs.h. */
15892 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15893 included before <wchar.h>. */
15894 #include <stddef.h>
15895 #include <signal.h>
15897 # include <stdio.h>
15899 # include <wchar.h>
15902 extern $gltype foo;
15903 extern $gltype1 foo;
15912 if ac_fn_c_try_compile "$LINENO"; then :
15913 eval gl_cv_type_${gltype}_suffix=\$glsuf
15915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15916 eval result=\$gl_cv_type_${gltype}_suffix
15917 test "$result" != no && break
15920 eval ac_res=\$gl_cv_type_${gltype}_suffix
15921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15922 $as_echo "$ac_res" >&6; }
15923 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15924 eval result=\$gl_cv_type_${gltype}_suffix
15925 test "$result" = no && result=
15926 eval ${GLTYPE}_SUFFIX=\$result
15927 cat >>confdefs.h <<_ACEOF
15928 #define ${GLTYPE}_SUFFIX $result
15937 for gltype in sig_atomic_t wchar_t wint_t ; do
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
15939 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
15940 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
15941 $as_echo_n "(cached) " >&6
15943 eval gl_cv_type_${gltype}_suffix=no
15944 eval result=\$gl_cv_type_${gltype}_signed
15945 if test "$result" = yes; then
15950 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
15952 '') gltype1='int';;
15953 l) gltype1='long int';;
15954 ll) gltype1='long long int';;
15955 i64) gltype1='__int64';;
15956 u) gltype1='unsigned int';;
15957 ul) gltype1='unsigned long int';;
15958 ull) gltype1='unsigned long long int';;
15959 ui64)gltype1='unsigned __int64';;
15961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15962 /* end confdefs.h. */
15964 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15965 included before <wchar.h>. */
15966 #include <stddef.h>
15967 #include <signal.h>
15969 # include <stdio.h>
15971 # include <wchar.h>
15974 extern $gltype foo;
15975 extern $gltype1 foo;
15984 if ac_fn_c_try_compile "$LINENO"; then :
15985 eval gl_cv_type_${gltype}_suffix=\$glsuf
15987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15988 eval result=\$gl_cv_type_${gltype}_suffix
15989 test "$result" != no && break
15992 eval ac_res=\$gl_cv_type_${gltype}_suffix
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15994 $as_echo "$ac_res" >&6; }
15995 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15996 eval result=\$gl_cv_type_${gltype}_suffix
15997 test "$result" = no && result=
15998 eval ${GLTYPE}_SUFFIX=\$result
15999 cat >>confdefs.h <<_ACEOF
16000 #define ${GLTYPE}_SUFFIX $result
16007 if test $GNULIB_OVERRIDES_WINT_T = 1; then
16008 BITSIZEOF_WINT_T=32
16015 if test -n "$LIMITS_H"; then
16016 GL_GENERATE_LIMITS_H_TRUE=
16017 GL_GENERATE_LIMITS_H_FALSE='#'
16019 GL_GENERATE_LIMITS_H_TRUE='#'
16020 GL_GENERATE_LIMITS_H_FALSE=
16028 if test -n "$STDINT_H"; then
16029 GL_GENERATE_STDINT_H_TRUE=
16030 GL_GENERATE_STDINT_H_FALSE='#'
16032 GL_GENERATE_STDINT_H_TRUE='#'
16033 GL_GENERATE_STDINT_H_FALSE=
16042 GNULIB_STRTOIMAX=0;
16043 GNULIB_STRTOUMAX=0;
16044 HAVE_DECL_IMAXABS=1;
16045 HAVE_DECL_IMAXDIV=1;
16046 HAVE_DECL_STRTOIMAX=1;
16047 HAVE_DECL_STRTOUMAX=1;
16048 REPLACE_STRTOIMAX=0;
16049 REPLACE_STRTOUMAX=0;
16050 INT32_MAX_LT_INTMAX_MAX=1;
16051 INT64_MAX_EQ_LONG_MAX='defined _LP64';
16052 PRI_MACROS_BROKEN=0;
16053 PRIPTR_PREFIX=__PRIPTR_PREFIX;
16054 UINT32_MAX_LT_UINTMAX_MAX=1;
16055 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
16071 if test $gl_cv_have_include_next = yes; then
16072 gl_cv_next_inttypes_h='<'inttypes.h'>'
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
16075 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
16076 if ${gl_cv_next_inttypes_h+:} false; then :
16077 $as_echo_n "(cached) " >&6
16080 if test $ac_cv_header_inttypes_h = yes; then
16085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16086 /* end confdefs.h. */
16087 #include <inttypes.h>
16090 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16091 *) gl_absname_cpp="$ac_cpp" ;;
16096 gl_dirsep_regex='[/\\]'
16099 gl_dirsep_regex='\/'
16102 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16103 gl_header_literal_regex=`echo 'inttypes.h' \
16104 | sed -e "$gl_make_literal_regex_sed"`
16105 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16106 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16112 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16113 sed -n "$gl_absolute_header_sed"`
16115 gl_header=$gl_cv_absolute_inttypes_h
16116 gl_cv_next_inttypes_h='"'$gl_header'"'
16118 gl_cv_next_inttypes_h='<'inttypes.h'>'
16123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
16124 $as_echo "$gl_cv_next_inttypes_h" >&6; }
16126 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
16128 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16129 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16130 gl_next_as_first_directive='<'inttypes.h'>'
16132 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16133 gl_next_as_first_directive=$gl_cv_next_inttypes_h
16135 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
16144 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
16145 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16147 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16148 if eval \${$as_gl_Symbol+:} false; then :
16149 $as_echo_n "(cached) " >&6
16151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16152 /* end confdefs.h. */
16153 #include <inttypes.h>
16164 if ac_fn_c_try_compile "$LINENO"; then :
16165 eval "$as_gl_Symbol=yes"
16167 eval "$as_gl_Symbol=no"
16169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16171 eval ac_res=\$$as_gl_Symbol
16172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16173 $as_echo "$ac_res" >&6; }
16174 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16175 cat >>confdefs.h <<_ACEOF
16176 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16179 eval ac_cv_have_decl_$gl_func=yes
16185 for ac_header in inttypes.h
16187 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
16188 if test "x$ac_cv_header_inttypes_h" = xyes; then :
16189 cat >>confdefs.h <<_ACEOF
16190 #define HAVE_INTTYPES_H 1
16197 if test $ac_cv_header_inttypes_h = yes; then
16198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
16199 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
16200 if ${gt_cv_inttypes_pri_broken+:} false; then :
16201 $as_echo_n "(cached) " >&6
16204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16205 /* end confdefs.h. */
16207 #include <inttypes.h>
16220 if ac_fn_c_try_compile "$LINENO"; then :
16221 gt_cv_inttypes_pri_broken=no
16223 gt_cv_inttypes_pri_broken=yes
16225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
16229 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
16231 if test "$gt_cv_inttypes_pri_broken" = yes; then
16233 cat >>confdefs.h <<_ACEOF
16234 #define PRI_MACROS_BROKEN 1
16237 PRI_MACROS_BROKEN=1
16239 PRI_MACROS_BROKEN=0
16244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
16245 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
16246 if ${gl_cv_cc_float_expbit0+:} false; then :
16247 $as_echo_n "(cached) " >&6
16250 if test "$cross_compiling" = yes; then :
16251 gl_cv_cc_float_expbit0="word 0 bit 23"
16253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16254 /* end confdefs.h. */
16257 #include <stddef.h>
16259 #include <string.h>
16261 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16262 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
16263 static unsigned int ored_words[NWORDS];
16264 static unsigned int anded_words[NWORDS];
16265 static void add_to_ored_words (float x)
16269 /* Clear it first, in case
16270 sizeof (float) < sizeof (memory_float). */
16271 memset (&m, 0, sizeof (memory_float));
16273 for (i = 0; i < NWORDS; i++)
16275 ored_words[i] |= m.word[i];
16276 anded_words[i] &= m.word[i];
16282 FILE *fp = fopen ("conftest.out", "w");
16285 for (j = 0; j < NWORDS; j++)
16286 anded_words[j] = ~ (unsigned int) 0;
16287 add_to_ored_words (0.25f);
16288 add_to_ored_words (0.5f);
16289 add_to_ored_words (1.0f);
16290 add_to_ored_words (2.0f);
16291 add_to_ored_words (4.0f);
16292 /* Remove bits that are common (e.g. if representation of the first mantissa
16293 bit is explicit). */
16294 for (j = 0; j < NWORDS; j++)
16295 ored_words[j] &= ~anded_words[j];
16296 /* Now find the nonzero word. */
16297 for (j = 0; j < NWORDS; j++)
16298 if (ored_words[j] != 0)
16303 for (i = j + 1; i < NWORDS; i++)
16304 if (ored_words[i] != 0)
16306 fprintf (fp, "unknown");
16307 return (fclose (fp) != 0);
16310 if ((ored_words[j] >> i) & 1)
16312 fprintf (fp, "word %d bit %d", (int) j, (int) i);
16313 return (fclose (fp) != 0);
16316 fprintf (fp, "unknown");
16317 return (fclose (fp) != 0);
16321 if ac_fn_c_try_run "$LINENO"; then :
16322 gl_cv_cc_float_expbit0=`cat conftest.out`
16324 gl_cv_cc_float_expbit0="unknown"
16326 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16327 conftest.$ac_objext conftest.beam conftest.$ac_ext
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
16334 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
16335 case "$gl_cv_cc_float_expbit0" in
16337 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16338 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
16340 cat >>confdefs.h <<_ACEOF
16341 #define FLT_EXPBIT0_WORD $word
16345 cat >>confdefs.h <<_ACEOF
16346 #define FLT_EXPBIT0_BIT $bit
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
16357 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
16358 if ${gl_cv_func_isnanf_no_libm+:} false; then :
16359 $as_echo_n "(cached) " >&6
16362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16363 /* end confdefs.h. */
16367 # define isnanf(x) __builtin_isnanf ((float)(x))
16368 #elif defined isnan
16370 # define isnanf(x) isnan ((float)(x))
16381 if ac_fn_c_try_link "$LINENO"; then :
16382 gl_cv_func_isnanf_no_libm=yes
16384 gl_cv_func_isnanf_no_libm=no
16386 rm -f core conftest.err conftest.$ac_objext \
16387 conftest$ac_exeext conftest.$ac_ext
16390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
16391 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
16393 if test $gl_cv_func_isnanf_no_libm = no; then
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used with libm" >&5
16396 $as_echo_n "checking whether isnan(float) can be used with libm... " >&6; }
16397 if ${gl_cv_func_isnanf_in_libm+:} false; then :
16398 $as_echo_n "(cached) " >&6
16403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16404 /* end confdefs.h. */
16408 # define isnanf(x) __builtin_isnanf ((float)(x))
16409 #elif defined isnan
16411 # define isnanf(x) isnan ((float)(x))
16422 if ac_fn_c_try_link "$LINENO"; then :
16423 gl_cv_func_isnanf_in_libm=yes
16425 gl_cv_func_isnanf_in_libm=no
16427 rm -f core conftest.err conftest.$ac_objext \
16428 conftest$ac_exeext conftest.$ac_ext
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_in_libm" >&5
16433 $as_echo "$gl_cv_func_isnanf_in_libm" >&6; }
16435 if test $gl_cv_func_isnanf_in_libm = yes; then
16439 if test $gl_cv_func_isnanf_no_libm = yes \
16440 || test $gl_cv_func_isnanf_in_libm = yes; then
16442 LIBS="$LIBS $ISNANF_LIBM"
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
16447 $as_echo_n "checking whether isnan(float) works... " >&6; }
16448 if ${gl_cv_func_isnanf_works+:} false; then :
16449 $as_echo_n "(cached) " >&6
16452 if test "$cross_compiling" = yes; then :
16454 irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
16455 mingw*) # Guess yes on mingw, no on MSVC.
16456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16457 /* end confdefs.h. */
16464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16465 $EGREP "Known" >/dev/null 2>&1; then :
16466 gl_cv_func_isnanf_works="guessing yes"
16468 gl_cv_func_isnanf_works="guessing no"
16473 *) gl_cv_func_isnanf_works="guessing yes" ;;
16477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16478 /* end confdefs.h. */
16483 # define isnanf(x) __builtin_isnanf ((float)(x))
16484 #elif defined isnan
16486 # define isnanf(x) isnan ((float)(x))
16488 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
16493 static float zero = 0.0f;
16494 return zero / zero;
16497 # define NaN() (0.0f / 0.0f)
16500 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16501 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
16506 if (isnanf (1.0f / 0.0f))
16509 if (!isnanf (NaN ()))
16512 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
16513 /* The isnanf function should be immune against changes in the sign bit and
16514 in the mantissa bits. The xor operation twiddles a bit that can only be
16515 a sign bit or a mantissa bit. */
16516 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
16521 /* Set the bits below the exponent to 01111...111. */
16522 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
16523 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
16524 if (!isnanf (m.value))
16532 if ac_fn_c_try_run "$LINENO"; then :
16533 gl_cv_func_isnanf_works=yes
16535 gl_cv_func_isnanf_works=no
16537 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16538 conftest.$ac_objext conftest.beam conftest.$ac_ext
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
16544 $as_echo "$gl_cv_func_isnanf_works" >&6; }
16547 case "$gl_cv_func_isnanf_works" in
16548 *yes) gl_func_isnanf=yes ;;
16549 *) gl_func_isnanf=no; ISNANF_LIBM= ;;
16554 if test $gl_func_isnanf != yes; then
16563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
16564 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
16565 if ${gl_cv_func_isnand_no_libm+:} false; then :
16566 $as_echo_n "(cached) " >&6
16569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16570 /* end confdefs.h. */
16574 # define isnand(x) __builtin_isnan ((double)(x))
16577 # define isnand(x) isnan ((double)(x))
16588 if ac_fn_c_try_link "$LINENO"; then :
16589 gl_cv_func_isnand_no_libm=yes
16591 gl_cv_func_isnand_no_libm=no
16593 rm -f core conftest.err conftest.$ac_objext \
16594 conftest$ac_exeext conftest.$ac_ext
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
16598 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
16600 if test $gl_cv_func_isnand_no_libm = no; then
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used with libm" >&5
16603 $as_echo_n "checking whether isnan(double) can be used with libm... " >&6; }
16604 if ${gl_cv_func_isnand_in_libm+:} false; then :
16605 $as_echo_n "(cached) " >&6
16610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16611 /* end confdefs.h. */
16615 # define isnand(x) __builtin_isnan ((double)(x))
16616 #elif defined isnan
16618 # define isnand(x) isnan ((double)(x))
16629 if ac_fn_c_try_link "$LINENO"; then :
16630 gl_cv_func_isnand_in_libm=yes
16632 gl_cv_func_isnand_in_libm=no
16634 rm -f core conftest.err conftest.$ac_objext \
16635 conftest$ac_exeext conftest.$ac_ext
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_in_libm" >&5
16640 $as_echo "$gl_cv_func_isnand_in_libm" >&6; }
16642 if test $gl_cv_func_isnand_in_libm = yes; then
16646 if test $gl_cv_func_isnand_no_libm = yes \
16647 || test $gl_cv_func_isnand_in_libm = yes; then
16659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
16660 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
16661 if ${gl_cv_func_isnanl_no_libm+:} false; then :
16662 $as_echo_n "(cached) " >&6
16665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16666 /* end confdefs.h. */
16670 # define isnanl(x) __builtin_isnanl ((long double)(x))
16671 #elif defined isnan
16673 # define isnanl(x) isnan ((long double)(x))
16684 if ac_fn_c_try_link "$LINENO"; then :
16685 gl_cv_func_isnanl_no_libm=yes
16687 gl_cv_func_isnanl_no_libm=no
16689 rm -f core conftest.err conftest.$ac_objext \
16690 conftest$ac_exeext conftest.$ac_ext
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
16694 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
16696 if test $gl_cv_func_isnanl_no_libm = no; then
16698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used with libm" >&5
16699 $as_echo_n "checking whether isnan(long double) can be used with libm... " >&6; }
16700 if ${gl_cv_func_isnanl_in_libm+:} false; then :
16701 $as_echo_n "(cached) " >&6
16706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16707 /* end confdefs.h. */
16711 # define isnanl(x) __builtin_isnanl ((long double)(x))
16712 #elif defined isnan
16714 # define isnanl(x) isnan ((long double)(x))
16725 if ac_fn_c_try_link "$LINENO"; then :
16726 gl_cv_func_isnanl_in_libm=yes
16728 gl_cv_func_isnanl_in_libm=no
16730 rm -f core conftest.err conftest.$ac_objext \
16731 conftest$ac_exeext conftest.$ac_ext
16735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_in_libm" >&5
16736 $as_echo "$gl_cv_func_isnanl_in_libm" >&6; }
16738 if test $gl_cv_func_isnanl_in_libm = yes; then
16742 if test $gl_cv_func_isnanl_no_libm = yes \
16743 || test $gl_cv_func_isnanl_in_libm = yes; then
16745 LIBS="$LIBS $ISNANL_LIBM"
16750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
16751 $as_echo_n "checking whether isnanl works... " >&6; }
16752 if ${gl_cv_func_isnanl_works+:} false; then :
16753 $as_echo_n "(cached) " >&6
16756 if test "$cross_compiling" = yes; then :
16758 mingw*) # Guess yes on mingw, no on MSVC.
16759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16760 /* end confdefs.h. */
16767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16768 $EGREP "Known" >/dev/null 2>&1; then :
16769 gl_cv_func_isnanl_works="guessing yes"
16771 gl_cv_func_isnanl_works="guessing no"
16776 *) gl_cv_func_isnanl_works="guessing yes" ;;
16780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16781 /* end confdefs.h. */
16784 #include <limits.h>
16788 # define isnanl(x) __builtin_isnanl ((long double)(x))
16789 #elif defined isnan
16791 # define isnanl(x) isnan ((long double)(x))
16794 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16795 typedef union { unsigned int word[NWORDS]; long double value; }
16796 memory_long_double;
16797 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
16798 runtime type conversion. */
16800 static long double NaNl ()
16803 return zero / zero;
16806 # define NaNl() (0.0L / 0.0L)
16812 if (!isnanl (NaNl ()))
16816 memory_long_double m;
16819 /* The isnanl function should be immune against changes in the sign bit and
16820 in the mantissa bits. The xor operation twiddles a bit that can only be
16821 a sign bit or a mantissa bit (since the exponent never extends to
16824 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
16825 for (i = 0; i < NWORDS; i++)
16827 if (!isnanl (m.value))
16831 #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
16832 /* Representation of an 80-bit 'long double' as an initializer for a sequence
16833 of 'unsigned int' words. */
16834 # ifdef WORDS_BIGENDIAN
16835 # define LDBL80_WORDS(exponent,manthi,mantlo) \
16836 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
16837 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
16838 (unsigned int) (mantlo) << 16 \
16841 # define LDBL80_WORDS(exponent,manthi,mantlo) \
16842 { mantlo, manthi, exponent }
16845 static memory_long_double x =
16846 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
16847 if (!isnanl (x.value))
16851 /* Signalling NaN. */
16852 static memory_long_double x =
16853 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
16854 if (!isnanl (x.value))
16857 /* isnanl should return something even for noncanonical values. */
16858 { /* Pseudo-NaN. */
16859 static memory_long_double x =
16860 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
16861 if (isnanl (x.value) && !isnanl (x.value))
16864 { /* Pseudo-Infinity. */
16865 static memory_long_double x =
16866 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
16867 if (isnanl (x.value) && !isnanl (x.value))
16870 { /* Pseudo-Zero. */
16871 static memory_long_double x =
16872 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
16873 if (isnanl (x.value) && !isnanl (x.value))
16876 { /* Unnormalized number. */
16877 static memory_long_double x =
16878 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
16879 if (isnanl (x.value) && !isnanl (x.value))
16882 { /* Pseudo-Denormal. */
16883 static memory_long_double x =
16884 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
16885 if (isnanl (x.value) && !isnanl (x.value))
16893 if ac_fn_c_try_run "$LINENO"; then :
16894 gl_cv_func_isnanl_works=yes
16896 gl_cv_func_isnanl_works=no
16898 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16899 conftest.$ac_objext conftest.beam conftest.$ac_ext
16904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
16905 $as_echo "$gl_cv_func_isnanl_works" >&6; }
16908 case "$gl_cv_func_isnanl_works" in
16909 *yes) gl_func_isnanl=yes ;;
16910 *) gl_func_isnanl=no; ISNANL_LIBM= ;;
16915 if test $gl_func_isnanl != yes; then
16921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
16922 $as_echo_n "checking whether ldexp() can be used without linking with libm... " >&6; }
16923 if ${gl_cv_func_ldexp_no_libm+:} false; then :
16924 $as_echo_n "(cached) " >&6
16927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16928 /* end confdefs.h. */
16929 #ifndef __NO_MATH_INLINES
16930 # define __NO_MATH_INLINES 1 /* for glibc */
16933 double (*funcptr) (double, int) = ldexp;
16938 return ldexp (x, -1) > 0;
16943 if ac_fn_c_try_link "$LINENO"; then :
16944 gl_cv_func_ldexp_no_libm=yes
16946 gl_cv_func_ldexp_no_libm=no
16948 rm -f core conftest.err conftest.$ac_objext \
16949 conftest$ac_exeext conftest.$ac_ext
16952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
16953 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
16956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16957 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16958 if ${am_cv_langinfo_codeset+:} false; then :
16959 $as_echo_n "(cached) " >&6
16961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16962 /* end confdefs.h. */
16963 #include <langinfo.h>
16967 char* cs = nl_langinfo(CODESET); return !cs;
16972 if ac_fn_c_try_link "$LINENO"; then :
16973 am_cv_langinfo_codeset=yes
16975 am_cv_langinfo_codeset=no
16977 rm -f core conftest.err conftest.$ac_objext \
16978 conftest$ac_exeext conftest.$ac_ext
16981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
16982 $as_echo "$am_cv_langinfo_codeset" >&6; }
16983 if test $am_cv_langinfo_codeset = yes; then
16985 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
16989 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
16990 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
16996 cat >>confdefs.h <<_ACEOF
16997 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
17002 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
17003 if ${ac_cv_gnu_library_2_1+:} false; then :
17004 $as_echo_n "(cached) " >&6
17006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17007 /* end confdefs.h. */
17009 #include <features.h>
17010 #ifdef __GNU_LIBRARY__
17011 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
17020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17021 $EGREP "Lucky" >/dev/null 2>&1; then :
17022 ac_cv_gnu_library_2_1=yes
17024 ac_cv_gnu_library_2_1=no
17031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
17032 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
17034 GLIBC21="$ac_cv_gnu_library_2_1"
17038 if test "X$prefix" = "XNONE"; then
17039 acl_final_prefix="$ac_default_prefix"
17041 acl_final_prefix="$prefix"
17043 if test "X$exec_prefix" = "XNONE"; then
17044 acl_final_exec_prefix='${prefix}'
17046 acl_final_exec_prefix="$exec_prefix"
17048 acl_save_prefix="$prefix"
17049 prefix="$acl_final_prefix"
17050 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
17051 prefix="$acl_save_prefix"
17055 # Check whether --with-gnu-ld was given.
17056 if test "${with_gnu_ld+set}" = set; then :
17057 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
17062 # Prepare PATH_SEPARATOR.
17063 # The user is always right.
17064 if test "${PATH_SEPARATOR+set}" != set; then
17065 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
17066 # contains only /bin. Note that ksh looks also at the FPATH variable,
17067 # so we have to set that as well for the test.
17069 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17070 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17071 || PATH_SEPARATOR=';'
17075 if test -n "$LD"; then
17076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
17077 $as_echo_n "checking for ld... " >&6; }
17078 elif test "$GCC" = yes; then
17079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17080 $as_echo_n "checking for ld used by $CC... " >&6; }
17081 elif test "$with_gnu_ld" = yes; then
17082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17083 $as_echo_n "checking for GNU ld... " >&6; }
17085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17086 $as_echo_n "checking for non-GNU ld... " >&6; }
17088 if test -n "$LD"; then
17089 # Let the user override the test with a path.
17092 if ${acl_cv_path_LD+:} false; then :
17093 $as_echo_n "(cached) " >&6
17096 acl_cv_path_LD= # Final result of this test
17097 ac_prog=ld # Program to search in $PATH
17098 if test "$GCC" = yes; then
17099 # Check if gcc -print-prog-name=ld gives a path.
17102 # gcc leaves a trailing carriage return which upsets mingw
17103 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17105 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
17107 case $acl_output in
17108 # Accept absolute paths.
17110 re_direlt='/[^/][^/]*/\.\./'
17111 # Canonicalize the pathname of ld
17112 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
17113 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
17114 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
17116 # Got the pathname. No search in PATH is needed.
17117 acl_cv_path_LD="$acl_output"
17121 # If it fails, then pretend we aren't using GCC.
17124 # If it is relative, then search for the first ld in PATH.
17125 with_gnu_ld=unknown
17129 if test -n "$ac_prog"; then
17130 # Search for $ac_prog in $PATH.
17131 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
17132 for ac_dir in $PATH; do
17133 IFS="$acl_save_ifs"
17134 test -z "$ac_dir" && ac_dir=.
17135 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17136 acl_cv_path_LD="$ac_dir/$ac_prog"
17137 # Check to see if the program is GNU ld. I'd rather use --version,
17138 # but apparently some variants of GNU ld only accept -v.
17139 # Break only if it was the GNU/non-GNU ld that we prefer.
17140 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
17141 *GNU* | *'with BFD'*)
17142 test "$with_gnu_ld" != no && break
17145 test "$with_gnu_ld" != yes && break
17150 IFS="$acl_save_ifs"
17154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17155 /* end confdefs.h. */
17156 #if defined __powerpc64__ || defined _ARCH_PPC64
17163 if ac_fn_c_try_compile "$LINENO"; then :
17164 # The compiler produces 64-bit code. Add option '-b64' so that the
17165 # linker groks 64-bit object files.
17166 case "$acl_cv_path_LD " in
17168 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
17172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17176 /* end confdefs.h. */
17177 #if defined __sparcv9 || defined __arch64__
17184 if ac_fn_c_try_compile "$LINENO"; then :
17187 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
17188 # so that the linker groks 32-bit object files.
17189 case "$acl_cv_path_LD " in
17190 *" -m elf32_sparc "*) ;;
17191 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
17195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17201 LD="$acl_cv_path_LD"
17203 if test -n "$LD"; then
17204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17205 $as_echo "$LD" >&6; }
17207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17208 $as_echo "no" >&6; }
17209 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17212 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
17213 if ${acl_cv_prog_gnu_ld+:} false; then :
17214 $as_echo_n "(cached) " >&6
17216 # I'd rather use --version here, but apparently some GNU lds only accept -v.
17217 case `$LD -v 2>&1 </dev/null` in
17218 *GNU* | *'with BFD'*)
17219 acl_cv_prog_gnu_ld=yes
17222 acl_cv_prog_gnu_ld=no
17226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
17227 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
17228 with_gnu_ld=$acl_cv_prog_gnu_ld
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
17234 $as_echo_n "checking for shared library run path origin... " >&6; }
17235 if ${acl_cv_rpath+:} false; then :
17236 $as_echo_n "(cached) " >&6
17239 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
17240 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
17242 rm -f ./conftest.sh
17246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
17247 $as_echo "$acl_cv_rpath" >&6; }
17249 acl_libext="$acl_cv_libext"
17250 acl_shlibext="$acl_cv_shlibext"
17251 acl_libname_spec="$acl_cv_libname_spec"
17252 acl_library_names_spec="$acl_cv_library_names_spec"
17253 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
17254 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
17255 acl_hardcode_direct="$acl_cv_hardcode_direct"
17256 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
17257 # Check whether --enable-rpath was given.
17258 if test "${enable_rpath+set}" = set; then :
17259 enableval=$enable_rpath; :
17268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
17269 $as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; }
17270 if ${acl_cv_libdirstems+:} false; then :
17271 $as_echo_n "(cached) " >&6
17277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
17278 $as_echo_n "checking for 64-bit host... " >&6; }
17279 if ${gl_cv_solaris_64bit+:} false; then :
17280 $as_echo_n "(cached) " >&6
17282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17283 /* end confdefs.h. */
17291 if ac_fn_c_try_compile "$LINENO"; then :
17292 gl_cv_solaris_64bit=yes
17294 gl_cv_solaris_64bit=no
17296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
17300 $as_echo "$gl_cv_solaris_64bit" >&6; }
17301 if test $gl_cv_solaris_64bit = yes; then
17302 acl_libdirstem=lib/64
17303 case "$host_cpu" in
17304 sparc*) acl_libdirstem2=lib/sparcv9 ;;
17305 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
17310 case "$gl_cv_host_cpu_c_abi" in
17311 i386 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | s390 | sparc)
17313 *) # x86_64 | arm64 | hppa64 | ia64 | mips64 | powerpc64* | s390x | sparc64 | ...
17314 searchpath=`(if test -f /usr/bin/gcc \
17315 && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
17316 LC_ALL=C /usr/bin/gcc -print-search-dirs; \
17318 LC_ALL=C $CC -print-search-dirs; \
17320 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
17321 if test -n "$searchpath"; then
17322 acl_save_IFS="${IFS= }"; IFS=":"
17323 for searchdir in $searchpath; do
17324 if test -d "$searchdir"; then
17325 case "$searchdir" in
17326 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
17328 # Better ignore directories of this form. They are misleading.
17330 *) searchdir=`cd "$searchdir" && pwd`
17331 case "$searchdir" in
17332 */lib64 ) acl_libdirstem=lib64 ;;
17337 IFS="$acl_save_IFS"
17343 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
17344 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
17347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
17348 $as_echo "$acl_cv_libdirstems" >&6; }
17349 # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
17350 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
17351 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
17355 gl_threads_api=none
17360 if test "$gl_use_threads" != no; then
17361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
17362 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
17363 if ${gl_cv_have_weak+:} false; then :
17364 $as_echo_n "(cached) " >&6
17367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17368 /* end confdefs.h. */
17369 extern void xyzzy ();
17379 if ac_fn_c_try_link "$LINENO"; then :
17380 gl_cv_have_weak=maybe
17382 rm -f core conftest.err conftest.$ac_objext \
17383 conftest$ac_exeext conftest.$ac_ext
17384 if test $gl_cv_have_weak = maybe; then
17385 if test "$cross_compiling" = yes; then :
17386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17387 /* end confdefs.h. */
17389 Extensible Linking Format
17393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17394 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
17395 gl_cv_have_weak="guessing yes"
17397 gl_cv_have_weak="guessing no"
17403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17404 /* end confdefs.h. */
17410 return (fputs == NULL);
17413 if ac_fn_c_try_run "$LINENO"; then :
17414 gl_cv_have_weak=yes
17418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17419 conftest.$ac_objext conftest.beam conftest.$ac_ext
17423 case " $LDFLAGS " in
17424 *" -static "*) gl_cv_have_weak=no ;;
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
17429 $as_echo "$gl_cv_have_weak" >&6; }
17430 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
17431 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
17432 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
17433 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
17434 if test "x$ac_cv_header_pthread_h" = xyes; then :
17435 gl_have_pthread_h=yes
17437 gl_have_pthread_h=no
17441 if test "$gl_have_pthread_h" = yes; then
17442 # Other possible tests:
17443 # -lpthreads (FSU threads, PCthreads)
17446 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
17447 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
17448 # the second one only in libpthread, and lock.c needs it.
17450 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
17451 # needs -pthread for some reason. See:
17452 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
17454 for gl_pthread in '' '-pthread'; do
17455 LIBS="$LIBS $gl_pthread"
17456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17457 /* end confdefs.h. */
17458 #include <pthread.h>
17460 pthread_mutexattr_t ma;
17465 pthread_mutex_lock (&m);
17466 pthread_mutexattr_init (&ma);
17471 if ac_fn_c_try_link "$LINENO"; then :
17472 gl_have_pthread=yes
17473 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
17474 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
17476 rm -f core conftest.err conftest.$ac_objext \
17477 conftest$ac_exeext conftest.$ac_ext
17479 test -n "$gl_have_pthread" && break
17482 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
17483 # since it is defined as a macro on OSF/1.)
17484 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
17485 # The program links fine without libpthread. But it may actually
17486 # need to link with libpthread in order to create multiple threads.
17487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
17488 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
17489 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
17490 $as_echo_n "(cached) " >&6
17492 ac_check_lib_save_LIBS=$LIBS
17493 LIBS="-lpthread $LIBS"
17494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17495 /* end confdefs.h. */
17497 /* Override any GCC internal prototype to avoid an error.
17498 Use char because int might match the return type of a GCC
17499 builtin and then its argument prototype would still apply. */
17503 char pthread_kill ();
17507 return pthread_kill ();
17512 if ac_fn_c_try_link "$LINENO"; then :
17513 ac_cv_lib_pthread_pthread_kill=yes
17515 ac_cv_lib_pthread_pthread_kill=no
17517 rm -f core conftest.err conftest.$ac_objext \
17518 conftest$ac_exeext conftest.$ac_ext
17519 LIBS=$ac_check_lib_save_LIBS
17521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
17522 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
17523 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
17524 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
17525 # On Solaris and HP-UX, most pthread functions exist also in libc.
17526 # Therefore pthread_in_use() needs to actually try to create a
17527 # thread: pthread_create from libc will fail, whereas
17528 # pthread_create will actually create a thread.
17529 # On Solaris 10 or newer, this test is no longer needed, because
17530 # libc contains the fully functional pthread functions.
17532 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
17534 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
17540 elif test -z "$gl_have_pthread"; then
17541 # Some library is needed. Try libpthread and libc_r.
17542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
17543 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
17544 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
17545 $as_echo_n "(cached) " >&6
17547 ac_check_lib_save_LIBS=$LIBS
17548 LIBS="-lpthread $LIBS"
17549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17550 /* end confdefs.h. */
17552 /* Override any GCC internal prototype to avoid an error.
17553 Use char because int might match the return type of a GCC
17554 builtin and then its argument prototype would still apply. */
17558 char pthread_kill ();
17562 return pthread_kill ();
17567 if ac_fn_c_try_link "$LINENO"; then :
17568 ac_cv_lib_pthread_pthread_kill=yes
17570 ac_cv_lib_pthread_pthread_kill=no
17572 rm -f core conftest.err conftest.$ac_objext \
17573 conftest$ac_exeext conftest.$ac_ext
17574 LIBS=$ac_check_lib_save_LIBS
17576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
17577 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
17578 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
17579 gl_have_pthread=yes
17580 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
17581 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
17584 if test -z "$gl_have_pthread"; then
17586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
17587 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
17588 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
17589 $as_echo_n "(cached) " >&6
17591 ac_check_lib_save_LIBS=$LIBS
17593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17594 /* end confdefs.h. */
17596 /* Override any GCC internal prototype to avoid an error.
17597 Use char because int might match the return type of a GCC
17598 builtin and then its argument prototype would still apply. */
17602 char pthread_kill ();
17606 return pthread_kill ();
17611 if ac_fn_c_try_link "$LINENO"; then :
17612 ac_cv_lib_c_r_pthread_kill=yes
17614 ac_cv_lib_c_r_pthread_kill=no
17616 rm -f core conftest.err conftest.$ac_objext \
17617 conftest$ac_exeext conftest.$ac_ext
17618 LIBS=$ac_check_lib_save_LIBS
17620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
17621 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
17622 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
17623 gl_have_pthread=yes
17624 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
17625 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
17630 if test -n "$gl_have_pthread"; then
17631 gl_threads_api=posix
17633 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
17635 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
17636 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17638 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
17647 if test -z "$gl_have_pthread"; then
17648 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
17649 gl_have_solaristhread=
17650 gl_save_LIBS="$LIBS"
17651 LIBS="$LIBS -lthread"
17652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17653 /* end confdefs.h. */
17655 #include <thread.h>
17666 if ac_fn_c_try_link "$LINENO"; then :
17667 gl_have_solaristhread=yes
17669 rm -f core conftest.err conftest.$ac_objext \
17670 conftest$ac_exeext conftest.$ac_ext
17671 LIBS="$gl_save_LIBS"
17672 if test -n "$gl_have_solaristhread"; then
17673 gl_threads_api=solaris
17675 LTLIBTHREAD=-lthread
17676 LIBMULTITHREAD="$LIBTHREAD"
17677 LTLIBMULTITHREAD="$LTLIBTHREAD"
17679 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
17681 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17683 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
17691 if test "$gl_use_threads" = pth; then
17692 gl_save_CPPFLAGS="$CPPFLAGS"
17698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
17699 $as_echo_n "checking how to link with libpth... " >&6; }
17700 if ${ac_cv_libpth_libs+:} false; then :
17701 $as_echo_n "(cached) " >&6
17713 acl_save_prefix="$prefix"
17714 prefix="$acl_final_prefix"
17715 acl_save_exec_prefix="$exec_prefix"
17716 exec_prefix="$acl_final_exec_prefix"
17718 eval additional_includedir=\"$includedir\"
17719 eval additional_libdir=\"$libdir\"
17721 exec_prefix="$acl_save_exec_prefix"
17722 prefix="$acl_save_prefix"
17725 # Check whether --with-libpth-prefix was given.
17726 if test "${with_libpth_prefix+set}" = set; then :
17727 withval=$with_libpth_prefix;
17728 if test "X$withval" = "Xno"; then
17731 if test "X$withval" = "X"; then
17733 acl_save_prefix="$prefix"
17734 prefix="$acl_final_prefix"
17735 acl_save_exec_prefix="$exec_prefix"
17736 exec_prefix="$acl_final_exec_prefix"
17738 eval additional_includedir=\"$includedir\"
17739 eval additional_libdir=\"$libdir\"
17741 exec_prefix="$acl_save_exec_prefix"
17742 prefix="$acl_save_prefix"
17745 additional_includedir="$withval/include"
17746 additional_libdir="$withval/$acl_libdirstem"
17747 if test "$acl_libdirstem2" != "$acl_libdirstem" \
17748 && test ! -d "$withval/$acl_libdirstem"; then
17749 additional_libdir="$withval/$acl_libdirstem2"
17763 names_already_handled=
17764 names_next_round='pth '
17765 while test -n "$names_next_round"; do
17766 names_this_round="$names_next_round"
17768 for name in $names_this_round; do
17770 for n in $names_already_handled; do
17771 if test "$n" = "$name"; then
17772 already_handled=yes
17776 if test -z "$already_handled"; then
17777 names_already_handled="$names_already_handled $name"
17778 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
17779 eval value=\"\$HAVE_LIB$uppername\"
17780 if test -n "$value"; then
17781 if test "$value" = yes; then
17782 eval value=\"\$LIB$uppername\"
17783 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
17784 eval value=\"\$LTLIB$uppername\"
17785 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
17794 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
17795 if test -n "$acl_shlibext"; then
17796 shrext=".$acl_shlibext" # typically: shrext=.so
17800 if test $use_additional = yes; then
17801 dir="$additional_libdir"
17802 if test -n "$acl_shlibext"; then
17803 if test -f "$dir/$libname$shrext"; then
17805 found_so="$dir/$libname$shrext"
17807 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17808 ver=`(cd "$dir" && \
17809 for f in "$libname$shrext".*; do echo "$f"; done \
17810 | sed -e "s,^$libname$shrext\\\\.,," \
17811 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17812 | sed 1q ) 2>/dev/null`
17813 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
17815 found_so="$dir/$libname$shrext.$ver"
17818 eval library_names=\"$acl_library_names_spec\"
17819 for f in $library_names; do
17820 if test -f "$dir/$f"; then
17829 if test "X$found_dir" = "X"; then
17830 if test -f "$dir/$libname.$acl_libext"; then
17832 found_a="$dir/$libname.$acl_libext"
17835 if test "X$found_dir" != "X"; then
17836 if test -f "$dir/$libname.la"; then
17837 found_la="$dir/$libname.la"
17841 if test "X$found_dir" = "X"; then
17842 for x in $LDFLAGS $LTLIBPTH; do
17844 acl_save_prefix="$prefix"
17845 prefix="$acl_final_prefix"
17846 acl_save_exec_prefix="$exec_prefix"
17847 exec_prefix="$acl_final_exec_prefix"
17849 exec_prefix="$acl_save_exec_prefix"
17850 prefix="$acl_save_prefix"
17854 dir=`echo "X$x" | sed -e 's/^X-L//'`
17855 if test -n "$acl_shlibext"; then
17856 if test -f "$dir/$libname$shrext"; then
17858 found_so="$dir/$libname$shrext"
17860 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17861 ver=`(cd "$dir" && \
17862 for f in "$libname$shrext".*; do echo "$f"; done \
17863 | sed -e "s,^$libname$shrext\\\\.,," \
17864 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17865 | sed 1q ) 2>/dev/null`
17866 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
17868 found_so="$dir/$libname$shrext.$ver"
17871 eval library_names=\"$acl_library_names_spec\"
17872 for f in $library_names; do
17873 if test -f "$dir/$f"; then
17882 if test "X$found_dir" = "X"; then
17883 if test -f "$dir/$libname.$acl_libext"; then
17885 found_a="$dir/$libname.$acl_libext"
17888 if test "X$found_dir" != "X"; then
17889 if test -f "$dir/$libname.la"; then
17890 found_la="$dir/$libname.la"
17895 if test "X$found_dir" != "X"; then
17900 if test "X$found_dir" != "X"; then
17901 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
17902 if test "X$found_so" != "X"; then
17903 if test "$enable_rpath" = no \
17904 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
17905 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
17906 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
17909 for x in $ltrpathdirs; do
17910 if test "X$x" = "X$found_dir"; then
17915 if test -z "$haveit"; then
17916 ltrpathdirs="$ltrpathdirs $found_dir"
17918 if test "$acl_hardcode_direct" = yes; then
17919 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
17921 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
17922 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
17924 for x in $rpathdirs; do
17925 if test "X$x" = "X$found_dir"; then
17930 if test -z "$haveit"; then
17931 rpathdirs="$rpathdirs $found_dir"
17935 for x in $LDFLAGS $LIBPTH; do
17937 acl_save_prefix="$prefix"
17938 prefix="$acl_final_prefix"
17939 acl_save_exec_prefix="$exec_prefix"
17940 exec_prefix="$acl_final_exec_prefix"
17942 exec_prefix="$acl_save_exec_prefix"
17943 prefix="$acl_save_prefix"
17945 if test "X$x" = "X-L$found_dir"; then
17950 if test -z "$haveit"; then
17951 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
17953 if test "$acl_hardcode_minus_L" != no; then
17954 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
17956 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
17962 if test "X$found_a" != "X"; then
17963 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
17965 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
17968 additional_includedir=
17969 case "$found_dir" in
17970 */$acl_libdirstem | */$acl_libdirstem/)
17971 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
17972 if test "$name" = 'pth'; then
17973 LIBPTH_PREFIX="$basedir"
17975 additional_includedir="$basedir/include"
17977 */$acl_libdirstem2 | */$acl_libdirstem2/)
17978 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
17979 if test "$name" = 'pth'; then
17980 LIBPTH_PREFIX="$basedir"
17982 additional_includedir="$basedir/include"
17985 if test "X$additional_includedir" != "X"; then
17986 if test "X$additional_includedir" != "X/usr/include"; then
17988 if test "X$additional_includedir" = "X/usr/local/include"; then
17989 if test -n "$GCC"; then
17991 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17995 if test -z "$haveit"; then
17996 for x in $CPPFLAGS $INCPTH; do
17998 acl_save_prefix="$prefix"
17999 prefix="$acl_final_prefix"
18000 acl_save_exec_prefix="$exec_prefix"
18001 exec_prefix="$acl_final_exec_prefix"
18003 exec_prefix="$acl_save_exec_prefix"
18004 prefix="$acl_save_prefix"
18006 if test "X$x" = "X-I$additional_includedir"; then
18011 if test -z "$haveit"; then
18012 if test -d "$additional_includedir"; then
18013 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
18019 if test -n "$found_la"; then
18020 save_libdir="$libdir"
18021 case "$found_la" in
18022 */* | *\\*) . "$found_la" ;;
18023 *) . "./$found_la" ;;
18025 libdir="$save_libdir"
18026 for dep in $dependency_libs; do
18029 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18030 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
18031 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
18033 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
18034 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
18035 if test -n "$GCC"; then
18037 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
18041 if test -z "$haveit"; then
18043 for x in $LDFLAGS $LIBPTH; do
18045 acl_save_prefix="$prefix"
18046 prefix="$acl_final_prefix"
18047 acl_save_exec_prefix="$exec_prefix"
18048 exec_prefix="$acl_final_exec_prefix"
18050 exec_prefix="$acl_save_exec_prefix"
18051 prefix="$acl_save_prefix"
18053 if test "X$x" = "X-L$additional_libdir"; then
18058 if test -z "$haveit"; then
18059 if test -d "$additional_libdir"; then
18060 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
18064 for x in $LDFLAGS $LTLIBPTH; do
18066 acl_save_prefix="$prefix"
18067 prefix="$acl_final_prefix"
18068 acl_save_exec_prefix="$exec_prefix"
18069 exec_prefix="$acl_final_exec_prefix"
18071 exec_prefix="$acl_save_exec_prefix"
18072 prefix="$acl_save_prefix"
18074 if test "X$x" = "X-L$additional_libdir"; then
18079 if test -z "$haveit"; then
18080 if test -d "$additional_libdir"; then
18081 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
18088 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18089 if test "$enable_rpath" != no; then
18091 for x in $rpathdirs; do
18092 if test "X$x" = "X$dir"; then
18097 if test -z "$haveit"; then
18098 rpathdirs="$rpathdirs $dir"
18101 for x in $ltrpathdirs; do
18102 if test "X$x" = "X$dir"; then
18107 if test -z "$haveit"; then
18108 ltrpathdirs="$ltrpathdirs $dir"
18113 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18116 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18119 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
18120 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
18126 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
18127 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
18133 if test "X$rpathdirs" != "X"; then
18134 if test -n "$acl_hardcode_libdir_separator"; then
18136 for found_dir in $rpathdirs; do
18137 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
18139 acl_save_libdir="$libdir"
18141 eval flag=\"$acl_hardcode_libdir_flag_spec\"
18142 libdir="$acl_save_libdir"
18143 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
18145 for found_dir in $rpathdirs; do
18146 acl_save_libdir="$libdir"
18147 libdir="$found_dir"
18148 eval flag=\"$acl_hardcode_libdir_flag_spec\"
18149 libdir="$acl_save_libdir"
18150 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
18154 if test "X$ltrpathdirs" != "X"; then
18155 for found_dir in $ltrpathdirs; do
18156 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
18165 ac_cv_libpth_libs="$LIBPTH"
18166 ac_cv_libpth_ltlibs="$LTLIBPTH"
18167 ac_cv_libpth_cppflags="$INCPTH"
18168 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
18171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
18172 $as_echo "$ac_cv_libpth_libs" >&6; }
18173 LIBPTH="$ac_cv_libpth_libs"
18174 LTLIBPTH="$ac_cv_libpth_ltlibs"
18175 INCPTH="$ac_cv_libpth_cppflags"
18176 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
18178 for element in $INCPTH; do
18180 for x in $CPPFLAGS; do
18182 acl_save_prefix="$prefix"
18183 prefix="$acl_final_prefix"
18184 acl_save_exec_prefix="$exec_prefix"
18185 exec_prefix="$acl_final_exec_prefix"
18187 exec_prefix="$acl_save_exec_prefix"
18188 prefix="$acl_save_prefix"
18190 if test "X$x" = "X$element"; then
18195 if test -z "$haveit"; then
18196 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18208 gl_save_LIBS="$LIBS"
18209 LIBS="$LIBS $LIBPTH"
18210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18211 /* end confdefs.h. */
18221 if ac_fn_c_try_link "$LINENO"; then :
18224 rm -f core conftest.err conftest.$ac_objext \
18225 conftest$ac_exeext conftest.$ac_ext
18226 LIBS="$gl_save_LIBS"
18227 if test -n "$gl_have_pth"; then
18229 LIBTHREAD="$LIBPTH"
18230 LTLIBTHREAD="$LTLIBPTH"
18231 LIBMULTITHREAD="$LIBTHREAD"
18232 LTLIBMULTITHREAD="$LTLIBTHREAD"
18234 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
18236 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
18237 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
18239 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
18246 CPPFLAGS="$gl_save_CPPFLAGS"
18249 if test -z "$gl_have_pthread"; then
18250 case "$gl_use_threads" in
18251 yes | windows | win32) # The 'win32' is for backward compatibility.
18252 if { case "$host_os" in
18257 gl_threads_api=windows
18259 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
18266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
18267 $as_echo_n "checking for multithread API to use... " >&6; }
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
18269 $as_echo "$gl_threads_api" >&6; }
18282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18283 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18284 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
18285 $as_echo_n "(cached) " >&6
18287 rm -f conftest.sym conftest.file
18288 echo >conftest.file
18289 if test "$cross_compiling" = yes; then :
18292 # Guess yes on glibc systems.
18293 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18295 # Guess no on native Windows.
18296 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18298 # If we don't know, assume the worst.
18299 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18304 /* end confdefs.h. */
18305 $ac_includes_default
18310 if (symlink ("conftest.file", "conftest.sym") != 0)
18312 /* Linux will dereference the symlink and fail, as required by
18313 POSIX. That is better in the sense that it means we will not
18314 have to compile and use the lstat wrapper. */
18315 return lstat ("conftest.sym/", &sbuf) == 0;
18321 if ac_fn_c_try_run "$LINENO"; then :
18322 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18324 gl_cv_func_lstat_dereferences_slashed_symlink=no
18326 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18327 conftest.$ac_objext conftest.beam conftest.$ac_ext
18330 rm -f conftest.sym conftest.file
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18334 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18335 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18338 cat >>confdefs.h <<_ACEOF
18339 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
18346 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
18347 if ${ac_cv_path_SED+:} false; then :
18348 $as_echo_n "(cached) " >&6
18350 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
18351 for ac_i in 1 2 3 4 5 6 7; do
18352 ac_script="$ac_script$as_nl$ac_script"
18354 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
18355 { ac_script=; unset ac_script;}
18356 if test -z "$SED"; then
18357 ac_path_SED_found=false
18358 # Loop through the user's path and test for each of PROGNAME-LIST
18359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18360 for as_dir in $PATH
18363 test -z "$as_dir" && as_dir=.
18364 for ac_prog in sed gsed; do
18365 for ac_exec_ext in '' $ac_executable_extensions; do
18366 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
18367 as_fn_executable_p "$ac_path_SED" || continue
18368 # Check for GNU ac_path_SED and select it if it is found.
18369 # Check for GNU $ac_path_SED
18370 case `"$ac_path_SED" --version 2>&1` in
18372 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
18375 $as_echo_n 0123456789 >"conftest.in"
18378 cat "conftest.in" "conftest.in" >"conftest.tmp"
18379 mv "conftest.tmp" "conftest.in"
18380 cp "conftest.in" "conftest.nl"
18381 $as_echo '' >> "conftest.nl"
18382 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
18383 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
18384 as_fn_arith $ac_count + 1 && ac_count=$as_val
18385 if test $ac_count -gt ${ac_path_SED_max-0}; then
18386 # Best one so far, save it but keep looking for a better one
18387 ac_cv_path_SED="$ac_path_SED"
18388 ac_path_SED_max=$ac_count
18390 # 10*(2^10) chars as input seems more than enough
18391 test $ac_count -gt 10 && break
18393 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
18396 $ac_path_SED_found && break 3
18401 if test -z "$ac_cv_path_SED"; then
18402 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
18405 ac_cv_path_SED=$SED
18409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
18410 $as_echo "$ac_cv_path_SED" >&6; }
18411 SED="$ac_cv_path_SED"
18416 for ac_header in stdlib.h
18418 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
18419 if test "x$ac_cv_header_stdlib_h" = xyes; then :
18420 cat >>confdefs.h <<_ACEOF
18421 #define HAVE_STDLIB_H 1
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
18429 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
18430 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
18431 $as_echo_n "(cached) " >&6
18433 if test "$cross_compiling" = yes; then :
18435 # Guess yes on platforms where we know the result.
18436 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
18437 | hpux* | solaris* | cygwin* | mingw*)
18438 ac_cv_func_malloc_0_nonnull=yes ;;
18439 # If we don't know, assume the worst.
18440 *) ac_cv_func_malloc_0_nonnull=no ;;
18444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18445 /* end confdefs.h. */
18446 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
18447 # include <stdlib.h>
18455 char *p = malloc (0);
18464 if ac_fn_c_try_run "$LINENO"; then :
18465 ac_cv_func_malloc_0_nonnull=yes
18467 ac_cv_func_malloc_0_nonnull=no
18469 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18470 conftest.$ac_objext conftest.beam conftest.$ac_ext
18475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
18476 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
18477 if test $ac_cv_func_malloc_0_nonnull = yes; then :
18478 gl_cv_func_malloc_0_nonnull=1
18480 gl_cv_func_malloc_0_nonnull=0
18484 cat >>confdefs.h <<_ACEOF
18485 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
18497 GNULIB_MBSRTOWCS=0;
18498 GNULIB_MBSNRTOWCS=0;
18500 GNULIB_WCSRTOMBS=0;
18501 GNULIB_WCSNRTOMBS=0;
18518 GNULIB_WCSCASECMP=0;
18519 GNULIB_WCSNCASECMP=0;
18557 HAVE_WCSNCASECMP=1;
18571 HAVE_DECL_WCWIDTH=1;
18572 REPLACE_MBSTATE_T=0;
18578 REPLACE_MBSRTOWCS=0;
18579 REPLACE_MBSNRTOWCS=0;
18581 REPLACE_WCSRTOMBS=0;
18582 REPLACE_WCSNRTOMBS=0;
18584 REPLACE_WCSWIDTH=0;
18585 REPLACE_WCSFTIME=0;
18589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
18590 $as_echo_n "checking for mbstate_t... " >&6; }
18591 if ${ac_cv_type_mbstate_t+:} false; then :
18592 $as_echo_n "(cached) " >&6
18594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18595 /* end confdefs.h. */
18596 $ac_includes_default
18597 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18599 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18600 included before <wchar.h>. */
18601 #include <stddef.h>
18608 mbstate_t x; return sizeof x;
18613 if ac_fn_c_try_compile "$LINENO"; then :
18614 ac_cv_type_mbstate_t=yes
18616 ac_cv_type_mbstate_t=no
18618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
18621 $as_echo "$ac_cv_type_mbstate_t" >&6; }
18622 if test $ac_cv_type_mbstate_t = yes; then
18624 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
18628 $as_echo "#define mbstate_t int" >>confdefs.h
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
18640 $as_echo_n "checking for a traditional japanese locale... " >&6; }
18641 if ${gt_cv_locale_ja+:} false; then :
18642 $as_echo_n "(cached) " >&6
18645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18646 /* end confdefs.h. */
18648 #include <locale.h>
18650 #if HAVE_LANGINFO_CODESET
18651 # include <langinfo.h>
18653 #include <stdlib.h>
18654 #include <string.h>
18659 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
18660 imitates locale dependent behaviour by looking at the environment
18661 variables, and all locales use the UTF-8 encoding. */
18662 #if defined __BEOS__ || defined __HAIKU__
18665 /* Check whether the given locale name is recognized by the system. */
18666 # if defined _WIN32 && !defined __CYGWIN__
18667 /* On native Windows, setlocale(category, "") looks at the system settings,
18668 not at the environment variables. Also, when an encoding suffix such
18669 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18670 category of the locale to "C". */
18671 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18672 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18675 if (setlocale (LC_ALL, "") == NULL) return 1;
18677 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18678 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18679 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18680 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18681 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18682 some unit tests fail.
18683 On MirBSD 10, when an unsupported locale is specified, setlocale()
18684 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
18685 # if HAVE_LANGINFO_CODESET
18687 const char *cs = nl_langinfo (CODESET);
18688 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
18689 || strcmp (cs, "UTF-8") == 0)
18694 /* On Cygwin, avoid locale names without encoding suffix, because the
18695 locale_charset() function relies on the encoding suffix. Note that
18696 LC_ALL is set on the command line. */
18697 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18699 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
18700 on Cygwin 1.5.x. */
18701 if (MB_CUR_MAX == 1)
18703 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
18704 This excludes the UTF-8 encoding (except on MirBSD). */
18707 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18708 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
18709 for (p = buf; *p != '\0'; p++)
18710 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
18718 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18719 (eval $ac_link) 2>&5
18721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18722 test $ac_status = 0; } && test -s conftest$ac_exeext; then
18724 # Handle native Windows specially, because there setlocale() interprets
18725 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
18726 # "fr" or "fra" as "French" or "French_France.1252",
18727 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
18728 # "ja" as "Japanese" or "Japanese_Japan.932",
18731 # Note that on native Windows, the Japanese locale is
18732 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
18733 # cannot use it here.
18734 gt_cv_locale_ja=none
18737 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
18738 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
18739 # configure script would override the LC_ALL setting. Likewise for
18740 # LC_CTYPE, which is also set at the beginning of the configure script.
18741 # Test for the AIX locale name.
18742 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18743 gt_cv_locale_ja=ja_JP
18745 # Test for the locale name with explicit encoding suffix.
18746 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18747 gt_cv_locale_ja=ja_JP.EUC-JP
18749 # Test for the HP-UX, OSF/1, NetBSD locale name.
18750 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18751 gt_cv_locale_ja=ja_JP.eucJP
18753 # Test for the IRIX, FreeBSD locale name.
18754 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18755 gt_cv_locale_ja=ja_JP.EUC
18757 # Test for the Solaris 7 locale name.
18758 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18761 # Special test for NetBSD 1.6.
18762 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
18763 gt_cv_locale_ja=ja_JP.eucJP
18766 gt_cv_locale_ja=none
18779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
18780 $as_echo "$gt_cv_locale_ja" >&6; }
18781 LOCALE_JA=$gt_cv_locale_ja
18787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
18788 $as_echo_n "checking for a transitional chinese locale... " >&6; }
18789 if ${gt_cv_locale_zh_CN+:} false; then :
18790 $as_echo_n "(cached) " >&6
18793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18794 /* end confdefs.h. */
18796 #include <locale.h>
18797 #include <stdlib.h>
18799 #if HAVE_LANGINFO_CODESET
18800 # include <langinfo.h>
18802 #include <stdlib.h>
18803 #include <string.h>
18808 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
18809 imitates locale dependent behaviour by looking at the environment
18810 variables, and all locales use the UTF-8 encoding. */
18811 #if defined __BEOS__ || defined __HAIKU__
18814 /* Check whether the given locale name is recognized by the system. */
18815 # if defined _WIN32 && !defined __CYGWIN__
18816 /* On native Windows, setlocale(category, "") looks at the system settings,
18817 not at the environment variables. Also, when an encoding suffix such
18818 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18819 category of the locale to "C". */
18820 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18821 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18824 if (setlocale (LC_ALL, "") == NULL) return 1;
18826 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18827 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18828 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18829 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18830 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18831 some unit tests fail.
18832 On MirBSD 10, when an unsupported locale is specified, setlocale()
18833 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
18834 # if HAVE_LANGINFO_CODESET
18836 const char *cs = nl_langinfo (CODESET);
18837 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
18838 || strcmp (cs, "UTF-8") == 0)
18843 /* On Cygwin, avoid locale names without encoding suffix, because the
18844 locale_charset() function relies on the encoding suffix. Note that
18845 LC_ALL is set on the command line. */
18846 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18848 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
18849 This excludes the UTF-8 encoding (except on MirBSD). */
18852 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18853 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
18854 for (p = buf; *p != '\0'; p++)
18855 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
18858 /* Check whether a typical GB18030 multibyte sequence is recognized as a
18859 single wide character. This excludes the GB2312 and GBK encodings. */
18860 if (mblen ("\203\062\332\066", 5) != 4)
18867 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18868 (eval $ac_link) 2>&5
18870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18871 test $ac_status = 0; } && test -s conftest$ac_exeext; then
18873 # Handle native Windows specially, because there setlocale() interprets
18874 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
18875 # "fr" or "fra" as "French" or "French_France.1252",
18876 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
18877 # "ja" as "Japanese" or "Japanese_Japan.932",
18880 # Test for the hypothetical native Windows locale name.
18881 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18882 gt_cv_locale_zh_CN=Chinese_China.54936
18885 gt_cv_locale_zh_CN=none
18889 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
18890 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
18891 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
18892 gt_cv_locale_zh_CN=none
18895 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
18896 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
18897 # configure script would override the LC_ALL setting. Likewise for
18898 # LC_CTYPE, which is also set at the beginning of the configure script.
18899 # Test for the locale name without encoding suffix.
18900 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18901 gt_cv_locale_zh_CN=zh_CN
18903 # Test for the locale name with explicit encoding suffix.
18904 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18905 gt_cv_locale_zh_CN=zh_CN.GB18030
18908 gt_cv_locale_zh_CN=none
18914 # If there was a link error, due to mblen(), the system is so old that
18915 # it certainly doesn't have a chinese locale.
18916 gt_cv_locale_zh_CN=none
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
18922 $as_echo "$gt_cv_locale_zh_CN" >&6; }
18923 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
18928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
18929 $as_echo_n "checking for a french Unicode locale... " >&6; }
18930 if ${gt_cv_locale_fr_utf8+:} false; then :
18931 $as_echo_n "(cached) " >&6
18934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18935 /* end confdefs.h. */
18937 #include <locale.h>
18939 #if HAVE_LANGINFO_CODESET
18940 # include <langinfo.h>
18942 #include <stdlib.h>
18943 #include <string.h>
18947 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
18948 imitates locale dependent behaviour by looking at the environment
18949 variables, and all locales use the UTF-8 encoding. */
18950 #if !(defined __BEOS__ || defined __HAIKU__)
18951 /* Check whether the given locale name is recognized by the system. */
18952 # if defined _WIN32 && !defined __CYGWIN__
18953 /* On native Windows, setlocale(category, "") looks at the system settings,
18954 not at the environment variables. Also, when an encoding suffix such
18955 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18956 category of the locale to "C". */
18957 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18958 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18961 if (setlocale (LC_ALL, "") == NULL) return 1;
18963 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18964 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18965 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18966 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18967 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18968 some unit tests fail. */
18969 # if HAVE_LANGINFO_CODESET
18971 const char *cs = nl_langinfo (CODESET);
18972 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
18977 /* On Cygwin, avoid locale names without encoding suffix, because the
18978 locale_charset() function relies on the encoding suffix. Note that
18979 LC_ALL is set on the command line. */
18980 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18982 /* Check whether in the abbreviation of the second month, the second
18983 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
18984 two bytes long, with UTF-8 encoding. */
18985 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18986 if (strftime (buf, sizeof (buf), "%b", &t) < 4
18987 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
18990 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
18991 /* Check whether the decimal separator is a comma.
18992 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
18993 are nl_langinfo(RADIXCHAR) are both ".". */
18994 if (localeconv () ->decimal_point[0] != ',') return 1;
19000 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19001 (eval $ac_link) 2>&5
19003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19004 test $ac_status = 0; } && test -s conftest$ac_exeext; then
19006 # Handle native Windows specially, because there setlocale() interprets
19007 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19008 # "fr" or "fra" as "French" or "French_France.1252",
19009 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19010 # "ja" as "Japanese" or "Japanese_Japan.932",
19013 # Test for the hypothetical native Windows locale name.
19014 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19015 gt_cv_locale_fr_utf8=French_France.65001
19018 gt_cv_locale_fr_utf8=none
19022 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19023 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19024 # configure script would override the LC_ALL setting. Likewise for
19025 # LC_CTYPE, which is also set at the beginning of the configure script.
19026 # Test for the usual locale name.
19027 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19028 gt_cv_locale_fr_utf8=fr_FR
19030 # Test for the locale name with explicit encoding suffix.
19031 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19032 gt_cv_locale_fr_utf8=fr_FR.UTF-8
19034 # Test for the Solaris 7 locale name.
19035 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19036 gt_cv_locale_fr_utf8=fr.UTF-8
19039 gt_cv_locale_fr_utf8=none
19049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
19050 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
19051 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
19061 GNULIB_EXPLICIT_BZERO=0;
19068 GNULIB_RAWMEMCHR=0;
19071 GNULIB_STRCHRNUL=0;
19079 GNULIB_STRCASESTR=0;
19086 GNULIB_MBSCASECMP=0;
19087 GNULIB_MBSNCASECMP=0;
19088 GNULIB_MBSPCASECMP=0;
19089 GNULIB_MBSCASESTR=0;
19096 GNULIB_STRERROR_R=0;
19097 GNULIB_STRSIGNAL=0;
19098 GNULIB_STRVERSCMP=0;
19100 HAVE_EXPLICIT_BZERO=1;
19104 HAVE_DECL_MEMMEM=1;
19106 HAVE_DECL_MEMRCHR=1;
19111 HAVE_DECL_STRDUP=1;
19112 HAVE_DECL_STRNDUP=1;
19113 HAVE_DECL_STRNLEN=1;
19117 HAVE_DECL_STRTOK_R=1;
19118 HAVE_DECL_STRERROR_R=1;
19119 HAVE_DECL_STRSIGNAL=1;
19124 REPLACE_STRCHRNUL=0;
19130 REPLACE_STRCASESTR=0;
19131 REPLACE_STRTOK_R=0;
19132 REPLACE_STRERROR=0;
19133 REPLACE_STRERROR_R=0;
19134 REPLACE_STRSIGNAL=0;
19135 UNDEFINE_STRTOK_R=0;
19142 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
19143 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
19144 # irrelevant for anonymous mappings.
19145 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
19146 if test "x$ac_cv_func_mmap" = xyes; then :
19153 # Try to allow MAP_ANONYMOUS.
19154 gl_have_mmap_anonymous=no
19155 if test $gl_have_mmap = yes; then
19156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
19157 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
19158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19159 /* end confdefs.h. */
19161 #include <sys/mman.h>
19162 #ifdef MAP_ANONYMOUS
19163 I cannot identify this map
19167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19168 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
19169 gl_have_mmap_anonymous=yes
19173 if test $gl_have_mmap_anonymous != yes; then
19174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19175 /* end confdefs.h. */
19177 #include <sys/mman.h>
19179 I cannot identify this map
19183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19184 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
19186 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
19188 gl_have_mmap_anonymous=yes
19193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
19194 $as_echo "$gl_have_mmap_anonymous" >&6; }
19195 if test $gl_have_mmap_anonymous = yes; then
19197 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
19207 if test $HAVE_MEMCHR = 1; then
19208 # Detect platform-specific bugs in some versions of glibc:
19209 # memchr should not dereference anything with length 0
19210 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
19211 # memchr should not dereference overestimated length after a match
19212 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
19213 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
19214 # Assume that memchr works on platforms that lack mprotect.
19215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
19216 $as_echo_n "checking whether memchr works... " >&6; }
19217 if ${gl_cv_func_memchr_works+:} false; then :
19218 $as_echo_n "(cached) " >&6
19220 if test "$cross_compiling" = yes; then :
19222 # Guess yes on native Windows.
19223 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
19224 # Be pessimistic for now.
19225 *) gl_cv_func_memchr_works="guessing no" ;;
19229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19230 /* end confdefs.h. */
19232 #include <string.h>
19233 #if HAVE_SYS_MMAN_H
19234 # include <fcntl.h>
19235 # include <unistd.h>
19236 # include <sys/types.h>
19237 # include <sys/mman.h>
19239 # define MAP_FILE 0
19248 char *fence = NULL;
19249 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
19250 # if HAVE_MAP_ANONYMOUS
19251 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
19253 # else /* !HAVE_MAP_ANONYMOUS */
19254 const int flags = MAP_FILE | MAP_PRIVATE;
19255 int fd = open ("/dev/zero", O_RDONLY, 0666);
19259 int pagesize = getpagesize ();
19261 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
19263 if (two_pages != (char *)(-1)
19264 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
19265 fence = two_pages + pagesize;
19270 if (memchr (fence, 0, 0))
19272 strcpy (fence - 9, "12345678");
19273 if (memchr (fence - 9, 0, 79) != fence - 1)
19275 if (memchr (fence - 1, 0, 3) != fence - 1)
19284 if ac_fn_c_try_run "$LINENO"; then :
19285 gl_cv_func_memchr_works=yes
19287 gl_cv_func_memchr_works=no
19289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19290 conftest.$ac_objext conftest.beam conftest.$ac_ext
19295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
19296 $as_echo "$gl_cv_func_memchr_works" >&6; }
19297 case "$gl_cv_func_memchr_works" in
19299 *) REPLACE_MEMCHR=1 ;;
19307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
19308 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
19309 if ${gl_cv_minmax_in_limits_h+:} false; then :
19310 $as_echo_n "(cached) " >&6
19312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19313 /* end confdefs.h. */
19314 #include <limits.h>
19315 int x = MIN (42, 17);
19324 if ac_fn_c_try_compile "$LINENO"; then :
19325 gl_cv_minmax_in_limits_h=yes
19327 gl_cv_minmax_in_limits_h=no
19329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
19332 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
19333 if test $gl_cv_minmax_in_limits_h = yes; then
19335 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
19344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
19345 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
19346 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
19347 $as_echo_n "(cached) " >&6
19349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19350 /* end confdefs.h. */
19351 #include <sys/param.h>
19352 int x = MIN (42, 17);
19361 if ac_fn_c_try_compile "$LINENO"; then :
19362 gl_cv_minmax_in_sys_param_h=yes
19364 gl_cv_minmax_in_sys_param_h=no
19366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
19369 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
19370 if test $gl_cv_minmax_in_sys_param_h = yes; then
19372 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
19384 ac_fn_c_check_decl "$LINENO" "obstack_printf" "ac_cv_have_decl_obstack_printf" "$ac_includes_default"
19385 if test "x$ac_cv_have_decl_obstack_printf" = xyes; then :
19391 cat >>confdefs.h <<_ACEOF
19392 #define HAVE_DECL_OBSTACK_PRINTF $ac_have_decl
19396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
19397 $as_echo_n "checking for O_CLOEXEC... " >&6; }
19398 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
19399 $as_echo_n "(cached) " >&6
19401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402 /* end confdefs.h. */
19416 if ac_fn_c_try_compile "$LINENO"; then :
19417 gl_cv_macro_O_CLOEXEC=yes
19419 gl_cv_macro_O_CLOEXEC=no
19421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
19424 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
19428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
19429 $as_echo_n "checking for promoted mode_t type... " >&6; }
19430 if ${gl_cv_promoted_mode_t+:} false; then :
19431 $as_echo_n "(cached) " >&6
19434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19435 /* end confdefs.h. */
19436 #include <sys/types.h>
19440 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
19445 if ac_fn_c_try_compile "$LINENO"; then :
19446 gl_cv_promoted_mode_t='int'
19448 gl_cv_promoted_mode_t='mode_t'
19450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
19454 $as_echo "$gl_cv_promoted_mode_t" >&6; }
19456 cat >>confdefs.h <<_ACEOF
19457 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
19464 REPLACE_STRERROR_0=0
19465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
19466 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
19467 if ${gl_cv_func_strerror_0_works+:} false; then :
19468 $as_echo_n "(cached) " >&6
19470 if test "$cross_compiling" = yes; then :
19472 # Guess yes on glibc systems.
19473 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
19474 # Guess yes on native Windows.
19475 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
19476 # If we don't know, assume the worst.
19477 *) gl_cv_func_strerror_0_works="guessing no" ;;
19481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19482 /* end confdefs.h. */
19483 #include <string.h>
19492 str = strerror (0);
19493 if (!*str) result |= 1;
19494 if (errno) result |= 2;
19495 if (strstr (str, "nknown") || strstr (str, "ndefined"))
19502 if ac_fn_c_try_run "$LINENO"; then :
19503 gl_cv_func_strerror_0_works=yes
19505 gl_cv_func_strerror_0_works=no
19507 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19508 conftest.$ac_objext conftest.beam conftest.$ac_ext
19513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
19514 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
19515 case "$gl_cv_func_strerror_0_works" in
19518 REPLACE_STRERROR_0=1
19520 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
19534 if test $ac_cv_func_strerror_r = yes; then
19535 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
19536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
19537 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
19538 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
19539 $as_echo_n "(cached) " >&6
19541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19542 /* end confdefs.h. */
19543 #include <string.h>
19544 int strerror_r (int, char *, size_t);
19554 if ac_fn_c_try_compile "$LINENO"; then :
19555 gl_cv_func_strerror_r_posix_signature=yes
19557 gl_cv_func_strerror_r_posix_signature=no
19559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
19563 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
19564 if test $gl_cv_func_strerror_r_posix_signature = yes; then
19565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
19566 $as_echo_n "checking whether strerror_r works... " >&6; }
19567 if ${gl_cv_func_strerror_r_works+:} false; then :
19568 $as_echo_n "(cached) " >&6
19570 if test "$cross_compiling" = yes; then :
19574 aix*) gl_cv_func_strerror_r_works="guessing no";;
19575 # Guess no on HP-UX.
19576 hpux*) gl_cv_func_strerror_r_works="guessing no";;
19577 # Guess no on BSD variants.
19578 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
19579 # Guess yes otherwise.
19580 *) gl_cv_func_strerror_r_works="guessing yes";;
19584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19585 /* end confdefs.h. */
19587 #include <string.h>
19594 if (strerror_r (EACCES, buf, 0) < 0)
19597 if (strerror_r (EACCES, buf, sizeof buf) != 0)
19599 strcpy (buf, "Unknown");
19600 if (strerror_r (0, buf, sizeof buf) != 0)
19604 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
19608 if (strerror_r (-3, buf, sizeof buf) < 0)
19620 if ac_fn_c_try_run "$LINENO"; then :
19621 gl_cv_func_strerror_r_works=yes
19623 gl_cv_func_strerror_r_works=no
19625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19626 conftest.$ac_objext conftest.beam conftest.$ac_ext
19631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
19632 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
19635 if test $ac_cv_func___xpg_strerror_r = yes; then
19636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
19637 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
19638 if ${gl_cv_func_strerror_r_works+:} false; then :
19639 $as_echo_n "(cached) " >&6
19641 if test "$cross_compiling" = yes; then :
19642 gl_cv_func_strerror_r_works="guessing no"
19645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19646 /* end confdefs.h. */
19648 #include <string.h>
19653 int __xpg_strerror_r(int, char *, size_t);
19659 char buf[256] = "^";
19661 char *str = strerror (-1);
19662 strcpy (copy, str);
19663 if (__xpg_strerror_r (-2, buf, 1) == 0)
19667 __xpg_strerror_r (-2, buf, 256);
19668 if (strcmp (str, copy))
19676 if ac_fn_c_try_run "$LINENO"; then :
19677 gl_cv_func_strerror_r_works=yes
19679 gl_cv_func_strerror_r_works=no
19681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19682 conftest.$ac_objext conftest.beam conftest.$ac_ext
19687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
19688 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
19694 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
19695 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
19701 cat >>confdefs.h <<_ACEOF
19702 #define HAVE_DECL_STRERROR_R $ac_have_decl
19712 if test $ac_cv_have_decl_strerror_r = no; then
19713 HAVE_DECL_STRERROR_R=0
19716 if test $ac_cv_func_strerror_r = yes; then
19717 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
19718 if test $gl_cv_func_strerror_r_posix_signature = yes; then
19719 case "$gl_cv_func_strerror_r_works" in
19720 *no) REPLACE_STRERROR_R=1 ;;
19723 REPLACE_STRERROR_R=1
19726 REPLACE_STRERROR_R=1
19733 GNULIB_POSIX_SPAWN=0;
19734 GNULIB_POSIX_SPAWNP=0;
19735 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
19736 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
19737 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
19738 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
19739 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
19740 GNULIB_POSIX_SPAWNATTR_INIT=0;
19741 GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
19742 GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
19743 GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
19744 GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
19745 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
19746 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
19747 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
19748 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
19749 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
19750 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
19751 GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
19752 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
19753 GNULIB_POSIX_SPAWNATTR_DESTROY=0;
19754 HAVE_POSIX_SPAWN=1;
19755 HAVE_POSIX_SPAWNATTR_T=1;
19756 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
19758 REPLACE_POSIX_SPAWN=0;
19759 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
19761 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
19763 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
19771 gl_saved_libs=$LIBS
19772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
19773 $as_echo_n "checking for library containing posix_spawn... " >&6; }
19774 if ${ac_cv_search_posix_spawn+:} false; then :
19775 $as_echo_n "(cached) " >&6
19777 ac_func_search_save_LIBS=$LIBS
19778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19779 /* end confdefs.h. */
19781 /* Override any GCC internal prototype to avoid an error.
19782 Use char because int might match the return type of a GCC
19783 builtin and then its argument prototype would still apply. */
19787 char posix_spawn ();
19791 return posix_spawn ();
19796 for ac_lib in '' rt; do
19797 if test -z "$ac_lib"; then
19798 ac_res="none required"
19801 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19803 if ac_fn_c_try_link "$LINENO"; then :
19804 ac_cv_search_posix_spawn=$ac_res
19806 rm -f core conftest.err conftest.$ac_objext \
19808 if ${ac_cv_search_posix_spawn+:} false; then :
19812 if ${ac_cv_search_posix_spawn+:} false; then :
19815 ac_cv_search_posix_spawn=no
19817 rm conftest.$ac_ext
19818 LIBS=$ac_func_search_save_LIBS
19820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
19821 $as_echo "$ac_cv_search_posix_spawn" >&6; }
19822 ac_res=$ac_cv_search_posix_spawn
19823 if test "$ac_res" != no; then :
19824 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19825 test "$ac_cv_search_posix_spawn" = "none required" ||
19826 LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
19829 for ac_func in posix_spawn
19831 ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
19832 if test "x$ac_cv_func_posix_spawn" = xyes; then :
19833 cat >>confdefs.h <<_ACEOF
19834 #define HAVE_POSIX_SPAWN 1
19840 LIBS=$gl_saved_libs
19842 if test $ac_cv_func_posix_spawn != yes; then
19849 if test $ac_cv_func_posix_spawn = yes; then
19852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
19853 $as_echo_n "checking whether posix_spawn works... " >&6; }
19854 if ${gl_cv_func_posix_spawn_works+:} false; then :
19855 $as_echo_n "(cached) " >&6
19857 if test $cross_compiling = no; then
19858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19859 /* end confdefs.h. */
19863 #include <signal.h>
19865 #include <stdbool.h>
19867 #include <stdlib.h>
19868 #include <string.h>
19869 #include <unistd.h>
19870 #include <sys/types.h>
19871 #include <sys/wait.h>
19873 extern char **environ;
19875 #ifndef STDIN_FILENO
19876 # define STDIN_FILENO 0
19878 #ifndef STDOUT_FILENO
19879 # define STDOUT_FILENO 1
19881 #ifndef STDERR_FILENO
19882 # define STDERR_FILENO 2
19886 # define WTERMSIG(x) ((x) & 0x7f)
19889 # define WIFEXITED(x) (WTERMSIG (x) == 0)
19891 #ifndef WEXITSTATUS
19892 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
19895 #define CHILD_PROGRAM_FILENAME "/non/exist/ent"
19900 if (0 <= fd && fd <= 2)
19902 int f = fd_safer (dup (fd));
19915 char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
19917 sigset_t blocked_signals;
19918 sigset_t fatal_signal_set;
19919 posix_spawn_file_actions_t actions;
19920 bool actions_allocated;
19921 posix_spawnattr_t attrs;
19922 bool attrs_allocated;
19928 setvbuf (stdout, NULL, _IOFBF, 0);
19929 puts ("This should be seen only once.");
19930 if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
19932 perror ("cannot create pipe");
19935 sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
19936 sigemptyset (&fatal_signal_set);
19937 sigaddset (&fatal_signal_set, SIGINT);
19938 sigaddset (&fatal_signal_set, SIGTERM);
19939 sigaddset (&fatal_signal_set, SIGHUP);
19940 sigaddset (&fatal_signal_set, SIGPIPE);
19941 sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
19942 actions_allocated = false;
19943 attrs_allocated = false;
19944 if ((err = posix_spawn_file_actions_init (&actions)) != 0
19945 || (actions_allocated = true,
19946 (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
19947 || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
19948 || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
19949 || (err = posix_spawnattr_init (&attrs)) != 0
19950 || (attrs_allocated = true,
19951 (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
19952 || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
19953 || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
19955 if (actions_allocated)
19956 posix_spawn_file_actions_destroy (&actions);
19957 if (attrs_allocated)
19958 posix_spawnattr_destroy (&attrs);
19959 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
19965 perror ("subprocess failed");
19969 posix_spawn_file_actions_destroy (&actions);
19970 posix_spawnattr_destroy (&attrs);
19971 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
19975 while (waitpid (child, &status, 0) != child)
19977 if (!WIFEXITED (status))
19979 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
19982 exitstatus = WEXITSTATUS (status);
19983 if (exitstatus != 127)
19985 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
19992 if ac_fn_c_try_link "$LINENO"; then :
19993 if test -s conftest$ac_exeext \
19994 && ./conftest$ac_exeext > conftest.out \
19995 && echo 'This should be seen only once.' > conftest.ok \
19996 && cmp conftest.out conftest.ok >/dev/null 2>&1; then
19997 gl_cv_func_posix_spawn_works=yes
19999 gl_cv_func_posix_spawn_works=no
20002 gl_cv_func_posix_spawn_works=no
20004 rm -f core conftest.err conftest.$ac_objext \
20005 conftest$ac_exeext conftest.$ac_ext
20006 if test $gl_cv_func_posix_spawn_works = yes; then
20007 if test "$cross_compiling" = yes; then :
20008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20009 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20010 as_fn_error $? "cannot run test program while cross compiling
20011 See \`config.log' for more details" "$LINENO" 5; }
20013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20014 /* end confdefs.h. */
20016 /* Test whether posix_spawn_file_actions_addopen supports filename arguments
20017 that contain special characters such as '*'. */
20021 #include <signal.h>
20023 #include <stdbool.h>
20025 #include <string.h>
20026 #include <unistd.h>
20027 #include <sys/types.h>
20028 #include <sys/wait.h>
20030 extern char **environ;
20032 #ifndef STDIN_FILENO
20033 # define STDIN_FILENO 0
20035 #ifndef STDOUT_FILENO
20036 # define STDOUT_FILENO 1
20038 #ifndef STDERR_FILENO
20039 # define STDERR_FILENO 2
20043 # define WTERMSIG(x) ((x) & 0x7f)
20046 # define WIFEXITED(x) (WTERMSIG (x) == 0)
20048 #ifndef WEXITSTATUS
20049 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
20052 #define CHILD_PROGRAM_FILENAME "conftest"
20053 #define DATA_FILENAME "conftest%=*#?"
20059 char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
20060 posix_spawn_file_actions_t actions;
20061 bool actions_allocated;
20067 /* Create a data file with specific contents. */
20068 fp = fopen (DATA_FILENAME, "wb");
20071 perror ("cannot create data file");
20074 fwrite ("Halle Potta", 1, 11, fp);
20075 if (fflush (fp) || fclose (fp))
20077 perror ("cannot prepare data file");
20081 /* Avoid reading from our stdin, as it could block. */
20082 freopen ("/dev/null", "rb", stdin);
20084 /* Test whether posix_spawn_file_actions_addopen with this file name
20085 actually works, but spawning a child that reads from this file. */
20086 actions_allocated = false;
20087 if ((err = posix_spawn_file_actions_init (&actions)) != 0
20088 || (actions_allocated = true,
20089 (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
20090 || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
20092 if (actions_allocated)
20093 posix_spawn_file_actions_destroy (&actions);
20095 perror ("subprocess failed");
20098 posix_spawn_file_actions_destroy (&actions);
20100 while (waitpid (child, &status, 0) != child)
20102 if (!WIFEXITED (status))
20104 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
20107 exitstatus = WEXITSTATUS (status);
20108 if (exitstatus != 0)
20110 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
20121 /* See if reading from STDIN_FILENO yields the expected contents. */
20122 if (fread (buf, 1, sizeof (buf), stdin) == 11
20123 && memcmp (buf, "Halle Potta", 11) == 0)
20130 cleanup_then_die (int sig)
20132 /* Clean up data file. */
20133 unlink (DATA_FILENAME);
20135 /* Re-raise the signal and die from it. */
20136 signal (sig, SIG_DFL);
20141 main (int argc, char *argv[])
20145 if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
20147 /* This is the parent process. */
20148 signal (SIGINT, cleanup_then_die);
20149 signal (SIGTERM, cleanup_then_die);
20151 signal (SIGHUP, cleanup_then_die);
20154 exitstatus = parent_main ();
20158 /* This is the child process. */
20160 exitstatus = child_main ();
20162 unlink (DATA_FILENAME);
20167 if ac_fn_c_try_run "$LINENO"; then :
20170 gl_cv_func_posix_spawn_works=no
20172 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20173 conftest.$ac_objext conftest.beam conftest.$ac_ext
20179 aix*) gl_cv_func_posix_spawn_works="guessing no";;
20180 *) gl_cv_func_posix_spawn_works="guessing yes";;
20185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
20186 $as_echo "$gl_cv_func_posix_spawn_works" >&6; }
20188 case "$gl_cv_func_posix_spawn_works" in
20191 $as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
20193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
20194 $as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
20195 if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
20196 $as_echo_n "(cached) " >&6
20198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20199 /* end confdefs.h. */
20202 #if POSIX_SPAWN_SETSCHEDULER
20203 POSIX scheduling supported
20207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20208 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
20209 gl_cv_func_spawnattr_setschedpolicy=yes
20211 gl_cv_func_spawnattr_setschedpolicy=no
20217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
20218 $as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
20219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
20220 $as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
20221 if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
20222 $as_echo_n "(cached) " >&6
20224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20225 /* end confdefs.h. */
20228 #if POSIX_SPAWN_SETSCHEDPARAM
20229 POSIX scheduling supported
20233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20234 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
20235 gl_cv_func_spawnattr_setschedparam=yes
20237 gl_cv_func_spawnattr_setschedparam=no
20243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
20244 $as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
20246 *) REPLACE_POSIX_SPAWN=1 ;;
20265 gl_cv_func_vfprintf_posix=no
20266 case "$gl_cv_func_printf_sizes_c99" in
20268 case "$gl_cv_func_printf_long_double" in
20270 case "$gl_cv_func_printf_infinite" in
20272 case "$gl_cv_func_printf_infinite_long_double" in
20274 case "$gl_cv_func_printf_directive_a" in
20276 case "$gl_cv_func_printf_directive_f" in
20278 case "$gl_cv_func_printf_directive_n" in
20280 case "$gl_cv_func_printf_directive_ls" in
20282 case "$gl_cv_func_printf_positions" in
20284 case "$gl_cv_func_printf_flag_grouping" in
20286 case "$gl_cv_func_printf_flag_leftadjust" in
20288 case "$gl_cv_func_printf_flag_zero" in
20290 case "$gl_cv_func_printf_precision" in
20292 case "$gl_cv_func_printf_enomem" in
20294 # vfprintf exists and is
20295 # already POSIX compliant.
20296 gl_cv_func_vfprintf_posix=yes
20325 if test $gl_cv_func_vfprintf_posix = no; then
20329 case "$gl_cv_func_printf_infinite" in
20334 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
20342 case "$gl_cv_func_printf_long_double" in
20344 case "$gl_cv_func_printf_infinite_long_double" in
20349 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
20358 case "$gl_cv_func_printf_directive_a" in
20363 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
20365 for ac_func in nl_langinfo
20367 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
20368 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
20369 cat >>confdefs.h <<_ACEOF
20370 #define HAVE_NL_LANGINFO 1
20381 case "$gl_cv_func_printf_directive_f" in
20386 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
20393 case "$gl_cv_func_printf_directive_ls" in
20398 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
20405 case "$gl_cv_func_printf_flag_grouping" in
20410 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
20417 case "$gl_cv_func_printf_flag_leftadjust" in
20422 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
20429 case "$gl_cv_func_printf_flag_zero" in
20434 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
20441 case "$gl_cv_func_printf_precision" in
20446 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
20449 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
20452 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
20459 case "$gl_cv_func_printf_enomem" in
20464 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
20467 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
20470 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
20485 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
20495 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
20505 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
20515 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
20517 if test $ac_cv_func_vasnprintf = yes; then
20519 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
20533 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
20534 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
20538 $as_echo "#define ptrdiff_t long" >>confdefs.h
20559 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
20563 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
20572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
20573 $as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
20574 if ${gl_cv_prog_as_underscore+:} false; then :
20575 $as_echo_n "(cached) " >&6
20577 cat > conftest.c <<EOF
20579 extern "C" int foo (void);
20581 int foo(void) { return 0; }
20583 # Look for the assembly language name in the .s file.
20584 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
20585 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
20586 (eval $ac_try) 2>&5
20588 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20589 test $ac_status = 0; }; } >/dev/null 2>&1
20590 if LC_ALL=C $EGREP '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
20591 gl_cv_prog_as_underscore=yes
20593 gl_cv_prog_as_underscore=no
20598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
20599 $as_echo "$gl_cv_prog_as_underscore" >&6; }
20600 if test $gl_cv_prog_as_underscore = yes; then
20601 USER_LABEL_PREFIX=_
20606 cat >>confdefs.h <<_ACEOF
20607 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
20610 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
20614 GNULIB_PTHREAD_SIGMASK=0;
20616 GNULIB_SIGNAL_H_SIGPIPE=0;
20617 GNULIB_SIGPROCMASK=0;
20618 GNULIB_SIGACTION=0;
20619 HAVE_POSIX_SIGNALBLOCKING=1;
20620 HAVE_PTHREAD_SIGMASK=1;
20625 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20627 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20629 HAVE_SIGHANDLER_T=1;
20630 REPLACE_PTHREAD_SIGMASK=0;
20634 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20635 #include <signal.h>
20636 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
20637 #include <sys/types.h>
20640 if test "x$ac_cv_type_sigset_t" = xyes; then :
20642 cat >>confdefs.h <<_ACEOF
20643 #define HAVE_SIGSET_T 1
20646 gl_cv_type_sigset_t=yes
20648 gl_cv_type_sigset_t=no
20651 if test $gl_cv_type_sigset_t != yes; then
20657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
20658 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
20659 if ${ac_cv_c_restrict+:} false; then :
20660 $as_echo_n "(cached) " >&6
20662 ac_cv_c_restrict=no
20663 # The order here caters to the fact that C++ does not require restrict.
20664 for ac_kw in __restrict __restrict__ _Restrict restrict; do
20665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20666 /* end confdefs.h. */
20667 typedef int *int_ptr;
20668 int foo (int_ptr $ac_kw ip) { return ip[0]; }
20669 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
20670 int bar (int ip[$ac_kw]) { return ip[0]; }
20678 return foo (t) + bar (t);
20684 if ac_fn_c_try_compile "$LINENO"; then :
20685 ac_cv_c_restrict=$ac_kw
20687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20688 test "$ac_cv_c_restrict" != no && break
20692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
20693 $as_echo "$ac_cv_c_restrict" >&6; }
20695 case $ac_cv_c_restrict in
20697 no) $as_echo "#define restrict /**/" >>confdefs.h
20699 *) cat >>confdefs.h <<_ACEOF
20700 #define restrict $ac_cv_c_restrict
20705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
20706 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
20707 if ${ac_cv_type_uid_t+:} false; then :
20708 $as_echo_n "(cached) " >&6
20710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20711 /* end confdefs.h. */
20712 #include <sys/types.h>
20715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20716 $EGREP "uid_t" >/dev/null 2>&1; then :
20717 ac_cv_type_uid_t=yes
20719 ac_cv_type_uid_t=no
20724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
20725 $as_echo "$ac_cv_type_uid_t" >&6; }
20726 if test $ac_cv_type_uid_t = no; then
20728 $as_echo "#define uid_t int" >>confdefs.h
20731 $as_echo "#define gid_t int" >>confdefs.h
20739 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
20740 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
20746 cat >>confdefs.h <<_ACEOF
20747 #define HAVE_DECL_SNPRINTF $ac_have_decl
20754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20755 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
20756 if ${ac_cv_header_stdbool_h+:} false; then :
20757 $as_echo_n "(cached) " >&6
20759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20760 /* end confdefs.h. */
20762 #include <stdbool.h>
20767 typedef _Bool Bool;
20769 "error: bool is not defined"
20772 "error: false is not defined"
20775 "error: false is not 0"
20778 "error: true is not defined"
20781 "error: true is not 1"
20785 #ifndef __bool_true_false_are_defined
20786 "error: __bool_true_false_are_defined is not defined"
20789 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
20791 char a[true == 1 ? 1 : -1];
20792 char b[false == 0 ? 1 : -1];
20793 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
20794 char d[(bool) 0.5 == true ? 1 : -1];
20795 /* See body of main program for 'e'. */
20796 char f[(Bool) 0.0 == false ? 1 : -1];
20798 char h[sizeof (Bool)];
20799 char i[sizeof s.t];
20800 enum { j = false, k = true, l = false * true, m = true * 256 };
20801 /* The following fails for
20802 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
20804 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
20805 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
20806 /* Catch a bug in an HP-UX C compiler. See
20807 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
20808 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
20819 *pq |= q; *pq |= ! q;
20820 *qq |= q; *qq |= ! q;
20821 /* Refer to every declared value, to avoid compiler optimizations. */
20822 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
20823 + !m + !n + !o + !p + !q + !pq + !qq);
20829 if ac_fn_c_try_compile "$LINENO"; then :
20830 ac_cv_header_stdbool_h=yes
20832 ac_cv_header_stdbool_h=no
20834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
20837 $as_echo "$ac_cv_header_stdbool_h" >&6; }
20838 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
20839 if test "x$ac_cv_type__Bool" = xyes; then :
20841 cat >>confdefs.h <<_ACEOF
20842 #define HAVE__BOOL 1
20851 HAVE_MAX_ALIGN_T=1;
20856 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
20857 if test "x$ac_cv_have_decl_strdup" = xyes; then :
20863 cat >>confdefs.h <<_ACEOF
20864 #define HAVE_DECL_STRDUP $ac_have_decl
20880 if test $gl_cv_have_include_next = yes; then
20881 gl_cv_next_string_h='<'string.h'>'
20883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
20884 $as_echo_n "checking absolute name of <string.h>... " >&6; }
20885 if ${gl_cv_next_string_h+:} false; then :
20886 $as_echo_n "(cached) " >&6
20891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20892 /* end confdefs.h. */
20893 #include <string.h>
20896 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20897 *) gl_absname_cpp="$ac_cpp" ;;
20902 gl_dirsep_regex='[/\\]'
20905 gl_dirsep_regex='\/'
20908 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20909 gl_header_literal_regex=`echo 'string.h' \
20910 | sed -e "$gl_make_literal_regex_sed"`
20911 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20912 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20918 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20919 sed -n "$gl_absolute_header_sed"`
20921 gl_header=$gl_cv_absolute_string_h
20922 gl_cv_next_string_h='"'$gl_header'"'
20926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20927 $as_echo "$gl_cv_next_string_h" >&6; }
20929 NEXT_STRING_H=$gl_cv_next_string_h
20931 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20932 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20933 gl_next_as_first_directive='<'string.h'>'
20935 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20936 gl_next_as_first_directive=$gl_cv_next_string_h
20938 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
20945 for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
20946 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20948 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20949 if eval \${$as_gl_Symbol+:} false; then :
20950 $as_echo_n "(cached) " >&6
20952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20953 /* end confdefs.h. */
20954 #include <string.h>
20965 if ac_fn_c_try_compile "$LINENO"; then :
20966 eval "$as_gl_Symbol=yes"
20968 eval "$as_gl_Symbol=no"
20970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20972 eval ac_res=\$$as_gl_Symbol
20973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20974 $as_echo "$ac_res" >&6; }
20975 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20976 cat >>confdefs.h <<_ACEOF
20977 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20980 eval ac_cv_have_decl_$gl_func=yes
20985 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
20986 if test "x$ac_cv_have_decl_strndup" = xyes; then :
20992 cat >>confdefs.h <<_ACEOF
20993 #define HAVE_DECL_STRNDUP $ac_have_decl
20998 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
20999 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
21005 cat >>confdefs.h <<_ACEOF
21006 #define HAVE_DECL_STRNLEN $ac_have_decl
21019 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
21031 if test $gl_cv_have_include_next = yes; then
21032 gl_cv_next_sys_types_h='<'sys/types.h'>'
21034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
21035 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
21036 if ${gl_cv_next_sys_types_h+:} false; then :
21037 $as_echo_n "(cached) " >&6
21042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21043 /* end confdefs.h. */
21044 #include <sys/types.h>
21047 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21048 *) gl_absname_cpp="$ac_cpp" ;;
21053 gl_dirsep_regex='[/\\]'
21056 gl_dirsep_regex='\/'
21059 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21060 gl_header_literal_regex=`echo 'sys/types.h' \
21061 | sed -e "$gl_make_literal_regex_sed"`
21062 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21063 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21069 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21070 sed -n "$gl_absolute_header_sed"`
21072 gl_header=$gl_cv_absolute_sys_types_h
21073 gl_cv_next_sys_types_h='"'$gl_header'"'
21077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
21078 $as_echo "$gl_cv_next_sys_types_h" >&6; }
21080 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
21082 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21083 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21084 gl_next_as_first_directive='<'sys/types.h'>'
21086 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21087 gl_next_as_first_directive=$gl_cv_next_sys_types_h
21089 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
21102 WINDOWS_STAT_INODES=0
21114 GNULIB_LOCALTIME=0;
21115 GNULIB_NANOSLEEP=0;
21122 HAVE_DECL_LOCALTIME_R=1;
21128 REPLACE_CTIME=GNULIB_PORTCHECK;
21129 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
21130 REPLACE_MKTIME=GNULIB_PORTCHECK;
21131 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
21132 REPLACE_STRFTIME=GNULIB_PORTCHECK;
21133 REPLACE_TIMEGM=GNULIB_PORTCHECK;
21134 REPLACE_TZSET=GNULIB_PORTCHECK;
21136 : ${GNULIB_GETTIMEOFDAY=0};
21138 REPLACE_LOCALTIME=0;
21142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21143 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21144 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
21145 $as_echo_n "(cached) " >&6
21147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21148 /* end confdefs.h. */
21154 static struct timespec x; x.tv_sec = x.tv_nsec;
21159 if ac_fn_c_try_compile "$LINENO"; then :
21160 gl_cv_sys_struct_timespec_in_time_h=yes
21162 gl_cv_sys_struct_timespec_in_time_h=no
21164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21167 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21169 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21170 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21171 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21172 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
21173 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21174 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21177 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21178 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
21179 $as_echo_n "(cached) " >&6
21181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21182 /* end confdefs.h. */
21183 #include <sys/time.h>
21188 static struct timespec x; x.tv_sec = x.tv_nsec;
21193 if ac_fn_c_try_compile "$LINENO"; then :
21194 gl_cv_sys_struct_timespec_in_sys_time_h=yes
21196 gl_cv_sys_struct_timespec_in_sys_time_h=no
21198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21201 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21202 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21203 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21206 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21207 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
21208 $as_echo_n "(cached) " >&6
21210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21211 /* end confdefs.h. */
21212 #include <pthread.h>
21217 static struct timespec x; x.tv_sec = x.tv_nsec;
21222 if ac_fn_c_try_compile "$LINENO"; then :
21223 gl_cv_sys_struct_timespec_in_pthread_h=yes
21225 gl_cv_sys_struct_timespec_in_pthread_h=no
21227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21230 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21231 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21232 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
21235 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
21236 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
21237 $as_echo_n "(cached) " >&6
21239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21240 /* end confdefs.h. */
21241 #include <unistd.h>
21246 static struct timespec x; x.tv_sec = x.tv_nsec;
21251 if ac_fn_c_try_compile "$LINENO"; then :
21252 gl_cv_sys_struct_timespec_in_unistd_h=yes
21254 gl_cv_sys_struct_timespec_in_unistd_h=no
21256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
21259 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
21260 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
21261 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
21282 if test $gl_cv_have_include_next = yes; then
21283 gl_cv_next_time_h='<'time.h'>'
21285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21286 $as_echo_n "checking absolute name of <time.h>... " >&6; }
21287 if ${gl_cv_next_time_h+:} false; then :
21288 $as_echo_n "(cached) " >&6
21293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21294 /* end confdefs.h. */
21298 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21299 *) gl_absname_cpp="$ac_cpp" ;;
21304 gl_dirsep_regex='[/\\]'
21307 gl_dirsep_regex='\/'
21310 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21311 gl_header_literal_regex=`echo 'time.h' \
21312 | sed -e "$gl_make_literal_regex_sed"`
21313 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21314 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21320 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21321 sed -n "$gl_absolute_header_sed"`
21323 gl_header=$gl_cv_absolute_time_h
21324 gl_cv_next_time_h='"'$gl_header'"'
21328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21329 $as_echo "$gl_cv_next_time_h" >&6; }
21331 NEXT_TIME_H=$gl_cv_next_time_h
21333 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21334 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21335 gl_next_as_first_directive='<'time.h'>'
21337 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21338 gl_next_as_first_directive=$gl_cv_next_time_h
21340 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21355 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
21360 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
21365 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
21372 if test "$HAVE_LIBUNISTRING" = yes; then
21373 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
21374 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
21375 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
21378 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
21379 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
21385 cat >>confdefs.h <<_ACEOF
21386 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
21389 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
21390 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
21396 cat >>confdefs.h <<_ACEOF
21397 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
21400 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
21401 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
21407 cat >>confdefs.h <<_ACEOF
21408 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
21411 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
21412 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
21418 cat >>confdefs.h <<_ACEOF
21419 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
21422 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
21423 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
21429 cat >>confdefs.h <<_ACEOF
21430 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
21433 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
21434 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
21440 cat >>confdefs.h <<_ACEOF
21441 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
21444 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
21445 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
21451 cat >>confdefs.h <<_ACEOF
21452 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
21455 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
21456 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
21462 cat >>confdefs.h <<_ACEOF
21463 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
21466 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
21467 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
21473 cat >>confdefs.h <<_ACEOF
21474 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
21477 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
21478 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
21484 cat >>confdefs.h <<_ACEOF
21485 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
21488 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
21489 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
21495 cat >>confdefs.h <<_ACEOF
21496 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
21499 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
21500 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
21506 cat >>confdefs.h <<_ACEOF
21507 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
21510 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21511 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
21517 cat >>confdefs.h <<_ACEOF
21518 #define HAVE_DECL_UNSETENV $ac_have_decl
21521 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
21522 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
21528 cat >>confdefs.h <<_ACEOF
21529 #define HAVE_DECL_VSNPRINTF $ac_have_decl
21533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
21534 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
21535 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
21536 $as_echo_n "(cached) " >&6
21538 gl_cv_header_wchar_h_correct_inline=yes
21539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21540 /* end confdefs.h. */
21542 #define wcstod renamed_wcstod
21543 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21545 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21546 included before <wchar.h>. */
21547 #include <stddef.h>
21551 extern int zero (void);
21552 int main () { return zero(); }
21555 save_ac_compile="$ac_compile"
21556 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
21557 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21558 (eval $ac_compile) 2>&5
21560 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21561 test $ac_status = 0; }; then
21562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21563 /* end confdefs.h. */
21565 #define wcstod renamed_wcstod
21566 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21568 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21569 included before <wchar.h>. */
21570 #include <stddef.h>
21574 int zero (void) { return 0; }
21577 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
21578 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21579 (eval $ac_compile) 2>&5
21581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21582 test $ac_status = 0; }; then
21583 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
21586 gl_cv_header_wchar_h_correct_inline=no
21590 ac_compile="$save_ac_compile"
21591 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
21594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
21595 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
21596 if test $gl_cv_header_wchar_h_correct_inline = no; then
21597 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
21598 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
21599 C99 mode. You have four options:
21600 - Add the flag -fgnu89-inline to CC and reconfigure, or
21601 - Fix your include files, using parts of
21602 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
21603 - Use a gcc version older than 4.3, or
21604 - Don't use the flags -std=c99 or -std=gnu99.
21605 Configuration aborted." "$LINENO" 5
21612 if test $ac_cv_header_crtdefs_h = yes; then
21624 GNULIB_TOWCTRANS=0;
21628 REPLACE_ISWBLANK=0;
21638 GL_COND_LIBTOOL_TRUE=
21639 GL_COND_LIBTOOL_FALSE='#'
21641 GL_COND_LIBTOOL_TRUE='#'
21642 GL_COND_LIBTOOL_FALSE=
21645 gl_cond_libtool=false
21658 gl_source_base='lib'
21661 if test $ac_cv_func_alloca_works = no; then
21665 # Define an additional variable used in the Makefile substitution.
21666 if test $ac_cv_working_alloca_h = yes; then
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
21668 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
21669 if ${gl_cv_rpl_alloca+:} false; then :
21670 $as_echo_n "(cached) " >&6
21673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21674 /* end confdefs.h. */
21676 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
21681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21682 $EGREP "Need own alloca" >/dev/null 2>&1; then :
21683 gl_cv_rpl_alloca=yes
21685 gl_cv_rpl_alloca=no
21691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
21692 $as_echo "$gl_cv_rpl_alloca" >&6; }
21693 if test $gl_cv_rpl_alloca = yes; then
21695 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
21705 if test -n "$ALLOCA_H"; then
21706 GL_GENERATE_ALLOCA_H_TRUE=
21707 GL_GENERATE_ALLOCA_H_FALSE='#'
21709 GL_GENERATE_ALLOCA_H_TRUE='#'
21710 GL_GENERATE_ALLOCA_H_FALSE=
21715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
21716 $as_echo_n "checking whether to enable assertions... " >&6; }
21717 # Check whether --enable-assert was given.
21718 if test "${enable_assert+set}" = set; then :
21719 enableval=$enable_assert; if test "x$enableval" = xno; then :
21721 $as_echo "#define NDEBUG 1" >>confdefs.h
21723 elif test "x$enableval" != xyes; then :
21724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
21725 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
21732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
21733 $as_echo "$enable_assert" >&6; }
21738 if test $gl_cv_func_malloc_posix = yes; then
21740 $as_echo "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
21746 if test $REPLACE_CALLOC = 1; then
21755 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
21763 GNULIB_CALLOC_POSIX=1
21769 $as_echo "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
21775 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
21782 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21791 if test $ac_cv_header_sys_socket_h != yes; then
21792 for ac_header in winsock2.h
21794 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21795 if test "x$ac_cv_header_winsock2_h" = xyes; then :
21796 cat >>confdefs.h <<_ACEOF
21797 #define HAVE_WINSOCK2_H 1
21805 if test "$ac_cv_header_winsock2_h" = yes; then
21807 UNISTD_H_HAVE_WINSOCK2_H=1
21808 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21814 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
21820 if test $REPLACE_CLOSE = 1; then
21829 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
21843 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
21852 cat >>confdefs.h <<_ACEOF
21853 #define GNULIB_CLOSE_STREAM 1
21862 if test "x$datarootdir" = x; then
21863 datarootdir='${datadir}'
21866 if test "x$docdir" = x; then
21867 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
21870 if test "x$htmldir" = x; then
21871 htmldir='${docdir}'
21874 if test "x$dvidir" = x; then
21878 if test "x$pdfdir" = x; then
21882 if test "x$psdir" = x; then
21886 if test "x$lispdir" = x; then
21887 lispdir='${datarootdir}/emacs/site-lisp'
21890 if test "x$localedir" = x; then
21891 localedir='${datarootdir}/locale'
21894 if test "x$runstatedir" = x; then
21895 runstatedir='${localstatedir}/run'
21899 pkglibexecdir='${libexecdir}/${PACKAGE}'
21907 cat >>confdefs.h <<_ACEOF
21908 #define GNULIB_DIRNAME 1
21918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
21919 $as_echo_n "checking whether // is distinct from /... " >&6; }
21920 if ${gl_cv_double_slash_root+:} false; then :
21921 $as_echo_n "(cached) " >&6
21923 if test x"$cross_compiling" = xyes ; then
21924 # When cross-compiling, there is no way to tell whether // is special
21925 # short of a list of hosts. However, the only known hosts to date
21926 # that have a distinct // are Apollo DomainOS (too old to port to),
21927 # Cygwin, and z/OS. If anyone knows of another system for which // has
21928 # special semantics and is distinct from /, please report it to
21929 # <bug-gnulib@gnu.org>.
21931 *-cygwin | i370-ibm-openedition)
21932 gl_cv_double_slash_root=yes ;;
21934 # Be optimistic and assume that / and // are the same when we
21936 gl_cv_double_slash_root='unknown, assuming no' ;;
21939 set x `ls -di / // 2>/dev/null`
21940 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
21941 gl_cv_double_slash_root=no
21943 gl_cv_double_slash_root=yes
21947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
21948 $as_echo "$gl_cv_double_slash_root" >&6; }
21949 if test "$gl_cv_double_slash_root" = yes; then
21951 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
21960 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
21963 if test $HAVE_DUP2 = 1; then
21964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
21965 $as_echo_n "checking whether dup2 works... " >&6; }
21966 if ${gl_cv_func_dup2_works+:} false; then :
21967 $as_echo_n "(cached) " >&6
21969 if test "$cross_compiling" = yes; then :
21971 mingw*) # on this platform, dup2 always returns 0 for success
21972 gl_cv_func_dup2_works="guessing no" ;;
21973 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
21974 gl_cv_func_dup2_works="guessing no" ;;
21976 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
21978 gl_cv_func_dup2_works="guessing no" ;;
21979 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
21980 gl_cv_func_dup2_works="guessing no" ;;
21981 *-android*) # implemented using dup3(), which fails if oldfd == newfd
21982 gl_cv_func_dup2_works="guessing no" ;;
21983 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
21984 gl_cv_func_dup2_works="guessing no" ;;
21985 *) gl_cv_func_dup2_works="guessing yes" ;;
21988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21989 /* end confdefs.h. */
21993 #include <limits.h>
21994 #include <sys/resource.h>
21995 #include <unistd.h>
21996 #ifndef RLIM_SAVED_CUR
21997 # define RLIM_SAVED_CUR RLIM_INFINITY
21999 #ifndef RLIM_SAVED_MAX
22000 # define RLIM_SAVED_MAX RLIM_INFINITY
22007 int bad_fd = INT_MAX;
22008 struct rlimit rlim;
22009 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
22010 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
22011 && rlim.rlim_cur != RLIM_INFINITY
22012 && rlim.rlim_cur != RLIM_SAVED_MAX
22013 && rlim.rlim_cur != RLIM_SAVED_CUR)
22014 bad_fd = rlim.rlim_cur;
22016 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22019 if (dup2 (1, 1) != 1)
22022 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22026 if (dup2 (0, 0) != -1)
22028 /* Many gnulib modules require POSIX conformance of EBADF. */
22029 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
22031 /* Flush out some cygwin core dumps. */
22032 if (dup2 (2, -1) != -1 || errno != EBADF)
22036 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
22038 int fd = open (".", O_RDONLY);
22041 else if (dup2 (fd, fd + 1) == -1)
22052 if ac_fn_c_try_run "$LINENO"; then :
22053 gl_cv_func_dup2_works=yes
22055 gl_cv_func_dup2_works=no
22057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22058 conftest.$ac_objext conftest.beam conftest.$ac_ext
22063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22064 $as_echo "$gl_cv_func_dup2_works" >&6; }
22065 case "$gl_cv_func_dup2_works" in
22069 for ac_func in setdtablesize
22071 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
22072 if test "x$ac_cv_func_setdtablesize" = xyes; then :
22073 cat >>confdefs.h <<_ACEOF
22074 #define HAVE_SETDTABLESIZE 1
22085 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22094 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22109 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
22125 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
22131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
22132 $as_echo_n "checking for error_at_line... " >&6; }
22133 if ${ac_cv_lib_error_at_line+:} false; then :
22134 $as_echo_n "(cached) " >&6
22136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22137 /* end confdefs.h. */
22142 error_at_line (0, 0, "", 0, "an error occurred");
22147 if ac_fn_c_try_link "$LINENO"; then :
22148 ac_cv_lib_error_at_line=yes
22150 ac_cv_lib_error_at_line=no
22152 rm -f core conftest.err conftest.$ac_objext \
22153 conftest$ac_exeext conftest.$ac_ext
22155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
22156 $as_echo "$ac_cv_lib_error_at_line" >&6; }
22158 if test $ac_cv_lib_error_at_line = no; then
22167 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
22176 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
22180 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
22193 if test $ac_cv_func_fcntl = no; then
22197 if test $ac_cv_func_fcntl = no; then
22204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22205 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22206 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
22207 $as_echo_n "(cached) " >&6
22209 if test "$cross_compiling" = yes; then :
22211 aix* | cygwin* | haiku*)
22212 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
22213 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
22216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22217 /* end confdefs.h. */
22220 #include <limits.h>
22221 #include <sys/resource.h>
22222 #include <unistd.h>
22223 #ifndef RLIM_SAVED_CUR
22224 # define RLIM_SAVED_CUR RLIM_INFINITY
22226 #ifndef RLIM_SAVED_MAX
22227 # define RLIM_SAVED_MAX RLIM_INFINITY
22234 int bad_fd = INT_MAX;
22235 struct rlimit rlim;
22236 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
22237 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
22238 && rlim.rlim_cur != RLIM_INFINITY
22239 && rlim.rlim_cur != RLIM_SAVED_MAX
22240 && rlim.rlim_cur != RLIM_SAVED_CUR)
22241 bad_fd = rlim.rlim_cur;
22242 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22243 if (errno != EINVAL) result |= 2;
22244 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
22245 if (errno != EINVAL) result |= 8;
22246 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
22249 fd = open (".", O_RDONLY);
22252 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
22262 if ac_fn_c_try_run "$LINENO"; then :
22263 gl_cv_func_fcntl_f_dupfd_works=yes
22265 gl_cv_func_fcntl_f_dupfd_works=no
22267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22268 conftest.$ac_objext conftest.beam conftest.$ac_ext
22272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22273 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22274 case $gl_cv_func_fcntl_f_dupfd_works in
22279 if test $ac_cv_func_fcntl = no; then
22286 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22291 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22292 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
22293 $as_echo_n "(cached) " >&6
22295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22296 /* end confdefs.h. */
22299 #ifndef F_DUPFD_CLOEXEC
22311 if ac_fn_c_try_compile "$LINENO"; then :
22312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22313 /* end confdefs.h. */
22316 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22317 it to support the semantics on older kernels that failed with EINVAL. */
22329 if ac_fn_c_try_compile "$LINENO"; then :
22330 gl_cv_func_fcntl_f_dupfd_cloexec=yes
22332 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22336 gl_cv_func_fcntl_f_dupfd_cloexec=no
22338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22341 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22342 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22346 if test $ac_cv_func_fcntl = no; then
22356 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22365 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22379 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
22394 if test $gl_cv_have_include_next = yes; then
22395 gl_cv_next_fcntl_h='<'fcntl.h'>'
22397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22398 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22399 if ${gl_cv_next_fcntl_h+:} false; then :
22400 $as_echo_n "(cached) " >&6
22405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22406 /* end confdefs.h. */
22410 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22411 *) gl_absname_cpp="$ac_cpp" ;;
22416 gl_dirsep_regex='[/\\]'
22419 gl_dirsep_regex='\/'
22422 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22423 gl_header_literal_regex=`echo 'fcntl.h' \
22424 | sed -e "$gl_make_literal_regex_sed"`
22425 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22426 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22432 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22433 sed -n "$gl_absolute_header_sed"`
22435 gl_header=$gl_cv_absolute_fcntl_h
22436 gl_cv_next_fcntl_h='"'$gl_header'"'
22440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22441 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22443 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22445 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22446 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22447 gl_next_as_first_directive='<'fcntl.h'>'
22449 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22450 gl_next_as_first_directive=$gl_cv_next_fcntl_h
22452 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22463 for gl_func in fcntl openat; do
22464 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22466 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22467 if eval \${$as_gl_Symbol+:} false; then :
22468 $as_echo_n "(cached) " >&6
22470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22471 /* end confdefs.h. */
22483 if ac_fn_c_try_compile "$LINENO"; then :
22484 eval "$as_gl_Symbol=yes"
22486 eval "$as_gl_Symbol=no"
22488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22490 eval ac_res=\$$as_gl_Symbol
22491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22492 $as_echo "$ac_res" >&6; }
22493 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22494 cat >>confdefs.h <<_ACEOF
22495 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22498 eval ac_cv_have_decl_$gl_func=yes
22505 cat >>confdefs.h <<_ACEOF
22506 #define GNULIB_FD_SAFER_FLAG 1
22514 REPLACE_FLOAT_LDBL=0
22516 aix* | beos* | openbsd* | mirbsd* | irix*)
22519 freebsd* | dragonfly*)
22520 case "$host_cpu" in
22525 # On x86_64 systems, the C compiler may still be generating
22527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22528 /* end confdefs.h. */
22529 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
22536 if ac_fn_c_try_compile "$LINENO"; then :
22541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22546 case "$host_cpu" in
22554 aix* | freebsd* | dragonfly* | linux*)
22555 if test -n "$FLOAT_H"; then
22556 REPLACE_FLOAT_LDBL=1
22562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
22563 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
22564 if ${gl_cv_func_itold_works+:} false; then :
22565 $as_echo_n "(cached) " >&6
22568 if test "$cross_compiling" = yes; then :
22571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22572 /* end confdefs.h. */
22573 #if defined __LP64__ || defined __arch64__
22580 if ac_fn_c_try_compile "$LINENO"; then :
22581 gl_cv_func_itold_works="guessing no"
22583 gl_cv_func_itold_works="guessing yes"
22585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22587 # Guess yes on native Windows.
22588 mingw*) gl_cv_func_itold_works="guessing yes" ;;
22589 *) gl_cv_func_itold_works="guessing yes" ;;
22593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22594 /* end confdefs.h. */
22597 volatile long double ld;
22606 if ac_fn_c_try_run "$LINENO"; then :
22607 gl_cv_func_itold_works=yes
22609 gl_cv_func_itold_works=no
22611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22612 conftest.$ac_objext conftest.beam conftest.$ac_ext
22617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
22618 $as_echo "$gl_cv_func_itold_works" >&6; }
22619 case "$gl_cv_func_itold_works" in
22626 if test -n "$FLOAT_H"; then
22635 if test $gl_cv_have_include_next = yes; then
22636 gl_cv_next_float_h='<'float.h'>'
22638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
22639 $as_echo_n "checking absolute name of <float.h>... " >&6; }
22640 if ${gl_cv_next_float_h+:} false; then :
22641 $as_echo_n "(cached) " >&6
22646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22647 /* end confdefs.h. */
22651 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22652 *) gl_absname_cpp="$ac_cpp" ;;
22657 gl_dirsep_regex='[/\\]'
22660 gl_dirsep_regex='\/'
22663 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22664 gl_header_literal_regex=`echo 'float.h' \
22665 | sed -e "$gl_make_literal_regex_sed"`
22666 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22667 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22673 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22674 sed -n "$gl_absolute_header_sed"`
22676 gl_header=$gl_cv_absolute_float_h
22677 gl_cv_next_float_h='"'$gl_header'"'
22681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
22682 $as_echo "$gl_cv_next_float_h" >&6; }
22684 NEXT_FLOAT_H=$gl_cv_next_float_h
22686 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22687 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22688 gl_next_as_first_directive='<'float.h'>'
22690 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22691 gl_next_as_first_directive=$gl_cv_next_float_h
22693 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
22700 if test -n "$FLOAT_H"; then
22701 GL_GENERATE_FLOAT_H_TRUE=
22702 GL_GENERATE_FLOAT_H_FALSE='#'
22704 GL_GENERATE_FLOAT_H_TRUE='#'
22705 GL_GENERATE_FLOAT_H_FALSE=
22710 if test $REPLACE_FLOAT_LDBL = 1; then
22719 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
22722 if test $REPLACE_ITOLD = 1; then
22731 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
22740 gl_cv_func_fopen_slash="guessing no"
22743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
22744 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
22745 if ${gl_cv_func_fopen_slash+:} false; then :
22746 $as_echo_n "(cached) " >&6
22749 if test "$cross_compiling" = yes; then :
22752 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22753 gl_cv_func_fopen_slash="guessing no" ;;
22755 gl_cv_func_fopen_slash="guessing yes" ;;
22759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22760 /* end confdefs.h. */
22762 #include <stddef.h>
22766 FILE *fp = fopen ("conftest.sl/", "w");
22767 int result = (fp != NULL);
22773 if ac_fn_c_try_run "$LINENO"; then :
22774 gl_cv_func_fopen_slash=yes
22776 gl_cv_func_fopen_slash=no
22778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22779 conftest.$ac_objext conftest.beam conftest.$ac_ext
22785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
22786 $as_echo "$gl_cv_func_fopen_slash" >&6; }
22789 case "$gl_cv_func_fopen_slash" in
22792 $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
22798 if test $REPLACE_FOPEN = 1; then
22807 gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
22822 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
22828 cat >>confdefs.h <<_ACEOF
22829 #define GNULIB_FOPEN_SAFER 1
22837 #if HAVE_STDIO_EXT_H
22838 # include <stdio_ext.h>
22841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
22842 $as_echo_n "checking for __fpending... " >&6; }
22843 if ${gl_cv_func___fpending+:} false; then :
22844 $as_echo_n "(cached) " >&6
22847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22848 /* end confdefs.h. */
22853 return ! __fpending (stdin);
22858 if ac_fn_c_try_link "$LINENO"; then :
22859 gl_cv_func___fpending=yes
22861 gl_cv_func___fpending=no
22863 rm -f core conftest.err conftest.$ac_objext \
22864 conftest$ac_exeext conftest.$ac_ext
22867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
22868 $as_echo "$gl_cv_func___fpending" >&6; }
22869 if test $gl_cv_func___fpending = yes; then
22870 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22872 if test "x$ac_cv_have_decl___fpending" = xyes; then :
22878 cat >>confdefs.h <<_ACEOF
22879 #define HAVE_DECL___FPENDING $ac_have_decl
22884 if test $gl_cv_func___fpending = no; then
22893 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22911 gl_cv_func_fprintf_posix=no
22912 case "$gl_cv_func_printf_sizes_c99" in
22914 case "$gl_cv_func_printf_long_double" in
22916 case "$gl_cv_func_printf_infinite" in
22918 case "$gl_cv_func_printf_infinite_long_double" in
22920 case "$gl_cv_func_printf_directive_a" in
22922 case "$gl_cv_func_printf_directive_f" in
22924 case "$gl_cv_func_printf_directive_n" in
22926 case "$gl_cv_func_printf_directive_ls" in
22928 case "$gl_cv_func_printf_positions" in
22930 case "$gl_cv_func_printf_flag_grouping" in
22932 case "$gl_cv_func_printf_flag_leftadjust" in
22934 case "$gl_cv_func_printf_flag_zero" in
22936 case "$gl_cv_func_printf_precision" in
22938 case "$gl_cv_func_printf_enomem" in
22940 # fprintf exists and is
22941 # already POSIX compliant.
22942 gl_cv_func_fprintf_posix=yes
22971 if test $gl_cv_func_fprintf_posix = no; then
22975 case "$gl_cv_func_printf_infinite" in
22980 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
22988 case "$gl_cv_func_printf_long_double" in
22990 case "$gl_cv_func_printf_infinite_long_double" in
22995 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
23004 case "$gl_cv_func_printf_directive_a" in
23009 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
23011 for ac_func in nl_langinfo
23013 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
23014 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
23015 cat >>confdefs.h <<_ACEOF
23016 #define HAVE_NL_LANGINFO 1
23027 case "$gl_cv_func_printf_directive_f" in
23032 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
23039 case "$gl_cv_func_printf_directive_ls" in
23044 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
23051 case "$gl_cv_func_printf_flag_grouping" in
23056 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
23063 case "$gl_cv_func_printf_flag_leftadjust" in
23068 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
23075 case "$gl_cv_func_printf_flag_zero" in
23080 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
23087 case "$gl_cv_func_printf_precision" in
23092 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
23095 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
23098 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
23105 case "$gl_cv_func_printf_enomem" in
23110 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
23113 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
23116 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
23131 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
23141 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
23151 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
23161 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
23163 if test $ac_cv_func_vasnprintf = yes; then
23165 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
23179 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23180 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23184 $as_echo "#define ptrdiff_t long" >>confdefs.h
23205 gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
23209 $as_echo "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
23220 GNULIB_FPRINTF_POSIX=1
23226 $as_echo "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
23233 if test $gl_cv_func_frexp_no_libm = yes; then
23237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
23238 $as_echo_n "checking whether frexp works... " >&6; }
23239 if ${gl_cv_func_frexp_works+:} false; then :
23240 $as_echo_n "(cached) " >&6
23243 if test "$cross_compiling" = yes; then :
23245 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
23246 mingw*) # Guess yes with MSVC, no with mingw.
23247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23248 /* end confdefs.h. */
23255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23256 $EGREP "Good" >/dev/null 2>&1; then :
23257 gl_cv_func_frexp_works="guessing yes"
23259 gl_cv_func_frexp_works="guessing no"
23264 *) gl_cv_func_frexp_works="guessing yes" ;;
23268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23269 /* end confdefs.h. */
23273 #include <string.h>
23274 #if HAVE_DECL_ALARM
23275 # include <signal.h>
23276 # include <unistd.h>
23278 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
23279 ICC 10.0 has a bug when optimizing the expression -zero.
23280 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
23281 to PowerPC on Mac OS X 10.5. */
23282 #if defined __hpux || defined __sgi || defined __ICC
23284 compute_minus_zero (void)
23286 return -DBL_MIN * DBL_MIN;
23288 # define minus_zero compute_minus_zero ()
23290 double minus_zero = -0.0;
23298 #if HAVE_DECL_ALARM
23299 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
23300 number. Let the test fail in this case. */
23301 signal (SIGALRM, SIG_DFL);
23304 /* Test on denormalized numbers. */
23305 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
23310 double y = frexp (x, &exp);
23311 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
23312 On NetBSD: y = 0.75. Correct: y = 0.5. */
23316 /* Test on infinite numbers. */
23320 double y = frexp (x, &exp);
23324 /* Test on negative zero. */
23328 double y = frexp (x, &exp);
23329 if (memcmp (&y, &x, sizeof x))
23335 if ac_fn_c_try_run "$LINENO"; then :
23336 gl_cv_func_frexp_works=yes
23338 gl_cv_func_frexp_works=no
23340 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23341 conftest.$ac_objext conftest.beam conftest.$ac_ext
23346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23347 $as_echo "$gl_cv_func_frexp_works" >&6; }
23349 case "$gl_cv_func_frexp_works" in
23350 *yes) gl_func_frexp_no_libm=yes ;;
23351 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
23354 gl_func_frexp_no_libm=no
23357 if test $gl_func_frexp_no_libm = yes; then
23359 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23363 if test $gl_func_frexp_no_libm != yes; then
23372 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
23386 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
23393 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
23395 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
23401 if test $HAVE_DECL_FREXPL = 1; then
23403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
23404 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
23405 if ${gl_cv_func_frexpl_no_libm+:} false; then :
23406 $as_echo_n "(cached) " >&6
23409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23410 /* end confdefs.h. */
23416 int e; return frexpl (x, &e) > 0;
23421 if ac_fn_c_try_link "$LINENO"; then :
23422 gl_cv_func_frexpl_no_libm=yes
23424 gl_cv_func_frexpl_no_libm=no
23426 rm -f core conftest.err conftest.$ac_objext \
23427 conftest$ac_exeext conftest.$ac_ext
23430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
23431 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
23433 if test $gl_cv_func_frexpl_no_libm = yes; then
23436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
23437 $as_echo_n "checking whether frexpl works... " >&6; }
23438 if ${gl_cv_func_frexpl_works+:} false; then :
23439 $as_echo_n "(cached) " >&6
23442 if test "$cross_compiling" = yes; then :
23445 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
23446 gl_cv_func_frexpl_works="guessing no";;
23447 *) gl_cv_func_frexpl_works="guessing yes";;
23451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23452 /* end confdefs.h. */
23456 /* Override the values of <float.h>, like done in float.in.h. */
23457 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
23458 # undef LDBL_MIN_EXP
23459 # define LDBL_MIN_EXP (-16381)
23461 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
23462 # undef LDBL_MIN_EXP
23463 # define LDBL_MIN_EXP (-16381)
23465 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
23466 # undef LDBL_MIN_EXP
23467 # define LDBL_MIN_EXP DBL_MIN_EXP
23469 #if defined __sgi && (LDBL_MANT_DIG >= 106)
23470 # if defined __GNUC__
23471 # undef LDBL_MIN_EXP
23472 # define LDBL_MIN_EXP DBL_MIN_EXP
23479 long double frexpl (long double, int *);
23483 volatile long double x;
23484 /* Test on finite numbers that fails on AIX 5.1. */
23492 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
23493 function returns an invalid (incorrectly normalized) value: it returns
23494 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
23495 but the correct result is
23496 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
23500 long double y = frexpl (x, &exp);
23501 if (!(exp == 1 && y == 0.505L))
23504 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
23505 LDBL_MAX_EXP = 16384.
23506 In the loop end test, we test x against Infinity, rather than comparing
23507 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
23510 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
23521 /* Test on denormalized numbers. */
23524 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
23529 long double y = frexpl (x, &exp);
23530 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
23531 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
23532 if (exp != LDBL_MIN_EXP - 1)
23536 /* Test on infinite numbers. */
23540 long double y = frexpl (x, &exp);
23547 if ac_fn_c_try_run "$LINENO"; then :
23548 gl_cv_func_frexpl_works=yes
23550 gl_cv_func_frexpl_works=no
23552 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23553 conftest.$ac_objext conftest.beam conftest.$ac_ext
23558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
23559 $as_echo "$gl_cv_func_frexpl_works" >&6; }
23561 case "$gl_cv_func_frexpl_works" in
23562 *yes) gl_func_frexpl_no_libm=yes ;;
23563 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
23566 gl_func_frexpl_no_libm=no
23569 if test $gl_func_frexpl_no_libm = yes; then
23571 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
23576 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
23585 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
23599 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
23606 if test $ac_cv_func___fseterr = no; then
23615 gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
23630 if test $REPLACE_FSTAT = 1; then
23639 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
23651 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
23671 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
23680 if test $ac_cv_func_getdtablesize = yes &&
23681 test $ac_cv_have_decl_getdtablesize = yes; then
23682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
23683 $as_echo_n "checking whether getdtablesize works... " >&6; }
23684 if ${gl_cv_func_getdtablesize_works+:} false; then :
23685 $as_echo_n "(cached) " >&6
23688 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
23690 if test "$cross_compiling" = yes; then :
23692 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
23693 gl_cv_func_getdtablesize_works="guessing no" ;;
23694 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
23698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23699 /* end confdefs.h. */
23701 #include <unistd.h>
23705 int size = getdtablesize();
23706 if (dup2 (0, getdtablesize()) != -1)
23708 if (size != getdtablesize())
23715 if ac_fn_c_try_run "$LINENO"; then :
23716 gl_cv_func_getdtablesize_works=yes
23718 gl_cv_func_getdtablesize_works=no
23720 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23721 conftest.$ac_objext conftest.beam conftest.$ac_ext
23728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
23729 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
23730 case "$gl_cv_func_getdtablesize_works" in
23731 *yes | "no (limitation)") ;;
23732 *) REPLACE_GETDTABLESIZE=1 ;;
23735 HAVE_GETDTABLESIZE=0
23738 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
23747 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
23756 GNULIB_GETDTABLESIZE=1
23762 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
23776 if test -n "$gl_replace_getopt"; then
23780 if test $REPLACE_GETOPT = 1; then
23783 if test $ac_cv_header_sys_cdefs_h = yes; then
23791 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23794 GETOPT_CDEFS_H=getopt-cdefs.h
23800 if test $REPLACE_GETOPT = 1; then
23809 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23819 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23821 GNULIB_GL_UNISTD_H_GETOPT=1
23828 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
23830 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
23836 cat >>confdefs.h <<_ACEOF
23837 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
23839 if test $ac_have_decl = 1; then :
23843 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
23845 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
23851 cat >>confdefs.h <<_ACEOF
23852 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
23854 if test $ac_have_decl = 1; then :
23858 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
23860 if test "x$ac_cv_have_decl___argv" = xyes; then :
23866 cat >>confdefs.h <<_ACEOF
23867 #define HAVE_DECL___ARGV $ac_have_decl
23869 if test $ac_have_decl = 1; then :
23874 # Incur the cost of this test only if none of the above worked.
23875 if test $ac_found = 0; then
23876 # On OpenBSD 5.1, using the global __progname variable appears to be
23877 # the only way to implement getprogname.
23878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
23879 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
23880 if ${gl_cv_var___progname+:} false; then :
23881 $as_echo_n "(cached) " >&6
23884 gl_cv_var___progname=
23885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23886 /* end confdefs.h. */
23887 extern char *__progname;
23891 return *__progname;
23897 if ac_fn_c_try_link "$LINENO"; then :
23898 gl_cv_var___progname=yes
23901 rm -f core conftest.err conftest.$ac_objext \
23902 conftest$ac_exeext conftest.$ac_ext
23906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
23907 $as_echo "$gl_cv_var___progname" >&6; }
23908 if test "$gl_cv_var___progname" = yes; then
23910 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
23918 # Autoconf 2.61a.99 and earlier don't support linking a file only
23919 # in VPATH builds. But since GNUmakefile is for maintainer use
23920 # only, it does not matter if we skip the link with older autoconf.
23921 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
23922 # builds, so use a shell variable to bypass this.
23923 GNUmakefile=GNUmakefile
23924 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
23936 if test -n "$STDINT_H"; then
23937 PRIPTR_PREFIX='"l"'
23939 for glpfx in '' l ll I64; do
23941 '') gltype1='int';;
23942 l) gltype1='long int';;
23943 ll) gltype1='long long int';;
23944 I64) gltype1='__int64';;
23946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23947 /* end confdefs.h. */
23948 #include <stdint.h>
23949 extern intptr_t foo;
23950 extern $gltype1 foo;
23959 if ac_fn_c_try_compile "$LINENO"; then :
23960 PRIPTR_PREFIX='"'$glpfx'"'
23962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23963 test -n "$PRIPTR_PREFIX" && break
23969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
23970 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
23971 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
23972 $as_echo_n "(cached) " >&6
23974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23975 /* end confdefs.h. */
23976 /* Work also in C++ mode. */
23977 #define __STDC_LIMIT_MACROS 1
23979 /* Work if build is not clean. */
23980 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23982 #include <limits.h>
23984 #include <stdint.h>
23987 #if defined INT32_MAX && defined INTMAX_MAX
23988 #define CONDITION (INT32_MAX < INTMAX_MAX)
23989 #elif HAVE_LONG_LONG_INT
23990 #define CONDITION (sizeof (int) < sizeof (long long int))
23992 #define CONDITION 0
23994 int test[CONDITION ? 1 : -1];
24003 if ac_fn_c_try_compile "$LINENO"; then :
24004 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
24006 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
24008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
24011 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
24012 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
24013 INT32_MAX_LT_INTMAX_MAX=1;
24015 INT32_MAX_LT_INTMAX_MAX=0;
24019 if test $APPLE_UNIVERSAL_BUILD = 0; then
24021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
24022 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
24023 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
24024 $as_echo_n "(cached) " >&6
24026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24027 /* end confdefs.h. */
24028 /* Work also in C++ mode. */
24029 #define __STDC_LIMIT_MACROS 1
24031 /* Work if build is not clean. */
24032 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
24034 #include <limits.h>
24036 #include <stdint.h>
24039 #if defined INT64_MAX
24040 #define CONDITION (INT64_MAX == LONG_MAX)
24041 #elif HAVE_LONG_LONG_INT
24042 #define CONDITION (sizeof (long long int) == sizeof (long int))
24044 #define CONDITION 0
24046 int test[CONDITION ? 1 : -1];
24055 if ac_fn_c_try_compile "$LINENO"; then :
24056 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
24058 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
24060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
24063 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
24064 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
24065 INT64_MAX_EQ_LONG_MAX=1;
24067 INT64_MAX_EQ_LONG_MAX=0;
24072 INT64_MAX_EQ_LONG_MAX=-1
24075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
24076 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
24077 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
24078 $as_echo_n "(cached) " >&6
24080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24081 /* end confdefs.h. */
24082 /* Work also in C++ mode. */
24083 #define __STDC_LIMIT_MACROS 1
24085 /* Work if build is not clean. */
24086 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
24088 #include <limits.h>
24090 #include <stdint.h>
24093 #if defined UINT32_MAX && defined UINTMAX_MAX
24094 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
24095 #elif HAVE_LONG_LONG_INT
24096 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
24098 #define CONDITION 0
24100 int test[CONDITION ? 1 : -1];
24109 if ac_fn_c_try_compile "$LINENO"; then :
24110 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
24112 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
24114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
24117 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
24118 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
24119 UINT32_MAX_LT_UINTMAX_MAX=1;
24121 UINT32_MAX_LT_UINTMAX_MAX=0;
24125 if test $APPLE_UNIVERSAL_BUILD = 0; then
24127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
24128 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
24129 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
24130 $as_echo_n "(cached) " >&6
24132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24133 /* end confdefs.h. */
24134 /* Work also in C++ mode. */
24135 #define __STDC_LIMIT_MACROS 1
24137 /* Work if build is not clean. */
24138 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
24140 #include <limits.h>
24142 #include <stdint.h>
24145 #if defined UINT64_MAX
24146 #define CONDITION (UINT64_MAX == ULONG_MAX)
24147 #elif HAVE_LONG_LONG_INT
24148 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
24150 #define CONDITION 0
24152 int test[CONDITION ? 1 : -1];
24161 if ac_fn_c_try_compile "$LINENO"; then :
24162 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
24164 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
24166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
24169 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
24170 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
24171 UINT64_MAX_EQ_ULONG_MAX=1;
24173 UINT64_MAX_EQ_ULONG_MAX=0;
24178 UINT64_MAX_EQ_ULONG_MAX=-1
24189 # If we replaced any of the underlying isnan* functions, replace
24190 # the isnan macro; it undoubtedly suffers from the same flaws.
24191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan macro works" >&5
24192 $as_echo_n "checking whether isnan macro works... " >&6; }
24193 if test $gl_func_isnanf = yes \
24194 && test $gl_func_isnand = yes \
24195 && test $gl_func_isnanl = yes; then
24196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24197 $as_echo "yes" >&6; }
24199 case " $ISNAN_LIBM " in
24200 *" $ISNANF_LIBM "*) ;;
24201 *) ISNAN_LIBM="$ISNAN_LIBM $ISNANF_LIBM" ;;
24203 case " $ISNAN_LIBM " in
24204 *" $ISNAND_LIBM "*) ;;
24205 *) ISNAN_LIBM="$ISNAN_LIBM $ISNAND_LIBM" ;;
24207 case " $ISNAN_LIBM " in
24208 *" $ISNANL_LIBM "*) ;;
24209 *) ISNAN_LIBM="$ISNAN_LIBM $ISNANL_LIBM" ;;
24212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24213 $as_echo "no" >&6; }
24230 $as_echo "#define GNULIB_TEST_ISNAN 1" >>confdefs.h
24238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
24239 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
24240 if ${gl_cv_func_isnand_no_libm+:} false; then :
24241 $as_echo_n "(cached) " >&6
24244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24245 /* end confdefs.h. */
24249 # define isnand(x) __builtin_isnan ((double)(x))
24252 # define isnand(x) isnan ((double)(x))
24263 if ac_fn_c_try_link "$LINENO"; then :
24264 gl_cv_func_isnand_no_libm=yes
24266 gl_cv_func_isnand_no_libm=no
24268 rm -f core conftest.err conftest.$ac_objext \
24269 conftest$ac_exeext conftest.$ac_ext
24272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
24273 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
24275 if test $gl_cv_func_isnand_no_libm = no; then
24277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used with libm" >&5
24278 $as_echo_n "checking whether isnan(double) can be used with libm... " >&6; }
24279 if ${gl_cv_func_isnand_in_libm+:} false; then :
24280 $as_echo_n "(cached) " >&6
24285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24286 /* end confdefs.h. */
24290 # define isnand(x) __builtin_isnan ((double)(x))
24291 #elif defined isnan
24293 # define isnand(x) isnan ((double)(x))
24304 if ac_fn_c_try_link "$LINENO"; then :
24305 gl_cv_func_isnand_in_libm=yes
24307 gl_cv_func_isnand_in_libm=no
24309 rm -f core conftest.err conftest.$ac_objext \
24310 conftest$ac_exeext conftest.$ac_ext
24314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_in_libm" >&5
24315 $as_echo "$gl_cv_func_isnand_in_libm" >&6; }
24317 if test $gl_cv_func_isnand_in_libm = yes; then
24321 if test $gl_cv_func_isnand_no_libm = yes \
24322 || test $gl_cv_func_isnand_in_libm = yes; then
24333 if test $HAVE_ISNAND = 0 || test $REPLACE_ISNAN = 1; then
24342 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
24359 $as_echo "#define GNULIB_TEST_ISNAND 1" >>confdefs.h
24365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
24366 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
24367 if ${gl_cv_func_isnand_no_libm+:} false; then :
24368 $as_echo_n "(cached) " >&6
24371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24372 /* end confdefs.h. */
24376 # define isnand(x) __builtin_isnan ((double)(x))
24379 # define isnand(x) isnan ((double)(x))
24390 if ac_fn_c_try_link "$LINENO"; then :
24391 gl_cv_func_isnand_no_libm=yes
24393 gl_cv_func_isnand_no_libm=no
24395 rm -f core conftest.err conftest.$ac_objext \
24396 conftest$ac_exeext conftest.$ac_ext
24399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
24400 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
24402 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
24403 if test $gl_cv_func_isnand_no_libm = yes; then
24405 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
24409 if test $gl_func_isnand_no_libm != yes; then
24418 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
24428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
24429 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
24430 if ${gl_cv_func_isnanf_no_libm+:} false; then :
24431 $as_echo_n "(cached) " >&6
24434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24435 /* end confdefs.h. */
24439 # define isnanf(x) __builtin_isnanf ((float)(x))
24440 #elif defined isnan
24442 # define isnanf(x) isnan ((float)(x))
24453 if ac_fn_c_try_link "$LINENO"; then :
24454 gl_cv_func_isnanf_no_libm=yes
24456 gl_cv_func_isnanf_no_libm=no
24458 rm -f core conftest.err conftest.$ac_objext \
24459 conftest$ac_exeext conftest.$ac_ext
24462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
24463 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
24465 if test $gl_cv_func_isnanf_no_libm = no; then
24467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used with libm" >&5
24468 $as_echo_n "checking whether isnan(float) can be used with libm... " >&6; }
24469 if ${gl_cv_func_isnanf_in_libm+:} false; then :
24470 $as_echo_n "(cached) " >&6
24475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24476 /* end confdefs.h. */
24480 # define isnanf(x) __builtin_isnanf ((float)(x))
24481 #elif defined isnan
24483 # define isnanf(x) isnan ((float)(x))
24494 if ac_fn_c_try_link "$LINENO"; then :
24495 gl_cv_func_isnanf_in_libm=yes
24497 gl_cv_func_isnanf_in_libm=no
24499 rm -f core conftest.err conftest.$ac_objext \
24500 conftest$ac_exeext conftest.$ac_ext
24504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_in_libm" >&5
24505 $as_echo "$gl_cv_func_isnanf_in_libm" >&6; }
24507 if test $gl_cv_func_isnanf_in_libm = yes; then
24511 if test $gl_cv_func_isnanf_no_libm = yes \
24512 || test $gl_cv_func_isnanf_in_libm = yes; then
24514 LIBS="$LIBS $ISNANF_LIBM"
24518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
24519 $as_echo_n "checking whether isnan(float) works... " >&6; }
24520 if ${gl_cv_func_isnanf_works+:} false; then :
24521 $as_echo_n "(cached) " >&6
24524 if test "$cross_compiling" = yes; then :
24526 irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
24527 mingw*) # Guess yes on mingw, no on MSVC.
24528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24529 /* end confdefs.h. */
24536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24537 $EGREP "Known" >/dev/null 2>&1; then :
24538 gl_cv_func_isnanf_works="guessing yes"
24540 gl_cv_func_isnanf_works="guessing no"
24545 *) gl_cv_func_isnanf_works="guessing yes" ;;
24549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24550 /* end confdefs.h. */
24555 # define isnanf(x) __builtin_isnanf ((float)(x))
24556 #elif defined isnan
24558 # define isnanf(x) isnan ((float)(x))
24560 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
24565 static float zero = 0.0f;
24566 return zero / zero;
24569 # define NaN() (0.0f / 0.0f)
24572 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24573 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
24578 if (isnanf (1.0f / 0.0f))
24581 if (!isnanf (NaN ()))
24584 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
24585 /* The isnanf function should be immune against changes in the sign bit and
24586 in the mantissa bits. The xor operation twiddles a bit that can only be
24587 a sign bit or a mantissa bit. */
24588 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
24593 /* Set the bits below the exponent to 01111...111. */
24594 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
24595 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
24596 if (!isnanf (m.value))
24604 if ac_fn_c_try_run "$LINENO"; then :
24605 gl_cv_func_isnanf_works=yes
24607 gl_cv_func_isnanf_works=no
24609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24610 conftest.$ac_objext conftest.beam conftest.$ac_ext
24615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
24616 $as_echo "$gl_cv_func_isnanf_works" >&6; }
24619 case "$gl_cv_func_isnanf_works" in
24620 *yes) gl_func_isnanf=yes ;;
24621 *) gl_func_isnanf=no; ISNANF_LIBM= ;;
24626 if test $gl_func_isnanf != yes; then
24634 if test $HAVE_ISNANF = 0 || test $REPLACE_ISNAN = 1; then
24643 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
24647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
24648 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
24649 if ${gl_cv_cc_float_expbit0+:} false; then :
24650 $as_echo_n "(cached) " >&6
24653 if test "$cross_compiling" = yes; then :
24654 gl_cv_cc_float_expbit0="word 0 bit 23"
24656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24657 /* end confdefs.h. */
24660 #include <stddef.h>
24662 #include <string.h>
24664 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24665 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
24666 static unsigned int ored_words[NWORDS];
24667 static unsigned int anded_words[NWORDS];
24668 static void add_to_ored_words (float x)
24672 /* Clear it first, in case
24673 sizeof (float) < sizeof (memory_float). */
24674 memset (&m, 0, sizeof (memory_float));
24676 for (i = 0; i < NWORDS; i++)
24678 ored_words[i] |= m.word[i];
24679 anded_words[i] &= m.word[i];
24685 FILE *fp = fopen ("conftest.out", "w");
24688 for (j = 0; j < NWORDS; j++)
24689 anded_words[j] = ~ (unsigned int) 0;
24690 add_to_ored_words (0.25f);
24691 add_to_ored_words (0.5f);
24692 add_to_ored_words (1.0f);
24693 add_to_ored_words (2.0f);
24694 add_to_ored_words (4.0f);
24695 /* Remove bits that are common (e.g. if representation of the first mantissa
24696 bit is explicit). */
24697 for (j = 0; j < NWORDS; j++)
24698 ored_words[j] &= ~anded_words[j];
24699 /* Now find the nonzero word. */
24700 for (j = 0; j < NWORDS; j++)
24701 if (ored_words[j] != 0)
24706 for (i = j + 1; i < NWORDS; i++)
24707 if (ored_words[i] != 0)
24709 fprintf (fp, "unknown");
24710 return (fclose (fp) != 0);
24713 if ((ored_words[j] >> i) & 1)
24715 fprintf (fp, "word %d bit %d", (int) j, (int) i);
24716 return (fclose (fp) != 0);
24719 fprintf (fp, "unknown");
24720 return (fclose (fp) != 0);
24724 if ac_fn_c_try_run "$LINENO"; then :
24725 gl_cv_cc_float_expbit0=`cat conftest.out`
24727 gl_cv_cc_float_expbit0="unknown"
24729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24730 conftest.$ac_objext conftest.beam conftest.$ac_ext
24736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
24737 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
24738 case "$gl_cv_cc_float_expbit0" in
24740 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
24741 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
24743 cat >>confdefs.h <<_ACEOF
24744 #define FLT_EXPBIT0_WORD $word
24748 cat >>confdefs.h <<_ACEOF
24749 #define FLT_EXPBIT0_BIT $bit
24768 $as_echo "#define GNULIB_TEST_ISNANF 1" >>confdefs.h
24774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
24775 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
24776 if ${gl_cv_func_isnanf_no_libm+:} false; then :
24777 $as_echo_n "(cached) " >&6
24780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24781 /* end confdefs.h. */
24785 # define isnanf(x) __builtin_isnanf ((float)(x))
24786 #elif defined isnan
24788 # define isnanf(x) isnan ((float)(x))
24799 if ac_fn_c_try_link "$LINENO"; then :
24800 gl_cv_func_isnanf_no_libm=yes
24802 gl_cv_func_isnanf_no_libm=no
24804 rm -f core conftest.err conftest.$ac_objext \
24805 conftest$ac_exeext conftest.$ac_ext
24808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
24809 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
24811 if test $gl_cv_func_isnanf_no_libm = yes; then
24815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
24816 $as_echo_n "checking whether isnan(float) works... " >&6; }
24817 if ${gl_cv_func_isnanf_works+:} false; then :
24818 $as_echo_n "(cached) " >&6
24821 if test "$cross_compiling" = yes; then :
24823 irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
24824 mingw*) # Guess yes on mingw, no on MSVC.
24825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24826 /* end confdefs.h. */
24833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24834 $EGREP "Known" >/dev/null 2>&1; then :
24835 gl_cv_func_isnanf_works="guessing yes"
24837 gl_cv_func_isnanf_works="guessing no"
24842 *) gl_cv_func_isnanf_works="guessing yes" ;;
24846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24847 /* end confdefs.h. */
24852 # define isnanf(x) __builtin_isnanf ((float)(x))
24853 #elif defined isnan
24855 # define isnanf(x) isnan ((float)(x))
24857 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
24862 static float zero = 0.0f;
24863 return zero / zero;
24866 # define NaN() (0.0f / 0.0f)
24869 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24870 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
24875 if (isnanf (1.0f / 0.0f))
24878 if (!isnanf (NaN ()))
24881 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
24882 /* The isnanf function should be immune against changes in the sign bit and
24883 in the mantissa bits. The xor operation twiddles a bit that can only be
24884 a sign bit or a mantissa bit. */
24885 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
24890 /* Set the bits below the exponent to 01111...111. */
24891 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
24892 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
24893 if (!isnanf (m.value))
24901 if ac_fn_c_try_run "$LINENO"; then :
24902 gl_cv_func_isnanf_works=yes
24904 gl_cv_func_isnanf_works=no
24906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24907 conftest.$ac_objext conftest.beam conftest.$ac_ext
24912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
24913 $as_echo "$gl_cv_func_isnanf_works" >&6; }
24916 if test $gl_cv_func_isnanf_no_libm = yes \
24917 && { case "$gl_cv_func_isnanf_works" in
24922 gl_func_isnanf_no_libm=yes
24924 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
24927 gl_func_isnanf_no_libm=no
24930 if test $gl_func_isnanf_no_libm != yes; then
24939 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
24943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
24944 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
24945 if ${gl_cv_cc_float_expbit0+:} false; then :
24946 $as_echo_n "(cached) " >&6
24949 if test "$cross_compiling" = yes; then :
24950 gl_cv_cc_float_expbit0="word 0 bit 23"
24952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24953 /* end confdefs.h. */
24956 #include <stddef.h>
24958 #include <string.h>
24960 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24961 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
24962 static unsigned int ored_words[NWORDS];
24963 static unsigned int anded_words[NWORDS];
24964 static void add_to_ored_words (float x)
24968 /* Clear it first, in case
24969 sizeof (float) < sizeof (memory_float). */
24970 memset (&m, 0, sizeof (memory_float));
24972 for (i = 0; i < NWORDS; i++)
24974 ored_words[i] |= m.word[i];
24975 anded_words[i] &= m.word[i];
24981 FILE *fp = fopen ("conftest.out", "w");
24984 for (j = 0; j < NWORDS; j++)
24985 anded_words[j] = ~ (unsigned int) 0;
24986 add_to_ored_words (0.25f);
24987 add_to_ored_words (0.5f);
24988 add_to_ored_words (1.0f);
24989 add_to_ored_words (2.0f);
24990 add_to_ored_words (4.0f);
24991 /* Remove bits that are common (e.g. if representation of the first mantissa
24992 bit is explicit). */
24993 for (j = 0; j < NWORDS; j++)
24994 ored_words[j] &= ~anded_words[j];
24995 /* Now find the nonzero word. */
24996 for (j = 0; j < NWORDS; j++)
24997 if (ored_words[j] != 0)
25002 for (i = j + 1; i < NWORDS; i++)
25003 if (ored_words[i] != 0)
25005 fprintf (fp, "unknown");
25006 return (fclose (fp) != 0);
25009 if ((ored_words[j] >> i) & 1)
25011 fprintf (fp, "word %d bit %d", (int) j, (int) i);
25012 return (fclose (fp) != 0);
25015 fprintf (fp, "unknown");
25016 return (fclose (fp) != 0);
25020 if ac_fn_c_try_run "$LINENO"; then :
25021 gl_cv_cc_float_expbit0=`cat conftest.out`
25023 gl_cv_cc_float_expbit0="unknown"
25025 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25026 conftest.$ac_objext conftest.beam conftest.$ac_ext
25032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
25033 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
25034 case "$gl_cv_cc_float_expbit0" in
25036 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
25037 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
25039 cat >>confdefs.h <<_ACEOF
25040 #define FLT_EXPBIT0_WORD $word
25044 cat >>confdefs.h <<_ACEOF
25045 #define FLT_EXPBIT0_BIT $bit
25057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
25058 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
25059 if ${gl_cv_func_isnanl_no_libm+:} false; then :
25060 $as_echo_n "(cached) " >&6
25063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25064 /* end confdefs.h. */
25068 # define isnanl(x) __builtin_isnanl ((long double)(x))
25069 #elif defined isnan
25071 # define isnanl(x) isnan ((long double)(x))
25082 if ac_fn_c_try_link "$LINENO"; then :
25083 gl_cv_func_isnanl_no_libm=yes
25085 gl_cv_func_isnanl_no_libm=no
25087 rm -f core conftest.err conftest.$ac_objext \
25088 conftest$ac_exeext conftest.$ac_ext
25091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
25092 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
25094 if test $gl_cv_func_isnanl_no_libm = no; then
25096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used with libm" >&5
25097 $as_echo_n "checking whether isnan(long double) can be used with libm... " >&6; }
25098 if ${gl_cv_func_isnanl_in_libm+:} false; then :
25099 $as_echo_n "(cached) " >&6
25104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25105 /* end confdefs.h. */
25109 # define isnanl(x) __builtin_isnanl ((long double)(x))
25110 #elif defined isnan
25112 # define isnanl(x) isnan ((long double)(x))
25123 if ac_fn_c_try_link "$LINENO"; then :
25124 gl_cv_func_isnanl_in_libm=yes
25126 gl_cv_func_isnanl_in_libm=no
25128 rm -f core conftest.err conftest.$ac_objext \
25129 conftest$ac_exeext conftest.$ac_ext
25133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_in_libm" >&5
25134 $as_echo "$gl_cv_func_isnanl_in_libm" >&6; }
25136 if test $gl_cv_func_isnanl_in_libm = yes; then
25140 if test $gl_cv_func_isnanl_no_libm = yes \
25141 || test $gl_cv_func_isnanl_in_libm = yes; then
25143 LIBS="$LIBS $ISNANL_LIBM"
25148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
25149 $as_echo_n "checking whether isnanl works... " >&6; }
25150 if ${gl_cv_func_isnanl_works+:} false; then :
25151 $as_echo_n "(cached) " >&6
25154 if test "$cross_compiling" = yes; then :
25156 mingw*) # Guess yes on mingw, no on MSVC.
25157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25158 /* end confdefs.h. */
25165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25166 $EGREP "Known" >/dev/null 2>&1; then :
25167 gl_cv_func_isnanl_works="guessing yes"
25169 gl_cv_func_isnanl_works="guessing no"
25174 *) gl_cv_func_isnanl_works="guessing yes" ;;
25178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25179 /* end confdefs.h. */
25182 #include <limits.h>
25186 # define isnanl(x) __builtin_isnanl ((long double)(x))
25187 #elif defined isnan
25189 # define isnanl(x) isnan ((long double)(x))
25192 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25193 typedef union { unsigned int word[NWORDS]; long double value; }
25194 memory_long_double;
25195 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
25196 runtime type conversion. */
25198 static long double NaNl ()
25201 return zero / zero;
25204 # define NaNl() (0.0L / 0.0L)
25210 if (!isnanl (NaNl ()))
25214 memory_long_double m;
25217 /* The isnanl function should be immune against changes in the sign bit and
25218 in the mantissa bits. The xor operation twiddles a bit that can only be
25219 a sign bit or a mantissa bit (since the exponent never extends to
25222 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
25223 for (i = 0; i < NWORDS; i++)
25225 if (!isnanl (m.value))
25229 #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
25230 /* Representation of an 80-bit 'long double' as an initializer for a sequence
25231 of 'unsigned int' words. */
25232 # ifdef WORDS_BIGENDIAN
25233 # define LDBL80_WORDS(exponent,manthi,mantlo) \
25234 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
25235 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
25236 (unsigned int) (mantlo) << 16 \
25239 # define LDBL80_WORDS(exponent,manthi,mantlo) \
25240 { mantlo, manthi, exponent }
25243 static memory_long_double x =
25244 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
25245 if (!isnanl (x.value))
25249 /* Signalling NaN. */
25250 static memory_long_double x =
25251 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
25252 if (!isnanl (x.value))
25255 /* isnanl should return something even for noncanonical values. */
25256 { /* Pseudo-NaN. */
25257 static memory_long_double x =
25258 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
25259 if (isnanl (x.value) && !isnanl (x.value))
25262 { /* Pseudo-Infinity. */
25263 static memory_long_double x =
25264 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
25265 if (isnanl (x.value) && !isnanl (x.value))
25268 { /* Pseudo-Zero. */
25269 static memory_long_double x =
25270 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
25271 if (isnanl (x.value) && !isnanl (x.value))
25274 { /* Unnormalized number. */
25275 static memory_long_double x =
25276 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
25277 if (isnanl (x.value) && !isnanl (x.value))
25280 { /* Pseudo-Denormal. */
25281 static memory_long_double x =
25282 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
25283 if (isnanl (x.value) && !isnanl (x.value))
25291 if ac_fn_c_try_run "$LINENO"; then :
25292 gl_cv_func_isnanl_works=yes
25294 gl_cv_func_isnanl_works=no
25296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25297 conftest.$ac_objext conftest.beam conftest.$ac_ext
25302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
25303 $as_echo "$gl_cv_func_isnanl_works" >&6; }
25306 case "$gl_cv_func_isnanl_works" in
25307 *yes) gl_func_isnanl=yes ;;
25308 *) gl_func_isnanl=no; ISNANL_LIBM= ;;
25313 if test $gl_func_isnanl != yes; then
25321 if test $HAVE_ISNANL = 0 || test $REPLACE_ISNAN = 1; then
25330 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
25335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
25336 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
25337 if ${gl_cv_cc_long_double_expbit0+:} false; then :
25338 $as_echo_n "(cached) " >&6
25341 if test "$cross_compiling" = yes; then :
25343 gl_cv_cc_long_double_expbit0="unknown"
25345 mingw*) # On native Windows (little-endian), we know the result
25346 # in two cases: mingw, MSVC.
25347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25348 /* end confdefs.h. */
25355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25356 $EGREP "Known" >/dev/null 2>&1; then :
25357 gl_cv_cc_long_double_expbit0="word 2 bit 0"
25361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25362 /* end confdefs.h. */
25369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25370 $EGREP "Known" >/dev/null 2>&1; then :
25371 gl_cv_cc_long_double_expbit0="word 1 bit 20"
25379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25380 /* end confdefs.h. */
25383 #include <stddef.h>
25385 #include <string.h>
25387 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25388 typedef union { long double value; unsigned int word[NWORDS]; }
25389 memory_long_double;
25390 static unsigned int ored_words[NWORDS];
25391 static unsigned int anded_words[NWORDS];
25392 static void add_to_ored_words (long double x)
25394 memory_long_double m;
25396 /* Clear it first, in case
25397 sizeof (long double) < sizeof (memory_long_double). */
25398 memset (&m, 0, sizeof (memory_long_double));
25400 for (i = 0; i < NWORDS; i++)
25402 ored_words[i] |= m.word[i];
25403 anded_words[i] &= m.word[i];
25409 FILE *fp = fopen ("conftest.out", "w");
25412 for (j = 0; j < NWORDS; j++)
25413 anded_words[j] = ~ (unsigned int) 0;
25414 add_to_ored_words (0.25L);
25415 add_to_ored_words (0.5L);
25416 add_to_ored_words (1.0L);
25417 add_to_ored_words (2.0L);
25418 add_to_ored_words (4.0L);
25419 /* Remove bits that are common (e.g. if representation of the first mantissa
25420 bit is explicit). */
25421 for (j = 0; j < NWORDS; j++)
25422 ored_words[j] &= ~anded_words[j];
25423 /* Now find the nonzero word. */
25424 for (j = 0; j < NWORDS; j++)
25425 if (ored_words[j] != 0)
25430 for (i = j + 1; i < NWORDS; i++)
25431 if (ored_words[i] != 0)
25433 fprintf (fp, "unknown");
25434 return (fclose (fp) != 0);
25437 if ((ored_words[j] >> i) & 1)
25439 fprintf (fp, "word %d bit %d", (int) j, (int) i);
25440 return (fclose (fp) != 0);
25443 fprintf (fp, "unknown");
25444 return (fclose (fp) != 0);
25448 if ac_fn_c_try_run "$LINENO"; then :
25449 gl_cv_cc_long_double_expbit0=`cat conftest.out`
25451 gl_cv_cc_long_double_expbit0="unknown"
25453 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25454 conftest.$ac_objext conftest.beam conftest.$ac_ext
25460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
25461 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
25462 case "$gl_cv_cc_long_double_expbit0" in
25464 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
25465 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
25467 cat >>confdefs.h <<_ACEOF
25468 #define LDBL_EXPBIT0_WORD $word
25472 cat >>confdefs.h <<_ACEOF
25473 #define LDBL_EXPBIT0_BIT $bit
25493 $as_echo "#define GNULIB_TEST_ISNANL 1" >>confdefs.h
25499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
25500 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
25501 if ${gl_cv_func_isnanl_no_libm+:} false; then :
25502 $as_echo_n "(cached) " >&6
25505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25506 /* end confdefs.h. */
25510 # define isnanl(x) __builtin_isnanl ((long double)(x))
25511 #elif defined isnan
25513 # define isnanl(x) isnan ((long double)(x))
25524 if ac_fn_c_try_link "$LINENO"; then :
25525 gl_cv_func_isnanl_no_libm=yes
25527 gl_cv_func_isnanl_no_libm=no
25529 rm -f core conftest.err conftest.$ac_objext \
25530 conftest$ac_exeext conftest.$ac_ext
25533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
25534 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
25536 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
25537 if test $gl_func_isnanl_no_libm = yes; then
25542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
25543 $as_echo_n "checking whether isnanl works... " >&6; }
25544 if ${gl_cv_func_isnanl_works+:} false; then :
25545 $as_echo_n "(cached) " >&6
25548 if test "$cross_compiling" = yes; then :
25550 mingw*) # Guess yes on mingw, no on MSVC.
25551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25552 /* end confdefs.h. */
25559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25560 $EGREP "Known" >/dev/null 2>&1; then :
25561 gl_cv_func_isnanl_works="guessing yes"
25563 gl_cv_func_isnanl_works="guessing no"
25568 *) gl_cv_func_isnanl_works="guessing yes" ;;
25572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25573 /* end confdefs.h. */
25576 #include <limits.h>
25580 # define isnanl(x) __builtin_isnanl ((long double)(x))
25581 #elif defined isnan
25583 # define isnanl(x) isnan ((long double)(x))
25586 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25587 typedef union { unsigned int word[NWORDS]; long double value; }
25588 memory_long_double;
25589 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
25590 runtime type conversion. */
25592 static long double NaNl ()
25595 return zero / zero;
25598 # define NaNl() (0.0L / 0.0L)
25604 if (!isnanl (NaNl ()))
25608 memory_long_double m;
25611 /* The isnanl function should be immune against changes in the sign bit and
25612 in the mantissa bits. The xor operation twiddles a bit that can only be
25613 a sign bit or a mantissa bit (since the exponent never extends to
25616 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
25617 for (i = 0; i < NWORDS; i++)
25619 if (!isnanl (m.value))
25623 #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
25624 /* Representation of an 80-bit 'long double' as an initializer for a sequence
25625 of 'unsigned int' words. */
25626 # ifdef WORDS_BIGENDIAN
25627 # define LDBL80_WORDS(exponent,manthi,mantlo) \
25628 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
25629 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
25630 (unsigned int) (mantlo) << 16 \
25633 # define LDBL80_WORDS(exponent,manthi,mantlo) \
25634 { mantlo, manthi, exponent }
25637 static memory_long_double x =
25638 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
25639 if (!isnanl (x.value))
25643 /* Signalling NaN. */
25644 static memory_long_double x =
25645 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
25646 if (!isnanl (x.value))
25649 /* isnanl should return something even for noncanonical values. */
25650 { /* Pseudo-NaN. */
25651 static memory_long_double x =
25652 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
25653 if (isnanl (x.value) && !isnanl (x.value))
25656 { /* Pseudo-Infinity. */
25657 static memory_long_double x =
25658 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
25659 if (isnanl (x.value) && !isnanl (x.value))
25662 { /* Pseudo-Zero. */
25663 static memory_long_double x =
25664 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
25665 if (isnanl (x.value) && !isnanl (x.value))
25668 { /* Unnormalized number. */
25669 static memory_long_double x =
25670 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
25671 if (isnanl (x.value) && !isnanl (x.value))
25674 { /* Pseudo-Denormal. */
25675 static memory_long_double x =
25676 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
25677 if (isnanl (x.value) && !isnanl (x.value))
25685 if ac_fn_c_try_run "$LINENO"; then :
25686 gl_cv_func_isnanl_works=yes
25688 gl_cv_func_isnanl_works=no
25690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25691 conftest.$ac_objext conftest.beam conftest.$ac_ext
25696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
25697 $as_echo "$gl_cv_func_isnanl_works" >&6; }
25699 case "$gl_cv_func_isnanl_works" in
25701 *) gl_func_isnanl_no_libm=no ;;
25704 if test $gl_func_isnanl_no_libm = yes; then
25706 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
25710 if test $gl_func_isnanl_no_libm != yes; then
25719 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
25724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
25725 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
25726 if ${gl_cv_cc_long_double_expbit0+:} false; then :
25727 $as_echo_n "(cached) " >&6
25730 if test "$cross_compiling" = yes; then :
25732 gl_cv_cc_long_double_expbit0="unknown"
25734 mingw*) # On native Windows (little-endian), we know the result
25735 # in two cases: mingw, MSVC.
25736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25737 /* end confdefs.h. */
25744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25745 $EGREP "Known" >/dev/null 2>&1; then :
25746 gl_cv_cc_long_double_expbit0="word 2 bit 0"
25750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25751 /* end confdefs.h. */
25758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25759 $EGREP "Known" >/dev/null 2>&1; then :
25760 gl_cv_cc_long_double_expbit0="word 1 bit 20"
25768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25769 /* end confdefs.h. */
25772 #include <stddef.h>
25774 #include <string.h>
25776 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25777 typedef union { long double value; unsigned int word[NWORDS]; }
25778 memory_long_double;
25779 static unsigned int ored_words[NWORDS];
25780 static unsigned int anded_words[NWORDS];
25781 static void add_to_ored_words (long double x)
25783 memory_long_double m;
25785 /* Clear it first, in case
25786 sizeof (long double) < sizeof (memory_long_double). */
25787 memset (&m, 0, sizeof (memory_long_double));
25789 for (i = 0; i < NWORDS; i++)
25791 ored_words[i] |= m.word[i];
25792 anded_words[i] &= m.word[i];
25798 FILE *fp = fopen ("conftest.out", "w");
25801 for (j = 0; j < NWORDS; j++)
25802 anded_words[j] = ~ (unsigned int) 0;
25803 add_to_ored_words (0.25L);
25804 add_to_ored_words (0.5L);
25805 add_to_ored_words (1.0L);
25806 add_to_ored_words (2.0L);
25807 add_to_ored_words (4.0L);
25808 /* Remove bits that are common (e.g. if representation of the first mantissa
25809 bit is explicit). */
25810 for (j = 0; j < NWORDS; j++)
25811 ored_words[j] &= ~anded_words[j];
25812 /* Now find the nonzero word. */
25813 for (j = 0; j < NWORDS; j++)
25814 if (ored_words[j] != 0)
25819 for (i = j + 1; i < NWORDS; i++)
25820 if (ored_words[i] != 0)
25822 fprintf (fp, "unknown");
25823 return (fclose (fp) != 0);
25826 if ((ored_words[j] >> i) & 1)
25828 fprintf (fp, "word %d bit %d", (int) j, (int) i);
25829 return (fclose (fp) != 0);
25832 fprintf (fp, "unknown");
25833 return (fclose (fp) != 0);
25837 if ac_fn_c_try_run "$LINENO"; then :
25838 gl_cv_cc_long_double_expbit0=`cat conftest.out`
25840 gl_cv_cc_long_double_expbit0="unknown"
25842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25843 conftest.$ac_objext conftest.beam conftest.$ac_ext
25849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
25850 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
25851 case "$gl_cv_cc_long_double_expbit0" in
25853 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
25854 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
25856 cat >>confdefs.h <<_ACEOF
25857 #define LDBL_EXPBIT0_WORD $word
25861 cat >>confdefs.h <<_ACEOF
25862 #define LDBL_EXPBIT0_BIT $bit
25871 # You need to invoke gt_JAVACOMP yourself, possibly with arguments.
25872 ac_config_files="$ac_config_files javacomp.sh:build-aux/javacomp.sh.in"
25874 # You need to invoke gt_JAVAEXEC yourself, possibly with arguments.
25875 ac_config_files="$ac_config_files javaexec.sh:build-aux/javaexec.sh.in"
25881 if test $gl_cv_func_ldexp_no_libm = no; then
25882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used with libm" >&5
25883 $as_echo_n "checking whether ldexp() can be used with libm... " >&6; }
25884 if ${gl_cv_func_ldexp_in_libm+:} false; then :
25885 $as_echo_n "(cached) " >&6
25890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25891 /* end confdefs.h. */
25892 #ifndef __NO_MATH_INLINES
25893 # define __NO_MATH_INLINES 1 /* for glibc */
25896 double (*funcptr) (double, int) = ldexp;
25901 return ldexp (x, -1) > 0;
25906 if ac_fn_c_try_link "$LINENO"; then :
25907 gl_cv_func_ldexp_in_libm=yes
25909 gl_cv_func_ldexp_in_libm=no
25911 rm -f core conftest.err conftest.$ac_objext \
25912 conftest$ac_exeext conftest.$ac_ext
25916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_in_libm" >&5
25917 $as_echo "$gl_cv_func_ldexp_in_libm" >&6; }
25918 if test $gl_cv_func_ldexp_in_libm = yes; then
25930 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
25932 if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
25940 if test $HAVE_DECL_LDEXPL = 1; then
25942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
25943 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
25944 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
25945 $as_echo_n "(cached) " >&6
25948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25949 /* end confdefs.h. */
25955 return ldexpl (x, -1) > 0;
25960 if ac_fn_c_try_link "$LINENO"; then :
25961 gl_cv_func_ldexpl_no_libm=yes
25963 gl_cv_func_ldexpl_no_libm=no
25965 rm -f core conftest.err conftest.$ac_objext \
25966 conftest$ac_exeext conftest.$ac_ext
25969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
25970 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
25972 if test $gl_cv_func_ldexpl_no_libm = no; then
25973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used with libm" >&5
25974 $as_echo_n "checking whether ldexpl() can be used with libm... " >&6; }
25975 if ${gl_cv_func_ldexpl_in_libm+:} false; then :
25976 $as_echo_n "(cached) " >&6
25981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25982 /* end confdefs.h. */
25988 return ldexpl (x, -1) > 0;
25993 if ac_fn_c_try_link "$LINENO"; then :
25994 gl_cv_func_ldexpl_in_libm=yes
25996 gl_cv_func_ldexpl_in_libm=no
25998 rm -f core conftest.err conftest.$ac_objext \
25999 conftest$ac_exeext conftest.$ac_ext
26003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_in_libm" >&5
26004 $as_echo "$gl_cv_func_ldexpl_in_libm" >&6; }
26005 if test $gl_cv_func_ldexpl_in_libm = yes; then
26009 if test $gl_cv_func_ldexpl_no_libm = yes \
26010 || test $gl_cv_func_ldexpl_in_libm = yes; then
26012 LIBS="$LIBS $LDEXPL_LIBM"
26015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
26016 $as_echo_n "checking whether ldexpl works... " >&6; }
26017 if ${gl_cv_func_ldexpl_works+:} false; then :
26018 $as_echo_n "(cached) " >&6
26021 if test "$cross_compiling" = yes; then :
26024 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
26025 # Guess yes on native Windows.
26026 mingw*) gl_cv_func_ldexpl_works="guessing yes" ;;
26027 *) gl_cv_func_ldexpl_works="guessing yes" ;;
26031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26032 /* end confdefs.h. */
26039 long double ldexpl (long double, int);
26044 volatile long double x = 1.0;
26045 volatile long double y = ldexpl (x, -1);
26050 volatile long double x = 1.73205L;
26051 volatile long double y = ldexpl (x, 0);
26058 if ac_fn_c_try_run "$LINENO"; then :
26059 gl_cv_func_ldexpl_works=yes
26061 gl_cv_func_ldexpl_works=no
26063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26064 conftest.$ac_objext conftest.beam conftest.$ac_ext
26069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
26070 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
26073 case "$gl_cv_func_ldexpl_works" in
26074 *yes) gl_func_ldexpl=yes ;;
26075 *) gl_func_ldexpl=no; REPLACE_LDEXPL=1 ;;
26080 if test $gl_func_ldexpl = yes; then
26082 $as_echo "#define HAVE_LDEXPL 1" >>confdefs.h
26086 if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then
26087 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
26089 LDEXPL_LIBM="$LDEXP_LIBM"
26091 LDEXPL_LIBM="$ISNANL_LIBM"
26096 if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then
26105 gl_LIBOBJS="$gl_LIBOBJS ldexpl.$ac_objext"
26119 $as_echo "#define GNULIB_TEST_LDEXPL 1" >>confdefs.h
26132 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
26136 if test "$gl_threads_api" = posix; then
26137 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
26138 # pthread_rwlock_* functions.
26140 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
26142 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
26145 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
26149 if $has_rwlock; then
26152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
26153 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
26154 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
26155 $as_echo_n "(cached) " >&6
26158 LIBS="$LIBS $LIBMULTITHREAD"
26159 if test "$cross_compiling" = yes; then :
26160 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
26162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26163 /* end confdefs.h. */
26166 #include <pthread.h>
26167 #include <stdlib.h>
26168 #include <unistd.h>
26170 #define SUCCEED() exit (0)
26171 #define FAILURE() exit (1)
26172 #define UNEXPECTED(n) (exit (10 + (n)))
26174 /* The main thread creates the waiting writer and the requesting reader threads
26175 in the default way; this guarantees that they have the same priority.
26176 We can reuse the main thread as first reader thread. */
26178 static pthread_rwlock_t lock;
26179 static pthread_t reader1;
26180 static pthread_t writer;
26181 static pthread_t reader2;
26182 static pthread_t timer;
26183 /* Used to pass control from writer to reader2 and from reader2 to timer,
26184 as in a relay race.
26185 Passing control from one running thread to another running thread
26186 is most likely faster than to create the second thread. */
26187 static pthread_mutex_t baton;
26190 timer_func (void *ignored)
26192 /* Step 13 (can be before or after step 12):
26193 The timer thread takes the baton, then waits a moment to make sure
26194 it can tell whether the second reader thread is blocked at step 12. */
26195 if (pthread_mutex_lock (&baton))
26198 /* By the time we get here, it's clear that the second reader thread is
26199 blocked at step 12. This is the desired behaviour. */
26204 reader2_func (void *ignored)
26208 /* Step 8 (can be before or after step 7):
26209 The second reader thread takes the baton, then waits a moment to make sure
26210 the writer thread has reached step 7. */
26211 if (pthread_mutex_lock (&baton))
26214 /* Step 9: The second reader thread requests the lock. */
26215 err = pthread_rwlock_tryrdlock (&lock);
26218 else if (err != EBUSY)
26220 /* Step 10: Launch a timer, to test whether the next call blocks. */
26221 if (pthread_create (&timer, NULL, timer_func, NULL))
26223 /* Step 11: Release the baton. */
26224 if (pthread_mutex_unlock (&baton))
26226 /* Step 12: The second reader thread requests the lock. */
26227 err = pthread_rwlock_rdlock (&lock);
26235 writer_func (void *ignored)
26237 /* Step 4: Take the baton, so that the second reader thread does not go ahead
26239 if (pthread_mutex_lock (&baton))
26241 /* Step 5: Create the second reader thread. */
26242 if (pthread_create (&reader2, NULL, reader2_func, NULL))
26244 /* Step 6: Release the baton. */
26245 if (pthread_mutex_unlock (&baton))
26247 /* Step 7: The writer thread requests the lock. */
26248 if (pthread_rwlock_wrlock (&lock))
26256 reader1 = pthread_self ();
26258 /* Step 1: The main thread initializes the lock and the baton. */
26259 if (pthread_rwlock_init (&lock, NULL))
26261 if (pthread_mutex_init (&baton, NULL))
26263 /* Step 2: The main thread acquires the lock as a reader. */
26264 if (pthread_rwlock_rdlock (&lock))
26266 /* Step 3: Create the writer thread. */
26267 if (pthread_create (&writer, NULL, writer_func, NULL))
26269 /* Job done. Go to sleep. */
26277 if ac_fn_c_try_run "$LINENO"; then :
26278 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
26280 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
26282 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26283 conftest.$ac_objext conftest.beam conftest.$ac_ext
26289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
26290 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
26291 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
26294 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
26300 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
26301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26302 /* end confdefs.h. */
26304 #include <pthread.h>
26309 #if __FreeBSD__ == 4
26310 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
26311 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
26312 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
26313 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
26315 int x = (int)PTHREAD_MUTEX_RECURSIVE;
26323 if ac_fn_c_try_compile "$LINENO"; then :
26325 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
26328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26334 cat >>confdefs.h <<_ACEOF
26335 #define GNULIB_LOCK 1
26343 if test $ac_cv_func_lstat = yes; then
26345 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
26354 if test $REPLACE_LSTAT = 1; then
26363 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
26378 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
26387 for ac_header in stdlib.h
26389 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
26390 if test "x$ac_cv_header_stdlib_h" = xyes; then :
26391 cat >>confdefs.h <<_ACEOF
26392 #define HAVE_STDLIB_H 1
26399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
26400 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
26401 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
26402 $as_echo_n "(cached) " >&6
26404 if test "$cross_compiling" = yes; then :
26406 # Guess yes on platforms where we know the result.
26407 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
26408 | hpux* | solaris* | cygwin* | mingw*)
26409 ac_cv_func_malloc_0_nonnull=yes ;;
26410 # If we don't know, assume the worst.
26411 *) ac_cv_func_malloc_0_nonnull=no ;;
26415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26416 /* end confdefs.h. */
26417 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
26418 # include <stdlib.h>
26426 char *p = malloc (0);
26435 if ac_fn_c_try_run "$LINENO"; then :
26436 ac_cv_func_malloc_0_nonnull=yes
26438 ac_cv_func_malloc_0_nonnull=no
26440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26441 conftest.$ac_objext conftest.beam conftest.$ac_ext
26446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
26447 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
26448 if test $ac_cv_func_malloc_0_nonnull = yes; then :
26450 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
26453 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
26460 if test $REPLACE_MALLOC = 1; then
26469 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
26474 cat >>confdefs.h <<_ACEOF
26475 #define GNULIB_MALLOC_GNU 1
26482 if test $gl_cv_func_malloc_posix = yes; then
26484 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
26490 if test $REPLACE_MALLOC = 1; then
26499 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
26507 GNULIB_MALLOC_POSIX=1
26513 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
26532 if test $gl_cv_have_include_next = yes; then
26533 gl_cv_next_math_h='<'math.h'>'
26535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
26536 $as_echo_n "checking absolute name of <math.h>... " >&6; }
26537 if ${gl_cv_next_math_h+:} false; then :
26538 $as_echo_n "(cached) " >&6
26541 if test $ac_cv_header_math_h = yes; then
26546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26547 /* end confdefs.h. */
26551 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26552 *) gl_absname_cpp="$ac_cpp" ;;
26557 gl_dirsep_regex='[/\\]'
26560 gl_dirsep_regex='\/'
26563 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26564 gl_header_literal_regex=`echo 'math.h' \
26565 | sed -e "$gl_make_literal_regex_sed"`
26566 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26567 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26573 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26574 sed -n "$gl_absolute_header_sed"`
26576 gl_header=$gl_cv_absolute_math_h
26577 gl_cv_next_math_h='"'$gl_header'"'
26579 gl_cv_next_math_h='<'math.h'>'
26584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
26585 $as_echo "$gl_cv_next_math_h" >&6; }
26587 NEXT_MATH_H=$gl_cv_next_math_h
26589 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26590 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26591 gl_next_as_first_directive='<'math.h'>'
26593 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26594 gl_next_as_first_directive=$gl_cv_next_math_h
26596 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
26602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
26603 $as_echo_n "checking whether NAN macro works... " >&6; }
26604 if ${gl_cv_header_math_nan_works+:} false; then :
26605 $as_echo_n "(cached) " >&6
26607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26608 /* end confdefs.h. */
26613 /* Solaris 10 has a broken definition of NAN. Other platforms
26614 fail to provide NAN, or provide it only in C99 mode; this
26615 test only needs to fail when NAN is provided but wrong. */
26625 if ac_fn_c_try_compile "$LINENO"; then :
26626 gl_cv_header_math_nan_works=yes
26628 gl_cv_header_math_nan_works=no
26630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
26633 $as_echo "$gl_cv_header_math_nan_works" >&6; }
26634 if test $gl_cv_header_math_nan_works = no; then
26637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
26638 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
26639 if ${gl_cv_header_math_huge_val_works+:} false; then :
26640 $as_echo_n "(cached) " >&6
26642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26643 /* end confdefs.h. */
26648 /* Solaris 10 has a broken definition of HUGE_VAL. */
26649 double d = HUGE_VAL;
26655 if ac_fn_c_try_compile "$LINENO"; then :
26656 gl_cv_header_math_huge_val_works=yes
26658 gl_cv_header_math_huge_val_works=no
26660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
26663 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
26664 if test $gl_cv_header_math_huge_val_works = no; then
26669 for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do
26670 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26672 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26673 if eval \${$as_gl_Symbol+:} false; then :
26674 $as_echo_n "(cached) " >&6
26676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26677 /* end confdefs.h. */
26688 if ac_fn_c_try_compile "$LINENO"; then :
26689 eval "$as_gl_Symbol=yes"
26691 eval "$as_gl_Symbol=no"
26693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26695 eval ac_res=\$$as_gl_Symbol
26696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26697 $as_echo "$ac_res" >&6; }
26698 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26699 cat >>confdefs.h <<_ACEOF
26700 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26703 eval ac_cv_have_decl_$gl_func=yes
26718 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
26722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
26723 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
26724 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
26725 $as_echo_n "(cached) " >&6
26729 # Guess no on AIX and OSF/1.
26730 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
26731 # Guess yes otherwise.
26732 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
26734 if test $LOCALE_JA != none; then
26735 if test "$cross_compiling" = yes; then :
26738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26739 /* end confdefs.h. */
26741 #include <locale.h>
26742 #include <string.h>
26743 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26745 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26746 included before <wchar.h>. */
26747 #include <stddef.h>
26753 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
26755 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
26759 memset (&state, '\0', sizeof (mbstate_t));
26760 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
26761 if (mbsinit (&state))
26767 if ac_fn_c_try_run "$LINENO"; then :
26768 gl_cv_func_mbrtowc_incomplete_state=yes
26770 gl_cv_func_mbrtowc_incomplete_state=no
26772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26773 conftest.$ac_objext conftest.beam conftest.$ac_ext
26779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
26780 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
26785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
26786 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
26787 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
26788 $as_echo_n "(cached) " >&6
26792 # Guess no on Solaris 8.
26793 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
26794 # Guess yes otherwise.
26795 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
26797 if test $LOCALE_ZH_CN != none; then
26798 if test "$cross_compiling" = yes; then :
26801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26802 /* end confdefs.h. */
26804 #include <locale.h>
26805 #include <stdlib.h>
26806 #include <string.h>
26807 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26809 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26810 included before <wchar.h>. */
26811 #include <stddef.h>
26817 /* This fails on Solaris 8:
26818 mbrtowc returns 2, and sets wc to 0x00F0.
26819 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
26820 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
26822 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
26826 memset (&state, '\0', sizeof (mbstate_t));
26827 if (mbrtowc (&wc, input + 3, 6, &state) != 4
26828 && mbtowc (&wc, input + 3, 6) == 4)
26834 if ac_fn_c_try_run "$LINENO"; then :
26835 gl_cv_func_mbrtowc_sanitycheck=yes
26837 gl_cv_func_mbrtowc_sanitycheck=no
26839 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26840 conftest.$ac_objext conftest.beam conftest.$ac_ext
26846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
26847 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
26849 REPLACE_MBSTATE_T=0
26850 case "$gl_cv_func_mbrtowc_incomplete_state" in
26852 *) REPLACE_MBSTATE_T=1 ;;
26854 case "$gl_cv_func_mbrtowc_sanitycheck" in
26856 *) REPLACE_MBSTATE_T=1 ;;
26859 REPLACE_MBSTATE_T=1
26864 if test $ac_cv_func_mbrtowc = no; then
26866 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
26867 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26869 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26870 included before <wchar.h>. */
26871 #include <stddef.h>
26877 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
26883 cat >>confdefs.h <<_ACEOF
26884 #define HAVE_DECL_MBRTOWC $ac_have_decl
26887 if test $ac_cv_have_decl_mbrtowc = yes; then
26891 if test $REPLACE_MBSTATE_T = 1; then
26897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
26898 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
26899 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
26900 $as_echo_n "(cached) " >&6
26904 # Guess no on Solaris.
26905 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
26906 # Guess yes otherwise.
26907 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
26909 if test $LOCALE_FR_UTF8 != none; then
26910 if test "$cross_compiling" = yes; then :
26913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26914 /* end confdefs.h. */
26916 #include <locale.h>
26917 #include <stdlib.h>
26918 #include <string.h>
26919 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26921 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26922 included before <wchar.h>. */
26923 #include <stddef.h>
26931 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
26933 char input[] = "\303\237er";
26938 memset (&state, '\0', sizeof (mbstate_t));
26939 wc = (wchar_t) 0xBADFACE;
26940 ret = mbrtowc (&wc, input, 5, &state);
26943 if (!mbsinit (&state))
26946 memset (&state, '\0', sizeof (mbstate_t));
26947 ret = mbrtowc (NULL, input, 5, &state);
26948 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
26950 if (!mbsinit (&state))
26956 if ac_fn_c_try_run "$LINENO"; then :
26957 gl_cv_func_mbrtowc_null_arg1=yes
26959 gl_cv_func_mbrtowc_null_arg1=no
26961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26962 conftest.$ac_objext conftest.beam conftest.$ac_ext
26968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
26969 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
26974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
26975 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
26976 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
26977 $as_echo_n "(cached) " >&6
26981 # Guess no on OSF/1.
26982 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
26983 # Guess yes otherwise.
26984 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
26986 if test $LOCALE_FR_UTF8 != none; then
26987 if test "$cross_compiling" = yes; then :
26990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26991 /* end confdefs.h. */
26993 #include <locale.h>
26994 #include <string.h>
26995 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26997 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26998 included before <wchar.h>. */
26999 #include <stddef.h>
27005 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27011 memset (&state, '\0', sizeof (mbstate_t));
27012 wc = (wchar_t) 0xBADFACE;
27013 mbrtowc (&wc, NULL, 5, &state);
27014 /* Check that wc was not modified. */
27015 if (wc != (wchar_t) 0xBADFACE)
27021 if ac_fn_c_try_run "$LINENO"; then :
27022 gl_cv_func_mbrtowc_null_arg2=yes
27024 gl_cv_func_mbrtowc_null_arg2=no
27026 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27027 conftest.$ac_objext conftest.beam conftest.$ac_ext
27033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
27034 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
27041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
27042 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
27043 if ${gl_cv_func_mbrtowc_retval+:} false; then :
27044 $as_echo_n "(cached) " >&6
27048 # Guess no on HP-UX, Solaris, native Windows.
27049 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
27050 # Guess yes otherwise.
27051 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
27053 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
27054 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
27055 if test "$cross_compiling" = yes; then :
27058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27059 /* end confdefs.h. */
27061 #include <locale.h>
27062 #include <string.h>
27063 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27065 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27066 included before <wchar.h>. */
27067 #include <stddef.h>
27074 int found_some_locale = 0;
27075 /* This fails on Solaris. */
27076 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27078 char input[] = "B\303\274\303\237er"; /* "Büßer" */
27082 memset (&state, '\0', sizeof (mbstate_t));
27083 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27086 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
27089 found_some_locale = 1;
27091 /* This fails on HP-UX 11.11. */
27092 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
27094 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
27098 memset (&state, '\0', sizeof (mbstate_t));
27099 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27102 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
27105 found_some_locale = 1;
27107 /* This fails on native Windows. */
27108 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
27110 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
27114 memset (&state, '\0', sizeof (mbstate_t));
27115 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27118 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27121 found_some_locale = 1;
27123 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
27125 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
27129 memset (&state, '\0', sizeof (mbstate_t));
27130 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27133 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27136 found_some_locale = 1;
27138 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
27140 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
27144 memset (&state, '\0', sizeof (mbstate_t));
27145 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27148 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27151 found_some_locale = 1;
27153 return (found_some_locale ? result : 77);
27156 if ac_fn_c_try_run "$LINENO"; then :
27157 gl_cv_func_mbrtowc_retval=yes
27159 if test $? != 77; then
27160 gl_cv_func_mbrtowc_retval=no
27164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27165 conftest.$ac_objext conftest.beam conftest.$ac_ext
27171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
27172 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
27177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
27178 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
27179 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
27180 $as_echo_n "(cached) " >&6
27184 # Guess no on Solaris 8 and 9.
27185 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
27186 # Guess yes otherwise.
27187 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
27189 if test $LOCALE_ZH_CN != none; then
27190 if test "$cross_compiling" = yes; then :
27193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27194 /* end confdefs.h. */
27196 #include <locale.h>
27197 #include <string.h>
27198 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27200 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27201 included before <wchar.h>. */
27202 #include <stddef.h>
27208 /* This fails on Solaris 8 and 9. */
27209 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
27214 memset (&state, '\0', sizeof (mbstate_t));
27215 if (mbrtowc (&wc, "", 1, &state) != 0)
27221 if ac_fn_c_try_run "$LINENO"; then :
27222 gl_cv_func_mbrtowc_nul_retval=yes
27224 gl_cv_func_mbrtowc_nul_retval=no
27226 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27227 conftest.$ac_objext conftest.beam conftest.$ac_ext
27233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
27234 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
27238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
27239 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
27240 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
27241 $as_echo_n "(cached) " >&6
27245 # Guess no on AIX and glibc systems.
27246 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
27247 # Guess yes on native Windows.
27248 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
27249 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
27251 if test "$cross_compiling" = yes; then :
27254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27255 /* end confdefs.h. */
27259 static mbstate_t mbs;
27263 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
27266 if ac_fn_c_try_run "$LINENO"; then :
27267 gl_cv_func_mbrtowc_empty_input=yes
27269 gl_cv_func_mbrtowc_empty_input=no
27271 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27272 conftest.$ac_objext conftest.beam conftest.$ac_ext
27277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
27278 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
27281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
27282 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
27283 if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
27284 $as_echo_n "(cached) " >&6
27287 gl_cv_C_locale_sans_EILSEQ="guessing no"
27289 if test "$cross_compiling" = yes; then :
27291 # Guess yes on native Windows.
27292 mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
27296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27297 /* end confdefs.h. */
27298 #include <limits.h>
27299 #include <locale.h>
27307 char *locale = setlocale (LC_ALL, "C");
27310 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
27314 mbstate_t mbs = { 0, };
27315 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
27325 if ac_fn_c_try_run "$LINENO"; then :
27326 gl_cv_C_locale_sans_EILSEQ=yes
27328 gl_cv_C_locale_sans_EILSEQ=no
27330 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27331 conftest.$ac_objext conftest.beam conftest.$ac_ext
27336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
27337 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
27339 case "$gl_cv_func_mbrtowc_null_arg1" in
27342 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
27347 case "$gl_cv_func_mbrtowc_null_arg2" in
27350 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
27355 case "$gl_cv_func_mbrtowc_retval" in
27358 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
27363 case "$gl_cv_func_mbrtowc_nul_retval" in
27366 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
27371 case "$gl_cv_func_mbrtowc_empty_input" in
27374 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
27379 case $gl_cv_C_locale_sans_EILSEQ in
27382 $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
27390 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
27399 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
27416 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
27431 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
27435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
27436 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
27437 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
27438 $as_echo_n "(cached) " >&6
27442 # Guess no on AIX and OSF/1.
27443 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
27444 # Guess yes otherwise.
27445 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
27447 if test $LOCALE_JA != none; then
27448 if test "$cross_compiling" = yes; then :
27451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27452 /* end confdefs.h. */
27454 #include <locale.h>
27455 #include <string.h>
27456 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27458 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27459 included before <wchar.h>. */
27460 #include <stddef.h>
27466 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
27468 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
27472 memset (&state, '\0', sizeof (mbstate_t));
27473 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27474 if (mbsinit (&state))
27480 if ac_fn_c_try_run "$LINENO"; then :
27481 gl_cv_func_mbrtowc_incomplete_state=yes
27483 gl_cv_func_mbrtowc_incomplete_state=no
27485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27486 conftest.$ac_objext conftest.beam conftest.$ac_ext
27492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
27493 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
27498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
27499 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
27500 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
27501 $as_echo_n "(cached) " >&6
27505 # Guess no on Solaris 8.
27506 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
27507 # Guess yes otherwise.
27508 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
27510 if test $LOCALE_ZH_CN != none; then
27511 if test "$cross_compiling" = yes; then :
27514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27515 /* end confdefs.h. */
27517 #include <locale.h>
27518 #include <stdlib.h>
27519 #include <string.h>
27520 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27522 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27523 included before <wchar.h>. */
27524 #include <stddef.h>
27530 /* This fails on Solaris 8:
27531 mbrtowc returns 2, and sets wc to 0x00F0.
27532 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
27533 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
27535 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
27539 memset (&state, '\0', sizeof (mbstate_t));
27540 if (mbrtowc (&wc, input + 3, 6, &state) != 4
27541 && mbtowc (&wc, input + 3, 6) == 4)
27547 if ac_fn_c_try_run "$LINENO"; then :
27548 gl_cv_func_mbrtowc_sanitycheck=yes
27550 gl_cv_func_mbrtowc_sanitycheck=no
27552 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27553 conftest.$ac_objext conftest.beam conftest.$ac_ext
27559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
27560 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
27562 REPLACE_MBSTATE_T=0
27563 case "$gl_cv_func_mbrtowc_incomplete_state" in
27565 *) REPLACE_MBSTATE_T=1 ;;
27567 case "$gl_cv_func_mbrtowc_sanitycheck" in
27569 *) REPLACE_MBSTATE_T=1 ;;
27572 REPLACE_MBSTATE_T=1
27577 if test $ac_cv_func_mbsinit = no; then
27579 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
27580 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27582 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27583 included before <wchar.h>. */
27584 #include <stddef.h>
27590 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
27596 cat >>confdefs.h <<_ACEOF
27597 #define HAVE_DECL_MBSINIT $ac_have_decl
27600 if test $ac_cv_have_decl_mbsinit = yes; then
27604 if test $REPLACE_MBSTATE_T = 1; then
27608 mingw*) REPLACE_MBSINIT=1 ;;
27613 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
27622 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
27639 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
27647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbswidth is declared in <wchar.h>" >&5
27648 $as_echo_n "checking whether mbswidth is declared in <wchar.h>... " >&6; }
27649 if ${ac_cv_have_decl_mbswidth+:} false; then :
27650 $as_echo_n "(cached) " >&6
27652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27653 /* end confdefs.h. */
27655 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27657 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
27658 before <wchar.h>. */
27659 #include <stddef.h>
27668 char *p = (char *) mbswidth;
27675 if ac_fn_c_try_compile "$LINENO"; then :
27676 ac_cv_have_decl_mbswidth=yes
27678 ac_cv_have_decl_mbswidth=no
27680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_mbswidth" >&5
27683 $as_echo "$ac_cv_have_decl_mbswidth" >&6; }
27684 if test $ac_cv_have_decl_mbswidth = yes; then
27690 cat >>confdefs.h <<_ACEOF
27691 #define HAVE_DECL_MBSWIDTH_IN_WCHAR_H $ac_val
27697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
27698 $as_echo_n "checking for mbstate_t... " >&6; }
27699 if ${ac_cv_type_mbstate_t+:} false; then :
27700 $as_echo_n "(cached) " >&6
27702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27703 /* end confdefs.h. */
27704 $ac_includes_default
27705 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27707 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27708 included before <wchar.h>. */
27709 #include <stddef.h>
27716 mbstate_t x; return sizeof x;
27721 if ac_fn_c_try_compile "$LINENO"; then :
27722 ac_cv_type_mbstate_t=yes
27724 ac_cv_type_mbstate_t=no
27726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
27729 $as_echo "$ac_cv_type_mbstate_t" >&6; }
27730 if test $ac_cv_type_mbstate_t = yes; then
27732 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
27736 $as_echo "#define mbstate_t int" >>confdefs.h
27742 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
27751 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
27754 for ac_header in bp-sym.h
27756 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
27757 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
27758 cat >>confdefs.h <<_ACEOF
27759 #define HAVE_BP_SYM_H 1
27779 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
27787 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27796 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
27800 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27809 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
27814 cat >>confdefs.h <<_ACEOF
27815 #define GNULIB_MSVC_NOTHROW 1
27833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
27834 $as_echo_n "checking for obstacks that work with any size object... " >&6; }
27835 if ${ac_cv_func_obstack+:} false; then :
27836 $as_echo_n "(cached) " >&6
27838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27839 /* end confdefs.h. */
27840 #include "obstack.h"
27841 void *obstack_chunk_alloc (size_t n) { return 0; }
27842 void obstack_chunk_free (void *p) { }
27843 /* Check that an internal function returns size_t, not int. */
27844 size_t _obstack_memory_used (struct obstack *);
27849 struct obstack mem;
27850 obstack_init (&mem);
27851 obstack_free (&mem, 0);
27857 if ac_fn_c_try_link "$LINENO"; then :
27858 ac_cv_func_obstack=yes
27860 ac_cv_func_obstack=no
27862 rm -f core conftest.err conftest.$ac_objext \
27863 conftest$ac_exeext conftest.$ac_ext
27865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
27866 $as_echo "$ac_cv_func_obstack" >&6; }
27867 if test "$ac_cv_func_obstack" = yes; then
27869 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
27880 gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
27889 if test $ac_cv_func_obstack_printf = no ; then
27892 if test $ac_cv_func_obstack_printf = yes; then
27893 REPLACE_OBSTACK_PRINTF=1
27900 if test $ac_cv_have_decl_obstack_printf = no; then
27901 HAVE_DECL_OBSTACK_PRINTF=0
27905 if test $ac_cv_func_obstack_printf = no || test $REPLACE_OBSTACK_PRINTF = 1; then
27914 gl_LIBOBJS="$gl_LIBOBJS obstack_printf.$ac_objext"
27922 GNULIB_OBSTACK_PRINTF=1
27928 $as_echo "#define GNULIB_TEST_OBSTACK_PRINTF 1" >>confdefs.h
27941 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
27944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
27945 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
27946 if ${gl_cv_func_open_slash+:} false; then :
27947 $as_echo_n "(cached) " >&6
27949 # Assume that if we have lstat, we can also check symlinks.
27950 if test $ac_cv_func_lstat = yes; then
27952 ln -s conftest.tmp conftest.lnk
27954 if test "$cross_compiling" = yes; then :
27957 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
27958 gl_cv_func_open_slash="guessing no" ;;
27960 gl_cv_func_open_slash="guessing yes" ;;
27964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27965 /* end confdefs.h. */
27969 # include <unistd.h>
27975 if (open ("conftest.lnk/", O_RDONLY) != -1)
27978 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
27983 if ac_fn_c_try_run "$LINENO"; then :
27984 gl_cv_func_open_slash=yes
27986 gl_cv_func_open_slash=no
27988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27989 conftest.$ac_objext conftest.beam conftest.$ac_ext
27992 rm -f conftest.sl conftest.tmp conftest.lnk
27995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
27996 $as_echo "$gl_cv_func_open_slash" >&6; }
27997 case "$gl_cv_func_open_slash" in
28000 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
28010 if test $REPLACE_OPEN = 1; then
28019 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
28037 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
28049 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
28052 case ${gl_cv_func_strerror_r_works-unset} in
28054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
28055 $as_echo_n "checking whether perror matches strerror... " >&6; }
28056 if ${gl_cv_func_perror_works+:} false; then :
28057 $as_echo_n "(cached) " >&6
28059 if test "$cross_compiling" = yes; then :
28061 # Guess yes on native Windows.
28062 mingw*) gl_cv_func_perror_works="guessing yes" ;;
28063 # Otherwise guess no.
28064 *) gl_cv_func_perror_works="guessing no" ;;
28068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28069 /* end confdefs.h. */
28072 #include <stdlib.h>
28073 #include <string.h>
28078 char *str = strerror (-1);
28079 if (!getenv("CONFTEST_OUTPUT")) return 0;
28080 if (!str) str = "";
28090 if ac_fn_c_try_run "$LINENO"; then :
28091 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
28092 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
28093 gl_cv_func_perror_works=yes
28095 gl_cv_func_perror_works=no
28097 rm -rf conftest.txt1 conftest.txt2
28099 gl_cv_func_perror_works=no
28101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28102 conftest.$ac_objext conftest.beam conftest.$ac_ext
28107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
28108 $as_echo "$gl_cv_func_perror_works" >&6; }
28109 case "$gl_cv_func_perror_works" in
28111 *) REPLACE_PERROR=1 ;;
28119 if test $REPLACE_PERROR = 1; then
28128 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
28142 $as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
28152 if test $ac_cv_func_pipe2 != yes; then
28167 $as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
28173 cat >>confdefs.h <<_ACEOF
28174 #define GNULIB_PIPE2_SAFER 1
28184 if test $REPLACE_POSIX_SPAWN = 1; then
28185 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
28187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
28188 $as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
28189 if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
28190 $as_echo_n "(cached) " >&6
28192 if test "$cross_compiling" = yes; then :
28193 # Guess no on Solaris, yes otherwise.
28195 solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
28196 # Guess no on native Windows.
28197 mingw*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
28198 *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes" ;;
28202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28203 /* end confdefs.h. */
28208 posix_spawn_file_actions_t actions;
28209 if (posix_spawn_file_actions_init (&actions) != 0)
28211 if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
28216 if ac_fn_c_try_run "$LINENO"; then :
28217 gl_cv_func_posix_spawn_file_actions_addclose_works=yes
28219 gl_cv_func_posix_spawn_file_actions_addclose_works=no
28221 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28222 conftest.$ac_objext conftest.beam conftest.$ac_ext
28227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
28228 $as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
28229 case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
28231 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
28235 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
28244 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
28252 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
28258 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
28268 if test $REPLACE_POSIX_SPAWN = 1; then
28269 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
28271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
28272 $as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
28273 if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
28274 $as_echo_n "(cached) " >&6
28276 if test "$cross_compiling" = yes; then :
28277 # Guess no on Solaris, yes otherwise.
28279 solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
28280 # Guess no on native Windows.
28281 mingw*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no" ;;
28282 *) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
28286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28287 /* end confdefs.h. */
28292 posix_spawn_file_actions_t actions;
28293 if (posix_spawn_file_actions_init (&actions) != 0)
28295 if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
28300 if ac_fn_c_try_run "$LINENO"; then :
28301 gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
28303 gl_cv_func_posix_spawn_file_actions_adddup2_works=no
28305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28306 conftest.$ac_objext conftest.beam conftest.$ac_ext
28311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
28312 $as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
28313 case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
28315 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
28319 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
28328 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
28336 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
28342 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
28352 if test $REPLACE_POSIX_SPAWN = 1; then
28353 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
28355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
28356 $as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
28357 if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
28358 $as_echo_n "(cached) " >&6
28360 if test "$cross_compiling" = yes; then :
28361 # Guess no on Solaris, yes otherwise.
28363 solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
28364 # Guess no on native Windows.
28365 mingw*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no" ;;
28366 *) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
28370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28371 /* end confdefs.h. */
28377 posix_spawn_file_actions_t actions;
28378 if (posix_spawn_file_actions_init (&actions) != 0)
28380 if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
28386 if ac_fn_c_try_run "$LINENO"; then :
28387 gl_cv_func_posix_spawn_file_actions_addopen_works=yes
28389 gl_cv_func_posix_spawn_file_actions_addopen_works=no
28391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28392 conftest.$ac_objext conftest.beam conftest.$ac_ext
28397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
28398 $as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
28399 case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
28401 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
28405 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
28414 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
28422 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
28428 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
28435 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28444 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
28452 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
28458 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
28465 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28474 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
28482 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
28488 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
28495 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28504 gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
28512 GNULIB_POSIX_SPAWNATTR_DESTROY=1
28518 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
28525 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28534 gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
28542 GNULIB_POSIX_SPAWNATTR_INIT=1
28548 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
28555 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28564 gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
28572 GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
28578 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
28585 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28594 gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
28602 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
28608 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
28615 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28624 gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
28634 gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
28637 for ac_header in paths.h
28639 ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
28640 if test "x$ac_cv_header_paths_h" = xyes; then :
28641 cat >>confdefs.h <<_ACEOF
28642 #define HAVE_PATHS_H 1
28649 for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
28651 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
28652 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
28653 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
28654 cat >>confdefs.h <<_ACEOF
28655 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
28668 GNULIB_POSIX_SPAWNP=1
28674 $as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
28680 if test $gl_cv_func_frexp_no_libm = yes; then
28684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
28685 $as_echo_n "checking whether frexp works... " >&6; }
28686 if ${gl_cv_func_frexp_works+:} false; then :
28687 $as_echo_n "(cached) " >&6
28690 if test "$cross_compiling" = yes; then :
28692 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
28693 mingw*) # Guess yes with MSVC, no with mingw.
28694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28695 /* end confdefs.h. */
28702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28703 $EGREP "Good" >/dev/null 2>&1; then :
28704 gl_cv_func_frexp_works="guessing yes"
28706 gl_cv_func_frexp_works="guessing no"
28711 *) gl_cv_func_frexp_works="guessing yes" ;;
28715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28716 /* end confdefs.h. */
28720 #include <string.h>
28721 #if HAVE_DECL_ALARM
28722 # include <signal.h>
28723 # include <unistd.h>
28725 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
28726 ICC 10.0 has a bug when optimizing the expression -zero.
28727 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
28728 to PowerPC on Mac OS X 10.5. */
28729 #if defined __hpux || defined __sgi || defined __ICC
28731 compute_minus_zero (void)
28733 return -DBL_MIN * DBL_MIN;
28735 # define minus_zero compute_minus_zero ()
28737 double minus_zero = -0.0;
28745 #if HAVE_DECL_ALARM
28746 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
28747 number. Let the test fail in this case. */
28748 signal (SIGALRM, SIG_DFL);
28751 /* Test on denormalized numbers. */
28752 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
28757 double y = frexp (x, &exp);
28758 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
28759 On NetBSD: y = 0.75. Correct: y = 0.5. */
28763 /* Test on infinite numbers. */
28767 double y = frexp (x, &exp);
28771 /* Test on negative zero. */
28775 double y = frexp (x, &exp);
28776 if (memcmp (&y, &x, sizeof x))
28782 if ac_fn_c_try_run "$LINENO"; then :
28783 gl_cv_func_frexp_works=yes
28785 gl_cv_func_frexp_works=no
28787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28788 conftest.$ac_objext conftest.beam conftest.$ac_ext
28793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
28794 $as_echo "$gl_cv_func_frexp_works" >&6; }
28796 case "$gl_cv_func_frexp_works" in
28799 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
28805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
28806 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
28807 if ${gl_cv_func_ldexp_no_libm+:} false; then :
28808 $as_echo_n "(cached) " >&6
28811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28812 /* end confdefs.h. */
28819 return ldexp (x, y) < 1;
28824 if ac_fn_c_try_link "$LINENO"; then :
28825 gl_cv_func_ldexp_no_libm=yes
28827 gl_cv_func_ldexp_no_libm=no
28829 rm -f core conftest.err conftest.$ac_objext \
28830 conftest$ac_exeext conftest.$ac_ext
28833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
28834 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
28835 if test $gl_cv_func_ldexp_no_libm = yes; then
28837 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
28846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
28847 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
28848 if ${gl_cv_func_frexpl_no_libm+:} false; then :
28849 $as_echo_n "(cached) " >&6
28852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28853 /* end confdefs.h. */
28859 int e; return frexpl (x, &e) > 0;
28864 if ac_fn_c_try_link "$LINENO"; then :
28865 gl_cv_func_frexpl_no_libm=yes
28867 gl_cv_func_frexpl_no_libm=no
28869 rm -f core conftest.err conftest.$ac_objext \
28870 conftest$ac_exeext conftest.$ac_ext
28873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
28874 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
28876 if test $gl_cv_func_frexpl_no_libm = yes; then
28879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
28880 $as_echo_n "checking whether frexpl works... " >&6; }
28881 if ${gl_cv_func_frexpl_works+:} false; then :
28882 $as_echo_n "(cached) " >&6
28885 if test "$cross_compiling" = yes; then :
28888 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
28889 gl_cv_func_frexpl_works="guessing no";;
28890 *) gl_cv_func_frexpl_works="guessing yes";;
28894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28895 /* end confdefs.h. */
28899 /* Override the values of <float.h>, like done in float.in.h. */
28900 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
28901 # undef LDBL_MIN_EXP
28902 # define LDBL_MIN_EXP (-16381)
28904 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
28905 # undef LDBL_MIN_EXP
28906 # define LDBL_MIN_EXP (-16381)
28908 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
28909 # undef LDBL_MIN_EXP
28910 # define LDBL_MIN_EXP DBL_MIN_EXP
28912 #if defined __sgi && (LDBL_MANT_DIG >= 106)
28913 # if defined __GNUC__
28914 # undef LDBL_MIN_EXP
28915 # define LDBL_MIN_EXP DBL_MIN_EXP
28922 long double frexpl (long double, int *);
28926 volatile long double x;
28927 /* Test on finite numbers that fails on AIX 5.1. */
28935 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
28936 function returns an invalid (incorrectly normalized) value: it returns
28937 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
28938 but the correct result is
28939 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
28943 long double y = frexpl (x, &exp);
28944 if (!(exp == 1 && y == 0.505L))
28947 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
28948 LDBL_MAX_EXP = 16384.
28949 In the loop end test, we test x against Infinity, rather than comparing
28950 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
28953 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
28964 /* Test on denormalized numbers. */
28967 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
28972 long double y = frexpl (x, &exp);
28973 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
28974 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
28975 if (exp != LDBL_MIN_EXP - 1)
28979 /* Test on infinite numbers. */
28983 long double y = frexpl (x, &exp);
28990 if ac_fn_c_try_run "$LINENO"; then :
28991 gl_cv_func_frexpl_works=yes
28993 gl_cv_func_frexpl_works=no
28995 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28996 conftest.$ac_objext conftest.beam conftest.$ac_ext
29001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
29002 $as_echo "$gl_cv_func_frexpl_works" >&6; }
29004 case "$gl_cv_func_frexpl_works" in
29005 *yes) gl_func_frexpl_no_libm=yes ;;
29006 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
29009 gl_func_frexpl_no_libm=no
29012 if test $gl_func_frexpl_no_libm = yes; then
29014 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
29016 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
29018 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
29027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
29028 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
29029 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
29030 $as_echo_n "(cached) " >&6
29033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29034 /* end confdefs.h. */
29040 return ldexpl (x, -1) > 0;
29045 if ac_fn_c_try_link "$LINENO"; then :
29046 gl_cv_func_ldexpl_no_libm=yes
29048 gl_cv_func_ldexpl_no_libm=no
29050 rm -f core conftest.err conftest.$ac_objext \
29051 conftest$ac_exeext conftest.$ac_ext
29054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
29055 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
29057 if test $gl_cv_func_ldexpl_no_libm = yes; then
29060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
29061 $as_echo_n "checking whether ldexpl works... " >&6; }
29062 if ${gl_cv_func_ldexpl_works+:} false; then :
29063 $as_echo_n "(cached) " >&6
29066 if test "$cross_compiling" = yes; then :
29069 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
29070 # Guess yes on native Windows.
29071 mingw*) gl_cv_func_ldexpl_works="guessing yes" ;;
29072 *) gl_cv_func_ldexpl_works="guessing yes" ;;
29076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29077 /* end confdefs.h. */
29084 long double ldexpl (long double, int);
29089 volatile long double x = 1.0;
29090 volatile long double y = ldexpl (x, -1);
29095 volatile long double x = 1.73205L;
29096 volatile long double y = ldexpl (x, 0);
29103 if ac_fn_c_try_run "$LINENO"; then :
29104 gl_cv_func_ldexpl_works=yes
29106 gl_cv_func_ldexpl_works=no
29108 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29109 conftest.$ac_objext conftest.beam conftest.$ac_ext
29114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
29115 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
29117 case "$gl_cv_func_ldexpl_works" in
29120 $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
29122 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
29124 if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
29136 if test $gl_cv_func_vfprintf_posix = no; then
29148 gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
29152 $as_echo "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
29163 GNULIB_PRINTF_POSIX=1
29169 $as_echo "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
29174 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
29176 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
29182 cat >>confdefs.h <<_ACEOF
29183 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
29186 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
29188 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
29194 cat >>confdefs.h <<_ACEOF
29195 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
29207 for ac_func in raise
29209 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
29210 if test "x$ac_cv_func_raise" = xyes; then :
29211 cat >>confdefs.h <<_ACEOF
29212 #define HAVE_RAISE 1
29218 if test $ac_cv_func_raise = no; then
29223 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
29231 if test $gl_cv_type_sigset_t = yes; then
29232 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
29233 if test "x$ac_cv_func_sigprocmask" = xyes; then :
29234 gl_cv_func_sigprocmask=1
29238 if test -z "$gl_cv_func_sigprocmask"; then
29239 HAVE_POSIX_SIGNALBLOCKING=0
29242 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
29248 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
29257 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
29272 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
29280 for ac_func in rawmemchr
29282 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
29283 if test "x$ac_cv_func_rawmemchr" = xyes; then :
29284 cat >>confdefs.h <<_ACEOF
29285 #define HAVE_RAWMEMCHR 1
29291 if test $ac_cv_func_rawmemchr = no; then
29295 if test $HAVE_RAWMEMCHR = 0; then
29304 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
29319 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
29326 if test $gl_cv_func_malloc_posix = yes; then
29328 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
29334 if test $REPLACE_REALLOC = 1; then
29343 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
29351 GNULIB_REALLOC_POSIX=1
29357 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
29364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29365 /* end confdefs.h. */
29368 struct sched_param a;
29369 int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
29380 if ac_fn_c_try_compile "$LINENO"; then :
29384 for ac_header in sched.h
29386 ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
29387 #include <sys/cdefs.h>
29391 if test "x$ac_cv_header_sched_h" = xyes; then :
29392 cat >>confdefs.h <<_ACEOF
29393 #define HAVE_SCHED_H 1
29408 if test $gl_cv_have_include_next = yes; then
29409 gl_cv_next_sched_h='<'sched.h'>'
29411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
29412 $as_echo_n "checking absolute name of <sched.h>... " >&6; }
29413 if ${gl_cv_next_sched_h+:} false; then :
29414 $as_echo_n "(cached) " >&6
29419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29420 /* end confdefs.h. */
29424 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29425 *) gl_absname_cpp="$ac_cpp" ;;
29430 gl_dirsep_regex='[/\\]'
29433 gl_dirsep_regex='\/'
29436 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29437 gl_header_literal_regex=`echo 'sched.h' \
29438 | sed -e "$gl_make_literal_regex_sed"`
29439 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29440 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29446 gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29447 sed -n "$gl_absolute_header_sed"`
29449 gl_header=$gl_cv_absolute_sched_h
29450 gl_cv_next_sched_h='"'$gl_header'"'
29454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
29455 $as_echo "$gl_cv_next_sched_h" >&6; }
29457 NEXT_SCHED_H=$gl_cv_next_sched_h
29459 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29460 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29461 gl_next_as_first_directive='<'sched.h'>'
29463 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29464 gl_next_as_first_directive=$gl_cv_next_sched_h
29466 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
29472 if test "$ac_cv_header_sched_h" = yes; then
29479 if test "$HAVE_SCHED_H" = 1; then
29480 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
29481 #include <sys/cdefs.h>
29486 if test "x$ac_cv_type_struct_sched_param" = xyes; then :
29487 HAVE_STRUCT_SCHED_PARAM=1
29489 HAVE_STRUCT_SCHED_PARAM=0
29493 HAVE_STRUCT_SCHED_PARAM=0
29496 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
29498 if test "x$ac_cv_type_struct_sched_param" = xyes; then :
29499 HAVE_STRUCT_SCHED_PARAM=1
29504 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
29506 if test "x$ac_cv_type_struct_sched_param" = xyes; then :
29507 HAVE_STRUCT_SCHED_PARAM=1
29515 if test "$ac_cv_header_sys_cdefs_h" = yes; then
29525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29527 if test -n "$SCHED_H"; then
29528 GL_GENERATE_SCHED_H_TRUE=
29529 GL_GENERATE_SCHED_H_FALSE='#'
29531 GL_GENERATE_SCHED_H_TRUE='#'
29532 GL_GENERATE_SCHED_H_FALSE=
29539 if test $ac_cv_func_sigaction = yes; then
29540 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
29542 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
29544 cat >>confdefs.h <<_ACEOF
29545 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
29551 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
29552 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
29558 if test $HAVE_SIGACTION = 0; then
29567 gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
29575 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
29576 #include <signal.h>
29579 if test "x$ac_cv_type_siginfo_t" = xyes; then :
29581 cat >>confdefs.h <<_ACEOF
29582 #define HAVE_SIGINFO_T 1
29588 if test $ac_cv_type_siginfo_t = no; then
29604 $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
29619 if test $gl_cv_have_include_next = yes; then
29620 gl_cv_next_signal_h='<'signal.h'>'
29622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
29623 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
29624 if ${gl_cv_next_signal_h+:} false; then :
29625 $as_echo_n "(cached) " >&6
29630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29631 /* end confdefs.h. */
29632 #include <signal.h>
29635 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29636 *) gl_absname_cpp="$ac_cpp" ;;
29641 gl_dirsep_regex='[/\\]'
29644 gl_dirsep_regex='\/'
29647 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29648 gl_header_literal_regex=`echo 'signal.h' \
29649 | sed -e "$gl_make_literal_regex_sed"`
29650 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29651 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29657 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29658 sed -n "$gl_absolute_header_sed"`
29660 gl_header=$gl_cv_absolute_signal_h
29661 gl_cv_next_signal_h='"'$gl_header'"'
29665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
29666 $as_echo "$gl_cv_next_signal_h" >&6; }
29668 NEXT_SIGNAL_H=$gl_cv_next_signal_h
29670 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29671 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29672 gl_next_as_first_directive='<'signal.h'>'
29674 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29675 gl_next_as_first_directive=$gl_cv_next_signal_h
29677 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
29683 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
29684 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
29685 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
29686 #include <signal.h>
29689 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
29692 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
29701 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
29702 #include <signal.h>
29705 if test "x$ac_cv_type_sighandler_t" = xyes; then :
29708 HAVE_SIGHANDLER_T=0
29713 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
29714 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29716 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29717 if eval \${$as_gl_Symbol+:} false; then :
29718 $as_echo_n "(cached) " >&6
29720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29721 /* end confdefs.h. */
29722 #include <signal.h>
29733 if ac_fn_c_try_compile "$LINENO"; then :
29734 eval "$as_gl_Symbol=yes"
29736 eval "$as_gl_Symbol=no"
29738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29740 eval ac_res=\$$as_gl_Symbol
29741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29742 $as_echo "$ac_res" >&6; }
29743 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29744 cat >>confdefs.h <<_ACEOF
29745 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29748 eval ac_cv_have_decl_$gl_func=yes
29755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
29756 $as_echo_n "checking for signbit macro... " >&6; }
29757 if ${gl_cv_func_signbit+:} false; then :
29758 $as_echo_n "(cached) " >&6
29761 if test "$cross_compiling" = yes; then :
29763 # Guess yes on glibc systems.
29764 *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
29765 # Guess yes on native Windows.
29766 mingw*) gl_cv_func_signbit="guessing yes" ;;
29767 # If we don't know, assume the worst.
29768 *) gl_cv_func_signbit="guessing no" ;;
29772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29773 /* end confdefs.h. */
29776 /* If signbit is defined as a function, don't use it, since calling it for
29777 'float' or 'long double' arguments would involve conversions.
29778 If signbit is not declared at all but exists as a library function, don't
29779 use it, since the prototype may not match.
29780 If signbit is not declared at all but exists as a compiler built-in, don't
29781 use it, since it's preferable to use __builtin_signbit* (no warnings,
29782 no conversions). */
29784 # error "signbit should be a macro"
29786 #include <string.h>
29788 /* Global variables.
29789 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
29790 but cannot constant-fold __builtin_signbitl (variable). */
29796 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
29797 So we use -p0f and -p0d instead. */
29802 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
29803 So we use another constant expression instead.
29804 But that expression does not work on other platforms, such as when
29805 cross-compiling to PowerPC on Mac OS X 10.5. */
29806 long double p0l = 0.0L;
29807 #if defined __hpux || defined __sgi
29808 long double m0l = -LDBL_MIN * LDBL_MIN;
29810 long double m0l = -p0l;
29813 if (signbit (vf)) /* link check */
29816 float plus_inf = 1.0f / p0f;
29817 float minus_inf = -1.0f / p0f;
29818 if (!(!signbit (255.0f)
29819 && signbit (-255.0f)
29821 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
29822 && !signbit (plus_inf)
29823 && signbit (minus_inf)))
29826 if (signbit (vd)) /* link check */
29829 double plus_inf = 1.0 / p0d;
29830 double minus_inf = -1.0 / p0d;
29831 if (!(!signbit (255.0)
29832 && signbit (-255.0)
29834 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
29835 && !signbit (plus_inf)
29836 && signbit (minus_inf)))
29839 if (signbit (vl)) /* link check */
29842 long double plus_inf = 1.0L / p0l;
29843 long double minus_inf = -1.0L / p0l;
29844 if (signbit (255.0L))
29846 if (!signbit (-255.0L))
29850 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
29852 if (signbit (plus_inf))
29854 if (!signbit (minus_inf))
29862 if ac_fn_c_try_run "$LINENO"; then :
29863 gl_cv_func_signbit=yes
29865 gl_cv_func_signbit=no
29867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29868 conftest.$ac_objext conftest.beam conftest.$ac_ext
29873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
29874 $as_echo "$gl_cv_func_signbit" >&6; }
29875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
29876 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
29877 if ${gl_cv_func_signbit_gcc+:} false; then :
29878 $as_echo_n "(cached) " >&6
29881 if test "$cross_compiling" = yes; then :
29883 # Guess yes on glibc systems.
29884 *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
29885 # Guess yes on mingw, no on MSVC.
29886 mingw*) if test -n "$GCC"; then
29887 gl_cv_func_signbit_gcc="guessing yes"
29889 gl_cv_func_signbit_gcc="guessing no"
29892 # If we don't know, assume the worst.
29893 *) gl_cv_func_signbit_gcc="guessing no" ;;
29897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29898 /* end confdefs.h. */
29901 # define signbit(x) \
29902 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
29903 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
29904 __builtin_signbitf (x))
29906 # error "signbit should be three compiler built-ins"
29908 #include <string.h>
29910 /* Global variables.
29911 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
29912 but cannot constant-fold __builtin_signbitl (variable). */
29918 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
29919 So we use -p0f and -p0d instead. */
29924 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
29925 So we use another constant expression instead.
29926 But that expression does not work on other platforms, such as when
29927 cross-compiling to PowerPC on Mac OS X 10.5. */
29928 long double p0l = 0.0L;
29929 #if defined __hpux || defined __sgi
29930 long double m0l = -LDBL_MIN * LDBL_MIN;
29932 long double m0l = -p0l;
29935 if (signbit (vf)) /* link check */
29938 float plus_inf = 1.0f / p0f;
29939 float minus_inf = -1.0f / p0f;
29940 if (!(!signbit (255.0f)
29941 && signbit (-255.0f)
29943 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
29944 && !signbit (plus_inf)
29945 && signbit (minus_inf)))
29948 if (signbit (vd)) /* link check */
29951 double plus_inf = 1.0 / p0d;
29952 double minus_inf = -1.0 / p0d;
29953 if (!(!signbit (255.0)
29954 && signbit (-255.0)
29956 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
29957 && !signbit (plus_inf)
29958 && signbit (minus_inf)))
29961 if (signbit (vl)) /* link check */
29964 long double plus_inf = 1.0L / p0l;
29965 long double minus_inf = -1.0L / p0l;
29966 if (signbit (255.0L))
29968 if (!signbit (-255.0L))
29972 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
29974 if (signbit (plus_inf))
29976 if (!signbit (minus_inf))
29984 if ac_fn_c_try_run "$LINENO"; then :
29985 gl_cv_func_signbit_gcc=yes
29987 gl_cv_func_signbit_gcc=no
29989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29990 conftest.$ac_objext conftest.beam conftest.$ac_ext
29995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
29996 $as_echo "$gl_cv_func_signbit_gcc" >&6; }
29997 case "$gl_cv_func_signbit_gcc" in
29999 REPLACE_SIGNBIT_USING_GCC=1
30002 case "$gl_cv_func_signbit" in
30008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
30009 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
30010 if ${gl_cv_cc_float_signbit+:} false; then :
30011 $as_echo_n "(cached) " >&6
30014 if test "$cross_compiling" = yes; then :
30016 gl_cv_cc_float_signbit="unknown"
30019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30020 /* end confdefs.h. */
30022 #include <stddef.h>
30025 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30026 typedef union { float value; unsigned int word[NWORDS]; }
30028 static memory_float plus = { 1.0f };
30029 static memory_float minus = { -1.0f };
30034 FILE *fp = fopen ("conftest.out", "w");
30037 /* Find the different bit. */
30039 for (j = 0; j < NWORDS; j++)
30041 unsigned int x = plus.word[j] ^ minus.word[j];
30042 if ((x & (x - 1)) || (x && m))
30044 /* More than one bit difference. */
30045 fprintf (fp, "unknown");
30057 /* No difference. */
30058 fprintf (fp, "unknown");
30062 /* Now m = plus.word[k] ^ ~minus.word[k]. */
30063 if (plus.word[k] & ~minus.word[k])
30065 /* Oh? The sign bit is set in the positive and cleared in the negative
30067 fprintf (fp, "unknown");
30074 fprintf (fp, "word %d bit %d", (int) k, (int) i);
30075 if (fclose (fp) != 0)
30081 if ac_fn_c_try_run "$LINENO"; then :
30082 gl_cv_cc_float_signbit=`cat conftest.out`
30084 gl_cv_cc_float_signbit="unknown"
30086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30087 conftest.$ac_objext conftest.beam conftest.$ac_ext
30093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
30094 $as_echo "$gl_cv_cc_float_signbit" >&6; }
30095 case "$gl_cv_cc_float_signbit" in
30097 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
30098 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
30100 cat >>confdefs.h <<_ACEOF
30101 #define FLT_SIGNBIT_WORD $word
30105 cat >>confdefs.h <<_ACEOF
30106 #define FLT_SIGNBIT_BIT $bit
30115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
30116 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
30117 if ${gl_cv_cc_double_signbit+:} false; then :
30118 $as_echo_n "(cached) " >&6
30121 if test "$cross_compiling" = yes; then :
30123 gl_cv_cc_double_signbit="unknown"
30126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30127 /* end confdefs.h. */
30129 #include <stddef.h>
30132 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30133 typedef union { double value; unsigned int word[NWORDS]; }
30135 static memory_float plus = { 1.0 };
30136 static memory_float minus = { -1.0 };
30141 FILE *fp = fopen ("conftest.out", "w");
30144 /* Find the different bit. */
30146 for (j = 0; j < NWORDS; j++)
30148 unsigned int x = plus.word[j] ^ minus.word[j];
30149 if ((x & (x - 1)) || (x && m))
30151 /* More than one bit difference. */
30152 fprintf (fp, "unknown");
30164 /* No difference. */
30165 fprintf (fp, "unknown");
30169 /* Now m = plus.word[k] ^ ~minus.word[k]. */
30170 if (plus.word[k] & ~minus.word[k])
30172 /* Oh? The sign bit is set in the positive and cleared in the negative
30174 fprintf (fp, "unknown");
30181 fprintf (fp, "word %d bit %d", (int) k, (int) i);
30182 if (fclose (fp) != 0)
30188 if ac_fn_c_try_run "$LINENO"; then :
30189 gl_cv_cc_double_signbit=`cat conftest.out`
30191 gl_cv_cc_double_signbit="unknown"
30193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30194 conftest.$ac_objext conftest.beam conftest.$ac_ext
30200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
30201 $as_echo "$gl_cv_cc_double_signbit" >&6; }
30202 case "$gl_cv_cc_double_signbit" in
30204 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
30205 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
30207 cat >>confdefs.h <<_ACEOF
30208 #define DBL_SIGNBIT_WORD $word
30212 cat >>confdefs.h <<_ACEOF
30213 #define DBL_SIGNBIT_BIT $bit
30222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
30223 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
30224 if ${gl_cv_cc_long_double_signbit+:} false; then :
30225 $as_echo_n "(cached) " >&6
30228 if test "$cross_compiling" = yes; then :
30230 gl_cv_cc_long_double_signbit="unknown"
30233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30234 /* end confdefs.h. */
30236 #include <stddef.h>
30239 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30240 typedef union { long double value; unsigned int word[NWORDS]; }
30242 static memory_float plus = { 1.0L };
30243 static memory_float minus = { -1.0L };
30248 FILE *fp = fopen ("conftest.out", "w");
30251 /* Find the different bit. */
30253 for (j = 0; j < NWORDS; j++)
30255 unsigned int x = plus.word[j] ^ minus.word[j];
30256 if ((x & (x - 1)) || (x && m))
30258 /* More than one bit difference. */
30259 fprintf (fp, "unknown");
30271 /* No difference. */
30272 fprintf (fp, "unknown");
30276 /* Now m = plus.word[k] ^ ~minus.word[k]. */
30277 if (plus.word[k] & ~minus.word[k])
30279 /* Oh? The sign bit is set in the positive and cleared in the negative
30281 fprintf (fp, "unknown");
30288 fprintf (fp, "word %d bit %d", (int) k, (int) i);
30289 if (fclose (fp) != 0)
30295 if ac_fn_c_try_run "$LINENO"; then :
30296 gl_cv_cc_long_double_signbit=`cat conftest.out`
30298 gl_cv_cc_long_double_signbit="unknown"
30300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30301 conftest.$ac_objext conftest.beam conftest.$ac_ext
30307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
30308 $as_echo "$gl_cv_cc_long_double_signbit" >&6; }
30309 case "$gl_cv_cc_long_double_signbit" in
30311 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
30312 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
30314 cat >>confdefs.h <<_ACEOF
30315 #define LDBL_SIGNBIT_WORD $word
30319 cat >>confdefs.h <<_ACEOF
30320 #define LDBL_SIGNBIT_BIT $bit
30327 if test "$gl_cv_cc_float_signbit" = unknown; then
30328 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
30330 if test "x$ac_cv_have_decl_copysignf" = xyes; then :
30336 cat >>confdefs.h <<_ACEOF
30337 #define HAVE_DECL_COPYSIGNF $ac_have_decl
30340 if test "$ac_cv_have_decl_copysignf" = yes; then
30341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
30342 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
30343 if ${gl_cv_func_copysignf_no_libm+:} false; then :
30344 $as_echo_n "(cached) " >&6
30347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30348 /* end confdefs.h. */
30354 return copysignf (x, y) < 0;
30359 if ac_fn_c_try_link "$LINENO"; then :
30360 gl_cv_func_copysignf_no_libm=yes
30362 gl_cv_func_copysignf_no_libm=no
30364 rm -f core conftest.err conftest.$ac_objext \
30365 conftest$ac_exeext conftest.$ac_ext
30368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
30369 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
30370 if test $gl_cv_func_copysignf_no_libm = yes; then
30372 $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
30377 if test "$gl_cv_cc_double_signbit" = unknown; then
30378 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
30380 if test "x$ac_cv_have_decl_copysign" = xyes; then :
30386 cat >>confdefs.h <<_ACEOF
30387 #define HAVE_DECL_COPYSIGN $ac_have_decl
30390 if test "$ac_cv_have_decl_copysign" = yes; then
30391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
30392 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
30393 if ${gl_cv_func_copysign_no_libm+:} false; then :
30394 $as_echo_n "(cached) " >&6
30397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30398 /* end confdefs.h. */
30404 return copysign (x, y) < 0;
30409 if ac_fn_c_try_link "$LINENO"; then :
30410 gl_cv_func_copysign_no_libm=yes
30412 gl_cv_func_copysign_no_libm=no
30414 rm -f core conftest.err conftest.$ac_objext \
30415 conftest$ac_exeext conftest.$ac_ext
30418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
30419 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
30420 if test $gl_cv_func_copysign_no_libm = yes; then
30422 $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
30427 if test "$gl_cv_cc_long_double_signbit" = unknown; then
30428 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
30430 if test "x$ac_cv_have_decl_copysignl" = xyes; then :
30436 cat >>confdefs.h <<_ACEOF
30437 #define HAVE_DECL_COPYSIGNL $ac_have_decl
30440 if test "$ac_cv_have_decl_copysignl" = yes; then
30441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
30442 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
30443 if ${gl_cv_func_copysignl_no_libm+:} false; then :
30444 $as_echo_n "(cached) " >&6
30447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30448 /* end confdefs.h. */
30454 return copysignl (x, y) < 0;
30459 if ac_fn_c_try_link "$LINENO"; then :
30460 gl_cv_func_copysignl_no_libm=yes
30462 gl_cv_func_copysignl_no_libm=no
30464 rm -f core conftest.err conftest.$ac_objext \
30465 conftest$ac_exeext conftest.$ac_ext
30468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
30469 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
30470 if test $gl_cv_func_copysignl_no_libm = yes; then
30472 $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
30482 if test $REPLACE_SIGNBIT = 1; then
30491 gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
30501 gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
30511 gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
30525 $as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
30532 if test $gl_cv_type_sigset_t = yes; then
30533 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
30534 if test "x$ac_cv_func_sigprocmask" = xyes; then :
30535 gl_cv_func_sigprocmask=1
30539 if test -z "$gl_cv_func_sigprocmask"; then
30540 HAVE_POSIX_SIGNALBLOCKING=0
30543 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
30552 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
30561 GNULIB_SIGPROCMASK=1
30567 $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
30572 for ac_header in stdint.h
30574 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
30575 if test "x$ac_cv_header_stdint_h" = xyes; then :
30576 cat >>confdefs.h <<_ACEOF
30577 #define HAVE_STDINT_H 1
30584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
30585 $as_echo_n "checking for SIZE_MAX... " >&6; }
30586 if ${gl_cv_size_max+:} false; then :
30587 $as_echo_n "(cached) " >&6
30591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30592 /* end confdefs.h. */
30594 #include <limits.h>
30596 #include <stdint.h>
30603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30604 $EGREP "Found it" >/dev/null 2>&1; then :
30609 if test -z "$gl_cv_size_max"; then
30610 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
30611 #include <limits.h>"; then :
30614 size_t_bits_minus_1=
30617 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
30623 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
30624 if test $fits_in_uint = 1; then
30625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30626 /* end confdefs.h. */
30627 #include <stddef.h>
30629 extern unsigned long foo;
30639 if ac_fn_c_try_compile "$LINENO"; then :
30642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30644 if test $fits_in_uint = 1; then
30645 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
30647 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
30650 gl_cv_size_max='((size_t)~(size_t)0)'
30655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
30656 $as_echo "$gl_cv_size_max" >&6; }
30657 if test "$gl_cv_size_max" != yes; then
30659 cat >>confdefs.h <<_ACEOF
30660 #define SIZE_MAX $gl_cv_size_max
30668 gl_cv_func_snprintf_usable=no
30669 for ac_func in snprintf
30671 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
30672 if test "x$ac_cv_func_snprintf" = xyes; then :
30673 cat >>confdefs.h <<_ACEOF
30674 #define HAVE_SNPRINTF 1
30680 if test $ac_cv_func_snprintf = yes; then
30684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
30685 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
30686 if ${gl_cv_func_snprintf_size1+:} false; then :
30687 $as_echo_n "(cached) " >&6
30690 if test "$cross_compiling" = yes; then :
30692 # Guess yes on native Windows.
30693 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
30694 *) gl_cv_func_snprintf_size1="guessing yes" ;;
30698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30699 /* end confdefs.h. */
30703 # define my_snprintf snprintf
30705 # include <stdarg.h>
30706 static int my_snprintf (char *buf, int size, const char *format, ...)
30710 va_start (args, format);
30711 ret = vsnprintf (buf, size, format, args);
30718 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
30719 my_snprintf (buf, 1, "%d", 12345);
30720 return buf[1] != 'E';
30723 if ac_fn_c_try_run "$LINENO"; then :
30724 gl_cv_func_snprintf_size1=yes
30726 gl_cv_func_snprintf_size1=no
30728 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30729 conftest.$ac_objext conftest.beam conftest.$ac_ext
30734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
30735 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
30737 case "$gl_cv_func_snprintf_size1" in
30740 case "$gl_cv_func_snprintf_retval_c99" in
30744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
30745 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
30746 if ${gl_cv_func_printf_positions+:} false; then :
30747 $as_echo_n "(cached) " >&6
30750 if test "$cross_compiling" = yes; then :
30753 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
30754 gl_cv_func_printf_positions="guessing no";;
30755 beos*) gl_cv_func_printf_positions="guessing no";;
30756 # Guess no on native Windows.
30757 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
30758 *) gl_cv_func_printf_positions="guessing yes";;
30762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30763 /* end confdefs.h. */
30766 #include <string.h>
30767 /* The string "%2$d %1$d", with dollar characters protected from the shell's
30768 dollar expansion (possibly an autoconf bug). */
30769 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
30770 static char buf[100];
30773 sprintf (buf, format, 33, 55);
30774 return (strcmp (buf, "55 33") != 0);
30777 if ac_fn_c_try_run "$LINENO"; then :
30778 gl_cv_func_printf_positions=yes
30780 gl_cv_func_printf_positions=no
30782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30783 conftest.$ac_objext conftest.beam conftest.$ac_ext
30788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
30789 $as_echo "$gl_cv_func_printf_positions" >&6; }
30791 case "$gl_cv_func_printf_positions" in
30793 gl_cv_func_snprintf_usable=yes
30801 if test $gl_cv_func_snprintf_usable = no; then
30812 gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
30814 if test $ac_cv_func_snprintf = yes; then
30818 if test $ac_cv_have_decl_snprintf = yes; then
30826 if test $ac_cv_have_decl_snprintf = no; then
30827 HAVE_DECL_SNPRINTF=0
30841 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
30847 cat >>confdefs.h <<_ACEOF
30848 #define GNULIB_SNPRINTF 1
30867 gl_cv_func_snprintf_posix=no
30868 for ac_func in snprintf
30870 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
30871 if test "x$ac_cv_func_snprintf" = xyes; then :
30872 cat >>confdefs.h <<_ACEOF
30873 #define HAVE_SNPRINTF 1
30879 if test $ac_cv_func_snprintf = yes; then
30883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
30884 $as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; }
30885 if ${gl_cv_func_snprintf_truncation_c99+:} false; then :
30886 $as_echo_n "(cached) " >&6
30889 if test "$cross_compiling" = yes; then :
30892 # Guess yes on glibc systems.
30893 *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30894 # Guess yes on FreeBSD >= 5.
30895 freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
30896 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30897 # Guess yes on Mac OS X >= 10.3.
30898 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
30899 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30900 # Guess yes on OpenBSD >= 3.9.
30901 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
30902 gl_cv_func_snprintf_truncation_c99="guessing no";;
30903 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30904 # Guess yes on Solaris >= 2.6.
30905 solaris2.[0-5] | solaris2.[0-5].*)
30906 gl_cv_func_snprintf_truncation_c99="guessing no";;
30907 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30908 # Guess yes on AIX >= 4.
30909 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
30910 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30911 # Guess yes on HP-UX >= 11.
30912 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
30913 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30914 # Guess yes on IRIX >= 6.5.
30915 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30916 # Guess yes on OSF/1 >= 5.
30917 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
30918 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30919 # Guess yes on NetBSD >= 3.
30920 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
30921 gl_cv_func_snprintf_truncation_c99="guessing no";;
30922 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30923 # Guess yes on BeOS.
30924 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30925 # Guess no on native Windows.
30926 mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
30927 # If we don't know, assume the worst.
30928 *) gl_cv_func_snprintf_truncation_c99="guessing no";;
30932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30933 /* end confdefs.h. */
30936 #include <string.h>
30938 # define my_snprintf snprintf
30940 # include <stdarg.h>
30941 static int my_snprintf (char *buf, int size, const char *format, ...)
30945 va_start (args, format);
30946 ret = vsnprintf (buf, size, format, args);
30951 static char buf[100];
30954 strcpy (buf, "ABCDEF");
30955 my_snprintf (buf, 3, "%d %d", 4567, 89);
30956 if (memcmp (buf, "45\0DEF", 6) != 0)
30961 if ac_fn_c_try_run "$LINENO"; then :
30962 gl_cv_func_snprintf_truncation_c99=yes
30964 gl_cv_func_snprintf_truncation_c99=no
30966 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30967 conftest.$ac_objext conftest.beam conftest.$ac_ext
30972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
30973 $as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; }
30979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5
30980 $as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; }
30981 if ${gl_cv_func_snprintf_directive_n+:} false; then :
30982 $as_echo_n "(cached) " >&6
30985 if test "$cross_compiling" = yes; then :
30988 # Guess yes on glibc systems.
30989 *-gnu* | gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
30990 # Guess yes on FreeBSD >= 5.
30991 freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";;
30992 freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
30993 # Guess yes on Mac OS X >= 10.3.
30994 darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
30995 darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
30996 # Guess yes on Solaris >= 2.6.
30997 solaris2.[0-5] | solaris2.[0-5].*)
30998 gl_cv_func_snprintf_directive_n="guessing no";;
30999 solaris*) gl_cv_func_snprintf_directive_n="guessing yes";;
31000 # Guess yes on AIX >= 4.
31001 aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
31002 aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
31003 # Guess yes on IRIX >= 6.5.
31004 irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
31005 # Guess yes on OSF/1 >= 5.
31006 osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
31007 osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
31008 # Guess yes on NetBSD >= 3.
31009 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
31010 gl_cv_func_snprintf_directive_n="guessing no";;
31011 netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
31012 # Guess yes on BeOS.
31013 beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
31014 # Guess no on native Windows.
31015 mingw*) gl_cv_func_snprintf_directive_n="guessing no";;
31016 # If we don't know, assume the worst.
31017 *) gl_cv_func_snprintf_directive_n="guessing no";;
31021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31022 /* end confdefs.h. */
31025 #include <string.h>
31027 # define my_snprintf snprintf
31029 # include <stdarg.h>
31030 static int my_snprintf (char *buf, int size, const char *format, ...)
31034 va_start (args, format);
31035 ret = vsnprintf (buf, size, format, args);
31040 static char fmtstring[10];
31041 static char buf[100];
31045 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
31046 support %n in format strings in read-only memory but not in writable
31048 strcpy (fmtstring, "%d %n");
31049 my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
31055 if ac_fn_c_try_run "$LINENO"; then :
31056 gl_cv_func_snprintf_directive_n=yes
31058 gl_cv_func_snprintf_directive_n=no
31060 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31061 conftest.$ac_objext conftest.beam conftest.$ac_ext
31066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5
31067 $as_echo "$gl_cv_func_snprintf_directive_n" >&6; }
31072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
31073 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
31074 if ${gl_cv_func_snprintf_size1+:} false; then :
31075 $as_echo_n "(cached) " >&6
31078 if test "$cross_compiling" = yes; then :
31080 # Guess yes on native Windows.
31081 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
31082 *) gl_cv_func_snprintf_size1="guessing yes" ;;
31086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31087 /* end confdefs.h. */
31091 # define my_snprintf snprintf
31093 # include <stdarg.h>
31094 static int my_snprintf (char *buf, int size, const char *format, ...)
31098 va_start (args, format);
31099 ret = vsnprintf (buf, size, format, args);
31106 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
31107 my_snprintf (buf, 1, "%d", 12345);
31108 return buf[1] != 'E';
31111 if ac_fn_c_try_run "$LINENO"; then :
31112 gl_cv_func_snprintf_size1=yes
31114 gl_cv_func_snprintf_size1=no
31116 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31117 conftest.$ac_objext conftest.beam conftest.$ac_ext
31122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
31123 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
31127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5
31128 $as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; }
31129 if ${gl_cv_func_vsnprintf_zerosize_c99+:} false; then :
31130 $as_echo_n "(cached) " >&6
31133 if test "$cross_compiling" = yes; then :
31136 # Guess yes on glibc systems.
31137 *-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31138 # Guess yes on FreeBSD >= 5.
31139 freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31140 freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31141 # Guess yes on Mac OS X >= 10.3.
31142 darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31143 darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31144 # Guess yes on Cygwin.
31145 cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31146 # Guess yes on Solaris >= 2.6.
31147 solaris2.[0-5] | solaris2.[0-5].*)
31148 gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31149 solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31150 # Guess yes on AIX >= 4.
31151 aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31152 aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31153 # Guess yes on IRIX >= 6.5.
31154 irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31155 # Guess yes on NetBSD >= 3.
31156 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
31157 gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31158 netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31159 # Guess yes on BeOS.
31160 beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31161 # Guess yes on native Windows.
31162 mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31163 # If we don't know, assume the worst.
31164 *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31169 /* end confdefs.h. */
31171 #include <stdarg.h>
31173 static int my_snprintf (char *buf, int size, const char *format, ...)
31177 va_start (args, format);
31178 ret = vsnprintf (buf, size, format, args);
31184 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
31185 my_snprintf (buf, 0, "%d", 12345);
31186 return buf[0] != 'D';
31189 if ac_fn_c_try_run "$LINENO"; then :
31190 gl_cv_func_vsnprintf_zerosize_c99=yes
31192 gl_cv_func_vsnprintf_zerosize_c99=no
31194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31195 conftest.$ac_objext conftest.beam conftest.$ac_ext
31200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5
31201 $as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; }
31203 case "$gl_cv_func_printf_sizes_c99" in
31205 case "$gl_cv_func_printf_long_double" in
31207 case "$gl_cv_func_printf_infinite" in
31209 case "$gl_cv_func_printf_infinite_long_double" in
31211 case "$gl_cv_func_printf_directive_a" in
31213 case "$gl_cv_func_printf_directive_f" in
31215 case "$gl_cv_func_printf_directive_n" in
31217 case "$gl_cv_func_printf_directive_ls" in
31219 case "$gl_cv_func_printf_positions" in
31221 case "$gl_cv_func_printf_flag_grouping" in
31223 case "$gl_cv_func_printf_flag_leftadjust" in
31225 case "$gl_cv_func_printf_flag_zero" in
31227 case "$gl_cv_func_printf_precision" in
31229 case "$gl_cv_func_printf_enomem" in
31231 case "$gl_cv_func_snprintf_truncation_c99" in
31233 case "$gl_cv_func_snprintf_retval_c99" in
31235 case "$gl_cv_func_snprintf_directive_n" in
31237 case "$gl_cv_func_snprintf_size1" in
31239 case "$gl_cv_func_vsnprintf_zerosize_c99" in
31241 # snprintf exists and is
31242 # already POSIX compliant.
31243 gl_cv_func_snprintf_posix=yes
31283 if test $gl_cv_func_snprintf_posix = no; then
31287 case "$gl_cv_func_printf_infinite" in
31292 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
31300 case "$gl_cv_func_printf_long_double" in
31302 case "$gl_cv_func_printf_infinite_long_double" in
31307 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
31316 case "$gl_cv_func_printf_directive_a" in
31321 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
31323 for ac_func in nl_langinfo
31325 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
31326 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
31327 cat >>confdefs.h <<_ACEOF
31328 #define HAVE_NL_LANGINFO 1
31339 case "$gl_cv_func_printf_directive_f" in
31344 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
31351 case "$gl_cv_func_printf_directive_ls" in
31356 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
31363 case "$gl_cv_func_printf_flag_grouping" in
31368 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
31375 case "$gl_cv_func_printf_flag_leftadjust" in
31380 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
31387 case "$gl_cv_func_printf_flag_zero" in
31392 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
31399 case "$gl_cv_func_printf_precision" in
31404 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
31407 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
31410 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
31417 case "$gl_cv_func_printf_enomem" in
31422 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
31425 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
31428 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
31443 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
31453 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
31463 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
31473 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
31475 if test $ac_cv_func_vasnprintf = yes; then
31477 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
31491 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
31492 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
31496 $as_echo "#define ptrdiff_t long" >>confdefs.h
31517 gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
31519 if test $ac_cv_func_snprintf = yes; then
31523 if test $ac_cv_have_decl_snprintf = yes; then
31543 if test $gl_cv_have_include_next = yes; then
31544 gl_cv_next_spawn_h='<'spawn.h'>'
31546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
31547 $as_echo_n "checking absolute name of <spawn.h>... " >&6; }
31548 if ${gl_cv_next_spawn_h+:} false; then :
31549 $as_echo_n "(cached) " >&6
31552 if test $ac_cv_header_spawn_h = yes; then
31557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31558 /* end confdefs.h. */
31562 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31563 *) gl_absname_cpp="$ac_cpp" ;;
31568 gl_dirsep_regex='[/\\]'
31571 gl_dirsep_regex='\/'
31574 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31575 gl_header_literal_regex=`echo 'spawn.h' \
31576 | sed -e "$gl_make_literal_regex_sed"`
31577 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31578 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31584 gl_cv_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31585 sed -n "$gl_absolute_header_sed"`
31587 gl_header=$gl_cv_absolute_spawn_h
31588 gl_cv_next_spawn_h='"'$gl_header'"'
31590 gl_cv_next_spawn_h='<'spawn.h'>'
31595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
31596 $as_echo "$gl_cv_next_spawn_h" >&6; }
31598 NEXT_SPAWN_H=$gl_cv_next_spawn_h
31600 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31601 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31602 gl_next_as_first_directive='<'spawn.h'>'
31604 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31605 gl_next_as_first_directive=$gl_cv_next_spawn_h
31607 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
31613 if test $ac_cv_header_spawn_h = yes; then
31615 ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
31619 if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
31621 cat >>confdefs.h <<_ACEOF
31622 #define HAVE_POSIX_SPAWNATTR_T 1
31627 HAVE_POSIX_SPAWNATTR_T=0
31630 ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
31634 if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
31636 cat >>confdefs.h <<_ACEOF
31637 #define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
31642 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
31647 HAVE_POSIX_SPAWNATTR_T=0
31648 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
31661 for gl_func in posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault posix_spawnattr_getsigmask posix_spawnattr_setsigmask posix_spawnattr_getflags posix_spawnattr_setflags posix_spawnattr_getpgroup posix_spawnattr_setpgroup posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy posix_spawnattr_getschedparam posix_spawnattr_setschedparam posix_spawn_file_actions_init posix_spawn_file_actions_destroy posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose posix_spawn_file_actions_adddup2; do
31662 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31664 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31665 if eval \${$as_gl_Symbol+:} false; then :
31666 $as_echo_n "(cached) " >&6
31668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31669 /* end confdefs.h. */
31681 if ac_fn_c_try_compile "$LINENO"; then :
31682 eval "$as_gl_Symbol=yes"
31684 eval "$as_gl_Symbol=no"
31686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31688 eval ac_res=\$$as_gl_Symbol
31689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31690 $as_echo "$ac_res" >&6; }
31691 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31692 cat >>confdefs.h <<_ACEOF
31693 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31696 eval ac_cv_have_decl_$gl_func=yes
31719 gl_cv_func_sprintf_posix=no
31720 case "$gl_cv_func_printf_sizes_c99" in
31722 case "$gl_cv_func_printf_long_double" in
31724 case "$gl_cv_func_printf_infinite" in
31726 case "$gl_cv_func_printf_infinite_long_double" in
31728 case "$gl_cv_func_printf_directive_a" in
31730 case "$gl_cv_func_printf_directive_f" in
31732 case "$gl_cv_func_printf_directive_n" in
31734 case "$gl_cv_func_printf_directive_ls" in
31736 case "$gl_cv_func_printf_positions" in
31738 case "$gl_cv_func_printf_flag_grouping" in
31740 case "$gl_cv_func_printf_flag_leftadjust" in
31742 case "$gl_cv_func_printf_flag_zero" in
31744 case "$gl_cv_func_printf_precision" in
31746 case "$gl_cv_func_printf_enomem" in
31748 # sprintf exists and is
31749 # already POSIX compliant.
31750 gl_cv_func_sprintf_posix=yes
31779 if test $gl_cv_func_sprintf_posix = no; then
31783 case "$gl_cv_func_printf_infinite" in
31788 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
31796 case "$gl_cv_func_printf_long_double" in
31798 case "$gl_cv_func_printf_infinite_long_double" in
31803 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
31812 case "$gl_cv_func_printf_directive_a" in
31817 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
31819 for ac_func in nl_langinfo
31821 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
31822 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
31823 cat >>confdefs.h <<_ACEOF
31824 #define HAVE_NL_LANGINFO 1
31835 case "$gl_cv_func_printf_directive_f" in
31840 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
31847 case "$gl_cv_func_printf_directive_ls" in
31852 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
31859 case "$gl_cv_func_printf_flag_grouping" in
31864 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
31871 case "$gl_cv_func_printf_flag_leftadjust" in
31876 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
31883 case "$gl_cv_func_printf_flag_zero" in
31888 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
31895 case "$gl_cv_func_printf_precision" in
31900 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
31903 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
31906 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
31913 case "$gl_cv_func_printf_enomem" in
31918 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
31921 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
31924 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
31939 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
31949 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
31959 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
31969 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
31971 if test $ac_cv_func_vasnprintf = yes; then
31973 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
31987 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
31988 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
31992 $as_echo "#define ptrdiff_t long" >>confdefs.h
32013 gl_LIBOBJS="$gl_LIBOBJS sprintf.$ac_objext"
32025 GNULIB_SPRINTF_POSIX=1
32031 $as_echo "#define GNULIB_TEST_SPRINTF_POSIX 1" >>confdefs.h
32036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
32037 $as_echo_n "checking for ssize_t... " >&6; }
32038 if ${gt_cv_ssize_t+:} false; then :
32039 $as_echo_n "(cached) " >&6
32041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32042 /* end confdefs.h. */
32043 #include <sys/types.h>
32047 int x = sizeof (ssize_t *) + sizeof (ssize_t);
32053 if ac_fn_c_try_compile "$LINENO"; then :
32058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
32061 $as_echo "$gt_cv_ssize_t" >&6; }
32062 if test $gt_cv_ssize_t = no; then
32064 $as_echo "#define ssize_t int" >>confdefs.h
32077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
32078 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
32079 if ${gl_cv_func_stat_file_slash+:} false; then :
32080 $as_echo_n "(cached) " >&6
32083 # Assume that if we have lstat, we can also check symlinks.
32084 if test $ac_cv_func_lstat = yes; then
32085 ln -s conftest.tmp conftest.lnk
32087 if test "$cross_compiling" = yes; then :
32089 # Guess yes on glibc systems.
32090 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
32091 # If we don't know, assume the worst.
32092 *) gl_cv_func_stat_file_slash="guessing no" ;;
32096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32097 /* end confdefs.h. */
32098 #include <sys/stat.h>
32105 if (!stat ("conftest.tmp/", &st))
32108 if (!stat ("conftest.lnk/", &st))
32117 if ac_fn_c_try_run "$LINENO"; then :
32118 gl_cv_func_stat_file_slash=yes
32120 gl_cv_func_stat_file_slash=no
32122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32123 conftest.$ac_objext conftest.beam conftest.$ac_ext
32126 rm -f conftest.tmp conftest.lnk
32128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
32129 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
32130 case $gl_cv_func_stat_file_slash in
32134 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
32144 if test $REPLACE_STAT = 1; then
32153 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
32165 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
32185 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
32193 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>
32194 #include <sys/stat.h>
32196 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
32198 cat >>confdefs.h <<_ACEOF
32199 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
32202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
32203 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
32204 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
32205 $as_echo_n "(cached) " >&6
32207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32208 /* end confdefs.h. */
32210 #include <sys/types.h>
32211 #include <sys/stat.h>
32212 #if HAVE_SYS_TIME_H
32213 # include <sys/time.h>
32216 struct timespec ts;
32229 if ac_fn_c_try_compile "$LINENO"; then :
32230 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
32232 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
32234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
32237 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
32238 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
32240 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
32244 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>
32245 #include <sys/stat.h>
32247 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
32249 cat >>confdefs.h <<_ACEOF
32250 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
32255 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
32256 #include <sys/stat.h>
32258 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
32260 cat >>confdefs.h <<_ACEOF
32261 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
32266 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>
32267 #include <sys/stat.h>
32269 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
32271 cat >>confdefs.h <<_ACEOF
32272 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
32288 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>
32289 #include <sys/stat.h>
32291 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
32293 cat >>confdefs.h <<_ACEOF
32294 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
32299 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
32300 #include <sys/stat.h>
32302 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
32304 cat >>confdefs.h <<_ACEOF
32305 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
32310 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>
32311 #include <sys/stat.h>
32313 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
32315 cat >>confdefs.h <<_ACEOF
32316 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
32330 # Define two additional variables used in the Makefile substitution.
32332 if test "$ac_cv_header_stdbool_h" = yes; then
32335 STDBOOL_H='stdbool.h'
32338 if test -n "$STDBOOL_H"; then
32339 GL_GENERATE_STDBOOL_H_TRUE=
32340 GL_GENERATE_STDBOOL_H_FALSE='#'
32342 GL_GENERATE_STDBOOL_H_TRUE='#'
32343 GL_GENERATE_STDBOOL_H_FALSE=
32347 if test "$ac_cv_type__Bool" = yes; then
32358 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
32361 if test "x$ac_cv_type_max_align_t" = xyes; then :
32364 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
32367 if test $gt_cv_c_wchar_t = no; then
32371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
32372 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
32373 if ${gl_cv_decl_null_works+:} false; then :
32374 $as_echo_n "(cached) " >&6
32376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32377 /* end confdefs.h. */
32378 #include <stddef.h>
32379 int test[2 * (sizeof NULL == sizeof (void *)) -1];
32389 if ac_fn_c_try_compile "$LINENO"; then :
32390 gl_cv_decl_null_works=yes
32392 gl_cv_decl_null_works=no
32394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
32397 $as_echo "$gl_cv_decl_null_works" >&6; }
32398 if test $gl_cv_decl_null_works = no; then
32403 if test -n "$STDDEF_H"; then
32404 GL_GENERATE_STDDEF_H_TRUE=
32405 GL_GENERATE_STDDEF_H_FALSE='#'
32407 GL_GENERATE_STDDEF_H_TRUE='#'
32408 GL_GENERATE_STDDEF_H_FALSE=
32411 if test -n "$STDDEF_H"; then
32420 if test $gl_cv_have_include_next = yes; then
32421 gl_cv_next_stddef_h='<'stddef.h'>'
32423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
32424 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
32425 if ${gl_cv_next_stddef_h+:} false; then :
32426 $as_echo_n "(cached) " >&6
32431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32432 /* end confdefs.h. */
32433 #include <stddef.h>
32436 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32437 *) gl_absname_cpp="$ac_cpp" ;;
32442 gl_dirsep_regex='[/\\]'
32445 gl_dirsep_regex='\/'
32448 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32449 gl_header_literal_regex=`echo 'stddef.h' \
32450 | sed -e "$gl_make_literal_regex_sed"`
32451 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32452 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32458 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32459 sed -n "$gl_absolute_header_sed"`
32461 gl_header=$gl_cv_absolute_stddef_h
32462 gl_cv_next_stddef_h='"'$gl_header'"'
32466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
32467 $as_echo "$gl_cv_next_stddef_h" >&6; }
32469 NEXT_STDDEF_H=$gl_cv_next_stddef_h
32471 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32472 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32473 gl_next_as_first_directive='<'stddef.h'>'
32475 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32476 gl_next_as_first_directive=$gl_cv_next_stddef_h
32478 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
32488 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
32499 if test $gl_cv_have_include_next = yes; then
32500 gl_cv_next_stdio_h='<'stdio.h'>'
32502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
32503 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
32504 if ${gl_cv_next_stdio_h+:} false; then :
32505 $as_echo_n "(cached) " >&6
32510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32511 /* end confdefs.h. */
32515 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32516 *) gl_absname_cpp="$ac_cpp" ;;
32521 gl_dirsep_regex='[/\\]'
32524 gl_dirsep_regex='\/'
32527 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32528 gl_header_literal_regex=`echo 'stdio.h' \
32529 | sed -e "$gl_make_literal_regex_sed"`
32530 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32531 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32537 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32538 sed -n "$gl_absolute_header_sed"`
32540 gl_header=$gl_cv_absolute_stdio_h
32541 gl_cv_next_stdio_h='"'$gl_header'"'
32545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
32546 $as_echo "$gl_cv_next_stdio_h" >&6; }
32548 NEXT_STDIO_H=$gl_cv_next_stdio_h
32550 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32552 gl_next_as_first_directive='<'stdio.h'>'
32554 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32555 gl_next_as_first_directive=$gl_cv_next_stdio_h
32557 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
32563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
32564 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
32565 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
32566 $as_echo_n "(cached) " >&6
32568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32569 /* end confdefs.h. */
32571 #define __STDC_FORMAT_MACROS 1
32573 #include <inttypes.h>
32574 /* For non-mingw systems, compilation will trivially succeed.
32575 For mingw, compilation will succeed for older mingw (system
32576 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
32577 #if (defined _WIN32 && ! defined __CYGWIN__) && \
32578 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
32579 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
32590 if ac_fn_c_try_compile "$LINENO"; then :
32591 gl_cv_func_printf_attribute_flavor=system
32593 gl_cv_func_printf_attribute_flavor=gnu
32595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
32598 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
32599 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
32601 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
32608 cat >>confdefs.h <<_ACEOF
32609 #define GNULIB_FSCANF 1
32616 cat >>confdefs.h <<_ACEOF
32617 #define GNULIB_SCANF 1
32642 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
32643 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32645 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32646 if eval \${$as_gl_Symbol+:} false; then :
32647 $as_echo_n "(cached) " >&6
32649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32650 /* end confdefs.h. */
32662 if ac_fn_c_try_compile "$LINENO"; then :
32663 eval "$as_gl_Symbol=yes"
32665 eval "$as_gl_Symbol=no"
32667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32669 eval ac_res=\$$as_gl_Symbol
32670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32671 $as_echo "$ac_res" >&6; }
32672 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32673 cat >>confdefs.h <<_ACEOF
32674 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32677 eval ac_cv_have_decl_$gl_func=yes
32692 if test $gl_cv_have_include_next = yes; then
32693 gl_cv_next_stdlib_h='<'stdlib.h'>'
32695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
32696 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
32697 if ${gl_cv_next_stdlib_h+:} false; then :
32698 $as_echo_n "(cached) " >&6
32703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32704 /* end confdefs.h. */
32705 #include <stdlib.h>
32708 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32709 *) gl_absname_cpp="$ac_cpp" ;;
32714 gl_dirsep_regex='[/\\]'
32717 gl_dirsep_regex='\/'
32720 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32721 gl_header_literal_regex=`echo 'stdlib.h' \
32722 | sed -e "$gl_make_literal_regex_sed"`
32723 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32724 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32730 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32731 sed -n "$gl_absolute_header_sed"`
32733 gl_header=$gl_cv_absolute_stdlib_h
32734 gl_cv_next_stdlib_h='"'$gl_header'"'
32738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
32739 $as_echo "$gl_cv_next_stdlib_h" >&6; }
32741 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
32743 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32744 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32745 gl_next_as_first_directive='<'stdlib.h'>'
32747 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32748 gl_next_as_first_directive=$gl_cv_next_stdlib_h
32750 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
32757 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
32758 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32760 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32761 if eval \${$as_gl_Symbol+:} false; then :
32762 $as_echo_n "(cached) " >&6
32764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32765 /* end confdefs.h. */
32766 #include <stdlib.h>
32767 #if HAVE_SYS_LOADAVG_H
32768 /* OpenIndiana has a bug: <sys/time.h> must be included before
32769 <sys/loadavg.h>. */
32770 # include <sys/time.h>
32771 # include <sys/loadavg.h>
32774 # include <random.h>
32786 if ac_fn_c_try_compile "$LINENO"; then :
32787 eval "$as_gl_Symbol=yes"
32789 eval "$as_gl_Symbol=no"
32791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32793 eval ac_res=\$$as_gl_Symbol
32794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32795 $as_echo "$ac_res" >&6; }
32796 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32797 cat >>confdefs.h <<_ACEOF
32798 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32801 eval ac_cv_have_decl_$gl_func=yes
32812 for ac_func in stpcpy
32814 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
32815 if test "x$ac_cv_func_stpcpy" = xyes; then :
32816 cat >>confdefs.h <<_ACEOF
32817 #define HAVE_STPCPY 1
32823 if test $ac_cv_func_stpcpy = no; then
32827 if test $HAVE_STPCPY = 0; then
32836 gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
32853 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
32861 for ac_func in strchrnul
32863 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
32864 if test "x$ac_cv_func_strchrnul" = xyes; then :
32865 cat >>confdefs.h <<_ACEOF
32866 #define HAVE_STRCHRNUL 1
32872 if test $ac_cv_func_strchrnul = no; then
32875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
32876 $as_echo_n "checking whether strchrnul works... " >&6; }
32877 if ${gl_cv_func_strchrnul_works+:} false; then :
32878 $as_echo_n "(cached) " >&6
32880 if test "$cross_compiling" = yes; then :
32881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32882 /* end confdefs.h. */
32884 #if defined __CYGWIN__
32885 #include <cygwin/version.h>
32886 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
32894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32895 $EGREP "Lucky user" >/dev/null 2>&1; then :
32896 gl_cv_func_strchrnul_works="guessing yes"
32898 gl_cv_func_strchrnul_works="guessing no"
32904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32905 /* end confdefs.h. */
32907 #include <string.h> /* for strchrnul */
32912 const char *buf = "a";
32913 return strchrnul (buf, 'b') != buf + 1;
32919 if ac_fn_c_try_run "$LINENO"; then :
32920 gl_cv_func_strchrnul_works=yes
32922 gl_cv_func_strchrnul_works=no
32924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32925 conftest.$ac_objext conftest.beam conftest.$ac_ext
32930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
32931 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
32932 case "$gl_cv_func_strchrnul_works" in
32934 *) REPLACE_STRCHRNUL=1 ;;
32938 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
32947 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
32962 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
32970 if test $ac_cv_func_strdup = yes; then
32971 if test $gl_cv_func_malloc_posix != yes; then
32976 if test $ac_cv_have_decl_strdup = no; then
32980 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
32989 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
33004 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
33015 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
33016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
33017 $as_echo_n "checking for working strerror function... " >&6; }
33018 if ${gl_cv_func_working_strerror+:} false; then :
33019 $as_echo_n "(cached) " >&6
33021 if test "$cross_compiling" = yes; then :
33023 # Guess yes on glibc systems.
33024 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
33025 # If we don't know, assume the worst.
33026 *) gl_cv_func_working_strerror="guessing no" ;;
33030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33031 /* end confdefs.h. */
33032 #include <string.h>
33037 if (!*strerror (-2)) return 1;
33042 if ac_fn_c_try_run "$LINENO"; then :
33043 gl_cv_func_working_strerror=yes
33045 gl_cv_func_working_strerror=no
33047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33048 conftest.$ac_objext conftest.beam conftest.$ac_ext
33053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
33054 $as_echo "$gl_cv_func_working_strerror" >&6; }
33055 case "$gl_cv_func_working_strerror" in
33062 case "$gl_cv_func_strerror_r_works" in
33063 *no) REPLACE_STRERROR=1 ;;
33070 if test $REPLACE_STRERROR = 1; then
33079 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
33084 cat >>confdefs.h <<_ACEOF
33085 #define GNULIB_STRERROR 1
33100 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
33106 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
33115 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
33121 if test $ac_cv_header_sys_socket_h != yes; then
33122 for ac_header in winsock2.h
33124 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
33125 if test "x$ac_cv_header_winsock2_h" = xyes; then :
33126 cat >>confdefs.h <<_ACEOF
33127 #define HAVE_WINSOCK2_H 1
33135 if test "$ac_cv_header_winsock2_h" = yes; then
33137 UNISTD_H_HAVE_WINSOCK2_H=1
33138 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
33152 if test $ac_cv_have_decl_strerror_r = no; then
33153 HAVE_DECL_STRERROR_R=0
33156 if test $ac_cv_func_strerror_r = yes; then
33157 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
33158 if test $gl_cv_func_strerror_r_posix_signature = yes; then
33159 case "$gl_cv_func_strerror_r_works" in
33160 *no) REPLACE_STRERROR_R=1 ;;
33163 REPLACE_STRERROR_R=1
33166 REPLACE_STRERROR_R=1
33170 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
33179 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
33192 GNULIB_STRERROR_R=1
33198 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
33204 cat >>confdefs.h <<_ACEOF
33205 #define GNULIB_STRERROR_R_POSIX 1
33218 if test $ac_cv_have_decl_strndup = no; then
33219 HAVE_DECL_STRNDUP=0
33222 if test $ac_cv_func_strndup = yes; then
33224 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
33225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
33226 $as_echo_n "checking for working strndup... " >&6; }
33227 if ${gl_cv_func_strndup_works+:} false; then :
33228 $as_echo_n "(cached) " >&6
33230 if test "$cross_compiling" = yes; then :
33233 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
33234 *) gl_cv_func_strndup_works="guessing yes";;
33238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33239 /* end confdefs.h. */
33241 #include <string.h>
33242 #include <stdlib.h>
33247 #if !HAVE_DECL_STRNDUP
33252 char *strndup (const char *, size_t);
33256 s = strndup ("some longer string", 15);
33258 s = strndup ("shorter string", 13);
33259 result = s[13] != '\0';
33266 if ac_fn_c_try_run "$LINENO"; then :
33267 gl_cv_func_strndup_works=yes
33269 gl_cv_func_strndup_works=no
33271 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33272 conftest.$ac_objext conftest.beam conftest.$ac_ext
33276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
33277 $as_echo "$gl_cv_func_strndup_works" >&6; }
33278 case $gl_cv_func_strndup_works in
33279 *no) REPLACE_STRNDUP=1 ;;
33285 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
33294 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
33308 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
33318 if test $ac_cv_have_decl_strnlen = no; then
33319 HAVE_DECL_STRNLEN=0
33322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
33323 $as_echo_n "checking for working strnlen... " >&6; }
33324 if ${ac_cv_func_strnlen_working+:} false; then :
33325 $as_echo_n "(cached) " >&6
33327 if test "$cross_compiling" = yes; then :
33328 # Guess no on AIX systems, yes otherwise.
33330 aix*) ac_cv_func_strnlen_working=no;;
33331 *) ac_cv_func_strnlen_working=yes;;
33334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33335 /* end confdefs.h. */
33336 $ac_includes_default
33342 #define S_LEN (sizeof S - 1)
33344 /* At least one implementation is buggy: that of AIX 4.3 would
33345 give strnlen (S, 1) == 3. */
33348 for (i = 0; i < S_LEN + 1; ++i)
33350 int expected = i <= S_LEN ? i : S_LEN;
33351 if (strnlen (S, i) != expected)
33360 if ac_fn_c_try_run "$LINENO"; then :
33361 ac_cv_func_strnlen_working=yes
33363 ac_cv_func_strnlen_working=no
33365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33366 conftest.$ac_objext conftest.beam conftest.$ac_ext
33370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
33371 $as_echo "$ac_cv_func_strnlen_working" >&6; }
33372 test $ac_cv_func_strnlen_working = no && :
33375 if test $ac_cv_func_strnlen_working = no; then
33380 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
33389 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
33404 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
33412 for ac_func in strverscmp
33414 ac_fn_c_check_func "$LINENO" "strverscmp" "ac_cv_func_strverscmp"
33415 if test "x$ac_cv_func_strverscmp" = xyes; then :
33416 cat >>confdefs.h <<_ACEOF
33417 #define HAVE_STRVERSCMP 1
33423 if test $ac_cv_func_strverscmp = no; then
33427 if test $HAVE_STRVERSCMP = 0; then
33436 gl_LIBOBJS="$gl_LIBOBJS strverscmp.$ac_objext"
33447 GNULIB_STRVERSCMP=1
33453 $as_echo "#define GNULIB_TEST_STRVERSCMP 1" >>confdefs.h
33471 if test $gl_cv_have_include_next = yes; then
33472 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
33474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
33475 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
33476 if ${gl_cv_next_sys_stat_h+:} false; then :
33477 $as_echo_n "(cached) " >&6
33480 if test $ac_cv_header_sys_stat_h = yes; then
33485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33486 /* end confdefs.h. */
33487 #include <sys/stat.h>
33490 aix*) gl_absname_cpp="$ac_cpp -C" ;;
33491 *) gl_absname_cpp="$ac_cpp" ;;
33496 gl_dirsep_regex='[/\\]'
33499 gl_dirsep_regex='\/'
33502 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33503 gl_header_literal_regex=`echo 'sys/stat.h' \
33504 | sed -e "$gl_make_literal_regex_sed"`
33505 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33506 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33512 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33513 sed -n "$gl_absolute_header_sed"`
33515 gl_header=$gl_cv_absolute_sys_stat_h
33516 gl_cv_next_sys_stat_h='"'$gl_header'"'
33518 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
33523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
33524 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
33526 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
33528 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33529 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33530 gl_next_as_first_directive='<'sys/stat.h'>'
33532 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33533 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
33535 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
33544 WINDOWS_STAT_TIMESPEC=0
33553 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
33554 #include <sys/stat.h>
33556 if test "x$ac_cv_type_nlink_t" = xyes; then :
33560 $as_echo "#define nlink_t int" >>confdefs.h
33566 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
33567 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33569 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33570 if eval \${$as_gl_Symbol+:} false; then :
33571 $as_echo_n "(cached) " >&6
33573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33574 /* end confdefs.h. */
33575 #include <sys/stat.h>
33586 if ac_fn_c_try_compile "$LINENO"; then :
33587 eval "$as_gl_Symbol=yes"
33589 eval "$as_gl_Symbol=no"
33591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33593 eval ac_res=\$$as_gl_Symbol
33594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33595 $as_echo "$ac_res" >&6; }
33596 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33597 cat >>confdefs.h <<_ACEOF
33598 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33601 eval ac_cv_have_decl_$gl_func=yes
33621 if test $gl_cv_have_include_next = yes; then
33622 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
33624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
33625 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
33626 if ${gl_cv_next_sys_wait_h+:} false; then :
33627 $as_echo_n "(cached) " >&6
33630 if test $ac_cv_header_sys_wait_h = yes; then
33635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33636 /* end confdefs.h. */
33637 #include <sys/wait.h>
33640 aix*) gl_absname_cpp="$ac_cpp -C" ;;
33641 *) gl_absname_cpp="$ac_cpp" ;;
33646 gl_dirsep_regex='[/\\]'
33649 gl_dirsep_regex='\/'
33652 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33653 gl_header_literal_regex=`echo 'sys/wait.h' \
33654 | sed -e "$gl_make_literal_regex_sed"`
33655 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33656 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33662 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33663 sed -n "$gl_absolute_header_sed"`
33665 gl_header=$gl_cv_absolute_sys_wait_h
33666 gl_cv_next_sys_wait_h='"'$gl_header'"'
33668 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
33673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
33674 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
33676 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
33678 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33679 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33680 gl_next_as_first_directive='<'sys/wait.h'>'
33682 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33683 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
33685 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
33694 for gl_func in waitpid; do
33695 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33697 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33698 if eval \${$as_gl_Symbol+:} false; then :
33699 $as_echo_n "(cached) " >&6
33701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33702 /* end confdefs.h. */
33703 #include <sys/wait.h>
33713 if ac_fn_c_try_compile "$LINENO"; then :
33714 eval "$as_gl_Symbol=yes"
33716 eval "$as_gl_Symbol=no"
33718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33720 eval ac_res=\$$as_gl_Symbol
33721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33722 $as_echo "$ac_res" >&6; }
33723 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33724 cat >>confdefs.h <<_ACEOF
33725 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33728 eval ac_cv_have_decl_$gl_func=yes
33753 if test $gl_cv_have_include_next = yes; then
33754 gl_cv_next_unistd_h='<'unistd.h'>'
33756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
33757 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
33758 if ${gl_cv_next_unistd_h+:} false; then :
33759 $as_echo_n "(cached) " >&6
33762 if test $ac_cv_header_unistd_h = yes; then
33767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33768 /* end confdefs.h. */
33769 #include <unistd.h>
33772 aix*) gl_absname_cpp="$ac_cpp -C" ;;
33773 *) gl_absname_cpp="$ac_cpp" ;;
33778 gl_dirsep_regex='[/\\]'
33781 gl_dirsep_regex='\/'
33784 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33785 gl_header_literal_regex=`echo 'unistd.h' \
33786 | sed -e "$gl_make_literal_regex_sed"`
33787 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33788 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33794 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33795 sed -n "$gl_absolute_header_sed"`
33797 gl_header=$gl_cv_absolute_unistd_h
33798 gl_cv_next_unistd_h='"'$gl_header'"'
33800 gl_cv_next_unistd_h='<'unistd.h'>'
33805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
33806 $as_echo "$gl_cv_next_unistd_h" >&6; }
33808 NEXT_UNISTD_H=$gl_cv_next_unistd_h
33810 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33811 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33812 gl_next_as_first_directive='<'unistd.h'>'
33814 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33815 gl_next_as_first_directive=$gl_cv_next_unistd_h
33817 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
33822 if test $ac_cv_header_unistd_h = yes; then
33834 for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat truncate ttyname_r unlink unlinkat usleep; do
33835 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33837 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33838 if eval \${$as_gl_Symbol+:} false; then :
33839 $as_echo_n "(cached) " >&6
33841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33842 /* end confdefs.h. */
33845 # include <unistd.h>
33847 /* Some systems declare various items in the wrong headers. */
33848 #if !(defined __GLIBC__ && !defined __UCLIBC__)
33849 # include <fcntl.h>
33850 # include <stdio.h>
33851 # include <stdlib.h>
33852 # if defined _WIN32 && ! defined __CYGWIN__
33866 if ac_fn_c_try_compile "$LINENO"; then :
33867 eval "$as_gl_Symbol=yes"
33869 eval "$as_gl_Symbol=no"
33871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33873 eval ac_res=\$$as_gl_Symbol
33874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33875 $as_echo "$ac_res" >&6; }
33876 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33877 cat >>confdefs.h <<_ACEOF
33878 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33881 eval ac_cv_have_decl_$gl_func=yes
33891 if { test "$HAVE_LIBUNISTRING" != yes \
33896 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
33897 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
33898 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
33899 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
33900 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
33910 LIBUNISTRING_UNITYPES_H='unitypes.h'
33912 LIBUNISTRING_UNITYPES_H=
33918 if { test "$HAVE_LIBUNISTRING" != yes \
33923 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
33924 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
33925 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
33926 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
33927 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
33937 LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
33939 LIBUNISTRING_UNIWIDTH_H=
33945 if { test "$HAVE_LIBUNISTRING" != yes \
33950 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
33951 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
33952 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
33953 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
33954 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
33964 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
33965 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
33967 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
33968 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
33977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
33978 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
33979 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
33980 $as_echo_n "(cached) " >&6
33982 touch conftest.file
33983 # Assume that if we have lstat, we can also check symlinks.
33984 if test $ac_cv_func_lstat = yes; then
33985 ln -s conftest.file conftest.lnk
33987 if test "$cross_compiling" = yes; then :
33989 # Guess yes on glibc systems.
33990 *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
33991 # Guess no on native Windows.
33992 mingw*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
33993 # If we don't know, assume the worst.
33994 *) gl_cv_func_unlink_honors_slashes="guessing no" ;;
33998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33999 /* end confdefs.h. */
34001 # include <unistd.h>
34002 #else /* on Windows with MSVC */
34011 if (!unlink ("conftest.file/"))
34013 else if (errno != ENOTDIR)
34016 if (!unlink ("conftest.lnk/"))
34018 else if (errno != ENOTDIR)
34027 if ac_fn_c_try_run "$LINENO"; then :
34028 gl_cv_func_unlink_honors_slashes=yes
34030 gl_cv_func_unlink_honors_slashes=no
34032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34033 conftest.$ac_objext conftest.beam conftest.$ac_ext
34036 rm -f conftest.file conftest.lnk
34038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
34039 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
34040 case "$gl_cv_func_unlink_honors_slashes" in
34046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
34047 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
34048 if ${gl_cv_func_unlink_parent_fails+:} false; then :
34049 $as_echo_n "(cached) " >&6
34054 # Use the mktemp program if available. If not available, hide the error
34056 tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
34057 test -n "$tmp" && test -d "$tmp"
34060 # Use a simple mkdir command. It is guaranteed to fail if the directory
34061 # already exists. $RANDOM is bash specific and expands to empty in shells
34062 # other than bash, ksh and zsh. Its use does not increase security;
34063 # rather, it minimizes the probability of failure in a very cluttered /tmp
34065 tmp=/tmp/gt$$-$RANDOM
34066 (umask 077 && mkdir "$tmp")
34068 mkdir "$tmp/subdir"
34069 GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
34070 export GL_SUBDIR_FOR_UNLINK
34071 if test "$cross_compiling" = yes; then :
34072 # If we don't know, assume the worst.
34073 gl_cv_func_unlink_parent_fails="guessing no"
34076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34077 /* end confdefs.h. */
34079 #include <stdlib.h>
34081 # include <unistd.h>
34082 #else /* on Windows with MSVC */
34083 # include <direct.h>
34089 if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
34091 else if (unlink ("..") == 0)
34097 if ac_fn_c_try_run "$LINENO"; then :
34098 gl_cv_func_unlink_parent_fails=yes
34100 gl_cv_func_unlink_parent_fails=no
34102 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34103 conftest.$ac_objext conftest.beam conftest.$ac_ext
34106 unset GL_SUBDIR_FOR_UNLINK
34109 gl_cv_func_unlink_parent_fails="guessing no"
34113 gl_cv_func_unlink_parent_fails="guessing yes"
34118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
34119 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
34120 case "$gl_cv_func_unlink_parent_fails" in
34124 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
34129 if test $REPLACE_UNLINK = 1; then
34138 gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
34152 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
34158 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
34180 if test $ac_cv_have_decl_unsetenv = no; then
34181 HAVE_DECL_UNSETENV=0
34183 for ac_func in unsetenv
34185 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
34186 if test "x$ac_cv_func_unsetenv" = xyes; then :
34187 cat >>confdefs.h <<_ACEOF
34188 #define HAVE_UNSETENV 1
34194 if test $ac_cv_func_unsetenv = no; then
34198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
34199 $as_echo_n "checking for unsetenv() return type... " >&6; }
34200 if ${gt_cv_func_unsetenv_ret+:} false; then :
34201 $as_echo_n "(cached) " >&6
34203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34204 /* end confdefs.h. */
34207 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
34208 #include <stdlib.h>
34213 int unsetenv (const char *name);
34223 if ac_fn_c_try_compile "$LINENO"; then :
34224 gt_cv_func_unsetenv_ret='int'
34226 gt_cv_func_unsetenv_ret='void'
34228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
34231 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
34232 if test $gt_cv_func_unsetenv_ret = 'void'; then
34234 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
34239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
34240 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
34241 if ${gl_cv_func_unsetenv_works+:} false; then :
34242 $as_echo_n "(cached) " >&6
34244 if test "$cross_compiling" = yes; then :
34246 # Guess yes on glibc systems.
34247 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
34248 # If we don't know, assume the worst.
34249 *) gl_cv_func_unsetenv_works="guessing no" ;;
34253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34254 /* end confdefs.h. */
34256 #include <stdlib.h>
34258 extern char **environ;
34264 char entry1[] = "a=1";
34265 char entry2[] = "b=2";
34266 char *env[] = { entry1, entry2, NULL };
34267 if (putenv ((char *) "a=1")) return 1;
34268 if (putenv (entry2)) return 2;
34271 if (getenv ("a")) return 3;
34272 if (!unsetenv ("") || errno != EINVAL) return 4;
34275 if (!getenv ("a")) return 5;
34278 if (getenv ("a")) return 6;
34284 if ac_fn_c_try_run "$LINENO"; then :
34285 gl_cv_func_unsetenv_works=yes
34287 gl_cv_func_unsetenv_works=no
34289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34290 conftest.$ac_objext conftest.beam conftest.$ac_ext
34294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
34295 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
34296 case "$gl_cv_func_unsetenv_works" in
34304 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
34313 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
34331 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
34337 if test $ac_cv_func_vasnprintf = no; then
34348 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
34358 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
34368 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
34378 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
34380 if test $ac_cv_func_vasnprintf = yes; then
34382 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
34396 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
34397 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
34401 $as_echo "#define ptrdiff_t long" >>confdefs.h
34429 gl_cv_func_vfprintf_posix=no
34430 case "$gl_cv_func_printf_sizes_c99" in
34432 case "$gl_cv_func_printf_long_double" in
34434 case "$gl_cv_func_printf_infinite" in
34436 case "$gl_cv_func_printf_infinite_long_double" in
34438 case "$gl_cv_func_printf_directive_a" in
34440 case "$gl_cv_func_printf_directive_f" in
34442 case "$gl_cv_func_printf_directive_n" in
34444 case "$gl_cv_func_printf_directive_ls" in
34446 case "$gl_cv_func_printf_positions" in
34448 case "$gl_cv_func_printf_flag_grouping" in
34450 case "$gl_cv_func_printf_flag_leftadjust" in
34452 case "$gl_cv_func_printf_flag_zero" in
34454 case "$gl_cv_func_printf_precision" in
34456 case "$gl_cv_func_printf_enomem" in
34458 # vfprintf exists and is
34459 # already POSIX compliant.
34460 gl_cv_func_vfprintf_posix=yes
34489 if test $gl_cv_func_vfprintf_posix = no; then
34493 case "$gl_cv_func_printf_infinite" in
34498 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
34506 case "$gl_cv_func_printf_long_double" in
34508 case "$gl_cv_func_printf_infinite_long_double" in
34513 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
34522 case "$gl_cv_func_printf_directive_a" in
34527 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
34529 for ac_func in nl_langinfo
34531 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
34532 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
34533 cat >>confdefs.h <<_ACEOF
34534 #define HAVE_NL_LANGINFO 1
34545 case "$gl_cv_func_printf_directive_f" in
34550 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
34557 case "$gl_cv_func_printf_directive_ls" in
34562 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
34569 case "$gl_cv_func_printf_flag_grouping" in
34574 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
34581 case "$gl_cv_func_printf_flag_leftadjust" in
34586 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
34593 case "$gl_cv_func_printf_flag_zero" in
34598 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
34605 case "$gl_cv_func_printf_precision" in
34610 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
34613 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
34616 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
34623 case "$gl_cv_func_printf_enomem" in
34628 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
34631 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
34634 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
34649 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
34659 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
34669 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
34679 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
34681 if test $ac_cv_func_vasnprintf = yes; then
34683 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
34697 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
34698 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
34702 $as_echo "#define ptrdiff_t long" >>confdefs.h
34723 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
34727 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
34738 GNULIB_VFPRINTF_POSIX=1
34744 $as_echo "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
34750 gl_cv_func_vsnprintf_usable=no
34751 for ac_func in vsnprintf
34753 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
34754 if test "x$ac_cv_func_vsnprintf" = xyes; then :
34755 cat >>confdefs.h <<_ACEOF
34756 #define HAVE_VSNPRINTF 1
34762 if test $ac_cv_func_vsnprintf = yes; then
34766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
34767 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
34768 if ${gl_cv_func_snprintf_size1+:} false; then :
34769 $as_echo_n "(cached) " >&6
34772 if test "$cross_compiling" = yes; then :
34774 # Guess yes on native Windows.
34775 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
34776 *) gl_cv_func_snprintf_size1="guessing yes" ;;
34780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34781 /* end confdefs.h. */
34785 # define my_snprintf snprintf
34787 # include <stdarg.h>
34788 static int my_snprintf (char *buf, int size, const char *format, ...)
34792 va_start (args, format);
34793 ret = vsnprintf (buf, size, format, args);
34800 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
34801 my_snprintf (buf, 1, "%d", 12345);
34802 return buf[1] != 'E';
34805 if ac_fn_c_try_run "$LINENO"; then :
34806 gl_cv_func_snprintf_size1=yes
34808 gl_cv_func_snprintf_size1=no
34810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34811 conftest.$ac_objext conftest.beam conftest.$ac_ext
34816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
34817 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
34819 case "$gl_cv_func_snprintf_size1" in
34822 case "$gl_cv_func_snprintf_retval_c99" in
34826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
34827 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
34828 if ${gl_cv_func_printf_positions+:} false; then :
34829 $as_echo_n "(cached) " >&6
34832 if test "$cross_compiling" = yes; then :
34835 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
34836 gl_cv_func_printf_positions="guessing no";;
34837 beos*) gl_cv_func_printf_positions="guessing no";;
34838 # Guess no on native Windows.
34839 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
34840 *) gl_cv_func_printf_positions="guessing yes";;
34844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34845 /* end confdefs.h. */
34848 #include <string.h>
34849 /* The string "%2$d %1$d", with dollar characters protected from the shell's
34850 dollar expansion (possibly an autoconf bug). */
34851 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
34852 static char buf[100];
34855 sprintf (buf, format, 33, 55);
34856 return (strcmp (buf, "55 33") != 0);
34859 if ac_fn_c_try_run "$LINENO"; then :
34860 gl_cv_func_printf_positions=yes
34862 gl_cv_func_printf_positions=no
34864 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34865 conftest.$ac_objext conftest.beam conftest.$ac_ext
34870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
34871 $as_echo "$gl_cv_func_printf_positions" >&6; }
34873 case "$gl_cv_func_printf_positions" in
34875 gl_cv_func_vsnprintf_usable=yes
34883 if test $gl_cv_func_vsnprintf_usable = no; then
34894 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
34896 if test $ac_cv_func_vsnprintf = yes; then
34897 REPLACE_VSNPRINTF=1
34900 if test $ac_cv_have_decl_vsnprintf = yes; then
34901 REPLACE_VSNPRINTF=1
34908 if test $ac_cv_have_decl_vsnprintf = no; then
34909 HAVE_DECL_VSNPRINTF=0
34923 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
34942 gl_cv_func_vsnprintf_posix=no
34943 for ac_func in vsnprintf
34945 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
34946 if test "x$ac_cv_func_vsnprintf" = xyes; then :
34947 cat >>confdefs.h <<_ACEOF
34948 #define HAVE_VSNPRINTF 1
34954 if test $ac_cv_func_vsnprintf = yes; then
34958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
34959 $as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; }
34960 if ${gl_cv_func_snprintf_truncation_c99+:} false; then :
34961 $as_echo_n "(cached) " >&6
34964 if test "$cross_compiling" = yes; then :
34967 # Guess yes on glibc systems.
34968 *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34969 # Guess yes on FreeBSD >= 5.
34970 freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
34971 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34972 # Guess yes on Mac OS X >= 10.3.
34973 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
34974 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34975 # Guess yes on OpenBSD >= 3.9.
34976 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
34977 gl_cv_func_snprintf_truncation_c99="guessing no";;
34978 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34979 # Guess yes on Solaris >= 2.6.
34980 solaris2.[0-5] | solaris2.[0-5].*)
34981 gl_cv_func_snprintf_truncation_c99="guessing no";;
34982 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34983 # Guess yes on AIX >= 4.
34984 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
34985 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34986 # Guess yes on HP-UX >= 11.
34987 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
34988 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34989 # Guess yes on IRIX >= 6.5.
34990 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34991 # Guess yes on OSF/1 >= 5.
34992 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
34993 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34994 # Guess yes on NetBSD >= 3.
34995 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
34996 gl_cv_func_snprintf_truncation_c99="guessing no";;
34997 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34998 # Guess yes on BeOS.
34999 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
35000 # Guess no on native Windows.
35001 mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
35002 # If we don't know, assume the worst.
35003 *) gl_cv_func_snprintf_truncation_c99="guessing no";;
35007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35008 /* end confdefs.h. */
35011 #include <string.h>
35013 # define my_snprintf snprintf
35015 # include <stdarg.h>
35016 static int my_snprintf (char *buf, int size, const char *format, ...)
35020 va_start (args, format);
35021 ret = vsnprintf (buf, size, format, args);
35026 static char buf[100];
35029 strcpy (buf, "ABCDEF");
35030 my_snprintf (buf, 3, "%d %d", 4567, 89);
35031 if (memcmp (buf, "45\0DEF", 6) != 0)
35036 if ac_fn_c_try_run "$LINENO"; then :
35037 gl_cv_func_snprintf_truncation_c99=yes
35039 gl_cv_func_snprintf_truncation_c99=no
35041 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35042 conftest.$ac_objext conftest.beam conftest.$ac_ext
35047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
35048 $as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; }
35054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5
35055 $as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; }
35056 if ${gl_cv_func_snprintf_directive_n+:} false; then :
35057 $as_echo_n "(cached) " >&6
35060 if test "$cross_compiling" = yes; then :
35063 # Guess yes on glibc systems.
35064 *-gnu* | gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
35065 # Guess yes on FreeBSD >= 5.
35066 freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";;
35067 freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
35068 # Guess yes on Mac OS X >= 10.3.
35069 darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
35070 darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
35071 # Guess yes on Solaris >= 2.6.
35072 solaris2.[0-5] | solaris2.[0-5].*)
35073 gl_cv_func_snprintf_directive_n="guessing no";;
35074 solaris*) gl_cv_func_snprintf_directive_n="guessing yes";;
35075 # Guess yes on AIX >= 4.
35076 aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
35077 aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
35078 # Guess yes on IRIX >= 6.5.
35079 irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
35080 # Guess yes on OSF/1 >= 5.
35081 osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
35082 osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
35083 # Guess yes on NetBSD >= 3.
35084 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
35085 gl_cv_func_snprintf_directive_n="guessing no";;
35086 netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
35087 # Guess yes on BeOS.
35088 beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
35089 # Guess no on native Windows.
35090 mingw*) gl_cv_func_snprintf_directive_n="guessing no";;
35091 # If we don't know, assume the worst.
35092 *) gl_cv_func_snprintf_directive_n="guessing no";;
35096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35097 /* end confdefs.h. */
35100 #include <string.h>
35102 # define my_snprintf snprintf
35104 # include <stdarg.h>
35105 static int my_snprintf (char *buf, int size, const char *format, ...)
35109 va_start (args, format);
35110 ret = vsnprintf (buf, size, format, args);
35115 static char fmtstring[10];
35116 static char buf[100];
35120 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
35121 support %n in format strings in read-only memory but not in writable
35123 strcpy (fmtstring, "%d %n");
35124 my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
35130 if ac_fn_c_try_run "$LINENO"; then :
35131 gl_cv_func_snprintf_directive_n=yes
35133 gl_cv_func_snprintf_directive_n=no
35135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35136 conftest.$ac_objext conftest.beam conftest.$ac_ext
35141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5
35142 $as_echo "$gl_cv_func_snprintf_directive_n" >&6; }
35147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
35148 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
35149 if ${gl_cv_func_snprintf_size1+:} false; then :
35150 $as_echo_n "(cached) " >&6
35153 if test "$cross_compiling" = yes; then :
35155 # Guess yes on native Windows.
35156 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
35157 *) gl_cv_func_snprintf_size1="guessing yes" ;;
35161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35162 /* end confdefs.h. */
35166 # define my_snprintf snprintf
35168 # include <stdarg.h>
35169 static int my_snprintf (char *buf, int size, const char *format, ...)
35173 va_start (args, format);
35174 ret = vsnprintf (buf, size, format, args);
35181 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
35182 my_snprintf (buf, 1, "%d", 12345);
35183 return buf[1] != 'E';
35186 if ac_fn_c_try_run "$LINENO"; then :
35187 gl_cv_func_snprintf_size1=yes
35189 gl_cv_func_snprintf_size1=no
35191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35192 conftest.$ac_objext conftest.beam conftest.$ac_ext
35197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
35198 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
35202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5
35203 $as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; }
35204 if ${gl_cv_func_vsnprintf_zerosize_c99+:} false; then :
35205 $as_echo_n "(cached) " >&6
35208 if test "$cross_compiling" = yes; then :
35211 # Guess yes on glibc systems.
35212 *-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35213 # Guess yes on FreeBSD >= 5.
35214 freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35215 freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35216 # Guess yes on Mac OS X >= 10.3.
35217 darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35218 darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35219 # Guess yes on Cygwin.
35220 cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35221 # Guess yes on Solaris >= 2.6.
35222 solaris2.[0-5] | solaris2.[0-5].*)
35223 gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35224 solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35225 # Guess yes on AIX >= 4.
35226 aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35227 aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35228 # Guess yes on IRIX >= 6.5.
35229 irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35230 # Guess yes on NetBSD >= 3.
35231 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
35232 gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35233 netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35234 # Guess yes on BeOS.
35235 beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35236 # Guess yes on native Windows.
35237 mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35238 # If we don't know, assume the worst.
35239 *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35244 /* end confdefs.h. */
35246 #include <stdarg.h>
35248 static int my_snprintf (char *buf, int size, const char *format, ...)
35252 va_start (args, format);
35253 ret = vsnprintf (buf, size, format, args);
35259 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
35260 my_snprintf (buf, 0, "%d", 12345);
35261 return buf[0] != 'D';
35264 if ac_fn_c_try_run "$LINENO"; then :
35265 gl_cv_func_vsnprintf_zerosize_c99=yes
35267 gl_cv_func_vsnprintf_zerosize_c99=no
35269 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35270 conftest.$ac_objext conftest.beam conftest.$ac_ext
35275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5
35276 $as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; }
35278 case "$gl_cv_func_printf_sizes_c99" in
35280 case "$gl_cv_func_printf_long_double" in
35282 case "$gl_cv_func_printf_infinite" in
35284 case "$gl_cv_func_printf_infinite_long_double" in
35286 case "$gl_cv_func_printf_directive_a" in
35288 case "$gl_cv_func_printf_directive_f" in
35290 case "$gl_cv_func_printf_directive_n" in
35292 case "$gl_cv_func_printf_directive_ls" in
35294 case "$gl_cv_func_printf_positions" in
35296 case "$gl_cv_func_printf_flag_grouping" in
35298 case "$gl_cv_func_printf_flag_leftadjust" in
35300 case "$gl_cv_func_printf_flag_zero" in
35302 case "$gl_cv_func_printf_precision" in
35304 case "$gl_cv_func_printf_enomem" in
35306 case "$gl_cv_func_snprintf_truncation_c99" in
35308 case "$gl_cv_func_snprintf_retval_c99" in
35310 case "$gl_cv_func_snprintf_directive_n" in
35312 case "$gl_cv_func_snprintf_size1" in
35314 case "$gl_cv_func_vsnprintf_zerosize_c99" in
35316 # vsnprintf exists and is
35317 # already POSIX compliant.
35318 gl_cv_func_vsnprintf_posix=yes
35358 if test $gl_cv_func_vsnprintf_posix = no; then
35362 case "$gl_cv_func_printf_infinite" in
35367 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
35375 case "$gl_cv_func_printf_long_double" in
35377 case "$gl_cv_func_printf_infinite_long_double" in
35382 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
35391 case "$gl_cv_func_printf_directive_a" in
35396 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
35398 for ac_func in nl_langinfo
35400 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
35401 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
35402 cat >>confdefs.h <<_ACEOF
35403 #define HAVE_NL_LANGINFO 1
35414 case "$gl_cv_func_printf_directive_f" in
35419 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
35426 case "$gl_cv_func_printf_directive_ls" in
35431 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
35438 case "$gl_cv_func_printf_flag_grouping" in
35443 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
35450 case "$gl_cv_func_printf_flag_leftadjust" in
35455 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
35462 case "$gl_cv_func_printf_flag_zero" in
35467 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
35474 case "$gl_cv_func_printf_precision" in
35479 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
35482 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
35485 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
35492 case "$gl_cv_func_printf_enomem" in
35497 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
35500 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
35503 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
35518 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
35528 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
35538 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
35548 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
35550 if test $ac_cv_func_vasnprintf = yes; then
35552 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
35566 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
35567 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
35571 $as_echo "#define ptrdiff_t long" >>confdefs.h
35592 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
35594 if test $ac_cv_func_vsnprintf = yes; then
35595 REPLACE_VSNPRINTF=1
35598 if test $ac_cv_have_decl_vsnprintf = yes; then
35599 REPLACE_VSNPRINTF=1
35621 gl_cv_func_vsprintf_posix=no
35622 case "$gl_cv_func_printf_sizes_c99" in
35624 case "$gl_cv_func_printf_long_double" in
35626 case "$gl_cv_func_printf_infinite" in
35628 case "$gl_cv_func_printf_infinite_long_double" in
35630 case "$gl_cv_func_printf_directive_a" in
35632 case "$gl_cv_func_printf_directive_f" in
35634 case "$gl_cv_func_printf_directive_n" in
35636 case "$gl_cv_func_printf_directive_ls" in
35638 case "$gl_cv_func_printf_positions" in
35640 case "$gl_cv_func_printf_flag_grouping" in
35642 case "$gl_cv_func_printf_flag_leftadjust" in
35644 case "$gl_cv_func_printf_flag_zero" in
35646 case "$gl_cv_func_printf_precision" in
35648 case "$gl_cv_func_printf_enomem" in
35650 # vsprintf exists and is
35651 # already POSIX compliant.
35652 gl_cv_func_vsprintf_posix=yes
35681 if test $gl_cv_func_vsprintf_posix = no; then
35685 case "$gl_cv_func_printf_infinite" in
35690 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
35698 case "$gl_cv_func_printf_long_double" in
35700 case "$gl_cv_func_printf_infinite_long_double" in
35705 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
35714 case "$gl_cv_func_printf_directive_a" in
35719 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
35721 for ac_func in nl_langinfo
35723 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
35724 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
35725 cat >>confdefs.h <<_ACEOF
35726 #define HAVE_NL_LANGINFO 1
35737 case "$gl_cv_func_printf_directive_f" in
35742 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
35749 case "$gl_cv_func_printf_directive_ls" in
35754 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
35761 case "$gl_cv_func_printf_flag_grouping" in
35766 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
35773 case "$gl_cv_func_printf_flag_leftadjust" in
35778 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
35785 case "$gl_cv_func_printf_flag_zero" in
35790 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
35797 case "$gl_cv_func_printf_precision" in
35802 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
35805 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
35808 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
35815 case "$gl_cv_func_printf_enomem" in
35820 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
35823 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
35826 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
35841 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
35851 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
35861 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
35871 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
35873 if test $ac_cv_func_vasnprintf = yes; then
35875 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
35889 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
35890 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
35894 $as_echo "#define ptrdiff_t long" >>confdefs.h
35915 gl_LIBOBJS="$gl_LIBOBJS vsprintf.$ac_objext"
35927 GNULIB_VSPRINTF_POSIX=1
35933 $as_echo "#define GNULIB_TEST_VSPRINTF_POSIX 1" >>confdefs.h
35939 for ac_func in waitid
35941 ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
35942 if test "x$ac_cv_func_waitid" = xyes; then :
35943 cat >>confdefs.h <<_ACEOF
35944 #define HAVE_WAITID 1
35955 mingw*) HAVE_WAITPID=0 ;;
35958 if test $HAVE_WAITPID = 0; then
35967 gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext"
35981 $as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
35997 if test $gl_cv_have_include_next = yes; then
35998 gl_cv_next_wchar_h='<'wchar.h'>'
36000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
36001 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
36002 if ${gl_cv_next_wchar_h+:} false; then :
36003 $as_echo_n "(cached) " >&6
36006 if test $ac_cv_header_wchar_h = yes; then
36011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36012 /* end confdefs.h. */
36016 aix*) gl_absname_cpp="$ac_cpp -C" ;;
36017 *) gl_absname_cpp="$ac_cpp" ;;
36022 gl_dirsep_regex='[/\\]'
36025 gl_dirsep_regex='\/'
36028 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36029 gl_header_literal_regex=`echo 'wchar.h' \
36030 | sed -e "$gl_make_literal_regex_sed"`
36031 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36032 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36038 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36039 sed -n "$gl_absolute_header_sed"`
36041 gl_header=$gl_cv_absolute_wchar_h
36042 gl_cv_next_wchar_h='"'$gl_header'"'
36044 gl_cv_next_wchar_h='<'wchar.h'>'
36049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
36050 $as_echo "$gl_cv_next_wchar_h" >&6; }
36052 NEXT_WCHAR_H=$gl_cv_next_wchar_h
36054 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36055 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36056 gl_next_as_first_directive='<'wchar.h'>'
36058 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36059 gl_next_as_first_directive=$gl_cv_next_wchar_h
36061 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
36066 if test $ac_cv_header_wchar_h = yes; then
36076 if test $gt_cv_c_wint_t = yes; then
36086 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime ; do
36087 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
36088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
36089 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
36090 if eval \${$as_gl_Symbol+:} false; then :
36091 $as_echo_n "(cached) " >&6
36093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36094 /* end confdefs.h. */
36096 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
36098 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
36099 included before <wchar.h>. */
36100 #if !(defined __GLIBC__ && !defined __UCLIBC__)
36101 # include <stddef.h>
36102 # include <stdio.h>
36116 if ac_fn_c_try_compile "$LINENO"; then :
36117 eval "$as_gl_Symbol=yes"
36119 eval "$as_gl_Symbol=no"
36121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36123 eval ac_res=\$$as_gl_Symbol
36124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36125 $as_echo "$ac_res" >&6; }
36126 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
36127 cat >>confdefs.h <<_ACEOF
36128 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
36131 eval ac_cv_have_decl_$gl_func=yes
36141 if test $ac_cv_func_iswcntrl = yes; then
36149 if test $gt_cv_c_wint_t = yes; then
36167 if test $gl_cv_have_include_next = yes; then
36168 gl_cv_next_wctype_h='<'wctype.h'>'
36170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
36171 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
36172 if ${gl_cv_next_wctype_h+:} false; then :
36173 $as_echo_n "(cached) " >&6
36176 if test $ac_cv_header_wctype_h = yes; then
36181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36182 /* end confdefs.h. */
36183 #include <wctype.h>
36186 aix*) gl_absname_cpp="$ac_cpp -C" ;;
36187 *) gl_absname_cpp="$ac_cpp" ;;
36192 gl_dirsep_regex='[/\\]'
36195 gl_dirsep_regex='\/'
36198 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36199 gl_header_literal_regex=`echo 'wctype.h' \
36200 | sed -e "$gl_make_literal_regex_sed"`
36201 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36202 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36208 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36209 sed -n "$gl_absolute_header_sed"`
36211 gl_header=$gl_cv_absolute_wctype_h
36212 gl_cv_next_wctype_h='"'$gl_header'"'
36214 gl_cv_next_wctype_h='<'wctype.h'>'
36219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
36220 $as_echo "$gl_cv_next_wctype_h" >&6; }
36222 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
36224 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36225 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36226 gl_next_as_first_directive='<'wctype.h'>'
36228 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36229 gl_next_as_first_directive=$gl_cv_next_wctype_h
36231 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
36236 if test $ac_cv_header_wctype_h = yes; then
36237 if test $ac_cv_func_iswcntrl = yes; then
36238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
36239 $as_echo_n "checking whether iswcntrl works... " >&6; }
36240 if ${gl_cv_func_iswcntrl_works+:} false; then :
36241 $as_echo_n "(cached) " >&6
36244 if test "$cross_compiling" = yes; then :
36245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36246 /* end confdefs.h. */
36247 #include <stdlib.h>
36248 #if __GNU_LIBRARY__ == 1
36249 Linux libc5 i18n is broken.
36259 if ac_fn_c_try_compile "$LINENO"; then :
36260 gl_cv_func_iswcntrl_works="guessing yes"
36262 gl_cv_func_iswcntrl_works="guessing no"
36264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36268 /* end confdefs.h. */
36270 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
36271 included before <wchar.h>.
36272 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
36273 must be included before <wchar.h>. */
36274 #include <stddef.h>
36278 #include <wctype.h>
36279 int main () { return iswprint ('x') == 0; }
36282 if ac_fn_c_try_run "$LINENO"; then :
36283 gl_cv_func_iswcntrl_works=yes
36285 gl_cv_func_iswcntrl_works=no
36287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36288 conftest.$ac_objext conftest.beam conftest.$ac_ext
36293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
36294 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
36302 case "$gl_cv_func_iswcntrl_works" in
36303 *yes) REPLACE_ISWCNTRL=0 ;;
36304 *) REPLACE_ISWCNTRL=1 ;;
36308 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
36312 if test $REPLACE_ISWCNTRL = 1; then
36315 for ac_func in towlower
36317 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
36318 if test "x$ac_cv_func_towlower" = xyes; then :
36319 cat >>confdefs.h <<_ACEOF
36320 #define HAVE_TOWLOWER 1
36326 if test $ac_cv_func_towlower = yes; then
36329 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
36330 included before <wchar.h>.
36331 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
36332 must be included before <wchar.h>. */
36333 #include <stddef.h>
36338 # include <wctype.h>
36342 if test "x$ac_cv_have_decl_towlower" = xyes; then :
36348 cat >>confdefs.h <<_ACEOF
36349 #define HAVE_DECL_TOWLOWER $ac_have_decl
36352 if test $ac_cv_have_decl_towlower = yes; then
36361 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
36365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
36366 $as_echo_n "checking for wctype_t... " >&6; }
36367 if ${gl_cv_type_wctype_t+:} false; then :
36368 $as_echo_n "(cached) " >&6
36370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36371 /* end confdefs.h. */
36372 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
36373 included before <wchar.h>.
36374 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
36375 must be included before <wchar.h>. */
36376 #include <stddef.h>
36381 # include <wctype.h>
36393 if ac_fn_c_try_compile "$LINENO"; then :
36394 gl_cv_type_wctype_t=yes
36396 gl_cv_type_wctype_t=no
36398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
36402 $as_echo "$gl_cv_type_wctype_t" >&6; }
36403 if test $gl_cv_type_wctype_t = no; then
36407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
36408 $as_echo_n "checking for wctrans_t... " >&6; }
36409 if ${gl_cv_type_wctrans_t+:} false; then :
36410 $as_echo_n "(cached) " >&6
36412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36413 /* end confdefs.h. */
36414 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
36415 included before <wchar.h>.
36416 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
36417 must be included before <wchar.h>. */
36418 #include <stddef.h>
36422 #include <wctype.h>
36433 if ac_fn_c_try_compile "$LINENO"; then :
36434 gl_cv_type_wctrans_t=yes
36436 gl_cv_type_wctrans_t=no
36438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
36442 $as_echo "$gl_cv_type_wctrans_t" >&6; }
36443 if test $gl_cv_type_wctrans_t = no; then
36448 for gl_func in wctype iswctype wctrans towctrans ; do
36449 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
36450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
36451 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
36452 if eval \${$as_gl_Symbol+:} false; then :
36453 $as_echo_n "(cached) " >&6
36455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36456 /* end confdefs.h. */
36458 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
36460 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
36461 included before <wchar.h>. */
36462 #if !(defined __GLIBC__ && !defined __UCLIBC__)
36463 # include <stddef.h>
36464 # include <stdio.h>
36466 # include <wchar.h>
36468 #include <wctype.h>
36479 if ac_fn_c_try_compile "$LINENO"; then :
36480 eval "$as_gl_Symbol=yes"
36482 eval "$as_gl_Symbol=no"
36484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36486 eval ac_res=\$$as_gl_Symbol
36487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36488 $as_echo "$ac_res" >&6; }
36489 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
36490 cat >>confdefs.h <<_ACEOF
36491 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
36494 eval ac_cv_have_decl_$gl_func=yes
36510 ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
36511 /* AIX 3.2.5 declares wcwidth in <string.h>. */
36512 #include <string.h>
36513 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
36515 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
36516 before <wchar.h>. */
36517 #include <stddef.h>
36523 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
36529 cat >>confdefs.h <<_ACEOF
36530 #define HAVE_DECL_WCWIDTH $ac_have_decl
36533 if test $ac_cv_have_decl_wcwidth != yes; then
36534 HAVE_DECL_WCWIDTH=0
36537 if test $ac_cv_func_wcwidth != yes; then
36538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
36539 $as_echo_n "checking whether wcwidth is a macro... " >&6; }
36540 if ${gl_cv_func_wcwidth_macro+:} false; then :
36541 $as_echo_n "(cached) " >&6
36543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36544 /* end confdefs.h. */
36548 wchar_header_defines_wcwidth
36551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36552 $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1; then :
36553 gl_cv_func_wcwidth_macro=yes
36555 gl_cv_func_wcwidth_macro=no
36561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
36562 $as_echo "$gl_cv_func_wcwidth_macro" >&6; }
36565 if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
36567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
36568 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
36569 if ${gl_cv_func_wcwidth_works+:} false; then :
36570 $as_echo_n "(cached) " >&6
36573 if test "$cross_compiling" = yes; then :
36576 # Guess yes on glibc and AIX 7 systems.
36577 *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
36578 *) gl_cv_func_wcwidth_works="guessing no";;
36582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36583 /* end confdefs.h. */
36585 #include <locale.h>
36586 /* AIX 3.2.5 declares wcwidth in <string.h>. */
36587 #include <string.h>
36588 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
36590 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
36591 before <wchar.h>. */
36592 #include <stddef.h>
36596 #if !HAVE_DECL_WCWIDTH
36598 # ifdef __cplusplus
36606 if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
36608 if (wcwidth (0x0301) > 0)
36610 if (wcwidth (0x05B0) > 0)
36612 if (wcwidth (0x200B) > 0)
36614 if (wcwidth (0xFF1A) == 0)
36620 if ac_fn_c_try_run "$LINENO"; then :
36621 gl_cv_func_wcwidth_works=yes
36623 gl_cv_func_wcwidth_works=no
36625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36626 conftest.$ac_objext conftest.beam conftest.$ac_ext
36631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
36632 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
36633 case "$gl_cv_func_wcwidth_works" in
36635 *no) REPLACE_WCWIDTH=1 ;;
36641 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
36650 gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
36664 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
36677 gl_LIBOBJS="$gl_LIBOBJS xmemdup0.$ac_objext"
36681 for ac_header in stdint.h
36683 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
36684 if test "x$ac_cv_header_stdint_h" = xyes; then :
36685 cat >>confdefs.h <<_ACEOF
36686 #define HAVE_STDINT_H 1
36699 # End of code from modules
36720 gl_source_base='tests'
36721 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
36723 gl_module_indicator_condition=$gltests_WITNESS
36733 LIBBISON_LIBDEPS="$gl_libdeps"
36735 LIBBISON_LTLIBDEPS="$gl_ltlibdeps"
36739 # Checks for library functions.
36743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
36744 $as_echo_n "checking if malloc debugging is wanted... " >&6; }
36746 # Check whether --with-dmalloc was given.
36747 if test "${with_dmalloc+set}" = set; then :
36748 withval=$with_dmalloc; if test "$withval" = yes; then
36749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36750 $as_echo "yes" >&6; }
36752 $as_echo "#define WITH_DMALLOC 1" >>confdefs.h
36754 LIBS="$LIBS -ldmalloc"
36755 LDFLAGS="$LDFLAGS -g"
36757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36758 $as_echo "no" >&6; }
36761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36762 $as_echo "no" >&6; }
36766 for ac_header in sys/time.h sys/times.h
36768 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
36769 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
36770 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
36771 cat >>confdefs.h <<_ACEOF
36772 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
36779 for ac_header in sys/resource.h
36781 ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
36782 #if HAVE_SYS_TIME_H
36783 # include <sys/time.h>
36785 #ifdef HAVE_SYS_TIMES_H
36786 # include <sys/times.h>
36790 if test "x$ac_cv_header_sys_resource_h" = xyes; then :
36791 cat >>confdefs.h <<_ACEOF
36792 #define HAVE_SYS_RESOURCE_H 1
36799 for ac_func in times
36801 ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
36802 if test "x$ac_cv_func_times" = xyes; then :
36803 cat >>confdefs.h <<_ACEOF
36804 #define HAVE_TIMES 1
36811 ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default
36812 #if HAVE_SYS_TIME_H
36813 # include <sys/time.h>
36815 #if HAVE_SYS_TIMES_H
36816 # include <sys/times.h>
36818 #if HAVE_SYS_RESOURCE_H
36819 # include <sys/resource.h>
36823 if test "x$ac_cv_have_decl_getrusage" = xyes; then :
36829 cat >>confdefs.h <<_ACEOF
36830 #define HAVE_DECL_GETRUSAGE $ac_have_decl
36832 ac_fn_c_check_decl "$LINENO" "times" "ac_cv_have_decl_times" "$ac_includes_default
36833 #if HAVE_SYS_TIME_H
36834 # include <sys/time.h>
36836 #if HAVE_SYS_TIMES_H
36837 # include <sys/times.h>
36839 #if HAVE_SYS_RESOURCE_H
36840 # include <sys/resource.h>
36844 if test "x$ac_cv_have_decl_times" = xyes; then :
36850 cat >>confdefs.h <<_ACEOF
36851 #define HAVE_DECL_TIMES $ac_have_decl
36853 ac_fn_c_check_decl "$LINENO" "clock" "ac_cv_have_decl_clock" "$ac_includes_default
36854 #if HAVE_SYS_TIME_H
36855 # include <sys/time.h>
36857 #if HAVE_SYS_TIMES_H
36858 # include <sys/times.h>
36860 #if HAVE_SYS_RESOURCE_H
36861 # include <sys/resource.h>
36865 if test "x$ac_cv_have_decl_clock" = xyes; then :
36871 cat >>confdefs.h <<_ACEOF
36872 #define HAVE_DECL_CLOCK $ac_have_decl
36874 ac_fn_c_check_decl "$LINENO" "sysconf" "ac_cv_have_decl_sysconf" "$ac_includes_default
36875 #if HAVE_SYS_TIME_H
36876 # include <sys/time.h>
36878 #if HAVE_SYS_TIMES_H
36879 # include <sys/times.h>
36881 #if HAVE_SYS_RESOURCE_H
36882 # include <sys/resource.h>
36886 if test "x$ac_cv_have_decl_sysconf" = xyes; then :
36892 cat >>confdefs.h <<_ACEOF
36893 #define HAVE_DECL_SYSCONF $ac_have_decl
36897 ac_fn_c_check_type "$LINENO" "clock_t" "ac_cv_type_clock_t" "$ac_includes_default
36898 #if HAVE_SYS_TIME_H
36899 # include <sys/time.h>
36901 #if HAVE_SYS_TIMES_H
36902 # include <sys/times.h>
36904 #if HAVE_SYS_RESOURCE_H
36905 # include <sys/resource.h>
36909 if test "x$ac_cv_type_clock_t" = xyes; then :
36911 cat >>confdefs.h <<_ACEOF
36912 #define HAVE_CLOCK_T 1
36917 ac_fn_c_check_type "$LINENO" "struct tms" "ac_cv_type_struct_tms" "$ac_includes_default
36918 #if HAVE_SYS_TIME_H
36919 # include <sys/time.h>
36921 #if HAVE_SYS_TIMES_H
36922 # include <sys/times.h>
36924 #if HAVE_SYS_RESOURCE_H
36925 # include <sys/resource.h>
36929 if test "x$ac_cv_type_struct_tms" = xyes; then :
36931 cat >>confdefs.h <<_ACEOF
36932 #define HAVE_STRUCT_TMS 1
36941 # We use gnulib, which is only guaranteed to work properly with the
36944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
36945 $as_echo_n "checking whether NLS is requested... " >&6; }
36946 # Check whether --enable-nls was given.
36947 if test "${enable_nls+set}" = set; then :
36948 enableval=$enable_nls; USE_NLS=$enableval
36953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
36954 $as_echo "$USE_NLS" >&6; }
36959 GETTEXT_MACRO_VERSION=0.19
36964 # Prepare PATH_SEPARATOR.
36965 # The user is always right.
36966 if test "${PATH_SEPARATOR+set}" != set; then
36967 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36968 # contains only /bin. Note that ksh looks also at the FPATH variable,
36969 # so we have to set that as well for the test.
36971 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36972 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36973 || PATH_SEPARATOR=';'
36977 # Find out how to test for executable files. Don't use a zero-byte file,
36978 # as systems may use methods other than mode bits to determine executability.
36979 cat >conf$$.file <<_ASEOF
36983 chmod +x conf$$.file
36984 if test -x conf$$.file >/dev/null 2>&1; then
36985 ac_executable_p="test -x"
36987 ac_executable_p="test -f"
36991 # Extract the first word of "msgfmt", so it can be a program name with args.
36992 set dummy msgfmt; ac_word=$2
36993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36994 $as_echo_n "checking for $ac_word... " >&6; }
36995 if ${ac_cv_path_MSGFMT+:} false; then :
36996 $as_echo_n "(cached) " >&6
37000 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
37003 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
37004 for ac_dir in $PATH; do
37006 test -z "$ac_dir" && ac_dir=.
37007 for ac_exec_ext in '' $ac_executable_extensions; do
37008 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
37009 echo "$as_me: trying $ac_dir/$ac_word..." >&5
37010 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
37011 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
37012 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
37019 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
37023 MSGFMT="$ac_cv_path_MSGFMT"
37024 if test "$MSGFMT" != ":"; then
37025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
37026 $as_echo "$MSGFMT" >&6; }
37028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37029 $as_echo "no" >&6; }
37032 # Extract the first word of "gmsgfmt", so it can be a program name with args.
37033 set dummy gmsgfmt; ac_word=$2
37034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37035 $as_echo_n "checking for $ac_word... " >&6; }
37036 if ${ac_cv_path_GMSGFMT+:} false; then :
37037 $as_echo_n "(cached) " >&6
37041 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
37044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37045 for as_dir in $PATH
37048 test -z "$as_dir" && as_dir=.
37049 for ac_exec_ext in '' $ac_executable_extensions; do
37050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37051 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
37052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37059 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
37063 GMSGFMT=$ac_cv_path_GMSGFMT
37064 if test -n "$GMSGFMT"; then
37065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
37066 $as_echo "$GMSGFMT" >&6; }
37068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37069 $as_echo "no" >&6; }
37074 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
37075 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
37076 *) MSGFMT_015=$MSGFMT ;;
37079 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
37080 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
37081 *) GMSGFMT_015=$GMSGFMT ;;
37086 # Prepare PATH_SEPARATOR.
37087 # The user is always right.
37088 if test "${PATH_SEPARATOR+set}" != set; then
37089 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
37090 # contains only /bin. Note that ksh looks also at the FPATH variable,
37091 # so we have to set that as well for the test.
37093 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
37094 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
37095 || PATH_SEPARATOR=';'
37099 # Find out how to test for executable files. Don't use a zero-byte file,
37100 # as systems may use methods other than mode bits to determine executability.
37101 cat >conf$$.file <<_ASEOF
37105 chmod +x conf$$.file
37106 if test -x conf$$.file >/dev/null 2>&1; then
37107 ac_executable_p="test -x"
37109 ac_executable_p="test -f"
37113 # Extract the first word of "xgettext", so it can be a program name with args.
37114 set dummy xgettext; ac_word=$2
37115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37116 $as_echo_n "checking for $ac_word... " >&6; }
37117 if ${ac_cv_path_XGETTEXT+:} false; then :
37118 $as_echo_n "(cached) " >&6
37120 case "$XGETTEXT" in
37122 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
37125 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
37126 for ac_dir in $PATH; do
37128 test -z "$ac_dir" && ac_dir=.
37129 for ac_exec_ext in '' $ac_executable_extensions; do
37130 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
37131 echo "$as_me: trying $ac_dir/$ac_word..." >&5
37132 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
37133 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
37134 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
37141 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
37145 XGETTEXT="$ac_cv_path_XGETTEXT"
37146 if test "$XGETTEXT" != ":"; then
37147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
37148 $as_echo "$XGETTEXT" >&6; }
37150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37151 $as_echo "no" >&6; }
37156 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
37157 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
37158 *) XGETTEXT_015=$XGETTEXT ;;
37163 # Prepare PATH_SEPARATOR.
37164 # The user is always right.
37165 if test "${PATH_SEPARATOR+set}" != set; then
37166 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
37167 # contains only /bin. Note that ksh looks also at the FPATH variable,
37168 # so we have to set that as well for the test.
37170 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
37171 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
37172 || PATH_SEPARATOR=';'
37176 # Find out how to test for executable files. Don't use a zero-byte file,
37177 # as systems may use methods other than mode bits to determine executability.
37178 cat >conf$$.file <<_ASEOF
37182 chmod +x conf$$.file
37183 if test -x conf$$.file >/dev/null 2>&1; then
37184 ac_executable_p="test -x"
37186 ac_executable_p="test -f"
37190 # Extract the first word of "msgmerge", so it can be a program name with args.
37191 set dummy msgmerge; ac_word=$2
37192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37193 $as_echo_n "checking for $ac_word... " >&6; }
37194 if ${ac_cv_path_MSGMERGE+:} false; then :
37195 $as_echo_n "(cached) " >&6
37197 case "$MSGMERGE" in
37199 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
37202 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
37203 for ac_dir in $PATH; do
37205 test -z "$ac_dir" && ac_dir=.
37206 for ac_exec_ext in '' $ac_executable_extensions; do
37207 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
37208 echo "$as_me: trying $ac_dir/$ac_word..." >&5
37209 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
37210 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
37217 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
37221 MSGMERGE="$ac_cv_path_MSGMERGE"
37222 if test "$MSGMERGE" != ":"; then
37223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
37224 $as_echo "$MSGMERGE" >&6; }
37226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227 $as_echo "no" >&6; }
37231 test -n "$localedir" || localedir='${datadir}/locale'
37234 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
37237 ac_config_commands="$ac_config_commands po-directories"
37253 acl_save_prefix="$prefix"
37254 prefix="$acl_final_prefix"
37255 acl_save_exec_prefix="$exec_prefix"
37256 exec_prefix="$acl_final_exec_prefix"
37258 eval additional_includedir=\"$includedir\"
37259 eval additional_libdir=\"$libdir\"
37261 exec_prefix="$acl_save_exec_prefix"
37262 prefix="$acl_save_prefix"
37265 # Check whether --with-libiconv-prefix was given.
37266 if test "${with_libiconv_prefix+set}" = set; then :
37267 withval=$with_libiconv_prefix;
37268 if test "X$withval" = "Xno"; then
37271 if test "X$withval" = "X"; then
37273 acl_save_prefix="$prefix"
37274 prefix="$acl_final_prefix"
37275 acl_save_exec_prefix="$exec_prefix"
37276 exec_prefix="$acl_final_exec_prefix"
37278 eval additional_includedir=\"$includedir\"
37279 eval additional_libdir=\"$libdir\"
37281 exec_prefix="$acl_save_exec_prefix"
37282 prefix="$acl_save_prefix"
37285 additional_includedir="$withval/include"
37286 additional_libdir="$withval/$acl_libdirstem"
37287 if test "$acl_libdirstem2" != "$acl_libdirstem" \
37288 && test ! -d "$withval/$acl_libdirstem"; then
37289 additional_libdir="$withval/$acl_libdirstem2"
37303 names_already_handled=
37304 names_next_round='iconv '
37305 while test -n "$names_next_round"; do
37306 names_this_round="$names_next_round"
37308 for name in $names_this_round; do
37310 for n in $names_already_handled; do
37311 if test "$n" = "$name"; then
37312 already_handled=yes
37316 if test -z "$already_handled"; then
37317 names_already_handled="$names_already_handled $name"
37318 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
37319 eval value=\"\$HAVE_LIB$uppername\"
37320 if test -n "$value"; then
37321 if test "$value" = yes; then
37322 eval value=\"\$LIB$uppername\"
37323 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
37324 eval value=\"\$LTLIB$uppername\"
37325 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
37334 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
37335 if test -n "$acl_shlibext"; then
37336 shrext=".$acl_shlibext" # typically: shrext=.so
37340 if test $use_additional = yes; then
37341 dir="$additional_libdir"
37342 if test -n "$acl_shlibext"; then
37343 if test -f "$dir/$libname$shrext"; then
37345 found_so="$dir/$libname$shrext"
37347 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37348 ver=`(cd "$dir" && \
37349 for f in "$libname$shrext".*; do echo "$f"; done \
37350 | sed -e "s,^$libname$shrext\\\\.,," \
37351 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37352 | sed 1q ) 2>/dev/null`
37353 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37355 found_so="$dir/$libname$shrext.$ver"
37358 eval library_names=\"$acl_library_names_spec\"
37359 for f in $library_names; do
37360 if test -f "$dir/$f"; then
37369 if test "X$found_dir" = "X"; then
37370 if test -f "$dir/$libname.$acl_libext"; then
37372 found_a="$dir/$libname.$acl_libext"
37375 if test "X$found_dir" != "X"; then
37376 if test -f "$dir/$libname.la"; then
37377 found_la="$dir/$libname.la"
37381 if test "X$found_dir" = "X"; then
37382 for x in $LDFLAGS $LTLIBICONV; do
37384 acl_save_prefix="$prefix"
37385 prefix="$acl_final_prefix"
37386 acl_save_exec_prefix="$exec_prefix"
37387 exec_prefix="$acl_final_exec_prefix"
37389 exec_prefix="$acl_save_exec_prefix"
37390 prefix="$acl_save_prefix"
37394 dir=`echo "X$x" | sed -e 's/^X-L//'`
37395 if test -n "$acl_shlibext"; then
37396 if test -f "$dir/$libname$shrext"; then
37398 found_so="$dir/$libname$shrext"
37400 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37401 ver=`(cd "$dir" && \
37402 for f in "$libname$shrext".*; do echo "$f"; done \
37403 | sed -e "s,^$libname$shrext\\\\.,," \
37404 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37405 | sed 1q ) 2>/dev/null`
37406 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37408 found_so="$dir/$libname$shrext.$ver"
37411 eval library_names=\"$acl_library_names_spec\"
37412 for f in $library_names; do
37413 if test -f "$dir/$f"; then
37422 if test "X$found_dir" = "X"; then
37423 if test -f "$dir/$libname.$acl_libext"; then
37425 found_a="$dir/$libname.$acl_libext"
37428 if test "X$found_dir" != "X"; then
37429 if test -f "$dir/$libname.la"; then
37430 found_la="$dir/$libname.la"
37435 if test "X$found_dir" != "X"; then
37440 if test "X$found_dir" != "X"; then
37441 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
37442 if test "X$found_so" != "X"; then
37443 if test "$enable_rpath" = no \
37444 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
37445 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
37446 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
37449 for x in $ltrpathdirs; do
37450 if test "X$x" = "X$found_dir"; then
37455 if test -z "$haveit"; then
37456 ltrpathdirs="$ltrpathdirs $found_dir"
37458 if test "$acl_hardcode_direct" = yes; then
37459 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
37461 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
37462 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
37464 for x in $rpathdirs; do
37465 if test "X$x" = "X$found_dir"; then
37470 if test -z "$haveit"; then
37471 rpathdirs="$rpathdirs $found_dir"
37475 for x in $LDFLAGS $LIBICONV; do
37477 acl_save_prefix="$prefix"
37478 prefix="$acl_final_prefix"
37479 acl_save_exec_prefix="$exec_prefix"
37480 exec_prefix="$acl_final_exec_prefix"
37482 exec_prefix="$acl_save_exec_prefix"
37483 prefix="$acl_save_prefix"
37485 if test "X$x" = "X-L$found_dir"; then
37490 if test -z "$haveit"; then
37491 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
37493 if test "$acl_hardcode_minus_L" != no; then
37494 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
37496 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
37502 if test "X$found_a" != "X"; then
37503 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
37505 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
37508 additional_includedir=
37509 case "$found_dir" in
37510 */$acl_libdirstem | */$acl_libdirstem/)
37511 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
37512 if test "$name" = 'iconv'; then
37513 LIBICONV_PREFIX="$basedir"
37515 additional_includedir="$basedir/include"
37517 */$acl_libdirstem2 | */$acl_libdirstem2/)
37518 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
37519 if test "$name" = 'iconv'; then
37520 LIBICONV_PREFIX="$basedir"
37522 additional_includedir="$basedir/include"
37525 if test "X$additional_includedir" != "X"; then
37526 if test "X$additional_includedir" != "X/usr/include"; then
37528 if test "X$additional_includedir" = "X/usr/local/include"; then
37529 if test -n "$GCC"; then
37531 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37535 if test -z "$haveit"; then
37536 for x in $CPPFLAGS $INCICONV; do
37538 acl_save_prefix="$prefix"
37539 prefix="$acl_final_prefix"
37540 acl_save_exec_prefix="$exec_prefix"
37541 exec_prefix="$acl_final_exec_prefix"
37543 exec_prefix="$acl_save_exec_prefix"
37544 prefix="$acl_save_prefix"
37546 if test "X$x" = "X-I$additional_includedir"; then
37551 if test -z "$haveit"; then
37552 if test -d "$additional_includedir"; then
37553 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
37559 if test -n "$found_la"; then
37560 save_libdir="$libdir"
37561 case "$found_la" in
37562 */* | *\\*) . "$found_la" ;;
37563 *) . "./$found_la" ;;
37565 libdir="$save_libdir"
37566 for dep in $dependency_libs; do
37569 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
37570 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
37571 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
37573 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
37574 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
37575 if test -n "$GCC"; then
37577 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37581 if test -z "$haveit"; then
37583 for x in $LDFLAGS $LIBICONV; do
37585 acl_save_prefix="$prefix"
37586 prefix="$acl_final_prefix"
37587 acl_save_exec_prefix="$exec_prefix"
37588 exec_prefix="$acl_final_exec_prefix"
37590 exec_prefix="$acl_save_exec_prefix"
37591 prefix="$acl_save_prefix"
37593 if test "X$x" = "X-L$additional_libdir"; then
37598 if test -z "$haveit"; then
37599 if test -d "$additional_libdir"; then
37600 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
37604 for x in $LDFLAGS $LTLIBICONV; do
37606 acl_save_prefix="$prefix"
37607 prefix="$acl_final_prefix"
37608 acl_save_exec_prefix="$exec_prefix"
37609 exec_prefix="$acl_final_exec_prefix"
37611 exec_prefix="$acl_save_exec_prefix"
37612 prefix="$acl_save_prefix"
37614 if test "X$x" = "X-L$additional_libdir"; then
37619 if test -z "$haveit"; then
37620 if test -d "$additional_libdir"; then
37621 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
37628 dir=`echo "X$dep" | sed -e 's/^X-R//'`
37629 if test "$enable_rpath" != no; then
37631 for x in $rpathdirs; do
37632 if test "X$x" = "X$dir"; then
37637 if test -z "$haveit"; then
37638 rpathdirs="$rpathdirs $dir"
37641 for x in $ltrpathdirs; do
37642 if test "X$x" = "X$dir"; then
37647 if test -z "$haveit"; then
37648 ltrpathdirs="$ltrpathdirs $dir"
37653 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
37656 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
37659 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
37660 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
37666 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
37667 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
37673 if test "X$rpathdirs" != "X"; then
37674 if test -n "$acl_hardcode_libdir_separator"; then
37676 for found_dir in $rpathdirs; do
37677 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
37679 acl_save_libdir="$libdir"
37681 eval flag=\"$acl_hardcode_libdir_flag_spec\"
37682 libdir="$acl_save_libdir"
37683 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
37685 for found_dir in $rpathdirs; do
37686 acl_save_libdir="$libdir"
37687 libdir="$found_dir"
37688 eval flag=\"$acl_hardcode_libdir_flag_spec\"
37689 libdir="$acl_save_libdir"
37690 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
37694 if test "X$ltrpathdirs" != "X"; then
37695 for found_dir in $ltrpathdirs; do
37696 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
37730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
37731 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
37732 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
37733 $as_echo_n "(cached) " >&6
37735 gt_save_LIBS="$LIBS"
37736 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
37737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37738 /* end confdefs.h. */
37739 #include <CoreFoundation/CFPreferences.h>
37743 CFPreferencesCopyAppValue(NULL, NULL)
37748 if ac_fn_c_try_link "$LINENO"; then :
37749 gt_cv_func_CFPreferencesCopyAppValue=yes
37751 gt_cv_func_CFPreferencesCopyAppValue=no
37753 rm -f core conftest.err conftest.$ac_objext \
37754 conftest$ac_exeext conftest.$ac_ext
37755 LIBS="$gt_save_LIBS"
37757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
37758 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
37759 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
37761 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
37764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
37765 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
37766 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
37767 $as_echo_n "(cached) " >&6
37769 gt_save_LIBS="$LIBS"
37770 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
37771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37772 /* end confdefs.h. */
37773 #include <CoreFoundation/CFLocale.h>
37777 CFLocaleCopyCurrent();
37782 if ac_fn_c_try_link "$LINENO"; then :
37783 gt_cv_func_CFLocaleCopyCurrent=yes
37785 gt_cv_func_CFLocaleCopyCurrent=no
37787 rm -f core conftest.err conftest.$ac_objext \
37788 conftest$ac_exeext conftest.$ac_ext
37789 LIBS="$gt_save_LIBS"
37791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
37792 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
37793 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
37795 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
37799 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
37800 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
37812 case " $gt_needs " in
37813 *" need-formatstring-macros "*) gt_api_version=3 ;;
37814 *" need-ngettext "*) gt_api_version=2 ;;
37815 *) gt_api_version=1 ;;
37817 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
37818 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
37820 if test "$USE_NLS" = "yes"; then
37821 gt_use_preinstalled_gnugettext=no
37824 if test $gt_api_version -ge 3; then
37825 gt_revision_test_code='
37826 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
37827 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
37829 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
37832 gt_revision_test_code=
37834 if test $gt_api_version -ge 2; then
37835 gt_expression_test_code=' + * ngettext ("", "", 0)'
37837 gt_expression_test_code=
37840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
37841 $as_echo_n "checking for GNU gettext in libc... " >&6; }
37842 if eval \${$gt_func_gnugettext_libc+:} false; then :
37843 $as_echo_n "(cached) " >&6
37845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37846 /* end confdefs.h. */
37848 #include <libintl.h>
37849 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
37850 extern int _nl_msg_cat_cntr;
37851 extern int *_nl_domain_bindings;
37852 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
37854 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
37856 $gt_revision_test_code
37862 bindtextdomain ("", "");
37863 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
37869 if ac_fn_c_try_link "$LINENO"; then :
37870 eval "$gt_func_gnugettext_libc=yes"
37872 eval "$gt_func_gnugettext_libc=no"
37874 rm -f core conftest.err conftest.$ac_objext \
37875 conftest$ac_exeext conftest.$ac_ext
37877 eval ac_res=\$$gt_func_gnugettext_libc
37878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37879 $as_echo "$ac_res" >&6; }
37881 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
37887 am_save_CPPFLAGS="$CPPFLAGS"
37889 for element in $INCICONV; do
37891 for x in $CPPFLAGS; do
37893 acl_save_prefix="$prefix"
37894 prefix="$acl_final_prefix"
37895 acl_save_exec_prefix="$exec_prefix"
37896 exec_prefix="$acl_final_exec_prefix"
37898 exec_prefix="$acl_save_exec_prefix"
37899 prefix="$acl_save_prefix"
37901 if test "X$x" = "X$element"; then
37906 if test -z "$haveit"; then
37907 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
37912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
37913 $as_echo_n "checking for iconv... " >&6; }
37914 if ${am_cv_func_iconv+:} false; then :
37915 $as_echo_n "(cached) " >&6
37918 am_cv_func_iconv="no, consider installing GNU libiconv"
37920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37921 /* end confdefs.h. */
37923 #include <stdlib.h>
37929 iconv_t cd = iconv_open("","");
37930 iconv(cd,NULL,NULL,NULL,NULL);
37936 if ac_fn_c_try_link "$LINENO"; then :
37937 am_cv_func_iconv=yes
37939 rm -f core conftest.err conftest.$ac_objext \
37940 conftest$ac_exeext conftest.$ac_ext
37941 if test "$am_cv_func_iconv" != yes; then
37942 am_save_LIBS="$LIBS"
37943 LIBS="$LIBS $LIBICONV"
37944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37945 /* end confdefs.h. */
37947 #include <stdlib.h>
37953 iconv_t cd = iconv_open("","");
37954 iconv(cd,NULL,NULL,NULL,NULL);
37960 if ac_fn_c_try_link "$LINENO"; then :
37961 am_cv_lib_iconv=yes
37962 am_cv_func_iconv=yes
37964 rm -f core conftest.err conftest.$ac_objext \
37965 conftest$ac_exeext conftest.$ac_ext
37966 LIBS="$am_save_LIBS"
37970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
37971 $as_echo "$am_cv_func_iconv" >&6; }
37972 if test "$am_cv_func_iconv" = yes; then
37973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
37974 $as_echo_n "checking for working iconv... " >&6; }
37975 if ${am_cv_func_iconv_works+:} false; then :
37976 $as_echo_n "(cached) " >&6
37979 am_save_LIBS="$LIBS"
37980 if test $am_cv_lib_iconv = yes; then
37981 LIBS="$LIBS $LIBICONV"
37983 am_cv_func_iconv_works=no
37984 for ac_iconv_const in '' 'const'; do
37985 if test "$cross_compiling" = yes; then :
37987 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
37988 *) am_cv_func_iconv_works="guessing yes" ;;
37991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37992 /* end confdefs.h. */
37995 #include <string.h>
37997 #ifndef ICONV_CONST
37998 # define ICONV_CONST $ac_iconv_const
38005 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
38008 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
38009 if (cd_utf8_to_88591 != (iconv_t)(-1))
38011 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
38013 ICONV_CONST char *inptr = input;
38014 size_t inbytesleft = strlen (input);
38015 char *outptr = buf;
38016 size_t outbytesleft = sizeof (buf);
38017 size_t res = iconv (cd_utf8_to_88591,
38018 &inptr, &inbytesleft,
38019 &outptr, &outbytesleft);
38022 iconv_close (cd_utf8_to_88591);
38025 /* Test against Solaris 10 bug: Failures are not distinguishable from
38026 successful returns. */
38028 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
38029 if (cd_ascii_to_88591 != (iconv_t)(-1))
38031 static ICONV_CONST char input[] = "\263";
38033 ICONV_CONST char *inptr = input;
38034 size_t inbytesleft = strlen (input);
38035 char *outptr = buf;
38036 size_t outbytesleft = sizeof (buf);
38037 size_t res = iconv (cd_ascii_to_88591,
38038 &inptr, &inbytesleft,
38039 &outptr, &outbytesleft);
38042 iconv_close (cd_ascii_to_88591);
38045 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
38047 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
38048 if (cd_88591_to_utf8 != (iconv_t)(-1))
38050 static ICONV_CONST char input[] = "\304";
38051 static char buf[2] = { (char)0xDE, (char)0xAD };
38052 ICONV_CONST char *inptr = input;
38053 size_t inbytesleft = 1;
38054 char *outptr = buf;
38055 size_t outbytesleft = 1;
38056 size_t res = iconv (cd_88591_to_utf8,
38057 &inptr, &inbytesleft,
38058 &outptr, &outbytesleft);
38059 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
38061 iconv_close (cd_88591_to_utf8);
38064 #if 0 /* This bug could be worked around by the caller. */
38065 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
38067 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
38068 if (cd_88591_to_utf8 != (iconv_t)(-1))
38070 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
38072 ICONV_CONST char *inptr = input;
38073 size_t inbytesleft = strlen (input);
38074 char *outptr = buf;
38075 size_t outbytesleft = sizeof (buf);
38076 size_t res = iconv (cd_88591_to_utf8,
38077 &inptr, &inbytesleft,
38078 &outptr, &outbytesleft);
38081 iconv_close (cd_88591_to_utf8);
38085 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
38088 /* Try standardized names. */
38089 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
38090 /* Try IRIX, OSF/1 names. */
38091 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
38092 /* Try AIX names. */
38093 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
38094 /* Try HP-UX names. */
38095 iconv_t cd4 = iconv_open ("utf8", "eucJP");
38096 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
38097 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
38099 if (cd1 != (iconv_t)(-1))
38101 if (cd2 != (iconv_t)(-1))
38103 if (cd3 != (iconv_t)(-1))
38105 if (cd4 != (iconv_t)(-1))
38114 if ac_fn_c_try_run "$LINENO"; then :
38115 am_cv_func_iconv_works=yes
38117 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38118 conftest.$ac_objext conftest.beam conftest.$ac_ext
38121 test "$am_cv_func_iconv_works" = no || break
38123 LIBS="$am_save_LIBS"
38126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
38127 $as_echo "$am_cv_func_iconv_works" >&6; }
38128 case "$am_cv_func_iconv_works" in
38129 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
38130 *) am_func_iconv=yes ;;
38133 am_func_iconv=no am_cv_lib_iconv=no
38135 if test "$am_func_iconv" = yes; then
38137 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
38140 if test "$am_cv_lib_iconv" = yes; then
38141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
38142 $as_echo_n "checking how to link with libiconv... " >&6; }
38143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
38144 $as_echo "$LIBICONV" >&6; }
38146 CPPFLAGS="$am_save_CPPFLAGS"
38163 acl_save_prefix="$prefix"
38164 prefix="$acl_final_prefix"
38165 acl_save_exec_prefix="$exec_prefix"
38166 exec_prefix="$acl_final_exec_prefix"
38168 eval additional_includedir=\"$includedir\"
38169 eval additional_libdir=\"$libdir\"
38171 exec_prefix="$acl_save_exec_prefix"
38172 prefix="$acl_save_prefix"
38175 # Check whether --with-libintl-prefix was given.
38176 if test "${with_libintl_prefix+set}" = set; then :
38177 withval=$with_libintl_prefix;
38178 if test "X$withval" = "Xno"; then
38181 if test "X$withval" = "X"; then
38183 acl_save_prefix="$prefix"
38184 prefix="$acl_final_prefix"
38185 acl_save_exec_prefix="$exec_prefix"
38186 exec_prefix="$acl_final_exec_prefix"
38188 eval additional_includedir=\"$includedir\"
38189 eval additional_libdir=\"$libdir\"
38191 exec_prefix="$acl_save_exec_prefix"
38192 prefix="$acl_save_prefix"
38195 additional_includedir="$withval/include"
38196 additional_libdir="$withval/$acl_libdirstem"
38197 if test "$acl_libdirstem2" != "$acl_libdirstem" \
38198 && test ! -d "$withval/$acl_libdirstem"; then
38199 additional_libdir="$withval/$acl_libdirstem2"
38213 names_already_handled=
38214 names_next_round='intl '
38215 while test -n "$names_next_round"; do
38216 names_this_round="$names_next_round"
38218 for name in $names_this_round; do
38220 for n in $names_already_handled; do
38221 if test "$n" = "$name"; then
38222 already_handled=yes
38226 if test -z "$already_handled"; then
38227 names_already_handled="$names_already_handled $name"
38228 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
38229 eval value=\"\$HAVE_LIB$uppername\"
38230 if test -n "$value"; then
38231 if test "$value" = yes; then
38232 eval value=\"\$LIB$uppername\"
38233 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
38234 eval value=\"\$LTLIB$uppername\"
38235 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
38244 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
38245 if test -n "$acl_shlibext"; then
38246 shrext=".$acl_shlibext" # typically: shrext=.so
38250 if test $use_additional = yes; then
38251 dir="$additional_libdir"
38252 if test -n "$acl_shlibext"; then
38253 if test -f "$dir/$libname$shrext"; then
38255 found_so="$dir/$libname$shrext"
38257 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
38258 ver=`(cd "$dir" && \
38259 for f in "$libname$shrext".*; do echo "$f"; done \
38260 | sed -e "s,^$libname$shrext\\\\.,," \
38261 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
38262 | sed 1q ) 2>/dev/null`
38263 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
38265 found_so="$dir/$libname$shrext.$ver"
38268 eval library_names=\"$acl_library_names_spec\"
38269 for f in $library_names; do
38270 if test -f "$dir/$f"; then
38279 if test "X$found_dir" = "X"; then
38280 if test -f "$dir/$libname.$acl_libext"; then
38282 found_a="$dir/$libname.$acl_libext"
38285 if test "X$found_dir" != "X"; then
38286 if test -f "$dir/$libname.la"; then
38287 found_la="$dir/$libname.la"
38291 if test "X$found_dir" = "X"; then
38292 for x in $LDFLAGS $LTLIBINTL; do
38294 acl_save_prefix="$prefix"
38295 prefix="$acl_final_prefix"
38296 acl_save_exec_prefix="$exec_prefix"
38297 exec_prefix="$acl_final_exec_prefix"
38299 exec_prefix="$acl_save_exec_prefix"
38300 prefix="$acl_save_prefix"
38304 dir=`echo "X$x" | sed -e 's/^X-L//'`
38305 if test -n "$acl_shlibext"; then
38306 if test -f "$dir/$libname$shrext"; then
38308 found_so="$dir/$libname$shrext"
38310 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
38311 ver=`(cd "$dir" && \
38312 for f in "$libname$shrext".*; do echo "$f"; done \
38313 | sed -e "s,^$libname$shrext\\\\.,," \
38314 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
38315 | sed 1q ) 2>/dev/null`
38316 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
38318 found_so="$dir/$libname$shrext.$ver"
38321 eval library_names=\"$acl_library_names_spec\"
38322 for f in $library_names; do
38323 if test -f "$dir/$f"; then
38332 if test "X$found_dir" = "X"; then
38333 if test -f "$dir/$libname.$acl_libext"; then
38335 found_a="$dir/$libname.$acl_libext"
38338 if test "X$found_dir" != "X"; then
38339 if test -f "$dir/$libname.la"; then
38340 found_la="$dir/$libname.la"
38345 if test "X$found_dir" != "X"; then
38350 if test "X$found_dir" != "X"; then
38351 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
38352 if test "X$found_so" != "X"; then
38353 if test "$enable_rpath" = no \
38354 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
38355 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
38356 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
38359 for x in $ltrpathdirs; do
38360 if test "X$x" = "X$found_dir"; then
38365 if test -z "$haveit"; then
38366 ltrpathdirs="$ltrpathdirs $found_dir"
38368 if test "$acl_hardcode_direct" = yes; then
38369 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
38371 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
38372 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
38374 for x in $rpathdirs; do
38375 if test "X$x" = "X$found_dir"; then
38380 if test -z "$haveit"; then
38381 rpathdirs="$rpathdirs $found_dir"
38385 for x in $LDFLAGS $LIBINTL; do
38387 acl_save_prefix="$prefix"
38388 prefix="$acl_final_prefix"
38389 acl_save_exec_prefix="$exec_prefix"
38390 exec_prefix="$acl_final_exec_prefix"
38392 exec_prefix="$acl_save_exec_prefix"
38393 prefix="$acl_save_prefix"
38395 if test "X$x" = "X-L$found_dir"; then
38400 if test -z "$haveit"; then
38401 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
38403 if test "$acl_hardcode_minus_L" != no; then
38404 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
38406 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
38412 if test "X$found_a" != "X"; then
38413 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
38415 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
38418 additional_includedir=
38419 case "$found_dir" in
38420 */$acl_libdirstem | */$acl_libdirstem/)
38421 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
38422 if test "$name" = 'intl'; then
38423 LIBINTL_PREFIX="$basedir"
38425 additional_includedir="$basedir/include"
38427 */$acl_libdirstem2 | */$acl_libdirstem2/)
38428 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
38429 if test "$name" = 'intl'; then
38430 LIBINTL_PREFIX="$basedir"
38432 additional_includedir="$basedir/include"
38435 if test "X$additional_includedir" != "X"; then
38436 if test "X$additional_includedir" != "X/usr/include"; then
38438 if test "X$additional_includedir" = "X/usr/local/include"; then
38439 if test -n "$GCC"; then
38441 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
38445 if test -z "$haveit"; then
38446 for x in $CPPFLAGS $INCINTL; do
38448 acl_save_prefix="$prefix"
38449 prefix="$acl_final_prefix"
38450 acl_save_exec_prefix="$exec_prefix"
38451 exec_prefix="$acl_final_exec_prefix"
38453 exec_prefix="$acl_save_exec_prefix"
38454 prefix="$acl_save_prefix"
38456 if test "X$x" = "X-I$additional_includedir"; then
38461 if test -z "$haveit"; then
38462 if test -d "$additional_includedir"; then
38463 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
38469 if test -n "$found_la"; then
38470 save_libdir="$libdir"
38471 case "$found_la" in
38472 */* | *\\*) . "$found_la" ;;
38473 *) . "./$found_la" ;;
38475 libdir="$save_libdir"
38476 for dep in $dependency_libs; do
38479 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
38480 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
38481 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
38483 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
38484 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
38485 if test -n "$GCC"; then
38487 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
38491 if test -z "$haveit"; then
38493 for x in $LDFLAGS $LIBINTL; do
38495 acl_save_prefix="$prefix"
38496 prefix="$acl_final_prefix"
38497 acl_save_exec_prefix="$exec_prefix"
38498 exec_prefix="$acl_final_exec_prefix"
38500 exec_prefix="$acl_save_exec_prefix"
38501 prefix="$acl_save_prefix"
38503 if test "X$x" = "X-L$additional_libdir"; then
38508 if test -z "$haveit"; then
38509 if test -d "$additional_libdir"; then
38510 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
38514 for x in $LDFLAGS $LTLIBINTL; do
38516 acl_save_prefix="$prefix"
38517 prefix="$acl_final_prefix"
38518 acl_save_exec_prefix="$exec_prefix"
38519 exec_prefix="$acl_final_exec_prefix"
38521 exec_prefix="$acl_save_exec_prefix"
38522 prefix="$acl_save_prefix"
38524 if test "X$x" = "X-L$additional_libdir"; then
38529 if test -z "$haveit"; then
38530 if test -d "$additional_libdir"; then
38531 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
38538 dir=`echo "X$dep" | sed -e 's/^X-R//'`
38539 if test "$enable_rpath" != no; then
38541 for x in $rpathdirs; do
38542 if test "X$x" = "X$dir"; then
38547 if test -z "$haveit"; then
38548 rpathdirs="$rpathdirs $dir"
38551 for x in $ltrpathdirs; do
38552 if test "X$x" = "X$dir"; then
38557 if test -z "$haveit"; then
38558 ltrpathdirs="$ltrpathdirs $dir"
38563 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
38566 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
38569 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
38570 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
38576 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
38577 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
38583 if test "X$rpathdirs" != "X"; then
38584 if test -n "$acl_hardcode_libdir_separator"; then
38586 for found_dir in $rpathdirs; do
38587 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
38589 acl_save_libdir="$libdir"
38591 eval flag=\"$acl_hardcode_libdir_flag_spec\"
38592 libdir="$acl_save_libdir"
38593 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
38595 for found_dir in $rpathdirs; do
38596 acl_save_libdir="$libdir"
38597 libdir="$found_dir"
38598 eval flag=\"$acl_hardcode_libdir_flag_spec\"
38599 libdir="$acl_save_libdir"
38600 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
38604 if test "X$ltrpathdirs" != "X"; then
38605 for found_dir in $ltrpathdirs; do
38606 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
38615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
38616 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
38617 if eval \${$gt_func_gnugettext_libintl+:} false; then :
38618 $as_echo_n "(cached) " >&6
38620 gt_save_CPPFLAGS="$CPPFLAGS"
38621 CPPFLAGS="$CPPFLAGS $INCINTL"
38622 gt_save_LIBS="$LIBS"
38623 LIBS="$LIBS $LIBINTL"
38624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38625 /* end confdefs.h. */
38627 #include <libintl.h>
38628 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
38629 extern int _nl_msg_cat_cntr;
38634 const char *_nl_expand_alias (const char *);
38635 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
38637 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
38639 $gt_revision_test_code
38645 bindtextdomain ("", "");
38646 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
38652 if ac_fn_c_try_link "$LINENO"; then :
38653 eval "$gt_func_gnugettext_libintl=yes"
38655 eval "$gt_func_gnugettext_libintl=no"
38657 rm -f core conftest.err conftest.$ac_objext \
38658 conftest$ac_exeext conftest.$ac_ext
38659 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
38660 LIBS="$LIBS $LIBICONV"
38661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38662 /* end confdefs.h. */
38664 #include <libintl.h>
38665 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
38666 extern int _nl_msg_cat_cntr;
38671 const char *_nl_expand_alias (const char *);
38672 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
38674 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
38676 $gt_revision_test_code
38682 bindtextdomain ("", "");
38683 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
38689 if ac_fn_c_try_link "$LINENO"; then :
38690 LIBINTL="$LIBINTL $LIBICONV"
38691 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
38692 eval "$gt_func_gnugettext_libintl=yes"
38695 rm -f core conftest.err conftest.$ac_objext \
38696 conftest$ac_exeext conftest.$ac_ext
38698 CPPFLAGS="$gt_save_CPPFLAGS"
38699 LIBS="$gt_save_LIBS"
38701 eval ac_res=\$$gt_func_gnugettext_libintl
38702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
38703 $as_echo "$ac_res" >&6; }
38706 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
38707 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
38708 && test "$PACKAGE" != gettext-runtime \
38709 && test "$PACKAGE" != gettext-tools; }; then
38710 gt_use_preinstalled_gnugettext=yes
38719 if test -n "$INTL_MACOSX_LIBS"; then
38720 if test "$gt_use_preinstalled_gnugettext" = "yes" \
38721 || test "$nls_cv_use_gnu_gettext" = "yes"; then
38722 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
38723 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
38727 if test "$gt_use_preinstalled_gnugettext" = "yes" \
38728 || test "$nls_cv_use_gnu_gettext" = "yes"; then
38730 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
38737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
38738 $as_echo_n "checking whether to use NLS... " >&6; }
38739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
38740 $as_echo "$USE_NLS" >&6; }
38741 if test "$USE_NLS" = "yes"; then
38742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
38743 $as_echo_n "checking where the gettext function comes from... " >&6; }
38744 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
38745 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
38746 gt_source="external libintl"
38751 gt_source="included intl directory"
38753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
38754 $as_echo "$gt_source" >&6; }
38757 if test "$USE_NLS" = "yes"; then
38759 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
38760 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
38761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
38762 $as_echo_n "checking how to link with libintl... " >&6; }
38763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
38764 $as_echo "$LIBINTL" >&6; }
38766 for element in $INCINTL; do
38768 for x in $CPPFLAGS; do
38770 acl_save_prefix="$prefix"
38771 prefix="$acl_final_prefix"
38772 acl_save_exec_prefix="$exec_prefix"
38773 exec_prefix="$acl_final_exec_prefix"
38775 exec_prefix="$acl_save_exec_prefix"
38776 prefix="$acl_save_prefix"
38778 if test "X$x" = "X$element"; then
38783 if test -z "$haveit"; then
38784 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
38791 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
38794 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
38803 INTLLIBS="$LIBINTL"
38812 if test -z "$USE_NLS"; then
38813 echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2
38818 if test "$USE_NLS" = yes; then
38819 if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then
38820 BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir`
38823 if test -n "$BISON_LOCALEDIR"; then
38824 USER_LINGUAS="${LINGUAS-%UNSET%}"
38825 if test -n "$USER_LINGUAS"; then
38830 if test $BISON_USE_NLS = yes; then
38832 $as_echo "#define YYENABLE_NLS 1" >>confdefs.h
38837 # Internationalized parsers.
38838 ac_config_files="$ac_config_files runtime-po/Makefile.in"
38840 # Autoconf macros for packages using internationalized parsers.
38841 aclocaldir='${datadir}/aclocal'
38844 # Create the benchmark script.
38845 ac_config_files="$ac_config_files etc/bench.pl"
38848 # Initialize the test suite.
38849 ac_config_commands="$ac_config_commands tests/atconfig"
38851 ac_config_files="$ac_config_files tests/atlocal"
38853 ac_config_files="$ac_config_files tests/bison"
38856 for ac_prog in valgrind
38858 # Extract the first word of "$ac_prog", so it can be a program name with args.
38859 set dummy $ac_prog; ac_word=$2
38860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38861 $as_echo_n "checking for $ac_word... " >&6; }
38862 if ${ac_cv_prog_VALGRIND+:} false; then :
38863 $as_echo_n "(cached) " >&6
38865 if test -n "$VALGRIND"; then
38866 ac_cv_prog_VALGRIND="$VALGRIND" # Let the user override the test.
38868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38869 for as_dir in $PATH
38872 test -z "$as_dir" && as_dir=.
38873 for ac_exec_ext in '' $ac_executable_extensions; do
38874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38875 ac_cv_prog_VALGRIND="$ac_prog"
38876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38885 VALGRIND=$ac_cv_prog_VALGRIND
38886 if test -n "$VALGRIND"; then
38887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5
38888 $as_echo "$VALGRIND" >&6; }
38890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38891 $as_echo "no" >&6; }
38895 test -n "$VALGRIND" && break
38898 # Use something simpler that $host_os to select our suppression file.
38900 case $VALGRIND:$uname in
38903 # See README-hacking.
38906 suppfile=build-aux/$uname.valgrind
38907 if test -f "$srcdir/$suppfile"; then
38908 VALGRIND_OPTS_SUPPRESSION="--suppressions=\$(abs_top_srcdir)/$suppfile"
38914 # Whether we cannot run the compiled bison.
38915 if test "$cross_compiling" = yes; then
38916 CROSS_COMPILING_TRUE=
38917 CROSS_COMPILING_FALSE='#'
38919 CROSS_COMPILING_TRUE='#'
38920 CROSS_COMPILING_FALSE=
38925 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
38927 # Needed by tests/atlocal.in.
38932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38933 /* end confdefs.h. */
38935 #if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
38940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38941 $EGREP "yes" >/dev/null 2>&1; then :
38942 CLASSPATH_SEPARATOR=';'
38944 CLASSPATH_SEPARATOR=':'
38949 test -n "$source_version" || {
38950 as_fn_error $? "missing source-version argument to gt_JAVACOMP" "$LINENO" 5
38953 case "$source_version" in
38954 1.3) goodcode='class conftest {}'
38955 failcode='class conftestfail { static { assert(true); } }' ;;
38956 1.4) goodcode='class conftest { static { assert(true); } }'
38957 failcode='class conftestfail<T> { T foo() { return null; } }' ;;
38958 1.5) goodcode='class conftest<T> { T foo() { return null; } }'
38959 failcode='class conftestfail { void foo () { switch ("A") {} } }' ;;
38960 1.7) goodcode='class conftest { void foo () { switch ("A") {} } }'
38961 failcode='class conftestfail { void foo () { Runnable r = () -> {}; } }' ;;
38962 1.8) goodcode='class conftest { void foo () { Runnable r = () -> {}; } }'
38963 failcode='interface conftestfail { private void foo () {} }' ;;
38964 9) goodcode='interface conftest { private void foo () {} }'
38965 failcode='class conftestfail { public void m() { var i = new Integer(0); } }' ;;
38966 10) goodcode='class conftest { public void m() { var i = new Integer(0); } }'
38967 failcode='class conftestfail syntax error' ;;
38968 *) as_fn_error $? "invalid source-version argument to gt_JAVACOMP: $source_version" "$LINENO" 5 ;;
38970 case "$target_version" in
38971 1.1) cfversion=45 ;;
38972 1.2) cfversion=46 ;;
38973 1.3) cfversion=47 ;;
38974 1.4) cfversion=48 ;;
38975 1.5) cfversion=49 ;;
38976 1.6) cfversion=50 ;;
38977 1.7) cfversion=51 ;;
38978 1.8) cfversion=52 ;;
38980 10) cfversion=54 ;;
38981 *) as_fn_error $? "invalid target-version argument to gt_JAVACOMP: $target_version" "$LINENO" 5 ;;
38983 # Function to output the classfile version of a file (8th byte) in decimal.
38984 if od -A x < /dev/null >/dev/null 2>/dev/null; then
38986 func_classfile_version ()
38988 od -A n -t d1 -j 7 -N 1 "$1"
38992 func_classfile_version ()
38994 dd if="$1" bs=1 count=1 skip=7 2>/dev/null | hexdump -e '1/1 "%3d "'
38998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java compiler" >&5
38999 $as_echo_n "checking for Java compiler... " >&6; }
39006 cat > conftestlib.java <<EOF
39007 public class conftestlib {
39008 public static void main (String[] args) {
39012 echo "$goodcode" > conftest.java
39013 echo "$failcode" > conftestfail.java
39014 if test -n "$JAVAC"; then
39015 if $JAVAC --version 2>/dev/null | sed -e 1q | grep gcj > /dev/null; then
39016 if $JAVAC --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then
39017 rm -f conftest.class
39018 if { echo "$as_me:39018: $JAVAC -d . conftest.java" >&5
39019 $JAVAC -d . conftest.java >&5 2>&1
39021 && test -f conftest.class \
39022 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39023 rm -f conftest.class
39024 rm -f conftestfail.class
39025 if { echo "$as_me:39025: $JAVAC -fsource=$source_version -d . conftest.java" >&5
39026 $JAVAC -fsource="$source_version" -d . conftest.java >&5 2>&1
39028 && test -f conftest.class \
39029 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39030 && { echo "$as_me:39030: $JAVAC -d . conftestfail.java" >&5
39031 $JAVAC -d . conftestfail.java >&5 2>&1
39033 && test -f conftestfail.class \
39034 && ! { echo "$as_me:39034: $JAVAC -fsource=$source_version -d . conftestfail.java" >&5
39035 $JAVAC -fsource="$source_version" -d . conftestfail.java >&5 2>&1
39037 CONF_JAVAC="$JAVAC -fsource=$source_version"
39038 HAVE_JAVAC_ENVVAR=1
39041 CONF_JAVAC="$JAVAC"
39042 HAVE_JAVAC_ENVVAR=1
39046 rm -f conftest.class
39047 rm -f conftestfail.class
39048 if { echo "$as_me:39048: $JAVAC -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5
39049 $JAVAC -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1
39051 && test -f conftest.class \
39052 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39053 CONF_JAVAC="$JAVAC -fsource=$source_version -ftarget=$target_version"
39054 HAVE_JAVAC_ENVVAR=1
39059 if test "$target_version" = 1.4 && test "$source_version" = 1.4; then
39060 rm -f conftest.class
39061 if { echo "$as_me:39061: $JAVAC -d . conftest.java" >&5
39062 $JAVAC -d . conftest.java >&5 2>&1
39064 && test -f conftest.class; then
39065 CONF_JAVAC="$JAVAC"
39066 HAVE_JAVAC_ENVVAR=1
39070 if test "$target_version" = 1.4 && test "$source_version" = 1.3; then
39072 rm -f conftest.class
39073 if { echo "$as_me:39073: $JAVAC -d . conftest.java" >&5
39074 $JAVAC -d . conftest.java >&5 2>&1
39076 && test -f conftest.class; then
39079 javac_noassert_works=
39080 rm -f conftest.class
39081 if { echo "$as_me:39081: $JAVAC -fno-assert -d . conftest.java" >&5
39082 $JAVAC -fno-assert -d . conftest.java >&5 2>&1
39084 && test -f conftest.class; then
39085 javac_noassert_works=1
39087 if test -n "$javac_works" && test -n "$javac_noassert_works"; then
39088 rm -f conftestfail.class
39089 if { echo "$as_me:39089: $JAVAC -d . conftestfail.java" >&5
39090 $JAVAC -d . conftestfail.java >&5 2>&1
39092 && test -f conftestfail.class \
39093 && ! { echo "$as_me:39093: $JAVAC -fno-assert -d . conftestfail.java" >&5
39094 $JAVAC -fno-assert -d . conftestfail.java >&5 2>&1
39099 if test -n "$javac_works"; then
39100 CONF_JAVAC="$JAVAC"
39101 HAVE_JAVAC_ENVVAR=1
39104 if test -n "$javac_noassert_works"; then
39105 CONF_JAVAC="$JAVAC -fno-assert"
39106 HAVE_JAVAC_ENVVAR=1
39114 if test "$source_version" = 1.5; then
39115 case "$target_version" in
39116 1.1 | 1.2 | 1.3 | 1.4 | 1.5) ;;
39117 *) source_version='1.6' ;;
39120 rm -f conftest.class
39121 if { echo "$as_me:39121: $JAVAC -d . conftest.java" >&5
39122 $JAVAC -d . conftest.java >&5 2>&1
39124 && test -f conftest.class \
39125 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39126 rm -f conftest.class
39127 rm -f conftestfail.class
39128 if { echo "$as_me:39128: $JAVAC -source $source_version -d . conftest.java" >&5
39129 $JAVAC -source "$source_version" -d . conftest.java >&5 2>&1
39131 && test -f conftest.class \
39132 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39133 && { echo "$as_me:39133: $JAVAC -d . conftestfail.java" >&5
39134 $JAVAC -d . conftestfail.java >&5 2>&1
39136 && test -f conftestfail.class \
39137 && ! { echo "$as_me:39137: $JAVAC -source $source_version -d . conftestfail.java" >&5
39138 $JAVAC -source "$source_version" -d . conftestfail.java >&5 2>&1
39140 CONF_JAVAC="$JAVAC -source $source_version"
39141 HAVE_JAVAC_ENVVAR=1
39144 CONF_JAVAC="$JAVAC"
39145 HAVE_JAVAC_ENVVAR=1
39149 rm -f conftest.class
39150 if { echo "$as_me:39150: $JAVAC -target $target_version -d . conftest.java" >&5
39151 $JAVAC -target "$target_version" -d . conftest.java >&5 2>&1
39153 && test -f conftest.class \
39154 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39155 rm -f conftest.class
39156 rm -f conftestfail.class
39157 if { echo "$as_me:39157: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5
39158 $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
39160 && test -f conftest.class \
39161 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39162 && { echo "$as_me:39162: $JAVAC -target $target_version -d . conftestfail.java" >&5
39163 $JAVAC -target "$target_version" -d . conftestfail.java >&5 2>&1
39165 && test -f conftestfail.class \
39166 && ! { echo "$as_me:39166: $JAVAC -target $target_version -source $source_version -d . conftestfail.java" >&5
39167 $JAVAC -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1
39169 CONF_JAVAC="$JAVAC -target $target_version -source $source_version"
39170 HAVE_JAVAC_ENVVAR=1
39173 CONF_JAVAC="$JAVAC -target $target_version"
39174 HAVE_JAVAC_ENVVAR=1
39178 rm -f conftest.class
39179 if { echo "$as_me:39179: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5
39180 $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
39182 && test -f conftest.class \
39183 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39184 CONF_JAVAC="$JAVAC -target $target_version -source $source_version"
39185 HAVE_JAVAC_ENVVAR=1
39192 if test -z "$HAVE_JAVACOMP"; then
39193 # Extract the first word of "gcj", so it can be a program name with args.
39194 set dummy gcj; ac_word=$2
39196 if ${ac_cv_prog_HAVE_GCJ_IN_PATH+:} false; then :
39197 $as_echo_n "(cached) " >&6
39199 if test -n "$HAVE_GCJ_IN_PATH"; then
39200 ac_cv_prog_HAVE_GCJ_IN_PATH="$HAVE_GCJ_IN_PATH" # Let the user override the test.
39202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39203 for as_dir in $PATH
39206 test -z "$as_dir" && as_dir=.
39207 for ac_exec_ext in '' $ac_executable_extensions; do
39208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39209 ac_cv_prog_HAVE_GCJ_IN_PATH="yes"
39210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39219 HAVE_GCJ_IN_PATH=$ac_cv_prog_HAVE_GCJ_IN_PATH
39220 if test -n "$HAVE_GCJ_IN_PATH"; then
39227 # Extract the first word of "javac", so it can be a program name with args.
39228 set dummy javac; ac_word=$2
39230 if ${ac_cv_prog_HAVE_JAVAC_IN_PATH+:} false; then :
39231 $as_echo_n "(cached) " >&6
39233 if test -n "$HAVE_JAVAC_IN_PATH"; then
39234 ac_cv_prog_HAVE_JAVAC_IN_PATH="$HAVE_JAVAC_IN_PATH" # Let the user override the test.
39236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39237 for as_dir in $PATH
39240 test -z "$as_dir" && as_dir=.
39241 for ac_exec_ext in '' $ac_executable_extensions; do
39242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39243 ac_cv_prog_HAVE_JAVAC_IN_PATH="yes"
39244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39253 HAVE_JAVAC_IN_PATH=$ac_cv_prog_HAVE_JAVAC_IN_PATH
39254 if test -n "$HAVE_JAVAC_IN_PATH"; then
39261 # Extract the first word of "jikes", so it can be a program name with args.
39262 set dummy jikes; ac_word=$2
39264 if ${ac_cv_prog_HAVE_JIKES_IN_PATH+:} false; then :
39265 $as_echo_n "(cached) " >&6
39267 if test -n "$HAVE_JIKES_IN_PATH"; then
39268 ac_cv_prog_HAVE_JIKES_IN_PATH="$HAVE_JIKES_IN_PATH" # Let the user override the test.
39270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39271 for as_dir in $PATH
39274 test -z "$as_dir" && as_dir=.
39275 for ac_exec_ext in '' $ac_executable_extensions; do
39276 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39277 ac_cv_prog_HAVE_JIKES_IN_PATH="yes"
39278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39287 HAVE_JIKES_IN_PATH=$ac_cv_prog_HAVE_JIKES_IN_PATH
39288 if test -n "$HAVE_JIKES_IN_PATH"; then
39295 if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_GCJ_IN_PATH"; then
39296 if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^3\.[01]/d' | grep '^[3-9]' >/dev/null; then
39297 if { echo "$as_me:39297: gcj -C -d . conftestlib.java" >&5
39298 gcj -C -d . conftestlib.java >&5 2>&1
39300 if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then
39301 rm -f conftest.class
39302 if { echo "$as_me:39302: gcj -C -d . conftest.java" >&5
39303 gcj -C -d . conftest.java >&5 2>&1
39305 && test -f conftest.class \
39306 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39307 rm -f conftest.class
39308 rm -f conftestfail.class
39309 if { echo "$as_me:39309: gcj -C -fsource=$source_version -d . conftest.java" >&5
39310 gcj -C -fsource="$source_version" -d . conftest.java >&5 2>&1
39312 && test -f conftest.class \
39313 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39314 && { echo "$as_me:39314: gcj -C -d . conftestfail.java" >&5
39315 gcj -C -d . conftestfail.java >&5 2>&1
39317 && test -f conftestfail.class \
39318 && ! { echo "$as_me:39318: gcj -C -fsource=$source_version -d . conftestfail.java" >&5
39319 gcj -C -fsource="$source_version" -d . conftestfail.java >&5 2>&1
39321 CONF_JAVAC="gcj -C -fsource=$source_version"
39322 HAVE_JAVAC_ENVVAR=1
39325 CONF_JAVAC="gcj -C"
39326 HAVE_JAVAC_ENVVAR=1
39330 rm -f conftest.class
39331 rm -f conftestfail.class
39332 if { echo "$as_me:39332: gcj -C -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5
39333 gcj -C -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1
39335 && test -f conftest.class \
39336 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39337 CONF_JAVAC="gcj -C -fsource=$source_version -ftarget=$target_version"
39338 HAVE_JAVAC_ENVVAR=1
39343 if test "$target_version" = 1.4 && test "$source_version" = 1.4; then
39344 rm -f conftest.class
39345 if { echo "$as_me:39345: gcj -C -d . conftest.java" >&5
39346 gcj -C -d . conftest.java >&5 2>&1
39348 && test -f conftest.class; then
39349 CONF_JAVAC="gcj -C"
39354 if test "$target_version" = 1.4 && test "$source_version" = 1.3; then
39355 rm -f conftest.class
39356 if { echo "$as_me:39356: gcj -C -fno-assert -d . conftest.java" >&5
39357 gcj -C -fno-assert -d . conftest.java >&5 2>&1
39359 && test -f conftest.class; then
39360 CONF_JAVAC="gcj -C -fno-assert"
39364 rm -f conftest.class
39365 if { echo "$as_me:39365: gcj -C -d . conftest.java" >&5
39366 gcj -C -d . conftest.java >&5 2>&1
39368 && test -f conftest.class; then
39369 CONF_JAVAC="gcj -C"
39380 if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JAVAC_IN_PATH"; then
39381 if { javac -version >/dev/null 2>/dev/null || test $? -le 2; } \
39382 && ( if javac -help 2>&1 >/dev/null | grep at.dms.kjc.Main >/dev/null && javac -help 2>/dev/null | grep 'released.*2000' >/dev/null ; then exit 1; else exit 0; fi ); then
39383 if test "$source_version" = 1.5; then
39384 case "$target_version" in
39385 1.1 | 1.2 | 1.3 | 1.4 | 1.5) ;;
39386 *) source_version='1.6' ;;
39389 rm -f conftest.class
39390 if { echo "$as_me:39390: javac -d . conftest.java" >&5
39391 javac -d . conftest.java >&5 2>&1
39393 && test -f conftest.class \
39394 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39395 rm -f conftest.class
39396 rm -f conftestfail.class
39397 if { echo "$as_me:39397: javac -source $source_version -d . conftest.java" >&5
39398 javac -source "$source_version" -d . conftest.java >&5 2>&1
39400 && test -f conftest.class \
39401 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39402 && { echo "$as_me:39402: javac -d . conftestfail.java" >&5
39403 javac -d . conftestfail.java >&5 2>&1
39405 && test -f conftestfail.class \
39406 && ! { echo "$as_me:39406: javac -source $source_version -d . conftestfail.java" >&5
39407 javac -source "$source_version" -d . conftestfail.java >&5 2>&1
39409 CONF_JAVAC="javac -source $source_version"
39418 rm -f conftest.class
39419 if { echo "$as_me:39419: javac -target $target_version -d . conftest.java" >&5
39420 javac -target "$target_version" -d . conftest.java >&5 2>&1
39422 && test -f conftest.class \
39423 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39424 rm -f conftest.class
39425 rm -f conftestfail.class
39426 if { echo "$as_me:39426: javac -target $target_version -source $source_version -d . conftest.java" >&5
39427 javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
39429 && test -f conftest.class \
39430 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39431 && { echo "$as_me:39431: javac -target $target_version -d . conftestfail.java" >&5
39432 javac -target "$target_version" -d . conftestfail.java >&5 2>&1
39434 && test -f conftestfail.class \
39435 && ! { echo "$as_me:39435: javac -target $target_version -source $source_version -d . conftestfail.java" >&5
39436 javac -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1
39438 CONF_JAVAC="javac -target $target_version -source $source_version"
39442 CONF_JAVAC="javac -target $target_version"
39447 rm -f conftest.class
39448 if { echo "$as_me:39448: javac -target $target_version -source $source_version -d . conftest.java" >&5
39449 javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
39451 && test -f conftest.class \
39452 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39453 CONF_JAVAC="javac -target $target_version -source $source_version"
39461 if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JIKES_IN_PATH"; then
39462 if { jikes >/dev/null 2>/dev/null || test $? = 1; } \
39464 # See if the existing CLASSPATH is sufficient to make jikes work.
39466 jikes conftestlib.java >&5 2>&1
39468 rm -f conftestlib.class
39471 if test "$source_version" = 1.3; then
39479 rm -f conftest*.java conftest*.class
39480 if test -n "$HAVE_JAVACOMP"; then
39481 ac_result="$CONF_JAVAC"
39485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5
39486 $as_echo "$ac_result" >&6; }
39496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java virtual machine" >&5
39497 $as_echo_n "checking for Java virtual machine... " >&6; }
39498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39499 /* end confdefs.h. */
39501 #if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
39506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39507 $EGREP "yes" >/dev/null 2>&1; then :
39508 CLASSPATH_SEPARATOR=';'
39510 CLASSPATH_SEPARATOR=':'
39521 if test -n "$JAVA"; then
39525 # Extract the first word of "gij", so it can be a program name with args.
39526 set dummy gij; ac_word=$2
39528 if ${ac_cv_prog_HAVE_GIJ_IN_PATH+:} false; then :
39529 $as_echo_n "(cached) " >&6
39531 if test -n "$HAVE_GIJ_IN_PATH"; then
39532 ac_cv_prog_HAVE_GIJ_IN_PATH="$HAVE_GIJ_IN_PATH" # Let the user override the test.
39534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39535 for as_dir in $PATH
39538 test -z "$as_dir" && as_dir=.
39539 for ac_exec_ext in '' $ac_executable_extensions; do
39540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39541 ac_cv_prog_HAVE_GIJ_IN_PATH="yes"
39542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39551 HAVE_GIJ_IN_PATH=$ac_cv_prog_HAVE_GIJ_IN_PATH
39552 if test -n "$HAVE_GIJ_IN_PATH"; then
39559 # Extract the first word of "java", so it can be a program name with args.
39560 set dummy java; ac_word=$2
39562 if ${ac_cv_prog_HAVE_JAVA_IN_PATH+:} false; then :
39563 $as_echo_n "(cached) " >&6
39565 if test -n "$HAVE_JAVA_IN_PATH"; then
39566 ac_cv_prog_HAVE_JAVA_IN_PATH="$HAVE_JAVA_IN_PATH" # Let the user override the test.
39568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39569 for as_dir in $PATH
39572 test -z "$as_dir" && as_dir=.
39573 for ac_exec_ext in '' $ac_executable_extensions; do
39574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39575 ac_cv_prog_HAVE_JAVA_IN_PATH="yes"
39576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39585 HAVE_JAVA_IN_PATH=$ac_cv_prog_HAVE_JAVA_IN_PATH
39586 if test -n "$HAVE_JAVA_IN_PATH"; then
39593 # Extract the first word of "jre", so it can be a program name with args.
39594 set dummy jre; ac_word=$2
39596 if ${ac_cv_prog_HAVE_JRE_IN_PATH+:} false; then :
39597 $as_echo_n "(cached) " >&6
39599 if test -n "$HAVE_JRE_IN_PATH"; then
39600 ac_cv_prog_HAVE_JRE_IN_PATH="$HAVE_JRE_IN_PATH" # Let the user override the test.
39602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39603 for as_dir in $PATH
39606 test -z "$as_dir" && as_dir=.
39607 for ac_exec_ext in '' $ac_executable_extensions; do
39608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39609 ac_cv_prog_HAVE_JRE_IN_PATH="yes"
39610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39619 HAVE_JRE_IN_PATH=$ac_cv_prog_HAVE_JRE_IN_PATH
39620 if test -n "$HAVE_JRE_IN_PATH"; then
39627 # Extract the first word of "jview", so it can be a program name with args.
39628 set dummy jview; ac_word=$2
39630 if ${ac_cv_prog_HAVE_JVIEW_IN_PATH+:} false; then :
39631 $as_echo_n "(cached) " >&6
39633 if test -n "$HAVE_JVIEW_IN_PATH"; then
39634 ac_cv_prog_HAVE_JVIEW_IN_PATH="$HAVE_JVIEW_IN_PATH" # Let the user override the test.
39636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39637 for as_dir in $PATH
39640 test -z "$as_dir" && as_dir=.
39641 for ac_exec_ext in '' $ac_executable_extensions; do
39642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39643 ac_cv_prog_HAVE_JVIEW_IN_PATH="yes"
39644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39653 HAVE_JVIEW_IN_PATH=$ac_cv_prog_HAVE_JVIEW_IN_PATH
39654 if test -n "$HAVE_JVIEW_IN_PATH"; then
39663 if test -n "$HAVE_GIJ_IN_PATH" \
39664 && gij --version >/dev/null 2>/dev/null \
39669 if test -n "$HAVE_JAVA_IN_PATH" \
39670 && java -version >/dev/null 2>/dev/null \
39675 if test -n "$HAVE_JRE_IN_PATH" \
39676 && (jre >/dev/null 2>/dev/null || test $? = 1) \
39681 if test -n "$HAVE_JVIEW_IN_PATH" \
39682 && (jview -? >/dev/null 2>/dev/null || test $? = 1) \
39694 if test -n "$HAVE_JAVAEXEC"; then
39695 ac_result="$CONF_JAVA"
39699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5
39700 $as_echo "$ac_result" >&6; }
39711 ac_config_files="$ac_config_files Makefile po/Makefile.in doc/yacc.1"
39713 cat >confcache <<\_ACEOF
39714 # This file is a shell script that caches the results of configure
39715 # tests run on this system so they can be shared between configure
39716 # scripts and configure runs, see configure's option --config-cache.
39717 # It is not useful on other systems. If it contains results you don't
39718 # want to keep, you may remove or edit it.
39720 # config.status only pays attention to the cache file if you give it
39721 # the --recheck option to rerun configure.
39723 # `ac_cv_env_foo' variables (set or unset) will be overridden when
39724 # loading this file, other *unset* `ac_cv_foo' will be assigned the
39725 # following values.
39729 # The following way of writing the cache mishandles newlines in values,
39730 # but we know of no workaround that is simple, portable, and efficient.
39731 # So, we kill variables containing newlines.
39732 # Ultrix sh set writes to stderr and can't be redirected directly,
39733 # and sets the high bit in the cache file unless we assign to the vars.
39735 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
39736 eval ac_val=\$$ac_var
39740 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
39741 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
39744 _ | IFS | as_nl) ;; #(
39745 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
39746 *) { eval $ac_var=; unset $ac_var;} ;;
39752 case $as_nl`(ac_space=' '; set) 2>&1` in #(
39753 *${as_nl}ac_space=\ *)
39754 # `set' does not quote correctly, so add quotes: double-quote
39755 # substitution turns \\\\ into \\, and sed turns \\ into \.
39758 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
39761 # `set' quotes correctly as required by POSIX, so do not add quotes.
39762 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
39771 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
39773 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
39775 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
39776 if test -w "$cache_file"; then
39777 if test "x$cache_file" != "x/dev/null"; then
39778 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
39779 $as_echo "$as_me: updating cache $cache_file" >&6;}
39780 if test ! -f "$cache_file" || test -h "$cache_file"; then
39781 cat confcache >"$cache_file"
39783 case $cache_file in #(
39785 mv -f confcache "$cache_file"$$ &&
39786 mv -f "$cache_file"$$ "$cache_file" ;; #(
39788 mv -f confcache "$cache_file" ;;
39793 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
39794 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
39799 test "x$prefix" = xNONE && prefix=$ac_default_prefix
39800 # Let make expand exec_prefix.
39801 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
39803 DEFS=-DHAVE_CONFIG_H
39808 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
39809 # 1. Remove the extension, and $U if already installed.
39810 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
39811 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
39812 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
39813 # will be set to the directory where LIBOBJS objects are built.
39814 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
39815 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
39817 LIBOBJS=$ac_libobjs
39819 LTLIBOBJS=$ac_ltlibobjs
39822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
39823 $as_echo_n "checking that generated files are newer than configure... " >&6; }
39824 if test -n "$am_sleep_pid"; then
39825 # Hide warnings about reused PIDs.
39826 wait $am_sleep_pid 2>/dev/null
39828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
39829 $as_echo "done" >&6; }
39830 if test -n "$EXEEXT"; then
39832 am__EXEEXT_FALSE='#'
39834 am__EXEEXT_TRUE='#'
39838 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
39839 as_fn_error $? "conditional \"AMDEP\" was never defined.
39840 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39842 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
39843 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
39844 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39846 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
39847 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
39848 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39850 if test -z "${ENABLE_GCC_WARNINGS_TRUE}" && test -z "${ENABLE_GCC_WARNINGS_FALSE}"; then
39851 as_fn_error $? "conditional \"ENABLE_GCC_WARNINGS\" was never defined.
39852 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39854 if test -z "${BISON_CXX_WORKS_TRUE}" && test -z "${BISON_CXX_WORKS_FALSE}"; then
39855 as_fn_error $? "conditional \"BISON_CXX_WORKS\" was never defined.
39856 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39858 if test -z "${ENABLE_YACC_TRUE}" && test -z "${ENABLE_YACC_FALSE}"; then
39859 as_fn_error $? "conditional \"ENABLE_YACC\" was never defined.
39860 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39862 if test -z "${FLEX_CXX_WORKS_TRUE}" && test -z "${FLEX_CXX_WORKS_FALSE}"; then
39863 as_fn_error $? "conditional \"FLEX_CXX_WORKS\" was never defined.
39864 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39866 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
39867 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
39868 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39870 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
39871 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
39872 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39874 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
39875 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
39876 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
39877 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39879 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
39880 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
39881 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39885 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
39886 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
39887 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39889 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
39890 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
39891 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39893 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
39894 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
39895 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39897 CONFIG_INCLUDE=lib/config.h
39902 # Tell AC_LIBSOURCES where to find source files like alloca.c.
39905 # This hack originated in bison. It is required when using non-recursive
39906 # automake rules to build from gnulib-provided lib/ sources. Hence, LIB_DIR
39907 # is usually simply "lib". Those rules use the list of names like "fchdir.o"
39908 # and "strstr.o" in gl_LIBOBJS. With non-recursive make, we must prefix each
39909 # such file name with the "lib/" prefix. See also build-aux/prefix-gnulib-mk.
39910 gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , lib/,g'`
39912 # Listing the names of the variables to prefix is error-prone.
39913 # Rather, adjust each AC_SUBST'd variable whose name ends in '_H'
39914 # and whose value ends in '.h'.
39915 for ac_var in $ac_subst_vars
39917 eval "ac_val=\$$ac_var"
39918 case $ac_var:$ac_val in
39919 *_H:*.h) eval "$ac_var=lib/\$$ac_var";;
39924 if test -z "${GL_GENERATE_SCHED_H_TRUE}" && test -z "${GL_GENERATE_SCHED_H_FALSE}"; then
39925 as_fn_error $? "conditional \"GL_GENERATE_SCHED_H\" was never defined.
39926 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39928 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
39929 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
39930 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39932 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
39933 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
39934 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39936 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
39937 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
39938 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39943 if test -n "$gl_LIBOBJS"; then
39944 # Remove the extension.
39945 sed_drop_objext='s/\.o$//;s/\.obj$//'
39946 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
39947 gl_libobjs="$gl_libobjs $i.$ac_objext"
39948 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
39951 gl_LIBOBJS=$gl_libobjs
39953 gl_LTLIBOBJS=$gl_ltlibobjs
39959 if test -n "$gltests_LIBOBJS"; then
39960 # Remove the extension.
39961 sed_drop_objext='s/\.o$//;s/\.obj$//'
39962 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
39963 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
39964 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
39967 gltests_LIBOBJS=$gltests_libobjs
39969 gltests_LTLIBOBJS=$gltests_ltlibobjs
39972 if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
39973 as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
39974 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39977 : "${CONFIG_STATUS=./config.status}"
39979 ac_clean_files_save=$ac_clean_files
39980 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
39981 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
39982 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
39984 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
39986 # Generated by $as_me.
39987 # Run this file to recreate the current configuration.
39988 # Compiler output produced by configure, useful for debugging
39989 # configure, is in config.log if it exists.
39992 ac_cs_recheck=false
39995 SHELL=\${CONFIG_SHELL-$SHELL}
39998 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
39999 ## -------------------- ##
40000 ## M4sh Initialization. ##
40001 ## -------------------- ##
40003 # Be more Bourne compatible
40004 DUALCASE=1; export DUALCASE # for MKS sh
40005 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
40008 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
40009 # is contrary to our usage. Disable this feature.
40010 alias -g '${1+"$@"}'='"$@"'
40011 setopt NO_GLOB_SUBST
40013 case `(set -o) 2>/dev/null` in #(
40025 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40026 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40027 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40028 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
40029 # Prefer a ksh shell builtin over an external printf program on Solaris,
40030 # but without wasting forks for bash or zsh.
40031 if test -z "$BASH_VERSION$ZSH_VERSION" \
40032 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
40033 as_echo='print -r --'
40034 as_echo_n='print -rn --'
40035 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
40036 as_echo='printf %s\n'
40037 as_echo_n='printf %s'
40039 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
40040 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
40041 as_echo_n='/usr/ucb/echo -n'
40043 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
40044 as_echo_n_body='eval
40048 expr "X$arg" : "X\\(.*\\)$as_nl";
40049 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
40051 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
40053 export as_echo_n_body
40054 as_echo_n='sh -c $as_echo_n_body as_echo'
40056 export as_echo_body
40057 as_echo='sh -c $as_echo_body as_echo'
40060 # The user is always right.
40061 if test "${PATH_SEPARATOR+set}" != set; then
40063 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
40064 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
40071 # We need space, tab and new line, in precisely that order. Quoting is
40072 # there to prevent editors from complaining about space-tab.
40073 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
40074 # splitting by setting IFS to empty value.)
40077 # Find who we are. Look in the path if we contain no directory separator.
40080 *[\\/]* ) as_myself=$0 ;;
40081 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40082 for as_dir in $PATH
40085 test -z "$as_dir" && as_dir=.
40086 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
40092 # We did not find ourselves, most probably we were run as `sh COMMAND'
40093 # in which case we are not to be found in the path.
40094 if test "x$as_myself" = x; then
40097 if test ! -f "$as_myself"; then
40098 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
40102 # Unset variables that we do not need and which cause bugs (e.g. in
40103 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
40104 # suppresses any "Segmentation fault" message there. '((' could
40105 # trigger a bug in pdksh 5.2.14.
40106 for as_var in BASH_ENV ENV MAIL MAILPATH
40107 do eval test x\${$as_var+set} = xset \
40108 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
40121 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
40124 # as_fn_error STATUS ERROR [LINENO LOG_FD]
40125 # ----------------------------------------
40126 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
40127 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
40128 # script with STATUS, using 1 if that was 0.
40131 as_status=$1; test $as_status -eq 0 && as_status=1
40133 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
40134 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
40136 $as_echo "$as_me: error: $2" >&2
40137 as_fn_exit $as_status
40141 # as_fn_set_status STATUS
40142 # -----------------------
40143 # Set $? to STATUS, without forking.
40144 as_fn_set_status ()
40147 } # as_fn_set_status
40149 # as_fn_exit STATUS
40150 # -----------------
40151 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
40155 as_fn_set_status $1
40161 # Portably unset VAR.
40164 { eval $1=; unset $1;}
40166 as_unset=as_fn_unset
40167 # as_fn_append VAR VALUE
40168 # ----------------------
40169 # Append the text in VALUE to the end of the definition contained in VAR. Take
40170 # advantage of any shell optimizations that allow amortized linear growth over
40171 # repeated appends, instead of the typical quadratic growth present in naive
40173 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
40174 eval 'as_fn_append ()
40185 # as_fn_arith ARG...
40186 # ------------------
40187 # Perform arithmetic evaluation on the ARGs, and store the result in the
40188 # global $as_val. Take advantage of shells that can avoid forks. The arguments
40189 # must be portable across $(()) and expr.
40190 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
40191 eval 'as_fn_arith ()
40198 as_val=`expr "$@" || test $? -eq 1`
40203 if expr a : '\(a\)' >/dev/null 2>&1 &&
40204 test "X`expr 00001 : '.*\(...\)'`" = X001; then
40210 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
40211 as_basename=basename
40216 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
40222 as_me=`$as_basename -- "$0" ||
40223 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
40224 X"$0" : 'X\(//\)$' \| \
40225 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
40227 sed '/^.*\/\([^/][^/]*\)\/*$/{
40241 # Avoid depending upon Character Ranges.
40242 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
40243 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
40244 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40245 as_cr_digits='0123456789'
40246 as_cr_alnum=$as_cr_Letters$as_cr_digits
40248 ECHO_C= ECHO_N= ECHO_T=
40249 case `echo -n x` in #(((((
40251 case `echo 'xy\c'` in
40252 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
40254 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
40261 rm -f conf$$ conf$$.exe conf$$.file
40262 if test -d conf$$.dir; then
40263 rm -f conf$$.dir/conf$$.file
40266 mkdir conf$$.dir 2>/dev/null
40268 if (echo >conf$$.file) 2>/dev/null; then
40269 if ln -s conf$$.file conf$$ 2>/dev/null; then
40271 # ... but there are two gotchas:
40272 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
40273 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
40274 # In both cases, we have to default to `cp -pR'.
40275 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
40277 elif ln conf$$.file conf$$ 2>/dev/null; then
40285 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
40286 rmdir conf$$.dir 2>/dev/null
40291 # Create "$as_dir" as a directory, including parents if necessary.
40296 -*) as_dir=./$as_dir;;
40298 test -d "$as_dir" || eval $as_mkdir_p || {
40302 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
40303 *) as_qdir=$as_dir;;
40305 as_dirs="'$as_qdir' $as_dirs"
40306 as_dir=`$as_dirname -- "$as_dir" ||
40307 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40308 X"$as_dir" : 'X\(//\)[^/]' \| \
40309 X"$as_dir" : 'X\(//\)$' \| \
40310 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
40311 $as_echo X"$as_dir" |
40312 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40316 /^X\(\/\/\)[^/].*/{
40329 test -d "$as_dir" && break
40331 test -z "$as_dirs" || eval "mkdir $as_dirs"
40332 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
40336 if mkdir -p . 2>/dev/null; then
40337 as_mkdir_p='mkdir -p "$as_dir"'
40339 test -d ./-p && rmdir ./-p
40344 # as_fn_executable_p FILE
40345 # -----------------------
40346 # Test if FILE is an executable regular file.
40347 as_fn_executable_p ()
40349 test -f "$1" && test -x "$1"
40350 } # as_fn_executable_p
40351 as_test_x='test -x'
40352 as_executable_p=as_fn_executable_p
40354 # Sed expression to map a string onto a valid CPP name.
40355 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
40357 # Sed expression to map a string onto a valid variable name.
40358 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
40362 ## ----------------------------------- ##
40363 ## Main body of $CONFIG_STATUS script. ##
40364 ## ----------------------------------- ##
40366 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
40368 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40369 # Save the log message, to keep $0 and so on meaningful, and to
40370 # report actual input values of CONFIG_FILES etc. instead of their
40371 # values after options handling.
40373 This file was extended by GNU Bison $as_me 3.0.5, which was
40374 generated by GNU Autoconf 2.69. Invocation command line was
40376 CONFIG_FILES = $CONFIG_FILES
40377 CONFIG_HEADERS = $CONFIG_HEADERS
40378 CONFIG_LINKS = $CONFIG_LINKS
40379 CONFIG_COMMANDS = $CONFIG_COMMANDS
40382 on `(hostname || uname -n) 2>/dev/null | sed 1q`
40387 case $ac_config_files in *"
40388 "*) set x $ac_config_files; shift; ac_config_files=$*;;
40391 case $ac_config_headers in *"
40392 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
40396 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40397 # Files that config.status was made for.
40398 config_files="$ac_config_files"
40399 config_headers="$ac_config_headers"
40400 config_links="$ac_config_links"
40401 config_commands="$ac_config_commands"
40405 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40407 \`$as_me' instantiates files and other configuration actions
40408 from templates according to the current configuration. Unless the files
40409 and actions are specified as TAGs, all are instantiated by default.
40411 Usage: $0 [OPTION]... [TAG]...
40413 -h, --help print this help, then exit
40414 -V, --version print version number and configuration settings, then exit
40415 --config print configuration, then exit
40416 -q, --quiet, --silent
40417 do not print progress messages
40418 -d, --debug don't remove temporary files
40419 --recheck update $as_me by reconfiguring in the same conditions
40420 --file=FILE[:TEMPLATE]
40421 instantiate the configuration file FILE
40422 --header=FILE[:TEMPLATE]
40423 instantiate the configuration header FILE
40425 Configuration files:
40428 Configuration headers:
40431 Configuration links:
40434 Configuration commands:
40437 Report bugs to <bug-bison@gnu.org>.
40438 GNU Bison home page: <http://www.gnu.org/software/bison/>.
40439 General help using GNU software: <http://www.gnu.org/gethelp/>."
40442 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40443 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
40445 GNU Bison config.status 3.0.5
40446 configured by $0, generated by GNU Autoconf 2.69,
40447 with options \\"\$ac_cs_config\\"
40449 Copyright (C) 2012 Free Software Foundation, Inc.
40450 This config.status script is free software; the Free Software Foundation
40451 gives unlimited permission to copy, distribute and modify it."
40458 test -n "\$AWK" || AWK=awk
40461 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40462 # The default lists apply if the user does not specify any file.
40468 ac_option=`expr "X$1" : 'X\([^=]*\)='`
40469 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
40473 ac_option=`expr "X$1" : 'X\([^=]*\)='`
40485 # Handling of the options.
40486 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
40488 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
40489 $as_echo "$ac_cs_version"; exit ;;
40490 --config | --confi | --conf | --con | --co | --c )
40491 $as_echo "$ac_cs_config"; exit ;;
40492 --debug | --debu | --deb | --de | --d | -d )
40494 --file | --fil | --fi | --f )
40497 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
40498 '') as_fn_error $? "missing file argument" ;;
40500 as_fn_append CONFIG_FILES " '$ac_optarg'"
40501 ac_need_defaults=false;;
40502 --header | --heade | --head | --hea )
40505 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
40507 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
40508 ac_need_defaults=false;;
40510 # Conflict between --help and --header
40511 as_fn_error $? "ambiguous option: \`$1'
40512 Try \`$0 --help' for more information.";;
40513 --help | --hel | -h )
40514 $as_echo "$ac_cs_usage"; exit ;;
40515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
40516 | -silent | --silent | --silen | --sile | --sil | --si | --s)
40519 # This is an error.
40520 -*) as_fn_error $? "unrecognized option: \`$1'
40521 Try \`$0 --help' for more information." ;;
40523 *) as_fn_append ac_config_targets " $1"
40524 ac_need_defaults=false ;;
40530 ac_configure_extra_args=
40532 if $ac_cs_silent; then
40534 ac_configure_extra_args="$ac_configure_extra_args --silent"
40538 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40539 if \$ac_cs_recheck; then
40540 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
40542 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
40543 CONFIG_SHELL='$SHELL'
40544 export CONFIG_SHELL
40549 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40553 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
40554 ## Running $as_me. ##
40560 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40564 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
40565 GNUmakefile=$GNUmakefile
40566 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
40567 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
40568 # from automake < 1.5.
40569 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
40570 # Capture the value of LINGUAS because we need it to compute CATALOGS.
40571 LINGUAS="${LINGUAS-%UNSET%}"
40577 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40579 # Handling of arguments.
40580 for ac_config_target in $ac_config_targets
40582 case $ac_config_target in
40583 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.in.h" ;;
40584 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
40585 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
40586 "javacomp.sh") CONFIG_FILES="$CONFIG_FILES javacomp.sh:build-aux/javacomp.sh.in" ;;
40587 "javaexec.sh") CONFIG_FILES="$CONFIG_FILES javaexec.sh:build-aux/javaexec.sh.in" ;;
40588 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
40589 "runtime-po/Makefile.in") CONFIG_FILES="$CONFIG_FILES runtime-po/Makefile.in" ;;
40590 "etc/bench.pl") CONFIG_FILES="$CONFIG_FILES etc/bench.pl" ;;
40591 "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
40592 "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
40593 "tests/bison") CONFIG_FILES="$CONFIG_FILES tests/bison" ;;
40594 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
40595 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
40596 "doc/yacc.1") CONFIG_FILES="$CONFIG_FILES doc/yacc.1" ;;
40598 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
40603 # If the user did not use the arguments to specify the items to instantiate,
40604 # then the envvar interface is used. Set only those that are not.
40605 # We use the long form for the default assignment because of an extremely
40606 # bizarre bug on SunOS 4.1.3.
40607 if $ac_need_defaults; then
40608 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
40609 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
40610 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
40611 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
40614 # Have a temporary directory for convenience. Make it in the build tree
40615 # simply because there is no reason against having it here, and in addition,
40616 # creating and moving files from /tmp can sometimes cause problems.
40617 # Hook for its removal unless debugging.
40618 # Note that there is a small window in which the directory will not be cleaned:
40619 # after its creation but before its name has been assigned to `$tmp'.
40623 trap 'exit_status=$?
40624 : "${ac_tmp:=$tmp}"
40625 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
40627 trap 'as_fn_exit 1' 1 2 13 15
40629 # Create a (secure) tmp directory for tmp files.
40632 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
40636 tmp=./conf$$-$RANDOM
40637 (umask 077 && mkdir "$tmp")
40638 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
40641 # Set up the scripts for CONFIG_FILES section.
40642 # No need to generate them if there are no CONFIG_FILES.
40643 # This happens for instance with `./config.status config.h'.
40644 if test -n "$CONFIG_FILES"; then
40647 ac_cr=`echo X | tr X '\015'`
40648 # On cygwin, bash can eat \r inside `` if the user requested igncr.
40649 # But we know of no other shell where ac_cr would be empty at this
40650 # point, so we can use a bashism as a fallback.
40651 if test "x$ac_cr" = x; then
40652 eval ac_cr=\$\'\\r\'
40654 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
40655 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
40658 ac_cs_awk_cr=$ac_cr
40661 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
40666 echo "cat >conf$$subs.awk <<_ACEOF" &&
40667 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
40669 } >conf$$subs.sh ||
40670 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40671 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
40673 for ac_last_try in false false false false false :; do
40674 . ./conf$$subs.sh ||
40675 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40677 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
40678 if test $ac_delim_n = $ac_delim_num; then
40680 elif $ac_last_try; then
40681 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40683 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
40686 rm -f conf$$subs.sh
40688 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40689 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
40693 s/^/S["/; s/!.*/"]=/
40703 s/\(.\{148\}\)..*/\1/
40705 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
40710 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
40717 s/\(.\{148\}\)..*/\1/
40719 s/["\\]/\\&/g; s/^/"/; s/$/"/
40723 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
40728 ' <conf$$subs.awk | sed '
40733 ' >>$CONFIG_STATUS || ac_write_fail=1
40734 rm -f conf$$subs.awk
40735 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40737 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
40738 for (key in S) S_is_set[key] = 1
40744 nfields = split(line, field, "@")
40746 len = length(field[1])
40747 for (i = 2; i < nfields; i++) {
40749 keylen = length(key)
40750 if (S_is_set[key]) {
40752 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
40753 len += length(value) + length(field[++i])
40764 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40765 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
40766 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
40769 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
40770 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
40773 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
40774 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
40775 # trailing colons and then remove the whole line if VPATH becomes empty
40776 # (actually we leave an empty line to preserve line numbers).
40777 if test "x$srcdir" = x.; then
40778 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
40796 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40797 fi # test -n "$CONFIG_FILES"
40799 # Set up the scripts for CONFIG_HEADERS section.
40800 # No need to generate them if there are no CONFIG_HEADERS.
40801 # This happens for instance with `./config.status Makefile'.
40802 if test -n "$CONFIG_HEADERS"; then
40803 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
40807 # Transform confdefs.h into an awk script `defines.awk', embedded as
40808 # here-document in config.status, that substitutes the proper values into
40809 # config.h.in to produce config.h.
40811 # Create a delimiter string that does not exist in confdefs.h, to ease
40812 # handling of long lines.
40814 for ac_last_try in false false :; do
40815 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
40816 if test -z "$ac_tt"; then
40818 elif $ac_last_try; then
40819 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
40821 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
40825 # For the awk script, D is an array of macro values keyed by name,
40826 # likewise P contains macro parameters if any. Preserve backslash
40827 # newline sequences.
40829 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
40831 s/.\{148\}/&'"$ac_delim"'/g
40834 s/^[ ]*#[ ]*define[ ][ ]*/ /
40841 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
40843 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
40847 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
40848 D["\1"]=" \3\\\\\\n"\\/p
40850 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
40855 s/.\{148\}/&'"$ac_delim"'/g
40860 s/["\\]/\\&/g; s/^/"/; s/$/"/p
40863 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
40865 ' <confdefs.h | sed '
40866 s/'"$ac_delim"'/"\\\
40867 "/g' >>$CONFIG_STATUS || ac_write_fail=1
40869 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40870 for (key in D) D_is_set[key] = 1
40873 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
40875 split(line, arg, " ")
40876 if (arg[1] == "#") {
40880 defundef = substr(arg[1], 2)
40883 split(mac1, mac2, "(") #)
40885 prefix = substr(line, 1, index(line, defundef) - 1)
40886 if (D_is_set[macro]) {
40887 # Preserve the white space surrounding the "#".
40888 print prefix "define", macro P[macro] D[macro]
40891 # Replace #undef with comments. This is necessary, for example,
40892 # in the case of _POSIX_SOURCE, which is predefined and required
40893 # on some systems where configure will not decide to define it.
40894 if (defundef == "undef") {
40895 print "/*", prefix defundef, macro, "*/"
40903 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40904 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
40905 fi # test -n "$CONFIG_HEADERS"
40908 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
40913 :[FHLC]) ac_mode=$ac_tag; continue;;
40915 case $ac_mode$ac_tag in
40917 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
40918 :[FH]-) ac_tag=-:-;;
40919 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
40936 -) ac_f="$ac_tmp/stdin";;
40937 *) # Look for the file first in the build tree, then in the source tree
40938 # (if the path is not absolute). The absolute path cannot be DOS-style,
40939 # because $ac_f cannot contain `:'.
40943 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
40945 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
40947 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
40948 as_fn_append ac_file_inputs " '$ac_f'"
40951 # Let's still pretend it is `configure' which instantiates (i.e., don't
40952 # use $as_me), people would be surprised to read:
40953 # /* config.h. Generated by config.status. */
40954 configure_input='Generated from '`
40955 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
40957 if test x"$ac_file" != x-; then
40958 configure_input="$ac_file. $configure_input"
40959 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
40960 $as_echo "$as_me: creating $ac_file" >&6;}
40962 # Neutralize special characters interpreted by sed in replacement strings.
40963 case $configure_input in #(
40964 *\&* | *\|* | *\\* )
40965 ac_sed_conf_input=`$as_echo "$configure_input" |
40966 sed 's/[\\\\&|]/\\\\&/g'`;; #(
40967 *) ac_sed_conf_input=$configure_input;;
40971 *:-:* | *:-) cat >"$ac_tmp/stdin" \
40972 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
40977 ac_dir=`$as_dirname -- "$ac_file" ||
40978 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40979 X"$ac_file" : 'X\(//\)[^/]' \| \
40980 X"$ac_file" : 'X\(//\)$' \| \
40981 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
40982 $as_echo X"$ac_file" |
40983 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40987 /^X\(\/\/\)[^/].*/{
41000 as_dir="$ac_dir"; as_fn_mkdir_p
41004 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
41006 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
41007 # A ".." for each directory in $ac_dir_suffix.
41008 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
41009 case $ac_top_builddir_sub in
41010 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
41011 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
41014 ac_abs_top_builddir=$ac_pwd
41015 ac_abs_builddir=$ac_pwd$ac_dir_suffix
41016 # for backward compatibility:
41017 ac_top_builddir=$ac_top_build_prefix
41020 .) # We are building in place.
41022 ac_top_srcdir=$ac_top_builddir_sub
41023 ac_abs_top_srcdir=$ac_pwd ;;
41024 [\\/]* | ?:[\\/]* ) # Absolute name.
41025 ac_srcdir=$srcdir$ac_dir_suffix;
41026 ac_top_srcdir=$srcdir
41027 ac_abs_top_srcdir=$srcdir ;;
41028 *) # Relative name.
41029 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
41030 ac_top_srcdir=$ac_top_build_prefix$srcdir
41031 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
41033 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
41043 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
41044 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
41046 ac_MKDIR_P=$MKDIR_P
41048 [\\/$]* | ?:[\\/]* ) ;;
41049 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
41053 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41054 # If the template does not know about datarootdir, expand it.
41055 # FIXME: This hack should be removed a few years after 2.60.
41056 ac_datarootdir_hack=; ac_datarootdir_seen=
41067 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
41068 *datarootdir*) ac_datarootdir_seen=yes;;
41069 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
41070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
41071 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
41073 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41074 ac_datarootdir_hack='
41075 s&@datadir@&$datadir&g
41076 s&@docdir@&$docdir&g
41077 s&@infodir@&$infodir&g
41078 s&@localedir@&$localedir&g
41079 s&@mandir@&$mandir&g
41080 s&\\\${datarootdir}&$datarootdir&g' ;;
41084 # Neutralize VPATH when `$srcdir' = `.'.
41085 # Shell code in configure.ac might set extrasub.
41086 # FIXME: do we really want to maintain this feature?
41087 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41088 ac_sed_extra="$ac_vpsub
41091 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41093 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
41094 s|@configure_input@|$ac_sed_conf_input|;t t
41095 s&@top_builddir@&$ac_top_builddir_sub&;t t
41096 s&@top_build_prefix@&$ac_top_build_prefix&;t t
41097 s&@srcdir@&$ac_srcdir&;t t
41098 s&@abs_srcdir@&$ac_abs_srcdir&;t t
41099 s&@top_srcdir@&$ac_top_srcdir&;t t
41100 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
41101 s&@builddir@&$ac_builddir&;t t
41102 s&@abs_builddir@&$ac_abs_builddir&;t t
41103 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
41104 s&@INSTALL@&$ac_INSTALL&;t t
41105 s&@MKDIR_P@&$ac_MKDIR_P&;t t
41106 $ac_datarootdir_hack
41108 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
41109 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41111 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
41112 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
41113 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
41114 "$ac_tmp/out"`; test -z "$ac_out"; } &&
41115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
41116 which seems to be undefined. Please make sure it is defined" >&5
41117 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
41118 which seems to be undefined. Please make sure it is defined" >&2;}
41120 rm -f "$ac_tmp/stdin"
41122 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
41123 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
41125 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41131 if test x"$ac_file" != x-; then
41133 $as_echo "/* $configure_input */" \
41134 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
41135 } >"$ac_tmp/config.h" \
41136 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41137 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
41138 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
41139 $as_echo "$as_me: $ac_file is unchanged" >&6;}
41142 mv "$ac_tmp/config.h" "$ac_file" \
41143 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41146 $as_echo "/* $configure_input */" \
41147 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
41148 || as_fn_error $? "could not create -" "$LINENO" 5
41150 # Compute "$ac_file"'s index in $config_headers.
41153 for _am_header in $config_headers :; do
41154 case $_am_header in
41155 $_am_arg | $_am_arg:* )
41158 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
41161 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
41162 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41163 X"$_am_arg" : 'X\(//\)[^/]' \| \
41164 X"$_am_arg" : 'X\(//\)$' \| \
41165 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
41166 $as_echo X"$_am_arg" |
41167 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41171 /^X\(\/\/\)[^/].*/{
41183 s/.*/./; q'`/stamp-h$_am_stamp_count
41190 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
41193 # Prefer the file from the source tree if names are identical.
41194 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
41195 ac_source=$srcdir/$ac_source
41198 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
41199 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
41201 if test ! -r "$ac_source"; then
41202 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
41206 # Try a relative symlink, then a hard link, then a copy.
41208 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
41209 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
41211 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
41212 ln "$ac_source" "$ac_file" 2>/dev/null ||
41213 cp -p "$ac_source" "$ac_file" ||
41214 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
41217 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
41218 $as_echo "$as_me: executing $ac_file commands" >&6;}
41223 case $ac_file$ac_mode in
41224 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
41225 # Older Autoconf quotes --file arguments for eval, but not when files
41226 # are listed without --file. Let's play safe and only enable the eval
41227 # if we detect the quoting.
41228 case $CONFIG_FILES in
41229 *\'*) eval set x "$CONFIG_FILES" ;;
41230 *) set x $CONFIG_FILES ;;
41235 # Strip MF so we end up with the name of the file.
41236 mf=`echo "$mf" | sed -e 's/:.*$//'`
41237 # Check whether this is an Automake generated Makefile or not.
41238 # We used to match only the files named 'Makefile.in', but
41239 # some people rename them; so instead we look at the file content.
41240 # Grep'ing the first line is not enough: some people post-process
41241 # each Makefile.in and add a new line on top of each file to say so.
41242 # Grep'ing the whole file is not good either: AIX grep has a line
41243 # limit of 2048, but all sed's we know have understand at least 4000.
41244 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
41245 dirpart=`$as_dirname -- "$mf" ||
41246 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41247 X"$mf" : 'X\(//\)[^/]' \| \
41248 X"$mf" : 'X\(//\)$' \| \
41249 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
41251 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41255 /^X\(\/\/\)[^/].*/{
41271 # Extract the definition of DEPDIR, am__include, and am__quote
41272 # from the Makefile without running 'make'.
41273 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
41274 test -z "$DEPDIR" && continue
41275 am__include=`sed -n 's/^am__include = //p' < "$mf"`
41276 test -z "$am__include" && continue
41277 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
41278 # Find all dependency output files, they are included files with
41279 # $(DEPDIR) in their names. We invoke sed twice because it is the
41280 # simplest approach to changing $(DEPDIR) to its actual value in the
41282 for file in `sed -n "
41283 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
41284 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
41285 # Make sure the directory exists.
41286 test -f "$dirpart/$file" && continue
41287 fdir=`$as_dirname -- "$file" ||
41288 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41289 X"$file" : 'X\(//\)[^/]' \| \
41290 X"$file" : 'X\(//\)$' \| \
41291 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
41292 $as_echo X"$file" |
41293 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41297 /^X\(\/\/\)[^/].*/{
41310 as_dir=$dirpart/$fdir; as_fn_mkdir_p
41311 # echo "creating $dirpart/$file"
41312 echo '# dummy' > "$dirpart/$file"
41317 "po-directories":C)
41318 for ac_file in $CONFIG_FILES; do
41319 # Support "outfile[:infile[:infile...]]"
41321 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
41323 # PO directories have a Makefile.in generated from Makefile.in.in.
41324 case "$ac_file" in */Makefile.in)
41325 # Adjust a relative srcdir.
41326 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
41327 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
41328 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
41329 # In autoconf-2.13 it is called $ac_given_srcdir.
41330 # In autoconf-2.50 it is called $srcdir.
41331 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
41332 case "$ac_given_srcdir" in
41333 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
41334 /*) top_srcdir="$ac_given_srcdir" ;;
41335 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
41337 # Treat a directory as a PO directory if and only if it has a
41338 # POTFILES.in file. This allows packages to have multiple PO
41339 # directories under different names or in different locations.
41340 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
41341 rm -f "$ac_dir/POTFILES"
41342 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
41343 gt_tab=`printf '\t'`
41344 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
41345 POMAKEFILEDEPS="POTFILES.in"
41346 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
41347 # on $ac_dir but don't depend on user-specified configuration
41349 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
41350 # The LINGUAS file contains the set of available languages.
41351 if test -n "$OBSOLETE_ALL_LINGUAS"; then
41352 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
41354 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
41355 # Hide the ALL_LINGUAS assignment from automake < 1.5.
41356 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
41357 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
41359 # The set of available languages was given in configure.in.
41360 # Hide the ALL_LINGUAS assignment from automake < 1.5.
41361 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
41364 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
41365 # Compute UPDATEPOFILES
41366 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
41367 # Compute DUMMYPOFILES
41368 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
41370 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
41371 case "$ac_given_srcdir" in
41373 *) srcdirpre='$(srcdir)/' ;;
41379 for lang in $ALL_LINGUAS; do
41380 POFILES="$POFILES $srcdirpre$lang.po"
41381 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
41382 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
41383 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
41385 # CATALOGS depends on both $ac_dir and the user's LINGUAS
41386 # environment variable.
41388 if test -n "$ALL_LINGUAS"; then
41389 for presentlang in $ALL_LINGUAS; do
41391 if test "%UNSET%" != "$LINGUAS"; then
41392 desiredlanguages="$LINGUAS"
41394 desiredlanguages="$ALL_LINGUAS"
41396 for desiredlang in $desiredlanguages; do
41397 # Use the presentlang catalog if desiredlang is
41398 # a. equal to presentlang, or
41399 # b. a variant of presentlang (because in this case,
41400 # presentlang can be used as a fallback for messages
41401 # which are not translated in the desiredlang catalog).
41402 case "$desiredlang" in
41403 "$presentlang"*) useit=yes;;
41406 if test $useit = yes; then
41407 INST_LINGUAS="$INST_LINGUAS $presentlang"
41412 if test -n "$INST_LINGUAS"; then
41413 for lang in $INST_LINGUAS; do
41414 CATALOGS="$CATALOGS $lang.gmo"
41417 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
41418 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
41419 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
41420 if test -f "$f"; then
41422 *.orig | *.bak | *~) ;;
41423 *) cat "$f" >> "$ac_dir/Makefile" ;;
41431 "etc/bench.pl":F) chmod +x etc/bench.pl ;;
41432 "tests/atconfig":C) cat >tests/atconfig <<ATEOF
41433 # Configurable variable values for building test suites.
41435 # Copyright (C) 2012 Free Software Foundation, Inc.
41437 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
41439 abs_builddir='$ac_abs_builddir'
41440 at_srcdir='$ac_srcdir'
41441 abs_srcdir='$ac_abs_srcdir'
41442 at_top_srcdir='$ac_top_srcdir'
41443 abs_top_srcdir='$ac_abs_top_srcdir'
41444 at_top_build_prefix='$ac_top_build_prefix'
41445 abs_top_builddir='$ac_abs_top_builddir'
41447 # Backward compatibility with Autotest <= 2.59b:
41448 at_top_builddir=\$at_top_build_prefix
41450 AUTOTEST_PATH='tests'
41452 SHELL=\${CONFIG_SHELL-'$SHELL'}
41455 "tests/bison":F) chmod +x tests/bison ;;
41463 ac_clean_files=$ac_clean_files_save
41465 test $ac_write_fail = 0 ||
41466 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
41469 # configure is writing to config.log, and then calls config.status.
41470 # config.status does its own redirection, appending to config.log.
41471 # Unfortunately, on DOS this fails, as config.log is still kept open
41472 # by configure, so config.status won't be able to write to it; its
41473 # output is simply discarded. So we exec the FD to /dev/null,
41474 # effectively closing config.log, so it can be properly (re)opened and
41475 # appended to by config.status. When coming back to configure, we
41476 # need to make the FD available again.
41477 if test "$no_create" != yes; then
41479 ac_config_status_args=
41480 test "$silent" = yes &&
41481 ac_config_status_args="$ac_config_status_args --quiet"
41483 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
41485 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
41486 # would make configure fail if this is the last instruction.
41487 $ac_cs_success || as_fn_exit 1
41489 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
41490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
41491 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}