2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.66 for GNU M4 1.4.16.
5 # Report bugs to <bug-m4@gnu.org>.
8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
13 # This configure script is free software; the Free Software Foundation
14 # gives unlimited permission to copy, distribute and modify it.
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
29 case `(set -o) 2>/dev/null` in #(
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
70 as_echo_n='sh -c $as_echo_n_body as_echo'
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
93 # Find who we are. Look in the path if we contain no directory separator.
95 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
100 test -z "$as_dir" && as_dir=.
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107 # We did not find ourselves, most probably we were run as `sh COMMAND'
108 # in which case we are not to be found in the path.
109 if test "x$as_myself" = x; then
112 if test ! -f "$as_myself"; then
113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
117 # Unset variables that we do not need and which cause bugs (e.g. in
118 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119 # suppresses any "Segmentation fault" message there. '((' could
120 # trigger a bug in pdksh 5.2.14.
121 for as_var in BASH_ENV ENV MAIL MAILPATH
122 do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138 if test "x$CONFIG_SHELL" = x; then
139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143 # is contrary to our usage. Disable this feature.
144 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 case \`(set -o) 2>/dev/null\` in #(
155 as_required="as_fn_return () { (exit \$1); }
156 as_fn_success () { as_fn_return 0; }
157 as_fn_failure () { as_fn_return 1; }
158 as_fn_ret_success () { return 0; }
159 as_fn_ret_failure () { return 1; }
162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169 exitcode=1; echo positional parameters were not saved.
171 test x\$exitcode = x0 || exit 1"
172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176 test \$(( 1 + 1 )) = 2 || exit 1"
177 if (eval "$as_required") 2>/dev/null; then :
182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190 test -z "$as_dir" && as_dir=.
194 for as_base in sh bash ksh sh5; do
195 # Try only shells that exist, to save several forks.
196 as_shell=$as_dir/$as_base
197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 CONFIG_SHELL=$as_shell as_have_required=yes
200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210 CONFIG_SHELL=$SHELL as_have_required=yes
215 if test "x$CONFIG_SHELL" != x; then :
216 # We cannot yet assume a decent shell, so we have to provide a
217 # neutralization value for shells without unset; and this also
218 # works around shells that cannot unset nonexistent variables.
221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
226 if test x$as_have_required = xno; then :
227 $as_echo "$0: This script requires a shell more modern than all"
228 $as_echo "$0: the shells that I found on your system."
229 if test x${ZSH_VERSION+set} = xset ; then
230 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-m4@gnu.org
234 $0: about your system, including any error possibly output
235 $0: before this message. Then install a modern shell, or
236 $0: manually run the script under such a shell if you do
243 SHELL=${CONFIG_SHELL-/bin/sh}
245 # Unset more variables known to interfere with behavior of common tools.
246 CLICOLOR_FORCE= GREP_OPTIONS=
247 unset CLICOLOR_FORCE GREP_OPTIONS
249 ## --------------------- ##
250 ## M4sh Shell Functions. ##
251 ## --------------------- ##
254 # Portably unset VAR.
257 { eval $1=; unset $1;}
261 # as_fn_set_status STATUS
262 # -----------------------
263 # Set $? to STATUS, without forking.
271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281 # Create "$as_dir" as a directory, including parents if necessary.
286 -*) as_dir=./$as_dir;;
288 test -d "$as_dir" || eval $as_mkdir_p || {
292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
295 as_dirs="'$as_qdir' $as_dirs"
296 as_dir=`$as_dirname -- "$as_dir" ||
297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298 X"$as_dir" : 'X\(//\)[^/]' \| \
299 X"$as_dir" : 'X\(//\)$' \| \
300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301 $as_echo X"$as_dir" |
302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
319 test -d "$as_dir" && break
321 test -z "$as_dirs" || eval "mkdir $as_dirs"
322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
326 # as_fn_append VAR VALUE
327 # ----------------------
328 # Append the text in VALUE to the end of the definition contained in VAR. Take
329 # advantage of any shell optimizations that allow amortized linear growth over
330 # repeated appends, instead of the typical quadratic growth present in naive
332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333 eval 'as_fn_append ()
346 # Perform arithmetic evaluation on the ARGs, and store the result in the
347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
348 # must be portable across $(()) and expr.
349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
357 as_val=`expr "$@" || test $? -eq 1`
362 # as_fn_error STATUS ERROR [LINENO LOG_FD]
363 # ----------------------------------------
364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366 # script with STATUS, using 1 if that was 0.
369 as_status=$1; test $as_status -eq 0 && as_status=1
371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
374 $as_echo "$as_me: error: $2" >&2
375 as_fn_exit $as_status
378 if expr a : '\(a\)' >/dev/null 2>&1 &&
379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
397 as_me=`$as_basename -- "$0" ||
398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399 X"$0" : 'X\(//\)$' \| \
400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
402 sed '/^.*\/\([^/][^/]*\)\/*$/{
416 # Avoid depending upon Character Ranges.
417 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420 as_cr_digits='0123456789'
421 as_cr_alnum=$as_cr_Letters$as_cr_digits
424 as_lineno_1=$LINENO as_lineno_1a=$LINENO
425 as_lineno_2=$LINENO as_lineno_2a=$LINENO
426 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
440 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
444 chmod +x "$as_me.lineno" ||
445 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
447 # Don't try to exec as it changes $[0], causing all sort of problems
448 # (the dirname of $[0] is not the place where we might find the
449 # original and so on. Autoconf is especially sensitive to this).
451 # Exit status is that of the last command.
455 ECHO_C= ECHO_N= ECHO_T=
456 case `echo -n x` in #(((((
458 case `echo 'xy\c'` in
459 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
461 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
468 rm -f conf$$ conf$$.exe conf$$.file
469 if test -d conf$$.dir; then
470 rm -f conf$$.dir/conf$$.file
473 mkdir conf$$.dir 2>/dev/null
475 if (echo >conf$$.file) 2>/dev/null; then
476 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 # ... but there are two gotchas:
479 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481 # In both cases, we have to default to `cp -p'.
482 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 elif ln conf$$.file conf$$ 2>/dev/null; then
492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493 rmdir conf$$.dir 2>/dev/null
495 if mkdir -p . 2>/dev/null; then
496 as_mkdir_p='mkdir -p "$as_dir"'
498 test -d ./-p && rmdir ./-p
502 if test -x / >/dev/null 2>&1; then
505 if ls -dL / >/dev/null 2>&1; then
512 if test -d "$1"; then
518 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519 ???[sx]*):;;*)false;;esac;fi
523 as_executable_p=$as_test_x
525 # Sed expression to map a string onto a valid CPP name.
526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
528 # Sed expression to map a string onto a valid variable name.
529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
532 test -n "$DJDIR" || exec 7<&0 </dev/null
536 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537 # so uname gets run too.
538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
543 ac_default_prefix=/usr/local
545 ac_config_libobj_dir=.
552 # Identity of this package.
553 PACKAGE_NAME='GNU M4'
555 PACKAGE_VERSION='1.4.16'
556 PACKAGE_STRING='GNU M4 1.4.16'
557 PACKAGE_BUGREPORT='bug-m4@gnu.org'
558 PACKAGE_URL='http://www.gnu.org/software/m4/'
560 ac_unique_file="src/m4.h"
561 # Factoring default headers for most tests.
562 ac_includes_default="\
564 #ifdef HAVE_SYS_TYPES_H
565 # include <sys/types.h>
567 #ifdef HAVE_SYS_STAT_H
568 # include <sys/stat.h>
574 # ifdef HAVE_STDLIB_H
579 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
584 #ifdef HAVE_STRINGS_H
585 # include <strings.h>
587 #ifdef HAVE_INTTYPES_H
588 # include <inttypes.h>
597 gl_use_threads_default=
600 gl_getopt_required=POSIX
601 gl_getopt_required=POSIX
602 ac_subst_vars='M4tests_LTLIBOBJS
615 POSIX_SPAWN_PORTED_FALSE
616 POSIX_SPAWN_PORTED_TRUE
618 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
639 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
652 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
656 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
658 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
659 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
660 TIME_H_DEFINES_STRUCT_TIMESPEC
661 NEXT_AS_FIRST_DIRECTIVE_TIME_H
670 HAVE_DECL_LOCALTIME_R
676 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
679 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
681 NEXT_AS_FIRST_DIRECTIVE_STRING_H
683 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
685 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
695 HAVE_SIGNED_SIG_ATOMIC_T
698 BITSIZEOF_SIG_ATOMIC_T
704 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
709 HAVE_UNSIGNED_LONG_LONG_INT
711 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
718 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
722 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
724 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
726 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
727 HAVE_STRUCT_SIGACTION_SA_SIGACTION
731 HAVE_POSIX_SIGNALBLOCKING
734 GNULIB_SIGNAL_H_SIGPIPE
736 HAVE_STRUCT_SCHED_PARAM
738 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
741 HAVE_POSIX_SPAWN_FILE_ACTIONS_T
742 HAVE_POSIX_SPAWNATTR_T
744 GNULIB_POSIX_SPAWNATTR_DESTROY
745 GNULIB_POSIX_SPAWNATTR_SETSIGMASK
746 GNULIB_POSIX_SPAWNATTR_GETSIGMASK
747 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
748 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
749 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
750 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
751 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
752 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
753 GNULIB_POSIX_SPAWNATTR_SETPGROUP
754 GNULIB_POSIX_SPAWNATTR_GETPGROUP
755 GNULIB_POSIX_SPAWNATTR_SETFLAGS
756 GNULIB_POSIX_SPAWNATTR_GETFLAGS
757 GNULIB_POSIX_SPAWNATTR_INIT
758 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
759 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
760 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
761 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
762 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
765 APPLE_UNIVERSAL_BUILD
837 NEXT_AS_FIRST_DIRECTIVE_MATH_H
878 LOCALCHARSET_TESTS_ENVIRONMENT
880 HAVE_LANGINFO_YESEXPR
882 HAVE_LANGINFO_T_FMT_AMPM
883 HAVE_LANGINFO_CODESET
885 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
890 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
901 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
906 REPLACE_SIGNBIT_USING_GCC
992 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
994 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1011 REPLACE_STDIO_WRITE_FUNCS
1020 REPLACE_OBSTACK_PRINTF
1042 HAVE_DECL_OBSTACK_PRINTF
1048 GNULIB_VSPRINTF_POSIX
1050 GNULIB_VPRINTF_POSIX
1052 GNULIB_VFPRINTF_POSIX
1057 GNULIB_STDIO_H_SIGPIPE
1058 GNULIB_SPRINTF_POSIX
1070 GNULIB_OBSTACK_PRINTF_POSIX
1071 GNULIB_OBSTACK_PRINTF
1083 GNULIB_FPRINTF_POSIX
1096 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1099 PRAGMA_SYSTEM_HEADER
1100 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1104 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1105 UNISTD_H_HAVE_WINSOCK2_H
1124 REPLACE_GETDOMAINNAME
1134 HAVE_DECL_GETUSERSHELL
1135 HAVE_DECL_GETPAGESIZE
1136 HAVE_DECL_GETLOGIN_R
1137 HAVE_DECL_GETDOMAINNAME
1172 GNULIB_UNISTD_H_SIGPIPE
1173 GNULIB_UNISTD_H_GETOPT
1195 GNULIB_GETDTABLESIZE
1196 GNULIB_GETDOMAINNAME
1219 REPLACE_CANONICALIZE_FILE_NAME
1224 HAVE_STRUCT_RANDOM_DATA
1242 HAVE_DECL_GETLOADAVG
1243 HAVE_CANONICALIZE_FILE_NAME
1256 GNULIB_REALLOC_POSIX
1270 GNULIB_CANONICALIZE_FILE_NAME
1374 GL_COND_LIBTOOL_FALSE
1375 GL_COND_LIBTOOL_TRUE
1407 AM_DEFAULT_VERBOSITY
1416 INSTALL_STRIP_PROGRAM
1458 program_transform_name
1471 enable_option_checking
1473 enable_dependency_tracking
1479 with_libsigsegv_prefix
1484 with_packager_version
1485 with_packager_bug_reports
1491 ac_precious_vars='build_alias
1504 # Initialize some variables set by options.
1506 ac_init_version=false
1507 ac_unrecognized_opts=
1508 ac_unrecognized_sep=
1509 # The variables have the same names as the options, with
1510 # dashes changed to underlines.
1511 cache_file=/dev/null
1518 program_transform_name=s,x,x,
1526 # Installation directory options.
1527 # These are left unexpanded so users can "make install exec_prefix=/foo"
1528 # and all the variables that are supposed to be based on exec_prefix
1529 # by default will actually change.
1530 # Use braces instead of parens because sh, perl, etc. also accept them.
1531 # (The list follows the same order as the GNU Coding Standards.)
1532 bindir='${exec_prefix}/bin'
1533 sbindir='${exec_prefix}/sbin'
1534 libexecdir='${exec_prefix}/libexec'
1535 datarootdir='${prefix}/share'
1536 datadir='${datarootdir}'
1537 sysconfdir='${prefix}/etc'
1538 sharedstatedir='${prefix}/com'
1539 localstatedir='${prefix}/var'
1540 includedir='${prefix}/include'
1541 oldincludedir='/usr/include'
1542 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1543 infodir='${datarootdir}/info'
1548 libdir='${exec_prefix}/lib'
1549 localedir='${datarootdir}/locale'
1550 mandir='${datarootdir}/man'
1556 # If the previous option needs an argument, assign it.
1557 if test -n "$ac_prev"; then
1558 eval $ac_prev=\$ac_option
1564 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1568 # Accept the important Cygnus configure options, so we can diagnose typos.
1570 case $ac_dashdash$ac_option in
1574 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1576 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1577 bindir=$ac_optarg ;;
1579 -build | --build | --buil | --bui | --bu)
1580 ac_prev=build_alias ;;
1581 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1582 build_alias=$ac_optarg ;;
1584 -cache-file | --cache-file | --cache-fil | --cache-fi \
1585 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1586 ac_prev=cache_file ;;
1587 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1588 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1589 cache_file=$ac_optarg ;;
1591 --config-cache | -C)
1592 cache_file=config.cache ;;
1594 -datadir | --datadir | --datadi | --datad)
1596 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1597 datadir=$ac_optarg ;;
1599 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1600 | --dataroo | --dataro | --datar)
1601 ac_prev=datarootdir ;;
1602 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1603 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1604 datarootdir=$ac_optarg ;;
1606 -disable-* | --disable-*)
1607 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1608 # Reject names that are not valid shell variable names.
1609 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1610 as_fn_error $? "invalid feature name: $ac_useropt"
1611 ac_useropt_orig=$ac_useropt
1612 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1613 case $ac_user_opts in
1615 "enable_$ac_useropt"
1617 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1618 ac_unrecognized_sep=', ';;
1620 eval enable_$ac_useropt=no ;;
1622 -docdir | --docdir | --docdi | --doc | --do)
1624 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1625 docdir=$ac_optarg ;;
1627 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1629 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1630 dvidir=$ac_optarg ;;
1632 -enable-* | --enable-*)
1633 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1634 # Reject names that are not valid shell variable names.
1635 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1636 as_fn_error $? "invalid feature name: $ac_useropt"
1637 ac_useropt_orig=$ac_useropt
1638 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1639 case $ac_user_opts in
1641 "enable_$ac_useropt"
1643 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1644 ac_unrecognized_sep=', ';;
1646 eval enable_$ac_useropt=\$ac_optarg ;;
1648 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1649 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1650 | --exec | --exe | --ex)
1651 ac_prev=exec_prefix ;;
1652 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1653 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1654 | --exec=* | --exe=* | --ex=*)
1655 exec_prefix=$ac_optarg ;;
1657 -gas | --gas | --ga | --g)
1658 # Obsolete; use --with-gas.
1661 -help | --help | --hel | --he | -h)
1662 ac_init_help=long ;;
1663 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1664 ac_init_help=recursive ;;
1665 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1666 ac_init_help=short ;;
1668 -host | --host | --hos | --ho)
1669 ac_prev=host_alias ;;
1670 -host=* | --host=* | --hos=* | --ho=*)
1671 host_alias=$ac_optarg ;;
1673 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1675 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1677 htmldir=$ac_optarg ;;
1679 -includedir | --includedir | --includedi | --included | --include \
1680 | --includ | --inclu | --incl | --inc)
1681 ac_prev=includedir ;;
1682 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1683 | --includ=* | --inclu=* | --incl=* | --inc=*)
1684 includedir=$ac_optarg ;;
1686 -infodir | --infodir | --infodi | --infod | --info | --inf)
1688 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1689 infodir=$ac_optarg ;;
1691 -libdir | --libdir | --libdi | --libd)
1693 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1694 libdir=$ac_optarg ;;
1696 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1697 | --libexe | --libex | --libe)
1698 ac_prev=libexecdir ;;
1699 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1700 | --libexe=* | --libex=* | --libe=*)
1701 libexecdir=$ac_optarg ;;
1703 -localedir | --localedir | --localedi | --localed | --locale)
1704 ac_prev=localedir ;;
1705 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1706 localedir=$ac_optarg ;;
1708 -localstatedir | --localstatedir | --localstatedi | --localstated \
1709 | --localstate | --localstat | --localsta | --localst | --locals)
1710 ac_prev=localstatedir ;;
1711 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1712 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1713 localstatedir=$ac_optarg ;;
1715 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1717 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1718 mandir=$ac_optarg ;;
1720 -nfp | --nfp | --nf)
1721 # Obsolete; use --without-fp.
1724 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1725 | --no-cr | --no-c | -n)
1728 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1729 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1732 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1733 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1734 | --oldin | --oldi | --old | --ol | --o)
1735 ac_prev=oldincludedir ;;
1736 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1737 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1738 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1739 oldincludedir=$ac_optarg ;;
1741 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1743 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1744 prefix=$ac_optarg ;;
1746 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1747 | --program-pre | --program-pr | --program-p)
1748 ac_prev=program_prefix ;;
1749 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1750 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1751 program_prefix=$ac_optarg ;;
1753 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1754 | --program-suf | --program-su | --program-s)
1755 ac_prev=program_suffix ;;
1756 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1757 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1758 program_suffix=$ac_optarg ;;
1760 -program-transform-name | --program-transform-name \
1761 | --program-transform-nam | --program-transform-na \
1762 | --program-transform-n | --program-transform- \
1763 | --program-transform | --program-transfor \
1764 | --program-transfo | --program-transf \
1765 | --program-trans | --program-tran \
1766 | --progr-tra | --program-tr | --program-t)
1767 ac_prev=program_transform_name ;;
1768 -program-transform-name=* | --program-transform-name=* \
1769 | --program-transform-nam=* | --program-transform-na=* \
1770 | --program-transform-n=* | --program-transform-=* \
1771 | --program-transform=* | --program-transfor=* \
1772 | --program-transfo=* | --program-transf=* \
1773 | --program-trans=* | --program-tran=* \
1774 | --progr-tra=* | --program-tr=* | --program-t=*)
1775 program_transform_name=$ac_optarg ;;
1777 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1779 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1780 pdfdir=$ac_optarg ;;
1782 -psdir | --psdir | --psdi | --psd | --ps)
1784 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1787 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1788 | -silent | --silent | --silen | --sile | --sil)
1791 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1793 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1795 sbindir=$ac_optarg ;;
1797 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1798 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1799 | --sharedst | --shareds | --shared | --share | --shar \
1801 ac_prev=sharedstatedir ;;
1802 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1803 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1804 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1806 sharedstatedir=$ac_optarg ;;
1808 -site | --site | --sit)
1810 -site=* | --site=* | --sit=*)
1813 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1815 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1816 srcdir=$ac_optarg ;;
1818 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1819 | --syscon | --sysco | --sysc | --sys | --sy)
1820 ac_prev=sysconfdir ;;
1821 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1822 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1823 sysconfdir=$ac_optarg ;;
1825 -target | --target | --targe | --targ | --tar | --ta | --t)
1826 ac_prev=target_alias ;;
1827 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1828 target_alias=$ac_optarg ;;
1830 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1833 -version | --version | --versio | --versi | --vers | -V)
1834 ac_init_version=: ;;
1837 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1838 # Reject names that are not valid shell variable names.
1839 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1840 as_fn_error $? "invalid package name: $ac_useropt"
1841 ac_useropt_orig=$ac_useropt
1842 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1843 case $ac_user_opts in
1847 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1848 ac_unrecognized_sep=', ';;
1850 eval with_$ac_useropt=\$ac_optarg ;;
1852 -without-* | --without-*)
1853 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1854 # Reject names that are not valid shell variable names.
1855 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1856 as_fn_error $? "invalid package name: $ac_useropt"
1857 ac_useropt_orig=$ac_useropt
1858 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1859 case $ac_user_opts in
1863 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1864 ac_unrecognized_sep=', ';;
1866 eval with_$ac_useropt=no ;;
1869 # Obsolete; use --with-x.
1872 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1873 | --x-incl | --x-inc | --x-in | --x-i)
1874 ac_prev=x_includes ;;
1875 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1876 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1877 x_includes=$ac_optarg ;;
1879 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1880 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1881 ac_prev=x_libraries ;;
1882 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1883 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1884 x_libraries=$ac_optarg ;;
1886 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1887 Try \`$0 --help' for more information"
1891 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1892 # Reject names that are not valid shell variable names.
1893 case $ac_envvar in #(
1894 '' | [0-9]* | *[!_$as_cr_alnum]* )
1895 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1897 eval $ac_envvar=\$ac_optarg
1898 export $ac_envvar ;;
1901 # FIXME: should be removed in autoconf 3.0.
1902 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1903 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1904 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1905 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1911 if test -n "$ac_prev"; then
1912 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1913 as_fn_error $? "missing argument to $ac_option"
1916 if test -n "$ac_unrecognized_opts"; then
1917 case $enable_option_checking in
1919 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1920 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1924 # Check all directory arguments for consistency.
1925 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1926 datadir sysconfdir sharedstatedir localstatedir includedir \
1927 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1928 libdir localedir mandir
1930 eval ac_val=\$$ac_var
1931 # Remove trailing slashes.
1934 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1935 eval $ac_var=\$ac_val;;
1937 # Be sure to have absolute directory names.
1939 [\\/$]* | ?:[\\/]* ) continue;;
1940 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1942 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1945 # There might be people who depend on the old broken behavior: `$host'
1946 # used to hold the argument of --host etc.
1947 # FIXME: To remove some day.
1950 target=$target_alias
1952 # FIXME: To remove some day.
1953 if test "x$host_alias" != x; then
1954 if test "x$build_alias" = x; then
1955 cross_compiling=maybe
1956 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1957 If a cross compiler is detected then cross compile mode will be used" >&2
1958 elif test "x$build_alias" != "x$host_alias"; then
1964 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1966 test "$silent" = yes && exec 6>/dev/null
1969 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1970 ac_ls_di=`ls -di .` &&
1971 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1972 as_fn_error $? "working directory cannot be determined"
1973 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1974 as_fn_error $? "pwd does not report name of working directory"
1977 # Find the source files, if location was not specified.
1978 if test -z "$srcdir"; then
1979 ac_srcdir_defaulted=yes
1980 # Try the directory containing this script, then the parent directory.
1981 ac_confdir=`$as_dirname -- "$as_myself" ||
1982 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1983 X"$as_myself" : 'X\(//\)[^/]' \| \
1984 X"$as_myself" : 'X\(//\)$' \| \
1985 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1986 $as_echo X"$as_myself" |
1987 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2005 if test ! -r "$srcdir/$ac_unique_file"; then
2009 ac_srcdir_defaulted=no
2011 if test ! -r "$srcdir/$ac_unique_file"; then
2012 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2013 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2015 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2017 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2019 # When building in place, set srcdir=.
2020 if test "$ac_abs_confdir" = "$ac_pwd"; then
2023 # Remove unnecessary trailing slashes from srcdir.
2024 # Double slashes in file names in object file debugging info
2025 # mess up M-x gdb in Emacs.
2027 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2029 for ac_var in $ac_precious_vars; do
2030 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2031 eval ac_env_${ac_var}_value=\$${ac_var}
2032 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2033 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2037 # Report the --help message.
2039 if test "$ac_init_help" = "long"; then
2040 # Omit some internal or obsolete options to make the list less imposing.
2041 # This message is too long to be a string in the A/UX 3.1 sh.
2043 \`configure' configures GNU M4 1.4.16 to adapt to many kinds of systems.
2045 Usage: $0 [OPTION]... [VAR=VALUE]...
2047 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2048 VAR=VALUE. See below for descriptions of some of the useful variables.
2050 Defaults for the options are specified in brackets.
2053 -h, --help display this help and exit
2054 --help=short display options specific to this package
2055 --help=recursive display the short help of all the included packages
2056 -V, --version display version information and exit
2057 -q, --quiet, --silent do not print \`checking ...' messages
2058 --cache-file=FILE cache test results in FILE [disabled]
2059 -C, --config-cache alias for \`--cache-file=config.cache'
2060 -n, --no-create do not create output files
2061 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2063 Installation directories:
2064 --prefix=PREFIX install architecture-independent files in PREFIX
2065 [$ac_default_prefix]
2066 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2069 By default, \`make install' will install all the files in
2070 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2071 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2072 for instance \`--prefix=\$HOME'.
2074 For better control, use the options below.
2076 Fine tuning of the installation directories:
2077 --bindir=DIR user executables [EPREFIX/bin]
2078 --sbindir=DIR system admin executables [EPREFIX/sbin]
2079 --libexecdir=DIR program executables [EPREFIX/libexec]
2080 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2081 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2082 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2083 --libdir=DIR object code libraries [EPREFIX/lib]
2084 --includedir=DIR C header files [PREFIX/include]
2085 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2086 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2087 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2088 --infodir=DIR info documentation [DATAROOTDIR/info]
2089 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2090 --mandir=DIR man documentation [DATAROOTDIR/man]
2091 --docdir=DIR documentation root [DATAROOTDIR/doc/m4]
2092 --htmldir=DIR html documentation [DOCDIR]
2093 --dvidir=DIR dvi documentation [DOCDIR]
2094 --pdfdir=DIR pdf documentation [DOCDIR]
2095 --psdir=DIR ps documentation [DOCDIR]
2101 --program-prefix=PREFIX prepend PREFIX to installed program names
2102 --program-suffix=SUFFIX append SUFFIX to installed program names
2103 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2106 --build=BUILD configure for building on BUILD [guessed]
2107 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2111 if test -n "$ac_init_help"; then
2112 case $ac_init_help in
2113 short | recursive ) echo "Configuration of GNU M4 1.4.16:";;
2118 --disable-option-checking ignore unrecognized --enable/--with options
2119 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2120 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2121 --enable-silent-rules less verbose build output (undo: `make V=1')
2122 --disable-silent-rules verbose build output (undo: `make V=0')
2123 --disable-dependency-tracking speeds up one-time build
2124 --enable-dependency-tracking do not reject slow dependency extractors
2125 --enable-threads={posix|solaris|pth|win32}
2126 specify multithreading API
2127 --disable-threads build without multithread safety
2128 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
2129 --disable-assert turn off assertions
2130 --disable-rpath do not hardcode runtime library paths
2131 --disable-largefile omit support for large files
2132 --enable-c++ also build C++ sources
2133 --enable-changeword enable -W and changeword() builtin
2136 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2137 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2138 --with-gnu-ld assume the C compiler uses GNU ld default=no
2139 --with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib
2140 --without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir
2141 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2142 --without-libpth-prefix don't search for libpth in includedir and libdir
2143 --without-included-regex
2144 don't compile regex; this is the default on systems
2145 with recent-enough versions of the GNU C Library
2146 (use with caution on other systems).
2147 --with-packager String identifying the packager of this software
2148 --with-packager-version Packager-specific version information
2149 --with-packager-bug-reports
2150 Packager info for bug reports (URL/e-mail/...)
2151 --with-syscmd-shell shell used by syscmd [/bin/sh]
2152 --with-dmalloc use dmalloc, as in dmalloc.tar.gz from
2153 @/ftp.antaire.com:antaire/src/dmalloc.
2155 Some influential environment variables:
2156 CC C compiler command
2157 CFLAGS C compiler flags
2158 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2159 nonstandard directory <lib dir>
2160 LIBS libraries to pass to the linker, e.g. -l<library>
2161 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2162 you have headers in a nonstandard directory <include dir>
2164 CXX C++ compiler command
2165 CXXFLAGS C++ compiler flags
2167 Use these variables to override the choices made by `configure' or to help
2168 it to find libraries and programs with nonstandard names/locations.
2170 Report bugs to <bug-m4@gnu.org>.
2171 GNU M4 home page: <http://www.gnu.org/software/m4/>.
2172 General help using GNU software: <http://www.gnu.org/gethelp/>.
2177 if test "$ac_init_help" = "recursive"; then
2178 # If there are subdirs, report their specific --help.
2179 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2180 test -d "$ac_dir" ||
2181 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2186 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2188 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2189 # A ".." for each directory in $ac_dir_suffix.
2190 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2191 case $ac_top_builddir_sub in
2192 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2193 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2196 ac_abs_top_builddir=$ac_pwd
2197 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2198 # for backward compatibility:
2199 ac_top_builddir=$ac_top_build_prefix
2202 .) # We are building in place.
2204 ac_top_srcdir=$ac_top_builddir_sub
2205 ac_abs_top_srcdir=$ac_pwd ;;
2206 [\\/]* | ?:[\\/]* ) # Absolute name.
2207 ac_srcdir=$srcdir$ac_dir_suffix;
2208 ac_top_srcdir=$srcdir
2209 ac_abs_top_srcdir=$srcdir ;;
2211 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2212 ac_top_srcdir=$ac_top_build_prefix$srcdir
2213 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2215 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2217 cd "$ac_dir" || { ac_status=$?; continue; }
2218 # Check for guested configure.
2219 if test -f "$ac_srcdir/configure.gnu"; then
2221 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2222 elif test -f "$ac_srcdir/configure"; then
2224 $SHELL "$ac_srcdir/configure" --help=recursive
2226 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2228 cd "$ac_pwd" || { ac_status=$?; break; }
2232 test -n "$ac_init_help" && exit $ac_status
2233 if $ac_init_version; then
2235 GNU M4 configure 1.4.16
2236 generated by GNU Autoconf 2.66
2238 Copyright (C) 2010 Free Software Foundation, Inc.
2239 This configure script is free software; the Free Software Foundation
2240 gives unlimited permission to copy, distribute and modify it.
2245 ## ------------------------ ##
2246 ## Autoconf initialization. ##
2247 ## ------------------------ ##
2249 # ac_fn_c_try_compile LINENO
2250 # --------------------------
2251 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2252 ac_fn_c_try_compile ()
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 rm -f conftest.$ac_objext
2256 if { { ac_try="$ac_compile"
2258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2259 *) ac_try_echo=$ac_try;;
2261 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2262 $as_echo "$ac_try_echo"; } >&5
2263 (eval "$ac_compile") 2>conftest.err
2265 if test -s conftest.err; then
2266 grep -v '^ *+' conftest.err >conftest.er1
2267 cat conftest.er1 >&5
2268 mv -f conftest.er1 conftest.err
2270 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2271 test $ac_status = 0; } && {
2272 test -z "$ac_c_werror_flag" ||
2273 test ! -s conftest.err
2274 } && test -s conftest.$ac_objext; then :
2277 $as_echo "$as_me: failed program was:" >&5
2278 sed 's/^/| /' conftest.$ac_ext >&5
2282 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2283 as_fn_set_status $ac_retval
2285 } # ac_fn_c_try_compile
2287 # ac_fn_c_try_cpp LINENO
2288 # ----------------------
2289 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2292 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2293 if { { ac_try="$ac_cpp conftest.$ac_ext"
2295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2296 *) ac_try_echo=$ac_try;;
2298 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2299 $as_echo "$ac_try_echo"; } >&5
2300 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2302 if test -s conftest.err; then
2303 grep -v '^ *+' conftest.err >conftest.er1
2304 cat conftest.er1 >&5
2305 mv -f conftest.er1 conftest.err
2307 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2308 test $ac_status = 0; } >/dev/null && {
2309 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2310 test ! -s conftest.err
2314 $as_echo "$as_me: failed program was:" >&5
2315 sed 's/^/| /' conftest.$ac_ext >&5
2319 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2320 as_fn_set_status $ac_retval
2324 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2325 # -------------------------------------------------------
2326 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2327 # the include files in INCLUDES and setting the cache variable VAR
2329 ac_fn_c_check_header_mongrel ()
2331 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332 if eval "test \"\${$3+set}\"" = set; then :
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2334 $as_echo_n "checking for $2... " >&6; }
2335 if eval "test \"\${$3+set}\"" = set; then :
2336 $as_echo_n "(cached) " >&6
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340 $as_echo "$ac_res" >&6; }
2342 # Is the header compilable?
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2344 $as_echo_n "checking $2 usability... " >&6; }
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346 /* end confdefs.h. */
2350 if ac_fn_c_try_compile "$LINENO"; then :
2351 ac_header_compiler=yes
2353 ac_header_compiler=no
2355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2357 $as_echo "$ac_header_compiler" >&6; }
2359 # Is the header present?
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2361 $as_echo_n "checking $2 presence... " >&6; }
2362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363 /* end confdefs.h. */
2366 if ac_fn_c_try_cpp "$LINENO"; then :
2367 ac_header_preproc=yes
2369 ac_header_preproc=no
2371 rm -f conftest.err conftest.$ac_ext
2372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2373 $as_echo "$ac_header_preproc" >&6; }
2375 # So? What about this header?
2376 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2379 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2381 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2385 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2387 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2389 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2390 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2391 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2393 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2394 ( $as_echo "## ----------------------------- ##
2395 ## Report this to bug-m4@gnu.org ##
2396 ## ----------------------------- ##"
2397 ) | sed "s/^/$as_me: WARNING: /" >&2
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2401 $as_echo_n "checking for $2... " >&6; }
2402 if eval "test \"\${$3+set}\"" = set; then :
2403 $as_echo_n "(cached) " >&6
2405 eval "$3=\$ac_header_compiler"
2408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2409 $as_echo "$ac_res" >&6; }
2411 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2413 } # ac_fn_c_check_header_mongrel
2415 # ac_fn_c_try_run LINENO
2416 # ----------------------
2417 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2418 # that executables *can* be run.
2421 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422 if { { ac_try="$ac_link"
2424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2425 *) ac_try_echo=$ac_try;;
2427 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2428 $as_echo "$ac_try_echo"; } >&5
2429 (eval "$ac_link") 2>&5
2431 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2432 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2433 { { case "(($ac_try" in
2434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435 *) ac_try_echo=$ac_try;;
2437 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438 $as_echo "$ac_try_echo"; } >&5
2439 (eval "$ac_try") 2>&5
2441 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442 test $ac_status = 0; }; }; then :
2445 $as_echo "$as_me: program exited with status $ac_status" >&5
2446 $as_echo "$as_me: failed program was:" >&5
2447 sed 's/^/| /' conftest.$ac_ext >&5
2449 ac_retval=$ac_status
2451 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2452 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2453 as_fn_set_status $ac_retval
2457 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2458 # -------------------------------------------------------
2459 # Tests whether HEADER exists and can be compiled using the include files in
2460 # INCLUDES, setting the cache variable VAR accordingly.
2461 ac_fn_c_check_header_compile ()
2463 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2465 $as_echo_n "checking for $2... " >&6; }
2466 if eval "test \"\${$3+set}\"" = set; then :
2467 $as_echo_n "(cached) " >&6
2469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2470 /* end confdefs.h. */
2474 if ac_fn_c_try_compile "$LINENO"; then :
2479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2483 $as_echo "$ac_res" >&6; }
2484 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2486 } # ac_fn_c_check_header_compile
2488 # ac_fn_c_try_link LINENO
2489 # -----------------------
2490 # Try to link conftest.$ac_ext, and return whether this succeeded.
2493 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494 rm -f conftest.$ac_objext conftest$ac_exeext
2495 if { { ac_try="$ac_link"
2497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498 *) ac_try_echo=$ac_try;;
2500 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501 $as_echo "$ac_try_echo"; } >&5
2502 (eval "$ac_link") 2>conftest.err
2504 if test -s conftest.err; then
2505 grep -v '^ *+' conftest.err >conftest.er1
2506 cat conftest.er1 >&5
2507 mv -f conftest.er1 conftest.err
2509 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2510 test $ac_status = 0; } && {
2511 test -z "$ac_c_werror_flag" ||
2512 test ! -s conftest.err
2513 } && test -s conftest$ac_exeext && {
2514 test "$cross_compiling" = yes ||
2515 $as_test_x conftest$ac_exeext
2519 $as_echo "$as_me: failed program was:" >&5
2520 sed 's/^/| /' conftest.$ac_ext >&5
2524 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2525 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2526 # interfere with the next link command; also delete a directory that is
2527 # left behind by Apple's compiler. We do this before executing the actions.
2528 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2529 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2530 as_fn_set_status $ac_retval
2532 } # ac_fn_c_try_link
2534 # ac_fn_c_check_func LINENO FUNC VAR
2535 # ----------------------------------
2536 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2537 ac_fn_c_check_func ()
2539 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2541 $as_echo_n "checking for $2... " >&6; }
2542 if eval "test \"\${$3+set}\"" = set; then :
2543 $as_echo_n "(cached) " >&6
2545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2546 /* end confdefs.h. */
2547 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2548 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2549 #define $2 innocuous_$2
2551 /* System header to define __stub macros and hopefully few prototypes,
2552 which can conflict with char $2 (); below.
2553 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2554 <limits.h> exists even on freestanding compilers. */
2557 # include <limits.h>
2559 # include <assert.h>
2564 /* Override any GCC internal prototype to avoid an error.
2565 Use char because int might match the return type of a GCC
2566 builtin and then its argument prototype would still apply. */
2571 /* The GNU C library defines this for functions which it implements
2572 to always fail with ENOSYS. Some functions are actually named
2573 something starting with __ and the normal name is an alias. */
2574 #if defined __stub_$2 || defined __stub___$2
2586 if ac_fn_c_try_link "$LINENO"; then :
2591 rm -f core conftest.err conftest.$ac_objext \
2592 conftest$ac_exeext conftest.$ac_ext
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2596 $as_echo "$ac_res" >&6; }
2597 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2599 } # ac_fn_c_check_func
2601 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2602 # ---------------------------------------------
2603 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2605 ac_fn_c_check_decl ()
2607 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2608 as_decl_name=`echo $2|sed 's/ *(.*//'`
2609 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2611 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2612 if eval "test \"\${$3+set}\"" = set; then :
2613 $as_echo_n "(cached) " >&6
2615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2616 /* end confdefs.h. */
2621 #ifndef $as_decl_name
2623 (void) $as_decl_use;
2625 (void) $as_decl_name;
2633 if ac_fn_c_try_compile "$LINENO"; then :
2638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2642 $as_echo "$ac_res" >&6; }
2643 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2645 } # ac_fn_c_check_decl
2647 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2648 # -------------------------------------------
2649 # Tests whether TYPE exists after having included INCLUDES, setting cache
2650 # variable VAR accordingly.
2651 ac_fn_c_check_type ()
2653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2655 $as_echo_n "checking for $2... " >&6; }
2656 if eval "test \"\${$3+set}\"" = set; then :
2657 $as_echo_n "(cached) " >&6
2660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2661 /* end confdefs.h. */
2672 if ac_fn_c_try_compile "$LINENO"; then :
2673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2674 /* end confdefs.h. */
2685 if ac_fn_c_try_compile "$LINENO"; then :
2690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2696 $as_echo "$ac_res" >&6; }
2697 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2699 } # ac_fn_c_check_type
2701 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2702 # --------------------------------------------
2703 # Tries to find the compile-time value of EXPR in a program that includes
2704 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2706 ac_fn_c_compute_int ()
2708 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2709 if test "$cross_compiling" = yes; then
2710 # Depending upon the size, compute the lo and hi bounds.
2711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2712 /* end confdefs.h. */
2717 static int test_array [1 - 2 * !(($2) >= 0)];
2724 if ac_fn_c_try_compile "$LINENO"; then :
2727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2728 /* end confdefs.h. */
2733 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2740 if ac_fn_c_try_compile "$LINENO"; then :
2741 ac_hi=$ac_mid; break
2743 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2744 if test $ac_lo -le $ac_mid; then
2748 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754 /* end confdefs.h. */
2759 static int test_array [1 - 2 * !(($2) < 0)];
2766 if ac_fn_c_try_compile "$LINENO"; then :
2769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770 /* end confdefs.h. */
2775 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2782 if ac_fn_c_try_compile "$LINENO"; then :
2783 ac_lo=$ac_mid; break
2785 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2786 if test $ac_mid -le $ac_hi; then
2790 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2800 # Binary search between lo and hi bounds.
2801 while test "x$ac_lo" != "x$ac_hi"; do
2802 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804 /* end confdefs.h. */
2809 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2816 if ac_fn_c_try_compile "$LINENO"; then :
2819 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2824 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2829 /* end confdefs.h. */
2831 static long int longval () { return $2; }
2832 static unsigned long int ulongval () { return $2; }
2839 FILE *f = fopen ("conftest.val", "w");
2844 long int i = longval ();
2847 fprintf (f, "%ld", i);
2851 unsigned long int i = ulongval ();
2854 fprintf (f, "%lu", i);
2856 /* Do not output a trailing newline, as this causes \r\n confusion
2857 on some platforms. */
2858 return ferror (f) || fclose (f) != 0;
2864 if ac_fn_c_try_run "$LINENO"; then :
2865 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2870 conftest.$ac_objext conftest.beam conftest.$ac_ext
2874 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2875 as_fn_set_status $ac_retval
2877 } # ac_fn_c_compute_int
2879 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2880 # ----------------------------------------------------
2881 # Tries to find if the field MEMBER exists in type AGGR, after including
2882 # INCLUDES, setting cache variable VAR accordingly.
2883 ac_fn_c_check_member ()
2885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2887 $as_echo_n "checking for $2.$3... " >&6; }
2888 if eval "test \"\${$4+set}\"" = set; then :
2889 $as_echo_n "(cached) " >&6
2891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892 /* end confdefs.h. */
2904 if ac_fn_c_try_compile "$LINENO"; then :
2907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2908 /* end confdefs.h. */
2914 if (sizeof ac_aggr.$3)
2920 if ac_fn_c_try_compile "$LINENO"; then :
2925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2931 $as_echo "$ac_res" >&6; }
2932 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2934 } # ac_fn_c_check_member
2935 cat >config.log <<_ACEOF
2936 This file contains any messages produced by compilers while
2937 running configure, to aid debugging if configure makes a mistake.
2939 It was created by GNU M4 $as_me 1.4.16, which was
2940 generated by GNU Autoconf 2.66. Invocation command line was
2952 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2953 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2954 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2955 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2956 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2958 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2959 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2961 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2962 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2963 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2964 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2965 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2966 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2967 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2975 test -z "$as_dir" && as_dir=.
2976 $as_echo "PATH: $as_dir"
2992 # Keep a trace of the command line.
2993 # Strip out --no-create and --no-recursion so they do not pile up.
2994 # Strip out --silent because we don't want to record it for future runs.
2995 # Also quote any args containing shell meta-characters.
2996 # Make two passes to allow for proper duplicate-argument suppression.
3000 ac_must_keep_next=false
3006 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3007 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3008 | -silent | --silent | --silen | --sile | --sil)
3011 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3014 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3016 as_fn_append ac_configure_args1 " '$ac_arg'"
3017 if test $ac_must_keep_next = true; then
3018 ac_must_keep_next=false # Got value, back to normal.
3021 *=* | --config-cache | -C | -disable-* | --disable-* \
3022 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3023 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3024 | -with-* | --with-* | -without-* | --without-* | --x)
3025 case "$ac_configure_args0 " in
3026 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3029 -* ) ac_must_keep_next=true ;;
3032 as_fn_append ac_configure_args " '$ac_arg'"
3037 { ac_configure_args0=; unset ac_configure_args0;}
3038 { ac_configure_args1=; unset ac_configure_args1;}
3040 # When interrupted or exit'd, cleanup temporary files, and complete
3041 # config.log. We remove comments because anyway the quotes in there
3042 # would cause problems or look ugly.
3043 # WARNING: Use '\'' to represent an apostrophe within the trap.
3044 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3045 trap 'exit_status=$?
3046 # Save into config.log some information that might help in debugging.
3050 $as_echo "## ---------------- ##
3051 ## Cache variables. ##
3052 ## ---------------- ##"
3054 # The following way of writing the cache mishandles newlines in values,
3056 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3057 eval ac_val=\$$ac_var
3061 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3062 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3065 _ | IFS | as_nl) ;; #(
3066 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3067 *) { eval $ac_var=; unset $ac_var;} ;;
3072 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3073 *${as_nl}ac_space=\ *)
3075 "s/'\''/'\''\\\\'\'''\''/g;
3076 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3079 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3086 $as_echo "## ----------------- ##
3087 ## Output variables. ##
3088 ## ----------------- ##"
3090 for ac_var in $ac_subst_vars
3092 eval ac_val=\$$ac_var
3094 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3096 $as_echo "$ac_var='\''$ac_val'\''"
3100 if test -n "$ac_subst_files"; then
3101 $as_echo "## ------------------- ##
3102 ## File substitutions. ##
3103 ## ------------------- ##"
3105 for ac_var in $ac_subst_files
3107 eval ac_val=\$$ac_var
3109 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3111 $as_echo "$ac_var='\''$ac_val'\''"
3116 if test -s confdefs.h; then
3117 $as_echo "## ----------- ##
3124 test "$ac_signal" != 0 &&
3125 $as_echo "$as_me: caught signal $ac_signal"
3126 $as_echo "$as_me: exit $exit_status"
3128 rm -f core *.core core.conftest.* &&
3129 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3132 for ac_signal in 1 2 13 15; do
3133 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3137 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3138 rm -f -r conftest* confdefs.h
3140 $as_echo "/* confdefs.h */" > confdefs.h
3142 # Predefined preprocessor variables.
3144 cat >>confdefs.h <<_ACEOF
3145 #define PACKAGE_NAME "$PACKAGE_NAME"
3148 cat >>confdefs.h <<_ACEOF
3149 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3152 cat >>confdefs.h <<_ACEOF
3153 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3156 cat >>confdefs.h <<_ACEOF
3157 #define PACKAGE_STRING "$PACKAGE_STRING"
3160 cat >>confdefs.h <<_ACEOF
3161 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3164 cat >>confdefs.h <<_ACEOF
3165 #define PACKAGE_URL "$PACKAGE_URL"
3169 # Let the site file select an alternate cache file if it wants to.
3170 # Prefer an explicitly selected file to automatically selected ones.
3173 if test -n "$CONFIG_SITE"; then
3174 # We do not want a PATH search for config.site.
3175 case $CONFIG_SITE in #((
3176 -*) ac_site_file1=./$CONFIG_SITE;;
3177 */*) ac_site_file1=$CONFIG_SITE;;
3178 *) ac_site_file1=./$CONFIG_SITE;;
3180 elif test "x$prefix" != xNONE; then
3181 ac_site_file1=$prefix/share/config.site
3182 ac_site_file2=$prefix/etc/config.site
3184 ac_site_file1=$ac_default_prefix/share/config.site
3185 ac_site_file2=$ac_default_prefix/etc/config.site
3187 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3189 test "x$ac_site_file" = xNONE && continue
3190 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3191 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3192 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3193 sed 's/^/| /' "$ac_site_file" >&5
3195 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3196 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3197 as_fn_error $? "failed to load site script $ac_site_file
3198 See \`config.log' for more details" "$LINENO" 5; }
3202 if test -r "$cache_file"; then
3203 # Some versions of bash will fail to source /dev/null (special files
3204 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3205 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3206 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3207 $as_echo "$as_me: loading cache $cache_file" >&6;}
3209 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3210 *) . "./$cache_file";;
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3215 $as_echo "$as_me: creating cache $cache_file" >&6;}
3219 gl_use_threads_default=no
3220 as_fn_append ac_func_list " btowc"
3221 as_fn_append ac_func_list " setrlimit"
3222 as_fn_append ac_header_list " ucontext.h"
3223 as_fn_append ac_func_list " sigaltstack"
3224 as_fn_append ac_header_list " unistd.h"
3225 as_fn_append ac_func_list " canonicalize_file_name"
3226 as_fn_append ac_func_list " getcwd"
3227 as_fn_append ac_func_list " readlink"
3228 as_fn_append ac_func_list " realpath"
3229 as_fn_append ac_header_list " sys/param.h"
3230 as_fn_append ac_func_list " dup2"
3231 as_fn_append ac_func_list " fcntl"
3232 as_fn_append ac_func_list " mempcpy"
3233 as_fn_append ac_header_list " stdio_ext.h"
3234 as_fn_append ac_func_list " __fpending"
3235 as_fn_append ac_func_list " fpurge"
3236 as_fn_append ac_func_list " __fpurge"
3237 as_fn_append ac_func_list " __freading"
3238 as_fn_append ac_func_list " getdtablesize"
3239 gl_getopt_required=GNU
3240 as_fn_append ac_header_list " getopt.h"
3241 as_fn_append ac_header_list " sys/time.h"
3242 as_fn_append ac_func_list " gettimeofday"
3243 as_fn_append ac_header_list " langinfo.h"
3244 as_fn_append ac_func_list " lstat"
3245 as_fn_append ac_header_list " math.h"
3246 as_fn_append ac_func_list " mbsinit"
3247 as_fn_append ac_func_list " mbrtowc"
3248 as_fn_append ac_header_list " sys/mman.h"
3249 as_fn_append ac_func_list " mprotect"
3250 as_fn_append ac_func_list " memchr"
3251 as_fn_append ac_func_list " mkstemp"
3252 as_fn_append ac_func_list " nl_langinfo"
3253 as_fn_append ac_func_list " pathconf"
3254 as_fn_append ac_func_list " pipe2"
3255 as_fn_append ac_func_list " posix_spawn"
3257 as_fn_append ac_func_list " isblank"
3258 as_fn_append ac_func_list " iswctype"
3259 as_fn_append ac_func_list " wcscoll"
3260 as_fn_append ac_header_list " sched.h"
3261 as_fn_append ac_func_list " sigaction"
3262 as_fn_append ac_func_list " siginterrupt"
3263 as_fn_append ac_header_list " spawn.h"
3264 as_fn_append ac_header_list " wchar.h"
3265 as_fn_append ac_header_list " stdint.h"
3266 as_fn_append ac_header_list " sys/socket.h"
3267 as_fn_append ac_func_list " strndup"
3268 as_fn_append ac_header_list " sys/stat.h"
3269 as_fn_append ac_header_list " sys/wait.h"
3270 as_fn_append ac_func_list " pipe"
3271 as_fn_append ac_func_list " vasnprintf"
3272 as_fn_append ac_header_list " features.h"
3273 as_fn_append ac_func_list " wcrtomb"
3274 as_fn_append ac_func_list " iswcntrl"
3275 as_fn_append ac_header_list " wctype.h"
3276 as_fn_append ac_func_list " link"
3277 as_fn_append ac_header_list " xlocale.h"
3278 as_fn_append ac_func_list " newlocale"
3279 as_fn_append ac_func_list " setenv"
3280 as_fn_append ac_func_list " strdup"
3281 as_fn_append ac_func_list " symlink"
3282 as_fn_append ac_func_list " wctob"
3283 # Check that the precious variables saved in the cache have kept the same
3285 ac_cache_corrupted=false
3286 for ac_var in $ac_precious_vars; do
3287 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3288 eval ac_new_set=\$ac_env_${ac_var}_set
3289 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3290 eval ac_new_val=\$ac_env_${ac_var}_value
3291 case $ac_old_set,$ac_new_set in
3293 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3294 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3295 ac_cache_corrupted=: ;;
3297 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3298 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3299 ac_cache_corrupted=: ;;
3302 if test "x$ac_old_val" != "x$ac_new_val"; then
3303 # differences in whitespace do not lead to failure.
3304 ac_old_val_w=`echo x $ac_old_val`
3305 ac_new_val_w=`echo x $ac_new_val`
3306 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3308 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3309 ac_cache_corrupted=:
3311 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3312 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3313 eval $ac_var=\$ac_old_val
3315 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3316 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3318 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3321 # Pass precious variables to config.status.
3322 if test "$ac_new_set" = set; then
3324 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3325 *) ac_arg=$ac_var=$ac_new_val ;;
3327 case " $ac_configure_args " in
3328 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3329 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3333 if $ac_cache_corrupted; then
3334 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3335 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3337 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3338 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3340 ## -------------------- ##
3341 ## Main body of script. ##
3342 ## -------------------- ##
3345 ac_cpp='$CPP $CPPFLAGS'
3346 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3347 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3348 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3352 for ac_dir in build-aux "$srcdir"/build-aux; do
3353 if test -f "$ac_dir/install-sh"; then
3355 ac_install_sh="$ac_aux_dir/install-sh -c"
3357 elif test -f "$ac_dir/install.sh"; then
3359 ac_install_sh="$ac_aux_dir/install.sh -c"
3361 elif test -f "$ac_dir/shtool"; then
3363 ac_install_sh="$ac_aux_dir/shtool install -c"
3367 if test -z "$ac_aux_dir"; then
3368 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3371 # These three variables are undocumented and unsupported,
3372 # and are intended to be withdrawn in a future Autoconf release.
3373 # They can cause serious problems if a builder's source tree is in a directory
3374 # whose full name contains unusual characters.
3375 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3376 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3377 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3381 am__api_version='1.11'
3383 # Find a good install program. We prefer a C program (faster),
3384 # so one script is as good as another. But avoid the broken or
3385 # incompatible versions:
3386 # SysV /etc/install, /usr/sbin/install
3387 # SunOS /usr/etc/install
3388 # IRIX /sbin/install
3390 # AmigaOS /C/install, which installs bootblocks on floppy discs
3391 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3392 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3393 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3394 # OS/2's system install, which has a completely different semantic
3395 # ./install, which can be erroneously created by make from ./install.sh.
3396 # Reject install programs that cannot install multiple files.
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3398 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3399 if test -z "$INSTALL"; then
3400 if test "${ac_cv_path_install+set}" = set; then :
3401 $as_echo_n "(cached) " >&6
3403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3407 test -z "$as_dir" && as_dir=.
3408 # Account for people who put trailing slashes in PATH elements.
3409 case $as_dir/ in #((
3410 ./ | .// | /[cC]/* | \
3411 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3412 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3415 # OSF1 and SCO ODT 3.0 have their own names for install.
3416 # Don't use installbsd from OSF since it installs stuff as root
3418 for ac_prog in ginstall scoinst install; do
3419 for ac_exec_ext in '' $ac_executable_extensions; do
3420 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3421 if test $ac_prog = install &&
3422 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3423 # AIX install. It has an incompatible calling convention.
3425 elif test $ac_prog = install &&
3426 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3427 # program-specific install script used by HP pwplus--don't use.
3430 rm -rf conftest.one conftest.two conftest.dir
3431 echo one > conftest.one
3432 echo two > conftest.two
3434 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3435 test -s conftest.one && test -s conftest.two &&
3436 test -s conftest.dir/conftest.one &&
3437 test -s conftest.dir/conftest.two
3439 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3452 rm -rf conftest.one conftest.two conftest.dir
3455 if test "${ac_cv_path_install+set}" = set; then
3456 INSTALL=$ac_cv_path_install
3458 # As a last resort, use the slow shell script. Don't cache a
3459 # value for INSTALL within a source directory, because that will
3460 # break other packages using the cache if that directory is
3461 # removed, or if the value is a relative name.
3462 INSTALL=$ac_install_sh
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3466 $as_echo "$INSTALL" >&6; }
3468 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3469 # It thinks the first close brace ends the variable substitution.
3470 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3472 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3474 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3477 $as_echo_n "checking whether build environment is sane... " >&6; }
3480 echo timestamp > conftest.file
3481 # Reject unsafe characters in $srcdir or the absolute working directory
3482 # name. Accept space and tab only in the latter.
3486 *[\\\"\#\$\&\'\`$am_lf]*)
3487 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3490 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3491 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3494 # Do `set' in a subshell so we don't clobber the current shell's
3495 # arguments. Must try -L first in case configure is actually a
3496 # symlink; some systems play weird games with the mod time of symlinks
3497 # (eg FreeBSD returns the mod time of the symlink's containing
3500 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3501 if test "$*" = "X"; then
3503 set X `ls -t "$srcdir/configure" conftest.file`
3506 if test "$*" != "X $srcdir/configure conftest.file" \
3507 && test "$*" != "X conftest.file $srcdir/configure"; then
3509 # If neither matched, then we have a broken ls. This can happen
3510 # if, for instance, CONFIG_SHELL is bash and it inherits a
3511 # broken ls alias from the environment. This has actually
3512 # happened. Such a system could not be considered "sane".
3513 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3514 alias in your environment" "$LINENO" 5
3517 test "$2" = conftest.file
3523 as_fn_error $? "newly created file is older than distributed files!
3524 Check your system clock" "$LINENO" 5
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3527 $as_echo "yes" >&6; }
3528 test "$program_prefix" != NONE &&
3529 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3530 # Use a double $ so make ignores it.
3531 test "$program_suffix" != NONE &&
3532 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3533 # Double any \ or $.
3534 # By default was `s,x,x', remove it if useless.
3535 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3536 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3538 # expand $ac_aux_dir to an absolute path
3539 am_aux_dir=`cd $ac_aux_dir && pwd`
3541 if test x"${MISSING+set}" != xset; then
3544 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3546 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3549 # Use eval to expand $SHELL
3550 if eval "$MISSING --run true"; then
3551 am_missing_run="$MISSING --run "
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3555 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3558 if test x"${install_sh}" != xset; then
3561 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3563 install_sh="\${SHELL} $am_aux_dir/install-sh"
3567 # Installed binaries are usually stripped using `strip' when the user
3568 # run `make install-strip'. However `strip' might not be the right
3569 # tool to use in cross-compilation environments, therefore Automake
3570 # will honor the `STRIP' environment variable to overrule this program.
3571 if test "$cross_compiling" != no; then
3572 if test -n "$ac_tool_prefix"; then
3573 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3574 set dummy ${ac_tool_prefix}strip; ac_word=$2
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3576 $as_echo_n "checking for $ac_word... " >&6; }
3577 if test "${ac_cv_prog_STRIP+set}" = set; then :
3578 $as_echo_n "(cached) " >&6
3580 if test -n "$STRIP"; then
3581 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587 test -z "$as_dir" && as_dir=.
3588 for ac_exec_ext in '' $ac_executable_extensions; do
3589 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3590 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3600 STRIP=$ac_cv_prog_STRIP
3601 if test -n "$STRIP"; then
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3603 $as_echo "$STRIP" >&6; }
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3606 $as_echo "no" >&6; }
3611 if test -z "$ac_cv_prog_STRIP"; then
3613 # Extract the first word of "strip", so it can be a program name with args.
3614 set dummy strip; ac_word=$2
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3616 $as_echo_n "checking for $ac_word... " >&6; }
3617 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3618 $as_echo_n "(cached) " >&6
3620 if test -n "$ac_ct_STRIP"; then
3621 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3627 test -z "$as_dir" && as_dir=.
3628 for ac_exec_ext in '' $ac_executable_extensions; do
3629 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3630 ac_cv_prog_ac_ct_STRIP="strip"
3631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3640 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3641 if test -n "$ac_ct_STRIP"; then
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3643 $as_echo "$ac_ct_STRIP" >&6; }
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646 $as_echo "no" >&6; }
3649 if test "x$ac_ct_STRIP" = x; then
3652 case $cross_compiling:$ac_tool_warned in
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3655 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3656 ac_tool_warned=yes ;;
3661 STRIP="$ac_cv_prog_STRIP"
3665 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3668 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3669 if test -z "$MKDIR_P"; then
3670 if test "${ac_cv_path_mkdir+set}" = set; then :
3671 $as_echo_n "(cached) " >&6
3673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3677 test -z "$as_dir" && as_dir=.
3678 for ac_prog in mkdir gmkdir; do
3679 for ac_exec_ext in '' $ac_executable_extensions; do
3680 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3681 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3682 'mkdir (GNU coreutils) '* | \
3683 'mkdir (coreutils) '* | \
3684 'mkdir (fileutils) '4.1*)
3685 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3695 test -d ./--version && rmdir ./--version
3696 if test "${ac_cv_path_mkdir+set}" = set; then
3697 MKDIR_P="$ac_cv_path_mkdir -p"
3699 # As a last resort, use the slow shell script. Don't cache a
3700 # value for MKDIR_P within a source directory, because that will
3701 # break other packages using the cache if that directory is
3702 # removed, or if the value is a relative name.
3703 MKDIR_P="$ac_install_sh -d"
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3707 $as_echo "$MKDIR_P" >&6; }
3712 [\\/$]* | ?:[\\/]*) ;;
3713 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3716 for ac_prog in gawk mawk nawk awk
3718 # Extract the first word of "$ac_prog", so it can be a program name with args.
3719 set dummy $ac_prog; ac_word=$2
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721 $as_echo_n "checking for $ac_word... " >&6; }
3722 if test "${ac_cv_prog_AWK+set}" = set; then :
3723 $as_echo_n "(cached) " >&6
3725 if test -n "$AWK"; then
3726 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3732 test -z "$as_dir" && as_dir=.
3733 for ac_exec_ext in '' $ac_executable_extensions; do
3734 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3735 ac_cv_prog_AWK="$ac_prog"
3736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3746 if test -n "$AWK"; then
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3748 $as_echo "$AWK" >&6; }
3750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751 $as_echo "no" >&6; }
3755 test -n "$AWK" && break
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3759 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3761 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3762 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
3763 $as_echo_n "(cached) " >&6
3765 cat >conftest.make <<\_ACEOF
3768 @echo '@@@%%%=$(MAKE)=@@@%%%'
3770 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3771 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3773 eval ac_cv_prog_make_${ac_make}_set=yes;;
3775 eval ac_cv_prog_make_${ac_make}_set=no;;
3779 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3781 $as_echo "yes" >&6; }
3784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785 $as_echo "no" >&6; }
3786 SET_MAKE="MAKE=${MAKE-make}"
3789 rm -rf .tst 2>/dev/null
3790 mkdir .tst 2>/dev/null
3791 if test -d .tst; then
3796 rmdir .tst 2>/dev/null
3798 # Check whether --enable-silent-rules was given.
3799 if test "${enable_silent_rules+set}" = set; then :
3800 enableval=$enable_silent_rules;
3803 case $enable_silent_rules in
3804 yes) AM_DEFAULT_VERBOSITY=0;;
3805 no) AM_DEFAULT_VERBOSITY=1;;
3806 *) AM_DEFAULT_VERBOSITY=1;;
3810 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3811 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3812 # is not polluted with repeated "-I."
3813 am__isrc=' -I$(srcdir)'
3814 # test to see if srcdir already configured
3815 if test -f $srcdir/config.status; then
3816 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3820 # test whether we have cygpath
3821 if test -z "$CYGPATH_W"; then
3822 if (cygpath --version) >/dev/null 2>/dev/null; then
3823 CYGPATH_W='cygpath -w'
3830 # Define the identity of the package.
3835 cat >>confdefs.h <<_ACEOF
3836 #define PACKAGE "$PACKAGE"
3840 cat >>confdefs.h <<_ACEOF
3841 #define VERSION "$VERSION"
3844 # Some tools Automake needs.
3846 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3849 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3852 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3855 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3858 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3860 # We need awk for the "check" target. The system "awk" is bad on
3862 # Always define AMTAR for backward compatibility.
3864 AMTAR=${AMTAR-"${am_missing_run}tar"}
3866 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3876 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3880 ac_cpp='$CPP $CPPFLAGS'
3881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3884 if test -n "$ac_tool_prefix"; then
3885 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3886 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3888 $as_echo_n "checking for $ac_word... " >&6; }
3889 if test "${ac_cv_prog_CC+set}" = set; then :
3890 $as_echo_n "(cached) " >&6
3892 if test -n "$CC"; then
3893 ac_cv_prog_CC="$CC" # Let the user override the test.
3895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899 test -z "$as_dir" && as_dir=.
3900 for ac_exec_ext in '' $ac_executable_extensions; do
3901 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3902 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3913 if test -n "$CC"; then
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3915 $as_echo "$CC" >&6; }
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3918 $as_echo "no" >&6; }
3923 if test -z "$ac_cv_prog_CC"; then
3925 # Extract the first word of "gcc", so it can be a program name with args.
3926 set dummy gcc; ac_word=$2
3927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3928 $as_echo_n "checking for $ac_word... " >&6; }
3929 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3930 $as_echo_n "(cached) " >&6
3932 if test -n "$ac_ct_CC"; then
3933 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3939 test -z "$as_dir" && as_dir=.
3940 for ac_exec_ext in '' $ac_executable_extensions; do
3941 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3942 ac_cv_prog_ac_ct_CC="gcc"
3943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3952 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3953 if test -n "$ac_ct_CC"; then
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3955 $as_echo "$ac_ct_CC" >&6; }
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3958 $as_echo "no" >&6; }
3961 if test "x$ac_ct_CC" = x; then
3964 case $cross_compiling:$ac_tool_warned in
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3967 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3968 ac_tool_warned=yes ;;
3976 if test -z "$CC"; then
3977 if test -n "$ac_tool_prefix"; then
3978 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3979 set dummy ${ac_tool_prefix}cc; ac_word=$2
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3981 $as_echo_n "checking for $ac_word... " >&6; }
3982 if test "${ac_cv_prog_CC+set}" = set; then :
3983 $as_echo_n "(cached) " >&6
3985 if test -n "$CC"; then
3986 ac_cv_prog_CC="$CC" # Let the user override the test.
3988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3992 test -z "$as_dir" && as_dir=.
3993 for ac_exec_ext in '' $ac_executable_extensions; do
3994 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3995 ac_cv_prog_CC="${ac_tool_prefix}cc"
3996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4006 if test -n "$CC"; then
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4008 $as_echo "$CC" >&6; }
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4011 $as_echo "no" >&6; }
4017 if test -z "$CC"; then
4018 # Extract the first word of "cc", so it can be a program name with args.
4019 set dummy cc; ac_word=$2
4020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4021 $as_echo_n "checking for $ac_word... " >&6; }
4022 if test "${ac_cv_prog_CC+set}" = set; then :
4023 $as_echo_n "(cached) " >&6
4025 if test -n "$CC"; then
4026 ac_cv_prog_CC="$CC" # Let the user override the test.
4029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4033 test -z "$as_dir" && as_dir=.
4034 for ac_exec_ext in '' $ac_executable_extensions; do
4035 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4036 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4037 ac_prog_rejected=yes
4041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4048 if test $ac_prog_rejected = yes; then
4049 # We found a bogon in the path, so make sure we never use it.
4050 set dummy $ac_cv_prog_CC
4052 if test $# != 0; then
4053 # We chose a different compiler from the bogus one.
4054 # However, it has the same basename, so the bogon will be chosen
4055 # first if we set CC to just the basename; use the full file name.
4057 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4063 if test -n "$CC"; then
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4065 $as_echo "$CC" >&6; }
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4068 $as_echo "no" >&6; }
4073 if test -z "$CC"; then
4074 if test -n "$ac_tool_prefix"; then
4075 for ac_prog in cl.exe
4077 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4078 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080 $as_echo_n "checking for $ac_word... " >&6; }
4081 if test "${ac_cv_prog_CC+set}" = set; then :
4082 $as_echo_n "(cached) " >&6
4084 if test -n "$CC"; then
4085 ac_cv_prog_CC="$CC" # Let the user override the test.
4087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4091 test -z "$as_dir" && as_dir=.
4092 for ac_exec_ext in '' $ac_executable_extensions; do
4093 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4094 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4105 if test -n "$CC"; then
4106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4107 $as_echo "$CC" >&6; }
4109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4110 $as_echo "no" >&6; }
4114 test -n "$CC" && break
4117 if test -z "$CC"; then
4119 for ac_prog in cl.exe
4121 # Extract the first word of "$ac_prog", so it can be a program name with args.
4122 set dummy $ac_prog; ac_word=$2
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4124 $as_echo_n "checking for $ac_word... " >&6; }
4125 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4126 $as_echo_n "(cached) " >&6
4128 if test -n "$ac_ct_CC"; then
4129 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4135 test -z "$as_dir" && as_dir=.
4136 for ac_exec_ext in '' $ac_executable_extensions; do
4137 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4138 ac_cv_prog_ac_ct_CC="$ac_prog"
4139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4148 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4149 if test -n "$ac_ct_CC"; then
4150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4151 $as_echo "$ac_ct_CC" >&6; }
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154 $as_echo "no" >&6; }
4158 test -n "$ac_ct_CC" && break
4161 if test "x$ac_ct_CC" = x; then
4164 case $cross_compiling:$ac_tool_warned in
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4167 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4168 ac_tool_warned=yes ;;
4177 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4178 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4179 as_fn_error $? "no acceptable C compiler found in \$PATH
4180 See \`config.log' for more details" "$LINENO" 5; }
4182 # Provide some information about the compiler.
4183 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4186 for ac_option in --version -v -V -qversion; do
4187 { { ac_try="$ac_compiler $ac_option >&5"
4189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4190 *) ac_try_echo=$ac_try;;
4192 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4193 $as_echo "$ac_try_echo"; } >&5
4194 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4196 if test -s conftest.err; then
4198 ... rest of stderr output deleted ...
4199 10q' conftest.err >conftest.er1
4200 cat conftest.er1 >&5
4202 rm -f conftest.er1 conftest.err
4203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4204 test $ac_status = 0; }
4207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4208 /* end confdefs.h. */
4218 ac_clean_files_save=$ac_clean_files
4219 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4220 # Try to create an executable without -o first, disregard a.out.
4221 # It will help us diagnose broken compilers, and finding out an intuition
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4224 $as_echo_n "checking whether the C compiler works... " >&6; }
4225 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4227 # The possible output files:
4228 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4231 for ac_file in $ac_files
4234 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4235 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4240 if { { ac_try="$ac_link_default"
4242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4243 *) ac_try_echo=$ac_try;;
4245 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4246 $as_echo "$ac_try_echo"; } >&5
4247 (eval "$ac_link_default") 2>&5
4249 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4250 test $ac_status = 0; }; then :
4251 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4252 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4253 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4254 # so that the user can short-circuit this test for compilers unknown to
4256 for ac_file in $ac_files ''
4258 test -f "$ac_file" || continue
4260 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4263 # We found the default executable, but exeext='' is most
4267 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4269 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4271 # We set ac_cv_exeext here because the later test for it is not
4272 # safe: cross compilers may not add the suffix if given an `-o'
4273 # argument, so we may need to know it at that point already.
4274 # Even if this section looks crufty: it has the advantage of
4281 test "$ac_cv_exeext" = no && ac_cv_exeext=
4286 if test -z "$ac_file"; then :
4287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4288 $as_echo "no" >&6; }
4289 $as_echo "$as_me: failed program was:" >&5
4290 sed 's/^/| /' conftest.$ac_ext >&5
4292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4293 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4294 as_fn_error 77 "C compiler cannot create executables
4295 See \`config.log' for more details" "$LINENO" 5; }
4297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4298 $as_echo "yes" >&6; }
4300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4301 $as_echo_n "checking for C compiler default output file name... " >&6; }
4302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4303 $as_echo "$ac_file" >&6; }
4304 ac_exeext=$ac_cv_exeext
4306 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4307 ac_clean_files=$ac_clean_files_save
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4309 $as_echo_n "checking for suffix of executables... " >&6; }
4310 if { { ac_try="$ac_link"
4312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4313 *) ac_try_echo=$ac_try;;
4315 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4316 $as_echo "$ac_try_echo"; } >&5
4317 (eval "$ac_link") 2>&5
4319 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4320 test $ac_status = 0; }; then :
4321 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4322 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4323 # work properly (i.e., refer to `conftest.exe'), while it won't with
4325 for ac_file in conftest.exe conftest conftest.*; do
4326 test -f "$ac_file" || continue
4328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4329 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4335 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4336 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4337 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4338 See \`config.log' for more details" "$LINENO" 5; }
4340 rm -f conftest conftest$ac_cv_exeext
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4342 $as_echo "$ac_cv_exeext" >&6; }
4344 rm -f conftest.$ac_ext
4345 EXEEXT=$ac_cv_exeext
4347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4348 /* end confdefs.h. */
4353 FILE *f = fopen ("conftest.out", "w");
4354 return ferror (f) || fclose (f) != 0;
4360 ac_clean_files="$ac_clean_files conftest.out"
4361 # Check that the compiler produces executables we can run. If not, either
4362 # the compiler is broken, or we cross compile.
4363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4364 $as_echo_n "checking whether we are cross compiling... " >&6; }
4365 if test "$cross_compiling" != yes; then
4366 { { ac_try="$ac_link"
4368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4369 *) ac_try_echo=$ac_try;;
4371 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4372 $as_echo "$ac_try_echo"; } >&5
4373 (eval "$ac_link") 2>&5
4375 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4376 test $ac_status = 0; }
4377 if { ac_try='./conftest$ac_cv_exeext'
4378 { { case "(($ac_try" in
4379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4380 *) ac_try_echo=$ac_try;;
4382 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4383 $as_echo "$ac_try_echo"; } >&5
4384 (eval "$ac_try") 2>&5
4386 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4387 test $ac_status = 0; }; }; then
4390 if test "$cross_compiling" = maybe; then
4393 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4394 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4395 as_fn_error $? "cannot run C compiled programs.
4396 If you meant to cross compile, use \`--host'.
4397 See \`config.log' for more details" "$LINENO" 5; }
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4402 $as_echo "$cross_compiling" >&6; }
4404 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4405 ac_clean_files=$ac_clean_files_save
4406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4407 $as_echo_n "checking for suffix of object files... " >&6; }
4408 if test "${ac_cv_objext+set}" = set; then :
4409 $as_echo_n "(cached) " >&6
4411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412 /* end confdefs.h. */
4422 rm -f conftest.o conftest.obj
4423 if { { ac_try="$ac_compile"
4425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4426 *) ac_try_echo=$ac_try;;
4428 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4429 $as_echo "$ac_try_echo"; } >&5
4430 (eval "$ac_compile") 2>&5
4432 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4433 test $ac_status = 0; }; then :
4434 for ac_file in conftest.o conftest.obj conftest.*; do
4435 test -f "$ac_file" || continue;
4437 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4438 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4443 $as_echo "$as_me: failed program was:" >&5
4444 sed 's/^/| /' conftest.$ac_ext >&5
4446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4447 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4448 as_fn_error $? "cannot compute suffix of object files: cannot compile
4449 See \`config.log' for more details" "$LINENO" 5; }
4451 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4454 $as_echo "$ac_cv_objext" >&6; }
4455 OBJEXT=$ac_cv_objext
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4458 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4459 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4460 $as_echo_n "(cached) " >&6
4462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463 /* end confdefs.h. */
4476 if ac_fn_c_try_compile "$LINENO"; then :
4481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4482 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4486 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4487 if test $ac_compiler_gnu = yes; then
4492 ac_test_CFLAGS=${CFLAGS+set}
4493 ac_save_CFLAGS=$CFLAGS
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4495 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4496 if test "${ac_cv_prog_cc_g+set}" = set; then :
4497 $as_echo_n "(cached) " >&6
4499 ac_save_c_werror_flag=$ac_c_werror_flag
4500 ac_c_werror_flag=yes
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504 /* end confdefs.h. */
4514 if ac_fn_c_try_compile "$LINENO"; then :
4518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4519 /* end confdefs.h. */
4529 if ac_fn_c_try_compile "$LINENO"; then :
4532 ac_c_werror_flag=$ac_save_c_werror_flag
4534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4535 /* end confdefs.h. */
4545 if ac_fn_c_try_compile "$LINENO"; then :
4548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4553 ac_c_werror_flag=$ac_save_c_werror_flag
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4556 $as_echo "$ac_cv_prog_cc_g" >&6; }
4557 if test "$ac_test_CFLAGS" = set; then
4558 CFLAGS=$ac_save_CFLAGS
4559 elif test $ac_cv_prog_cc_g = yes; then
4560 if test "$GCC" = yes; then
4566 if test "$GCC" = yes; then
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4573 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4574 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4575 $as_echo_n "(cached) " >&6
4577 ac_cv_prog_cc_c89=no
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580 /* end confdefs.h. */
4583 #include <sys/types.h>
4584 #include <sys/stat.h>
4585 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4586 struct buf { int x; };
4587 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4588 static char *e (p, i)
4594 static char *f (char * (*g) (char **, int), char **p, ...)
4599 s = g (p, va_arg (v,int));
4604 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4605 function prototypes and stuff, but not '\xHH' hex character constants.
4606 These don't provoke an error unfortunately, instead are silently treated
4607 as 'x'. The following induces an error, until -std is added to get
4608 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4609 array size at least. It's necessary to write '\x00'==0 to get something
4610 that's true only with -std. */
4611 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4613 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4614 inside strings and character constants. */
4616 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4618 int test (int i, double x);
4619 struct s1 {int (*f) (int a);};
4620 struct s2 {int (*f) (double a);};
4621 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4627 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4632 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4633 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4635 CC="$ac_save_CC $ac_arg"
4636 if ac_fn_c_try_compile "$LINENO"; then :
4637 ac_cv_prog_cc_c89=$ac_arg
4639 rm -f core conftest.err conftest.$ac_objext
4640 test "x$ac_cv_prog_cc_c89" != "xno" && break
4642 rm -f conftest.$ac_ext
4647 case "x$ac_cv_prog_cc_c89" in
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4650 $as_echo "none needed" >&6; } ;;
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4653 $as_echo "unsupported" >&6; } ;;
4655 CC="$CC $ac_cv_prog_cc_c89"
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4657 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4659 if test "x$ac_cv_prog_cc_c89" != xno; then :
4664 ac_cpp='$CPP $CPPFLAGS'
4665 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4666 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4667 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4668 DEPDIR="${am__leading_dot}deps"
4670 ac_config_commands="$ac_config_commands depfiles"
4673 am_make=${MAKE-make}
4674 cat > confinc << 'END'
4676 @echo this is the am__doit target
4679 # If we don't find an include directive, just comment out the code.
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4681 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4685 # First try GNU make style include.
4686 echo "include confinc" > confmf
4687 # Ignore all kinds of additional output from `make'.
4688 case `$am_make -s -f confmf 2> /dev/null` in #(
4689 *the\ am__doit\ target*)
4695 # Now try BSD make style include.
4696 if test "$am__include" = "#"; then
4697 echo '.include "confinc"' > confmf
4698 case `$am_make -s -f confmf 2> /dev/null` in #(
4699 *the\ am__doit\ target*)
4700 am__include=.include
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4709 $as_echo "$_am_result" >&6; }
4710 rm -f confinc confmf
4712 # Check whether --enable-dependency-tracking was given.
4713 if test "${enable_dependency_tracking+set}" = set; then :
4714 enableval=$enable_dependency_tracking;
4717 if test "x$enable_dependency_tracking" != xno; then
4718 am_depcomp="$ac_aux_dir/depcomp"
4721 if test "x$enable_dependency_tracking" != xno; then
4731 depcc="$CC" am_compiler_list=
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4734 $as_echo_n "checking dependency style of $depcc... " >&6; }
4735 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4736 $as_echo_n "(cached) " >&6
4738 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4739 # We make a subdir and do the tests there. Otherwise we can end up
4740 # making bogus files that we don't know about and never remove. For
4741 # instance it was reported that on HP-UX the gcc test will end up
4742 # making a dummy file named `D' -- because `-MD' means `put the output
4745 # Copy depcomp to subdir because otherwise we won't find it if we're
4746 # using a relative directory.
4747 cp "$am_depcomp" conftest.dir
4749 # We will build objects and dependencies in a subdirectory because
4750 # it helps to detect inapplicable dependency modes. For instance
4751 # both Tru64's cc and ICC support -MD to output dependencies as a
4752 # side effect of compilation, but ICC will put the dependencies in
4753 # the current directory while Tru64 will put them in the object
4757 am_cv_CC_dependencies_compiler_type=none
4758 if test "$am_compiler_list" = ""; then
4759 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4762 case " $depcc " in #(
4763 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4766 for depmode in $am_compiler_list; do
4767 # Setup a source with many dependencies, because some compilers
4768 # like to wrap large dependency lists on column 80 (with \), and
4769 # we should not choose a depcomp mode which is confused by this.
4771 # We need to recreate these files for each test, as the compiler may
4772 # overwrite some of them when testing with obscure command lines.
4773 # This happens at least with the AIX C compiler.
4775 for i in 1 2 3 4 5 6; do
4776 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4777 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4778 # Solaris 8's {/usr,}/bin/sh.
4779 touch sub/conftst$i.h
4781 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4783 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4784 # mode. It turns out that the SunPro C++ compiler does not properly
4785 # handle `-M -o', and we need to detect this. Also, some Intel
4786 # versions had trouble with output in subdirs
4787 am__obj=sub/conftest.${OBJEXT-o}
4788 am__minus_obj="-o $am__obj"
4791 # This depmode causes a compiler race in universal mode.
4792 test "$am__universal" = false || continue
4795 # after this tag, mechanisms are not by side-effect, so they'll
4796 # only be used when explicitly requested
4797 if test "x$enable_dependency_tracking" = xyes; then
4803 msvisualcpp | msvcmsys)
4804 # This compiler won't grok `-c -o', but also, the minuso test has
4805 # not run yet. These depmodes are late enough in the game, and
4806 # so weak that their functioning should not be impacted.
4807 am__obj=conftest.${OBJEXT-o}
4812 if depmode=$depmode \
4813 source=sub/conftest.c object=$am__obj \
4814 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4815 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4816 >/dev/null 2>conftest.err &&
4817 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4818 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4819 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4820 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4821 # icc doesn't choke on unknown options, it will just issue warnings
4822 # or remarks (even with -Werror). So we grep stderr for any message
4823 # that says an option was ignored or not supported.
4824 # When given -MP, icc 7.0 and 7.1 complain thusly:
4825 # icc: Command line warning: ignoring option '-M'; no argument required
4826 # The diagnosis changed in icc 8.0:
4827 # icc: Command line remark: option '-MP' not supported
4828 if (grep 'ignoring option' conftest.err ||
4829 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4830 am_cv_CC_dependencies_compiler_type=$depmode
4839 am_cv_CC_dependencies_compiler_type=none
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4844 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4845 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4848 test "x$enable_dependency_tracking" != xno \
4849 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4851 am__fastdepCC_FALSE='#'
4853 am__fastdepCC_TRUE='#'
4854 am__fastdepCC_FALSE=
4859 if test -n "$ac_tool_prefix"; then
4860 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4861 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863 $as_echo_n "checking for $ac_word... " >&6; }
4864 if test "${ac_cv_prog_RANLIB+set}" = set; then :
4865 $as_echo_n "(cached) " >&6
4867 if test -n "$RANLIB"; then
4868 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874 test -z "$as_dir" && as_dir=.
4875 for ac_exec_ext in '' $ac_executable_extensions; do
4876 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4877 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4887 RANLIB=$ac_cv_prog_RANLIB
4888 if test -n "$RANLIB"; then
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4890 $as_echo "$RANLIB" >&6; }
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4893 $as_echo "no" >&6; }
4898 if test -z "$ac_cv_prog_RANLIB"; then
4899 ac_ct_RANLIB=$RANLIB
4900 # Extract the first word of "ranlib", so it can be a program name with args.
4901 set dummy ranlib; ac_word=$2
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4903 $as_echo_n "checking for $ac_word... " >&6; }
4904 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4905 $as_echo_n "(cached) " >&6
4907 if test -n "$ac_ct_RANLIB"; then
4908 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914 test -z "$as_dir" && as_dir=.
4915 for ac_exec_ext in '' $ac_executable_extensions; do
4916 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4917 ac_cv_prog_ac_ct_RANLIB="ranlib"
4918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4927 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4928 if test -n "$ac_ct_RANLIB"; then
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4930 $as_echo "$ac_ct_RANLIB" >&6; }
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4933 $as_echo "no" >&6; }
4936 if test "x$ac_ct_RANLIB" = x; then
4939 case $cross_compiling:$ac_tool_warned in
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4942 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4943 ac_tool_warned=yes ;;
4945 RANLIB=$ac_ct_RANLIB
4948 RANLIB="$ac_cv_prog_RANLIB"
4951 if test "x$CC" != xcc; then
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4953 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4956 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4958 set dummy $CC; ac_cc=`$as_echo "$2" |
4959 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4960 if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
4961 $as_echo_n "(cached) " >&6
4963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4964 /* end confdefs.h. */
4974 # Make sure it works both with $CC and with simple cc.
4975 # We do the test twice because some compilers refuse to overwrite an
4976 # existing .o file with -o, though they will create one.
4977 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4979 if { { case "(($ac_try" in
4980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981 *) ac_try_echo=$ac_try;;
4983 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4984 $as_echo "$ac_try_echo"; } >&5
4985 (eval "$ac_try") 2>&5
4987 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4988 test $ac_status = 0; } &&
4989 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4991 *) ac_try_echo=$ac_try;;
4993 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4994 $as_echo "$ac_try_echo"; } >&5
4995 (eval "$ac_try") 2>&5
4997 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4998 test $ac_status = 0; };
5000 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5001 if test "x$CC" != xcc; then
5002 # Test first that cc exists at all.
5003 if { ac_try='cc -c conftest.$ac_ext >&5'
5004 { { case "(($ac_try" in
5005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5006 *) ac_try_echo=$ac_try;;
5008 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5009 $as_echo "$ac_try_echo"; } >&5
5010 (eval "$ac_try") 2>&5
5012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5013 test $ac_status = 0; }; }; then
5014 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5016 if { { case "(($ac_try" in
5017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5018 *) ac_try_echo=$ac_try;;
5020 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5021 $as_echo "$ac_try_echo"; } >&5
5022 (eval "$ac_try") 2>&5
5024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5025 test $ac_status = 0; } &&
5026 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5028 *) ac_try_echo=$ac_try;;
5030 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5031 $as_echo "$ac_try_echo"; } >&5
5032 (eval "$ac_try") 2>&5
5034 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5035 test $ac_status = 0; };
5040 # cc exists but doesn't like -o.
5041 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5046 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5048 rm -f core conftest*
5051 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5053 $as_echo "yes" >&6; }
5055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056 $as_echo "no" >&6; }
5058 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5062 # FIXME: we rely on the cache variable name because
5063 # there is no other way.
5065 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5066 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5067 if test "$am_t" != yes; then
5068 # Losing compiler, so override with the script.
5069 # FIXME: It is wrong to rewrite CC.
5070 # But if we don't then we get into trouble of one sort or another.
5071 # A longer-term fix would be to have automake use am__CC in this case,
5072 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5073 CC="$am_aux_dir/compile $CC"
5077 # Make sure we can run config.sub.
5078 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5079 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5082 $as_echo_n "checking build system type... " >&6; }
5083 if test "${ac_cv_build+set}" = set; then :
5084 $as_echo_n "(cached) " >&6
5086 ac_build_alias=$build_alias
5087 test "x$ac_build_alias" = x &&
5088 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5089 test "x$ac_build_alias" = x &&
5090 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5091 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5092 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5096 $as_echo "$ac_cv_build" >&6; }
5097 case $ac_cv_build in
5099 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5102 ac_save_IFS=$IFS; IFS='-'
5108 # Remember, the first character of IFS is used to create $*,
5109 # except with old shells:
5112 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5116 $as_echo_n "checking host system type... " >&6; }
5117 if test "${ac_cv_host+set}" = set; then :
5118 $as_echo_n "(cached) " >&6
5120 if test "x$host_alias" = x; then
5121 ac_cv_host=$ac_cv_build
5123 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5124 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5129 $as_echo "$ac_cv_host" >&6; }
5132 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5135 ac_save_IFS=$IFS; IFS='-'
5141 # Remember, the first character of IFS is used to create $*,
5142 # except with old shells:
5145 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5150 ac_cpp='$CPP $CPPFLAGS'
5151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5155 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5156 # On Suns, sometimes $CPP names a directory.
5157 if test -n "$CPP" && test -d "$CPP"; then
5160 if test -z "$CPP"; then
5161 if test "${ac_cv_prog_CPP+set}" = set; then :
5162 $as_echo_n "(cached) " >&6
5164 # Double quotes because CPP needs to be expanded
5165 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5168 for ac_c_preproc_warn_flag in '' yes
5170 # Use a header file that comes with gcc, so configuring glibc
5171 # with a fresh cross-compiler works.
5172 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5173 # <limits.h> exists even on freestanding compilers.
5174 # On the NeXT, cc -E runs the code through the compiler's parser,
5175 # not just through cpp. "Syntax error" is here to catch this case.
5176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5177 /* end confdefs.h. */
5179 # include <limits.h>
5181 # include <assert.h>
5185 if ac_fn_c_try_cpp "$LINENO"; then :
5188 # Broken: fails on valid input.
5191 rm -f conftest.err conftest.$ac_ext
5193 # OK, works on sane cases. Now check whether nonexistent headers
5194 # can be detected and how.
5195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5196 /* end confdefs.h. */
5197 #include <ac_nonexistent.h>
5199 if ac_fn_c_try_cpp "$LINENO"; then :
5200 # Broken: success on invalid input.
5203 # Passes both tests.
5207 rm -f conftest.err conftest.$ac_ext
5210 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5211 rm -f conftest.err conftest.$ac_ext
5212 if $ac_preproc_ok; then :
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5225 $as_echo "$CPP" >&6; }
5227 for ac_c_preproc_warn_flag in '' yes
5229 # Use a header file that comes with gcc, so configuring glibc
5230 # with a fresh cross-compiler works.
5231 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5232 # <limits.h> exists even on freestanding compilers.
5233 # On the NeXT, cc -E runs the code through the compiler's parser,
5234 # not just through cpp. "Syntax error" is here to catch this case.
5235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5236 /* end confdefs.h. */
5238 # include <limits.h>
5240 # include <assert.h>
5244 if ac_fn_c_try_cpp "$LINENO"; then :
5247 # Broken: fails on valid input.
5250 rm -f conftest.err conftest.$ac_ext
5252 # OK, works on sane cases. Now check whether nonexistent headers
5253 # can be detected and how.
5254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5255 /* end confdefs.h. */
5256 #include <ac_nonexistent.h>
5258 if ac_fn_c_try_cpp "$LINENO"; then :
5259 # Broken: success on invalid input.
5262 # Passes both tests.
5266 rm -f conftest.err conftest.$ac_ext
5269 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5270 rm -f conftest.err conftest.$ac_ext
5271 if $ac_preproc_ok; then :
5274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5275 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5276 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5277 See \`config.log' for more details" "$LINENO" 5; }
5281 ac_cpp='$CPP $CPPFLAGS'
5282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5288 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5289 if test "${ac_cv_path_GREP+set}" = set; then :
5290 $as_echo_n "(cached) " >&6
5292 if test -z "$GREP"; then
5293 ac_path_GREP_found=false
5294 # Loop through the user's path and test for each of PROGNAME-LIST
5295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5296 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5299 test -z "$as_dir" && as_dir=.
5300 for ac_prog in grep ggrep; do
5301 for ac_exec_ext in '' $ac_executable_extensions; do
5302 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5303 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5304 # Check for GNU ac_path_GREP and select it if it is found.
5305 # Check for GNU $ac_path_GREP
5306 case `"$ac_path_GREP" --version 2>&1` in
5308 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5311 $as_echo_n 0123456789 >"conftest.in"
5314 cat "conftest.in" "conftest.in" >"conftest.tmp"
5315 mv "conftest.tmp" "conftest.in"
5316 cp "conftest.in" "conftest.nl"
5317 $as_echo 'GREP' >> "conftest.nl"
5318 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5319 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5320 as_fn_arith $ac_count + 1 && ac_count=$as_val
5321 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5322 # Best one so far, save it but keep looking for a better one
5323 ac_cv_path_GREP="$ac_path_GREP"
5324 ac_path_GREP_max=$ac_count
5326 # 10*(2^10) chars as input seems more than enough
5327 test $ac_count -gt 10 && break
5329 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5332 $ac_path_GREP_found && break 3
5337 if test -z "$ac_cv_path_GREP"; then
5338 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5341 ac_cv_path_GREP=$GREP
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5346 $as_echo "$ac_cv_path_GREP" >&6; }
5347 GREP="$ac_cv_path_GREP"
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5351 $as_echo_n "checking for egrep... " >&6; }
5352 if test "${ac_cv_path_EGREP+set}" = set; then :
5353 $as_echo_n "(cached) " >&6
5355 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5356 then ac_cv_path_EGREP="$GREP -E"
5358 if test -z "$EGREP"; then
5359 ac_path_EGREP_found=false
5360 # Loop through the user's path and test for each of PROGNAME-LIST
5361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5362 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5365 test -z "$as_dir" && as_dir=.
5366 for ac_prog in egrep; do
5367 for ac_exec_ext in '' $ac_executable_extensions; do
5368 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5369 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5370 # Check for GNU ac_path_EGREP and select it if it is found.
5371 # Check for GNU $ac_path_EGREP
5372 case `"$ac_path_EGREP" --version 2>&1` in
5374 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5377 $as_echo_n 0123456789 >"conftest.in"
5380 cat "conftest.in" "conftest.in" >"conftest.tmp"
5381 mv "conftest.tmp" "conftest.in"
5382 cp "conftest.in" "conftest.nl"
5383 $as_echo 'EGREP' >> "conftest.nl"
5384 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5385 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5386 as_fn_arith $ac_count + 1 && ac_count=$as_val
5387 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5388 # Best one so far, save it but keep looking for a better one
5389 ac_cv_path_EGREP="$ac_path_EGREP"
5390 ac_path_EGREP_max=$ac_count
5392 # 10*(2^10) chars as input seems more than enough
5393 test $ac_count -gt 10 && break
5395 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5398 $ac_path_EGREP_found && break 3
5403 if test -z "$ac_cv_path_EGREP"; then
5404 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5407 ac_cv_path_EGREP=$EGREP
5412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5413 $as_echo "$ac_cv_path_EGREP" >&6; }
5414 EGREP="$ac_cv_path_EGREP"
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5418 $as_echo_n "checking for ANSI C header files... " >&6; }
5419 if test "${ac_cv_header_stdc+set}" = set; then :
5420 $as_echo_n "(cached) " >&6
5422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5423 /* end confdefs.h. */
5437 if ac_fn_c_try_compile "$LINENO"; then :
5438 ac_cv_header_stdc=yes
5440 ac_cv_header_stdc=no
5442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5444 if test $ac_cv_header_stdc = yes; then
5445 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447 /* end confdefs.h. */
5451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5452 $EGREP "memchr" >/dev/null 2>&1; then :
5455 ac_cv_header_stdc=no
5461 if test $ac_cv_header_stdc = yes; then
5462 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464 /* end confdefs.h. */
5468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5469 $EGREP "free" >/dev/null 2>&1; then :
5472 ac_cv_header_stdc=no
5478 if test $ac_cv_header_stdc = yes; then
5479 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5480 if test "$cross_compiling" = yes; then :
5483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5484 /* end confdefs.h. */
5487 #if ((' ' & 0x0FF) == 0x020)
5488 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5489 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5491 # define ISLOWER(c) \
5492 (('a' <= (c) && (c) <= 'i') \
5493 || ('j' <= (c) && (c) <= 'r') \
5494 || ('s' <= (c) && (c) <= 'z'))
5495 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5498 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5503 for (i = 0; i < 256; i++)
5504 if (XOR (islower (i), ISLOWER (i))
5505 || toupper (i) != TOUPPER (i))
5510 if ac_fn_c_try_run "$LINENO"; then :
5513 ac_cv_header_stdc=no
5515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5516 conftest.$ac_objext conftest.beam conftest.$ac_ext
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5522 $as_echo "$ac_cv_header_stdc" >&6; }
5523 if test $ac_cv_header_stdc = yes; then
5525 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5529 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5530 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5531 inttypes.h stdint.h unistd.h
5533 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5534 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5536 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5537 cat >>confdefs.h <<_ACEOF
5538 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5549 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5550 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
5557 if test "$MINIX" = yes; then
5559 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5562 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5565 $as_echo "#define _MINIX 1" >>confdefs.h
5572 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5579 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5580 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5581 $as_echo_n "(cached) " >&6
5583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5584 /* end confdefs.h. */
5586 # define __EXTENSIONS__ 1
5587 $ac_includes_default
5596 if ac_fn_c_try_compile "$LINENO"; then :
5597 ac_cv_safe_to_define___extensions__=yes
5599 ac_cv_safe_to_define___extensions__=no
5601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5604 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5605 test $ac_cv_safe_to_define___extensions__ = yes &&
5606 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5608 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5610 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5612 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5614 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5624 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
5625 if test "${ac_cv_sys_largefile_source+set}" = set; then :
5626 $as_echo_n "(cached) " >&6
5629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5630 /* end confdefs.h. */
5631 #include <sys/types.h> /* for off_t */
5636 int (*fp) (FILE *, off_t, int) = fseeko;
5637 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5642 if ac_fn_c_try_link "$LINENO"; then :
5643 ac_cv_sys_largefile_source=no; break
5645 rm -f core conftest.err conftest.$ac_objext \
5646 conftest$ac_exeext conftest.$ac_ext
5647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5648 /* end confdefs.h. */
5649 #define _LARGEFILE_SOURCE 1
5650 #include <sys/types.h> /* for off_t */
5655 int (*fp) (FILE *, off_t, int) = fseeko;
5656 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5661 if ac_fn_c_try_link "$LINENO"; then :
5662 ac_cv_sys_largefile_source=1; break
5664 rm -f core conftest.err conftest.$ac_objext \
5665 conftest$ac_exeext conftest.$ac_ext
5666 ac_cv_sys_largefile_source=unknown
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
5671 $as_echo "$ac_cv_sys_largefile_source" >&6; }
5672 case $ac_cv_sys_largefile_source in #(
5675 cat >>confdefs.h <<_ACEOF
5676 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5682 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5683 # in glibc 2.1.3, but that breaks too many other things.
5684 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5685 if test $ac_cv_sys_largefile_source != unknown; then
5687 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
5694 # IEEE behaviour is the default on all CPUs except Alpha and SH
5695 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5696 # and the GCC 4.1.2 manual).
5699 # On Alpha systems, a compiler option provides the behaviour.
5700 # See the ieee(3) manual page, also available at
5701 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5702 if test -n "$GCC"; then
5703 # GCC has the option -mieee.
5704 CPPFLAGS="$CPPFLAGS -mieee"
5706 # Compaq (ex-DEC) C has the option -ieee.
5707 CPPFLAGS="$CPPFLAGS -ieee"
5711 if test -n "$GCC"; then
5712 # GCC has the option -mieee.
5713 CPPFLAGS="$CPPFLAGS -mieee"
5718 case $ac_cv_prog_cc_stdc in #(
5720 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5723 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5724 if test "${ac_cv_prog_cc_c99+set}" = set; then :
5725 $as_echo_n "(cached) " >&6
5727 ac_cv_prog_cc_c99=no
5729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5730 /* end confdefs.h. */
5732 #include <stdbool.h>
5737 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5738 #define debug(...) fprintf (stderr, __VA_ARGS__)
5739 #define showlist(...) puts (#__VA_ARGS__)
5740 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5742 test_varargs_macros (void)
5747 debug ("X = %d\n", x);
5748 showlist (The first, second, and third items.);
5749 report (x>y, "x is %d but y is %d", x, y);
5752 // Check long long types.
5753 #define BIG64 18446744073709551615ull
5754 #define BIG32 4294967295ul
5755 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5757 your preprocessor is broken;
5761 your preprocessor is broken;
5763 static long long int bignum = -9223372036854775807LL;
5764 static unsigned long long int ubignum = BIG64;
5766 struct incomplete_array
5774 const wchar_t *name;
5778 typedef const char *ccp;
5781 test_restrict (ccp restrict text)
5783 // See if C++-style comments work.
5784 // Iterate through items via the restricted pointer.
5785 // Also check for declarations in for loops.
5786 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5791 // Check varargs and va_copy.
5793 test_varargs (const char *format, ...)
5796 va_start (args, format);
5798 va_copy (args_copy, args);
5809 str = va_arg (args_copy, const char *);
5812 number = va_arg (args_copy, int);
5815 fnumber = va_arg (args_copy, double);
5830 _Bool success = false;
5833 if (test_restrict ("String literal") == 0)
5835 char *restrict newvar = "Another string";
5838 test_varargs ("s, d' f .", "string", 65, 34.234);
5839 test_varargs_macros ();
5841 // Check flexible array members.
5842 struct incomplete_array *ia =
5843 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5845 for (int i = 0; i < ia->datasize; ++i)
5846 ia->data[i] = i * 1.234;
5848 // Check named initializers.
5849 struct named_init ni = {
5851 .name = L"Test wide string",
5852 .average = 543.34343,
5857 int dynamic_array[ni.number];
5858 dynamic_array[ni.number - 1] = 543;
5860 // work around unused variable warnings
5861 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5862 || dynamic_array[ni.number - 1] != 543);
5868 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
5870 CC="$ac_save_CC $ac_arg"
5871 if ac_fn_c_try_compile "$LINENO"; then :
5872 ac_cv_prog_cc_c99=$ac_arg
5874 rm -f core conftest.err conftest.$ac_objext
5875 test "x$ac_cv_prog_cc_c99" != "xno" && break
5877 rm -f conftest.$ac_ext
5882 case "x$ac_cv_prog_cc_c99" in
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5885 $as_echo "none needed" >&6; } ;;
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5888 $as_echo "unsupported" >&6; } ;;
5890 CC="$CC $ac_cv_prog_cc_c99"
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5892 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5894 if test "x$ac_cv_prog_cc_c99" != xno; then :
5895 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5898 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5899 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5900 $as_echo_n "(cached) " >&6
5902 ac_cv_prog_cc_c89=no
5904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5905 /* end confdefs.h. */
5908 #include <sys/types.h>
5909 #include <sys/stat.h>
5910 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5911 struct buf { int x; };
5912 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5913 static char *e (p, i)
5919 static char *f (char * (*g) (char **, int), char **p, ...)
5924 s = g (p, va_arg (v,int));
5929 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5930 function prototypes and stuff, but not '\xHH' hex character constants.
5931 These don't provoke an error unfortunately, instead are silently treated
5932 as 'x'. The following induces an error, until -std is added to get
5933 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5934 array size at least. It's necessary to write '\x00'==0 to get something
5935 that's true only with -std. */
5936 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5938 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5939 inside strings and character constants. */
5941 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5943 int test (int i, double x);
5944 struct s1 {int (*f) (int a);};
5945 struct s2 {int (*f) (double a);};
5946 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5952 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5957 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5958 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5960 CC="$ac_save_CC $ac_arg"
5961 if ac_fn_c_try_compile "$LINENO"; then :
5962 ac_cv_prog_cc_c89=$ac_arg
5964 rm -f core conftest.err conftest.$ac_objext
5965 test "x$ac_cv_prog_cc_c89" != "xno" && break
5967 rm -f conftest.$ac_ext
5972 case "x$ac_cv_prog_cc_c89" in
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5975 $as_echo "none needed" >&6; } ;;
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5978 $as_echo "unsupported" >&6; } ;;
5980 CC="$CC $ac_cv_prog_cc_c89"
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5982 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5984 if test "x$ac_cv_prog_cc_c89" != xno; then :
5985 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5987 ac_cv_prog_cc_stdc=no
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5994 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5995 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
5996 $as_echo_n "(cached) " >&6
5999 case $ac_cv_prog_cc_stdc in #(
6001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6002 $as_echo "unsupported" >&6; } ;; #(
6004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6005 $as_echo "none needed" >&6; } ;; #(
6007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6008 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6016 # Check whether --enable-threads was given.
6017 if test "${enable_threads+set}" = set; then :
6018 enableval=$enable_threads; gl_use_threads=$enableval
6020 if test -n "$gl_use_threads_default"; then
6021 gl_use_threads="$gl_use_threads_default"
6024 osf*) gl_use_threads=no ;;
6027 1.[0-5].*) gl_use_threads=no ;;
6028 *) gl_use_threads=yes ;;
6031 *) gl_use_threads=yes ;;
6037 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
6038 # For using <pthread.h>:
6041 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6042 # groks <pthread.h>. cc also understands the flag -pthread, but
6043 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6044 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6045 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6046 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6047 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6050 # Some systems optimize for single-threaded programs by default, and
6051 # need special flags to disable these optimizations. For example, the
6052 # definition of 'errno' in <errno.h>.
6054 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6055 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6062 # Code from module alloca-opt:
6063 # Code from module alloca-opt-tests:
6064 # Code from module announce-gen:
6065 # Code from module ansi-c++-opt:
6066 # Code from module arg-nonnull:
6067 # Code from module array-list:
6068 # Code from module array-list-tests:
6069 # Code from module array-oset:
6070 # Code from module array-oset-tests:
6071 # Code from module assert:
6072 # Code from module autobuild:
6077 if test -z "$AB_PACKAGE"; then
6078 AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
6081 $as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;}
6083 if test -z "$AB_VERSION"; then
6084 AB_VERSION=${PACKAGE_VERSION:-$VERSION}
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
6087 $as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;}
6090 if test "$hostname"; then
6091 { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
6092 $as_echo "$as_me: autobuild hostname... $hostname" >&6;}
6097 date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
6098 if test "$?" != 0; then
6101 if test "$date"; then
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
6103 $as_echo "$as_me: autobuild timestamp... $date" >&6;}
6106 # Code from module avltree-oset:
6107 # Code from module avltree-oset-tests:
6108 # Code from module binary-io:
6109 # Code from module binary-io-tests:
6110 # Code from module btowc:
6111 # Code from module btowc-tests:
6112 # Code from module c++defs:
6113 # Code from module c-ctype:
6114 # Code from module c-ctype-tests:
6115 # Code from module c-stack:
6116 # Code from module c-stack-tests:
6117 # Code from module c-strcase:
6118 # Code from module c-strcase-tests:
6119 # Code from module canonicalize-lgpl:
6120 # Code from module canonicalize-lgpl-tests:
6121 # Code from module clean-temp:
6122 # Code from module cloexec:
6123 # Code from module cloexec-tests:
6124 # Code from module close:
6125 # Code from module close-hook:
6126 # Code from module close-stream:
6127 # Code from module closein:
6128 # Code from module closein-tests:
6129 # Code from module closeout:
6130 # Code from module config-h:
6131 # Code from module configmake:
6132 # Code from module dirname:
6133 # Code from module dirname-lgpl:
6134 # Code from module dirname-tests:
6135 # Code from module dosname:
6136 # Code from module double-slash-root:
6137 # Code from module dup2:
6138 # Code from module dup2-tests:
6139 # Code from module environ:
6140 # Code from module environ-tests:
6141 # Code from module errno:
6142 # Code from module errno-tests:
6143 # Code from module error:
6144 # Code from module execute:
6145 # Code from module exitfail:
6146 # Code from module extensions:
6148 # Code from module fatal-signal:
6149 # Code from module fclose:
6150 # Code from module fcntl:
6151 # Code from module fcntl-h:
6152 # Code from module fcntl-h-c++-tests:
6153 # Code from module fcntl-h-tests:
6154 # Code from module fcntl-tests:
6155 # Code from module fd-safer-flag:
6156 # Code from module fdl-1.3:
6157 # Code from module fflush:
6159 # Code from module fflush-tests:
6160 # Code from module filenamecat:
6161 # Code from module filenamecat-lgpl:
6162 # Code from module filenamecat-tests:
6163 # Code from module float:
6164 # Code from module fopen:
6165 # Code from module fopen-safer:
6166 # Code from module fopen-safer-tests:
6167 # Code from module fopen-tests:
6168 # Code from module fpending:
6169 # Code from module fpending-tests:
6170 # Code from module fpieee:
6172 # Code from module fpucw:
6173 # Code from module fpurge:
6174 # Code from module fpurge-tests:
6175 # Code from module freadahead:
6176 # Code from module freadahead-tests:
6177 # Code from module freading:
6178 # Code from module freading-tests:
6179 # Code from module frexp-nolibm:
6180 # Code from module frexp-nolibm-tests:
6181 # Code from module frexpl-nolibm:
6182 # Code from module frexpl-nolibm-tests:
6183 # Code from module fseeko:
6185 # Code from module fseeko-tests:
6186 # Code from module ftell:
6187 # Code from module ftell-tests:
6188 # Code from module ftello:
6190 # Code from module ftello-tests:
6191 # Code from module gendocs:
6192 # Code from module getdtablesize:
6193 # Code from module getdtablesize-tests:
6194 # Code from module getopt-gnu:
6195 # Code from module getopt-posix:
6196 # Code from module getopt-posix-tests:
6197 # Code from module getpagesize:
6198 # Code from module gettext-h:
6199 # Code from module gettimeofday:
6200 # Code from module gettimeofday-tests:
6201 # Code from module git-version-gen:
6202 # Code from module gnu-web-doc-update:
6203 # Code from module gnumakefile:
6204 # Code from module gnupload:
6205 # Code from module gpl-3.0:
6206 # Code from module havelib:
6207 # Code from module ignore-value:
6208 # Code from module ignore-value-tests:
6209 # Code from module include_next:
6210 # Code from module inline:
6211 # Code from module intprops:
6212 # Code from module isnand-nolibm:
6213 # Code from module isnand-nolibm-tests:
6214 # Code from module isnanf-nolibm:
6215 # Code from module isnanf-nolibm-tests:
6216 # Code from module isnanl-nolibm:
6217 # Code from module isnanl-nolibm-tests:
6218 # Code from module langinfo:
6219 # Code from module langinfo-c++-tests:
6220 # Code from module langinfo-tests:
6221 # Code from module libsigsegv:
6222 # Code from module link:
6223 # Code from module link-tests:
6224 # Code from module linkedhash-list:
6225 # Code from module linkedhash-list-tests:
6226 # Code from module list:
6227 # Code from module localcharset:
6228 # Code from module locale:
6229 # Code from module locale-c++-tests:
6230 # Code from module locale-tests:
6231 # Code from module localename:
6232 # Code from module localename-tests:
6233 # Code from module lock:
6234 # Code from module lseek:
6235 # Code from module lseek-tests:
6236 # Code from module lstat:
6237 # Code from module lstat-tests:
6238 # Code from module maintainer-makefile:
6239 # Code from module malloc-gnu:
6240 # Code from module malloc-gnu-tests:
6241 # Code from module malloc-posix:
6242 # Code from module malloca:
6243 # Code from module malloca-tests:
6244 # Code from module manywarnings:
6245 # Code from module math:
6246 # Code from module math-c++-tests:
6247 # Code from module math-tests:
6248 # Code from module mbrtowc:
6249 # Code from module mbrtowc-tests:
6250 # Code from module mbsinit:
6251 # Code from module mbsinit-tests:
6252 # Code from module mbtowc:
6253 # Code from module memchr:
6254 # Code from module memchr-tests:
6255 # Code from module memchr2:
6256 # Code from module memchr2-tests:
6257 # Code from module mkdtemp:
6258 # Code from module mkstemp:
6259 # Code from module multiarch:
6260 # Code from module nl_langinfo:
6261 # Code from module nl_langinfo-tests:
6262 # Code from module nocrash:
6263 # Code from module obstack:
6264 # Code from module open:
6265 # Code from module open-tests:
6266 # Code from module oset:
6267 # Code from module pathmax:
6268 # Code from module pipe2:
6269 # Code from module pipe2-safer:
6270 # Code from module pipe2-tests:
6271 # Code from module posix_spawn-internal:
6272 # Code from module posix_spawn_file_actions_addclose:
6273 # Code from module posix_spawn_file_actions_adddup2:
6274 # Code from module posix_spawn_file_actions_addopen:
6275 # Code from module posix_spawn_file_actions_destroy:
6276 # Code from module posix_spawn_file_actions_init:
6277 # Code from module posix_spawnattr_destroy:
6278 # Code from module posix_spawnattr_init:
6279 # Code from module posix_spawnattr_setflags:
6280 # Code from module posix_spawnattr_setsigmask:
6281 # Code from module posix_spawnp:
6282 # Code from module posix_spawnp-tests:
6283 # Code from module printf-frexp:
6284 # Code from module printf-frexp-tests:
6285 # Code from module printf-frexpl:
6286 # Code from module printf-frexpl-tests:
6287 # Code from module printf-safe:
6288 # Code from module progname:
6289 # Code from module putenv:
6290 # Code from module quotearg:
6291 # Code from module quotearg-simple:
6292 # Code from module quotearg-simple-tests:
6293 # Code from module rawmemchr:
6294 # Code from module rawmemchr-tests:
6295 # Code from module readlink:
6296 # Code from module readlink-tests:
6297 # Code from module regex:
6298 # Code from module rename:
6299 # Code from module rename-tests:
6300 # Code from module rmdir:
6301 # Code from module rmdir-tests:
6302 # Code from module same-inode:
6303 # Code from module sched:
6304 # Code from module sched-tests:
6305 # Code from module setenv:
6306 # Code from module setenv-tests:
6307 # Code from module setlocale:
6308 # Code from module setlocale-tests:
6309 # Code from module sigaction:
6310 # Code from module sigaction-tests:
6311 # Code from module signal:
6312 # Code from module signal-c++-tests:
6313 # Code from module signal-tests:
6314 # Code from module signbit:
6315 # Code from module signbit-tests:
6316 # Code from module sigprocmask:
6317 # Code from module size_max:
6318 # Code from module snprintf:
6319 # Code from module snprintf-tests:
6320 # Code from module spawn:
6321 # Code from module spawn-c++-tests:
6322 # Code from module spawn-pipe:
6323 # Code from module spawn-pipe-tests:
6324 # Code from module spawn-tests:
6325 # Code from module ssize_t:
6326 # Code from module stat:
6327 # Code from module stat-tests:
6328 # Code from module stdarg:
6330 # Code from module stdbool:
6331 # Code from module stdbool-tests:
6332 # Code from module stddef:
6333 # Code from module stddef-tests:
6334 # Code from module stdint:
6335 # Code from module stdint-tests:
6336 # Code from module stdio:
6337 # Code from module stdio-c++-tests:
6338 # Code from module stdio-tests:
6339 # Code from module stdlib:
6340 # Code from module stdlib-c++-tests:
6341 # Code from module stdlib-safer:
6342 # Code from module stdlib-tests:
6343 # Code from module strchrnul:
6344 # Code from module strchrnul-tests:
6345 # Code from module strdup-posix:
6346 # Code from module streq:
6347 # Code from module strerror:
6348 # Code from module strerror-tests:
6349 # Code from module string:
6350 # Code from module string-c++-tests:
6351 # Code from module string-tests:
6352 # Code from module strndup:
6353 # Code from module strnlen:
6354 # Code from module strnlen-tests:
6355 # Code from module strsignal:
6356 # Code from module strsignal-tests:
6357 # Code from module strstr:
6358 # Code from module strstr-simple:
6359 # Code from module strstr-tests:
6360 # Code from module strtod:
6361 # Code from module strtod-tests:
6362 # Code from module strtol:
6363 # Code from module symlink:
6364 # Code from module symlink-tests:
6365 # Code from module sys_stat:
6366 # Code from module sys_stat-c++-tests:
6367 # Code from module sys_stat-tests:
6368 # Code from module sys_time:
6369 # Code from module sys_time-c++-tests:
6370 # Code from module sys_time-tests:
6371 # Code from module sys_wait:
6372 # Code from module sys_wait-c++-tests:
6373 # Code from module sys_wait-tests:
6374 # Code from module tempname:
6375 # Code from module threadlib:
6379 # Code from module time:
6380 # Code from module time-c++-tests:
6381 # Code from module time-tests:
6382 # Code from module tls:
6383 # Code from module tmpdir:
6384 # Code from module unistd:
6385 # Code from module unistd-c++-tests:
6386 # Code from module unistd-safer:
6387 # Code from module unistd-safer-tests:
6388 # Code from module unistd-tests:
6389 # Code from module unlocked-io:
6390 # Code from module unsetenv:
6391 # Code from module unsetenv-tests:
6392 # Code from module update-copyright:
6393 # Code from module update-copyright-tests:
6394 # Code from module useless-if-before-free:
6395 # Code from module vasnprintf:
6396 # Code from module vasnprintf-tests:
6397 # Code from module vasprintf:
6398 # Code from module vasprintf-posix:
6399 # Code from module vasprintf-posix-tests:
6400 # Code from module vasprintf-tests:
6401 # Code from module vc-list-files:
6402 # Code from module vc-list-files-tests:
6403 # Code from module verify:
6404 # Code from module verify-tests:
6405 # Code from module verror:
6406 # Code from module version-etc:
6407 # Code from module version-etc-fsf:
6408 # Code from module version-etc-tests:
6409 # Code from module wait-process:
6410 # Code from module waitpid:
6411 # Code from module warn-on-use:
6412 # Code from module warnings:
6413 # Code from module wchar:
6414 # Code from module wchar-c++-tests:
6415 # Code from module wchar-tests:
6416 # Code from module wcrtomb:
6417 # Code from module wcrtomb-tests:
6418 # Code from module wctob:
6419 # Code from module wctomb:
6420 # Code from module wctype-h:
6421 # Code from module wctype-h-c++-tests:
6422 # Code from module wctype-h-tests:
6423 # Code from module xalloc:
6424 # Code from module xalloc-die:
6425 # Code from module xalloc-die-tests:
6426 # Code from module xlist:
6427 # Code from module xmalloca:
6428 # Code from module xoset:
6429 # Code from module xprintf:
6430 # Code from module xsize:
6431 # Code from module xstrndup:
6432 # Code from module xvasprintf:
6433 # Code from module xvasprintf-posix:
6434 # Code from module xvasprintf-tests:
6437 # Maintainer note - comment this line out if you plan to rerun
6438 # GNULIB_POSIXCHECK testing to see if M4 should be using more modules.
6439 # Leave it uncommented for normal releases, for faster ./configure.
6444 # M4 is single-threaded; so we can optimize gnulib code by using this:
6449 # Check whether --enable-gcc-warnings was given.
6450 if test "${enable_gcc_warnings+set}" = set; then :
6451 enableval=$enable_gcc_warnings; case $enableval in
6453 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
6455 gl_gcc_warnings=$enableval
6462 if test "$gl_gcc_warnings" = yes; then
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5
6464 $as_echo_n "checking whether compiler handles -Werror... " >&6; }
6465 if test "${gl_cv_warn__Werror+set}" = set; then :
6466 $as_echo_n "(cached) " >&6
6469 save_CPPFLAGS="$CPPFLAGS"
6470 CPPFLAGS="${CPPFLAGS} -Werror"
6471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6472 /* end confdefs.h. */
6482 if ac_fn_c_try_cpp "$LINENO"; then :
6483 gl_cv_warn__Werror=yes
6485 gl_cv_warn__Werror=no
6487 rm -f conftest.err conftest.$ac_ext
6488 CPPFLAGS="$save_CPPFLAGS"
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5
6492 $as_echo "$gl_cv_warn__Werror" >&6; }
6493 if test "x$gl_cv_warn__Werror" = x""yes; then :
6494 as_fn_append WERROR_CFLAGS " -Werror"
6500 nw="$nw -Waggregate-return" # C90 is anachronistic
6501 nw="$nw -Wlong-long" # C90 is anachronistic
6502 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
6503 nw="$nw -Wtraditional" # Warns on #elif which we use often
6504 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
6505 nw="$nw -Wpadded" # Our structs are not packed
6506 nw="$nw -Wredundant-decls" # Gnulib has multiple decls
6507 nw="$nw -Wformat-nonliteral" # Needed in builtin.c
6508 nw="$nw -Wunreachable-code" # Needed in output.c
6509 nw="$nw -Wconversion" # Too many warnings for now
6510 nw="$nw -Wsign-conversion" # Too many warnings for now
6511 nw="$nw -Wtraditional-conversion" # Too many warnings for now
6512 nw="$nw -Wcast-qual" # Too many warnings for now
6513 nw="$nw -Wswitch-enum" # Too many warnings for now
6514 # This, $nw, is the list of warnings we disable.
6518 for gl_manywarn_item in \
6522 -Wformat-nonliteral \
6525 -Wmissing-include-dirs \
6535 -Wtraditional-conversion \
6536 -Wdeclaration-after-statement \
6539 -Wunsafe-loop-optimizations \
6541 -Wbad-function-cast \
6549 -Waggregate-return \
6550 -Wstrict-prototypes \
6551 -Wold-style-definition \
6552 -Wmissing-prototypes \
6553 -Wmissing-declarations \
6554 -Wmissing-noreturn \
6555 -Wmissing-format-attribute \
6560 -Wunreachable-code \
6565 -Wvolatile-register-var \
6566 -Wdisabled-optimization \
6568 -Woverlength-strings \
6569 -Wbuiltin-macro-redefined \
6571 -Wpacked-bitfield-compat \
6574 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
6576 # The following are not documented in the manual but are included in
6577 # output from gcc --help=warnings.
6578 for gl_manywarn_item in \
6580 -Wcoverage-mismatch \
6584 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
6594 *" $gl_warn_item "*)
6597 gl_warn_set="$gl_warn_set $gl_warn_item"
6604 as_gl_Warn=`$as_echo "gl_cv_warn_$w" | $as_tr_sh`
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles $w" >&5
6606 $as_echo_n "checking whether compiler handles $w... " >&6; }
6607 if eval "test \"\${$as_gl_Warn+set}\"" = set; then :
6608 $as_echo_n "(cached) " >&6
6611 save_CPPFLAGS="$CPPFLAGS"
6612 CPPFLAGS="${CPPFLAGS} $w"
6613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6614 /* end confdefs.h. */
6624 if ac_fn_c_try_cpp "$LINENO"; then :
6625 eval "$as_gl_Warn=yes"
6627 eval "$as_gl_Warn=no"
6629 rm -f conftest.err conftest.$ac_ext
6630 CPPFLAGS="$save_CPPFLAGS"
6633 eval ac_res=\$$as_gl_Warn
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6635 $as_echo "$ac_res" >&6; }
6636 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
6637 as_fn_append WARN_CFLAGS " $w"
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5
6643 $as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; }
6644 if test "${gl_cv_warn__fdiagnostics_show_option+set}" = set; then :
6645 $as_echo_n "(cached) " >&6
6648 save_CPPFLAGS="$CPPFLAGS"
6649 CPPFLAGS="${CPPFLAGS} -fdiagnostics-show-option"
6650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6651 /* end confdefs.h. */
6661 if ac_fn_c_try_cpp "$LINENO"; then :
6662 gl_cv_warn__fdiagnostics_show_option=yes
6664 gl_cv_warn__fdiagnostics_show_option=no
6666 rm -f conftest.err conftest.$ac_ext
6667 CPPFLAGS="$save_CPPFLAGS"
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fdiagnostics_show_option" >&5
6671 $as_echo "$gl_cv_warn__fdiagnostics_show_option" >&6; }
6672 if test "x$gl_cv_warn__fdiagnostics_show_option" = x""yes; then :
6673 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -funit-at-a-time" >&5
6677 $as_echo_n "checking whether compiler handles -funit-at-a-time... " >&6; }
6678 if test "${gl_cv_warn__funit_at_a_time+set}" = set; then :
6679 $as_echo_n "(cached) " >&6
6682 save_CPPFLAGS="$CPPFLAGS"
6683 CPPFLAGS="${CPPFLAGS} -funit-at-a-time"
6684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6685 /* end confdefs.h. */
6695 if ac_fn_c_try_cpp "$LINENO"; then :
6696 gl_cv_warn__funit_at_a_time=yes
6698 gl_cv_warn__funit_at_a_time=no
6700 rm -f conftest.err conftest.$ac_ext
6701 CPPFLAGS="$save_CPPFLAGS"
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__funit_at_a_time" >&5
6705 $as_echo "$gl_cv_warn__funit_at_a_time" >&6; }
6706 if test "x$gl_cv_warn__funit_at_a_time" = x""yes; then :
6707 as_fn_append WARN_CFLAGS " -funit-at-a-time"
6714 $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
6718 # Tandem/NSK is broken - it has 'long long int' but not
6719 # 'unsigned long long int', which confuses assumptions made by gnulib.
6720 # Simply pretend that neither type exists if both do not work.
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
6723 $as_echo_n "checking for unsigned long long int... " >&6; }
6724 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
6725 $as_echo_n "(cached) " >&6
6727 ac_cv_type_unsigned_long_long_int=yes
6728 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6730 /* end confdefs.h. */
6732 /* For now, do not test the preprocessor; as of 2007 there are too many
6733 implementations with broken preprocessors. Perhaps this can
6734 be revisited in 2012. In the meantime, code should not expect
6735 #if to work with literals wider than 32 bits. */
6736 /* Test literals. */
6737 long long int ll = 9223372036854775807ll;
6738 long long int nll = -9223372036854775807LL;
6739 unsigned long long int ull = 18446744073709551615ULL;
6740 /* Test constant expressions. */
6741 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6743 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6749 /* Test availability of runtime routines for shift and division. */
6750 long long int llmax = 9223372036854775807ll;
6751 unsigned long long int ullmax = 18446744073709551615ull;
6752 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6753 | (llmax / ll) | (llmax % ll)
6754 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6755 | (ullmax / ull) | (ullmax % ull));
6761 if ac_fn_c_try_link "$LINENO"; then :
6764 ac_cv_type_unsigned_long_long_int=no
6766 rm -f core conftest.err conftest.$ac_objext \
6767 conftest$ac_exeext conftest.$ac_ext
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
6771 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
6772 if test $ac_cv_type_unsigned_long_long_int = yes; then
6774 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
6781 $as_echo_n "checking for long long int... " >&6; }
6782 if test "${ac_cv_type_long_long_int+set}" = set; then :
6783 $as_echo_n "(cached) " >&6
6785 ac_cv_type_long_long_int=yes
6786 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6787 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
6788 if test $ac_cv_type_long_long_int = yes; then
6789 if test "$cross_compiling" = yes; then :
6792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6793 /* end confdefs.h. */
6797 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
6798 # define LLONG_MAX (HALF - 1 + HALF)
6803 long long int n = 1;
6807 long long int m = n << i;
6810 if (LLONG_MAX / 2 < m)
6818 if ac_fn_c_try_run "$LINENO"; then :
6821 ac_cv_type_long_long_int=no
6823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6824 conftest.$ac_objext conftest.beam conftest.$ac_ext
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
6831 $as_echo "$ac_cv_type_long_long_int" >&6; }
6832 if test $ac_cv_type_long_long_int = yes; then
6834 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
6840 $as_echo_n "checking for unsigned long long int... " >&6; }
6841 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
6842 $as_echo_n "(cached) " >&6
6844 ac_cv_type_unsigned_long_long_int=yes
6845 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6847 /* end confdefs.h. */
6849 /* For now, do not test the preprocessor; as of 2007 there are too many
6850 implementations with broken preprocessors. Perhaps this can
6851 be revisited in 2012. In the meantime, code should not expect
6852 #if to work with literals wider than 32 bits. */
6853 /* Test literals. */
6854 long long int ll = 9223372036854775807ll;
6855 long long int nll = -9223372036854775807LL;
6856 unsigned long long int ull = 18446744073709551615ULL;
6857 /* Test constant expressions. */
6858 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6860 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6866 /* Test availability of runtime routines for shift and division. */
6867 long long int llmax = 9223372036854775807ll;
6868 unsigned long long int ullmax = 18446744073709551615ull;
6869 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6870 | (llmax / ll) | (llmax % ll)
6871 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6872 | (ullmax / ull) | (ullmax % ull));
6878 if ac_fn_c_try_link "$LINENO"; then :
6881 ac_cv_type_unsigned_long_long_int=no
6883 rm -f core conftest.err conftest.$ac_objext \
6884 conftest$ac_exeext conftest.$ac_ext
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
6888 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
6889 if test $ac_cv_type_unsigned_long_long_int = yes; then
6891 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6895 if test $ac_cv_type_long_long_int:$ac_cv_type_unsigned_long_long_int = yes:no
6897 ac_cv_type_long_long_int=no
6899 $as_echo "#define HAVE_LONG_LONG_INT 0" >>confdefs.h
6907 LIBC_FATAL_STDERR_=1
6908 export LIBC_FATAL_STDERR_
6910 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6911 # for constant arguments. Useless!
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6913 $as_echo_n "checking for working alloca.h... " >&6; }
6914 if test "${ac_cv_working_alloca_h+set}" = set; then :
6915 $as_echo_n "(cached) " >&6
6917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918 /* end confdefs.h. */
6923 char *p = (char *) alloca (2 * sizeof (int));
6929 if ac_fn_c_try_link "$LINENO"; then :
6930 ac_cv_working_alloca_h=yes
6932 ac_cv_working_alloca_h=no
6934 rm -f core conftest.err conftest.$ac_objext \
6935 conftest$ac_exeext conftest.$ac_ext
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6938 $as_echo "$ac_cv_working_alloca_h" >&6; }
6939 if test $ac_cv_working_alloca_h = yes; then
6941 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6946 $as_echo_n "checking for alloca... " >&6; }
6947 if test "${ac_cv_func_alloca_works+set}" = set; then :
6948 $as_echo_n "(cached) " >&6
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951 /* end confdefs.h. */
6953 # define alloca __builtin_alloca
6956 # include <malloc.h>
6957 # define alloca _alloca
6959 # ifdef HAVE_ALLOCA_H
6960 # include <alloca.h>
6965 # ifndef alloca /* predefined by HP cc +Olibcalls */
6976 char *p = (char *) alloca (1);
6982 if ac_fn_c_try_link "$LINENO"; then :
6983 ac_cv_func_alloca_works=yes
6985 ac_cv_func_alloca_works=no
6987 rm -f core conftest.err conftest.$ac_objext \
6988 conftest$ac_exeext conftest.$ac_ext
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6991 $as_echo "$ac_cv_func_alloca_works" >&6; }
6993 if test $ac_cv_func_alloca_works = yes; then
6995 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6998 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6999 # that cause trouble. Some versions do not even contain alloca or
7000 # contain a buggy version. If you still want to use their alloca,
7001 # use ar to extract alloca.o from them instead of compiling alloca.c.
7007 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7009 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7013 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7014 if test "${ac_cv_os_cray+set}" = set; then :
7015 $as_echo_n "(cached) " >&6
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018 /* end confdefs.h. */
7019 #if defined CRAY && ! defined CRAY2
7026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7027 $EGREP "webecray" >/dev/null 2>&1; then :
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7036 $as_echo "$ac_cv_os_cray" >&6; }
7037 if test $ac_cv_os_cray = yes; then
7038 for ac_func in _getb67 GETB67 getb67; do
7039 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7040 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7041 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7043 cat >>confdefs.h <<_ACEOF
7044 #define CRAY_STACKSEG_END $ac_func
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7054 $as_echo_n "checking stack direction for C alloca... " >&6; }
7055 if test "${ac_cv_c_stack_direction+set}" = set; then :
7056 $as_echo_n "(cached) " >&6
7058 if test "$cross_compiling" = yes; then :
7059 ac_cv_c_stack_direction=0
7061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062 /* end confdefs.h. */
7063 $ac_includes_default
7065 find_stack_direction ()
7067 static char *addr = 0;
7072 return find_stack_direction ();
7075 return (&dummy > addr) ? 1 : -1;
7081 return find_stack_direction () < 0;
7084 if ac_fn_c_try_run "$LINENO"; then :
7085 ac_cv_c_stack_direction=1
7087 ac_cv_c_stack_direction=-1
7089 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7090 conftest.$ac_objext conftest.beam conftest.$ac_ext
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7095 $as_echo "$ac_cv_c_stack_direction" >&6; }
7096 cat >>confdefs.h <<_ACEOF
7097 #define STACK_DIRECTION $ac_cv_c_stack_direction
7110 GNULIB_MBSNRTOWCS=0;
7113 GNULIB_WCSNRTOMBS=0;
7130 GNULIB_WCSCASECMP=0;
7131 GNULIB_WCSNCASECMP=0;
7181 HAVE_DECL_WCWIDTH=1;
7182 REPLACE_MBSTATE_T=0;
7188 REPLACE_MBSRTOWCS=0;
7189 REPLACE_MBSNRTOWCS=0;
7191 REPLACE_WCSRTOMBS=0;
7192 REPLACE_WCSNRTOMBS=0;
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7198 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7199 if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
7200 $as_echo_n "(cached) " >&6
7202 gl_cv_header_wchar_h_correct_inline=yes
7203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204 /* end confdefs.h. */
7206 #define wcstod renamed_wcstod
7207 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7209 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7210 included before <wchar.h>. */
7215 extern int zero (void);
7216 int main () { return zero(); }
7219 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7220 (eval $ac_compile) 2>&5
7222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7223 test $ac_status = 0; }; then
7224 mv conftest.$ac_objext conftest1.$ac_objext
7225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7226 /* end confdefs.h. */
7228 #define wcstod renamed_wcstod
7229 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7231 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7232 included before <wchar.h>. */
7237 int zero (void) { return 0; }
7240 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7241 (eval $ac_compile) 2>&5
7243 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7244 test $ac_status = 0; }; then
7245 mv conftest.$ac_objext conftest2.$ac_objext
7246 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7249 gl_cv_header_wchar_h_correct_inline=no
7253 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7257 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
7258 if test $gl_cv_header_wchar_h_correct_inline = no; then
7259 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7260 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7261 C99 mode. You have four options:
7262 - Add the flag -fgnu89-inline to CC and reconfigure, or
7263 - Fix your include files, using parts of
7264 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7265 - Use a gcc version older than 4.3, or
7266 - Don't use the flags -std=c99 or -std=gnu99.
7267 Configuration aborted." "$LINENO" 5
7273 for ac_func in $ac_func_list
7275 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7276 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7277 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7278 cat >>confdefs.h <<_ACEOF
7279 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7289 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7290 if test "${am_cv_langinfo_codeset+set}" = set; then :
7291 $as_echo_n "(cached) " >&6
7293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7294 /* end confdefs.h. */
7295 #include <langinfo.h>
7299 char* cs = nl_langinfo(CODESET); return !cs;
7304 if ac_fn_c_try_link "$LINENO"; then :
7305 am_cv_langinfo_codeset=yes
7307 am_cv_langinfo_codeset=no
7309 rm -f core conftest.err conftest.$ac_objext \
7310 conftest$ac_exeext conftest.$ac_ext
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7314 $as_echo "$am_cv_langinfo_codeset" >&6; }
7315 if test $am_cv_langinfo_codeset = yes; then
7317 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7325 $as_echo_n "checking for a traditional french locale... " >&6; }
7326 if test "${gt_cv_locale_fr+set}" = set; then :
7327 $as_echo_n "(cached) " >&6
7330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7331 /* end confdefs.h. */
7335 #if HAVE_LANGINFO_CODESET
7336 # include <langinfo.h>
7343 /* Check whether the given locale name is recognized by the system. */
7344 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
7345 /* On native Win32, setlocale(category, "") looks at the system settings,
7346 not at the environment variables. Also, when an encoding suffix such
7347 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
7348 category of the locale to "C". */
7349 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7350 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7353 if (setlocale (LC_ALL, "") == NULL) return 1;
7355 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7356 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7357 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7358 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7359 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7360 some unit tests fail.
7361 On MirBSD 10, when an unsupported locale is specified, setlocale()
7362 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7363 #if HAVE_LANGINFO_CODESET
7365 const char *cs = nl_langinfo (CODESET);
7366 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7367 || strcmp (cs, "UTF-8") == 0)
7372 /* On Cygwin, avoid locale names without encoding suffix, because the
7373 locale_charset() function relies on the encoding suffix. Note that
7374 LC_ALL is set on the command line. */
7375 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7377 /* Check whether in the abbreviation of the second month, the second
7378 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7379 one byte long. This excludes the UTF-8 encoding. */
7380 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7381 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7382 /* Check whether the decimal separator is a comma.
7383 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7384 are nl_langinfo(RADIXCHAR) are both ".". */
7385 if (localeconv () ->decimal_point[0] != ',') return 1;
7390 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7391 (eval $ac_link) 2>&5
7393 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7394 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7396 # Handle native Windows specially, because there setlocale() interprets
7397 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7398 # "fr" or "fra" as "French" or "French_France.1252",
7399 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7400 # "ja" as "Japanese" or "Japanese_Japan.932",
7403 # Test for the native Win32 locale name.
7404 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7405 gt_cv_locale_fr=French_France.1252
7408 gt_cv_locale_fr=none
7412 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7413 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
7414 # configure script would override the LC_ALL setting. Likewise for
7415 # LC_CTYPE, which is also set at the beginning of the configure script.
7416 # Test for the usual locale name.
7417 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7418 gt_cv_locale_fr=fr_FR
7420 # Test for the locale name with explicit encoding suffix.
7421 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7422 gt_cv_locale_fr=fr_FR.ISO-8859-1
7424 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7425 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7426 gt_cv_locale_fr=fr_FR.ISO8859-1
7428 # Test for the HP-UX locale name.
7429 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7430 gt_cv_locale_fr=fr_FR.iso88591
7432 # Test for the Solaris 7 locale name.
7433 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7437 gt_cv_locale_fr=none
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7450 $as_echo "$gt_cv_locale_fr" >&6; }
7451 LOCALE_FR=$gt_cv_locale_fr
7459 for ac_header in $ac_header_list
7461 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7462 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7464 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7465 cat >>confdefs.h <<_ACEOF
7466 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7475 # for STACK_DIRECTION
7482 sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
7483 FAULT_YIELDS_SIGBUS=1 ;;
7485 FAULT_YIELDS_SIGBUS=1 ;;
7486 macos* | darwin*) # MacOS X
7487 FAULT_YIELDS_SIGBUS=1 ;;
7489 FAULT_YIELDS_SIGBUS=1 ;;
7491 FAULT_YIELDS_SIGBUS=0 ;;
7494 cat >>confdefs.h <<_ACEOF
7495 #define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
7500 $as_echo_n "checking for working C stack overflow detection... " >&6; }
7501 if test "${ac_cv_sys_stack_overflow_works+set}" = set; then :
7502 $as_echo_n "(cached) " >&6
7504 if test "$cross_compiling" = yes; then :
7505 ac_cv_sys_stack_overflow_works=cross-compiling
7507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508 /* end confdefs.h. */
7513 # include <sys/types.h>
7514 # include <sys/time.h>
7515 # include <sys/resource.h>
7518 # define SIGSTKSZ 16384
7523 char buffer[2 * SIGSTKSZ];
7527 } alternate_signal_stack;
7530 segv_handler (int signo)
7539 struct sigaction act;
7543 /* Use the midpoint to avoid Irix sigaltstack bug. */
7544 st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
7545 st.ss_size = SIGSTKSZ;
7546 r = sigaltstack (&st, 0);
7550 sigemptyset (&act.sa_mask);
7551 act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
7552 act.sa_handler = segv_handler;
7553 #if FAULT_YIELDS_SIGBUS
7554 if (sigaction (SIGBUS, &act, 0) < 0)
7557 if (sigaction (SIGSEGV, &act, 0) < 0)
7561 static volatile int *
7562 recurse_1 (volatile int n, volatile int *p)
7565 *recurse_1 (n + 1, p) += n;
7569 recurse (volatile int n)
7572 return *recurse_1 (n, &sum);
7578 #if HAVE_SETRLIMIT && defined RLIMIT_STACK
7579 /* Before starting the endless recursion, try to be friendly
7580 to the user's machine. On some Linux 2.2.x systems, there
7581 is no stack limit for user processes at all. We don't want
7582 to kill such systems. */
7584 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
7585 setrlimit (RLIMIT_STACK, &rl);
7588 result = c_stack_action ();
7595 if ac_fn_c_try_run "$LINENO"; then :
7596 ac_cv_sys_stack_overflow_works=yes
7598 ac_cv_sys_stack_overflow_works=no
7600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7601 conftest.$ac_objext conftest.beam conftest.$ac_ext
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5
7606 $as_echo "$ac_cv_sys_stack_overflow_works" >&6; }
7608 if test $ac_cv_sys_stack_overflow_works = yes; then
7610 $as_echo "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
7614 $as_echo_n "checking for correct stack_t interpretation... " >&6; }
7615 if test "${gl_cv_sigaltstack_low_base+set}" = set; then :
7616 $as_echo_n "(cached) " >&6
7619 if test "$cross_compiling" = yes; then :
7620 gl_cv_sigaltstack_low_base=cross-compiling
7622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7623 /* end confdefs.h. */
7628 #if HAVE_SYS_SIGNAL_H
7629 # include <sys/signal.h>
7632 # define SIGSTKSZ 16384
7634 volatile char *stack_lower_bound;
7635 volatile char *stack_upper_bound;
7636 static void check_stack_location (volatile char *addr)
7638 if (addr >= stack_lower_bound && addr <= stack_upper_bound)
7643 static void stackoverflow_handler (int sig)
7646 check_stack_location (&dummy);
7650 char mystack[2 * SIGSTKSZ];
7652 struct sigaction action;
7653 /* Install the alternate stack. */
7654 altstack.ss_sp = mystack + SIGSTKSZ;
7655 altstack.ss_size = SIGSTKSZ;
7656 stack_lower_bound = (char *) altstack.ss_sp;
7657 stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
7658 altstack.ss_flags = 0; /* no SS_DISABLE */
7659 if (sigaltstack (&altstack, NULL) < 0)
7661 /* Install the SIGSEGV handler. */
7662 sigemptyset (&action.sa_mask);
7663 action.sa_handler = &stackoverflow_handler;
7664 action.sa_flags = SA_ONSTACK;
7665 if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
7667 /* Provoke a SIGSEGV. */
7672 if ac_fn_c_try_run "$LINENO"; then :
7673 gl_cv_sigaltstack_low_base=yes
7675 gl_cv_sigaltstack_low_base=no
7677 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7678 conftest.$ac_objext conftest.beam conftest.$ac_ext
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5
7683 $as_echo "$gl_cv_sigaltstack_low_base" >&6; }
7684 if test "$gl_cv_sigaltstack_low_base" = no; then
7686 $as_echo "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
7691 $as_echo_n "checking for precise C stack overflow detection... " >&6; }
7692 if test "${ac_cv_sys_xsi_stack_overflow_heuristic+set}" = set; then :
7693 $as_echo_n "(cached) " >&6
7695 if test "$cross_compiling" = yes; then :
7696 ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling
7698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7699 /* end confdefs.h. */
7704 # include <ucontext.h>
7707 # include <sys/types.h>
7708 # include <sys/time.h>
7709 # include <sys/resource.h>
7712 # define SIGSTKSZ 16384
7717 char buffer[2 * SIGSTKSZ];
7721 } alternate_signal_stack;
7724 # define find_stack_direction(ptr) STACK_DIRECTION
7727 find_stack_direction (char const *addr)
7730 return (! addr ? find_stack_direction (&dummy)
7731 : addr < &dummy ? 1 : -1);
7736 segv_handler (int signo, siginfo_t *info, void *context)
7738 if (0 < info->si_code)
7740 /* For XSI heuristics to work, we need uc_stack to describe
7741 the interrupted stack (as on Solaris), and not the
7742 currently executing stack (as on Linux). */
7743 ucontext_t const *user_context = context;
7744 char const *stack_min = user_context->uc_stack.ss_sp;
7745 size_t stack_size = user_context->uc_stack.ss_size;
7746 char const *faulting_address = info->si_addr;
7747 size_t s = faulting_address - stack_min;
7748 size_t page_size = sysconf (_SC_PAGESIZE);
7749 if (find_stack_direction (0) < 0)
7751 if (s < stack_size + page_size)
7762 struct sigaction act;
7766 /* Use the midpoint to avoid Irix sigaltstack bug. */
7767 st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
7768 st.ss_size = SIGSTKSZ;
7769 r = sigaltstack (&st, 0);
7773 sigemptyset (&act.sa_mask);
7774 act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
7775 act.sa_sigaction = segv_handler;
7776 #if FAULT_YIELDS_SIGBUS
7777 if (sigaction (SIGBUS, &act, 0) < 0)
7780 if (sigaction (SIGSEGV, &act, 0) < 0)
7784 static volatile int *
7785 recurse_1 (volatile int n, volatile int *p)
7788 *recurse_1 (n + 1, p) += n;
7792 recurse (volatile int n)
7795 return *recurse_1 (n, &sum);
7801 #if HAVE_SETRLIMIT && defined RLIMIT_STACK
7802 /* Before starting the endless recursion, try to be friendly
7803 to the user's machine. On some Linux 2.2.x systems, there
7804 is no stack limit for user processes at all. We don't want
7805 to kill such systems. */
7807 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
7808 setrlimit (RLIMIT_STACK, &rl);
7811 result = c_stack_action ();
7818 if ac_fn_c_try_run "$LINENO"; then :
7819 ac_cv_sys_xsi_stack_overflow_heuristic=yes
7821 ac_cv_sys_xsi_stack_overflow_heuristic=no
7823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7824 conftest.$ac_objext conftest.beam conftest.$ac_ext
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5
7829 $as_echo "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; }
7831 if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
7833 $as_echo "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
7838 if test "X$prefix" = "XNONE"; then
7839 acl_final_prefix="$ac_default_prefix"
7841 acl_final_prefix="$prefix"
7843 if test "X$exec_prefix" = "XNONE"; then
7844 acl_final_exec_prefix='${prefix}'
7846 acl_final_exec_prefix="$exec_prefix"
7848 acl_save_prefix="$prefix"
7849 prefix="$acl_final_prefix"
7850 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7851 prefix="$acl_save_prefix"
7854 # Check whether --with-gnu-ld was given.
7855 if test "${with_gnu_ld+set}" = set; then :
7856 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7861 # Prepare PATH_SEPARATOR.
7862 # The user is always right.
7863 if test "${PATH_SEPARATOR+set}" != set; then
7864 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
7865 # contains only /bin. Note that ksh looks also at the FPATH variable,
7866 # so we have to set that as well for the test.
7868 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7869 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7870 || PATH_SEPARATOR=';'
7874 if test "$GCC" = yes; then
7875 # Check if gcc -print-prog-name=ld gives a path.
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7877 $as_echo_n "checking for ld used by GCC... " >&6; }
7880 # gcc leaves a trailing carriage return which upsets mingw
7881 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7883 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7886 # Accept absolute paths.
7887 [\\/]* | [A-Za-z]:[\\/]*)
7888 re_direlt='/[^/][^/]*/\.\./'
7889 # Canonicalize the path of ld
7890 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7891 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7892 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7894 test -z "$LD" && LD="$ac_prog"
7897 # If it fails, then pretend we aren't using GCC.
7901 # If it is relative, then search for the first ld in PATH.
7905 elif test "$with_gnu_ld" = yes; then
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7907 $as_echo_n "checking for GNU ld... " >&6; }
7909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7910 $as_echo_n "checking for non-GNU ld... " >&6; }
7912 if test "${acl_cv_path_LD+set}" = set; then :
7913 $as_echo_n "(cached) " >&6
7915 if test -z "$LD"; then
7916 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7917 for ac_dir in $PATH; do
7918 test -z "$ac_dir" && ac_dir=.
7919 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7920 acl_cv_path_LD="$ac_dir/$ac_prog"
7921 # Check to see if the program is GNU ld. I'd rather use --version,
7922 # but apparently some GNU ld's only accept -v.
7923 # Break only if it was the GNU/non-GNU ld that we prefer.
7924 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
7925 *GNU* | *'with BFD'*)
7926 test "$with_gnu_ld" != no && break ;;
7928 test "$with_gnu_ld" != yes && break ;;
7934 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7938 LD="$acl_cv_path_LD"
7939 if test -n "$LD"; then
7940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7941 $as_echo "$LD" >&6; }
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7944 $as_echo "no" >&6; }
7946 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7948 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7949 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7950 $as_echo_n "(cached) " >&6
7952 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7953 case `$LD -v 2>&1 </dev/null` in
7954 *GNU* | *'with BFD'*)
7955 acl_cv_prog_gnu_ld=yes ;;
7957 acl_cv_prog_gnu_ld=no ;;
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7961 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7962 with_gnu_ld=$acl_cv_prog_gnu_ld
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7968 $as_echo_n "checking for shared library run path origin... " >&6; }
7969 if test "${acl_cv_rpath+set}" = set; then :
7970 $as_echo_n "(cached) " >&6
7973 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7974 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7981 $as_echo "$acl_cv_rpath" >&6; }
7983 acl_libext="$acl_cv_libext"
7984 acl_shlibext="$acl_cv_shlibext"
7985 acl_libname_spec="$acl_cv_libname_spec"
7986 acl_library_names_spec="$acl_cv_library_names_spec"
7987 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7988 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7989 acl_hardcode_direct="$acl_cv_hardcode_direct"
7990 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
7991 # Check whether --enable-rpath was given.
7992 if test "${enable_rpath+set}" = set; then :
7993 enableval=$enable_rpath; :
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
8006 $as_echo_n "checking for 64-bit host... " >&6; }
8007 if test "${gl_cv_solaris_64bit+set}" = set; then :
8008 $as_echo_n "(cached) " >&6
8010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8011 /* end confdefs.h. */
8018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8019 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
8020 gl_cv_solaris_64bit=yes
8022 gl_cv_solaris_64bit=no
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
8029 $as_echo "$gl_cv_solaris_64bit" >&6; }
8030 if test $gl_cv_solaris_64bit = yes; then
8031 acl_libdirstem=lib/64
8033 sparc*) acl_libdirstem2=lib/sparcv9 ;;
8034 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
8039 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
8040 if test -n "$searchpath"; then
8041 acl_save_IFS="${IFS= }"; IFS=":"
8042 for searchdir in $searchpath; do
8043 if test -d "$searchdir"; then
8044 case "$searchdir" in
8045 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
8047 # Better ignore directories of this form. They are misleading.
8049 *) searchdir=`cd "$searchdir" && pwd`
8050 case "$searchdir" in
8051 */lib64 ) acl_libdirstem=lib64 ;;
8060 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
8078 acl_save_prefix="$prefix"
8079 prefix="$acl_final_prefix"
8080 acl_save_exec_prefix="$exec_prefix"
8081 exec_prefix="$acl_final_exec_prefix"
8083 eval additional_includedir=\"$includedir\"
8084 eval additional_libdir=\"$libdir\"
8086 exec_prefix="$acl_save_exec_prefix"
8087 prefix="$acl_save_prefix"
8090 # Check whether --with-libsigsegv-prefix was given.
8091 if test "${with_libsigsegv_prefix+set}" = set; then :
8092 withval=$with_libsigsegv_prefix;
8093 if test "X$withval" = "Xno"; then
8096 if test "X$withval" = "X"; then
8098 acl_save_prefix="$prefix"
8099 prefix="$acl_final_prefix"
8100 acl_save_exec_prefix="$exec_prefix"
8101 exec_prefix="$acl_final_exec_prefix"
8103 eval additional_includedir=\"$includedir\"
8104 eval additional_libdir=\"$libdir\"
8106 exec_prefix="$acl_save_exec_prefix"
8107 prefix="$acl_save_prefix"
8110 additional_includedir="$withval/include"
8111 additional_libdir="$withval/$acl_libdirstem"
8112 if test "$acl_libdirstem2" != "$acl_libdirstem" \
8113 && ! test -d "$withval/$acl_libdirstem"; then
8114 additional_libdir="$withval/$acl_libdirstem2"
8128 names_already_handled=
8129 names_next_round='sigsegv '
8130 while test -n "$names_next_round"; do
8131 names_this_round="$names_next_round"
8133 for name in $names_this_round; do
8135 for n in $names_already_handled; do
8136 if test "$n" = "$name"; then
8141 if test -z "$already_handled"; then
8142 names_already_handled="$names_already_handled $name"
8143 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
8144 eval value=\"\$HAVE_LIB$uppername\"
8145 if test -n "$value"; then
8146 if test "$value" = yes; then
8147 eval value=\"\$LIB$uppername\"
8148 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
8149 eval value=\"\$LTLIB$uppername\"
8150 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
8159 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
8160 if test -n "$acl_shlibext"; then
8161 shrext=".$acl_shlibext" # typically: shrext=.so
8165 if test $use_additional = yes; then
8166 dir="$additional_libdir"
8167 if test -n "$acl_shlibext"; then
8168 if test -f "$dir/$libname$shrext"; then
8170 found_so="$dir/$libname$shrext"
8172 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
8173 ver=`(cd "$dir" && \
8174 for f in "$libname$shrext".*; do echo "$f"; done \
8175 | sed -e "s,^$libname$shrext\\\\.,," \
8176 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
8177 | sed 1q ) 2>/dev/null`
8178 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
8180 found_so="$dir/$libname$shrext.$ver"
8183 eval library_names=\"$acl_library_names_spec\"
8184 for f in $library_names; do
8185 if test -f "$dir/$f"; then
8194 if test "X$found_dir" = "X"; then
8195 if test -f "$dir/$libname.$acl_libext"; then
8197 found_a="$dir/$libname.$acl_libext"
8200 if test "X$found_dir" != "X"; then
8201 if test -f "$dir/$libname.la"; then
8202 found_la="$dir/$libname.la"
8206 if test "X$found_dir" = "X"; then
8207 for x in $LDFLAGS $LTLIBSIGSEGV; do
8209 acl_save_prefix="$prefix"
8210 prefix="$acl_final_prefix"
8211 acl_save_exec_prefix="$exec_prefix"
8212 exec_prefix="$acl_final_exec_prefix"
8214 exec_prefix="$acl_save_exec_prefix"
8215 prefix="$acl_save_prefix"
8219 dir=`echo "X$x" | sed -e 's/^X-L//'`
8220 if test -n "$acl_shlibext"; then
8221 if test -f "$dir/$libname$shrext"; then
8223 found_so="$dir/$libname$shrext"
8225 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
8226 ver=`(cd "$dir" && \
8227 for f in "$libname$shrext".*; do echo "$f"; done \
8228 | sed -e "s,^$libname$shrext\\\\.,," \
8229 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
8230 | sed 1q ) 2>/dev/null`
8231 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
8233 found_so="$dir/$libname$shrext.$ver"
8236 eval library_names=\"$acl_library_names_spec\"
8237 for f in $library_names; do
8238 if test -f "$dir/$f"; then
8247 if test "X$found_dir" = "X"; then
8248 if test -f "$dir/$libname.$acl_libext"; then
8250 found_a="$dir/$libname.$acl_libext"
8253 if test "X$found_dir" != "X"; then
8254 if test -f "$dir/$libname.la"; then
8255 found_la="$dir/$libname.la"
8260 if test "X$found_dir" != "X"; then
8265 if test "X$found_dir" != "X"; then
8266 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
8267 if test "X$found_so" != "X"; then
8268 if test "$enable_rpath" = no \
8269 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
8270 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
8271 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8274 for x in $ltrpathdirs; do
8275 if test "X$x" = "X$found_dir"; then
8280 if test -z "$haveit"; then
8281 ltrpathdirs="$ltrpathdirs $found_dir"
8283 if test "$acl_hardcode_direct" = yes; then
8284 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8286 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
8287 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8289 for x in $rpathdirs; do
8290 if test "X$x" = "X$found_dir"; then
8295 if test -z "$haveit"; then
8296 rpathdirs="$rpathdirs $found_dir"
8300 for x in $LDFLAGS $LIBSIGSEGV; do
8302 acl_save_prefix="$prefix"
8303 prefix="$acl_final_prefix"
8304 acl_save_exec_prefix="$exec_prefix"
8305 exec_prefix="$acl_final_exec_prefix"
8307 exec_prefix="$acl_save_exec_prefix"
8308 prefix="$acl_save_prefix"
8310 if test "X$x" = "X-L$found_dir"; then
8315 if test -z "$haveit"; then
8316 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
8318 if test "$acl_hardcode_minus_L" != no; then
8319 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8321 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
8327 if test "X$found_a" != "X"; then
8328 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
8330 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
8333 additional_includedir=
8334 case "$found_dir" in
8335 */$acl_libdirstem | */$acl_libdirstem/)
8336 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
8337 if test "$name" = 'sigsegv'; then
8338 LIBSIGSEGV_PREFIX="$basedir"
8340 additional_includedir="$basedir/include"
8342 */$acl_libdirstem2 | */$acl_libdirstem2/)
8343 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
8344 if test "$name" = 'sigsegv'; then
8345 LIBSIGSEGV_PREFIX="$basedir"
8347 additional_includedir="$basedir/include"
8350 if test "X$additional_includedir" != "X"; then
8351 if test "X$additional_includedir" != "X/usr/include"; then
8353 if test "X$additional_includedir" = "X/usr/local/include"; then
8354 if test -n "$GCC"; then
8356 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8360 if test -z "$haveit"; then
8361 for x in $CPPFLAGS $INCSIGSEGV; do
8363 acl_save_prefix="$prefix"
8364 prefix="$acl_final_prefix"
8365 acl_save_exec_prefix="$exec_prefix"
8366 exec_prefix="$acl_final_exec_prefix"
8368 exec_prefix="$acl_save_exec_prefix"
8369 prefix="$acl_save_prefix"
8371 if test "X$x" = "X-I$additional_includedir"; then
8376 if test -z "$haveit"; then
8377 if test -d "$additional_includedir"; then
8378 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
8384 if test -n "$found_la"; then
8385 save_libdir="$libdir"
8387 */* | *\\*) . "$found_la" ;;
8388 *) . "./$found_la" ;;
8390 libdir="$save_libdir"
8391 for dep in $dependency_libs; do
8394 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8395 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
8396 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
8398 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
8399 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
8400 if test -n "$GCC"; then
8402 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8406 if test -z "$haveit"; then
8408 for x in $LDFLAGS $LIBSIGSEGV; do
8410 acl_save_prefix="$prefix"
8411 prefix="$acl_final_prefix"
8412 acl_save_exec_prefix="$exec_prefix"
8413 exec_prefix="$acl_final_exec_prefix"
8415 exec_prefix="$acl_save_exec_prefix"
8416 prefix="$acl_save_prefix"
8418 if test "X$x" = "X-L$additional_libdir"; then
8423 if test -z "$haveit"; then
8424 if test -d "$additional_libdir"; then
8425 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
8429 for x in $LDFLAGS $LTLIBSIGSEGV; do
8431 acl_save_prefix="$prefix"
8432 prefix="$acl_final_prefix"
8433 acl_save_exec_prefix="$exec_prefix"
8434 exec_prefix="$acl_final_exec_prefix"
8436 exec_prefix="$acl_save_exec_prefix"
8437 prefix="$acl_save_prefix"
8439 if test "X$x" = "X-L$additional_libdir"; then
8444 if test -z "$haveit"; then
8445 if test -d "$additional_libdir"; then
8446 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
8453 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8454 if test "$enable_rpath" != no; then
8456 for x in $rpathdirs; do
8457 if test "X$x" = "X$dir"; then
8462 if test -z "$haveit"; then
8463 rpathdirs="$rpathdirs $dir"
8466 for x in $ltrpathdirs; do
8467 if test "X$x" = "X$dir"; then
8472 if test -z "$haveit"; then
8473 ltrpathdirs="$ltrpathdirs $dir"
8478 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8481 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8484 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
8485 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
8491 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
8492 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
8498 if test "X$rpathdirs" != "X"; then
8499 if test -n "$acl_hardcode_libdir_separator"; then
8501 for found_dir in $rpathdirs; do
8502 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
8504 acl_save_libdir="$libdir"
8506 eval flag=\"$acl_hardcode_libdir_flag_spec\"
8507 libdir="$acl_save_libdir"
8508 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
8510 for found_dir in $rpathdirs; do
8511 acl_save_libdir="$libdir"
8513 eval flag=\"$acl_hardcode_libdir_flag_spec\"
8514 libdir="$acl_save_libdir"
8515 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
8519 if test "X$ltrpathdirs" != "X"; then
8520 for found_dir in $ltrpathdirs; do
8521 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
8531 ac_save_CPPFLAGS="$CPPFLAGS"
8533 for element in $INCSIGSEGV; do
8535 for x in $CPPFLAGS; do
8537 acl_save_prefix="$prefix"
8538 prefix="$acl_final_prefix"
8539 acl_save_exec_prefix="$exec_prefix"
8540 exec_prefix="$acl_final_exec_prefix"
8542 exec_prefix="$acl_save_exec_prefix"
8543 prefix="$acl_save_prefix"
8545 if test "X$x" = "X$element"; then
8550 if test -z "$haveit"; then
8551 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
8557 $as_echo_n "checking for libsigsegv... " >&6; }
8558 if test "${ac_cv_libsigsegv+set}" = set; then :
8559 $as_echo_n "(cached) " >&6
8562 ac_save_LIBS="$LIBS"
8563 case " $LIBSIGSEGV" in
8564 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
8565 *) LIBS="$LIBSIGSEGV $LIBS" ;;
8567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8568 /* end confdefs.h. */
8569 #include <sigsegv.h>
8573 sigsegv_deinstall_handler();
8578 if ac_fn_c_try_link "$LINENO"; then :
8579 ac_cv_libsigsegv=yes
8581 ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
8583 rm -f core conftest.err conftest.$ac_objext \
8584 conftest$ac_exeext conftest.$ac_ext
8585 LIBS="$ac_save_LIBS"
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
8589 $as_echo "$ac_cv_libsigsegv" >&6; }
8590 if test "$ac_cv_libsigsegv" = yes; then
8593 $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
8595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
8596 $as_echo_n "checking how to link with libsigsegv... " >&6; }
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
8598 $as_echo "$LIBSIGSEGV" >&6; }
8601 CPPFLAGS="$ac_save_CPPFLAGS"
8613 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
8627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8628 $as_echo_n "checking whether // is distinct from /... " >&6; }
8629 if test "${gl_cv_double_slash_root+set}" = set; then :
8630 $as_echo_n "(cached) " >&6
8632 if test x"$cross_compiling" = xyes ; then
8633 # When cross-compiling, there is no way to tell whether // is special
8634 # short of a list of hosts. However, the only known hosts to date
8635 # that have a distinct // are Apollo DomainOS (too old to port to),
8636 # Cygwin, and z/OS. If anyone knows of another system for which // has
8637 # special semantics and is distinct from /, please report it to
8638 # <bug-gnulib@gnu.org>.
8640 *-cygwin | i370-ibm-openedition)
8641 gl_cv_double_slash_root=yes ;;
8643 # Be optimistic and assume that / and // are the same when we
8645 gl_cv_double_slash_root='unknown, assuming no' ;;
8648 set x `ls -di / // 2>/dev/null`
8649 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8650 gl_cv_double_slash_root=no
8652 gl_cv_double_slash_root=yes
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8657 $as_echo "$gl_cv_double_slash_root" >&6; }
8658 if test "$gl_cv_double_slash_root" = yes; then
8660 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8669 $as_echo_n "checking whether realpath works... " >&6; }
8670 if test "${gl_cv_func_realpath_works+set}" = set; then :
8671 $as_echo_n "(cached) " >&6
8675 if test "$cross_compiling" = yes; then :
8676 gl_cv_func_realpath_works="guessing no"
8678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8679 /* end confdefs.h. */
8690 char *name = realpath ("conftest.a", NULL);
8691 if (!(name && *name == '/'))
8695 char *name = realpath ("conftest.b/../conftest.a", NULL);
8700 char *name = realpath ("conftest.a/", NULL);
8711 if ac_fn_c_try_run "$LINENO"; then :
8712 gl_cv_func_realpath_works=yes
8714 gl_cv_func_realpath_works=no
8716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8717 conftest.$ac_objext conftest.beam conftest.$ac_ext
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8723 $as_echo "$gl_cv_func_realpath_works" >&6; }
8724 if test "$gl_cv_func_realpath_works" = yes; then
8726 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8742 GNULIB_CALLOC_POSIX=0;
8743 GNULIB_CANONICALIZE_FILE_NAME=0;
8744 GNULIB_GETLOADAVG=0;
8747 GNULIB_MALLOC_POSIX=0;
8757 GNULIB_REALLOC_POSIX=0;
8764 GNULIB_SYSTEM_POSIX=0;
8770 HAVE_CANONICALIZE_FILE_NAME=1;
8771 HAVE_DECL_GETLOADAVG=1;
8789 HAVE_STRUCT_RANDOM_DATA=1;
8790 HAVE_SYS_LOADAVG_H=0;
8792 HAVE_DECL_UNSETENV=1;
8794 REPLACE_CANONICALIZE_FILE_NAME=0;
8812 GNULIB_EUIDACCESS=0;
8819 GNULIB_GETDOMAINNAME=0;
8820 GNULIB_GETDTABLESIZE=0;
8822 GNULIB_GETHOSTNAME=0;
8824 GNULIB_GETLOGIN_R=0;
8825 GNULIB_GETPAGESIZE=0;
8826 GNULIB_GETUSERSHELL=0;
8836 GNULIB_READLINKAT=0;
8842 GNULIB_UNISTD_H_GETOPT=0;
8843 GNULIB_UNISTD_H_SIGPIPE=0;
8857 HAVE_GETDTABLESIZE=1;
8876 HAVE_DECL_ENVIRON=1;
8878 HAVE_DECL_GETDOMAINNAME=1;
8879 HAVE_DECL_GETLOGIN_R=1;
8880 HAVE_DECL_GETPAGESIZE=1;
8881 HAVE_DECL_GETUSERSHELL=1;
8882 HAVE_DECL_TTYNAME_R=1;
8891 REPLACE_GETDOMAINNAME=0;
8892 REPLACE_GETLOGIN_R=0;
8893 REPLACE_GETGROUPS=0;
8894 REPLACE_GETPAGESIZE=0;
8905 REPLACE_TTYNAME_R=0;
8910 UNISTD_H_HAVE_WINSOCK2_H=0;
8911 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8923 M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
8933 M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
8943 M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8959 $as_echo_n "checking if environ is properly declared... " >&6; }
8960 if test "${gt_cv_var_environ_declaration+set}" = set; then :
8961 $as_echo_n "(cached) " >&6
8964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8965 /* end confdefs.h. */
8967 extern struct { int foo; } environ;
8976 if ac_fn_c_try_compile "$LINENO"; then :
8977 gt_cv_var_environ_declaration=no
8979 gt_cv_var_environ_declaration=yes
8981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8985 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8986 if test $gt_cv_var_environ_declaration = yes; then
8988 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8993 if test $gt_cv_var_environ_declaration != yes; then
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9000 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9001 if test "${gl_cv_have_include_next+set}" = set; then :
9002 $as_echo_n "(cached) " >&6
9004 rm -rf conftestd1a conftestd1b conftestd2
9005 mkdir conftestd1a conftestd1b conftestd2
9006 cat <<EOF > conftestd1a/conftest.h
9007 #define DEFINED_IN_CONFTESTD1
9008 #include_next <conftest.h>
9009 #ifdef DEFINED_IN_CONFTESTD2
9012 #error "include_next doesn't work"
9015 cat <<EOF > conftestd1b/conftest.h
9016 #define DEFINED_IN_CONFTESTD1
9018 #include_next <conftest.h>
9019 #ifdef DEFINED_IN_CONFTESTD2
9022 #error "include_next doesn't work"
9025 cat <<EOF > conftestd2/conftest.h
9026 #ifndef DEFINED_IN_CONFTESTD1
9027 #error "include_next test doesn't work"
9029 #define DEFINED_IN_CONFTESTD2
9031 gl_save_CPPFLAGS="$CPPFLAGS"
9032 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9034 /* end confdefs.h. */
9035 #include <conftest.h>
9037 if ac_fn_c_try_compile "$LINENO"; then :
9038 gl_cv_have_include_next=yes
9040 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9042 /* end confdefs.h. */
9043 #include <conftest.h>
9045 if ac_fn_c_try_compile "$LINENO"; then :
9046 gl_cv_have_include_next=buggy
9048 gl_cv_have_include_next=no
9050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9054 CPPFLAGS="$gl_save_CPPFLAGS"
9055 rm -rf conftestd1a conftestd1b conftestd2
9058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9059 $as_echo "$gl_cv_have_include_next" >&6; }
9060 PRAGMA_SYSTEM_HEADER=
9061 if test $gl_cv_have_include_next = yes; then
9062 INCLUDE_NEXT=include_next
9063 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9064 if test -n "$GCC"; then
9065 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9068 if test $gl_cv_have_include_next = buggy; then
9069 INCLUDE_NEXT=include
9070 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9072 INCLUDE_NEXT=include
9073 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9080 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9081 if test "${gl_cv_pragma_columns+set}" = set; then :
9082 $as_echo_n "(cached) " >&6
9084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9085 /* end confdefs.h. */
9092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9093 $EGREP "choke me" >/dev/null 2>&1; then :
9094 gl_cv_pragma_columns=yes
9096 gl_cv_pragma_columns=no
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9103 $as_echo "$gl_cv_pragma_columns" >&6; }
9104 if test $gl_cv_pragma_columns = yes; then
9105 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9114 $as_echo_n "checking for complete errno.h... " >&6; }
9115 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
9116 $as_echo_n "(cached) " >&6
9119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9120 /* end confdefs.h. */
9129 #if !defined ENOLINK
9135 #if !defined EMULTIHOP
9138 #if !defined EBADMSG
9141 #if !defined EOVERFLOW
9144 #if !defined ENOTSUP
9153 #if !defined ECANCELED
9158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9159 $EGREP "booboo" >/dev/null 2>&1; then :
9160 gl_cv_header_errno_h_complete=no
9162 gl_cv_header_errno_h_complete=yes
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9169 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
9170 if test $gl_cv_header_errno_h_complete = yes; then
9181 if test $gl_cv_have_include_next = yes; then
9182 gl_cv_next_errno_h='<'errno.h'>'
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9185 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
9186 if test "${gl_cv_next_errno_h+set}" = set; then :
9187 $as_echo_n "(cached) " >&6
9190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9191 /* end confdefs.h. */
9196 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9197 *) gl_absname_cpp="$ac_cpp" ;;
9199 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9200 sed -n '\#/errno.h#{
9201 s#.*"\(.*/errno.h\)".*#\1#
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9210 $as_echo "$gl_cv_next_errno_h" >&6; }
9212 NEXT_ERRNO_H=$gl_cv_next_errno_h
9214 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9215 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9216 gl_next_as_first_directive='<'errno.h'>'
9218 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9219 gl_next_as_first_directive=$gl_cv_next_errno_h
9221 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9230 if test -n "$ERRNO_H"; then
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9232 $as_echo_n "checking for EMULTIHOP value... " >&6; }
9233 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
9234 $as_echo_n "(cached) " >&6
9237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9238 /* end confdefs.h. */
9246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9247 $EGREP "yes" >/dev/null 2>&1; then :
9248 gl_cv_header_errno_h_EMULTIHOP=yes
9250 gl_cv_header_errno_h_EMULTIHOP=no
9254 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9256 /* end confdefs.h. */
9258 #define _XOPEN_SOURCE_EXTENDED 1
9265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9266 $EGREP "yes" >/dev/null 2>&1; then :
9267 gl_cv_header_errno_h_EMULTIHOP=hidden
9271 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9272 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
9273 #define _XOPEN_SOURCE_EXTENDED 1
9275 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9287 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9288 case $gl_cv_header_errno_h_EMULTIHOP in
9290 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9293 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9301 if test -n "$ERRNO_H"; then
9302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9303 $as_echo_n "checking for ENOLINK value... " >&6; }
9304 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
9305 $as_echo_n "(cached) " >&6
9308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9309 /* end confdefs.h. */
9317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9318 $EGREP "yes" >/dev/null 2>&1; then :
9319 gl_cv_header_errno_h_ENOLINK=yes
9321 gl_cv_header_errno_h_ENOLINK=no
9325 if test $gl_cv_header_errno_h_ENOLINK = no; then
9326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9327 /* end confdefs.h. */
9329 #define _XOPEN_SOURCE_EXTENDED 1
9336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9337 $EGREP "yes" >/dev/null 2>&1; then :
9338 gl_cv_header_errno_h_ENOLINK=hidden
9342 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9343 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
9344 #define _XOPEN_SOURCE_EXTENDED 1
9346 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9358 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9359 case $gl_cv_header_errno_h_ENOLINK in
9361 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9364 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9372 if test -n "$ERRNO_H"; then
9373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9374 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9375 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
9376 $as_echo_n "(cached) " >&6
9379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9380 /* end confdefs.h. */
9388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9389 $EGREP "yes" >/dev/null 2>&1; then :
9390 gl_cv_header_errno_h_EOVERFLOW=yes
9392 gl_cv_header_errno_h_EOVERFLOW=no
9396 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9398 /* end confdefs.h. */
9400 #define _XOPEN_SOURCE_EXTENDED 1
9407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9408 $EGREP "yes" >/dev/null 2>&1; then :
9409 gl_cv_header_errno_h_EOVERFLOW=hidden
9413 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9414 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
9415 #define _XOPEN_SOURCE_EXTENDED 1
9417 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9429 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9430 case $gl_cv_header_errno_h_EOVERFLOW in
9432 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9435 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9443 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9444 if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
9450 cat >>confdefs.h <<_ACEOF
9451 #define HAVE_DECL_STRERROR_R $ac_have_decl
9454 for ac_func in strerror_r
9456 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9457 if test "x$ac_cv_func_strerror_r" = x""yes; then :
9458 cat >>confdefs.h <<_ACEOF
9459 #define HAVE_STRERROR_R 1
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9466 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9467 if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
9468 $as_echo_n "(cached) " >&6
9471 ac_cv_func_strerror_r_char_p=no
9472 if test $ac_cv_have_decl_strerror_r = yes; then
9473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9474 /* end confdefs.h. */
9475 $ac_includes_default
9481 char x = *strerror_r (0, buf, sizeof buf);
9482 char *p = strerror_r (0, buf, sizeof buf);
9489 if ac_fn_c_try_compile "$LINENO"; then :
9490 ac_cv_func_strerror_r_char_p=yes
9492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9494 # strerror_r is not declared. Choose between
9495 # systems that have relatively inaccessible declarations for the
9496 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
9497 # former has a strerror_r that returns char*, while the latter
9498 # has a strerror_r that returns `int'.
9499 # This test should segfault on the DEC system.
9500 if test "$cross_compiling" = yes; then :
9503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9504 /* end confdefs.h. */
9505 $ac_includes_default
9506 extern char *strerror_r ();
9511 char x = *strerror_r (0, buf, sizeof buf);
9512 return ! isalpha (x);
9517 if ac_fn_c_try_run "$LINENO"; then :
9518 ac_cv_func_strerror_r_char_p=yes
9520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9521 conftest.$ac_objext conftest.beam conftest.$ac_ext
9527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9528 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9529 if test $ac_cv_func_strerror_r_char_p = yes; then
9531 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9536 $as_echo_n "checking for inline... " >&6; }
9537 if test "${ac_cv_c_inline+set}" = set; then :
9538 $as_echo_n "(cached) " >&6
9541 for ac_kw in inline __inline__ __inline; do
9542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9543 /* end confdefs.h. */
9546 static $ac_kw foo_t static_foo () {return 0; }
9547 $ac_kw foo_t foo () {return 0; }
9551 if ac_fn_c_try_compile "$LINENO"; then :
9552 ac_cv_c_inline=$ac_kw
9554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9555 test "$ac_cv_c_inline" != no && break
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9560 $as_echo "$ac_cv_c_inline" >&6; }
9562 case $ac_cv_c_inline in
9565 case $ac_cv_c_inline in
9567 *) ac_val=$ac_cv_c_inline;;
9569 cat >>confdefs.h <<_ACEOF
9571 #define inline $ac_val
9578 XGETTEXT_EXTRA_OPTIONS=
9580 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9581 if test "x$ac_cv_type_mode_t" = x""yes; then :
9585 cat >>confdefs.h <<_ACEOF
9592 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
9594 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
9596 cat >>confdefs.h <<_ACEOF
9597 #define HAVE_SIG_ATOMIC_T 1
9603 $as_echo "#define sig_atomic_t int" >>confdefs.h
9614 GNULIB_FPRINTF_POSIX=0;
9626 GNULIB_OBSTACK_PRINTF=0;
9627 GNULIB_OBSTACK_PRINTF_POSIX=0;
9631 GNULIB_PRINTF_POSIX=0;
9639 GNULIB_SPRINTF_POSIX=0;
9640 GNULIB_STDIO_H_SIGPIPE=0;
9645 GNULIB_VFPRINTF_POSIX=0;
9647 GNULIB_VPRINTF_POSIX=0;
9649 GNULIB_VSPRINTF_POSIX=0;
9653 HAVE_DECL_GETDELIM=1;
9654 HAVE_DECL_GETLINE=1;
9655 HAVE_DECL_OBSTACK_PRINTF=1;
9656 HAVE_DECL_SNPRINTF=1;
9657 HAVE_DECL_VSNPRINTF=1;
9677 REPLACE_OBSTACK_PRINTF=0;
9686 REPLACE_STDIO_WRITE_FUNCS=0;
9688 REPLACE_VASPRINTF=0;
9692 REPLACE_VSNPRINTF=0;
9707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9708 $as_echo_n "checking for working fcntl.h... " >&6; }
9709 if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
9710 $as_echo_n "(cached) " >&6
9712 if test "$cross_compiling" = yes; then :
9713 gl_cv_header_working_fcntl_h=cross-compiling
9715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9716 /* end confdefs.h. */
9717 #include <sys/types.h>
9718 #include <sys/stat.h>
9725 #define O_NOFOLLOW 0
9727 static int const constants[] =
9729 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9730 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9737 int result = !constants;
9739 static char const sym[] = "conftest.sym";
9740 if (symlink (".", sym) != 0)
9744 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9754 static char const file[] = "confdefs.h";
9755 int fd = open (file, O_RDONLY | O_NOATIME);
9761 if (fstat (fd, &st0) != 0)
9767 if (read (fd, &c, 1) != 1)
9771 if (close (fd) != 0)
9776 if (stat (file, &st1) != 0)
9779 if (st0.st_atime != st1.st_atime)
9791 if ac_fn_c_try_run "$LINENO"; then :
9792 gl_cv_header_working_fcntl_h=yes
9795 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9796 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9797 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9798 *) gl_cv_header_working_fcntl_h='no';;
9801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9802 conftest.$ac_objext conftest.beam conftest.$ac_ext
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9807 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9809 case $gl_cv_header_working_fcntl_h in #(
9810 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9814 cat >>confdefs.h <<_ACEOF
9815 #define HAVE_WORKING_O_NOATIME $ac_val
9819 case $gl_cv_header_working_fcntl_h in #(
9820 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9824 cat >>confdefs.h <<_ACEOF
9825 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
9835 $as_echo_n "checking for fseeko... " >&6; }
9836 if test "${gl_cv_func_fseeko+set}" = set; then :
9837 $as_echo_n "(cached) " >&6
9840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9841 /* end confdefs.h. */
9847 fseeko (stdin, 0, 0);
9852 if ac_fn_c_try_link "$LINENO"; then :
9853 gl_cv_func_fseeko=yes
9855 gl_cv_func_fseeko=no
9857 rm -f core conftest.err conftest.$ac_objext \
9858 conftest$ac_exeext conftest.$ac_ext
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
9862 $as_echo "$gl_cv_func_fseeko" >&6; }
9875 M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
9975 REPLACE_SIGNBIT_USING_GCC=0;
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9982 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9983 if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
9984 $as_echo_n "(cached) " >&6
9987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9988 /* end confdefs.h. */
9994 int e; return frexp (x, &e) > 0;
9999 if ac_fn_c_try_link "$LINENO"; then :
10000 gl_cv_func_frexp_no_libm=yes
10002 gl_cv_func_frexp_no_libm=no
10004 rm -f core conftest.err conftest.$ac_objext \
10005 conftest$ac_exeext conftest.$ac_ext
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
10009 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10013 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10014 if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
10015 $as_echo_n "(cached) " >&6
10017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10018 /* end confdefs.h. */
10023 #if defined __SL64 && defined __SCLE /* cygwin */
10024 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10025 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
10026 it is easier to do a version check than building a runtime test. */
10027 # include <cygwin/version.h>
10028 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10036 if ac_fn_c_try_link "$LINENO"; then :
10037 gl_cv_var_stdin_large_offset=yes
10039 gl_cv_var_stdin_large_offset=no
10041 rm -f core conftest.err conftest.$ac_objext \
10042 conftest$ac_exeext conftest.$ac_ext
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10045 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10047 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10048 if test "x$ac_cv_have_decl_fseeko" = x""yes; then :
10054 cat >>confdefs.h <<_ACEOF
10055 #define HAVE_DECL_FSEEKO $ac_have_decl
10058 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
10059 if test "x$ac_cv_have_decl_ftello" = x""yes; then :
10065 cat >>confdefs.h <<_ACEOF
10066 #define HAVE_DECL_FTELLO $ac_have_decl
10086 if test $gl_cv_have_include_next = yes; then
10087 gl_cv_next_getopt_h='<'getopt.h'>'
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
10090 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
10091 if test "${gl_cv_next_getopt_h+set}" = set; then :
10092 $as_echo_n "(cached) " >&6
10095 if test $ac_cv_header_getopt_h = yes; then
10098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10099 /* end confdefs.h. */
10100 #include <getopt.h>
10104 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10105 *) gl_absname_cpp="$ac_cpp" ;;
10107 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10108 sed -n '\#/getopt.h#{
10109 s#.*"\(.*/getopt.h\)".*#\1#
10115 gl_cv_next_getopt_h='<'getopt.h'>'
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
10121 $as_echo "$gl_cv_next_getopt_h" >&6; }
10123 NEXT_GETOPT_H=$gl_cv_next_getopt_h
10125 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10126 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10127 gl_next_as_first_directive='<'getopt.h'>'
10129 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10130 gl_next_as_first_directive=$gl_cv_next_getopt_h
10132 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
10137 if test $ac_cv_header_getopt_h = yes; then
10146 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10147 for ac_header in getopt.h
10149 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
10150 if test "x$ac_cv_header_getopt_h" = x""yes; then :
10151 cat >>confdefs.h <<_ACEOF
10152 #define HAVE_GETOPT_H 1
10156 gl_replace_getopt=yes
10163 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10164 for ac_func in getopt_long_only
10166 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
10167 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
10168 cat >>confdefs.h <<_ACEOF
10169 #define HAVE_GETOPT_LONG_ONLY 1
10173 gl_replace_getopt=yes
10179 if test -z "$gl_replace_getopt"; then
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
10181 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
10182 if test "${gl_cv_func_getopt_posix+set}" = set; then :
10183 $as_echo_n "(cached) " >&6
10186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10187 /* end confdefs.h. */
10188 #include <unistd.h>
10192 int *p = &optreset; return optreset;
10197 if ac_fn_c_try_compile "$LINENO"; then :
10200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10201 /* end confdefs.h. */
10202 #include <getopt.h>
10206 return !getopt_clip;
10211 if ac_fn_c_try_compile "$LINENO"; then :
10216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10220 gl_save_CPPFLAGS=$CPPFLAGS
10221 CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
10222 if test "$cross_compiling" = yes; then :
10224 mingw*) gl_cv_func_getopt_posix="guessing no";;
10225 darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
10226 *) gl_cv_func_getopt_posix="guessing yes";;
10230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10231 /* end confdefs.h. */
10233 #include <unistd.h>
10234 #include <stdlib.h>
10235 #include <string.h>
10245 argv[argc++] = "program";
10246 argv[argc++] = "-a";
10247 argv[argc++] = "foo";
10248 argv[argc++] = "bar";
10250 optind = OPTIND_MIN;
10253 c = getopt (argc, argv, "ab");
10256 c = getopt (argc, argv, "ab");
10259 if (!(optind == 2))
10262 /* Some internal state exists at this point. */
10268 argv[argc++] = "program";
10269 argv[argc++] = "donald";
10270 argv[argc++] = "-p";
10271 argv[argc++] = "billy";
10272 argv[argc++] = "duck";
10273 argv[argc++] = "-a";
10274 argv[argc++] = "bar";
10276 optind = OPTIND_MIN;
10279 c = getopt (argc, argv, "+abp:q:");
10282 if (!(strcmp (argv[0], "program") == 0))
10284 if (!(strcmp (argv[1], "donald") == 0))
10286 if (!(strcmp (argv[2], "-p") == 0))
10288 if (!(strcmp (argv[3], "billy") == 0))
10290 if (!(strcmp (argv[4], "duck") == 0))
10292 if (!(strcmp (argv[5], "-a") == 0))
10294 if (!(strcmp (argv[6], "bar") == 0))
10296 if (!(optind == 1))
10299 /* Detect MacOS 10.5, AIX 7.1 bug. */
10301 char *argv[3] = { "program", "-ab", NULL };
10302 optind = OPTIND_MIN;
10304 if (getopt (2, argv, "ab:") != 'a')
10306 if (getopt (2, argv, "ab:") != '?')
10318 if ac_fn_c_try_run "$LINENO"; then :
10319 gl_cv_func_getopt_posix=yes
10321 gl_cv_func_getopt_posix=no
10323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10324 conftest.$ac_objext conftest.beam conftest.$ac_ext
10327 CPPFLAGS=$gl_save_CPPFLAGS
10330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
10331 $as_echo "$gl_cv_func_getopt_posix" >&6; }
10332 case "$gl_cv_func_getopt_posix" in
10333 *no) gl_replace_getopt=yes ;;
10337 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
10339 $as_echo_n "checking for working GNU getopt function... " >&6; }
10340 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
10341 $as_echo_n "(cached) " >&6
10343 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
10344 # optstring is necessary for programs like m4 that have POSIX-mandated
10345 # semantics for supporting options interspersed with files.
10346 # Also, since getopt_long is a GNU extension, we require optind=0.
10347 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
10348 # so take care to revert to the correct (non-)export state.
10349 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
10350 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
10351 xx) gl_had_POSIXLY_CORRECT=exported ;;
10352 x) gl_had_POSIXLY_CORRECT=yes ;;
10353 *) gl_had_POSIXLY_CORRECT= ;;
10356 export POSIXLY_CORRECT
10357 if test "$cross_compiling" = yes; then :
10358 case $host_os:$ac_cv_have_decl_optreset in
10359 *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
10360 *:yes) gl_cv_func_getopt_gnu=no;;
10361 *) gl_cv_func_getopt_gnu=yes;;
10365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10366 /* end confdefs.h. */
10367 #include <getopt.h>
10368 #include <stddef.h>
10369 #include <string.h>
10376 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
10377 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
10378 OSF/1 5.1, Solaris 10. */
10381 myargv[0] = "conftest";
10385 if (getopt (2, myargv, "+a") != '?')
10388 /* This code succeeds on glibc 2.8, mingw,
10389 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
10390 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
10392 char *argv[] = { "program", "-p", "foo", "bar", NULL };
10395 if (getopt (4, argv, "p::") != 'p')
10397 else if (optarg != NULL)
10399 else if (getopt (4, argv, "p::") != -1)
10401 else if (optind != 2)
10404 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
10406 char *argv[] = { "program", "foo", "-p", NULL };
10408 if (getopt (3, argv, "-p") != 1)
10410 else if (getopt (3, argv, "-p") != 'p')
10413 /* This code fails on glibc 2.11. */
10415 char *argv[] = { "program", "-b", "-a", NULL };
10416 optind = opterr = 0;
10417 if (getopt (3, argv, "+:a:b") != 'b')
10419 else if (getopt (3, argv, "+:a:b") != ':')
10428 if ac_fn_c_try_run "$LINENO"; then :
10429 gl_cv_func_getopt_gnu=yes
10431 gl_cv_func_getopt_gnu=no
10433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10434 conftest.$ac_objext conftest.beam conftest.$ac_ext
10437 case $gl_had_POSIXLY_CORRECT in
10439 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
10440 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
10445 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
10446 if test "$gl_cv_func_getopt_gnu" = "no"; then
10447 gl_replace_getopt=yes
10451 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
10452 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
10458 cat >>confdefs.h <<_ACEOF
10459 #define HAVE_DECL_GETENV $ac_have_decl
10467 if test -n "$gl_replace_getopt"; then :
10473 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
10477 GNULIB_UNISTD_H_GETOPT=1
10486 M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
10496 M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10507 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10508 if test "${ac_cv_c_restrict+set}" = set; then :
10509 $as_echo_n "(cached) " >&6
10511 ac_cv_c_restrict=no
10512 # The order here caters to the fact that C++ does not require restrict.
10513 for ac_kw in __restrict __restrict__ _Restrict restrict; do
10514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10515 /* end confdefs.h. */
10516 typedef int * int_ptr;
10517 int foo (int_ptr $ac_kw ip) {
10524 int * $ac_kw t = s;
10531 if ac_fn_c_try_compile "$LINENO"; then :
10532 ac_cv_c_restrict=$ac_kw
10534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10535 test "$ac_cv_c_restrict" != no && break
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10540 $as_echo "$ac_cv_c_restrict" >&6; }
10542 case $ac_cv_c_restrict in
10544 no) $as_echo "#define restrict /**/" >>confdefs.h
10546 *) cat >>confdefs.h <<_ACEOF
10547 #define restrict $ac_cv_c_restrict
10553 GNULIB_GETTIMEOFDAY=0;
10554 HAVE_GETTIMEOFDAY=1;
10555 HAVE_STRUCT_TIMEVAL=1;
10557 REPLACE_GETTIMEOFDAY=0;
10574 if test $gl_cv_have_include_next = yes; then
10575 gl_cv_next_sys_time_h='<'sys/time.h'>'
10577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
10578 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
10579 if test "${gl_cv_next_sys_time_h+set}" = set; then :
10580 $as_echo_n "(cached) " >&6
10583 if test $ac_cv_header_sys_time_h = yes; then
10586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10587 /* end confdefs.h. */
10588 #include <sys/time.h>
10592 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10593 *) gl_absname_cpp="$ac_cpp" ;;
10595 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10596 sed -n '\#/sys/time.h#{
10597 s#.*"\(.*/sys/time.h\)".*#\1#
10603 gl_cv_next_sys_time_h='<'sys/time.h'>'
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
10609 $as_echo "$gl_cv_next_sys_time_h" >&6; }
10611 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
10613 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10614 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10615 gl_next_as_first_directive='<'sys/time.h'>'
10617 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10618 gl_next_as_first_directive=$gl_cv_next_sys_time_h
10620 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
10626 if test $ac_cv_header_sys_time_h != yes; then
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
10631 $as_echo_n "checking for struct timeval... " >&6; }
10632 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
10633 $as_echo_n "(cached) " >&6
10635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10636 /* end confdefs.h. */
10637 #if HAVE_SYS_TIME_H
10638 #include <sys/time.h>
10645 static struct timeval x; x.tv_sec = x.tv_usec;
10650 if ac_fn_c_try_compile "$LINENO"; then :
10651 gl_cv_sys_struct_timeval=yes
10653 gl_cv_sys_struct_timeval=no
10655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
10658 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
10659 if test $gl_cv_sys_struct_timeval != yes; then
10660 HAVE_STRUCT_TIMEVAL=0
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
10672 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
10673 if test "${gl_cv_cc_float_expbit0+set}" = set; then :
10674 $as_echo_n "(cached) " >&6
10677 if test "$cross_compiling" = yes; then :
10678 gl_cv_cc_float_expbit0="word 0 bit 23"
10680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10681 /* end confdefs.h. */
10684 #include <stddef.h>
10686 #include <string.h>
10688 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10689 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
10690 static unsigned int ored_words[NWORDS];
10691 static unsigned int anded_words[NWORDS];
10692 static void add_to_ored_words (float x)
10696 /* Clear it first, in case
10697 sizeof (float) < sizeof (memory_float). */
10698 memset (&m, 0, sizeof (memory_float));
10700 for (i = 0; i < NWORDS; i++)
10702 ored_words[i] |= m.word[i];
10703 anded_words[i] &= m.word[i];
10709 FILE *fp = fopen ("conftest.out", "w");
10712 for (j = 0; j < NWORDS; j++)
10713 anded_words[j] = ~ (unsigned int) 0;
10714 add_to_ored_words (0.25f);
10715 add_to_ored_words (0.5f);
10716 add_to_ored_words (1.0f);
10717 add_to_ored_words (2.0f);
10718 add_to_ored_words (4.0f);
10719 /* Remove bits that are common (e.g. if representation of the first mantissa
10720 bit is explicit). */
10721 for (j = 0; j < NWORDS; j++)
10722 ored_words[j] &= ~anded_words[j];
10723 /* Now find the nonzero word. */
10724 for (j = 0; j < NWORDS; j++)
10725 if (ored_words[j] != 0)
10730 for (i = j + 1; i < NWORDS; i++)
10731 if (ored_words[i] != 0)
10733 fprintf (fp, "unknown");
10734 return (fclose (fp) != 0);
10737 if ((ored_words[j] >> i) & 1)
10739 fprintf (fp, "word %d bit %d", (int) j, (int) i);
10740 return (fclose (fp) != 0);
10743 fprintf (fp, "unknown");
10744 return (fclose (fp) != 0);
10748 if ac_fn_c_try_run "$LINENO"; then :
10749 gl_cv_cc_float_expbit0=`cat conftest.out`
10751 gl_cv_cc_float_expbit0="unknown"
10753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10754 conftest.$ac_objext conftest.beam conftest.$ac_ext
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
10761 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
10762 case "$gl_cv_cc_float_expbit0" in
10764 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10765 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
10767 cat >>confdefs.h <<_ACEOF
10768 #define FLT_EXPBIT0_WORD $word
10772 cat >>confdefs.h <<_ACEOF
10773 #define FLT_EXPBIT0_BIT $bit
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10781 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10782 if test "${ac_cv_c_bigendian+set}" = set; then :
10783 $as_echo_n "(cached) " >&6
10785 ac_cv_c_bigendian=unknown
10786 # See if we're dealing with a universal compiler.
10787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10788 /* end confdefs.h. */
10789 #ifndef __APPLE_CC__
10790 not a universal capable compiler
10795 if ac_fn_c_try_compile "$LINENO"; then :
10797 # Check for potential -arch flags. It is not universal unless
10798 # there are at least two -arch flags with different values.
10801 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10802 if test -n "$ac_prev"; then
10804 i?86 | x86_64 | ppc | ppc64)
10805 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10808 ac_cv_c_bigendian=universal
10814 elif test "x$ac_word" = "x-arch"; then
10819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10820 if test $ac_cv_c_bigendian = unknown; then
10821 # See if sys/param.h defines the BYTE_ORDER macro.
10822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10823 /* end confdefs.h. */
10824 #include <sys/types.h>
10825 #include <sys/param.h>
10830 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10831 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10833 bogus endian macros
10840 if ac_fn_c_try_compile "$LINENO"; then :
10841 # It does; now see whether it defined to BIG_ENDIAN or not.
10842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843 /* end confdefs.h. */
10844 #include <sys/types.h>
10845 #include <sys/param.h>
10850 #if BYTE_ORDER != BIG_ENDIAN
10858 if ac_fn_c_try_compile "$LINENO"; then :
10859 ac_cv_c_bigendian=yes
10861 ac_cv_c_bigendian=no
10863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10867 if test $ac_cv_c_bigendian = unknown; then
10868 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870 /* end confdefs.h. */
10871 #include <limits.h>
10876 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10877 bogus endian macros
10884 if ac_fn_c_try_compile "$LINENO"; then :
10885 # It does; now see whether it defined to _BIG_ENDIAN or not.
10886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10887 /* end confdefs.h. */
10888 #include <limits.h>
10893 #ifndef _BIG_ENDIAN
10901 if ac_fn_c_try_compile "$LINENO"; then :
10902 ac_cv_c_bigendian=yes
10904 ac_cv_c_bigendian=no
10906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10910 if test $ac_cv_c_bigendian = unknown; then
10911 # Compile a test program.
10912 if test "$cross_compiling" = yes; then :
10913 # Try to guess by grepping values from an object file.
10914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915 /* end confdefs.h. */
10916 short int ascii_mm[] =
10917 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10918 short int ascii_ii[] =
10919 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10920 int use_ascii (int i) {
10921 return ascii_mm[i] + ascii_ii[i];
10923 short int ebcdic_ii[] =
10924 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10925 short int ebcdic_mm[] =
10926 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10927 int use_ebcdic (int i) {
10928 return ebcdic_mm[i] + ebcdic_ii[i];
10935 return use_ascii (foo) == use_ebcdic (foo);
10940 if ac_fn_c_try_compile "$LINENO"; then :
10941 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10942 ac_cv_c_bigendian=yes
10944 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10945 if test "$ac_cv_c_bigendian" = unknown; then
10946 ac_cv_c_bigendian=no
10948 # finding both strings is unlikely to happen, but who knows?
10949 ac_cv_c_bigendian=unknown
10953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956 /* end confdefs.h. */
10957 $ac_includes_default
10962 /* Are we little or big endian? From Harbison&Steele. */
10966 char c[sizeof (long int)];
10969 return u.c[sizeof (long int) - 1] == 1;
10975 if ac_fn_c_try_run "$LINENO"; then :
10976 ac_cv_c_bigendian=no
10978 ac_cv_c_bigendian=yes
10980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10981 conftest.$ac_objext conftest.beam conftest.$ac_ext
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10987 $as_echo "$ac_cv_c_bigendian" >&6; }
10988 case $ac_cv_c_bigendian in #(
10990 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10996 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11000 as_fn_error $? "unknown endianness
11001 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11006 GNULIB_NL_LANGINFO=0;
11007 HAVE_NL_LANGINFO=1;
11008 REPLACE_NL_LANGINFO=0;
11012 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
11013 if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
11019 cat >>confdefs.h <<_ACEOF
11020 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
11025 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
11026 if test "${ac_cv_gnu_library_2_1+set}" = set; then :
11027 $as_echo_n "(cached) " >&6
11029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11030 /* end confdefs.h. */
11032 #include <features.h>
11033 #ifdef __GNU_LIBRARY__
11034 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
11043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11044 $EGREP "Lucky" >/dev/null 2>&1; then :
11045 ac_cv_gnu_library_2_1=yes
11047 ac_cv_gnu_library_2_1=no
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
11055 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
11057 GLIBC21="$ac_cv_gnu_library_2_1"
11062 gl_threads_api=none
11067 if test "$gl_use_threads" != no; then
11068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
11069 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
11070 if test "${gl_cv_have_weak+set}" = set; then :
11071 $as_echo_n "(cached) " >&6
11074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075 /* end confdefs.h. */
11076 extern void xyzzy ();
11086 if ac_fn_c_try_link "$LINENO"; then :
11087 gl_cv_have_weak=maybe
11089 rm -f core conftest.err conftest.$ac_objext \
11090 conftest$ac_exeext conftest.$ac_ext
11091 if test $gl_cv_have_weak = maybe; then
11092 if test "$cross_compiling" = yes; then :
11093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11094 /* end confdefs.h. */
11096 Extensible Linking Format
11100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11101 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
11102 gl_cv_have_weak="guessing yes"
11104 gl_cv_have_weak="guessing no"
11110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11111 /* end confdefs.h. */
11117 return (fputs == NULL);
11120 if ac_fn_c_try_run "$LINENO"; then :
11121 gl_cv_have_weak=yes
11125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11126 conftest.$ac_objext conftest.beam conftest.$ac_ext
11132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11133 $as_echo "$gl_cv_have_weak" >&6; }
11134 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
11135 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11136 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
11137 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11138 if test "x$ac_cv_header_pthread_h" = x""yes; then :
11139 gl_have_pthread_h=yes
11141 gl_have_pthread_h=no
11145 if test "$gl_have_pthread_h" = yes; then
11146 # Other possible tests:
11147 # -lpthreads (FSU threads, PCthreads)
11150 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11151 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11152 # the second one only in libpthread, and lock.c needs it.
11153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11154 /* end confdefs.h. */
11155 #include <pthread.h>
11159 pthread_mutex_lock((pthread_mutex_t*)0);
11160 pthread_mutexattr_init((pthread_mutexattr_t*)0);
11165 if ac_fn_c_try_link "$LINENO"; then :
11166 gl_have_pthread=yes
11168 rm -f core conftest.err conftest.$ac_objext \
11169 conftest$ac_exeext conftest.$ac_ext
11170 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11171 # since it is defined as a macro on OSF/1.)
11172 if test -n "$gl_have_pthread"; then
11173 # The program links fine without libpthread. But it may actually
11174 # need to link with libpthread in order to create multiple threads.
11175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11176 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11177 if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
11178 $as_echo_n "(cached) " >&6
11180 ac_check_lib_save_LIBS=$LIBS
11181 LIBS="-lpthread $LIBS"
11182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11183 /* end confdefs.h. */
11185 /* Override any GCC internal prototype to avoid an error.
11186 Use char because int might match the return type of a GCC
11187 builtin and then its argument prototype would still apply. */
11191 char pthread_kill ();
11195 return pthread_kill ();
11200 if ac_fn_c_try_link "$LINENO"; then :
11201 ac_cv_lib_pthread_pthread_kill=yes
11203 ac_cv_lib_pthread_pthread_kill=no
11205 rm -f core conftest.err conftest.$ac_objext \
11206 conftest$ac_exeext conftest.$ac_ext
11207 LIBS=$ac_check_lib_save_LIBS
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11210 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11211 if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
11212 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
11213 # On Solaris and HP-UX, most pthread functions exist also in libc.
11214 # Therefore pthread_in_use() needs to actually try to create a
11215 # thread: pthread_create from libc will fail, whereas
11216 # pthread_create will actually create a thread.
11220 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11227 # Some library is needed. Try libpthread and libc_r.
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11229 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11230 if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
11231 $as_echo_n "(cached) " >&6
11233 ac_check_lib_save_LIBS=$LIBS
11234 LIBS="-lpthread $LIBS"
11235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236 /* end confdefs.h. */
11238 /* Override any GCC internal prototype to avoid an error.
11239 Use char because int might match the return type of a GCC
11240 builtin and then its argument prototype would still apply. */
11244 char pthread_kill ();
11248 return pthread_kill ();
11253 if ac_fn_c_try_link "$LINENO"; then :
11254 ac_cv_lib_pthread_pthread_kill=yes
11256 ac_cv_lib_pthread_pthread_kill=no
11258 rm -f core conftest.err conftest.$ac_objext \
11259 conftest$ac_exeext conftest.$ac_ext
11260 LIBS=$ac_check_lib_save_LIBS
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11263 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11264 if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
11265 gl_have_pthread=yes
11266 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
11267 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
11270 if test -z "$gl_have_pthread"; then
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11273 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11274 if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then :
11275 $as_echo_n "(cached) " >&6
11277 ac_check_lib_save_LIBS=$LIBS
11279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11280 /* end confdefs.h. */
11282 /* Override any GCC internal prototype to avoid an error.
11283 Use char because int might match the return type of a GCC
11284 builtin and then its argument prototype would still apply. */
11288 char pthread_kill ();
11292 return pthread_kill ();
11297 if ac_fn_c_try_link "$LINENO"; then :
11298 ac_cv_lib_c_r_pthread_kill=yes
11300 ac_cv_lib_c_r_pthread_kill=no
11302 rm -f core conftest.err conftest.$ac_objext \
11303 conftest$ac_exeext conftest.$ac_ext
11304 LIBS=$ac_check_lib_save_LIBS
11306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11307 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11308 if test "x$ac_cv_lib_c_r_pthread_kill" = x""yes; then :
11309 gl_have_pthread=yes
11310 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
11311 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
11316 if test -n "$gl_have_pthread"; then
11317 gl_threads_api=posix
11319 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
11321 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
11322 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
11324 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
11333 if test -z "$gl_have_pthread"; then
11334 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
11335 gl_have_solaristhread=
11336 gl_save_LIBS="$LIBS"
11337 LIBS="$LIBS -lthread"
11338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11339 /* end confdefs.h. */
11341 #include <thread.h>
11352 if ac_fn_c_try_link "$LINENO"; then :
11353 gl_have_solaristhread=yes
11355 rm -f core conftest.err conftest.$ac_objext \
11356 conftest$ac_exeext conftest.$ac_ext
11357 LIBS="$gl_save_LIBS"
11358 if test -n "$gl_have_solaristhread"; then
11359 gl_threads_api=solaris
11361 LTLIBTHREAD=-lthread
11362 LIBMULTITHREAD="$LIBTHREAD"
11363 LTLIBMULTITHREAD="$LTLIBTHREAD"
11365 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
11367 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
11369 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
11377 if test "$gl_use_threads" = pth; then
11378 gl_save_CPPFLAGS="$CPPFLAGS"
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
11385 $as_echo_n "checking how to link with libpth... " >&6; }
11386 if test "${ac_cv_libpth_libs+set}" = set; then :
11387 $as_echo_n "(cached) " >&6
11399 acl_save_prefix="$prefix"
11400 prefix="$acl_final_prefix"
11401 acl_save_exec_prefix="$exec_prefix"
11402 exec_prefix="$acl_final_exec_prefix"
11404 eval additional_includedir=\"$includedir\"
11405 eval additional_libdir=\"$libdir\"
11407 exec_prefix="$acl_save_exec_prefix"
11408 prefix="$acl_save_prefix"
11411 # Check whether --with-libpth-prefix was given.
11412 if test "${with_libpth_prefix+set}" = set; then :
11413 withval=$with_libpth_prefix;
11414 if test "X$withval" = "Xno"; then
11417 if test "X$withval" = "X"; then
11419 acl_save_prefix="$prefix"
11420 prefix="$acl_final_prefix"
11421 acl_save_exec_prefix="$exec_prefix"
11422 exec_prefix="$acl_final_exec_prefix"
11424 eval additional_includedir=\"$includedir\"
11425 eval additional_libdir=\"$libdir\"
11427 exec_prefix="$acl_save_exec_prefix"
11428 prefix="$acl_save_prefix"
11431 additional_includedir="$withval/include"
11432 additional_libdir="$withval/$acl_libdirstem"
11433 if test "$acl_libdirstem2" != "$acl_libdirstem" \
11434 && ! test -d "$withval/$acl_libdirstem"; then
11435 additional_libdir="$withval/$acl_libdirstem2"
11449 names_already_handled=
11450 names_next_round='pth '
11451 while test -n "$names_next_round"; do
11452 names_this_round="$names_next_round"
11454 for name in $names_this_round; do
11456 for n in $names_already_handled; do
11457 if test "$n" = "$name"; then
11458 already_handled=yes
11462 if test -z "$already_handled"; then
11463 names_already_handled="$names_already_handled $name"
11464 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
11465 eval value=\"\$HAVE_LIB$uppername\"
11466 if test -n "$value"; then
11467 if test "$value" = yes; then
11468 eval value=\"\$LIB$uppername\"
11469 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
11470 eval value=\"\$LTLIB$uppername\"
11471 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
11480 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
11481 if test -n "$acl_shlibext"; then
11482 shrext=".$acl_shlibext" # typically: shrext=.so
11486 if test $use_additional = yes; then
11487 dir="$additional_libdir"
11488 if test -n "$acl_shlibext"; then
11489 if test -f "$dir/$libname$shrext"; then
11491 found_so="$dir/$libname$shrext"
11493 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11494 ver=`(cd "$dir" && \
11495 for f in "$libname$shrext".*; do echo "$f"; done \
11496 | sed -e "s,^$libname$shrext\\\\.,," \
11497 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11498 | sed 1q ) 2>/dev/null`
11499 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11501 found_so="$dir/$libname$shrext.$ver"
11504 eval library_names=\"$acl_library_names_spec\"
11505 for f in $library_names; do
11506 if test -f "$dir/$f"; then
11515 if test "X$found_dir" = "X"; then
11516 if test -f "$dir/$libname.$acl_libext"; then
11518 found_a="$dir/$libname.$acl_libext"
11521 if test "X$found_dir" != "X"; then
11522 if test -f "$dir/$libname.la"; then
11523 found_la="$dir/$libname.la"
11527 if test "X$found_dir" = "X"; then
11528 for x in $LDFLAGS $LTLIBPTH; do
11530 acl_save_prefix="$prefix"
11531 prefix="$acl_final_prefix"
11532 acl_save_exec_prefix="$exec_prefix"
11533 exec_prefix="$acl_final_exec_prefix"
11535 exec_prefix="$acl_save_exec_prefix"
11536 prefix="$acl_save_prefix"
11540 dir=`echo "X$x" | sed -e 's/^X-L//'`
11541 if test -n "$acl_shlibext"; then
11542 if test -f "$dir/$libname$shrext"; then
11544 found_so="$dir/$libname$shrext"
11546 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11547 ver=`(cd "$dir" && \
11548 for f in "$libname$shrext".*; do echo "$f"; done \
11549 | sed -e "s,^$libname$shrext\\\\.,," \
11550 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11551 | sed 1q ) 2>/dev/null`
11552 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11554 found_so="$dir/$libname$shrext.$ver"
11557 eval library_names=\"$acl_library_names_spec\"
11558 for f in $library_names; do
11559 if test -f "$dir/$f"; then
11568 if test "X$found_dir" = "X"; then
11569 if test -f "$dir/$libname.$acl_libext"; then
11571 found_a="$dir/$libname.$acl_libext"
11574 if test "X$found_dir" != "X"; then
11575 if test -f "$dir/$libname.la"; then
11576 found_la="$dir/$libname.la"
11581 if test "X$found_dir" != "X"; then
11586 if test "X$found_dir" != "X"; then
11587 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
11588 if test "X$found_so" != "X"; then
11589 if test "$enable_rpath" = no \
11590 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
11591 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
11592 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
11595 for x in $ltrpathdirs; do
11596 if test "X$x" = "X$found_dir"; then
11601 if test -z "$haveit"; then
11602 ltrpathdirs="$ltrpathdirs $found_dir"
11604 if test "$acl_hardcode_direct" = yes; then
11605 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
11607 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
11608 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
11610 for x in $rpathdirs; do
11611 if test "X$x" = "X$found_dir"; then
11616 if test -z "$haveit"; then
11617 rpathdirs="$rpathdirs $found_dir"
11621 for x in $LDFLAGS $LIBPTH; do
11623 acl_save_prefix="$prefix"
11624 prefix="$acl_final_prefix"
11625 acl_save_exec_prefix="$exec_prefix"
11626 exec_prefix="$acl_final_exec_prefix"
11628 exec_prefix="$acl_save_exec_prefix"
11629 prefix="$acl_save_prefix"
11631 if test "X$x" = "X-L$found_dir"; then
11636 if test -z "$haveit"; then
11637 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
11639 if test "$acl_hardcode_minus_L" != no; then
11640 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
11642 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
11648 if test "X$found_a" != "X"; then
11649 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
11651 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
11654 additional_includedir=
11655 case "$found_dir" in
11656 */$acl_libdirstem | */$acl_libdirstem/)
11657 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
11658 if test "$name" = 'pth'; then
11659 LIBPTH_PREFIX="$basedir"
11661 additional_includedir="$basedir/include"
11663 */$acl_libdirstem2 | */$acl_libdirstem2/)
11664 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
11665 if test "$name" = 'pth'; then
11666 LIBPTH_PREFIX="$basedir"
11668 additional_includedir="$basedir/include"
11671 if test "X$additional_includedir" != "X"; then
11672 if test "X$additional_includedir" != "X/usr/include"; then
11674 if test "X$additional_includedir" = "X/usr/local/include"; then
11675 if test -n "$GCC"; then
11677 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11681 if test -z "$haveit"; then
11682 for x in $CPPFLAGS $INCPTH; do
11684 acl_save_prefix="$prefix"
11685 prefix="$acl_final_prefix"
11686 acl_save_exec_prefix="$exec_prefix"
11687 exec_prefix="$acl_final_exec_prefix"
11689 exec_prefix="$acl_save_exec_prefix"
11690 prefix="$acl_save_prefix"
11692 if test "X$x" = "X-I$additional_includedir"; then
11697 if test -z "$haveit"; then
11698 if test -d "$additional_includedir"; then
11699 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
11705 if test -n "$found_la"; then
11706 save_libdir="$libdir"
11707 case "$found_la" in
11708 */* | *\\*) . "$found_la" ;;
11709 *) . "./$found_la" ;;
11711 libdir="$save_libdir"
11712 for dep in $dependency_libs; do
11715 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11716 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
11717 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
11719 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
11720 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
11721 if test -n "$GCC"; then
11723 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11727 if test -z "$haveit"; then
11729 for x in $LDFLAGS $LIBPTH; do
11731 acl_save_prefix="$prefix"
11732 prefix="$acl_final_prefix"
11733 acl_save_exec_prefix="$exec_prefix"
11734 exec_prefix="$acl_final_exec_prefix"
11736 exec_prefix="$acl_save_exec_prefix"
11737 prefix="$acl_save_prefix"
11739 if test "X$x" = "X-L$additional_libdir"; then
11744 if test -z "$haveit"; then
11745 if test -d "$additional_libdir"; then
11746 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
11750 for x in $LDFLAGS $LTLIBPTH; do
11752 acl_save_prefix="$prefix"
11753 prefix="$acl_final_prefix"
11754 acl_save_exec_prefix="$exec_prefix"
11755 exec_prefix="$acl_final_exec_prefix"
11757 exec_prefix="$acl_save_exec_prefix"
11758 prefix="$acl_save_prefix"
11760 if test "X$x" = "X-L$additional_libdir"; then
11765 if test -z "$haveit"; then
11766 if test -d "$additional_libdir"; then
11767 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
11774 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11775 if test "$enable_rpath" != no; then
11777 for x in $rpathdirs; do
11778 if test "X$x" = "X$dir"; then
11783 if test -z "$haveit"; then
11784 rpathdirs="$rpathdirs $dir"
11787 for x in $ltrpathdirs; do
11788 if test "X$x" = "X$dir"; then
11793 if test -z "$haveit"; then
11794 ltrpathdirs="$ltrpathdirs $dir"
11799 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11802 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11805 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
11806 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
11812 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
11813 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
11819 if test "X$rpathdirs" != "X"; then
11820 if test -n "$acl_hardcode_libdir_separator"; then
11822 for found_dir in $rpathdirs; do
11823 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
11825 acl_save_libdir="$libdir"
11827 eval flag=\"$acl_hardcode_libdir_flag_spec\"
11828 libdir="$acl_save_libdir"
11829 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
11831 for found_dir in $rpathdirs; do
11832 acl_save_libdir="$libdir"
11833 libdir="$found_dir"
11834 eval flag=\"$acl_hardcode_libdir_flag_spec\"
11835 libdir="$acl_save_libdir"
11836 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
11840 if test "X$ltrpathdirs" != "X"; then
11841 for found_dir in $ltrpathdirs; do
11842 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
11851 ac_cv_libpth_libs="$LIBPTH"
11852 ac_cv_libpth_ltlibs="$LTLIBPTH"
11853 ac_cv_libpth_cppflags="$INCPTH"
11854 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
11857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
11858 $as_echo "$ac_cv_libpth_libs" >&6; }
11859 LIBPTH="$ac_cv_libpth_libs"
11860 LTLIBPTH="$ac_cv_libpth_ltlibs"
11861 INCPTH="$ac_cv_libpth_cppflags"
11862 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
11864 for element in $INCPTH; do
11866 for x in $CPPFLAGS; do
11868 acl_save_prefix="$prefix"
11869 prefix="$acl_final_prefix"
11870 acl_save_exec_prefix="$exec_prefix"
11871 exec_prefix="$acl_final_exec_prefix"
11873 exec_prefix="$acl_save_exec_prefix"
11874 prefix="$acl_save_prefix"
11876 if test "X$x" = "X$element"; then
11881 if test -z "$haveit"; then
11882 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11894 gl_save_LIBS="$LIBS"
11895 LIBS="$LIBS $LIBPTH"
11896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11897 /* end confdefs.h. */
11907 if ac_fn_c_try_link "$LINENO"; then :
11910 rm -f core conftest.err conftest.$ac_objext \
11911 conftest$ac_exeext conftest.$ac_ext
11912 LIBS="$gl_save_LIBS"
11913 if test -n "$gl_have_pth"; then
11915 LIBTHREAD="$LIBPTH"
11916 LTLIBTHREAD="$LTLIBPTH"
11917 LIBMULTITHREAD="$LIBTHREAD"
11918 LTLIBMULTITHREAD="$LTLIBTHREAD"
11920 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
11922 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
11923 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
11925 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
11932 CPPFLAGS="$gl_save_CPPFLAGS"
11935 if test -z "$gl_have_pthread"; then
11936 if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
11937 if { case "$host_os" in
11942 gl_threads_api=win32
11944 $as_echo "#define USE_WIN32_THREADS 1" >>confdefs.h
11950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
11951 $as_echo_n "checking for multithread API to use... " >&6; }
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
11953 $as_echo "$gl_threads_api" >&6; }
11975 GNULIB_UTIMENSAT=0;
11989 REPLACE_FUTIMENS=0;
11995 REPLACE_UTIMENSAT=0;
12000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
12001 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
12002 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
12003 $as_echo_n "(cached) " >&6
12005 rm -f conftest.sym conftest.file
12006 echo >conftest.file
12007 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
12008 if test "$cross_compiling" = yes; then :
12009 # When cross-compiling, be pessimistic so we will end up using the
12010 # replacement version of lstat that checks for trailing slashes and
12011 # calls lstat a second time when necessary.
12012 ac_cv_func_lstat_dereferences_slashed_symlink=no
12015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12016 /* end confdefs.h. */
12017 $ac_includes_default
12022 /* Linux will dereference the symlink and fail, as required by
12023 POSIX. That is better in the sense that it means we will not
12024 have to compile and use the lstat wrapper. */
12025 return lstat ("conftest.sym/", &sbuf) == 0;
12031 if ac_fn_c_try_run "$LINENO"; then :
12032 ac_cv_func_lstat_dereferences_slashed_symlink=yes
12034 ac_cv_func_lstat_dereferences_slashed_symlink=no
12036 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12037 conftest.$ac_objext conftest.beam conftest.$ac_ext
12041 # If the 'ln -s' command failed, then we probably don't even
12042 # have an lstat function.
12043 ac_cv_func_lstat_dereferences_slashed_symlink=no
12045 rm -f conftest.sym conftest.file
12048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
12049 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12050 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
12052 cat >>confdefs.h <<_ACEOF
12053 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
12056 if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
12065 M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
12071 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
12072 if test "${gl_cv_func_malloc_posix+set}" = set; then :
12073 $as_echo_n "(cached) " >&6
12076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077 /* end confdefs.h. */
12082 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12090 if ac_fn_c_try_compile "$LINENO"; then :
12091 gl_cv_func_malloc_posix=yes
12093 gl_cv_func_malloc_posix=no
12095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
12099 $as_echo "$gl_cv_func_malloc_posix" >&6; }
12102 for ac_header in stdlib.h
12104 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
12105 if test "x$ac_cv_header_stdlib_h" = x""yes; then :
12106 cat >>confdefs.h <<_ACEOF
12107 #define HAVE_STDLIB_H 1
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
12115 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
12116 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
12117 $as_echo_n "(cached) " >&6
12119 if test "$cross_compiling" = yes; then :
12120 ac_cv_func_malloc_0_nonnull=no
12122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12123 /* end confdefs.h. */
12124 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
12125 # include <stdlib.h>
12133 return ! malloc (0);
12138 if ac_fn_c_try_run "$LINENO"; then :
12139 ac_cv_func_malloc_0_nonnull=yes
12141 ac_cv_func_malloc_0_nonnull=no
12143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12144 conftest.$ac_objext conftest.beam conftest.$ac_ext
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
12149 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
12150 if test $ac_cv_func_malloc_0_nonnull = yes; then :
12151 gl_cv_func_malloc_0_nonnull=1
12153 gl_cv_func_malloc_0_nonnull=0
12157 cat >>confdefs.h <<_ACEOF
12158 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
12166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
12167 $as_echo_n "checking for mbstate_t... " >&6; }
12168 if test "${ac_cv_type_mbstate_t+set}" = set; then :
12169 $as_echo_n "(cached) " >&6
12171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12172 /* end confdefs.h. */
12173 $ac_includes_default
12174 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12176 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12177 included before <wchar.h>. */
12178 #include <stddef.h>
12185 mbstate_t x; return sizeof x;
12190 if ac_fn_c_try_compile "$LINENO"; then :
12191 ac_cv_type_mbstate_t=yes
12193 ac_cv_type_mbstate_t=no
12195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
12198 $as_echo "$ac_cv_type_mbstate_t" >&6; }
12199 if test $ac_cv_type_mbstate_t = yes; then
12201 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
12205 $as_echo "#define mbstate_t int" >>confdefs.h
12216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
12217 $as_echo_n "checking for a traditional japanese locale... " >&6; }
12218 if test "${gt_cv_locale_ja+set}" = set; then :
12219 $as_echo_n "(cached) " >&6
12222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12223 /* end confdefs.h. */
12225 #include <locale.h>
12227 #if HAVE_LANGINFO_CODESET
12228 # include <langinfo.h>
12230 #include <stdlib.h>
12231 #include <string.h>
12237 /* Check whether the given locale name is recognized by the system. */
12238 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12239 /* On native Win32, setlocale(category, "") looks at the system settings,
12240 not at the environment variables. Also, when an encoding suffix such
12241 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
12242 category of the locale to "C". */
12243 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12244 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12247 if (setlocale (LC_ALL, "") == NULL) return 1;
12249 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12250 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12251 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12252 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12253 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12254 some unit tests fail.
12255 On MirBSD 10, when an unsupported locale is specified, setlocale()
12256 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
12257 #if HAVE_LANGINFO_CODESET
12259 const char *cs = nl_langinfo (CODESET);
12260 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12261 || strcmp (cs, "UTF-8") == 0)
12266 /* On Cygwin, avoid locale names without encoding suffix, because the
12267 locale_charset() function relies on the encoding suffix. Note that
12268 LC_ALL is set on the command line. */
12269 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12271 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
12272 on Cygwin 1.5.x. */
12273 if (MB_CUR_MAX == 1)
12275 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12276 This excludes the UTF-8 encoding (except on MirBSD). */
12277 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12278 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12279 for (p = buf; *p != '\0'; p++)
12280 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12286 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12287 (eval $ac_link) 2>&5
12289 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12290 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12292 # Handle native Windows specially, because there setlocale() interprets
12293 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12294 # "fr" or "fra" as "French" or "French_France.1252",
12295 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12296 # "ja" as "Japanese" or "Japanese_Japan.932",
12299 # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
12300 # and CP932 is very different from EUC-JP, so we cannot use it here.
12301 gt_cv_locale_ja=none
12304 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12305 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
12306 # configure script would override the LC_ALL setting. Likewise for
12307 # LC_CTYPE, which is also set at the beginning of the configure script.
12308 # Test for the AIX locale name.
12309 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12310 gt_cv_locale_ja=ja_JP
12312 # Test for the locale name with explicit encoding suffix.
12313 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12314 gt_cv_locale_ja=ja_JP.EUC-JP
12316 # Test for the HP-UX, OSF/1, NetBSD locale name.
12317 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12318 gt_cv_locale_ja=ja_JP.eucJP
12320 # Test for the IRIX, FreeBSD locale name.
12321 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12322 gt_cv_locale_ja=ja_JP.EUC
12324 # Test for the Solaris 7 locale name.
12325 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12328 # Special test for NetBSD 1.6.
12329 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
12330 gt_cv_locale_ja=ja_JP.eucJP
12333 gt_cv_locale_ja=none
12346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
12347 $as_echo "$gt_cv_locale_ja" >&6; }
12348 LOCALE_JA=$gt_cv_locale_ja
12354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
12355 $as_echo_n "checking for a transitional chinese locale... " >&6; }
12356 if test "${gt_cv_locale_zh_CN+set}" = set; then :
12357 $as_echo_n "(cached) " >&6
12360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12361 /* end confdefs.h. */
12363 #include <locale.h>
12364 #include <stdlib.h>
12366 #if HAVE_LANGINFO_CODESET
12367 # include <langinfo.h>
12369 #include <stdlib.h>
12370 #include <string.h>
12376 /* Check whether the given locale name is recognized by the system. */
12377 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12378 /* On native Win32, setlocale(category, "") looks at the system settings,
12379 not at the environment variables. Also, when an encoding suffix such
12380 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
12381 category of the locale to "C". */
12382 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12383 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12386 if (setlocale (LC_ALL, "") == NULL) return 1;
12388 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12389 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12390 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12391 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12392 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12393 some unit tests fail.
12394 On MirBSD 10, when an unsupported locale is specified, setlocale()
12395 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
12396 #if HAVE_LANGINFO_CODESET
12398 const char *cs = nl_langinfo (CODESET);
12399 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12400 || strcmp (cs, "UTF-8") == 0)
12405 /* On Cygwin, avoid locale names without encoding suffix, because the
12406 locale_charset() function relies on the encoding suffix. Note that
12407 LC_ALL is set on the command line. */
12408 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12410 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12411 This excludes the UTF-8 encoding (except on MirBSD). */
12412 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12413 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12414 for (p = buf; *p != '\0'; p++)
12415 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12417 /* Check whether a typical GB18030 multibyte sequence is recognized as a
12418 single wide character. This excludes the GB2312 and GBK encodings. */
12419 if (mblen ("\203\062\332\066", 5) != 4)
12425 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12426 (eval $ac_link) 2>&5
12428 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12429 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12431 # Handle native Windows specially, because there setlocale() interprets
12432 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12433 # "fr" or "fra" as "French" or "French_France.1252",
12434 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12435 # "ja" as "Japanese" or "Japanese_Japan.932",
12438 # Test for the hypothetical native Win32 locale name.
12439 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12440 gt_cv_locale_zh_CN=Chinese_China.54936
12443 gt_cv_locale_zh_CN=none
12447 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12448 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
12449 # configure script would override the LC_ALL setting. Likewise for
12450 # LC_CTYPE, which is also set at the beginning of the configure script.
12451 # Test for the locale name without encoding suffix.
12452 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12453 gt_cv_locale_zh_CN=zh_CN
12455 # Test for the locale name with explicit encoding suffix.
12456 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12457 gt_cv_locale_zh_CN=zh_CN.GB18030
12460 gt_cv_locale_zh_CN=none
12466 # If there was a link error, due to mblen(), the system is so old that
12467 # it certainly doesn't have a chinese locale.
12468 gt_cv_locale_zh_CN=none
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
12474 $as_echo "$gt_cv_locale_zh_CN" >&6; }
12475 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
12481 $as_echo_n "checking for a french Unicode locale... " >&6; }
12482 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
12483 $as_echo_n "(cached) " >&6
12486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12487 /* end confdefs.h. */
12489 #include <locale.h>
12491 #if HAVE_LANGINFO_CODESET
12492 # include <langinfo.h>
12494 #include <stdlib.h>
12495 #include <string.h>
12499 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12500 imitates locale dependent behaviour by looking at the environment
12501 variables, and all locales use the UTF-8 encoding. */
12502 #if !(defined __BEOS__ || defined __HAIKU__)
12503 /* Check whether the given locale name is recognized by the system. */
12504 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12505 /* On native Win32, setlocale(category, "") looks at the system settings,
12506 not at the environment variables. Also, when an encoding suffix such
12507 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
12508 category of the locale to "C". */
12509 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12510 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12513 if (setlocale (LC_ALL, "") == NULL) return 1;
12515 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12516 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12517 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12518 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12519 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12520 some unit tests fail. */
12521 # if HAVE_LANGINFO_CODESET
12523 const char *cs = nl_langinfo (CODESET);
12524 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
12529 /* On Cygwin, avoid locale names without encoding suffix, because the
12530 locale_charset() function relies on the encoding suffix. Note that
12531 LC_ALL is set on the command line. */
12532 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12534 /* Check whether in the abbreviation of the second month, the second
12535 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
12536 two bytes long, with UTF-8 encoding. */
12537 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12538 if (strftime (buf, sizeof (buf), "%b", &t) < 4
12539 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
12542 /* Check whether the decimal separator is a comma.
12543 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12544 are nl_langinfo(RADIXCHAR) are both ".". */
12545 if (localeconv () ->decimal_point[0] != ',') return 1;
12550 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12551 (eval $ac_link) 2>&5
12553 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12554 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12556 # Handle native Windows specially, because there setlocale() interprets
12557 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12558 # "fr" or "fra" as "French" or "French_France.1252",
12559 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12560 # "ja" as "Japanese" or "Japanese_Japan.932",
12563 # Test for the hypothetical native Win32 locale name.
12564 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12565 gt_cv_locale_fr_utf8=French_France.65001
12568 gt_cv_locale_fr_utf8=none
12572 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12573 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
12574 # configure script would override the LC_ALL setting. Likewise for
12575 # LC_CTYPE, which is also set at the beginning of the configure script.
12576 # Test for the usual locale name.
12577 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12578 gt_cv_locale_fr_utf8=fr_FR
12580 # Test for the locale name with explicit encoding suffix.
12581 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12582 gt_cv_locale_fr_utf8=fr_FR.UTF-8
12584 # Test for the Solaris 7 locale name.
12585 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12586 gt_cv_locale_fr_utf8=fr.UTF-8
12589 gt_cv_locale_fr_utf8=none
12599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
12600 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
12601 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
12613 GNULIB_RAWMEMCHR=0;
12616 GNULIB_STRCHRNUL=0;
12624 GNULIB_STRCASESTR=0;
12631 GNULIB_MBSCASECMP=0;
12632 GNULIB_MBSNCASECMP=0;
12633 GNULIB_MBSPCASECMP=0;
12634 GNULIB_MBSCASESTR=0;
12641 GNULIB_STRERROR_R=0;
12642 GNULIB_STRSIGNAL=0;
12643 GNULIB_STRVERSCMP=0;
12646 HAVE_DECL_MEMMEM=1;
12648 HAVE_DECL_MEMRCHR=1;
12653 HAVE_DECL_STRDUP=1;
12654 HAVE_DECL_STRNDUP=1;
12655 HAVE_DECL_STRNLEN=1;
12659 HAVE_DECL_STRTOK_R=1;
12660 HAVE_DECL_STRERROR_R=1;
12661 HAVE_DECL_STRSIGNAL=1;
12668 REPLACE_STRCASESTR=0;
12669 REPLACE_STRERROR=0;
12670 REPLACE_STRERROR_R=0;
12674 REPLACE_STRSIGNAL=0;
12675 REPLACE_STRTOK_R=0;
12676 UNDEFINE_STRTOK_R=0;
12684 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
12685 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
12686 # irrelevant for anonymous mappings.
12687 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
12688 if test "x$ac_cv_func_mmap" = x""yes; then :
12695 # Try to allow MAP_ANONYMOUS.
12696 gl_have_mmap_anonymous=no
12697 if test $gl_have_mmap = yes; then
12698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
12699 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
12700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701 /* end confdefs.h. */
12703 #include <sys/mman.h>
12704 #ifdef MAP_ANONYMOUS
12705 I cant identify this map.
12709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12710 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
12711 gl_have_mmap_anonymous=yes
12715 if test $gl_have_mmap_anonymous != yes; then
12716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12717 /* end confdefs.h. */
12719 #include <sys/mman.h>
12721 I cant identify this map.
12725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12726 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
12728 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
12730 gl_have_mmap_anonymous=yes
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
12736 $as_echo "$gl_have_mmap_anonymous" >&6; }
12737 if test $gl_have_mmap_anonymous = yes; then
12739 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
12749 if test $ac_cv_func_memchr = yes; then
12750 # Detect platform-specific bugs in some versions of glibc:
12751 # memchr should not dereference anything with length 0
12752 # http://bugzilla.redhat.com/499689
12753 # memchr should not dereference overestimated length after a match
12754 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
12755 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
12756 # Assume that memchr works on platforms that lack mprotect.
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
12758 $as_echo_n "checking whether memchr works... " >&6; }
12759 if test "${gl_cv_func_memchr_works+set}" = set; then :
12760 $as_echo_n "(cached) " >&6
12762 if test "$cross_compiling" = yes; then :
12763 gl_cv_func_memchr_works="guessing no"
12765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12766 /* end confdefs.h. */
12768 #include <string.h>
12769 #if HAVE_SYS_MMAN_H
12770 # include <fcntl.h>
12771 # include <unistd.h>
12772 # include <sys/types.h>
12773 # include <sys/mman.h>
12775 # define MAP_FILE 0
12784 char *fence = NULL;
12785 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
12786 # if HAVE_MAP_ANONYMOUS
12787 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
12789 # else /* !HAVE_MAP_ANONYMOUS */
12790 const int flags = MAP_FILE | MAP_PRIVATE;
12791 int fd = open ("/dev/zero", O_RDONLY, 0666);
12795 int pagesize = getpagesize ();
12797 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
12799 if (two_pages != (char *)(-1)
12800 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
12801 fence = two_pages + pagesize;
12806 if (memchr (fence, 0, 0))
12808 strcpy (fence - 9, "12345678");
12809 if (memchr (fence - 9, 0, 79) != fence - 1)
12811 if (memchr (fence - 1, 0, 3) != fence - 1)
12820 if ac_fn_c_try_run "$LINENO"; then :
12821 gl_cv_func_memchr_works=yes
12823 gl_cv_func_memchr_works=no
12825 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12826 conftest.$ac_objext conftest.beam conftest.$ac_ext
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
12831 $as_echo "$gl_cv_func_memchr_works" >&6; }
12832 if test "$gl_cv_func_memchr_works" != yes; then
12838 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
12847 M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
12850 for ac_header in bp-sym.h
12852 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
12853 if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
12854 cat >>confdefs.h <<_ACEOF
12855 #define HAVE_BP_SYM_H 1
12865 # Check whether --enable-largefile was given.
12866 if test "${enable_largefile+set}" = set; then :
12867 enableval=$enable_largefile;
12870 if test "$enable_largefile" != no; then
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12873 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12874 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
12875 $as_echo_n "(cached) " >&6
12877 ac_cv_sys_largefile_CC=no
12878 if test "$GCC" != yes; then
12881 # IRIX 6.2 and later do not support large files by default,
12882 # so use the C compiler's -n32 option if that helps.
12883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12884 /* end confdefs.h. */
12885 #include <sys/types.h>
12886 /* Check that off_t can represent 2**63 - 1 correctly.
12887 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12888 since some C++ compilers masquerading as C compilers
12889 incorrectly reject 9223372036854775807. */
12890 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12891 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12892 && LARGE_OFF_T % 2147483647 == 1)
12902 if ac_fn_c_try_compile "$LINENO"; then :
12905 rm -f core conftest.err conftest.$ac_objext
12907 if ac_fn_c_try_compile "$LINENO"; then :
12908 ac_cv_sys_largefile_CC=' -n32'; break
12910 rm -f core conftest.err conftest.$ac_objext
12914 rm -f conftest.$ac_ext
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12918 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12919 if test "$ac_cv_sys_largefile_CC" != no; then
12920 CC=$CC$ac_cv_sys_largefile_CC
12923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12924 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12925 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
12926 $as_echo_n "(cached) " >&6
12929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930 /* end confdefs.h. */
12931 #include <sys/types.h>
12932 /* Check that off_t can represent 2**63 - 1 correctly.
12933 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12934 since some C++ compilers masquerading as C compilers
12935 incorrectly reject 9223372036854775807. */
12936 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12937 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12938 && LARGE_OFF_T % 2147483647 == 1)
12948 if ac_fn_c_try_compile "$LINENO"; then :
12949 ac_cv_sys_file_offset_bits=no; break
12951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12953 /* end confdefs.h. */
12954 #define _FILE_OFFSET_BITS 64
12955 #include <sys/types.h>
12956 /* Check that off_t can represent 2**63 - 1 correctly.
12957 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12958 since some C++ compilers masquerading as C compilers
12959 incorrectly reject 9223372036854775807. */
12960 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12961 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12962 && LARGE_OFF_T % 2147483647 == 1)
12972 if ac_fn_c_try_compile "$LINENO"; then :
12973 ac_cv_sys_file_offset_bits=64; break
12975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12976 ac_cv_sys_file_offset_bits=unknown
12980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12981 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12982 case $ac_cv_sys_file_offset_bits in #(
12985 cat >>confdefs.h <<_ACEOF
12986 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12991 if test $ac_cv_sys_file_offset_bits = unknown; then
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12993 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12994 if test "${ac_cv_sys_large_files+set}" = set; then :
12995 $as_echo_n "(cached) " >&6
12998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12999 /* end confdefs.h. */
13000 #include <sys/types.h>
13001 /* Check that off_t can represent 2**63 - 1 correctly.
13002 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13003 since some C++ compilers masquerading as C compilers
13004 incorrectly reject 9223372036854775807. */
13005 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13006 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13007 && LARGE_OFF_T % 2147483647 == 1)
13017 if ac_fn_c_try_compile "$LINENO"; then :
13018 ac_cv_sys_large_files=no; break
13020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13022 /* end confdefs.h. */
13023 #define _LARGE_FILES 1
13024 #include <sys/types.h>
13025 /* Check that off_t can represent 2**63 - 1 correctly.
13026 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13027 since some C++ compilers masquerading as C compilers
13028 incorrectly reject 9223372036854775807. */
13029 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13030 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13031 && LARGE_OFF_T % 2147483647 == 1)
13041 if ac_fn_c_try_compile "$LINENO"; then :
13042 ac_cv_sys_large_files=1; break
13044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13045 ac_cv_sys_large_files=unknown
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13050 $as_echo "$ac_cv_sys_large_files" >&6; }
13051 case $ac_cv_sys_large_files in #(
13054 cat >>confdefs.h <<_ACEOF
13055 #define _LARGE_FILES $ac_cv_sys_large_files
13066 gl_cv_c_multiarch=no
13067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13068 /* end confdefs.h. */
13069 #ifndef __APPLE_CC__
13070 not a universal capable compiler
13075 if ac_fn_c_try_compile "$LINENO"; then :
13079 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
13080 if test -n "$prev"; then
13082 i?86 | x86_64 | ppc | ppc64)
13083 if test -z "$arch" || test "$arch" = "$word"; then
13086 gl_cv_c_multiarch=yes
13092 if test "x$word" = "x-arch"; then
13099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13100 if test $gl_cv_c_multiarch = yes; then
13101 APPLE_UNIVERSAL_BUILD=1
13103 APPLE_UNIVERSAL_BUILD=0
13111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
13112 $as_echo_n "checking for promoted mode_t type... " >&6; }
13113 if test "${gl_cv_promoted_mode_t+set}" = set; then :
13114 $as_echo_n "(cached) " >&6
13117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13118 /* end confdefs.h. */
13119 #include <sys/types.h>
13123 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
13128 if ac_fn_c_try_compile "$LINENO"; then :
13129 gl_cv_promoted_mode_t='int'
13131 gl_cv_promoted_mode_t='mode_t'
13133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
13137 $as_echo "$gl_cv_promoted_mode_t" >&6; }
13139 cat >>confdefs.h <<_ACEOF
13140 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
13149 GNULIB_POSIX_SPAWN=0;
13150 GNULIB_POSIX_SPAWNP=0;
13151 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
13152 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
13153 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
13154 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
13155 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
13156 GNULIB_POSIX_SPAWNATTR_INIT=0;
13157 GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
13158 GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
13159 GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
13160 GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
13161 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
13162 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
13163 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
13164 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
13165 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
13166 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
13167 GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
13168 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
13169 GNULIB_POSIX_SPAWNATTR_DESTROY=0;
13170 HAVE_POSIX_SPAWN=1;
13171 HAVE_POSIX_SPAWNATTR_T=1;
13172 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
13174 REPLACE_POSIX_SPAWN=0;
13182 if test $ac_cv_func_posix_spawn != yes; then
13189 if test $ac_cv_func_posix_spawn = yes; then
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
13193 $as_echo_n "checking whether posix_spawn works... " >&6; }
13194 if test "${gl_cv_func_posix_spawn_works+set}" = set; then :
13195 $as_echo_n "(cached) " >&6
13197 if test $cross_compiling = no; then
13198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199 /* end confdefs.h. */
13203 #include <signal.h>
13205 #include <stdbool.h>
13207 #include <stdlib.h>
13208 #include <string.h>
13209 #include <unistd.h>
13210 #include <sys/types.h>
13211 #include <sys/wait.h>
13213 extern char **environ;
13215 #ifndef STDIN_FILENO
13216 # define STDIN_FILENO 0
13218 #ifndef STDOUT_FILENO
13219 # define STDOUT_FILENO 1
13221 #ifndef STDERR_FILENO
13222 # define STDERR_FILENO 2
13226 # define WTERMSIG(x) ((x) & 0x7f)
13229 # define WIFEXITED(x) (WTERMSIG (x) == 0)
13231 #ifndef WEXITSTATUS
13232 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
13235 #define CHILD_PROGRAM_FILENAME "/non/exist/ent"
13240 if (0 <= fd && fd <= 2)
13242 int f = fd_safer (dup (fd));
13255 char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
13257 sigset_t blocked_signals;
13258 sigset_t fatal_signal_set;
13259 posix_spawn_file_actions_t actions;
13260 bool actions_allocated;
13261 posix_spawnattr_t attrs;
13262 bool attrs_allocated;
13268 setvbuf (stdout, NULL, _IOFBF, 0);
13269 puts ("This should be seen only once.");
13270 if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
13272 perror ("cannot create pipe");
13275 sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
13276 sigemptyset (&fatal_signal_set);
13277 sigaddset (&fatal_signal_set, SIGINT);
13278 sigaddset (&fatal_signal_set, SIGTERM);
13279 sigaddset (&fatal_signal_set, SIGHUP);
13280 sigaddset (&fatal_signal_set, SIGPIPE);
13281 sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
13282 actions_allocated = false;
13283 attrs_allocated = false;
13284 if ((err = posix_spawn_file_actions_init (&actions)) != 0
13285 || (actions_allocated = true,
13286 (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
13287 || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
13288 || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
13289 || (err = posix_spawnattr_init (&attrs)) != 0
13290 || (attrs_allocated = true,
13291 (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
13292 || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
13293 || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
13295 if (actions_allocated)
13296 posix_spawn_file_actions_destroy (&actions);
13297 if (attrs_allocated)
13298 posix_spawnattr_destroy (&attrs);
13299 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
13305 perror ("subprocess failed");
13309 posix_spawn_file_actions_destroy (&actions);
13310 posix_spawnattr_destroy (&attrs);
13311 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
13315 while (waitpid (child, &status, 0) != child)
13317 if (!WIFEXITED (status))
13319 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
13322 exitstatus = WEXITSTATUS (status);
13323 if (exitstatus != 127)
13325 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
13332 if ac_fn_c_try_link "$LINENO"; then :
13333 if test -s conftest$ac_exeext \
13334 && ./conftest$ac_exeext > conftest.out \
13335 && echo 'This should be seen only once.' > conftest.ok \
13336 && cmp conftest.out conftest.ok > /dev/null; then
13337 gl_cv_func_posix_spawn_works=yes
13339 gl_cv_func_posix_spawn_works=no
13342 gl_cv_func_posix_spawn_works=no
13344 rm -f core conftest.err conftest.$ac_objext \
13345 conftest$ac_exeext conftest.$ac_ext
13346 if test $gl_cv_func_posix_spawn_works = yes; then
13347 if test "$cross_compiling" = yes; then :
13348 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13349 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13350 as_fn_error $? "cannot run test program while cross compiling
13351 See \`config.log' for more details" "$LINENO" 5; }
13353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13354 /* end confdefs.h. */
13356 /* Test whether posix_spawn_file_actions_addopen supports filename arguments
13357 that contain special characters such as '*'. */
13361 #include <signal.h>
13363 #include <stdbool.h>
13365 #include <string.h>
13366 #include <unistd.h>
13367 #include <sys/types.h>
13368 #include <sys/wait.h>
13370 extern char **environ;
13372 #ifndef STDIN_FILENO
13373 # define STDIN_FILENO 0
13375 #ifndef STDOUT_FILENO
13376 # define STDOUT_FILENO 1
13378 #ifndef STDERR_FILENO
13379 # define STDERR_FILENO 2
13383 # define WTERMSIG(x) ((x) & 0x7f)
13386 # define WIFEXITED(x) (WTERMSIG (x) == 0)
13388 #ifndef WEXITSTATUS
13389 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
13392 #define CHILD_PROGRAM_FILENAME "conftest"
13393 #define DATA_FILENAME "conftest%=*#?"
13399 char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
13400 posix_spawn_file_actions_t actions;
13401 bool actions_allocated;
13407 /* Create a data file with specific contents. */
13408 fp = fopen (DATA_FILENAME, "wb");
13411 perror ("cannot create data file");
13414 fwrite ("Halle Potta", 1, 11, fp);
13415 if (fflush (fp) || fclose (fp))
13417 perror ("cannot prepare data file");
13421 /* Avoid reading from our stdin, as it could block. */
13422 freopen ("/dev/null", "rb", stdin);
13424 /* Test whether posix_spawn_file_actions_addopen with this file name
13425 actually works, but spawning a child that reads from this file. */
13426 actions_allocated = false;
13427 if ((err = posix_spawn_file_actions_init (&actions)) != 0
13428 || (actions_allocated = true,
13429 (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
13430 || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
13432 if (actions_allocated)
13433 posix_spawn_file_actions_destroy (&actions);
13435 perror ("subprocess failed");
13438 posix_spawn_file_actions_destroy (&actions);
13440 while (waitpid (child, &status, 0) != child)
13442 if (!WIFEXITED (status))
13444 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
13447 exitstatus = WEXITSTATUS (status);
13448 if (exitstatus != 0)
13450 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
13461 /* See if reading from STDIN_FILENO yields the expected contents. */
13462 if (fread (buf, 1, sizeof (buf), stdin) == 11
13463 && memcmp (buf, "Halle Potta", 11) == 0)
13470 cleanup_then_die (int sig)
13472 /* Clean up data file. */
13473 unlink (DATA_FILENAME);
13475 /* Re-raise the signal and die from it. */
13476 signal (sig, SIG_DFL);
13481 main (int argc, char *argv[])
13485 if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
13487 /* This is the parent process. */
13488 signal (SIGINT, cleanup_then_die);
13489 signal (SIGTERM, cleanup_then_die);
13491 signal (SIGHUP, cleanup_then_die);
13494 exitstatus = parent_main ();
13498 /* This is the child process. */
13500 exitstatus = child_main ();
13502 unlink (DATA_FILENAME);
13507 if ac_fn_c_try_run "$LINENO"; then :
13510 gl_cv_func_posix_spawn_works=no
13512 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13513 conftest.$ac_objext conftest.beam conftest.$ac_ext
13519 aix*) gl_cv_func_posix_spawn_works="guessing no";;
13520 *) gl_cv_func_posix_spawn_works="guessing yes";;
13525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
13526 $as_echo "$gl_cv_func_posix_spawn_works" >&6; }
13528 case "$gl_cv_func_posix_spawn_works" in
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
13531 $as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
13532 if test "${gl_cv_func_spawnattr_setschedpolicy+set}" = set; then :
13533 $as_echo_n "(cached) " >&6
13535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13536 /* end confdefs.h. */
13539 #if POSIX_SPAWN_SETSCHEDULER
13540 POSIX scheduling supported
13544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13545 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
13546 gl_cv_func_spawnattr_setschedpolicy=yes
13548 gl_cv_func_spawnattr_setschedpolicy=no
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
13555 $as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
13556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
13557 $as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
13558 if test "${gl_cv_func_spawnattr_setschedparam+set}" = set; then :
13559 $as_echo_n "(cached) " >&6
13561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13562 /* end confdefs.h. */
13565 #if POSIX_SPAWN_SETSCHEDPARAM
13566 POSIX scheduling supported
13570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13571 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
13572 gl_cv_func_spawnattr_setschedparam=yes
13574 gl_cv_func_spawnattr_setschedparam=no
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
13581 $as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
13583 *) REPLACE_POSIX_SPAWN=1 ;;
13596 GNULIB_SIGNAL_H_SIGPIPE=0;
13597 GNULIB_SIGPROCMASK=0;
13598 GNULIB_SIGACTION=0;
13599 HAVE_POSIX_SIGNALBLOCKING=1;
13603 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
13605 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
13610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13611 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
13612 if test "${ac_cv_type_uid_t+set}" = set; then :
13613 $as_echo_n "(cached) " >&6
13615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13616 /* end confdefs.h. */
13617 #include <sys/types.h>
13620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13621 $EGREP "uid_t" >/dev/null 2>&1; then :
13622 ac_cv_type_uid_t=yes
13624 ac_cv_type_uid_t=no
13629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13630 $as_echo "$ac_cv_type_uid_t" >&6; }
13631 if test $ac_cv_type_uid_t = no; then
13633 $as_echo "#define uid_t int" >>confdefs.h
13636 $as_echo "#define gid_t int" >>confdefs.h
13644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
13645 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
13646 if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then :
13647 $as_echo_n "(cached) " >&6
13650 if test "$cross_compiling" = yes; then :
13653 # Guess yes on glibc systems.
13654 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13655 # Guess yes on FreeBSD >= 5.
13656 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
13657 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13658 # Guess yes on MacOS X >= 10.3.
13659 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
13660 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13661 # Guess yes on OpenBSD >= 3.9.
13662 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
13663 gl_cv_func_snprintf_retval_c99="guessing no";;
13664 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13665 # Guess yes on Solaris >= 2.10.
13666 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
13667 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
13668 # Guess yes on AIX >= 4.
13669 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
13670 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13671 # Guess yes on NetBSD >= 3.
13672 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
13673 gl_cv_func_snprintf_retval_c99="guessing no";;
13674 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13675 # Guess yes on BeOS.
13676 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13677 # If we don't know, assume the worst.
13678 *) gl_cv_func_snprintf_retval_c99="guessing no";;
13682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13683 /* end confdefs.h. */
13686 #include <string.h>
13687 static char buf[100];
13690 strcpy (buf, "ABCDEF");
13691 if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
13693 if (snprintf (buf, 0, "%d %d", 4567, 89) != 7)
13695 if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
13700 if ac_fn_c_try_run "$LINENO"; then :
13701 gl_cv_func_snprintf_retval_c99=yes
13703 gl_cv_func_snprintf_retval_c99=no
13705 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13706 conftest.$ac_objext conftest.beam conftest.$ac_ext
13711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
13712 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
13714 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13715 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
13721 cat >>confdefs.h <<_ACEOF
13722 #define HAVE_DECL_SNPRINTF $ac_have_decl
13727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13728 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13729 if test "${ac_cv_header_stdbool_h+set}" = set; then :
13730 $as_echo_n "(cached) " >&6
13732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733 /* end confdefs.h. */
13735 #include <stdbool.h>
13737 "error: bool is not defined"
13740 "error: false is not defined"
13743 "error: false is not 0"
13746 "error: true is not defined"
13749 "error: true is not 1"
13751 #ifndef __bool_true_false_are_defined
13752 "error: __bool_true_false_are_defined is not defined"
13755 struct s { _Bool s: 1; _Bool t; } s;
13757 char a[true == 1 ? 1 : -1];
13758 char b[false == 0 ? 1 : -1];
13759 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13760 char d[(bool) 0.5 == true ? 1 : -1];
13761 /* See body of main program for 'e'. */
13762 char f[(_Bool) 0.0 == false ? 1 : -1];
13764 char h[sizeof (_Bool)];
13765 char i[sizeof s.t];
13766 enum { j = false, k = true, l = false * true, m = true * 256 };
13767 /* The following fails for
13768 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13770 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13771 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13772 /* Catch a bug in an HP-UX C compiler. See
13773 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13774 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13786 /* Refer to every declared value, to avoid compiler optimizations. */
13787 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13788 + !m + !n + !o + !p + !q + !pq);
13794 if ac_fn_c_try_compile "$LINENO"; then :
13795 ac_cv_header_stdbool_h=yes
13797 ac_cv_header_stdbool_h=no
13799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13802 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13803 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13804 if test "x$ac_cv_type__Bool" = x""yes; then :
13806 cat >>confdefs.h <<_ACEOF
13807 #define HAVE__BOOL 1
13820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13821 $as_echo_n "checking for wchar_t... " >&6; }
13822 if test "${gt_cv_c_wchar_t+set}" = set; then :
13823 $as_echo_n "(cached) " >&6
13825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13826 /* end confdefs.h. */
13827 #include <stddef.h>
13828 wchar_t foo = (wchar_t)'\0';
13837 if ac_fn_c_try_compile "$LINENO"; then :
13838 gt_cv_c_wchar_t=yes
13842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13845 $as_echo "$gt_cv_c_wchar_t" >&6; }
13846 if test $gt_cv_c_wchar_t = yes; then
13848 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13861 if test -z "$ERRNO_H"; then
13862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
13863 $as_echo_n "checking for working strerror function... " >&6; }
13864 if test "${gl_cv_func_working_strerror+set}" = set; then :
13865 $as_echo_n "(cached) " >&6
13867 if test "$cross_compiling" = yes; then :
13868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13869 /* end confdefs.h. */
13870 #include <string.h>
13875 return !*strerror (-2);
13880 if ac_fn_c_try_compile "$LINENO"; then :
13881 gl_cv_func_working_strerror=yes
13883 gl_cv_func_working_strerror=no
13885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h. */
13890 #include <string.h>
13895 return !*strerror (-2);
13900 if ac_fn_c_try_run "$LINENO"; then :
13901 gl_cv_func_working_strerror=yes
13903 gl_cv_func_working_strerror=no
13905 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13906 conftest.$ac_objext conftest.beam conftest.$ac_ext
13911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
13912 $as_echo "$gl_cv_func_working_strerror" >&6; }
13913 if test $gl_cv_func_working_strerror = no; then
13919 if test $REPLACE_STRERROR = 1; then
13921 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13922 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13928 cat >>confdefs.h <<_ACEOF
13929 #define HAVE_DECL_STRERROR $ac_have_decl
13933 if test $ac_cv_header_sys_socket_h != yes; then
13934 for ac_header in winsock2.h
13936 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13937 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
13938 cat >>confdefs.h <<_ACEOF
13939 #define HAVE_WINSOCK2_H 1
13961 if test $gl_cv_have_include_next = yes; then
13962 gl_cv_next_string_h='<'string.h'>'
13964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
13965 $as_echo_n "checking absolute name of <string.h>... " >&6; }
13966 if test "${gl_cv_next_string_h+set}" = set; then :
13967 $as_echo_n "(cached) " >&6
13970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13971 /* end confdefs.h. */
13972 #include <string.h>
13976 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13977 *) gl_absname_cpp="$ac_cpp" ;;
13979 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13980 sed -n '\#/string.h#{
13981 s#.*"\(.*/string.h\)".*#\1#
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
13990 $as_echo "$gl_cv_next_string_h" >&6; }
13992 NEXT_STRING_H=$gl_cv_next_string_h
13994 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13995 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13996 gl_next_as_first_directive='<'string.h'>'
13998 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13999 gl_next_as_first_directive=$gl_cv_next_string_h
14001 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
14009 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
14010 if test "x$ac_cv_have_decl_strndup" = x""yes; then :
14016 cat >>confdefs.h <<_ACEOF
14017 #define HAVE_DECL_STRNDUP $ac_have_decl
14022 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
14023 if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
14029 cat >>confdefs.h <<_ACEOF
14030 #define HAVE_DECL_STRNLEN $ac_have_decl
14033 ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
14034 if test "x$ac_cv_have_decl_strsignal" = x""yes; then :
14040 cat >>confdefs.h <<_ACEOF
14041 #define HAVE_DECL_STRSIGNAL $ac_have_decl
14044 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
14045 /* NetBSD declares sys_siglist in unistd.h. */
14046 #ifdef HAVE_UNISTD_H
14047 # include <unistd.h>
14051 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
14057 cat >>confdefs.h <<_ACEOF
14058 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
14065 if test "$gl_cv_func_memchr_works" != yes; then
14075 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
14078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
14079 $as_echo_n "checking whether strstr works... " >&6; }
14080 if test "${gl_cv_func_strstr_works_always+set}" = set; then :
14081 $as_echo_n "(cached) " >&6
14083 if test "$cross_compiling" = yes; then :
14084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085 /* end confdefs.h. */
14087 #ifdef __GNU_LIBRARY__
14088 #include <features.h>
14089 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
14090 || defined __UCLIBC__
14093 #elif defined __CYGWIN__
14094 #include <cygwin/version.h>
14095 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
14103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14104 $EGREP "Lucky user" >/dev/null 2>&1; then :
14105 gl_cv_func_strstr_works_always=yes
14107 gl_cv_func_strstr_works_always="guessing no"
14113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14114 /* end confdefs.h. */
14116 #include <string.h> /* for strstr */
14117 #define P "_EF_BF_BD"
14118 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14119 #define NEEDLE P P P P P
14124 return !!strstr (HAYSTACK, NEEDLE);
14130 if ac_fn_c_try_run "$LINENO"; then :
14131 gl_cv_func_strstr_works_always=yes
14133 gl_cv_func_strstr_works_always=no
14135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14136 conftest.$ac_objext conftest.beam conftest.$ac_ext
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
14142 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
14143 if test "$gl_cv_func_strstr_works_always" != yes; then
14153 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
14158 ac_fn_c_check_decl "$LINENO" "strtod" "ac_cv_have_decl_strtod" "$ac_includes_default"
14159 if test "x$ac_cv_have_decl_strtod" = x""yes; then :
14165 cat >>confdefs.h <<_ACEOF
14166 #define HAVE_DECL_STRTOD $ac_have_decl
14170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
14171 $as_echo_n "checking whether ldexp() can be used without linking with libm... " >&6; }
14172 if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
14173 $as_echo_n "(cached) " >&6
14176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14177 /* end confdefs.h. */
14178 #ifndef __NO_MATH_INLINES
14179 # define __NO_MATH_INLINES 1 /* for glibc */
14182 double (*funcptr) (double, int) = ldexp;
14187 return ldexp (x, -1) > 0;
14192 if ac_fn_c_try_link "$LINENO"; then :
14193 gl_cv_func_ldexp_no_libm=yes
14195 gl_cv_func_ldexp_no_libm=no
14197 rm -f core conftest.err conftest.$ac_objext \
14198 conftest$ac_exeext conftest.$ac_ext
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
14202 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
14204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
14205 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
14206 if test "${ac_cv_header_stat_broken+set}" = set; then :
14207 $as_echo_n "(cached) " >&6
14209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14210 /* end confdefs.h. */
14211 #include <sys/types.h>
14212 #include <sys/stat.h>
14214 #if defined S_ISBLK && defined S_IFDIR
14215 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
14218 #if defined S_ISBLK && defined S_IFCHR
14219 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
14222 #if defined S_ISLNK && defined S_IFREG
14223 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
14226 #if defined S_ISSOCK && defined S_IFREG
14227 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
14231 if ac_fn_c_try_compile "$LINENO"; then :
14232 ac_cv_header_stat_broken=no
14234 ac_cv_header_stat_broken=yes
14236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
14239 $as_echo "$ac_cv_header_stat_broken" >&6; }
14240 if test $ac_cv_header_stat_broken = yes; then
14242 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
14255 GNULIB_NANOSLEEP=0;
14259 HAVE_DECL_LOCALTIME_R=1;
14263 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14264 REPLACE_MKTIME=GNULIB_PORTCHECK;
14265 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14266 REPLACE_TIMEGM=GNULIB_PORTCHECK;
14270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14271 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
14272 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
14273 $as_echo_n "(cached) " >&6
14275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14276 /* end confdefs.h. */
14282 static struct timespec x; x.tv_sec = x.tv_nsec;
14287 if ac_fn_c_try_compile "$LINENO"; then :
14288 gl_cv_sys_struct_timespec_in_time_h=yes
14290 gl_cv_sys_struct_timespec_in_time_h=no
14292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
14295 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
14297 TIME_H_DEFINES_STRUCT_TIMESPEC=0
14298 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14299 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14300 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
14301 TIME_H_DEFINES_STRUCT_TIMESPEC=1
14303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14304 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
14305 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
14306 $as_echo_n "(cached) " >&6
14308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14309 /* end confdefs.h. */
14310 #include <sys/time.h>
14315 static struct timespec x; x.tv_sec = x.tv_nsec;
14320 if ac_fn_c_try_compile "$LINENO"; then :
14321 gl_cv_sys_struct_timespec_in_sys_time_h=yes
14323 gl_cv_sys_struct_timespec_in_sys_time_h=no
14325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
14328 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14329 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
14330 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14333 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
14334 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
14335 $as_echo_n "(cached) " >&6
14337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14338 /* end confdefs.h. */
14339 #include <pthread.h>
14344 static struct timespec x; x.tv_sec = x.tv_nsec;
14349 if ac_fn_c_try_compile "$LINENO"; then :
14350 gl_cv_sys_struct_timespec_in_pthread_h=yes
14352 gl_cv_sys_struct_timespec_in_pthread_h=no
14354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
14357 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
14358 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
14359 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14378 if test $gl_cv_have_include_next = yes; then
14379 gl_cv_next_time_h='<'time.h'>'
14381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
14382 $as_echo_n "checking absolute name of <time.h>... " >&6; }
14383 if test "${gl_cv_next_time_h+set}" = set; then :
14384 $as_echo_n "(cached) " >&6
14387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14388 /* end confdefs.h. */
14393 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14394 *) gl_absname_cpp="$ac_cpp" ;;
14396 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14397 sed -n '\#/time.h#{
14398 s#.*"\(.*/time.h\)".*#\1#
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
14407 $as_echo "$gl_cv_next_time_h" >&6; }
14409 NEXT_TIME_H=$gl_cv_next_time_h
14411 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14412 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14413 gl_next_as_first_directive='<'time.h'>'
14415 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14416 gl_next_as_first_directive=$gl_cv_next_time_h
14418 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
14427 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
14428 if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then :
14434 cat >>confdefs.h <<_ACEOF
14435 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
14438 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
14439 if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then :
14445 cat >>confdefs.h <<_ACEOF
14446 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
14449 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
14450 if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then :
14456 cat >>confdefs.h <<_ACEOF
14457 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
14460 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
14461 if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then :
14467 cat >>confdefs.h <<_ACEOF
14468 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
14471 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
14472 if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then :
14478 cat >>confdefs.h <<_ACEOF
14479 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
14482 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
14483 if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then :
14489 cat >>confdefs.h <<_ACEOF
14490 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
14493 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
14494 if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then :
14500 cat >>confdefs.h <<_ACEOF
14501 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
14504 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
14505 if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then :
14511 cat >>confdefs.h <<_ACEOF
14512 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
14515 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
14516 if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then :
14522 cat >>confdefs.h <<_ACEOF
14523 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
14526 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
14527 if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then :
14533 cat >>confdefs.h <<_ACEOF
14534 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
14537 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
14538 if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then :
14544 cat >>confdefs.h <<_ACEOF
14545 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
14548 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
14549 if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then :
14555 cat >>confdefs.h <<_ACEOF
14556 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
14562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
14563 $as_echo_n "checking for wint_t... " >&6; }
14564 if test "${gt_cv_c_wint_t+set}" = set; then :
14565 $as_echo_n "(cached) " >&6
14567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14568 /* end confdefs.h. */
14570 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14572 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
14573 before <wchar.h>. */
14574 #include <stddef.h>
14578 wint_t foo = (wchar_t)'\0';
14587 if ac_fn_c_try_compile "$LINENO"; then :
14592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
14595 $as_echo "$gt_cv_c_wint_t" >&6; }
14596 if test $gt_cv_c_wint_t = yes; then
14598 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
14606 if test $ac_cv_header_features_h = yes; then
14613 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14614 if test "x$ac_cv_type_size_t" = x""yes; then :
14618 cat >>confdefs.h <<_ACEOF
14619 #define size_t unsigned int
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
14626 $as_echo_n "checking for inttypes.h... " >&6; }
14627 if test "${gl_cv_header_inttypes_h+set}" = set; then :
14628 $as_echo_n "(cached) " >&6
14630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14631 /* end confdefs.h. */
14633 #include <sys/types.h>
14634 #include <inttypes.h>
14639 uintmax_t i = (uintmax_t) -1; return !i;
14644 if ac_fn_c_try_compile "$LINENO"; then :
14645 gl_cv_header_inttypes_h=yes
14647 gl_cv_header_inttypes_h=no
14649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
14652 $as_echo "$gl_cv_header_inttypes_h" >&6; }
14653 if test $gl_cv_header_inttypes_h = yes; then
14655 cat >>confdefs.h <<_ACEOF
14656 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
14663 $as_echo_n "checking for stdint.h... " >&6; }
14664 if test "${gl_cv_header_stdint_h+set}" = set; then :
14665 $as_echo_n "(cached) " >&6
14667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14668 /* end confdefs.h. */
14669 #include <sys/types.h>
14670 #include <stdint.h>
14674 uintmax_t i = (uintmax_t) -1; return !i;
14679 if ac_fn_c_try_compile "$LINENO"; then :
14680 gl_cv_header_stdint_h=yes
14682 gl_cv_header_stdint_h=no
14684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
14687 $as_echo "$gl_cv_header_stdint_h" >&6; }
14688 if test $gl_cv_header_stdint_h = yes; then
14690 cat >>confdefs.h <<_ACEOF
14691 #define HAVE_STDINT_H_WITH_UINTMAX 1
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
14700 $as_echo_n "checking for intmax_t... " >&6; }
14701 if test "${gt_cv_c_intmax_t+set}" = set; then :
14702 $as_echo_n "(cached) " >&6
14704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14705 /* end confdefs.h. */
14707 #include <stddef.h>
14708 #include <stdlib.h>
14709 #if HAVE_STDINT_H_WITH_UINTMAX
14710 #include <stdint.h>
14712 #if HAVE_INTTYPES_H_WITH_UINTMAX
14713 #include <inttypes.h>
14719 intmax_t x = -1; return !x;
14724 if ac_fn_c_try_compile "$LINENO"; then :
14725 gt_cv_c_intmax_t=yes
14727 gt_cv_c_intmax_t=no
14729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
14732 $as_echo "$gt_cv_c_intmax_t" >&6; }
14733 if test $gt_cv_c_intmax_t = yes; then
14735 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
14739 test $ac_cv_type_long_long_int = yes \
14740 && ac_type='long long' \
14743 cat >>confdefs.h <<_ACEOF
14744 #define intmax_t $ac_type
14755 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
14757 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14758 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14759 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14760 cat >>confdefs.h <<_ACEOF
14761 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14767 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
14769 if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
14775 cat >>confdefs.h <<_ACEOF
14776 #define HAVE_DECL__SNPRINTF $ac_have_decl
14780 case "$gl_cv_func_snprintf_retval_c99" in
14783 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
14793 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
14794 if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
14795 $as_echo_n "(cached) " >&6
14798 if test "$cross_compiling" = yes; then :
14801 # Guess yes on glibc systems.
14802 *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
14803 # Guess yes on FreeBSD >= 5.
14804 freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
14805 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
14806 # Guess yes on MacOS X >= 10.3.
14807 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
14808 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
14809 # Guess yes on OpenBSD >= 3.9.
14810 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
14811 gl_cv_func_printf_sizes_c99="guessing no";;
14812 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
14813 # Guess yes on Solaris >= 2.10.
14814 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
14815 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
14816 # Guess yes on NetBSD >= 3.
14817 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
14818 gl_cv_func_printf_sizes_c99="guessing no";;
14819 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
14820 # If we don't know, assume the worst.
14821 *) gl_cv_func_printf_sizes_c99="guessing no";;
14825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14826 /* end confdefs.h. */
14828 #include <stddef.h>
14830 #include <string.h>
14831 #include <sys/types.h>
14832 #if HAVE_STDINT_H_WITH_UINTMAX
14833 # include <stdint.h>
14835 #if HAVE_INTTYPES_H_WITH_UINTMAX
14836 # include <inttypes.h>
14838 static char buf[100];
14842 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
14844 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
14845 || strcmp (buf, "12345671 33") != 0)
14849 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
14850 || strcmp (buf, "12345672 33") != 0)
14853 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
14854 || strcmp (buf, "12345673 33") != 0)
14857 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
14858 || strcmp (buf, "1.5 33") != 0)
14863 if ac_fn_c_try_run "$LINENO"; then :
14864 gl_cv_func_printf_sizes_c99=yes
14866 gl_cv_func_printf_sizes_c99=no
14868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14869 conftest.$ac_objext conftest.beam conftest.$ac_ext
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
14875 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
14880 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
14881 if test "${gl_cv_func_printf_long_double+set}" = set; then :
14882 $as_echo_n "(cached) " >&6
14885 if test "$cross_compiling" = yes; then :
14888 beos*) gl_cv_func_printf_long_double="guessing no";;
14889 mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
14890 *) gl_cv_func_printf_long_double="guessing yes";;
14894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h. */
14898 #include <string.h>
14899 static char buf[10000];
14904 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
14905 || strcmp (buf, "1.750000 33") != 0)
14908 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
14909 || strcmp (buf, "1.750000e+00 33") != 0)
14912 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
14913 || strcmp (buf, "1.75 33") != 0)
14918 if ac_fn_c_try_run "$LINENO"; then :
14919 gl_cv_func_printf_long_double=yes
14921 gl_cv_func_printf_long_double=no
14923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14924 conftest.$ac_objext conftest.beam conftest.$ac_ext
14929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
14930 $as_echo "$gl_cv_func_printf_long_double" >&6; }
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
14935 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
14936 if test "${gl_cv_func_printf_infinite+set}" = set; then :
14937 $as_echo_n "(cached) " >&6
14940 if test "$cross_compiling" = yes; then :
14943 # Guess yes on glibc systems.
14944 *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
14945 # Guess yes on FreeBSD >= 6.
14946 freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
14947 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
14948 # Guess yes on MacOS X >= 10.3.
14949 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
14950 darwin*) gl_cv_func_printf_infinite="guessing yes";;
14951 # Guess yes on HP-UX >= 11.
14952 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
14953 hpux*) gl_cv_func_printf_infinite="guessing yes";;
14954 # Guess yes on NetBSD >= 3.
14955 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
14956 gl_cv_func_printf_infinite="guessing no";;
14957 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
14958 # Guess yes on BeOS.
14959 beos*) gl_cv_func_printf_infinite="guessing yes";;
14960 # If we don't know, assume the worst.
14961 *) gl_cv_func_printf_infinite="guessing no";;
14965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14966 /* end confdefs.h. */
14969 #include <string.h>
14971 strisnan (const char *string, size_t start_index, size_t end_index)
14973 if (start_index < end_index)
14975 if (string[start_index] == '-')
14977 if (start_index + 3 <= end_index
14978 && memcmp (string + start_index, "nan", 3) == 0)
14981 if (start_index == end_index
14982 || (string[start_index] == '(' && string[end_index - 1] == ')'))
14991 static double plus_zero = 0.0;
14992 double minus_zero = - plus_zero;
14993 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
14995 static char buf[10000];
14996 static double zero = 0.0;
15000 if (sprintf (buf, "%f", 1.0 / 0.0) < 0
15001 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15003 if (sprintf (buf, "%f", -1.0 / 0.0) < 0
15004 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15006 if (sprintf (buf, "%f", zero / zero) < 0
15007 || !strisnan (buf, 0, strlen (buf)))
15009 if (sprintf (buf, "%e", 1.0 / 0.0) < 0
15010 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15012 if (sprintf (buf, "%e", -1.0 / 0.0) < 0
15013 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15015 if (sprintf (buf, "%e", zero / zero) < 0
15016 || !strisnan (buf, 0, strlen (buf)))
15018 if (sprintf (buf, "%g", 1.0 / 0.0) < 0
15019 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15021 if (sprintf (buf, "%g", -1.0 / 0.0) < 0
15022 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15024 if (sprintf (buf, "%g", zero / zero) < 0
15025 || !strisnan (buf, 0, strlen (buf)))
15027 /* This test fails on HP-UX 10.20. */
15028 if (have_minus_zero ())
15029 if (sprintf (buf, "%g", - zero) < 0
15030 || strcmp (buf, "-0") != 0)
15035 if ac_fn_c_try_run "$LINENO"; then :
15036 gl_cv_func_printf_infinite=yes
15038 gl_cv_func_printf_infinite=no
15040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15041 conftest.$ac_objext conftest.beam conftest.$ac_ext
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
15047 $as_echo "$gl_cv_func_printf_infinite" >&6; }
15053 if test -n "$gl_printf_safe"; then
15055 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
15058 case "$gl_cv_func_printf_long_double" in
15060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
15061 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
15062 if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
15063 $as_echo_n "(cached) " >&6
15066 if test "$cross_compiling" = yes; then :
15068 case "$host_cpu" in
15069 # Guess no on ia64, x86_64, i386.
15070 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
15073 # Guess yes on glibc systems.
15074 *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
15075 # Guess yes on FreeBSD >= 6.
15076 freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
15077 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
15078 # Guess yes on HP-UX >= 11.
15079 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
15080 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
15081 # If we don't know, assume the worst.
15082 *) gl_cv_func_printf_infinite_long_double="guessing no";;
15088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15089 /* end confdefs.h. */
15092 #include <stdlib.h>
15093 #if defined __MACH__ && defined __APPLE__
15094 /* Avoid a crash on MacOS X. */
15095 #include <mach/mach.h>
15096 #include <mach/mach_error.h>
15097 #include <mach/thread_status.h>
15098 #include <mach/exception.h>
15099 #include <mach/task.h>
15100 #include <pthread.h>
15101 /* The exception port on which our thread listens. */
15102 static mach_port_t our_exception_port;
15103 /* The main function of the thread listening for exceptions of type
15106 mach_exception_thread (void *arg)
15108 /* Buffer for a message to be received. */
15110 mach_msg_header_t head;
15111 mach_msg_body_t msgh_body;
15114 mach_msg_return_t retval;
15115 /* Wait for a message on the exception port. */
15116 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
15117 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
15118 if (retval != MACH_MSG_SUCCESS)
15123 nocrash_init (void)
15125 mach_port_t self = mach_task_self ();
15126 /* Allocate a port on which the thread shall listen for exceptions. */
15127 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
15129 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
15130 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
15131 MACH_MSG_TYPE_MAKE_SEND)
15133 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
15135 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
15136 /* Create the thread listening on the exception port. */
15137 pthread_attr_t attr;
15139 if (pthread_attr_init (&attr) == 0
15140 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
15141 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
15142 pthread_attr_destroy (&attr);
15143 /* Replace the exception port info for these exceptions with our own.
15144 Note that we replace the exception port for the entire task, not only
15145 for a particular thread. This has the effect that when our exception
15146 port gets the message, the thread specific exception port has already
15147 been asked, and we don't need to bother about it.
15148 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
15149 task_set_exception_ports (self, mask, our_exception_port,
15150 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
15156 /* Avoid a crash on POSIX systems. */
15157 #include <signal.h>
15158 /* A POSIX signal handler. */
15160 exception_handler (int sig)
15165 nocrash_init (void)
15168 signal (SIGSEGV, exception_handler);
15171 signal (SIGBUS, exception_handler);
15178 #include <string.h>
15180 strisnan (const char *string, size_t start_index, size_t end_index)
15182 if (start_index < end_index)
15184 if (string[start_index] == '-')
15186 if (start_index + 3 <= end_index
15187 && memcmp (string + start_index, "nan", 3) == 0)
15190 if (start_index == end_index
15191 || (string[start_index] == '(' && string[end_index - 1] == ')'))
15197 static char buf[10000];
15198 static long double zeroL = 0.0L;
15203 if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
15204 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15206 if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
15207 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15209 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
15210 || !strisnan (buf, 0, strlen (buf)))
15212 if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
15213 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15215 if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
15216 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15218 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
15219 || !strisnan (buf, 0, strlen (buf)))
15221 if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
15222 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15224 if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
15225 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15227 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
15228 || !strisnan (buf, 0, strlen (buf)))
15230 #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_))
15231 /* Representation of an 80-bit 'long double' as an initializer for a sequence
15232 of 'unsigned int' words. */
15233 # ifdef WORDS_BIGENDIAN
15234 # define LDBL80_WORDS(exponent,manthi,mantlo) \
15235 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
15236 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
15237 (unsigned int) (mantlo) << 16 \
15240 # define LDBL80_WORDS(exponent,manthi,mantlo) \
15241 { mantlo, manthi, exponent }
15244 static union { unsigned int word[4]; long double value; } x =
15245 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
15246 if (sprintf (buf, "%Lf", x.value) < 0
15247 || !strisnan (buf, 0, strlen (buf)))
15249 if (sprintf (buf, "%Le", x.value) < 0
15250 || !strisnan (buf, 0, strlen (buf)))
15252 if (sprintf (buf, "%Lg", x.value) < 0
15253 || !strisnan (buf, 0, strlen (buf)))
15257 /* Signalling NaN. */
15258 static union { unsigned int word[4]; long double value; } x =
15259 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
15260 if (sprintf (buf, "%Lf", x.value) < 0
15261 || !strisnan (buf, 0, strlen (buf)))
15263 if (sprintf (buf, "%Le", x.value) < 0
15264 || !strisnan (buf, 0, strlen (buf)))
15266 if (sprintf (buf, "%Lg", x.value) < 0
15267 || !strisnan (buf, 0, strlen (buf)))
15270 { /* Pseudo-NaN. */
15271 static union { unsigned int word[4]; long double value; } x =
15272 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
15273 if (sprintf (buf, "%Lf", x.value) < 0
15274 || !strisnan (buf, 0, strlen (buf)))
15276 if (sprintf (buf, "%Le", x.value) < 0
15277 || !strisnan (buf, 0, strlen (buf)))
15279 if (sprintf (buf, "%Lg", x.value) < 0
15280 || !strisnan (buf, 0, strlen (buf)))
15283 { /* Pseudo-Infinity. */
15284 static union { unsigned int word[4]; long double value; } x =
15285 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
15286 if (sprintf (buf, "%Lf", x.value) < 0
15287 || !strisnan (buf, 0, strlen (buf)))
15289 if (sprintf (buf, "%Le", x.value) < 0
15290 || !strisnan (buf, 0, strlen (buf)))
15292 if (sprintf (buf, "%Lg", x.value) < 0
15293 || !strisnan (buf, 0, strlen (buf)))
15296 { /* Pseudo-Zero. */
15297 static union { unsigned int word[4]; long double value; } x =
15298 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
15299 if (sprintf (buf, "%Lf", x.value) < 0
15300 || !strisnan (buf, 0, strlen (buf)))
15302 if (sprintf (buf, "%Le", x.value) < 0
15303 || !strisnan (buf, 0, strlen (buf)))
15305 if (sprintf (buf, "%Lg", x.value) < 0
15306 || !strisnan (buf, 0, strlen (buf)))
15309 { /* Unnormalized number. */
15310 static union { unsigned int word[4]; long double value; } x =
15311 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
15312 if (sprintf (buf, "%Lf", x.value) < 0
15313 || !strisnan (buf, 0, strlen (buf)))
15315 if (sprintf (buf, "%Le", x.value) < 0
15316 || !strisnan (buf, 0, strlen (buf)))
15318 if (sprintf (buf, "%Lg", x.value) < 0
15319 || !strisnan (buf, 0, strlen (buf)))
15322 { /* Pseudo-Denormal. */
15323 static union { unsigned int word[4]; long double value; } x =
15324 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
15325 if (sprintf (buf, "%Lf", x.value) < 0
15326 || !strisnan (buf, 0, strlen (buf)))
15328 if (sprintf (buf, "%Le", x.value) < 0
15329 || !strisnan (buf, 0, strlen (buf)))
15331 if (sprintf (buf, "%Lg", x.value) < 0
15332 || !strisnan (buf, 0, strlen (buf)))
15339 if ac_fn_c_try_run "$LINENO"; then :
15340 gl_cv_func_printf_infinite_long_double=yes
15342 gl_cv_func_printf_infinite_long_double=no
15344 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15345 conftest.$ac_objext conftest.beam conftest.$ac_ext
15350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
15351 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
15354 gl_cv_func_printf_infinite_long_double="irrelevant"
15360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
15361 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
15362 if test "${gl_cv_func_printf_directive_a+set}" = set; then :
15363 $as_echo_n "(cached) " >&6
15366 if test "$cross_compiling" = yes; then :
15369 # Guess yes on glibc >= 2.5 systems.
15371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372 /* end confdefs.h. */
15374 #include <features.h>
15375 #ifdef __GNU_LIBRARY__
15376 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
15382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15383 $EGREP "BZ2908" >/dev/null 2>&1; then :
15384 gl_cv_func_printf_directive_a="guessing yes"
15386 gl_cv_func_printf_directive_a="guessing no"
15391 # If we don't know, assume the worst.
15392 *) gl_cv_func_printf_directive_a="guessing no";;
15396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15397 /* end confdefs.h. */
15400 #include <string.h>
15401 static char buf[100];
15405 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
15406 || (strcmp (buf, "0x1.922p+1 33") != 0
15407 && strcmp (buf, "0x3.244p+0 33") != 0
15408 && strcmp (buf, "0x6.488p-1 33") != 0
15409 && strcmp (buf, "0xc.91p-2 33") != 0))
15411 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
15412 || (strcmp (buf, "-0X1.922P+1 33") != 0
15413 && strcmp (buf, "-0X3.244P+0 33") != 0
15414 && strcmp (buf, "-0X6.488P-1 33") != 0
15415 && strcmp (buf, "-0XC.91P-2 33") != 0))
15417 /* This catches a FreeBSD 6.1 bug: it doesn't round. */
15418 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
15419 || (strcmp (buf, "0x1.83p+0 33") != 0
15420 && strcmp (buf, "0x3.05p-1 33") != 0
15421 && strcmp (buf, "0x6.0ap-2 33") != 0
15422 && strcmp (buf, "0xc.14p-3 33") != 0))
15424 /* This catches a FreeBSD 6.1 bug. See
15425 <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
15426 if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
15429 /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
15430 if (sprintf (buf, "%.1a", 1.999) < 0
15431 || (strcmp (buf, "0x1.0p+1") != 0
15432 && strcmp (buf, "0x2.0p+0") != 0
15433 && strcmp (buf, "0x4.0p-1") != 0
15434 && strcmp (buf, "0x8.0p-2") != 0))
15436 /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
15437 glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
15438 if (sprintf (buf, "%.1La", 1.999L) < 0
15439 || (strcmp (buf, "0x1.0p+1") != 0
15440 && strcmp (buf, "0x2.0p+0") != 0
15441 && strcmp (buf, "0x4.0p-1") != 0
15442 && strcmp (buf, "0x8.0p-2") != 0))
15447 if ac_fn_c_try_run "$LINENO"; then :
15448 gl_cv_func_printf_directive_a=yes
15450 gl_cv_func_printf_directive_a=no
15452 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15453 conftest.$ac_objext conftest.beam conftest.$ac_ext
15458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
15459 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
15464 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
15465 if test "${gl_cv_func_printf_directive_f+set}" = set; then :
15466 $as_echo_n "(cached) " >&6
15469 if test "$cross_compiling" = yes; then :
15472 # Guess yes on glibc systems.
15473 *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
15474 # Guess yes on FreeBSD >= 6.
15475 freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
15476 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
15477 # Guess yes on MacOS X >= 10.3.
15478 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
15479 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
15480 # Guess yes on Solaris >= 2.10.
15481 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15482 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
15483 # If we don't know, assume the worst.
15484 *) gl_cv_func_printf_directive_f="guessing no";;
15488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15489 /* end confdefs.h. */
15492 #include <string.h>
15493 static char buf[100];
15497 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
15498 || strcmp (buf, "1234567.000000 33") != 0)
15500 if (sprintf (buf, "%F", 1.0 / 0.0) < 0
15501 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
15503 /* This catches a Cygwin 1.5.x bug. */
15504 if (sprintf (buf, "%.F", 1234.0) < 0
15505 || strcmp (buf, "1234") != 0)
15510 if ac_fn_c_try_run "$LINENO"; then :
15511 gl_cv_func_printf_directive_f=yes
15513 gl_cv_func_printf_directive_f=no
15515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15516 conftest.$ac_objext conftest.beam conftest.$ac_ext
15521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
15522 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
15527 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
15528 if test "${gl_cv_func_printf_directive_n+set}" = set; then :
15529 $as_echo_n "(cached) " >&6
15532 if test "$cross_compiling" = yes; then :
15535 *) gl_cv_func_printf_directive_n="guessing yes";;
15539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15540 /* end confdefs.h. */
15543 #include <string.h>
15544 static char fmtstring[10];
15545 static char buf[100];
15549 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
15550 support %n in format strings in read-only memory but not in writable
15552 strcpy (fmtstring, "%d %n");
15553 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
15554 || strcmp (buf, "123 ") != 0
15560 if ac_fn_c_try_run "$LINENO"; then :
15561 gl_cv_func_printf_directive_n=yes
15563 gl_cv_func_printf_directive_n=no
15565 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15566 conftest.$ac_objext conftest.beam conftest.$ac_ext
15571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
15572 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
15576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
15577 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
15578 if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
15579 $as_echo_n "(cached) " >&6
15582 if test "$cross_compiling" = yes; then :
15585 openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
15586 irix*) gl_cv_func_printf_directive_ls="guessing no";;
15587 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
15588 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
15589 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
15590 *) gl_cv_func_printf_directive_ls="guessing yes";;
15594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15595 /* end confdefs.h. */
15597 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15599 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15600 included before <wchar.h>. */
15601 #include <stddef.h>
15605 #include <string.h>
15610 /* Test whether %ls works at all.
15611 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
15614 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
15616 if (sprintf (buf, "%ls", wstring) < 0
15617 || strcmp (buf, "abc") != 0)
15620 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
15621 assertion failure inside libc), but not on OpenBSD 4.0. */
15623 static const wchar_t wstring[] = { 'a', 0 };
15625 if (sprintf (buf, "%ls", wstring) < 0
15626 || strcmp (buf, "a") != 0)
15629 /* Test whether precisions in %ls are supported as specified in ISO C 99
15631 "If a precision is specified, no more than that many bytes are written
15632 (including shift sequences, if any), and the array shall contain a
15633 null wide character if, to equal the multibyte character sequence
15634 length given by the precision, the function would need to access a
15635 wide character one past the end of the array."
15636 This test fails on Solaris 10. */
15638 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
15640 if (sprintf (buf, "%.2ls", wstring) < 0
15641 || strcmp (buf, "ab") != 0)
15647 if ac_fn_c_try_run "$LINENO"; then :
15648 gl_cv_func_printf_directive_ls=yes
15650 gl_cv_func_printf_directive_ls=no
15652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15653 conftest.$ac_objext conftest.beam conftest.$ac_ext
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
15659 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
15663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
15664 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
15665 if test "${gl_cv_func_printf_positions+set}" = set; then :
15666 $as_echo_n "(cached) " >&6
15669 if test "$cross_compiling" = yes; then :
15672 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
15673 gl_cv_func_printf_positions="guessing no";;
15674 beos*) gl_cv_func_printf_positions="guessing no";;
15675 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
15676 *) gl_cv_func_printf_positions="guessing yes";;
15680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15681 /* end confdefs.h. */
15684 #include <string.h>
15685 /* The string "%2$d %1$d", with dollar characters protected from the shell's
15686 dollar expansion (possibly an autoconf bug). */
15687 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
15688 static char buf[100];
15691 sprintf (buf, format, 33, 55);
15692 return (strcmp (buf, "55 33") != 0);
15695 if ac_fn_c_try_run "$LINENO"; then :
15696 gl_cv_func_printf_positions=yes
15698 gl_cv_func_printf_positions=no
15700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15701 conftest.$ac_objext conftest.beam conftest.$ac_ext
15706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
15707 $as_echo "$gl_cv_func_printf_positions" >&6; }
15711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
15712 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
15713 if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
15714 $as_echo_n "(cached) " >&6
15717 if test "$cross_compiling" = yes; then :
15720 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
15721 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
15722 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
15723 *) gl_cv_func_printf_flag_grouping="guessing yes";;
15727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15728 /* end confdefs.h. */
15731 #include <string.h>
15732 static char buf[100];
15735 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
15736 || buf[strlen (buf) - 1] != '9')
15741 if ac_fn_c_try_run "$LINENO"; then :
15742 gl_cv_func_printf_flag_grouping=yes
15744 gl_cv_func_printf_flag_grouping=no
15746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15747 conftest.$ac_objext conftest.beam conftest.$ac_ext
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
15753 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
15757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
15758 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
15759 if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
15760 $as_echo_n "(cached) " >&6
15763 if test "$cross_compiling" = yes; then :
15766 # Guess yes on HP-UX 11.
15767 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
15768 # Guess no on HP-UX 10 and older.
15769 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
15770 # Guess yes otherwise.
15771 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
15775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15776 /* end confdefs.h. */
15779 #include <string.h>
15780 static char buf[100];
15783 /* Check that a '-' flag is not annihilated by a negative width. */
15784 if (sprintf (buf, "a%-*sc", -3, "b") < 0
15785 || strcmp (buf, "ab c") != 0)
15790 if ac_fn_c_try_run "$LINENO"; then :
15791 gl_cv_func_printf_flag_leftadjust=yes
15793 gl_cv_func_printf_flag_leftadjust=no
15795 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15796 conftest.$ac_objext conftest.beam conftest.$ac_ext
15801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
15802 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
15806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
15807 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
15808 if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
15809 $as_echo_n "(cached) " >&6
15812 if test "$cross_compiling" = yes; then :
15815 # Guess yes on glibc systems.
15816 *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
15817 # Guess yes on BeOS.
15818 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
15819 # If we don't know, assume the worst.
15820 *) gl_cv_func_printf_flag_zero="guessing no";;
15824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15825 /* end confdefs.h. */
15828 #include <string.h>
15829 static char buf[100];
15832 if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
15833 || (strcmp (buf, " inf") != 0
15834 && strcmp (buf, " infinity") != 0))
15839 if ac_fn_c_try_run "$LINENO"; then :
15840 gl_cv_func_printf_flag_zero=yes
15842 gl_cv_func_printf_flag_zero=no
15844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15845 conftest.$ac_objext conftest.beam conftest.$ac_ext
15850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
15851 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
15855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
15856 $as_echo_n "checking whether printf supports large precisions... " >&6; }
15857 if test "${gl_cv_func_printf_precision+set}" = set; then :
15858 $as_echo_n "(cached) " >&6
15861 if test "$cross_compiling" = yes; then :
15864 # Guess no only on Solaris, native Win32, and BeOS systems.
15865 solaris*) gl_cv_func_printf_precision="guessing no" ;;
15866 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
15867 beos*) gl_cv_func_printf_precision="guessing no" ;;
15868 *) gl_cv_func_printf_precision="guessing yes" ;;
15872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15873 /* end confdefs.h. */
15876 #include <string.h>
15877 static char buf[5000];
15882 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
15885 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
15887 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
15889 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
15895 if ac_fn_c_try_run "$LINENO"; then :
15896 gl_cv_func_printf_precision=yes
15898 gl_cv_func_printf_precision=no
15900 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15901 conftest.$ac_objext conftest.beam conftest.$ac_ext
15906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
15907 $as_echo "$gl_cv_func_printf_precision" >&6; }
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
15913 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
15914 if test "${gl_cv_func_printf_enomem+set}" = set; then :
15915 $as_echo_n "(cached) " >&6
15918 gl_cv_func_printf_enomem="guessing no"
15919 if test "$cross_compiling" = no; then
15920 if test $APPLE_UNIVERSAL_BUILD = 0; then
15921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15922 /* end confdefs.h. */
15925 #include <stdlib.h>
15926 #if defined __MACH__ && defined __APPLE__
15927 /* Avoid a crash on MacOS X. */
15928 #include <mach/mach.h>
15929 #include <mach/mach_error.h>
15930 #include <mach/thread_status.h>
15931 #include <mach/exception.h>
15932 #include <mach/task.h>
15933 #include <pthread.h>
15934 /* The exception port on which our thread listens. */
15935 static mach_port_t our_exception_port;
15936 /* The main function of the thread listening for exceptions of type
15939 mach_exception_thread (void *arg)
15941 /* Buffer for a message to be received. */
15943 mach_msg_header_t head;
15944 mach_msg_body_t msgh_body;
15947 mach_msg_return_t retval;
15948 /* Wait for a message on the exception port. */
15949 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
15950 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
15951 if (retval != MACH_MSG_SUCCESS)
15956 nocrash_init (void)
15958 mach_port_t self = mach_task_self ();
15959 /* Allocate a port on which the thread shall listen for exceptions. */
15960 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
15962 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
15963 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
15964 MACH_MSG_TYPE_MAKE_SEND)
15966 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
15968 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
15969 /* Create the thread listening on the exception port. */
15970 pthread_attr_t attr;
15972 if (pthread_attr_init (&attr) == 0
15973 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
15974 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
15975 pthread_attr_destroy (&attr);
15976 /* Replace the exception port info for these exceptions with our own.
15977 Note that we replace the exception port for the entire task, not only
15978 for a particular thread. This has the effect that when our exception
15979 port gets the message, the thread specific exception port has already
15980 been asked, and we don't need to bother about it.
15981 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
15982 task_set_exception_ports (self, mask, our_exception_port,
15983 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
15989 /* Avoid a crash on POSIX systems. */
15990 #include <signal.h>
15991 /* A POSIX signal handler. */
15993 exception_handler (int sig)
15998 nocrash_init (void)
16001 signal (SIGSEGV, exception_handler);
16004 signal (SIGBUS, exception_handler);
16010 #include <sys/types.h>
16011 #include <sys/time.h>
16012 #include <sys/resource.h>
16016 struct rlimit limit;
16019 /* Some printf implementations allocate temporary space with malloc. */
16020 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
16022 if (getrlimit (RLIMIT_DATA, &limit) < 0)
16024 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
16025 limit.rlim_max = 5000000;
16026 limit.rlim_cur = limit.rlim_max;
16027 if (setrlimit (RLIMIT_DATA, &limit) < 0)
16030 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
16032 if (getrlimit (RLIMIT_AS, &limit) < 0)
16034 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
16035 limit.rlim_max = 5000000;
16036 limit.rlim_cur = limit.rlim_max;
16037 if (setrlimit (RLIMIT_AS, &limit) < 0)
16040 /* Some printf implementations allocate temporary space on the stack. */
16041 #ifdef RLIMIT_STACK
16042 if (getrlimit (RLIMIT_STACK, &limit) < 0)
16044 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
16045 limit.rlim_max = 5000000;
16046 limit.rlim_cur = limit.rlim_max;
16047 if (setrlimit (RLIMIT_STACK, &limit) < 0)
16050 ret = printf ("%.5000000f", 1.0);
16051 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
16055 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16056 (eval $ac_link) 2>&5
16058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16059 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16062 if test $result != 0 && test $result != 77; then result=1; fi
16064 ) >/dev/null 2>/dev/null
16066 0) gl_cv_func_printf_enomem="yes" ;;
16067 77) gl_cv_func_printf_enomem="guessing no" ;;
16068 *) gl_cv_func_printf_enomem="no" ;;
16071 gl_cv_func_printf_enomem="guessing no"
16075 gl_cv_func_printf_enomem="guessing no"
16078 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
16080 # Guess yes on glibc systems.
16081 *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
16082 # Guess yes on Solaris.
16083 solaris*) gl_cv_func_printf_enomem="guessing yes";;
16084 # Guess yes on AIX.
16085 aix*) gl_cv_func_printf_enomem="guessing yes";;
16086 # Guess yes on HP-UX/hppa.
16087 hpux*) case "$host_cpu" in
16088 hppa*) gl_cv_func_printf_enomem="guessing yes";;
16089 *) gl_cv_func_printf_enomem="guessing no";;
16092 # Guess yes on IRIX.
16093 irix*) gl_cv_func_printf_enomem="guessing yes";;
16094 # Guess yes on OSF/1.
16095 osf*) gl_cv_func_printf_enomem="guessing yes";;
16096 # Guess yes on BeOS.
16097 beos*) gl_cv_func_printf_enomem="guessing yes";;
16098 # Guess yes on Haiku.
16099 haiku*) gl_cv_func_printf_enomem="guessing yes";;
16100 # If we don't know, assume the worst.
16101 *) gl_cv_func_printf_enomem="guessing no";;
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
16107 $as_echo "$gl_cv_func_printf_enomem" >&6; }
16111 case "$gl_cv_func_printf_long_double" in
16116 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
16128 GNULIB_TOWCTRANS=0;
16132 REPLACE_ISWBLANK=0;
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use C++" >&5
16140 $as_echo_n "checking whether to use C++... " >&6; }
16141 # Check whether --enable-c++ was given.
16142 if test "${enable_c__+set}" = set; then :
16143 enableval=$enable_c__; CXX_CHOICE="$enableval"
16148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_CHOICE" >&5
16149 $as_echo "$CXX_CHOICE" >&6; }
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
16156 $as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
16157 if test "${gl_cv_func_ungetc_works+set}" = set; then :
16158 $as_echo_n "(cached) " >&6
16160 if test "$cross_compiling" = yes; then :
16161 gl_cv_func_ungetc_works='guessing no'
16163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16164 /* end confdefs.h. */
16172 if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
16173 if (fputs ("abc", f) < 0) return 2;
16175 if (fgetc (f) != 'a') return 3;
16176 if (fgetc (f) != 'b') return 4;
16177 if (ungetc ('d', f) != 'd') return 5;
16178 if (ftell (f) != 1) return 6;
16179 if (fgetc (f) != 'd') return 7;
16180 if (ftell (f) != 2) return 8;
16181 if (fseek (f, 0, SEEK_CUR) != 0) return 9;
16182 if (ftell (f) != 2) return 10;
16183 if (fgetc (f) != 'c') return 11;
16184 fclose (f); remove ("conftest.tmp");
16189 if ac_fn_c_try_run "$LINENO"; then :
16190 gl_cv_func_ungetc_works=yes
16192 gl_cv_func_ungetc_works=no
16194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16195 conftest.$ac_objext conftest.beam conftest.$ac_ext
16200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
16201 $as_echo "$gl_cv_func_ungetc_works" >&6; }
16202 if test "$gl_cv_func_ungetc_works" != yes; then
16204 $as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
16211 GNULIB_SETLOCALE=0;
16212 GNULIB_DUPLOCALE=0;
16214 REPLACE_SETLOCALE=0;
16215 REPLACE_DUPLOCALE=0;
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
16223 $as_echo_n "checking for LC_MESSAGES... " >&6; }
16224 if test "${gt_cv_val_LC_MESSAGES+set}" = set; then :
16225 $as_echo_n "(cached) " >&6
16227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16228 /* end confdefs.h. */
16229 #include <locale.h>
16238 if ac_fn_c_try_link "$LINENO"; then :
16239 gt_cv_val_LC_MESSAGES=yes
16241 gt_cv_val_LC_MESSAGES=no
16243 rm -f core conftest.err conftest.$ac_objext \
16244 conftest$ac_exeext conftest.$ac_ext
16246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
16247 $as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
16248 if test $gt_cv_val_LC_MESSAGES = yes; then
16250 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
16255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
16256 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
16257 if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
16258 $as_echo_n "(cached) " >&6
16260 gt_save_LIBS="$LIBS"
16261 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
16262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16263 /* end confdefs.h. */
16264 #include <CoreFoundation/CFPreferences.h>
16268 CFPreferencesCopyAppValue(NULL, NULL)
16273 if ac_fn_c_try_link "$LINENO"; then :
16274 gt_cv_func_CFPreferencesCopyAppValue=yes
16276 gt_cv_func_CFPreferencesCopyAppValue=no
16278 rm -f core conftest.err conftest.$ac_objext \
16279 conftest$ac_exeext conftest.$ac_ext
16280 LIBS="$gt_save_LIBS"
16282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
16283 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
16284 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
16286 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
16290 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
16291 if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
16292 $as_echo_n "(cached) " >&6
16294 gt_save_LIBS="$LIBS"
16295 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
16296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16297 /* end confdefs.h. */
16298 #include <CoreFoundation/CFLocale.h>
16302 CFLocaleCopyCurrent();
16307 if ac_fn_c_try_link "$LINENO"; then :
16308 gt_cv_func_CFLocaleCopyCurrent=yes
16310 gt_cv_func_CFLocaleCopyCurrent=no
16312 rm -f core conftest.err conftest.$ac_objext \
16313 conftest$ac_exeext conftest.$ac_ext
16314 LIBS="$gt_save_LIBS"
16316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
16317 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
16318 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
16320 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
16324 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
16325 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
16329 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16330 if test "x$ac_cv_have_decl_setenv" = x""yes; then :
16336 cat >>confdefs.h <<_ACEOF
16337 #define HAVE_DECL_SETENV $ac_have_decl
16345 if test $ac_cv_have_decl_setenv = no; then
16349 if test $ac_cv_func_setenv = no; then
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
16353 $as_echo_n "checking whether setenv validates arguments... " >&6; }
16354 if test "${gl_cv_func_setenv_works+set}" = set; then :
16355 $as_echo_n "(cached) " >&6
16357 if test "$cross_compiling" = yes; then :
16358 gl_cv_func_setenv_works="guessing no"
16360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16361 /* end confdefs.h. */
16363 #include <stdlib.h>
16365 #include <string.h>
16373 if (setenv ("", "", 0) != -1)
16375 else if (errno != EINVAL)
16379 if (setenv ("a", "=", 1) != 0)
16381 else if (strcmp (getenv ("a"), "=") != 0)
16390 if ac_fn_c_try_run "$LINENO"; then :
16391 gl_cv_func_setenv_works=yes
16393 gl_cv_func_setenv_works=no
16395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16396 conftest.$ac_objext conftest.beam conftest.$ac_ext
16400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
16401 $as_echo "$gl_cv_func_setenv_works" >&6; }
16402 if test "$gl_cv_func_setenv_works" != yes; then
16412 M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
16420 for ac_header in search.h
16422 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16423 if test "x$ac_cv_header_search_h" = x""yes; then :
16424 cat >>confdefs.h <<_ACEOF
16425 #define HAVE_SEARCH_H 1
16432 for ac_func in tsearch
16434 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16435 if test "x$ac_cv_func_tsearch" = x""yes; then :
16436 cat >>confdefs.h <<_ACEOF
16437 #define HAVE_TSEARCH 1
16447 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16448 if test "x$ac_cv_have_decl_strdup" = x""yes; then :
16454 cat >>confdefs.h <<_ACEOF
16455 #define HAVE_DECL_STRDUP $ac_have_decl
16458 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
16459 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
16465 cat >>confdefs.h <<_ACEOF
16466 #define HAVE_DECL_ALARM $ac_have_decl
16471 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
16472 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
16478 cat >>confdefs.h <<_ACEOF
16479 #define HAVE_DECL_UNSETENV $ac_have_decl
16486 GL_COND_LIBTOOL_TRUE=
16487 GL_COND_LIBTOOL_FALSE='#'
16489 GL_COND_LIBTOOL_TRUE='#'
16490 GL_COND_LIBTOOL_FALSE=
16493 gl_cond_libtool=false
16506 gl_source_base='lib'
16507 # Code from module alloca-opt:
16510 if test $ac_cv_func_alloca_works = no; then
16514 # Define an additional variable used in the Makefile substitution.
16515 if test $ac_cv_working_alloca_h = yes; then
16516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16517 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16518 if test "${gl_cv_rpl_alloca+set}" = set; then :
16519 $as_echo_n "(cached) " >&6
16522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16523 /* end confdefs.h. */
16525 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16530 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16531 $EGREP "Need own alloca" >/dev/null 2>&1; then :
16532 gl_cv_rpl_alloca=yes
16534 gl_cv_rpl_alloca=no
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16541 $as_echo "$gl_cv_rpl_alloca" >&6; }
16542 if test $gl_cv_rpl_alloca = yes; then
16544 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16555 # Code from module announce-gen:
16556 # Code from module arg-nonnull:
16557 # Code from module assert:
16559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
16560 $as_echo_n "checking whether to enable assertions... " >&6; }
16561 # Check whether --enable-assert was given.
16562 if test "${enable_assert+set}" = set; then :
16563 enableval=$enable_assert; if test "x$enableval" = xno; then :
16565 $as_echo "#define NDEBUG 1" >>confdefs.h
16567 elif test "x$enableval" != xyes; then :
16568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
16569 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
16576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
16577 $as_echo "$enable_assert" >&6; }
16579 # Code from module autobuild:
16580 # Code from module avltree-oset:
16581 # Code from module binary-io:
16582 # Code from module btowc:
16589 if test $ac_cv_func_btowc = no; then
16596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
16597 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
16598 if test "${gl_cv_func_btowc_nul+set}" = set; then :
16599 $as_echo_n "(cached) " >&6
16602 if test "$cross_compiling" = yes; then :
16605 # Guess no on Cygwin.
16606 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
16607 # Guess yes otherwise.
16608 *) gl_cv_func_btowc_nul="guessing yes" ;;
16612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16613 /* end confdefs.h. */
16615 #include <string.h>
16616 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16618 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16619 included before <wchar.h>. */
16620 #include <stddef.h>
16626 if (btowc ('\0') != 0)
16631 if ac_fn_c_try_run "$LINENO"; then :
16632 gl_cv_func_btowc_nul=yes
16634 gl_cv_func_btowc_nul=no
16636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16637 conftest.$ac_objext conftest.beam conftest.$ac_ext
16642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
16643 $as_echo "$gl_cv_func_btowc_nul" >&6; }
16645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
16646 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
16647 if test "${gl_cv_func_btowc_eof+set}" = set; then :
16648 $as_echo_n "(cached) " >&6
16652 # Guess no on IRIX.
16653 irix*) gl_cv_func_btowc_eof="guessing no" ;;
16654 # Guess yes otherwise.
16655 *) gl_cv_func_btowc_eof="guessing yes" ;;
16657 if test $LOCALE_FR != none; then
16658 if test "$cross_compiling" = yes; then :
16661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16662 /* end confdefs.h. */
16664 #include <locale.h>
16665 #include <string.h>
16666 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16668 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16669 included before <wchar.h>. */
16670 #include <stddef.h>
16676 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16678 if (btowc (EOF) != WEOF)
16684 if ac_fn_c_try_run "$LINENO"; then :
16685 gl_cv_func_btowc_eof=yes
16687 gl_cv_func_btowc_eof=no
16689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16690 conftest.$ac_objext conftest.beam conftest.$ac_ext
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
16697 $as_echo "$gl_cv_func_btowc_eof" >&6; }
16699 case "$gl_cv_func_btowc_nul" in
16701 *) REPLACE_BTOWC=1 ;;
16703 case "$gl_cv_func_btowc_eof" in
16705 *) REPLACE_BTOWC=1 ;;
16708 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
16720 M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
16734 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
16738 # Code from module c++defs:
16739 # Code from module c-ctype:
16740 # Code from module c-stack:
16745 # for STACK_DIRECTION
16749 ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
16751 if test "x$ac_cv_have_decl_sigaltstack" = x""yes; then :
16757 cat >>confdefs.h <<_ACEOF
16758 #define HAVE_DECL_SIGALTSTACK $ac_have_decl
16764 ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
16766 if test "x$ac_cv_type_stack_t" = x""yes; then :
16768 cat >>confdefs.h <<_ACEOF
16769 #define HAVE_STACK_T 1
16776 if test "$gl_cv_lib_sigsegv" = yes \
16777 && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
16778 LIBCSTACK=$LIBSIGSEGV
16780 LTLIBCSTACK=$LTLIBSIGSEGV
16785 # Code from module canonicalize-lgpl:
16788 if test $ac_cv_func_canonicalize_file_name = no; then
16789 HAVE_CANONICALIZE_FILE_NAME=0
16798 M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
16800 if test $ac_cv_func_realpath = no; then
16802 elif test "$gl_cv_func_realpath_works" != yes; then
16805 elif test "$gl_cv_func_realpath_works" != yes; then
16814 M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
16817 REPLACE_CANONICALIZE_FILE_NAME=1
16822 cat >>confdefs.h <<_ACEOF
16823 #define GNULIB_CANONICALIZE_LGPL 1
16830 GNULIB_CANONICALIZE_FILE_NAME=1
16834 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16845 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
16849 # Code from module clean-temp:
16851 $as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
16853 # Code from module cloexec:
16863 M4_LIBOBJS="$M4_LIBOBJS cloexec.$ac_objext"
16868 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
16871 # Code from module close:
16882 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16886 # Code from module close-hook:
16887 # Code from module close-stream:
16897 M4_LIBOBJS="$M4_LIBOBJS close-stream.$ac_objext"
16904 cat >>confdefs.h <<_ACEOF
16905 #define GNULIB_CLOSE_STREAM 1
16909 # Code from module closein:
16919 M4_LIBOBJS="$M4_LIBOBJS closein.$ac_objext"
16924 # Code from module closeout:
16934 M4_LIBOBJS="$M4_LIBOBJS closeout.$ac_objext"
16939 # Code from module config-h:
16941 # Code from module configmake:
16943 if test "x$datarootdir" = x; then
16944 datarootdir='${datadir}'
16947 if test "x$docdir" = x; then
16948 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16951 if test "x$htmldir" = x; then
16952 htmldir='${docdir}'
16955 if test "x$dvidir" = x; then
16959 if test "x$pdfdir" = x; then
16963 if test "x$psdir" = x; then
16967 if test "x$lispdir" = x; then
16968 lispdir='${datarootdir}/emacs/site-lisp'
16971 if test "x$localedir" = x; then
16972 localedir='${datarootdir}/locale'
16976 pkglibexecdir='${libexecdir}/${PACKAGE}'
16979 # Code from module dirname:
16990 M4_LIBOBJS="$M4_LIBOBJS basename.$ac_objext"
17000 M4_LIBOBJS="$M4_LIBOBJS dirname.$ac_objext"
17005 cat >>confdefs.h <<_ACEOF
17006 #define GNULIB_DIRNAME 1
17010 # Code from module dirname-lgpl:
17020 M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
17030 M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
17040 M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
17046 # Code from module dosname:
17047 # Code from module double-slash-root:
17050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17051 $as_echo_n "checking whether // is distinct from /... " >&6; }
17052 if test "${gl_cv_double_slash_root+set}" = set; then :
17053 $as_echo_n "(cached) " >&6
17055 if test x"$cross_compiling" = xyes ; then
17056 # When cross-compiling, there is no way to tell whether // is special
17057 # short of a list of hosts. However, the only known hosts to date
17058 # that have a distinct // are Apollo DomainOS (too old to port to),
17059 # Cygwin, and z/OS. If anyone knows of another system for which // has
17060 # special semantics and is distinct from /, please report it to
17061 # <bug-gnulib@gnu.org>.
17063 *-cygwin | i370-ibm-openedition)
17064 gl_cv_double_slash_root=yes ;;
17066 # Be optimistic and assume that / and // are the same when we
17068 gl_cv_double_slash_root='unknown, assuming no' ;;
17071 set x `ls -di / // 2>/dev/null`
17072 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17073 gl_cv_double_slash_root=no
17075 gl_cv_double_slash_root=yes
17079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17080 $as_echo "$gl_cv_double_slash_root" >&6; }
17081 if test "$gl_cv_double_slash_root" = yes; then
17083 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17087 # Code from module dup2:
17092 if test $ac_cv_func_dup2 = no; then
17102 M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
17105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17106 $as_echo_n "checking whether dup2 works... " >&6; }
17107 if test "${gl_cv_func_dup2_works+set}" = set; then :
17108 $as_echo_n "(cached) " >&6
17110 if test "$cross_compiling" = yes; then :
17112 mingw*) # on this platform, dup2 always returns 0 for success
17113 gl_cv_func_dup2_works=no;;
17114 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17115 gl_cv_func_dup2_works=no;;
17116 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
17117 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
17118 gl_cv_func_dup2_works=no;;
17119 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
17120 gl_cv_func_dup2_works=no;;
17121 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17122 gl_cv_func_dup2_works=no;;
17123 *) gl_cv_func_dup2_works=yes;;
17126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17127 /* end confdefs.h. */
17129 #include <unistd.h>
17137 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17140 if (dup2 (1, 1) == 0)
17143 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17147 if (dup2 (0, 0) != -1)
17149 /* Many gnulib modules require POSIX conformance of EBADF. */
17150 if (dup2 (2, 1000000) == -1 && errno != EBADF)
17159 if ac_fn_c_try_run "$LINENO"; then :
17160 gl_cv_func_dup2_works=yes
17162 gl_cv_func_dup2_works=no
17164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17165 conftest.$ac_objext conftest.beam conftest.$ac_ext
17170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17171 $as_echo "$gl_cv_func_dup2_works" >&6; }
17172 if test "$gl_cv_func_dup2_works" = no; then
17175 if test $ac_cv_func_dup2 = yes; then
17186 M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
17199 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17203 # Code from module environ:
17212 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17216 # Code from module errno:
17218 # Code from module error:
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17234 $as_echo_n "checking for error_at_line... " >&6; }
17235 if test "${ac_cv_lib_error_at_line+set}" = set; then :
17236 $as_echo_n "(cached) " >&6
17238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17239 /* end confdefs.h. */
17244 error_at_line (0, 0, "", 0, "an error occurred");
17249 if ac_fn_c_try_link "$LINENO"; then :
17250 ac_cv_lib_error_at_line=yes
17252 ac_cv_lib_error_at_line=no
17254 rm -f core conftest.err conftest.$ac_objext \
17255 conftest$ac_exeext conftest.$ac_ext
17257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17258 $as_echo "$ac_cv_lib_error_at_line" >&6; }
17259 if test $ac_cv_lib_error_at_line = no; then
17268 M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
17280 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
17284 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
17286 # Code from module execute:
17291 # Code from module exitfail:
17292 # Code from module extensions:
17293 # Code from module fatal-signal:
17302 # Code from module fclose:
17312 $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
17316 # Code from module fcntl:
17322 if test $ac_cv_func_fcntl = no; then
17326 if test $ac_cv_func_fcntl = no; then
17339 M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
17343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17344 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
17345 if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
17346 $as_echo_n "(cached) " >&6
17348 if test "$cross_compiling" = yes; then :
17349 # Guess that it works on glibc systems
17350 case $host_os in #((
17351 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
17352 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
17355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17356 /* end confdefs.h. */
17365 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17366 if (errno != EINVAL) result |= 2;
17373 if ac_fn_c_try_run "$LINENO"; then :
17374 gl_cv_func_fcntl_f_dupfd_works=yes
17376 gl_cv_func_fcntl_f_dupfd_works=no
17378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17379 conftest.$ac_objext conftest.beam conftest.$ac_ext
17383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17384 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17385 case $gl_cv_func_fcntl_f_dupfd_works in
17390 if test $ac_cv_func_fcntl = no; then
17403 M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
17407 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17412 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
17413 if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
17414 $as_echo_n "(cached) " >&6
17416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17417 /* end confdefs.h. */
17420 #ifndef F_DUPFD_CLOEXEC
17432 if ac_fn_c_try_compile "$LINENO"; then :
17433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17434 /* end confdefs.h. */
17437 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17438 it to support the semantics on older kernels that failed with EINVAL. */
17450 if ac_fn_c_try_compile "$LINENO"; then :
17451 gl_cv_func_fcntl_f_dupfd_cloexec=yes
17453 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
17455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17457 gl_cv_func_fcntl_f_dupfd_cloexec=no
17459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17462 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17463 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17467 if test $ac_cv_func_fcntl = no; then
17480 M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
17493 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17497 # Code from module fcntl-h:
17509 if test $gl_cv_have_include_next = yes; then
17510 gl_cv_next_fcntl_h='<'fcntl.h'>'
17512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17513 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
17514 if test "${gl_cv_next_fcntl_h+set}" = set; then :
17515 $as_echo_n "(cached) " >&6
17518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17519 /* end confdefs.h. */
17524 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17525 *) gl_absname_cpp="$ac_cpp" ;;
17527 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17528 sed -n '\#/fcntl.h#{
17529 s#.*"\(.*/fcntl.h\)".*#\1#
17537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17538 $as_echo "$gl_cv_next_fcntl_h" >&6; }
17540 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
17542 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17543 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17544 gl_next_as_first_directive='<'fcntl.h'>'
17546 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17547 gl_next_as_first_directive=$gl_cv_next_fcntl_h
17549 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
17557 # Code from module fd-safer-flag:
17560 cat >>confdefs.h <<_ACEOF
17561 #define GNULIB_FD_SAFER_FLAG 1
17565 # Code from module fdl-1.3:
17566 # Code from module fflush:
17568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
17569 $as_echo_n "checking whether fflush works on input streams... " >&6; }
17570 if test "${gl_cv_func_fflush_stdin+set}" = set; then :
17571 $as_echo_n "(cached) " >&6
17573 echo hello world > conftest.txt
17574 if test "$cross_compiling" = yes; then :
17575 gl_cv_func_fflush_stdin=no
17577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17578 /* end confdefs.h. */
17581 #include <unistd.h>
17586 FILE *f = fopen ("conftest.txt", "r");
17593 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
17595 /* For deterministic results, ensure f read a bigger buffer. */
17596 if (lseek (fd, 0, SEEK_CUR) == 5)
17598 /* POSIX requires fflush-fseek to set file offset of fd. This fails
17599 on BSD systems and on mingw. */
17600 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
17602 if (lseek (fd, 0, SEEK_CUR) != 5)
17604 /* Verify behaviour of fflush after ungetc. See
17605 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
17606 /* Verify behaviour of fflush after a backup ungetc. This fails on
17611 if (fgetc (f) != c)
17613 /* Verify behaviour of fflush after a non-backup ungetc. This fails
17614 on glibc 2.8 and on BSD systems. */
17618 if (fgetc (f) != c)
17626 if ac_fn_c_try_run "$LINENO"; then :
17627 gl_cv_func_fflush_stdin=yes
17629 gl_cv_func_fflush_stdin=no
17631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17632 conftest.$ac_objext conftest.beam conftest.$ac_ext
17638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
17639 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
17640 if test $gl_cv_func_fflush_stdin = no; then
17650 M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
17661 if test $gl_cv_func_fseeko = yes; then
17672 M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
17686 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
17690 # Code from module filenamecat:
17701 M4_LIBOBJS="$M4_LIBOBJS filenamecat.$ac_objext"
17706 cat >>confdefs.h <<_ACEOF
17707 #define GNULIB_FILENAMECAT 1
17711 # Code from module filenamecat-lgpl:
17721 M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
17726 # Code from module float:
17732 beos* | openbsd* | mirbsd*)
17742 if test $gl_cv_have_include_next = yes; then
17743 gl_cv_next_float_h='<'float.h'>'
17745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
17746 $as_echo_n "checking absolute name of <float.h>... " >&6; }
17747 if test "${gl_cv_next_float_h+set}" = set; then :
17748 $as_echo_n "(cached) " >&6
17751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17752 /* end confdefs.h. */
17757 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17758 *) gl_absname_cpp="$ac_cpp" ;;
17760 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17761 sed -n '\#/float.h#{
17762 s#.*"\(.*/float.h\)".*#\1#
17770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
17771 $as_echo "$gl_cv_next_float_h" >&6; }
17773 NEXT_FLOAT_H=$gl_cv_next_float_h
17775 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17776 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17777 gl_next_as_first_directive='<'float.h'>'
17779 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17780 gl_next_as_first_directive=$gl_cv_next_float_h
17782 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
17791 # Code from module fopen:
17798 gl_cv_func_fopen_slash="guessing no"
17801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
17802 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
17803 if test "${gl_cv_func_fopen_slash+set}" = set; then :
17804 $as_echo_n "(cached) " >&6
17807 if test "$cross_compiling" = yes; then :
17810 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
17811 gl_cv_func_fopen_slash="guessing no" ;;
17813 gl_cv_func_fopen_slash="guessing yes" ;;
17817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17818 /* end confdefs.h. */
17820 #include <stddef.h>
17824 return fopen ("conftest.sl/", "w") != NULL;
17827 if ac_fn_c_try_run "$LINENO"; then :
17828 gl_cv_func_fopen_slash=yes
17830 gl_cv_func_fopen_slash=no
17832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17833 conftest.$ac_objext conftest.beam conftest.$ac_ext
17839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
17840 $as_echo "$gl_cv_func_fopen_slash" >&6; }
17843 case "$gl_cv_func_fopen_slash" in
17846 $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
17851 if test $REPLACE_FOPEN = 1; then
17860 M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
17874 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
17878 # Code from module fopen-safer:
17888 M4_LIBOBJS="$M4_LIBOBJS fopen-safer.$ac_objext"
17893 cat >>confdefs.h <<_ACEOF
17894 #define GNULIB_FOPEN_SAFER 1
17898 # Code from module fpending:
17903 # include <stdio.h>
17904 # if HAVE_STDIO_EXT_H
17905 # include <stdio_ext.h>
17908 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
17910 if test "x$ac_cv_have_decl___fpending" = x""yes; then :
17916 cat >>confdefs.h <<_ACEOF
17917 #define HAVE_DECL___FPENDING $ac_have_decl
17920 if test $ac_cv_func___fpending = no; then
17921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
17922 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
17923 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
17924 $as_echo_n "(cached) " >&6
17930 'fp->_IO_write_ptr - fp->_IO_write_base' \
17932 '# traditional Unix' \
17933 'fp->_ptr - fp->_base' \
17936 'fp->_p - fp->_bf._base' \
17938 '# SCO, Unixware' \
17939 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
17942 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
17945 'fp->__bufp - fp->__buffer' \
17947 '# old glibc iostream?' \
17948 'fp->_pptr - fp->_pbase' \
17951 'fp->_ptr - fp->_buffer' \
17954 '(*fp)->_ptr - (*fp)->_base' \
17956 '# e.g., DGUX R4.11; the info is not available' \
17960 # Skip each embedded comment.
17961 case "$ac_expr" in '#'*) continue;; esac
17963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17964 /* end confdefs.h. */
17969 FILE *fp = stdin; (void) ($ac_expr);
17974 if ac_fn_c_try_compile "$LINENO"; then :
17978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17979 test "$fp_done" = yes && break
17982 ac_cv_sys_pending_output_n_bytes=$ac_expr
17986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
17987 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
17989 cat >>confdefs.h <<_ACEOF
17990 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
18001 M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
18005 # Code from module fpieee:
18006 # Code from module fpucw:
18007 # Code from module fpurge:
18012 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
18014 if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
18020 cat >>confdefs.h <<_ACEOF
18021 #define HAVE_DECL_FPURGE $ac_have_decl
18024 if test "x$ac_cv_func_fpurge" = xyes; then
18025 # Detect BSD bug. Only cygwin 1.7 is known to be immune.
18026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
18027 $as_echo_n "checking whether fpurge works... " >&6; }
18028 if test "${gl_cv_func_fpurge_works+set}" = set; then :
18029 $as_echo_n "(cached) " >&6
18031 if test "$cross_compiling" = yes; then :
18032 gl_cv_func_fpurge_works='guessing no'
18034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18035 /* end confdefs.h. */
18041 FILE *f = fopen ("conftest.txt", "w+");
18043 if (fputc ('a', f) != 'a') return 2;
18045 if (fgetc (f) != 'a') return 3;
18046 if (fgetc (f) != EOF) return 4;
18047 if (fpurge (f) != 0) return 5;
18048 if (putc ('b', f) != 'b') return 6;
18049 if (fclose (f) != 0) return 7;
18050 if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
18051 if (fgetc (f) != 'a') return 9;
18052 if (fgetc (f) != 'b') return 10;
18053 if (fgetc (f) != EOF) return 11;
18054 if (fclose (f) != 0) return 12;
18055 if (remove ("conftest.txt") != 0) return 13;
18061 if ac_fn_c_try_run "$LINENO"; then :
18062 gl_cv_func_fpurge_works=yes
18064 gl_cv_func_fpurge_works=no
18066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18067 conftest.$ac_objext conftest.beam conftest.$ac_ext
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
18072 $as_echo "$gl_cv_func_fpurge_works" >&6; }
18073 if test "x$gl_cv_func_fpurge_works" != xyes; then
18083 M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
18095 M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
18098 if test "x$ac_cv_have_decl_fpurge" = xno; then
18109 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
18113 # Code from module freadahead:
18114 # Code from module freading:
18118 # Code from module frexp-nolibm:
18122 if test $gl_cv_func_frexp_no_libm = yes; then
18125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18126 $as_echo_n "checking whether frexp works... " >&6; }
18127 if test "${gl_cv_func_frexp_works+set}" = set; then :
18128 $as_echo_n "(cached) " >&6
18131 if test "$cross_compiling" = yes; then :
18133 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18134 *) gl_cv_func_frexp_works="guessing yes";;
18138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18139 /* end confdefs.h. */
18143 #include <string.h>
18144 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18145 ICC 10.0 has a bug when optimizing the expression -zero.
18146 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
18147 to PowerPC on MacOS X 10.5. */
18148 #if defined __hpux || defined __sgi || defined __ICC
18150 compute_minus_zero (void)
18152 return -DBL_MIN * DBL_MIN;
18154 # define minus_zero compute_minus_zero ()
18156 double minus_zero = -0.0;
18164 /* Test on denormalized numbers. */
18165 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18170 double y = frexp (x, &exp);
18171 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18172 On NetBSD: y = 0.75. Correct: y = 0.5. */
18176 /* Test on infinite numbers. */
18180 double y = frexp (x, &exp);
18184 /* Test on negative zero. */
18188 double y = frexp (x, &exp);
18189 if (memcmp (&y, &x, sizeof x))
18195 if ac_fn_c_try_run "$LINENO"; then :
18196 gl_cv_func_frexp_works=yes
18198 gl_cv_func_frexp_works=no
18200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18201 conftest.$ac_objext conftest.beam conftest.$ac_ext
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18207 $as_echo "$gl_cv_func_frexp_works" >&6; }
18209 case "$gl_cv_func_frexp_works" in
18210 *yes) gl_func_frexp_no_libm=yes ;;
18211 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
18214 gl_func_frexp_no_libm=no
18217 if test $gl_func_frexp_no_libm = yes; then
18219 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
18230 M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
18241 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
18245 # Code from module frexpl-nolibm:
18248 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18250 if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
18256 if test $HAVE_DECL_FREXPL = 1; then
18258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
18259 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
18260 if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
18261 $as_echo_n "(cached) " >&6
18264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18265 /* end confdefs.h. */
18271 int e; return frexpl (x, &e) > 0;
18276 if ac_fn_c_try_link "$LINENO"; then :
18277 gl_cv_func_frexpl_no_libm=yes
18279 gl_cv_func_frexpl_no_libm=no
18281 rm -f core conftest.err conftest.$ac_objext \
18282 conftest$ac_exeext conftest.$ac_ext
18285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18286 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
18288 if test $gl_cv_func_frexpl_no_libm = yes; then
18291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
18292 $as_echo_n "checking whether frexpl works... " >&6; }
18293 if test "${gl_cv_func_frexpl_works+set}" = set; then :
18294 $as_echo_n "(cached) " >&6
18297 if test "$cross_compiling" = yes; then :
18300 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
18301 gl_cv_func_frexpl_works="guessing no";;
18302 *) gl_cv_func_frexpl_works="guessing yes";;
18306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18307 /* end confdefs.h. */
18311 /* Override the values of <float.h>, like done in float.in.h. */
18312 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
18313 # undef LDBL_MIN_EXP
18314 # define LDBL_MIN_EXP (-16381)
18316 extern long double frexpl (long double, int *);
18320 volatile long double x;
18321 /* Test on finite numbers that fails on AIX 5.1. */
18329 /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
18330 function returns an invalid (incorrectly normalized) value: it returns
18331 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
18332 but the correct result is
18333 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
18337 long double y = frexpl (x, &exp);
18338 if (!(exp == 1 && y == 0.505L))
18341 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
18342 LDBL_MAX_EXP = 16384.
18343 In the loop end test, we test x against Infinity, rather than comparing
18344 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
18347 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
18358 /* Test on denormalized numbers. */
18361 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
18366 long double y = frexpl (x, &exp);
18367 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
18368 exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
18369 if (exp != LDBL_MIN_EXP - 1)
18373 /* Test on infinite numbers. */
18377 long double y = frexpl (x, &exp);
18384 if ac_fn_c_try_run "$LINENO"; then :
18385 gl_cv_func_frexpl_works=yes
18387 gl_cv_func_frexpl_works=no
18389 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18390 conftest.$ac_objext conftest.beam conftest.$ac_ext
18395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
18396 $as_echo "$gl_cv_func_frexpl_works" >&6; }
18398 case "$gl_cv_func_frexpl_works" in
18399 *yes) gl_func_frexpl_no_libm=yes ;;
18400 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
18403 gl_func_frexpl_no_libm=no
18406 if test $gl_func_frexpl_no_libm = yes; then
18408 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
18412 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
18421 M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
18432 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18436 # Code from module fseeko:
18443 if test $ac_cv_have_decl_fseeko = no; then
18447 if test $gl_cv_func_fseeko = no; then
18452 if test $gl_cv_func_fseeko = yes; then
18463 M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
18468 if test $gl_cv_var_stdin_large_offset = no; then
18472 if test $gl_cv_func_fseeko = yes; then
18483 M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
18497 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
18501 # Code from module ftello:
18510 if test $ac_cv_have_decl_ftello = no; then
18514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
18515 $as_echo_n "checking for ftello... " >&6; }
18516 if test "${gl_cv_func_ftello+set}" = set; then :
18517 $as_echo_n "(cached) " >&6
18520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18521 /* end confdefs.h. */
18531 if ac_fn_c_try_link "$LINENO"; then :
18532 gl_cv_func_ftello=yes
18534 gl_cv_func_ftello=no
18536 rm -f core conftest.err conftest.$ac_objext \
18537 conftest$ac_exeext conftest.$ac_ext
18540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
18541 $as_echo "$gl_cv_func_ftello" >&6; }
18542 if test $gl_cv_func_ftello = no; then
18545 if test $gl_cv_var_stdin_large_offset = no; then
18549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
18550 $as_echo_n "checking whether ftello works... " >&6; }
18551 if test "${gl_cv_func_ftello_works+set}" = set; then :
18552 $as_echo_n "(cached) " >&6
18556 # Guess no on Solaris.
18557 solaris*) gl_cv_func_ftello_works="guessing no" ;;
18558 # Guess yes otherwise.
18559 *) gl_cv_func_ftello_works="guessing yes" ;;
18561 if test "$cross_compiling" = yes; then :
18564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18565 /* end confdefs.h. */
18568 #include <stdlib.h>
18569 #include <string.h>
18570 #define TESTFILE "conftest.tmp"
18576 /* Create a file with some contents. */
18577 fp = fopen (TESTFILE, "w");
18580 if (fwrite ("foogarsh", 1, 8, fp) < 8)
18585 /* The file's contents is now "foogarsh". */
18587 /* Try writing after reading to EOF. */
18588 fp = fopen (TESTFILE, "r+");
18591 if (fseek (fp, -1, SEEK_END))
18593 if (!(getc (fp) == 'h'))
18595 if (!(getc (fp) == EOF))
18597 if (!(ftell (fp) == 8))
18599 if (!(ftell (fp) == 8))
18601 if (!(putc ('!', fp) == '!'))
18603 if (!(ftell (fp) == 9))
18605 if (!(fclose (fp) == 0))
18607 fp = fopen (TESTFILE, "r");
18612 if (!(fread (buf, 1, 10, fp) == 9))
18614 if (!(memcmp (buf, "foogarsh!", 9) == 0))
18617 if (!(fclose (fp) == 0))
18620 /* The file's contents is now "foogarsh!". */
18625 if ac_fn_c_try_run "$LINENO"; then :
18626 gl_cv_func_ftello_works=yes
18628 gl_cv_func_ftello_works=no
18630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18631 conftest.$ac_objext conftest.beam conftest.$ac_ext
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
18637 $as_echo "$gl_cv_func_ftello_works" >&6; }
18638 case "$gl_cv_func_ftello_works" in
18643 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
18649 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
18659 M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
18671 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
18675 # Code from module gendocs:
18676 # Code from module getdtablesize:
18680 if test $ac_cv_func_getdtablesize != yes; then
18681 HAVE_GETDTABLESIZE=0
18690 M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
18697 GNULIB_GETDTABLESIZE=1
18701 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
18705 # Code from module getopt-gnu:
18713 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
18716 # Code from module getopt-posix:
18722 if test -n "$gl_replace_getopt"; then :
18728 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
18732 GNULIB_UNISTD_H_GETOPT=1
18741 M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
18751 M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
18761 # Code from module gettext-h:
18764 # Code from module gettimeofday:
18771 gl_gettimeofday_timezone=void
18772 if test $ac_cv_func_gettimeofday != yes; then
18773 HAVE_GETTIMEOFDAY=0
18782 M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
18785 for ac_header in sys/timeb.h
18787 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18788 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
18789 cat >>confdefs.h <<_ACEOF
18790 #define HAVE_SYS_TIMEB_H 1
18797 for ac_func in _ftime
18799 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18800 if test "x$ac_cv_func__ftime" = x""yes; then :
18801 cat >>confdefs.h <<_ACEOF
18802 #define HAVE__FTIME 1
18813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
18814 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
18815 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
18816 $as_echo_n "(cached) " >&6
18818 if test "$cross_compiling" = yes; then :
18819 gl_cv_func_gettimeofday_clobber=yes
18821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18822 /* end confdefs.h. */
18823 #include <string.h>
18824 #include <sys/time.h>
18826 #include <stdlib.h>
18834 struct tm saved_lt;
18836 lt = localtime (&t);
18838 gettimeofday (&tv, NULL);
18839 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
18845 if ac_fn_c_try_run "$LINENO"; then :
18846 gl_cv_func_gettimeofday_clobber=no
18848 gl_cv_func_gettimeofday_clobber=yes
18850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18851 conftest.$ac_objext conftest.beam conftest.$ac_ext
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
18856 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
18858 if test $gl_cv_func_gettimeofday_clobber = yes; then
18859 REPLACE_GETTIMEOFDAY=1
18869 M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
18872 for ac_header in sys/timeb.h
18874 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18875 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
18876 cat >>confdefs.h <<_ACEOF
18877 #define HAVE_SYS_TIMEB_H 1
18884 for ac_func in _ftime
18886 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18887 if test "x$ac_cv_func__ftime" = x""yes; then :
18888 cat >>confdefs.h <<_ACEOF
18889 #define HAVE__FTIME 1
18897 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
18900 $as_echo "#define localtime rpl_localtime" >>confdefs.h
18904 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
18908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
18909 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
18910 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
18911 $as_echo_n "(cached) " >&6
18913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18914 /* end confdefs.h. */
18915 #include <sys/time.h>
18917 int gettimeofday (struct timeval *restrict, void *restrict);
18922 /* glibc uses struct timezone * rather than the POSIX void *
18923 if _GNU_SOURCE is defined. However, since the only portable
18924 use of gettimeofday uses NULL as the second parameter, and
18925 since the glibc definition is actually more typesafe, it is
18926 not worth wrapping this to get a compliant signature. */
18927 int (*f) (struct timeval *restrict, void *restrict)
18930 return !(x | c.tv_sec | c.tv_usec);
18936 if ac_fn_c_try_compile "$LINENO"; then :
18937 gl_cv_func_gettimeofday_posix_signature=yes
18939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18940 /* end confdefs.h. */
18941 #include <sys/time.h>
18942 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
18952 if ac_fn_c_try_compile "$LINENO"; then :
18953 gl_cv_func_gettimeofday_posix_signature=almost
18955 gl_cv_func_gettimeofday_posix_signature=no
18957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
18962 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
18963 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
18964 gl_gettimeofday_timezone='struct timezone'
18965 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
18966 REPLACE_GETTIMEOFDAY=1
18975 M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
18978 for ac_header in sys/timeb.h
18980 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18981 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
18982 cat >>confdefs.h <<_ACEOF
18983 #define HAVE_SYS_TIMEB_H 1
18990 for ac_func in _ftime
18992 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18993 if test "x$ac_cv_func__ftime" = x""yes; then :
18994 cat >>confdefs.h <<_ACEOF
18995 #define HAVE__FTIME 1
19005 cat >>confdefs.h <<_ACEOF
19006 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
19013 GNULIB_GETTIMEOFDAY=1
19017 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
19021 # Code from module git-version-gen:
19022 # Code from module gnu-web-doc-update:
19023 # Code from module gnumakefile:
19024 # Autoconf 2.61a.99 and earlier don't support linking a file only
19025 # in VPATH builds. But since GNUmakefile is for maintainer use
19026 # only, it does not matter if we skip the link with older autoconf.
19027 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
19028 # builds, so use a shell variable to bypass this.
19029 GNUmakefile=GNUmakefile
19030 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
19032 # Code from module gnupload:
19033 # Code from module gpl-3.0:
19034 # Code from module havelib:
19035 # Code from module ignore-value:
19037 # Code from module include_next:
19038 # Code from module inline:
19041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
19042 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
19043 if test "${gl_cv_c_inline_effective+set}" = set; then :
19044 $as_echo_n "(cached) " >&6
19046 if test $ac_cv_c_inline = no; then
19047 gl_cv_c_inline_effective=no
19049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19050 /* end confdefs.h. */
19055 #ifdef __NO_INLINE__
19056 #error "inline is not effective"
19062 if ac_fn_c_try_compile "$LINENO"; then :
19063 gl_cv_c_inline_effective=yes
19065 gl_cv_c_inline_effective=no
19067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
19072 $as_echo "$gl_cv_c_inline_effective" >&6; }
19073 if test $gl_cv_c_inline_effective = yes; then
19075 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
19079 # Code from module intprops:
19080 # Code from module isnand-nolibm:
19083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
19084 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
19085 if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
19086 $as_echo_n "(cached) " >&6
19089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19090 /* end confdefs.h. */
19094 # define isnand(x) __builtin_isnan ((double)(x))
19097 # define isnand(x) isnan ((double)(x))
19108 if ac_fn_c_try_link "$LINENO"; then :
19109 gl_cv_func_isnand_no_libm=yes
19111 gl_cv_func_isnand_no_libm=no
19113 rm -f core conftest.err conftest.$ac_objext \
19114 conftest$ac_exeext conftest.$ac_ext
19117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
19118 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
19120 if test $gl_cv_func_isnand_no_libm = yes; then
19122 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
19134 M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
19137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
19138 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
19139 if test "${gl_cv_cc_double_expbit0+set}" = set; then :
19140 $as_echo_n "(cached) " >&6
19143 if test "$cross_compiling" = yes; then :
19145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19146 /* end confdefs.h. */
19148 #if defined arm || defined __arm || defined __arm__
19153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19154 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
19155 gl_cv_cc_double_expbit0="unknown"
19159 if test "${ac_cv_c_bigendian+set}" = set; then :
19160 $as_echo_n "(cached) " >&6
19162 ac_cv_c_bigendian=unknown
19163 # See if we're dealing with a universal compiler.
19164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19165 /* end confdefs.h. */
19166 #ifndef __APPLE_CC__
19167 not a universal capable compiler
19172 if ac_fn_c_try_compile "$LINENO"; then :
19174 # Check for potential -arch flags. It is not universal unless
19175 # there are at least two -arch flags with different values.
19178 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
19179 if test -n "$ac_prev"; then
19181 i?86 | x86_64 | ppc | ppc64)
19182 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
19185 ac_cv_c_bigendian=universal
19191 elif test "x$ac_word" = "x-arch"; then
19196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19197 if test $ac_cv_c_bigendian = unknown; then
19198 # See if sys/param.h defines the BYTE_ORDER macro.
19199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19200 /* end confdefs.h. */
19201 #include <sys/types.h>
19202 #include <sys/param.h>
19207 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
19208 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
19210 bogus endian macros
19217 if ac_fn_c_try_compile "$LINENO"; then :
19218 # It does; now see whether it defined to BIG_ENDIAN or not.
19219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19220 /* end confdefs.h. */
19221 #include <sys/types.h>
19222 #include <sys/param.h>
19227 #if BYTE_ORDER != BIG_ENDIAN
19235 if ac_fn_c_try_compile "$LINENO"; then :
19236 ac_cv_c_bigendian=yes
19238 ac_cv_c_bigendian=no
19240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19244 if test $ac_cv_c_bigendian = unknown; then
19245 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
19246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19247 /* end confdefs.h. */
19248 #include <limits.h>
19253 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
19254 bogus endian macros
19261 if ac_fn_c_try_compile "$LINENO"; then :
19262 # It does; now see whether it defined to _BIG_ENDIAN or not.
19263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19264 /* end confdefs.h. */
19265 #include <limits.h>
19270 #ifndef _BIG_ENDIAN
19278 if ac_fn_c_try_compile "$LINENO"; then :
19279 ac_cv_c_bigendian=yes
19281 ac_cv_c_bigendian=no
19283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19287 if test $ac_cv_c_bigendian = unknown; then
19288 # Compile a test program.
19289 if test "$cross_compiling" = yes; then :
19290 # Try to guess by grepping values from an object file.
19291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19292 /* end confdefs.h. */
19293 short int ascii_mm[] =
19294 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19295 short int ascii_ii[] =
19296 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19297 int use_ascii (int i) {
19298 return ascii_mm[i] + ascii_ii[i];
19300 short int ebcdic_ii[] =
19301 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19302 short int ebcdic_mm[] =
19303 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19304 int use_ebcdic (int i) {
19305 return ebcdic_mm[i] + ebcdic_ii[i];
19312 return use_ascii (foo) == use_ebcdic (foo);
19317 if ac_fn_c_try_compile "$LINENO"; then :
19318 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
19319 ac_cv_c_bigendian=yes
19321 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
19322 if test "$ac_cv_c_bigendian" = unknown; then
19323 ac_cv_c_bigendian=no
19325 # finding both strings is unlikely to happen, but who knows?
19326 ac_cv_c_bigendian=unknown
19330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19333 /* end confdefs.h. */
19334 $ac_includes_default
19339 /* Are we little or big endian? From Harbison&Steele. */
19343 char c[sizeof (long int)];
19346 return u.c[sizeof (long int) - 1] == 1;
19352 if ac_fn_c_try_run "$LINENO"; then :
19353 ac_cv_c_bigendian=no
19355 ac_cv_c_bigendian=yes
19357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19358 conftest.$ac_objext conftest.beam conftest.$ac_ext
19364 case $ac_cv_c_bigendian in #(
19366 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
19368 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
19371 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
19375 gl_cv_cc_double_expbit0="unknown" ;;
19384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19385 /* end confdefs.h. */
19388 #include <stddef.h>
19390 #include <string.h>
19392 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19393 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
19394 static unsigned int ored_words[NWORDS];
19395 static unsigned int anded_words[NWORDS];
19396 static void add_to_ored_words (double x)
19400 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
19401 memset (&m, 0, sizeof (memory_double));
19403 for (i = 0; i < NWORDS; i++)
19405 ored_words[i] |= m.word[i];
19406 anded_words[i] &= m.word[i];
19412 FILE *fp = fopen ("conftest.out", "w");
19415 for (j = 0; j < NWORDS; j++)
19416 anded_words[j] = ~ (unsigned int) 0;
19417 add_to_ored_words (0.25);
19418 add_to_ored_words (0.5);
19419 add_to_ored_words (1.0);
19420 add_to_ored_words (2.0);
19421 add_to_ored_words (4.0);
19422 /* Remove bits that are common (e.g. if representation of the first mantissa
19423 bit is explicit). */
19424 for (j = 0; j < NWORDS; j++)
19425 ored_words[j] &= ~anded_words[j];
19426 /* Now find the nonzero word. */
19427 for (j = 0; j < NWORDS; j++)
19428 if (ored_words[j] != 0)
19433 for (i = j + 1; i < NWORDS; i++)
19434 if (ored_words[i] != 0)
19436 fprintf (fp, "unknown");
19437 return (fclose (fp) != 0);
19440 if ((ored_words[j] >> i) & 1)
19442 fprintf (fp, "word %d bit %d", (int) j, (int) i);
19443 return (fclose (fp) != 0);
19446 fprintf (fp, "unknown");
19447 return (fclose (fp) != 0);
19451 if ac_fn_c_try_run "$LINENO"; then :
19452 gl_cv_cc_double_expbit0=`cat conftest.out`
19454 gl_cv_cc_double_expbit0="unknown"
19456 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19457 conftest.$ac_objext conftest.beam conftest.$ac_ext
19463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
19464 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
19465 case "$gl_cv_cc_double_expbit0" in
19467 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19468 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
19470 cat >>confdefs.h <<_ACEOF
19471 #define DBL_EXPBIT0_WORD $word
19475 cat >>confdefs.h <<_ACEOF
19476 #define DBL_EXPBIT0_BIT $bit
19485 # Code from module isnanf-nolibm:
19488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
19489 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
19490 if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
19491 $as_echo_n "(cached) " >&6
19494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19495 /* end confdefs.h. */
19499 # define isnanf(x) __builtin_isnanf ((float)(x))
19500 #elif defined isnan
19502 # define isnanf(x) isnan ((float)(x))
19513 if ac_fn_c_try_link "$LINENO"; then :
19514 gl_cv_func_isnanf_no_libm=yes
19516 gl_cv_func_isnanf_no_libm=no
19518 rm -f core conftest.err conftest.$ac_objext \
19519 conftest$ac_exeext conftest.$ac_ext
19522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
19523 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
19525 if test $gl_cv_func_isnanf_no_libm = yes; then
19529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
19530 $as_echo_n "checking whether isnan(float) works... " >&6; }
19531 if test "${gl_cv_func_isnanf_works+set}" = set; then :
19532 $as_echo_n "(cached) " >&6
19535 if test "$cross_compiling" = yes; then :
19537 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
19538 *) gl_cv_func_isnanf_works="guessing yes";;
19542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19543 /* end confdefs.h. */
19548 # define isnanf(x) __builtin_isnanf ((float)(x))
19549 #elif defined isnan
19551 # define isnanf(x) isnan ((float)(x))
19553 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
19558 static float zero = 0.0f;
19559 return zero / zero;
19562 # define NaN() (0.0f / 0.0f)
19565 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19566 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
19571 if (isnanf (1.0f / 0.0f))
19574 if (!isnanf (NaN ()))
19577 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
19578 /* The isnanf function should be immune against changes in the sign bit and
19579 in the mantissa bits. The xor operation twiddles a bit that can only be
19580 a sign bit or a mantissa bit. */
19581 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
19586 /* Set the bits below the exponent to 01111...111. */
19587 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
19588 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
19589 if (!isnanf (m.value))
19597 if ac_fn_c_try_run "$LINENO"; then :
19598 gl_cv_func_isnanf_works=yes
19600 gl_cv_func_isnanf_works=no
19602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19603 conftest.$ac_objext conftest.beam conftest.$ac_ext
19608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
19609 $as_echo "$gl_cv_func_isnanf_works" >&6; }
19612 if test $gl_cv_func_isnanf_no_libm = yes \
19613 && { case "$gl_cv_func_isnanf_works" in
19619 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
19631 M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
19634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
19635 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
19636 if test "${gl_cv_cc_float_expbit0+set}" = set; then :
19637 $as_echo_n "(cached) " >&6
19640 if test "$cross_compiling" = yes; then :
19641 gl_cv_cc_float_expbit0="word 0 bit 23"
19643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19644 /* end confdefs.h. */
19647 #include <stddef.h>
19649 #include <string.h>
19651 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19652 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
19653 static unsigned int ored_words[NWORDS];
19654 static unsigned int anded_words[NWORDS];
19655 static void add_to_ored_words (float x)
19659 /* Clear it first, in case
19660 sizeof (float) < sizeof (memory_float). */
19661 memset (&m, 0, sizeof (memory_float));
19663 for (i = 0; i < NWORDS; i++)
19665 ored_words[i] |= m.word[i];
19666 anded_words[i] &= m.word[i];
19672 FILE *fp = fopen ("conftest.out", "w");
19675 for (j = 0; j < NWORDS; j++)
19676 anded_words[j] = ~ (unsigned int) 0;
19677 add_to_ored_words (0.25f);
19678 add_to_ored_words (0.5f);
19679 add_to_ored_words (1.0f);
19680 add_to_ored_words (2.0f);
19681 add_to_ored_words (4.0f);
19682 /* Remove bits that are common (e.g. if representation of the first mantissa
19683 bit is explicit). */
19684 for (j = 0; j < NWORDS; j++)
19685 ored_words[j] &= ~anded_words[j];
19686 /* Now find the nonzero word. */
19687 for (j = 0; j < NWORDS; j++)
19688 if (ored_words[j] != 0)
19693 for (i = j + 1; i < NWORDS; i++)
19694 if (ored_words[i] != 0)
19696 fprintf (fp, "unknown");
19697 return (fclose (fp) != 0);
19700 if ((ored_words[j] >> i) & 1)
19702 fprintf (fp, "word %d bit %d", (int) j, (int) i);
19703 return (fclose (fp) != 0);
19706 fprintf (fp, "unknown");
19707 return (fclose (fp) != 0);
19711 if ac_fn_c_try_run "$LINENO"; then :
19712 gl_cv_cc_float_expbit0=`cat conftest.out`
19714 gl_cv_cc_float_expbit0="unknown"
19716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19717 conftest.$ac_objext conftest.beam conftest.$ac_ext
19723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
19724 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
19725 case "$gl_cv_cc_float_expbit0" in
19727 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19728 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
19730 cat >>confdefs.h <<_ACEOF
19731 #define FLT_EXPBIT0_WORD $word
19735 cat >>confdefs.h <<_ACEOF
19736 #define FLT_EXPBIT0_BIT $bit
19745 # Code from module isnanl-nolibm:
19748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
19749 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
19750 if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
19751 $as_echo_n "(cached) " >&6
19754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19755 /* end confdefs.h. */
19759 # define isnanl(x) __builtin_isnanl ((long double)(x))
19760 #elif defined isnan
19762 # define isnanl(x) isnan ((long double)(x))
19773 if ac_fn_c_try_link "$LINENO"; then :
19774 gl_cv_func_isnanl_no_libm=yes
19776 gl_cv_func_isnanl_no_libm=no
19778 rm -f core conftest.err conftest.$ac_objext \
19779 conftest$ac_exeext conftest.$ac_ext
19782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
19783 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
19785 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
19786 if test $gl_func_isnanl_no_libm = yes; then
19790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
19791 $as_echo_n "checking whether isnanl works... " >&6; }
19792 if test "${gl_cv_func_isnanl_works+set}" = set; then :
19793 $as_echo_n "(cached) " >&6
19796 if test "$cross_compiling" = yes; then :
19797 case "$host_cpu" in
19798 # Guess no on ia64, x86_64, i386.
19799 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
19802 netbsd*) gl_cv_func_isnanl_works="guessing no";;
19803 *) gl_cv_func_isnanl_works="guessing yes";;
19809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19810 /* end confdefs.h. */
19813 #include <limits.h>
19817 # define isnanl(x) __builtin_isnanl ((long double)(x))
19818 #elif defined isnan
19820 # define isnanl(x) isnan ((long double)(x))
19823 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19824 typedef union { unsigned int word[NWORDS]; long double value; }
19825 memory_long_double;
19826 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
19827 runtime type conversion. */
19829 static long double NaNl ()
19832 return zero / zero;
19835 # define NaNl() (0.0L / 0.0L)
19841 if (!isnanl (NaNl ()))
19845 memory_long_double m;
19848 /* The isnanl function should be immune against changes in the sign bit and
19849 in the mantissa bits. The xor operation twiddles a bit that can only be
19850 a sign bit or a mantissa bit (since the exponent never extends to
19853 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
19854 for (i = 0; i < NWORDS; i++)
19856 if (!isnanl (m.value))
19860 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
19861 /* Representation of an 80-bit 'long double' as an initializer for a sequence
19862 of 'unsigned int' words. */
19863 # ifdef WORDS_BIGENDIAN
19864 # define LDBL80_WORDS(exponent,manthi,mantlo) \
19865 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
19866 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
19867 (unsigned int) (mantlo) << 16 \
19870 # define LDBL80_WORDS(exponent,manthi,mantlo) \
19871 { mantlo, manthi, exponent }
19874 static memory_long_double x =
19875 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
19876 if (!isnanl (x.value))
19880 /* Signalling NaN. */
19881 static memory_long_double x =
19882 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
19883 if (!isnanl (x.value))
19886 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
19887 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
19888 Intel IA-64 Architecture Software Developer's Manual, Volume 1:
19889 Application Architecture.
19890 Table 5-2 "Floating-Point Register Encodings"
19891 Figure 5-6 "Memory to Floating-Point Register Data Translation"
19893 { /* Pseudo-NaN. */
19894 static memory_long_double x =
19895 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
19896 if (!isnanl (x.value))
19899 { /* Pseudo-Infinity. */
19900 static memory_long_double x =
19901 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
19902 if (!isnanl (x.value))
19905 { /* Pseudo-Zero. */
19906 static memory_long_double x =
19907 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
19908 if (!isnanl (x.value))
19911 { /* Unnormalized number. */
19912 static memory_long_double x =
19913 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
19914 if (!isnanl (x.value))
19917 { /* Pseudo-Denormal. */
19918 static memory_long_double x =
19919 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
19920 if (!isnanl (x.value))
19928 if ac_fn_c_try_run "$LINENO"; then :
19929 gl_cv_func_isnanl_works=yes
19931 gl_cv_func_isnanl_works=no
19933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19934 conftest.$ac_objext conftest.beam conftest.$ac_ext
19939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
19940 $as_echo "$gl_cv_func_isnanl_works" >&6; }
19942 case "$gl_cv_func_isnanl_works" in
19944 *) gl_func_isnanl_no_libm=no ;;
19947 if test $gl_func_isnanl_no_libm = yes; then
19949 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
19961 M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
19965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
19966 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
19967 if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
19968 $as_echo_n "(cached) " >&6
19971 if test "$cross_compiling" = yes; then :
19973 gl_cv_cc_long_double_expbit0="unknown"
19976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19977 /* end confdefs.h. */
19980 #include <stddef.h>
19982 #include <string.h>
19984 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19985 typedef union { long double value; unsigned int word[NWORDS]; }
19986 memory_long_double;
19987 static unsigned int ored_words[NWORDS];
19988 static unsigned int anded_words[NWORDS];
19989 static void add_to_ored_words (long double x)
19991 memory_long_double m;
19993 /* Clear it first, in case
19994 sizeof (long double) < sizeof (memory_long_double). */
19995 memset (&m, 0, sizeof (memory_long_double));
19997 for (i = 0; i < NWORDS; i++)
19999 ored_words[i] |= m.word[i];
20000 anded_words[i] &= m.word[i];
20006 FILE *fp = fopen ("conftest.out", "w");
20009 for (j = 0; j < NWORDS; j++)
20010 anded_words[j] = ~ (unsigned int) 0;
20011 add_to_ored_words (0.25L);
20012 add_to_ored_words (0.5L);
20013 add_to_ored_words (1.0L);
20014 add_to_ored_words (2.0L);
20015 add_to_ored_words (4.0L);
20016 /* Remove bits that are common (e.g. if representation of the first mantissa
20017 bit is explicit). */
20018 for (j = 0; j < NWORDS; j++)
20019 ored_words[j] &= ~anded_words[j];
20020 /* Now find the nonzero word. */
20021 for (j = 0; j < NWORDS; j++)
20022 if (ored_words[j] != 0)
20027 for (i = j + 1; i < NWORDS; i++)
20028 if (ored_words[i] != 0)
20030 fprintf (fp, "unknown");
20031 return (fclose (fp) != 0);
20034 if ((ored_words[j] >> i) & 1)
20036 fprintf (fp, "word %d bit %d", (int) j, (int) i);
20037 return (fclose (fp) != 0);
20040 fprintf (fp, "unknown");
20041 return (fclose (fp) != 0);
20045 if ac_fn_c_try_run "$LINENO"; then :
20046 gl_cv_cc_long_double_expbit0=`cat conftest.out`
20048 gl_cv_cc_long_double_expbit0="unknown"
20050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20051 conftest.$ac_objext conftest.beam conftest.$ac_ext
20057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
20058 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
20059 case "$gl_cv_cc_long_double_expbit0" in
20061 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
20062 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
20064 cat >>confdefs.h <<_ACEOF
20065 #define LDBL_EXPBIT0_WORD $word
20069 cat >>confdefs.h <<_ACEOF
20070 #define LDBL_EXPBIT0_BIT $bit
20079 # Code from module langinfo:
20094 if test $gl_cv_have_include_next = yes; then
20095 gl_cv_next_langinfo_h='<'langinfo.h'>'
20097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
20098 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
20099 if test "${gl_cv_next_langinfo_h+set}" = set; then :
20100 $as_echo_n "(cached) " >&6
20103 if test $ac_cv_header_langinfo_h = yes; then
20106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20107 /* end confdefs.h. */
20108 #include <langinfo.h>
20112 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20113 *) gl_absname_cpp="$ac_cpp" ;;
20115 gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20116 sed -n '\#/langinfo.h#{
20117 s#.*"\(.*/langinfo.h\)".*#\1#
20123 gl_cv_next_langinfo_h='<'langinfo.h'>'
20128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
20129 $as_echo "$gl_cv_next_langinfo_h" >&6; }
20131 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
20133 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20134 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20135 gl_next_as_first_directive='<'langinfo.h'>'
20137 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20138 gl_next_as_first_directive=$gl_cv_next_langinfo_h
20140 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
20146 HAVE_LANGINFO_CODESET=0
20147 HAVE_LANGINFO_T_FMT_AMPM=0
20148 HAVE_LANGINFO_ERA=0
20149 HAVE_LANGINFO_YESEXPR=0
20151 if test $ac_cv_header_langinfo_h = yes; then
20153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
20154 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
20155 if test "${gl_cv_header_langinfo_codeset+set}" = set; then :
20156 $as_echo_n "(cached) " >&6
20158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20159 /* end confdefs.h. */
20160 #include <langinfo.h>
20171 if ac_fn_c_try_compile "$LINENO"; then :
20172 gl_cv_header_langinfo_codeset=yes
20174 gl_cv_header_langinfo_codeset=no
20176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
20180 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
20181 if test $gl_cv_header_langinfo_codeset = yes; then
20182 HAVE_LANGINFO_CODESET=1
20184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
20185 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
20186 if test "${gl_cv_header_langinfo_t_fmt_ampm+set}" = set; then :
20187 $as_echo_n "(cached) " >&6
20189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20190 /* end confdefs.h. */
20191 #include <langinfo.h>
20192 int a = T_FMT_AMPM;
20202 if ac_fn_c_try_compile "$LINENO"; then :
20203 gl_cv_header_langinfo_t_fmt_ampm=yes
20205 gl_cv_header_langinfo_t_fmt_ampm=no
20207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
20211 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
20212 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
20213 HAVE_LANGINFO_T_FMT_AMPM=1
20215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
20216 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
20217 if test "${gl_cv_header_langinfo_era+set}" = set; then :
20218 $as_echo_n "(cached) " >&6
20220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20221 /* end confdefs.h. */
20222 #include <langinfo.h>
20233 if ac_fn_c_try_compile "$LINENO"; then :
20234 gl_cv_header_langinfo_era=yes
20236 gl_cv_header_langinfo_era=no
20238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
20242 $as_echo "$gl_cv_header_langinfo_era" >&6; }
20243 if test $gl_cv_header_langinfo_era = yes; then
20244 HAVE_LANGINFO_ERA=1
20246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
20247 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
20248 if test "${gl_cv_header_langinfo_yesexpr+set}" = set; then :
20249 $as_echo_n "(cached) " >&6
20251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20252 /* end confdefs.h. */
20253 #include <langinfo.h>
20264 if ac_fn_c_try_compile "$LINENO"; then :
20265 gl_cv_header_langinfo_yesexpr=yes
20267 gl_cv_header_langinfo_yesexpr=no
20269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
20273 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
20274 if test $gl_cv_header_langinfo_yesexpr = yes; then
20275 HAVE_LANGINFO_YESEXPR=1
20288 # Code from module libsigsegv:
20305 acl_save_prefix="$prefix"
20306 prefix="$acl_final_prefix"
20307 acl_save_exec_prefix="$exec_prefix"
20308 exec_prefix="$acl_final_exec_prefix"
20310 eval additional_includedir=\"$includedir\"
20311 eval additional_libdir=\"$libdir\"
20313 exec_prefix="$acl_save_exec_prefix"
20314 prefix="$acl_save_prefix"
20317 # Check whether --with-libsigsegv-prefix was given.
20318 if test "${with_libsigsegv_prefix+set}" = set; then :
20319 withval=$with_libsigsegv_prefix;
20320 if test "X$withval" = "Xno"; then
20323 if test "X$withval" = "X"; then
20325 acl_save_prefix="$prefix"
20326 prefix="$acl_final_prefix"
20327 acl_save_exec_prefix="$exec_prefix"
20328 exec_prefix="$acl_final_exec_prefix"
20330 eval additional_includedir=\"$includedir\"
20331 eval additional_libdir=\"$libdir\"
20333 exec_prefix="$acl_save_exec_prefix"
20334 prefix="$acl_save_prefix"
20337 additional_includedir="$withval/include"
20338 additional_libdir="$withval/$acl_libdirstem"
20339 if test "$acl_libdirstem2" != "$acl_libdirstem" \
20340 && ! test -d "$withval/$acl_libdirstem"; then
20341 additional_libdir="$withval/$acl_libdirstem2"
20355 names_already_handled=
20356 names_next_round='sigsegv '
20357 while test -n "$names_next_round"; do
20358 names_this_round="$names_next_round"
20360 for name in $names_this_round; do
20362 for n in $names_already_handled; do
20363 if test "$n" = "$name"; then
20364 already_handled=yes
20368 if test -z "$already_handled"; then
20369 names_already_handled="$names_already_handled $name"
20370 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
20371 eval value=\"\$HAVE_LIB$uppername\"
20372 if test -n "$value"; then
20373 if test "$value" = yes; then
20374 eval value=\"\$LIB$uppername\"
20375 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
20376 eval value=\"\$LTLIB$uppername\"
20377 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
20386 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
20387 if test -n "$acl_shlibext"; then
20388 shrext=".$acl_shlibext" # typically: shrext=.so
20392 if test $use_additional = yes; then
20393 dir="$additional_libdir"
20394 if test -n "$acl_shlibext"; then
20395 if test -f "$dir/$libname$shrext"; then
20397 found_so="$dir/$libname$shrext"
20399 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
20400 ver=`(cd "$dir" && \
20401 for f in "$libname$shrext".*; do echo "$f"; done \
20402 | sed -e "s,^$libname$shrext\\\\.,," \
20403 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
20404 | sed 1q ) 2>/dev/null`
20405 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
20407 found_so="$dir/$libname$shrext.$ver"
20410 eval library_names=\"$acl_library_names_spec\"
20411 for f in $library_names; do
20412 if test -f "$dir/$f"; then
20421 if test "X$found_dir" = "X"; then
20422 if test -f "$dir/$libname.$acl_libext"; then
20424 found_a="$dir/$libname.$acl_libext"
20427 if test "X$found_dir" != "X"; then
20428 if test -f "$dir/$libname.la"; then
20429 found_la="$dir/$libname.la"
20433 if test "X$found_dir" = "X"; then
20434 for x in $LDFLAGS $LTLIBSIGSEGV; do
20436 acl_save_prefix="$prefix"
20437 prefix="$acl_final_prefix"
20438 acl_save_exec_prefix="$exec_prefix"
20439 exec_prefix="$acl_final_exec_prefix"
20441 exec_prefix="$acl_save_exec_prefix"
20442 prefix="$acl_save_prefix"
20446 dir=`echo "X$x" | sed -e 's/^X-L//'`
20447 if test -n "$acl_shlibext"; then
20448 if test -f "$dir/$libname$shrext"; then
20450 found_so="$dir/$libname$shrext"
20452 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
20453 ver=`(cd "$dir" && \
20454 for f in "$libname$shrext".*; do echo "$f"; done \
20455 | sed -e "s,^$libname$shrext\\\\.,," \
20456 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
20457 | sed 1q ) 2>/dev/null`
20458 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
20460 found_so="$dir/$libname$shrext.$ver"
20463 eval library_names=\"$acl_library_names_spec\"
20464 for f in $library_names; do
20465 if test -f "$dir/$f"; then
20474 if test "X$found_dir" = "X"; then
20475 if test -f "$dir/$libname.$acl_libext"; then
20477 found_a="$dir/$libname.$acl_libext"
20480 if test "X$found_dir" != "X"; then
20481 if test -f "$dir/$libname.la"; then
20482 found_la="$dir/$libname.la"
20487 if test "X$found_dir" != "X"; then
20492 if test "X$found_dir" != "X"; then
20493 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
20494 if test "X$found_so" != "X"; then
20495 if test "$enable_rpath" = no \
20496 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
20497 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
20498 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
20501 for x in $ltrpathdirs; do
20502 if test "X$x" = "X$found_dir"; then
20507 if test -z "$haveit"; then
20508 ltrpathdirs="$ltrpathdirs $found_dir"
20510 if test "$acl_hardcode_direct" = yes; then
20511 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
20513 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
20514 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
20516 for x in $rpathdirs; do
20517 if test "X$x" = "X$found_dir"; then
20522 if test -z "$haveit"; then
20523 rpathdirs="$rpathdirs $found_dir"
20527 for x in $LDFLAGS $LIBSIGSEGV; do
20529 acl_save_prefix="$prefix"
20530 prefix="$acl_final_prefix"
20531 acl_save_exec_prefix="$exec_prefix"
20532 exec_prefix="$acl_final_exec_prefix"
20534 exec_prefix="$acl_save_exec_prefix"
20535 prefix="$acl_save_prefix"
20537 if test "X$x" = "X-L$found_dir"; then
20542 if test -z "$haveit"; then
20543 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
20545 if test "$acl_hardcode_minus_L" != no; then
20546 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
20548 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
20554 if test "X$found_a" != "X"; then
20555 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
20557 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
20560 additional_includedir=
20561 case "$found_dir" in
20562 */$acl_libdirstem | */$acl_libdirstem/)
20563 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
20564 if test "$name" = 'sigsegv'; then
20565 LIBSIGSEGV_PREFIX="$basedir"
20567 additional_includedir="$basedir/include"
20569 */$acl_libdirstem2 | */$acl_libdirstem2/)
20570 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
20571 if test "$name" = 'sigsegv'; then
20572 LIBSIGSEGV_PREFIX="$basedir"
20574 additional_includedir="$basedir/include"
20577 if test "X$additional_includedir" != "X"; then
20578 if test "X$additional_includedir" != "X/usr/include"; then
20580 if test "X$additional_includedir" = "X/usr/local/include"; then
20581 if test -n "$GCC"; then
20583 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
20587 if test -z "$haveit"; then
20588 for x in $CPPFLAGS $INCSIGSEGV; do
20590 acl_save_prefix="$prefix"
20591 prefix="$acl_final_prefix"
20592 acl_save_exec_prefix="$exec_prefix"
20593 exec_prefix="$acl_final_exec_prefix"
20595 exec_prefix="$acl_save_exec_prefix"
20596 prefix="$acl_save_prefix"
20598 if test "X$x" = "X-I$additional_includedir"; then
20603 if test -z "$haveit"; then
20604 if test -d "$additional_includedir"; then
20605 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
20611 if test -n "$found_la"; then
20612 save_libdir="$libdir"
20613 case "$found_la" in
20614 */* | *\\*) . "$found_la" ;;
20615 *) . "./$found_la" ;;
20617 libdir="$save_libdir"
20618 for dep in $dependency_libs; do
20621 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
20622 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
20623 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
20625 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
20626 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
20627 if test -n "$GCC"; then
20629 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
20633 if test -z "$haveit"; then
20635 for x in $LDFLAGS $LIBSIGSEGV; do
20637 acl_save_prefix="$prefix"
20638 prefix="$acl_final_prefix"
20639 acl_save_exec_prefix="$exec_prefix"
20640 exec_prefix="$acl_final_exec_prefix"
20642 exec_prefix="$acl_save_exec_prefix"
20643 prefix="$acl_save_prefix"
20645 if test "X$x" = "X-L$additional_libdir"; then
20650 if test -z "$haveit"; then
20651 if test -d "$additional_libdir"; then
20652 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
20656 for x in $LDFLAGS $LTLIBSIGSEGV; do
20658 acl_save_prefix="$prefix"
20659 prefix="$acl_final_prefix"
20660 acl_save_exec_prefix="$exec_prefix"
20661 exec_prefix="$acl_final_exec_prefix"
20663 exec_prefix="$acl_save_exec_prefix"
20664 prefix="$acl_save_prefix"
20666 if test "X$x" = "X-L$additional_libdir"; then
20671 if test -z "$haveit"; then
20672 if test -d "$additional_libdir"; then
20673 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
20680 dir=`echo "X$dep" | sed -e 's/^X-R//'`
20681 if test "$enable_rpath" != no; then
20683 for x in $rpathdirs; do
20684 if test "X$x" = "X$dir"; then
20689 if test -z "$haveit"; then
20690 rpathdirs="$rpathdirs $dir"
20693 for x in $ltrpathdirs; do
20694 if test "X$x" = "X$dir"; then
20699 if test -z "$haveit"; then
20700 ltrpathdirs="$ltrpathdirs $dir"
20705 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
20708 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
20711 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
20712 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
20718 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
20719 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
20725 if test "X$rpathdirs" != "X"; then
20726 if test -n "$acl_hardcode_libdir_separator"; then
20728 for found_dir in $rpathdirs; do
20729 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
20731 acl_save_libdir="$libdir"
20733 eval flag=\"$acl_hardcode_libdir_flag_spec\"
20734 libdir="$acl_save_libdir"
20735 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
20737 for found_dir in $rpathdirs; do
20738 acl_save_libdir="$libdir"
20739 libdir="$found_dir"
20740 eval flag=\"$acl_hardcode_libdir_flag_spec\"
20741 libdir="$acl_save_libdir"
20742 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
20746 if test "X$ltrpathdirs" != "X"; then
20747 for found_dir in $ltrpathdirs; do
20748 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
20758 ac_save_CPPFLAGS="$CPPFLAGS"
20760 for element in $INCSIGSEGV; do
20762 for x in $CPPFLAGS; do
20764 acl_save_prefix="$prefix"
20765 prefix="$acl_final_prefix"
20766 acl_save_exec_prefix="$exec_prefix"
20767 exec_prefix="$acl_final_exec_prefix"
20769 exec_prefix="$acl_save_exec_prefix"
20770 prefix="$acl_save_prefix"
20772 if test "X$x" = "X$element"; then
20777 if test -z "$haveit"; then
20778 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
20783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
20784 $as_echo_n "checking for libsigsegv... " >&6; }
20785 if test "${ac_cv_libsigsegv+set}" = set; then :
20786 $as_echo_n "(cached) " >&6
20789 ac_save_LIBS="$LIBS"
20790 case " $LIBSIGSEGV" in
20791 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
20792 *) LIBS="$LIBSIGSEGV $LIBS" ;;
20794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20795 /* end confdefs.h. */
20796 #include <sigsegv.h>
20800 sigsegv_deinstall_handler();
20805 if ac_fn_c_try_link "$LINENO"; then :
20806 ac_cv_libsigsegv=yes
20808 ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
20810 rm -f core conftest.err conftest.$ac_objext \
20811 conftest$ac_exeext conftest.$ac_ext
20812 LIBS="$ac_save_LIBS"
20815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
20816 $as_echo "$ac_cv_libsigsegv" >&6; }
20817 if test "$ac_cv_libsigsegv" = yes; then
20818 HAVE_LIBSIGSEGV=yes
20820 $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
20822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
20823 $as_echo_n "checking how to link with libsigsegv... " >&6; }
20824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
20825 $as_echo "$LIBSIGSEGV" >&6; }
20828 CPPFLAGS="$ac_save_CPPFLAGS"
20840 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
20842 # Code from module linkedhash-list:
20843 # Code from module list:
20847 # Code from module localcharset:
20856 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
20858 # Code from module lock:
20861 if test "$gl_threads_api" = posix; then
20862 # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
20863 # pthread_rwlock_* functions.
20864 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
20866 if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then :
20868 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
20872 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
20873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20874 /* end confdefs.h. */
20876 #include <pthread.h>
20881 #if __FreeBSD__ == 4
20882 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
20884 int x = (int)PTHREAD_MUTEX_RECURSIVE;
20892 if ac_fn_c_try_compile "$LINENO"; then :
20894 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
20897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20903 # Code from module lseek:
20907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
20908 $as_echo_n "checking whether lseek detects pipes... " >&6; }
20909 if test "${gl_cv_func_lseek_pipe+set}" = set; then :
20910 $as_echo_n "(cached) " >&6
20912 if test $cross_compiling = no; then
20913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20914 /* end confdefs.h. */
20916 #include <sys/types.h> /* for off_t */
20917 #include <stdio.h> /* for SEEK_CUR */
20918 #include <unistd.h>
20923 /* Exit with success only if stdin is seekable. */
20924 return lseek (0, (off_t)0, SEEK_CUR) < 0;
20930 if ac_fn_c_try_link "$LINENO"; then :
20931 if test -s conftest$ac_exeext \
20932 && ./conftest$ac_exeext < conftest.$ac_ext \
20933 && test 1 = "`echo hi \
20934 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
20935 gl_cv_func_lseek_pipe=yes
20937 gl_cv_func_lseek_pipe=no
20940 gl_cv_func_lseek_pipe=no
20942 rm -f core conftest.err conftest.$ac_objext \
20943 conftest$ac_exeext conftest.$ac_ext
20945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20946 /* end confdefs.h. */
20948 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
20949 /* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
20953 if ac_fn_c_try_compile "$LINENO"; then :
20954 gl_cv_func_lseek_pipe=yes
20956 gl_cv_func_lseek_pipe=no
20958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
20962 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
20963 if test $gl_cv_func_lseek_pipe = no; then
20973 M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
20978 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
20990 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
20994 # Code from module lstat:
20998 if test $ac_cv_func_lstat = yes; then
21000 if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
21003 # Prerequisites of lib/lstat.c.
21016 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
21020 # Code from module maintainer-makefile:
21022 # Code from module malloc-gnu:
21025 for ac_header in stdlib.h
21027 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
21028 if test "x$ac_cv_header_stdlib_h" = x""yes; then :
21029 cat >>confdefs.h <<_ACEOF
21030 #define HAVE_STDLIB_H 1
21037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
21038 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
21039 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
21040 $as_echo_n "(cached) " >&6
21042 if test "$cross_compiling" = yes; then :
21043 ac_cv_func_malloc_0_nonnull=no
21045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21046 /* end confdefs.h. */
21047 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
21048 # include <stdlib.h>
21056 return ! malloc (0);
21061 if ac_fn_c_try_run "$LINENO"; then :
21062 ac_cv_func_malloc_0_nonnull=yes
21064 ac_cv_func_malloc_0_nonnull=no
21066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21067 conftest.$ac_objext conftest.beam conftest.$ac_ext
21071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
21072 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
21073 if test $ac_cv_func_malloc_0_nonnull = yes; then :
21075 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
21078 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
21089 M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
21099 cat >>confdefs.h <<_ACEOF
21100 #define GNULIB_MALLOC_GNU 1
21104 # Code from module malloc-posix:
21108 if test $gl_cv_func_malloc_posix = yes; then
21110 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
21122 M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
21131 GNULIB_MALLOC_POSIX=1
21135 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
21139 # Code from module malloca:
21144 # Code from module manywarnings:
21145 # Code from module math:
21157 if test $gl_cv_have_include_next = yes; then
21158 gl_cv_next_math_h='<'math.h'>'
21160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
21161 $as_echo_n "checking absolute name of <math.h>... " >&6; }
21162 if test "${gl_cv_next_math_h+set}" = set; then :
21163 $as_echo_n "(cached) " >&6
21166 if test $ac_cv_header_math_h = yes; then
21169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21170 /* end confdefs.h. */
21175 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21176 *) gl_absname_cpp="$ac_cpp" ;;
21178 gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21179 sed -n '\#/math.h#{
21180 s#.*"\(.*/math.h\)".*#\1#
21186 gl_cv_next_math_h='<'math.h'>'
21191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
21192 $as_echo "$gl_cv_next_math_h" >&6; }
21194 NEXT_MATH_H=$gl_cv_next_math_h
21196 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21197 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21198 gl_next_as_first_directive='<'math.h'>'
21200 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21201 gl_next_as_first_directive=$gl_cv_next_math_h
21203 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
21210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
21211 $as_echo_n "checking whether NAN macro works... " >&6; }
21212 if test "${gl_cv_header_math_nan_works+set}" = set; then :
21213 $as_echo_n "(cached) " >&6
21215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21216 /* end confdefs.h. */
21221 /* Solaris 10 has a broken definition of NAN. Other platforms
21222 fail to provide NAN, or provide it only in C99 mode; this
21223 test only needs to fail when NAN is provided but wrong. */
21233 if ac_fn_c_try_compile "$LINENO"; then :
21234 gl_cv_header_math_nan_works=yes
21236 gl_cv_header_math_nan_works=no
21238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
21241 $as_echo "$gl_cv_header_math_nan_works" >&6; }
21242 if test $gl_cv_header_math_nan_works = no; then
21245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
21246 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
21247 if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
21248 $as_echo_n "(cached) " >&6
21250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21251 /* end confdefs.h. */
21256 /* Solaris 10 has a broken definition of HUGE_VAL. */
21257 double d = HUGE_VAL;
21263 if ac_fn_c_try_compile "$LINENO"; then :
21264 gl_cv_header_math_huge_val_works=yes
21266 gl_cv_header_math_huge_val_works=no
21268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
21271 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
21272 if test $gl_cv_header_math_huge_val_works = no; then
21278 # Code from module mbrtowc:
21289 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21294 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21295 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
21296 $as_echo_n "(cached) " >&6
21300 # Guess no on AIX and OSF/1.
21301 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21302 # Guess yes otherwise.
21303 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21305 if test $LOCALE_JA != none; then
21306 if test "$cross_compiling" = yes; then :
21309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21310 /* end confdefs.h. */
21312 #include <locale.h>
21313 #include <string.h>
21314 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21316 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21317 included before <wchar.h>. */
21318 #include <stddef.h>
21324 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21326 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21330 memset (&state, '\0', sizeof (mbstate_t));
21331 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21332 if (mbsinit (&state))
21338 if ac_fn_c_try_run "$LINENO"; then :
21339 gl_cv_func_mbrtowc_incomplete_state=yes
21341 gl_cv_func_mbrtowc_incomplete_state=no
21343 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21344 conftest.$ac_objext conftest.beam conftest.$ac_ext
21350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21351 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21357 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21358 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
21359 $as_echo_n "(cached) " >&6
21363 # Guess no on Solaris 8.
21364 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21365 # Guess yes otherwise.
21366 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21368 if test $LOCALE_ZH_CN != none; then
21369 if test "$cross_compiling" = yes; then :
21372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21373 /* end confdefs.h. */
21375 #include <locale.h>
21376 #include <stdlib.h>
21377 #include <string.h>
21378 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21380 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21381 included before <wchar.h>. */
21382 #include <stddef.h>
21388 /* This fails on Solaris 8:
21389 mbrtowc returns 2, and sets wc to 0x00F0.
21390 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21391 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21393 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21397 memset (&state, '\0', sizeof (mbstate_t));
21398 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21399 && mbtowc (&wc, input + 3, 6) == 4)
21405 if ac_fn_c_try_run "$LINENO"; then :
21406 gl_cv_func_mbrtowc_sanitycheck=yes
21408 gl_cv_func_mbrtowc_sanitycheck=no
21410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21411 conftest.$ac_objext conftest.beam conftest.$ac_ext
21417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21418 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21420 REPLACE_MBSTATE_T=0
21421 case "$gl_cv_func_mbrtowc_incomplete_state" in
21423 *) REPLACE_MBSTATE_T=1 ;;
21425 case "$gl_cv_func_mbrtowc_sanitycheck" in
21427 *) REPLACE_MBSTATE_T=1 ;;
21430 REPLACE_MBSTATE_T=1
21432 if test $REPLACE_MBSTATE_T = 1; then
21440 if test $ac_cv_func_mbrtowc = no; then
21443 if test $REPLACE_MBSTATE_T = 1; then
21449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
21450 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
21451 if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
21452 $as_echo_n "(cached) " >&6
21456 # Guess no on Solaris.
21457 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
21458 # Guess yes otherwise.
21459 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
21461 if test $LOCALE_FR_UTF8 != none; then
21462 if test "$cross_compiling" = yes; then :
21465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21466 /* end confdefs.h. */
21468 #include <locale.h>
21469 #include <stdlib.h>
21470 #include <string.h>
21471 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21473 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21474 included before <wchar.h>. */
21475 #include <stddef.h>
21483 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21485 char input[] = "\303\237er";
21490 memset (&state, '\0', sizeof (mbstate_t));
21491 wc = (wchar_t) 0xBADFACE;
21492 ret = mbrtowc (&wc, input, 5, &state);
21495 if (!mbsinit (&state))
21498 memset (&state, '\0', sizeof (mbstate_t));
21499 ret = mbrtowc (NULL, input, 5, &state);
21500 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
21502 if (!mbsinit (&state))
21508 if ac_fn_c_try_run "$LINENO"; then :
21509 gl_cv_func_mbrtowc_null_arg1=yes
21511 gl_cv_func_mbrtowc_null_arg1=no
21513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21514 conftest.$ac_objext conftest.beam conftest.$ac_ext
21520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
21521 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
21526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
21527 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
21528 if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
21529 $as_echo_n "(cached) " >&6
21533 # Guess no on OSF/1.
21534 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
21535 # Guess yes otherwise.
21536 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
21538 if test $LOCALE_FR_UTF8 != none; then
21539 if test "$cross_compiling" = yes; then :
21542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21543 /* end confdefs.h. */
21545 #include <locale.h>
21546 #include <string.h>
21547 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21549 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21550 included before <wchar.h>. */
21551 #include <stddef.h>
21557 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21563 memset (&state, '\0', sizeof (mbstate_t));
21564 wc = (wchar_t) 0xBADFACE;
21565 mbrtowc (&wc, NULL, 5, &state);
21566 /* Check that wc was not modified. */
21567 if (wc != (wchar_t) 0xBADFACE)
21573 if ac_fn_c_try_run "$LINENO"; then :
21574 gl_cv_func_mbrtowc_null_arg2=yes
21576 gl_cv_func_mbrtowc_null_arg2=no
21578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21579 conftest.$ac_objext conftest.beam conftest.$ac_ext
21585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
21586 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
21593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
21594 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
21595 if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
21596 $as_echo_n "(cached) " >&6
21600 # Guess no on HP-UX, Solaris, native Windows.
21601 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
21602 # Guess yes otherwise.
21603 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
21605 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
21606 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
21607 if test "$cross_compiling" = yes; then :
21610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21611 /* end confdefs.h. */
21613 #include <locale.h>
21614 #include <string.h>
21615 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21617 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21618 included before <wchar.h>. */
21619 #include <stddef.h>
21626 int found_some_locale = 0;
21627 /* This fails on Solaris. */
21628 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21630 char input[] = "B\303\274\303\237er"; /* "Büßer" */
21634 memset (&state, '\0', sizeof (mbstate_t));
21635 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21638 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
21641 found_some_locale = 1;
21643 /* This fails on HP-UX 11.11. */
21644 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21646 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21650 memset (&state, '\0', sizeof (mbstate_t));
21651 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21654 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
21657 found_some_locale = 1;
21659 /* This fails on native Windows. */
21660 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
21662 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
21666 memset (&state, '\0', sizeof (mbstate_t));
21667 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21670 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21673 found_some_locale = 1;
21675 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
21677 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
21681 memset (&state, '\0', sizeof (mbstate_t));
21682 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21685 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21688 found_some_locale = 1;
21690 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
21692 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
21696 memset (&state, '\0', sizeof (mbstate_t));
21697 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21700 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21703 found_some_locale = 1;
21705 return (found_some_locale ? result : 77);
21708 if ac_fn_c_try_run "$LINENO"; then :
21709 gl_cv_func_mbrtowc_retval=yes
21711 if test $? != 77; then
21712 gl_cv_func_mbrtowc_retval=no
21716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21717 conftest.$ac_objext conftest.beam conftest.$ac_ext
21723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
21724 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
21729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
21730 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
21731 if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
21732 $as_echo_n "(cached) " >&6
21736 # Guess no on Solaris 8 and 9.
21737 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
21738 # Guess yes otherwise.
21739 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
21741 if test $LOCALE_ZH_CN != none; then
21742 if test "$cross_compiling" = yes; then :
21745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21746 /* end confdefs.h. */
21748 #include <locale.h>
21749 #include <string.h>
21750 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21752 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21753 included before <wchar.h>. */
21754 #include <stddef.h>
21760 /* This fails on Solaris 8 and 9. */
21761 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21766 memset (&state, '\0', sizeof (mbstate_t));
21767 if (mbrtowc (&wc, "", 1, &state) != 0)
21773 if ac_fn_c_try_run "$LINENO"; then :
21774 gl_cv_func_mbrtowc_nul_retval=yes
21776 gl_cv_func_mbrtowc_nul_retval=no
21778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21779 conftest.$ac_objext conftest.beam conftest.$ac_ext
21785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
21786 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
21788 case "$gl_cv_func_mbrtowc_null_arg1" in
21791 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
21796 case "$gl_cv_func_mbrtowc_null_arg2" in
21799 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
21804 case "$gl_cv_func_mbrtowc_retval" in
21807 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
21812 case "$gl_cv_func_mbrtowc_nul_retval" in
21815 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
21822 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
21834 M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
21848 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
21852 # Code from module mbsinit:
21864 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21869 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21870 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
21871 $as_echo_n "(cached) " >&6
21875 # Guess no on AIX and OSF/1.
21876 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21877 # Guess yes otherwise.
21878 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21880 if test $LOCALE_JA != none; then
21881 if test "$cross_compiling" = yes; then :
21884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21885 /* end confdefs.h. */
21887 #include <locale.h>
21888 #include <string.h>
21889 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21891 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21892 included before <wchar.h>. */
21893 #include <stddef.h>
21899 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21901 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21905 memset (&state, '\0', sizeof (mbstate_t));
21906 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21907 if (mbsinit (&state))
21913 if ac_fn_c_try_run "$LINENO"; then :
21914 gl_cv_func_mbrtowc_incomplete_state=yes
21916 gl_cv_func_mbrtowc_incomplete_state=no
21918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21919 conftest.$ac_objext conftest.beam conftest.$ac_ext
21925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21926 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21932 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21933 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
21934 $as_echo_n "(cached) " >&6
21938 # Guess no on Solaris 8.
21939 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21940 # Guess yes otherwise.
21941 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21943 if test $LOCALE_ZH_CN != none; then
21944 if test "$cross_compiling" = yes; then :
21947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21948 /* end confdefs.h. */
21950 #include <locale.h>
21951 #include <stdlib.h>
21952 #include <string.h>
21953 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21955 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21956 included before <wchar.h>. */
21957 #include <stddef.h>
21963 /* This fails on Solaris 8:
21964 mbrtowc returns 2, and sets wc to 0x00F0.
21965 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21966 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21968 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21972 memset (&state, '\0', sizeof (mbstate_t));
21973 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21974 && mbtowc (&wc, input + 3, 6) == 4)
21980 if ac_fn_c_try_run "$LINENO"; then :
21981 gl_cv_func_mbrtowc_sanitycheck=yes
21983 gl_cv_func_mbrtowc_sanitycheck=no
21985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21986 conftest.$ac_objext conftest.beam conftest.$ac_ext
21992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21993 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21995 REPLACE_MBSTATE_T=0
21996 case "$gl_cv_func_mbrtowc_incomplete_state" in
21998 *) REPLACE_MBSTATE_T=1 ;;
22000 case "$gl_cv_func_mbrtowc_sanitycheck" in
22002 *) REPLACE_MBSTATE_T=1 ;;
22005 REPLACE_MBSTATE_T=1
22007 if test $REPLACE_MBSTATE_T = 1; then
22015 if test $ac_cv_func_mbsinit = no; then
22018 if test $REPLACE_MBSTATE_T = 1; then
22022 mingw*) REPLACE_MBSINIT=1 ;;
22026 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
22038 M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
22052 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
22056 # Code from module mbtowc:
22063 if test $REPLACE_MBTOWC = 1; then
22072 M4_LIBOBJS="$M4_LIBOBJS mbtowc.$ac_objext"
22086 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
22090 # Code from module memchr:
22099 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
22103 # Code from module memchr2:
22104 # Code from module mkdtemp:
22115 for ac_func in mkdtemp
22117 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
22118 if test "x$ac_cv_func_mkdtemp" = x""yes; then :
22119 cat >>confdefs.h <<_ACEOF
22120 #define HAVE_MKDTEMP 1
22125 M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
22131 if test $ac_cv_func_mkdtemp = no; then
22144 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
22148 # Code from module mkstemp:
22154 if test $ac_cv_func_mkstemp = yes; then
22155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
22156 $as_echo_n "checking for working mkstemp... " >&6; }
22157 if test "${gl_cv_func_working_mkstemp+set}" = set; then :
22158 $as_echo_n "(cached) " >&6
22161 mkdir conftest.mkstemp
22162 if test "$cross_compiling" = yes; then :
22163 gl_cv_func_working_mkstemp=no
22165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22166 /* end confdefs.h. */
22167 $ac_includes_default
22173 off_t large = (off_t) 4294967295u;
22175 large = 2147483647;
22176 for (i = 0; i < 70; i++)
22178 char templ[] = "conftest.mkstemp/coXXXXXX";
22179 int (*mkstemp_function) (char *) = mkstemp;
22180 int fd = mkstemp_function (templ);
22185 if (lseek (fd, large, SEEK_SET) != large)
22195 if ac_fn_c_try_run "$LINENO"; then :
22196 gl_cv_func_working_mkstemp=yes
22198 gl_cv_func_working_mkstemp=no
22200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22201 conftest.$ac_objext conftest.beam conftest.$ac_ext
22204 rm -rf conftest.mkstemp
22207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
22208 $as_echo "$gl_cv_func_working_mkstemp" >&6; }
22209 if test $gl_cv_func_working_mkstemp != yes; then
22219 M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
22234 M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
22247 $as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
22251 # Code from module multiarch:
22253 # Code from module nl_langinfo:
22258 if test $ac_cv_func_nl_langinfo = yes; then
22259 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
22260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
22261 $as_echo_n "checking whether YESEXPR works... " >&6; }
22262 if test "${gl_cv_func_nl_langinfo_yesexpr_works+set}" = set; then :
22263 $as_echo_n "(cached) " >&6
22265 if test "$cross_compiling" = yes; then :
22268 # Guess no on irix systems.
22269 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
22270 # Guess yes elsewhere.
22271 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
22275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22276 /* end confdefs.h. */
22277 #include <langinfo.h>
22282 return !*nl_langinfo(YESEXPR);
22288 if ac_fn_c_try_run "$LINENO"; then :
22289 gl_cv_func_nl_langinfo_yesexpr_works=yes
22291 gl_cv_func_nl_langinfo_yesexpr_works=no
22293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22294 conftest.$ac_objext conftest.beam conftest.$ac_ext
22299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
22300 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
22301 case $gl_cv_func_nl_langinfo_yesexpr_works in
22302 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
22303 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
22306 cat >>confdefs.h <<_ACEOF
22307 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
22310 if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
22311 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
22314 REPLACE_NL_LANGINFO=1
22316 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
22326 M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
22339 M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
22346 GNULIB_NL_LANGINFO=1
22350 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
22354 # Code from module nocrash:
22355 # Code from module obstack:
22368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
22369 $as_echo_n "checking for obstacks... " >&6; }
22370 if test "${ac_cv_func_obstack+set}" = set; then :
22371 $as_echo_n "(cached) " >&6
22373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22374 /* end confdefs.h. */
22375 $ac_includes_default
22376 #include "obstack.h"
22380 struct obstack mem;
22381 #define obstack_chunk_alloc malloc
22382 #define obstack_chunk_free free
22383 obstack_init (&mem);
22384 obstack_free (&mem, 0);
22389 if ac_fn_c_try_link "$LINENO"; then :
22390 ac_cv_func_obstack=yes
22392 ac_cv_func_obstack=no
22394 rm -f core conftest.err conftest.$ac_objext \
22395 conftest$ac_exeext conftest.$ac_ext
22397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
22398 $as_echo "$ac_cv_func_obstack" >&6; }
22399 if test $ac_cv_func_obstack = yes; then
22401 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
22412 M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
22416 # Code from module open:
22432 M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
22443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
22444 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
22445 if test "${gl_cv_func_open_slash+set}" = set; then :
22446 $as_echo_n "(cached) " >&6
22448 # Assume that if we have lstat, we can also check symlinks.
22449 if test $ac_cv_func_lstat = yes; then
22451 ln -s conftest.tmp conftest.lnk
22453 if test "$cross_compiling" = yes; then :
22456 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22457 gl_cv_func_open_slash="guessing no" ;;
22459 gl_cv_func_open_slash="guessing yes" ;;
22463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22464 /* end confdefs.h. */
22468 # include <unistd.h>
22474 if (open ("conftest.lnk/", O_RDONLY) != -1)
22477 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
22482 if ac_fn_c_try_run "$LINENO"; then :
22483 gl_cv_func_open_slash=yes
22485 gl_cv_func_open_slash=no
22487 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22488 conftest.$ac_objext conftest.beam conftest.$ac_ext
22491 rm -f conftest.sl conftest.tmp conftest.lnk
22494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
22495 $as_echo "$gl_cv_func_open_slash" >&6; }
22496 case "$gl_cv_func_open_slash" in
22499 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
22512 M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
22532 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
22536 # Code from module oset:
22540 # Code from module pathmax:
22545 # Code from module pipe2:
22552 if test $ac_cv_func_pipe2 != yes; then
22563 $as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
22567 # Code from module pipe2-safer:
22570 cat >>confdefs.h <<_ACEOF
22571 #define GNULIB_PIPE2_SAFER 1
22575 # Code from module posix_spawn-internal:
22576 # Code from module posix_spawn_file_actions_addclose:
22580 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22592 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
22598 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
22602 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
22606 # Code from module posix_spawn_file_actions_adddup2:
22610 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22622 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
22628 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
22632 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
22636 # Code from module posix_spawn_file_actions_addopen:
22640 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22652 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
22658 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
22662 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
22666 # Code from module posix_spawn_file_actions_destroy:
22670 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22682 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
22688 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
22692 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
22696 # Code from module posix_spawn_file_actions_init:
22700 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22712 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
22718 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
22722 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
22726 # Code from module posix_spawnattr_destroy:
22730 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22742 M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
22748 GNULIB_POSIX_SPAWNATTR_DESTROY=1
22752 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
22756 # Code from module posix_spawnattr_init:
22760 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22772 M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
22778 GNULIB_POSIX_SPAWNATTR_INIT=1
22782 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
22786 # Code from module posix_spawnattr_setflags:
22790 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22802 M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
22808 GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
22812 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
22816 # Code from module posix_spawnattr_setsigmask:
22820 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22832 M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
22838 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
22842 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
22846 # Code from module posix_spawnp:
22850 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22862 M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
22873 M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
22875 for ac_header in paths.h
22877 ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
22878 if test "x$ac_cv_header_paths_h" = x""yes; then :
22879 cat >>confdefs.h <<_ACEOF
22880 #define HAVE_PATHS_H 1
22887 for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
22889 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22890 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22891 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
22892 cat >>confdefs.h <<_ACEOF
22893 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22904 GNULIB_POSIX_SPAWNP=1
22908 $as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
22912 # Code from module printf-frexp:
22915 if test $gl_cv_func_frexp_no_libm = yes; then
22918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
22919 $as_echo_n "checking whether frexp works... " >&6; }
22920 if test "${gl_cv_func_frexp_works+set}" = set; then :
22921 $as_echo_n "(cached) " >&6
22924 if test "$cross_compiling" = yes; then :
22926 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
22927 *) gl_cv_func_frexp_works="guessing yes";;
22931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22932 /* end confdefs.h. */
22936 #include <string.h>
22937 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
22938 ICC 10.0 has a bug when optimizing the expression -zero.
22939 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
22940 to PowerPC on MacOS X 10.5. */
22941 #if defined __hpux || defined __sgi || defined __ICC
22943 compute_minus_zero (void)
22945 return -DBL_MIN * DBL_MIN;
22947 # define minus_zero compute_minus_zero ()
22949 double minus_zero = -0.0;
22957 /* Test on denormalized numbers. */
22958 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
22963 double y = frexp (x, &exp);
22964 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
22965 On NetBSD: y = 0.75. Correct: y = 0.5. */
22969 /* Test on infinite numbers. */
22973 double y = frexp (x, &exp);
22977 /* Test on negative zero. */
22981 double y = frexp (x, &exp);
22982 if (memcmp (&y, &x, sizeof x))
22988 if ac_fn_c_try_run "$LINENO"; then :
22989 gl_cv_func_frexp_works=yes
22991 gl_cv_func_frexp_works=no
22993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22994 conftest.$ac_objext conftest.beam conftest.$ac_ext
22999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23000 $as_echo "$gl_cv_func_frexp_works" >&6; }
23002 case "$gl_cv_func_frexp_works" in
23005 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
23012 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
23013 if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
23014 $as_echo_n "(cached) " >&6
23017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23018 /* end confdefs.h. */
23025 return ldexp (x, y) < 1;
23030 if ac_fn_c_try_link "$LINENO"; then :
23031 gl_cv_func_ldexp_no_libm=yes
23033 gl_cv_func_ldexp_no_libm=no
23035 rm -f core conftest.err conftest.$ac_objext \
23036 conftest$ac_exeext conftest.$ac_ext
23039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
23040 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
23041 if test $gl_cv_func_ldexp_no_libm = yes; then
23043 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
23047 # Code from module printf-frexpl:
23051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
23052 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
23053 if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
23054 $as_echo_n "(cached) " >&6
23057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23058 /* end confdefs.h. */
23064 int e; return frexpl (x, &e) > 0;
23069 if ac_fn_c_try_link "$LINENO"; then :
23070 gl_cv_func_frexpl_no_libm=yes
23072 gl_cv_func_frexpl_no_libm=no
23074 rm -f core conftest.err conftest.$ac_objext \
23075 conftest$ac_exeext conftest.$ac_ext
23078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
23079 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
23081 if test $gl_cv_func_frexpl_no_libm = yes; then
23084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
23085 $as_echo_n "checking whether frexpl works... " >&6; }
23086 if test "${gl_cv_func_frexpl_works+set}" = set; then :
23087 $as_echo_n "(cached) " >&6
23090 if test "$cross_compiling" = yes; then :
23093 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
23094 gl_cv_func_frexpl_works="guessing no";;
23095 *) gl_cv_func_frexpl_works="guessing yes";;
23099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23100 /* end confdefs.h. */
23104 /* Override the values of <float.h>, like done in float.in.h. */
23105 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
23106 # undef LDBL_MIN_EXP
23107 # define LDBL_MIN_EXP (-16381)
23109 extern long double frexpl (long double, int *);
23113 volatile long double x;
23114 /* Test on finite numbers that fails on AIX 5.1. */
23122 /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
23123 function returns an invalid (incorrectly normalized) value: it returns
23124 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
23125 but the correct result is
23126 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
23130 long double y = frexpl (x, &exp);
23131 if (!(exp == 1 && y == 0.505L))
23134 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
23135 LDBL_MAX_EXP = 16384.
23136 In the loop end test, we test x against Infinity, rather than comparing
23137 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
23140 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
23151 /* Test on denormalized numbers. */
23154 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
23159 long double y = frexpl (x, &exp);
23160 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
23161 exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
23162 if (exp != LDBL_MIN_EXP - 1)
23166 /* Test on infinite numbers. */
23170 long double y = frexpl (x, &exp);
23177 if ac_fn_c_try_run "$LINENO"; then :
23178 gl_cv_func_frexpl_works=yes
23180 gl_cv_func_frexpl_works=no
23182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23183 conftest.$ac_objext conftest.beam conftest.$ac_ext
23188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
23189 $as_echo "$gl_cv_func_frexpl_works" >&6; }
23191 case "$gl_cv_func_frexpl_works" in
23192 *yes) gl_func_frexpl_no_libm=yes ;;
23193 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
23196 gl_func_frexpl_no_libm=no
23199 if test $gl_func_frexpl_no_libm = yes; then
23201 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
23203 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
23205 if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
23214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
23215 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
23216 if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
23217 $as_echo_n "(cached) " >&6
23220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23221 /* end confdefs.h. */
23227 return ldexpl (x, -1) > 0;
23232 if ac_fn_c_try_link "$LINENO"; then :
23233 gl_cv_func_ldexpl_no_libm=yes
23235 gl_cv_func_ldexpl_no_libm=no
23237 rm -f core conftest.err conftest.$ac_objext \
23238 conftest$ac_exeext conftest.$ac_ext
23241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
23242 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
23244 if test $gl_cv_func_ldexpl_no_libm = yes; then
23247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
23248 $as_echo_n "checking whether ldexpl works... " >&6; }
23249 if test "${gl_cv_func_ldexpl_works+set}" = set; then :
23250 $as_echo_n "(cached) " >&6
23253 if test "$cross_compiling" = yes; then :
23256 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
23257 *) gl_cv_func_ldexpl_works="guessing yes";;
23261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23262 /* end confdefs.h. */
23265 extern long double ldexpl (long double, int);
23270 volatile long double x = 1.0;
23271 volatile long double y = ldexpl (x, -1);
23276 volatile long double x = 1.73205L;
23277 volatile long double y = ldexpl (x, 0);
23284 if ac_fn_c_try_run "$LINENO"; then :
23285 gl_cv_func_ldexpl_works=yes
23287 gl_cv_func_ldexpl_works=no
23289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23290 conftest.$ac_objext conftest.beam conftest.$ac_ext
23295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
23296 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
23298 case "$gl_cv_func_ldexpl_works" in
23301 $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
23303 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
23305 if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
23315 # Code from module printf-safe:
23317 # Code from module progname:
23318 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
23320 if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
23326 cat >>confdefs.h <<_ACEOF
23327 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
23330 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
23332 if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
23338 cat >>confdefs.h <<_ACEOF
23339 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
23342 # Code from module quotearg:
23352 M4_LIBOBJS="$M4_LIBOBJS quotearg.$ac_objext"
23355 # Code from module quotearg-simple:
23356 # Code from module rawmemchr:
23369 for ac_func in rawmemchr
23371 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
23372 if test "x$ac_cv_func_rawmemchr" = x""yes; then :
23373 cat >>confdefs.h <<_ACEOF
23374 #define HAVE_RAWMEMCHR 1
23379 M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
23385 if test $ac_cv_func_rawmemchr = no; then
23397 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
23401 # Code from module readlink:
23405 if test $ac_cv_func_readlink = no; then
23415 M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
23421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
23422 $as_echo_n "checking whether readlink signature is correct... " >&6; }
23423 if test "${gl_cv_decl_readlink_works+set}" = set; then :
23424 $as_echo_n "(cached) " >&6
23426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23427 /* end confdefs.h. */
23428 #include <unistd.h>
23429 /* Cause compilation failure if original declaration has wrong type. */
23430 ssize_t readlink (const char *, char *, size_t);
23439 if ac_fn_c_try_compile "$LINENO"; then :
23440 gl_cv_decl_readlink_works=yes
23442 gl_cv_decl_readlink_works=no
23444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
23447 $as_echo "$gl_cv_decl_readlink_works" >&6; }
23448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
23449 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
23450 if test "${gl_cv_func_readlink_works+set}" = set; then :
23451 $as_echo_n "(cached) " >&6
23453 # We have readlink, so assume ln -s works.
23454 ln -s conftest.no-such conftest.link
23455 ln -s conftest.link conftest.lnk2
23456 if test "$cross_compiling" = yes; then :
23457 gl_cv_func_readlink_works="guessing no"
23459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23460 /* end confdefs.h. */
23461 #include <unistd.h>
23467 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
23472 if ac_fn_c_try_run "$LINENO"; then :
23473 gl_cv_func_readlink_works=yes
23475 gl_cv_func_readlink_works=no
23477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23478 conftest.$ac_objext conftest.beam conftest.$ac_ext
23481 rm -f conftest.link conftest.lnk2
23483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
23484 $as_echo "$gl_cv_func_readlink_works" >&6; }
23485 if test "$gl_cv_func_readlink_works" != yes; then
23487 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
23498 M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
23500 elif test "$gl_cv_decl_readlink_works" != yes; then
23510 M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
23522 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
23526 # Code from module regex:
23529 # Check whether --with-included-regex was given.
23530 if test "${with_included_regex+set}" = set; then :
23531 withval=$with_included_regex;
23535 case $with_included_regex in #(
23536 yes|no) ac_use_included_regex=$with_included_regex
23539 # If the system regex support is good enough that it passes the
23540 # following run test, then default to *not* using the included regex.c.
23541 # If cross compiling, assume the test would fail and use the included
23543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
23544 $as_echo_n "checking for working re_compile_pattern... " >&6; }
23545 if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
23546 $as_echo_n "(cached) " >&6
23548 if test "$cross_compiling" = yes; then :
23549 gl_cv_func_re_compile_pattern_working=no
23551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23552 /* end confdefs.h. */
23553 $ac_includes_default
23554 #include <locale.h>
23555 #include <limits.h>
23562 static struct re_pattern_buffer regex;
23563 unsigned char folded_chars[UCHAR_MAX + 1];
23566 struct re_registers regs;
23568 /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
23569 This test needs valgrind to catch the bug on Debian
23570 GNU/Linux 3.1 x86, but it might catch the bug better
23571 on other platforms and it shouldn't hurt to try the
23573 if (setlocale (LC_ALL, "en_US.UTF-8"))
23575 static char const pat[] = "insert into";
23576 static char const data[] =
23577 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
23578 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
23580 memset (®ex, 0, sizeof regex);
23581 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
23584 else if (re_search (®ex, data, sizeof data - 1,
23585 0, sizeof data - 1, ®s)
23588 if (! setlocale (LC_ALL, "C"))
23592 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
23593 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
23594 memset (®ex, 0, sizeof regex);
23595 s = re_compile_pattern ("a[^x]b", 6, ®ex);
23598 /* This should fail, but succeeds for glibc-2.5. */
23599 else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
23602 /* This regular expression is from Spencer ere test number 75
23604 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
23605 memset (®ex, 0, sizeof regex);
23606 for (i = 0; i <= UCHAR_MAX; i++)
23607 folded_chars[i] = i;
23608 regex.translate = folded_chars;
23609 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
23610 /* This should fail with _Invalid character class name_ error. */
23614 /* Ensure that [b-a] is diagnosed as invalid, when
23615 using RE_NO_EMPTY_RANGES. */
23616 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
23617 memset (®ex, 0, sizeof regex);
23618 s = re_compile_pattern ("a[b-a]", 6, ®ex);
23622 /* This should succeed, but does not for glibc-2.1.3. */
23623 memset (®ex, 0, sizeof regex);
23624 s = re_compile_pattern ("{1", 2, ®ex);
23628 /* The following example is derived from a problem report
23629 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
23630 memset (®ex, 0, sizeof regex);
23631 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
23634 /* This should match, but does not for glibc-2.2.1. */
23635 else if (re_match (®ex, "an", 2, 0, ®s) != 2)
23638 memset (®ex, 0, sizeof regex);
23639 s = re_compile_pattern ("x", 1, ®ex);
23642 /* glibc-2.2.93 does not work with a negative RANGE argument. */
23643 else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
23646 /* The version of regex.c in older versions of gnulib
23647 ignored RE_ICASE. Detect that problem too. */
23648 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
23649 memset (®ex, 0, sizeof regex);
23650 s = re_compile_pattern ("x", 1, ®ex);
23653 else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
23656 /* Catch a bug reported by Vin Shelton in
23657 http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
23659 re_set_syntax (RE_SYNTAX_POSIX_BASIC
23660 & ~RE_CONTEXT_INVALID_DUP
23661 & ~RE_NO_EMPTY_RANGES);
23662 memset (®ex, 0, sizeof regex);
23663 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
23667 /* REG_STARTEND was added to glibc on 2004-01-15.
23668 Reject older versions. */
23669 if (! REG_STARTEND)
23673 /* It would be nice to reject hosts whose regoff_t values are too
23674 narrow (including glibc on hosts with 64-bit ptrdiff_t and
23675 32-bit int), but we should wait until glibc implements this
23676 feature. Otherwise, support for equivalence classes and
23677 multibyte collation symbols would always be broken except
23678 when compiling --without-included-regex. */
23679 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
23680 || sizeof (regoff_t) < sizeof (ssize_t))
23690 if ac_fn_c_try_run "$LINENO"; then :
23691 gl_cv_func_re_compile_pattern_working=yes
23693 gl_cv_func_re_compile_pattern_working=no
23695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23696 conftest.$ac_objext conftest.beam conftest.$ac_ext
23700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
23701 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
23702 case $gl_cv_func_re_compile_pattern_working in #(
23703 yes) ac_use_included_regex=no;; #(
23704 no) ac_use_included_regex=yes;;
23707 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
23711 if test $ac_use_included_regex = yes; then
23713 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
23716 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
23719 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
23722 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
23725 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
23728 $as_echo "#define re_search rpl_re_search" >>confdefs.h
23731 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
23734 $as_echo "#define re_match rpl_re_match" >>confdefs.h
23737 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
23740 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
23743 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
23746 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
23749 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
23752 $as_echo "#define regexec rpl_regexec" >>confdefs.h
23755 $as_echo "#define regerror rpl_regerror" >>confdefs.h
23758 $as_echo "#define regfree rpl_regfree" >>confdefs.h
23768 M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
23775 for ac_header in libintl.h
23777 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
23778 if test "x$ac_cv_header_libintl_h" = x""yes; then :
23779 cat >>confdefs.h <<_ACEOF
23780 #define HAVE_LIBINTL_H 1
23788 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
23790 if test "x$ac_cv_have_decl_isblank" = x""yes; then :
23796 cat >>confdefs.h <<_ACEOF
23797 #define HAVE_DECL_ISBLANK $ac_have_decl
23803 # Code from module rename:
23809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
23810 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
23811 if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
23812 $as_echo_n "(cached) " >&6
23814 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
23815 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
23816 as_fn_error $? "cannot create temporary files" "$LINENO" 5
23817 # Assume that if we have lstat, we can also check symlinks.
23818 if test $ac_cv_func_lstat = yes; then
23819 ln -s conftest.f conftest.lnk
23821 if test "$cross_compiling" = yes; then :
23822 gl_cv_func_rename_slash_dst_works="guessing no"
23824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23825 /* end confdefs.h. */
23827 # include <stdio.h>
23828 # include <stdlib.h>
23834 if (rename ("conftest.f1", "conftest.f2/") == 0)
23836 if (rename ("conftest.d1", "conftest.d2/") != 0)
23839 if (rename ("conftest.f", "conftest.lnk/") == 0)
23848 if ac_fn_c_try_run "$LINENO"; then :
23849 gl_cv_func_rename_slash_dst_works=yes
23851 gl_cv_func_rename_slash_dst_works=no
23853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23854 conftest.$ac_objext conftest.beam conftest.$ac_ext
23857 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
23860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
23861 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
23862 if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
23871 M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
23875 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
23879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
23880 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
23881 if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
23882 $as_echo_n "(cached) " >&6
23884 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
23885 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
23886 as_fn_error $? "cannot create temporary files" "$LINENO" 5
23887 # Assume that if we have lstat, we can also check symlinks.
23888 if test $ac_cv_func_lstat = yes; then
23889 ln -s conftest.f conftest.lnk
23891 if test "$cross_compiling" = yes; then :
23892 gl_cv_func_rename_slash_src_works="guessing no"
23894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23895 /* end confdefs.h. */
23897 # include <stdio.h>
23898 # include <stdlib.h>
23904 if (rename ("conftest.f1/", "conftest.d3") == 0)
23906 if (rename ("conftest.d1/", "conftest.d2") != 0)
23909 if (rename ("conftest.lnk/", "conftest.f") == 0)
23918 if ac_fn_c_try_run "$LINENO"; then :
23919 gl_cv_func_rename_slash_src_works=yes
23921 gl_cv_func_rename_slash_src_works=no
23923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23924 conftest.$ac_objext conftest.beam conftest.$ac_ext
23927 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
23930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
23931 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
23932 if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
23941 M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
23945 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
23949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
23950 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
23951 if test "${gl_cv_func_rename_link_works+set}" = set; then :
23952 $as_echo_n "(cached) " >&6
23954 rm -rf conftest.f conftest.f1
23955 if touch conftest.f && ln conftest.f conftest.f1 &&
23956 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
23957 if test "$cross_compiling" = yes; then :
23958 gl_cv_func_rename_link_works="guessing no"
23960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23961 /* end confdefs.h. */
23963 # include <stdio.h>
23964 # include <stdlib.h>
23965 # include <unistd.h>
23971 if (rename ("conftest.f", "conftest.f1"))
23973 if (unlink ("conftest.f1"))
23975 if (rename ("conftest.f", "conftest.f"))
23977 if (rename ("conftest.f1", "conftest.f1") == 0)
23985 if ac_fn_c_try_run "$LINENO"; then :
23986 gl_cv_func_rename_link_works=yes
23988 gl_cv_func_rename_link_works=no
23990 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23991 conftest.$ac_objext conftest.beam conftest.$ac_ext
23995 gl_cv_func_rename_link_works="guessing no"
23997 rm -rf conftest.f conftest.f1
24000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
24001 $as_echo "$gl_cv_func_rename_link_works" >&6; }
24002 if test "x$gl_cv_func_rename_link_works" != xyes; then
24011 M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
24015 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
24019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
24020 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
24021 if test "${gl_cv_func_rename_dest_works+set}" = set; then :
24022 $as_echo_n "(cached) " >&6
24024 rm -rf conftest.f conftest.d1 conftest.d2
24025 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
24026 as_fn_error $? "cannot create temporary files" "$LINENO" 5
24027 if test "$cross_compiling" = yes; then :
24028 gl_cv_func_rename_dest_works="guessing no"
24030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24031 /* end confdefs.h. */
24033 # include <stdio.h>
24034 # include <stdlib.h>
24040 if (rename ("conftest.d1", "conftest.d2") != 0)
24042 if (rename ("conftest.d2", "conftest.f") == 0)
24050 if ac_fn_c_try_run "$LINENO"; then :
24051 gl_cv_func_rename_dest_works=yes
24053 gl_cv_func_rename_dest_works=no
24055 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24056 conftest.$ac_objext conftest.beam conftest.$ac_ext
24059 rm -rf conftest.f conftest.d1 conftest.d2
24062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
24063 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
24064 if test "x$gl_cv_func_rename_dest_works" != xyes; then
24073 M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
24077 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
24088 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
24092 # Code from module rmdir:
24095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24096 $as_echo_n "checking whether rmdir works... " >&6; }
24097 if test "${gl_cv_func_rmdir_works+set}" = set; then :
24098 $as_echo_n "(cached) " >&6
24101 touch conftest.file
24102 if test "$cross_compiling" = yes; then :
24103 gl_cv_func_rmdir_works="guessing no"
24105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24106 /* end confdefs.h. */
24109 #include <unistd.h>
24115 if (!rmdir ("conftest.file/"))
24117 else if (errno != ENOTDIR)
24119 if (!rmdir ("conftest.dir/./"))
24127 if ac_fn_c_try_run "$LINENO"; then :
24128 gl_cv_func_rmdir_works=yes
24130 gl_cv_func_rmdir_works=no
24132 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24133 conftest.$ac_objext conftest.beam conftest.$ac_ext
24136 rm -rf conftest.dir conftest.file
24138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24139 $as_echo "$gl_cv_func_rmdir_works" >&6; }
24140 if test x"$gl_cv_func_rmdir_works" != xyes; then
24150 M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
24161 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24165 # Code from module same-inode:
24166 # Code from module sched:
24168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24169 /* end confdefs.h. */
24172 struct sched_param a;
24173 int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
24183 if ac_fn_c_try_compile "$LINENO"; then :
24197 if test $gl_cv_have_include_next = yes; then
24198 gl_cv_next_sched_h='<'sched.h'>'
24200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
24201 $as_echo_n "checking absolute name of <sched.h>... " >&6; }
24202 if test "${gl_cv_next_sched_h+set}" = set; then :
24203 $as_echo_n "(cached) " >&6
24206 if test $ac_cv_header_sched_h = yes; then
24209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24210 /* end confdefs.h. */
24215 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24216 *) gl_absname_cpp="$ac_cpp" ;;
24218 gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24219 sed -n '\#/sched.h#{
24220 s#.*"\(.*/sched.h\)".*#\1#
24226 gl_cv_next_sched_h='<'sched.h'>'
24231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
24232 $as_echo "$gl_cv_next_sched_h" >&6; }
24234 NEXT_SCHED_H=$gl_cv_next_sched_h
24236 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24237 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24238 gl_next_as_first_directive='<'sched.h'>'
24240 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24241 gl_next_as_first_directive=$gl_cv_next_sched_h
24243 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
24249 if test $ac_cv_header_sched_h = yes; then
24256 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
24258 if test "x$ac_cv_type_struct_sched_param" = x""yes; then :
24259 HAVE_STRUCT_SCHED_PARAM=1
24261 HAVE_STRUCT_SCHED_PARAM=0
24267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24270 # Code from module sigaction:
24274 if test $ac_cv_func_sigaction = yes; then
24275 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
24277 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
24279 cat >>confdefs.h <<_ACEOF
24280 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
24286 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
24287 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
24299 M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
24307 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
24308 #include <signal.h>
24311 if test "x$ac_cv_type_siginfo_t" = x""yes; then :
24313 cat >>confdefs.h <<_ACEOF
24314 #define HAVE_SIGINFO_T 1
24320 if test $ac_cv_type_siginfo_t = no; then
24333 $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
24337 # Code from module signal:
24348 if test $gl_cv_have_include_next = yes; then
24349 gl_cv_next_signal_h='<'signal.h'>'
24351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
24352 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
24353 if test "${gl_cv_next_signal_h+set}" = set; then :
24354 $as_echo_n "(cached) " >&6
24357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24358 /* end confdefs.h. */
24359 #include <signal.h>
24363 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24364 *) gl_absname_cpp="$ac_cpp" ;;
24366 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24367 sed -n '\#/signal.h#{
24368 s#.*"\(.*/signal.h\)".*#\1#
24376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
24377 $as_echo "$gl_cv_next_signal_h" >&6; }
24379 NEXT_SIGNAL_H=$gl_cv_next_signal_h
24381 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24382 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24383 gl_next_as_first_directive='<'signal.h'>'
24385 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24386 gl_next_as_first_directive=$gl_cv_next_signal_h
24388 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
24393 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
24394 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
24395 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
24396 #include <signal.h>
24399 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
24402 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
24409 # Code from module signbit:
24412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
24413 $as_echo_n "checking for signbit macro... " >&6; }
24414 if test "${gl_cv_func_signbit+set}" = set; then :
24415 $as_echo_n "(cached) " >&6
24418 if test "$cross_compiling" = yes; then :
24419 gl_cv_func_signbit="guessing no"
24421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24422 /* end confdefs.h. */
24425 /* If signbit is defined as a function, don't use it, since calling it for
24426 'float' or 'long double' arguments would involve conversions.
24427 If signbit is not declared at all but exists as a library function, don't
24428 use it, since the prototype may not match.
24429 If signbit is not declared at all but exists as a compiler built-in, don't
24430 use it, since it's preferable to use __builtin_signbit* (no warnings,
24431 no conversions). */
24433 # error "signbit should be a macro"
24435 #include <string.h>
24437 /* Global variables.
24438 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24439 but cannot constant-fold __builtin_signbitl (variable). */
24445 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24446 So we use -p0f and -p0d instead. */
24451 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24452 So we use another constant expression instead.
24453 But that expression does not work on other platforms, such as when
24454 cross-compiling to PowerPC on MacOS X 10.5. */
24455 long double p0l = 0.0L;
24456 #if defined __hpux || defined __sgi
24457 long double m0l = -LDBL_MIN * LDBL_MIN;
24459 long double m0l = -p0l;
24462 if (signbit (vf)) /* link check */
24465 float plus_inf = 1.0f / p0f;
24466 float minus_inf = -1.0f / p0f;
24467 if (!(!signbit (255.0f)
24468 && signbit (-255.0f)
24470 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24471 && !signbit (plus_inf)
24472 && signbit (minus_inf)))
24475 if (signbit (vd)) /* link check */
24478 double plus_inf = 1.0 / p0d;
24479 double minus_inf = -1.0 / p0d;
24480 if (!(!signbit (255.0)
24481 && signbit (-255.0)
24483 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24484 && !signbit (plus_inf)
24485 && signbit (minus_inf)))
24488 if (signbit (vl)) /* link check */
24491 long double plus_inf = 1.0L / p0l;
24492 long double minus_inf = -1.0L / p0l;
24493 if (signbit (255.0L))
24495 if (!signbit (-255.0L))
24499 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24501 if (signbit (plus_inf))
24503 if (!signbit (minus_inf))
24511 if ac_fn_c_try_run "$LINENO"; then :
24512 gl_cv_func_signbit=yes
24514 gl_cv_func_signbit=no
24516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24517 conftest.$ac_objext conftest.beam conftest.$ac_ext
24522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
24523 $as_echo "$gl_cv_func_signbit" >&6; }
24524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
24525 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
24526 if test "${gl_cv_func_signbit_gcc+set}" = set; then :
24527 $as_echo_n "(cached) " >&6
24530 if test "$cross_compiling" = yes; then :
24531 gl_cv_func_signbit_gcc="guessing no"
24533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24534 /* end confdefs.h. */
24537 # define signbit(x) \
24538 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
24539 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
24540 __builtin_signbitf (x))
24542 # error "signbit should be three compiler built-ins"
24544 #include <string.h>
24546 /* Global variables.
24547 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24548 but cannot constant-fold __builtin_signbitl (variable). */
24554 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24555 So we use -p0f and -p0d instead. */
24560 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24561 So we use another constant expression instead.
24562 But that expression does not work on other platforms, such as when
24563 cross-compiling to PowerPC on MacOS X 10.5. */
24564 long double p0l = 0.0L;
24565 #if defined __hpux || defined __sgi
24566 long double m0l = -LDBL_MIN * LDBL_MIN;
24568 long double m0l = -p0l;
24571 if (signbit (vf)) /* link check */
24574 float plus_inf = 1.0f / p0f;
24575 float minus_inf = -1.0f / p0f;
24576 if (!(!signbit (255.0f)
24577 && signbit (-255.0f)
24579 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24580 && !signbit (plus_inf)
24581 && signbit (minus_inf)))
24584 if (signbit (vd)) /* link check */
24587 double plus_inf = 1.0 / p0d;
24588 double minus_inf = -1.0 / p0d;
24589 if (!(!signbit (255.0)
24590 && signbit (-255.0)
24592 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24593 && !signbit (plus_inf)
24594 && signbit (minus_inf)))
24597 if (signbit (vl)) /* link check */
24600 long double plus_inf = 1.0L / p0l;
24601 long double minus_inf = -1.0L / p0l;
24602 if (signbit (255.0L))
24604 if (!signbit (-255.0L))
24608 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24610 if (signbit (plus_inf))
24612 if (!signbit (minus_inf))
24620 if ac_fn_c_try_run "$LINENO"; then :
24621 gl_cv_func_signbit_gcc=yes
24623 gl_cv_func_signbit_gcc=no
24625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24626 conftest.$ac_objext conftest.beam conftest.$ac_ext
24631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
24632 $as_echo "$gl_cv_func_signbit_gcc" >&6; }
24633 if test "$gl_cv_func_signbit_gcc" = yes; then
24634 REPLACE_SIGNBIT_USING_GCC=1
24636 if test "$gl_cv_func_signbit" != yes; then
24646 M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
24656 M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
24666 M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
24670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
24671 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
24672 if test "${gl_cv_cc_float_signbit+set}" = set; then :
24673 $as_echo_n "(cached) " >&6
24676 if test "$cross_compiling" = yes; then :
24678 gl_cv_cc_float_signbit="unknown"
24681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24682 /* end confdefs.h. */
24684 #include <stddef.h>
24687 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24688 typedef union { float value; unsigned int word[NWORDS]; }
24690 static memory_float plus = { 1.0f };
24691 static memory_float minus = { -1.0f };
24696 FILE *fp = fopen ("conftest.out", "w");
24699 /* Find the different bit. */
24701 for (j = 0; j < NWORDS; j++)
24703 unsigned int x = plus.word[j] ^ minus.word[j];
24704 if ((x & (x - 1)) || (x && m))
24706 /* More than one bit difference. */
24707 fprintf (fp, "unknown");
24718 /* No difference. */
24719 fprintf (fp, "unknown");
24722 /* Now m = plus.word[k] ^ ~minus.word[k]. */
24723 if (plus.word[k] & ~minus.word[k])
24725 /* Oh? The sign bit is set in the positive and cleared in the negative
24727 fprintf (fp, "unknown");
24733 fprintf (fp, "word %d bit %d", (int) k, (int) i);
24734 if (fclose (fp) != 0)
24740 if ac_fn_c_try_run "$LINENO"; then :
24741 gl_cv_cc_float_signbit=`cat conftest.out`
24743 gl_cv_cc_float_signbit="unknown"
24745 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24746 conftest.$ac_objext conftest.beam conftest.$ac_ext
24752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
24753 $as_echo "$gl_cv_cc_float_signbit" >&6; }
24754 case "$gl_cv_cc_float_signbit" in
24756 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24757 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
24759 cat >>confdefs.h <<_ACEOF
24760 #define FLT_SIGNBIT_WORD $word
24764 cat >>confdefs.h <<_ACEOF
24765 #define FLT_SIGNBIT_BIT $bit
24774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
24775 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
24776 if test "${gl_cv_cc_double_signbit+set}" = set; then :
24777 $as_echo_n "(cached) " >&6
24780 if test "$cross_compiling" = yes; then :
24782 gl_cv_cc_double_signbit="unknown"
24785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24786 /* end confdefs.h. */
24788 #include <stddef.h>
24791 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24792 typedef union { double value; unsigned int word[NWORDS]; }
24794 static memory_float plus = { 1.0 };
24795 static memory_float minus = { -1.0 };
24800 FILE *fp = fopen ("conftest.out", "w");
24803 /* Find the different bit. */
24805 for (j = 0; j < NWORDS; j++)
24807 unsigned int x = plus.word[j] ^ minus.word[j];
24808 if ((x & (x - 1)) || (x && m))
24810 /* More than one bit difference. */
24811 fprintf (fp, "unknown");
24822 /* No difference. */
24823 fprintf (fp, "unknown");
24826 /* Now m = plus.word[k] ^ ~minus.word[k]. */
24827 if (plus.word[k] & ~minus.word[k])
24829 /* Oh? The sign bit is set in the positive and cleared in the negative
24831 fprintf (fp, "unknown");
24837 fprintf (fp, "word %d bit %d", (int) k, (int) i);
24838 if (fclose (fp) != 0)
24844 if ac_fn_c_try_run "$LINENO"; then :
24845 gl_cv_cc_double_signbit=`cat conftest.out`
24847 gl_cv_cc_double_signbit="unknown"
24849 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24850 conftest.$ac_objext conftest.beam conftest.$ac_ext
24856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
24857 $as_echo "$gl_cv_cc_double_signbit" >&6; }
24858 case "$gl_cv_cc_double_signbit" in
24860 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24861 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
24863 cat >>confdefs.h <<_ACEOF
24864 #define DBL_SIGNBIT_WORD $word
24868 cat >>confdefs.h <<_ACEOF
24869 #define DBL_SIGNBIT_BIT $bit
24878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
24879 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
24880 if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
24881 $as_echo_n "(cached) " >&6
24884 if test "$cross_compiling" = yes; then :
24886 gl_cv_cc_long_double_signbit="unknown"
24889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24890 /* end confdefs.h. */
24892 #include <stddef.h>
24895 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24896 typedef union { long double value; unsigned int word[NWORDS]; }
24898 static memory_float plus = { 1.0L };
24899 static memory_float minus = { -1.0L };
24904 FILE *fp = fopen ("conftest.out", "w");
24907 /* Find the different bit. */
24909 for (j = 0; j < NWORDS; j++)
24911 unsigned int x = plus.word[j] ^ minus.word[j];
24912 if ((x & (x - 1)) || (x && m))
24914 /* More than one bit difference. */
24915 fprintf (fp, "unknown");
24926 /* No difference. */
24927 fprintf (fp, "unknown");
24930 /* Now m = plus.word[k] ^ ~minus.word[k]. */
24931 if (plus.word[k] & ~minus.word[k])
24933 /* Oh? The sign bit is set in the positive and cleared in the negative
24935 fprintf (fp, "unknown");
24941 fprintf (fp, "word %d bit %d", (int) k, (int) i);
24942 if (fclose (fp) != 0)
24948 if ac_fn_c_try_run "$LINENO"; then :
24949 gl_cv_cc_long_double_signbit=`cat conftest.out`
24951 gl_cv_cc_long_double_signbit="unknown"
24953 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24954 conftest.$ac_objext conftest.beam conftest.$ac_ext
24960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
24961 $as_echo "$gl_cv_cc_long_double_signbit" >&6; }
24962 case "$gl_cv_cc_long_double_signbit" in
24964 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24965 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
24967 cat >>confdefs.h <<_ACEOF
24968 #define LDBL_SIGNBIT_WORD $word
24972 cat >>confdefs.h <<_ACEOF
24973 #define LDBL_SIGNBIT_BIT $bit
24980 if test "$gl_cv_cc_float_signbit" = unknown; then
24981 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
24983 if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
24989 cat >>confdefs.h <<_ACEOF
24990 #define HAVE_DECL_COPYSIGNF $ac_have_decl
24993 if test "$ac_cv_have_decl_copysignf" = yes; then
24994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
24995 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
24996 if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
24997 $as_echo_n "(cached) " >&6
25000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25001 /* end confdefs.h. */
25007 return copysignf (x, y) < 0;
25012 if ac_fn_c_try_link "$LINENO"; then :
25013 gl_cv_func_copysignf_no_libm=yes
25015 gl_cv_func_copysignf_no_libm=no
25017 rm -f core conftest.err conftest.$ac_objext \
25018 conftest$ac_exeext conftest.$ac_ext
25021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
25022 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
25023 if test $gl_cv_func_copysignf_no_libm = yes; then
25025 $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
25030 if test "$gl_cv_cc_double_signbit" = unknown; then
25031 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
25033 if test "x$ac_cv_have_decl_copysign" = x""yes; then :
25039 cat >>confdefs.h <<_ACEOF
25040 #define HAVE_DECL_COPYSIGN $ac_have_decl
25043 if test "$ac_cv_have_decl_copysign" = yes; then
25044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
25045 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
25046 if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
25047 $as_echo_n "(cached) " >&6
25050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25051 /* end confdefs.h. */
25057 return copysign (x, y) < 0;
25062 if ac_fn_c_try_link "$LINENO"; then :
25063 gl_cv_func_copysign_no_libm=yes
25065 gl_cv_func_copysign_no_libm=no
25067 rm -f core conftest.err conftest.$ac_objext \
25068 conftest$ac_exeext conftest.$ac_ext
25071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
25072 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
25073 if test $gl_cv_func_copysign_no_libm = yes; then
25075 $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
25080 if test "$gl_cv_cc_long_double_signbit" = unknown; then
25081 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
25083 if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
25089 cat >>confdefs.h <<_ACEOF
25090 #define HAVE_DECL_COPYSIGNL $ac_have_decl
25093 if test "$ac_cv_have_decl_copysignl" = yes; then
25094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
25095 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
25096 if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
25097 $as_echo_n "(cached) " >&6
25100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25101 /* end confdefs.h. */
25107 return copysignl (x, y) < 0;
25112 if ac_fn_c_try_link "$LINENO"; then :
25113 gl_cv_func_copysignl_no_libm=yes
25115 gl_cv_func_copysignl_no_libm=no
25117 rm -f core conftest.err conftest.$ac_objext \
25118 conftest$ac_exeext conftest.$ac_ext
25121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
25122 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
25123 if test $gl_cv_func_copysignl_no_libm = yes; then
25125 $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
25140 $as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
25144 # Code from module sigprocmask:
25148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25149 /* end confdefs.h. */
25150 #include <signal.h>
25153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25154 $EGREP "sigset_t" >/dev/null 2>&1; then :
25157 signals_not_posix=1
25161 if test -z "$signals_not_posix"; then
25162 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
25163 if test "x$ac_cv_func_sigprocmask" = x""yes; then :
25164 gl_cv_func_sigprocmask=1
25168 if test -z "$gl_cv_func_sigprocmask"; then
25169 HAVE_POSIX_SIGNALBLOCKING=0
25178 M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
25182 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "#include <signal.h>
25183 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
25184 #include <sys/types.h>
25186 if test "x$ac_cv_type_sigset_t" = x""yes; then :
25188 cat >>confdefs.h <<_ACEOF
25189 #define HAVE_SIGSET_T 1
25192 gl_cv_type_sigset_t=yes
25194 gl_cv_type_sigset_t=no
25197 if test $gl_cv_type_sigset_t != yes; then
25207 GNULIB_SIGPROCMASK=1
25211 $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
25215 # Code from module size_max:
25217 for ac_header in stdint.h
25219 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
25220 if test "x$ac_cv_header_stdint_h" = x""yes; then :
25221 cat >>confdefs.h <<_ACEOF
25222 #define HAVE_STDINT_H 1
25229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
25230 $as_echo_n "checking for SIZE_MAX... " >&6; }
25231 if test "${gl_cv_size_max+set}" = set; then :
25232 $as_echo_n "(cached) " >&6
25236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25237 /* end confdefs.h. */
25239 #include <limits.h>
25241 #include <stdint.h>
25248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25249 $EGREP "Found it" >/dev/null 2>&1; then :
25254 if test -z "$gl_cv_size_max"; then
25255 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
25256 #include <limits.h>"; then :
25259 size_t_bits_minus_1=
25262 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
25268 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
25269 if test $fits_in_uint = 1; then
25270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25271 /* end confdefs.h. */
25272 #include <stddef.h>
25274 extern unsigned long foo;
25284 if ac_fn_c_try_compile "$LINENO"; then :
25287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25289 if test $fits_in_uint = 1; then
25290 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
25292 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
25295 gl_cv_size_max='((size_t)~(size_t)0)'
25300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
25301 $as_echo "$gl_cv_size_max" >&6; }
25302 if test "$gl_cv_size_max" != yes; then
25304 cat >>confdefs.h <<_ACEOF
25305 #define SIZE_MAX $gl_cv_size_max
25311 # Code from module snprintf:
25314 gl_cv_func_snprintf_usable=no
25315 for ac_func in snprintf
25317 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
25318 if test "x$ac_cv_func_snprintf" = x""yes; then :
25319 cat >>confdefs.h <<_ACEOF
25320 #define HAVE_SNPRINTF 1
25326 if test $ac_cv_func_snprintf = yes; then
25329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
25330 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
25331 if test "${gl_cv_func_snprintf_size1+set}" = set; then :
25332 $as_echo_n "(cached) " >&6
25335 if test "$cross_compiling" = yes; then :
25336 gl_cv_func_snprintf_size1="guessing yes"
25338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25339 /* end confdefs.h. */
25344 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
25345 snprintf (buf, 1, "%d", 12345);
25346 return buf[1] != 'E';
25349 if ac_fn_c_try_run "$LINENO"; then :
25350 gl_cv_func_snprintf_size1=yes
25352 gl_cv_func_snprintf_size1=no
25354 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25355 conftest.$ac_objext conftest.beam conftest.$ac_ext
25360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
25361 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
25363 case "$gl_cv_func_snprintf_size1" in
25366 case "$gl_cv_func_snprintf_retval_c99" in
25368 gl_cv_func_snprintf_usable=yes
25374 if test $gl_cv_func_snprintf_usable = no; then
25385 M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
25387 if test $ac_cv_func_snprintf = yes; then
25394 if test $ac_cv_have_decl_snprintf = no; then
25395 HAVE_DECL_SNPRINTF=0
25405 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
25411 cat >>confdefs.h <<_ACEOF
25412 #define GNULIB_SNPRINTF 1
25416 # Code from module spawn:
25429 if test $gl_cv_have_include_next = yes; then
25430 gl_cv_next_spawn_h='<'spawn.h'>'
25432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
25433 $as_echo_n "checking absolute name of <spawn.h>... " >&6; }
25434 if test "${gl_cv_next_spawn_h+set}" = set; then :
25435 $as_echo_n "(cached) " >&6
25438 if test $ac_cv_header_spawn_h = yes; then
25441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25442 /* end confdefs.h. */
25447 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25448 *) gl_absname_cpp="$ac_cpp" ;;
25450 gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25451 sed -n '\#/spawn.h#{
25452 s#.*"\(.*/spawn.h\)".*#\1#
25458 gl_cv_next_spawn_h='<'spawn.h'>'
25463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
25464 $as_echo "$gl_cv_next_spawn_h" >&6; }
25466 NEXT_SPAWN_H=$gl_cv_next_spawn_h
25468 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25469 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25470 gl_next_as_first_directive='<'spawn.h'>'
25472 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25473 gl_next_as_first_directive=$gl_cv_next_spawn_h
25475 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
25481 if test $ac_cv_header_spawn_h = yes; then
25483 ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
25487 if test "x$ac_cv_type_posix_spawnattr_t" = x""yes; then :
25489 cat >>confdefs.h <<_ACEOF
25490 #define HAVE_POSIX_SPAWNATTR_T 1
25495 HAVE_POSIX_SPAWNATTR_T=0
25498 ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
25502 if test "x$ac_cv_type_posix_spawn_file_actions_t" = x""yes; then :
25504 cat >>confdefs.h <<_ACEOF
25505 #define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
25510 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
25515 HAVE_POSIX_SPAWNATTR_T=0
25516 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
25529 # Code from module spawn-pipe:
25534 # Code from module ssize_t:
25536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25537 $as_echo_n "checking for ssize_t... " >&6; }
25538 if test "${gt_cv_ssize_t+set}" = set; then :
25539 $as_echo_n "(cached) " >&6
25541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25542 /* end confdefs.h. */
25543 #include <sys/types.h>
25547 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25553 if ac_fn_c_try_compile "$LINENO"; then :
25558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25561 $as_echo "$gt_cv_ssize_t" >&6; }
25562 if test $gt_cv_ssize_t = no; then
25564 $as_echo "#define ssize_t int" >>confdefs.h
25568 # Code from module stat:
25572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25573 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25574 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
25575 $as_echo_n "(cached) " >&6
25577 if test "$cross_compiling" = yes; then :
25579 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25580 *) gl_cv_func_stat_dir_slash="guessing yes";;
25583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25584 /* end confdefs.h. */
25585 #include <sys/stat.h>
25590 struct stat st; return stat (".", &st) != stat ("./", &st);
25595 if ac_fn_c_try_run "$LINENO"; then :
25596 gl_cv_func_stat_dir_slash=yes
25598 gl_cv_func_stat_dir_slash=no
25600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25601 conftest.$ac_objext conftest.beam conftest.$ac_ext
25605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25606 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25608 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25609 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
25610 $as_echo_n "(cached) " >&6
25613 # Assume that if we have lstat, we can also check symlinks.
25614 if test $ac_cv_func_lstat = yes; then
25615 ln -s conftest.tmp conftest.lnk
25617 if test "$cross_compiling" = yes; then :
25618 gl_cv_func_stat_file_slash="guessing no"
25620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25621 /* end confdefs.h. */
25622 #include <sys/stat.h>
25629 if (!stat ("conftest.tmp/", &st))
25632 if (!stat ("conftest.lnk/", &st))
25641 if ac_fn_c_try_run "$LINENO"; then :
25642 gl_cv_func_stat_file_slash=yes
25644 gl_cv_func_stat_file_slash=no
25646 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25647 conftest.$ac_objext conftest.beam conftest.$ac_ext
25650 rm -f conftest.tmp conftest.lnk
25652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25653 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
25654 case $gl_cv_func_stat_dir_slash in
25655 *no) REPLACE_STAT=1
25657 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25660 case $gl_cv_func_stat_file_slash in
25661 *no) REPLACE_STAT=1
25663 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25666 if test $REPLACE_STAT = 1; then
25675 M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
25687 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25691 # Code from module stdarg:
25694 NEXT_STDARG_H='<stdarg.h>';
25695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
25696 $as_echo_n "checking for va_copy... " >&6; }
25697 if test "${gl_cv_func_va_copy+set}" = set; then :
25698 $as_echo_n "(cached) " >&6
25701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25702 /* end confdefs.h. */
25703 #include <stdarg.h>
25709 void (*func) (va_list, va_list) = va_copy;
25716 if ac_fn_c_try_compile "$LINENO"; then :
25717 gl_cv_func_va_copy=yes
25719 gl_cv_func_va_copy=no
25721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
25725 $as_echo "$gl_cv_func_va_copy" >&6; }
25726 if test $gl_cv_func_va_copy = no; then
25727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25728 /* end confdefs.h. */
25729 #if defined _AIX && !defined __GNUC__
25734 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25735 $EGREP "vaccine" >/dev/null 2>&1; then :
25742 if test $gl_aixcc = yes; then
25752 if test $gl_cv_have_include_next = yes; then
25753 gl_cv_next_stdarg_h='<'stdarg.h'>'
25755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
25756 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
25757 if test "${gl_cv_next_stdarg_h+set}" = set; then :
25758 $as_echo_n "(cached) " >&6
25761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25762 /* end confdefs.h. */
25763 #include <stdarg.h>
25767 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25768 *) gl_absname_cpp="$ac_cpp" ;;
25770 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25771 sed -n '\#/stdarg.h#{
25772 s#.*"\(.*/stdarg.h\)".*#\1#
25780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
25781 $as_echo "$gl_cv_next_stdarg_h" >&6; }
25783 NEXT_STDARG_H=$gl_cv_next_stdarg_h
25785 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25787 gl_next_as_first_directive='<'stdarg.h'>'
25789 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25790 gl_next_as_first_directive=$gl_cv_next_stdarg_h
25792 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
25797 if test "$gl_cv_next_stdarg_h" = '""'; then
25798 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
25799 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
25803 saved_as_echo_n="$as_echo_n"
25805 if test "${gl_cv_func___va_copy+set}" = set; then :
25806 $as_echo_n "(cached) " >&6
25809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25810 /* end confdefs.h. */
25811 #include <stdarg.h>
25824 if ac_fn_c_try_compile "$LINENO"; then :
25825 gl_cv_func___va_copy=yes
25827 gl_cv_func___va_copy=no
25829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25832 as_echo_n="$saved_as_echo_n"
25834 if test $gl_cv_func___va_copy = yes; then
25836 $as_echo "#define va_copy __va_copy" >>confdefs.h
25841 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
25847 # Code from module stdbool:
25851 # Define two additional variables used in the Makefile substitution.
25853 if test "$ac_cv_header_stdbool_h" = yes; then
25856 STDBOOL_H='stdbool.h'
25860 if test "$ac_cv_type__Bool" = yes; then
25867 # Code from module stddef:
25871 if test $gt_cv_c_wchar_t = no; then
25875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25876 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25877 if test "${gl_cv_decl_null_works+set}" = set; then :
25878 $as_echo_n "(cached) " >&6
25880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25881 /* end confdefs.h. */
25882 #include <stddef.h>
25883 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25893 if ac_fn_c_try_compile "$LINENO"; then :
25894 gl_cv_decl_null_works=yes
25896 gl_cv_decl_null_works=no
25898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25901 $as_echo "$gl_cv_decl_null_works" >&6; }
25902 if test $gl_cv_decl_null_works = no; then
25906 if test -n "$STDDEF_H"; then
25915 if test $gl_cv_have_include_next = yes; then
25916 gl_cv_next_stddef_h='<'stddef.h'>'
25918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25919 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25920 if test "${gl_cv_next_stddef_h+set}" = set; then :
25921 $as_echo_n "(cached) " >&6
25924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25925 /* end confdefs.h. */
25926 #include <stddef.h>
25930 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25931 *) gl_absname_cpp="$ac_cpp" ;;
25933 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25934 sed -n '\#/stddef.h#{
25935 s#.*"\(.*/stddef.h\)".*#\1#
25943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25944 $as_echo "$gl_cv_next_stddef_h" >&6; }
25946 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25948 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25949 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25950 gl_next_as_first_directive='<'stddef.h'>'
25952 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25953 gl_next_as_first_directive=$gl_cv_next_stddef_h
25955 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25962 # Code from module stdint:
25966 if test $ac_cv_type_long_long_int = yes; then
25967 HAVE_LONG_LONG_INT=1
25969 HAVE_LONG_LONG_INT=0
25973 if test $ac_cv_type_unsigned_long_long_int = yes; then
25974 HAVE_UNSIGNED_LONG_LONG_INT=1
25976 HAVE_UNSIGNED_LONG_LONG_INT=0
25981 if test $ac_cv_header_wchar_h = yes; then
25988 if test $ac_cv_header_inttypes_h = yes; then
25995 if test $ac_cv_header_sys_types_h = yes; then
26011 if test $gl_cv_have_include_next = yes; then
26012 gl_cv_next_stdint_h='<'stdint.h'>'
26014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
26015 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
26016 if test "${gl_cv_next_stdint_h+set}" = set; then :
26017 $as_echo_n "(cached) " >&6
26020 if test $ac_cv_header_stdint_h = yes; then
26023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26024 /* end confdefs.h. */
26025 #include <stdint.h>
26029 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26030 *) gl_absname_cpp="$ac_cpp" ;;
26032 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26033 sed -n '\#/stdint.h#{
26034 s#.*"\(.*/stdint.h\)".*#\1#
26040 gl_cv_next_stdint_h='<'stdint.h'>'
26045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
26046 $as_echo "$gl_cv_next_stdint_h" >&6; }
26048 NEXT_STDINT_H=$gl_cv_next_stdint_h
26050 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26051 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26052 gl_next_as_first_directive='<'stdint.h'>'
26054 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26055 gl_next_as_first_directive=$gl_cv_next_stdint_h
26057 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
26062 if test $ac_cv_header_stdint_h = yes; then
26069 if test $ac_cv_header_stdint_h = yes; then
26070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
26071 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
26072 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
26073 $as_echo_n "(cached) " >&6
26075 gl_cv_header_working_stdint_h=no
26076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26077 /* end confdefs.h. */
26080 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
26081 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
26082 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
26083 #include <stdint.h>
26084 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
26085 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
26086 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
26090 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26091 included before <wchar.h>. */
26092 #include <stddef.h>
26093 #include <signal.h>
26095 # include <stdio.h>
26097 # include <wchar.h>
26102 int8_t a1 = INT8_MAX;
26103 int8_t a1min = INT8_MIN;
26106 int16_t a2 = INT16_MAX;
26107 int16_t a2min = INT16_MIN;
26110 int32_t a3 = INT32_MAX;
26111 int32_t a3min = INT32_MIN;
26114 int64_t a4 = INT64_MAX;
26115 int64_t a4min = INT64_MIN;
26118 uint8_t b1 = UINT8_MAX;
26120 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
26123 uint16_t b2 = UINT16_MAX;
26126 uint32_t b3 = UINT32_MAX;
26129 uint64_t b4 = UINT64_MAX;
26131 int_least8_t c1 = INT8_C (0x7f);
26132 int_least8_t c1max = INT_LEAST8_MAX;
26133 int_least8_t c1min = INT_LEAST8_MIN;
26134 int_least16_t c2 = INT16_C (0x7fff);
26135 int_least16_t c2max = INT_LEAST16_MAX;
26136 int_least16_t c2min = INT_LEAST16_MIN;
26137 int_least32_t c3 = INT32_C (0x7fffffff);
26138 int_least32_t c3max = INT_LEAST32_MAX;
26139 int_least32_t c3min = INT_LEAST32_MIN;
26140 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
26141 int_least64_t c4max = INT_LEAST64_MAX;
26142 int_least64_t c4min = INT_LEAST64_MIN;
26143 uint_least8_t d1 = UINT8_C (0xff);
26144 uint_least8_t d1max = UINT_LEAST8_MAX;
26145 uint_least16_t d2 = UINT16_C (0xffff);
26146 uint_least16_t d2max = UINT_LEAST16_MAX;
26147 uint_least32_t d3 = UINT32_C (0xffffffff);
26148 uint_least32_t d3max = UINT_LEAST32_MAX;
26149 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
26150 uint_least64_t d4max = UINT_LEAST64_MAX;
26151 int_fast8_t e1 = INT_FAST8_MAX;
26152 int_fast8_t e1min = INT_FAST8_MIN;
26153 int_fast16_t e2 = INT_FAST16_MAX;
26154 int_fast16_t e2min = INT_FAST16_MIN;
26155 int_fast32_t e3 = INT_FAST32_MAX;
26156 int_fast32_t e3min = INT_FAST32_MIN;
26157 int_fast64_t e4 = INT_FAST64_MAX;
26158 int_fast64_t e4min = INT_FAST64_MIN;
26159 uint_fast8_t f1 = UINT_FAST8_MAX;
26160 uint_fast16_t f2 = UINT_FAST16_MAX;
26161 uint_fast32_t f3 = UINT_FAST32_MAX;
26162 uint_fast64_t f4 = UINT_FAST64_MAX;
26164 intptr_t g = INTPTR_MAX;
26165 intptr_t gmin = INTPTR_MIN;
26168 uintptr_t h = UINTPTR_MAX;
26170 intmax_t i = INTMAX_MAX;
26171 uintmax_t j = UINTMAX_MAX;
26173 #include <limits.h> /* for CHAR_BIT */
26174 #define TYPE_MINIMUM(t) \
26175 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
26176 #define TYPE_MAXIMUM(t) \
26177 ((t) ((t) 0 < (t) -1 \
26179 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
26182 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
26183 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
26185 /* Detect bug in FreeBSD 6.0 / ia64. */
26186 int check_SIG_ATOMIC:
26187 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
26188 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
26190 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
26192 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
26193 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
26195 /* Detect bug in mingw. */
26197 WINT_MIN == TYPE_MINIMUM (wint_t)
26198 && WINT_MAX == TYPE_MAXIMUM (wint_t)
26201 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
26203 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
26204 int check_UINT16_C:
26205 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
26207 /* Detect bugs in OpenBSD 3.9 stdint.h. */
26209 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
26212 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
26215 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
26218 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
26220 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
26221 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
26222 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
26223 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
26224 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
26225 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
26226 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
26227 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
26228 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
26229 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
26230 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
26241 if ac_fn_c_try_compile "$LINENO"; then :
26242 if test "$cross_compiling" = yes; then :
26243 gl_cv_header_working_stdint_h=yes
26246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26247 /* end confdefs.h. */
26250 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
26251 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
26252 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
26253 #include <stdint.h>
26256 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26257 included before <wchar.h>. */
26258 #include <stddef.h>
26259 #include <signal.h>
26261 # include <stdio.h>
26263 # include <wchar.h>
26268 #include <string.h>
26269 #define MVAL(macro) MVAL1(macro)
26270 #define MVAL1(expression) #expression
26271 static const char *macro_values[] =
26305 for (mv = macro_values; *mv != NULL; mv++)
26307 const char *value = *mv;
26308 /* Test whether it looks like a cast expression. */
26309 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
26310 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
26311 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
26312 || strncmp (value, "((int)"/*)*/, 6) == 0
26313 || strncmp (value, "((signed short)"/*)*/, 15) == 0
26314 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
26315 return mv - macro_values + 1;
26323 if ac_fn_c_try_run "$LINENO"; then :
26324 gl_cv_header_working_stdint_h=yes
26326 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26327 conftest.$ac_objext conftest.beam conftest.$ac_ext
26332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
26336 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
26338 if test "$gl_cv_header_working_stdint_h" = yes; then
26341 for ac_header in sys/inttypes.h sys/bitypes.h
26343 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26344 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26345 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26346 cat >>confdefs.h <<_ACEOF
26347 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26354 if test $ac_cv_header_sys_inttypes_h = yes; then
26355 HAVE_SYS_INTTYPES_H=1
26357 HAVE_SYS_INTTYPES_H=0
26360 if test $ac_cv_header_sys_bitypes_h = yes; then
26361 HAVE_SYS_BITYPES_H=1
26363 HAVE_SYS_BITYPES_H=0
26369 if test $APPLE_UNIVERSAL_BUILD = 0; then
26372 for gltype in ptrdiff_t size_t ; do
26373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
26374 $as_echo_n "checking for bit size of $gltype... " >&6; }
26375 if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
26376 $as_echo_n "(cached) " >&6
26378 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
26379 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26380 included before <wchar.h>. */
26381 #include <stddef.h>
26382 #include <signal.h>
26384 # include <stdio.h>
26386 # include <wchar.h>
26389 #include <limits.h>"; then :
26395 eval gl_cv_bitsizeof_${gltype}=\$result
26398 eval ac_res=\$gl_cv_bitsizeof_${gltype}
26399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26400 $as_echo "$ac_res" >&6; }
26401 eval result=\$gl_cv_bitsizeof_${gltype}
26402 if test $result = unknown; then
26405 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26406 cat >>confdefs.h <<_ACEOF
26407 #define BITSIZEOF_${GLTYPE} $result
26410 eval BITSIZEOF_${GLTYPE}=\$result
26417 for gltype in sig_atomic_t wchar_t wint_t ; do
26418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
26419 $as_echo_n "checking for bit size of $gltype... " >&6; }
26420 if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
26421 $as_echo_n "(cached) " >&6
26423 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
26424 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26425 included before <wchar.h>. */
26426 #include <stddef.h>
26427 #include <signal.h>
26429 # include <stdio.h>
26431 # include <wchar.h>
26434 #include <limits.h>"; then :
26440 eval gl_cv_bitsizeof_${gltype}=\$result
26443 eval ac_res=\$gl_cv_bitsizeof_${gltype}
26444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26445 $as_echo "$ac_res" >&6; }
26446 eval result=\$gl_cv_bitsizeof_${gltype}
26447 if test $result = unknown; then
26450 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26451 cat >>confdefs.h <<_ACEOF
26452 #define BITSIZEOF_${GLTYPE} $result
26455 eval BITSIZEOF_${GLTYPE}=\$result
26461 for gltype in sig_atomic_t wchar_t wint_t ; do
26462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
26463 $as_echo_n "checking whether $gltype is signed... " >&6; }
26464 if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
26465 $as_echo_n "(cached) " >&6
26467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26468 /* end confdefs.h. */
26470 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26471 included before <wchar.h>. */
26472 #include <stddef.h>
26473 #include <signal.h>
26475 # include <stdio.h>
26477 # include <wchar.h>
26480 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
26489 if ac_fn_c_try_compile "$LINENO"; then :
26494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26495 eval gl_cv_type_${gltype}_signed=\$result
26498 eval ac_res=\$gl_cv_type_${gltype}_signed
26499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26500 $as_echo "$ac_res" >&6; }
26501 eval result=\$gl_cv_type_${gltype}_signed
26502 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26503 if test "$result" = yes; then
26504 cat >>confdefs.h <<_ACEOF
26505 #define HAVE_SIGNED_${GLTYPE} 1
26508 eval HAVE_SIGNED_${GLTYPE}=1
26510 eval HAVE_SIGNED_${GLTYPE}=0
26515 gl_cv_type_ptrdiff_t_signed=yes
26516 gl_cv_type_size_t_signed=no
26517 if test $APPLE_UNIVERSAL_BUILD = 0; then
26520 for gltype in ptrdiff_t size_t ; do
26521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
26522 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
26523 if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
26524 $as_echo_n "(cached) " >&6
26526 eval gl_cv_type_${gltype}_suffix=no
26527 eval result=\$gl_cv_type_${gltype}_signed
26528 if test "$result" = yes; then
26533 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
26535 '') gltype1='int';;
26536 l) gltype1='long int';;
26537 ll) gltype1='long long int';;
26538 i64) gltype1='__int64';;
26539 u) gltype1='unsigned int';;
26540 ul) gltype1='unsigned long int';;
26541 ull) gltype1='unsigned long long int';;
26542 ui64)gltype1='unsigned __int64';;
26544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26545 /* end confdefs.h. */
26547 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26548 included before <wchar.h>. */
26549 #include <stddef.h>
26550 #include <signal.h>
26552 # include <stdio.h>
26554 # include <wchar.h>
26557 extern $gltype foo;
26558 extern $gltype1 foo;
26567 if ac_fn_c_try_compile "$LINENO"; then :
26568 eval gl_cv_type_${gltype}_suffix=\$glsuf
26570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26571 eval result=\$gl_cv_type_${gltype}_suffix
26572 test "$result" != no && break
26575 eval ac_res=\$gl_cv_type_${gltype}_suffix
26576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26577 $as_echo "$ac_res" >&6; }
26578 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26579 eval result=\$gl_cv_type_${gltype}_suffix
26580 test "$result" = no && result=
26581 eval ${GLTYPE}_SUFFIX=\$result
26582 cat >>confdefs.h <<_ACEOF
26583 #define ${GLTYPE}_SUFFIX $result
26592 for gltype in sig_atomic_t wchar_t wint_t ; do
26593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
26594 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
26595 if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
26596 $as_echo_n "(cached) " >&6
26598 eval gl_cv_type_${gltype}_suffix=no
26599 eval result=\$gl_cv_type_${gltype}_signed
26600 if test "$result" = yes; then
26605 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
26607 '') gltype1='int';;
26608 l) gltype1='long int';;
26609 ll) gltype1='long long int';;
26610 i64) gltype1='__int64';;
26611 u) gltype1='unsigned int';;
26612 ul) gltype1='unsigned long int';;
26613 ull) gltype1='unsigned long long int';;
26614 ui64)gltype1='unsigned __int64';;
26616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26617 /* end confdefs.h. */
26619 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26620 included before <wchar.h>. */
26621 #include <stddef.h>
26622 #include <signal.h>
26624 # include <stdio.h>
26626 # include <wchar.h>
26629 extern $gltype foo;
26630 extern $gltype1 foo;
26639 if ac_fn_c_try_compile "$LINENO"; then :
26640 eval gl_cv_type_${gltype}_suffix=\$glsuf
26642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26643 eval result=\$gl_cv_type_${gltype}_suffix
26644 test "$result" != no && break
26647 eval ac_res=\$gl_cv_type_${gltype}_suffix
26648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26649 $as_echo "$ac_res" >&6; }
26650 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26651 eval result=\$gl_cv_type_${gltype}_suffix
26652 test "$result" = no && result=
26653 eval ${GLTYPE}_SUFFIX=\$result
26654 cat >>confdefs.h <<_ACEOF
26655 #define ${GLTYPE}_SUFFIX $result
26666 # Code from module stdio:
26678 if test $gl_cv_have_include_next = yes; then
26679 gl_cv_next_stdio_h='<'stdio.h'>'
26681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26682 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26683 if test "${gl_cv_next_stdio_h+set}" = set; then :
26684 $as_echo_n "(cached) " >&6
26687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26688 /* end confdefs.h. */
26693 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26694 *) gl_absname_cpp="$ac_cpp" ;;
26696 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26697 sed -n '\#/stdio.h#{
26698 s#.*"\(.*/stdio.h\)".*#\1#
26706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26707 $as_echo "$gl_cv_next_stdio_h" >&6; }
26709 NEXT_STDIO_H=$gl_cv_next_stdio_h
26711 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26712 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26713 gl_next_as_first_directive='<'stdio.h'>'
26715 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26716 gl_next_as_first_directive=$gl_cv_next_stdio_h
26718 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26737 # Code from module stdlib:
26748 if test $gl_cv_have_include_next = yes; then
26749 gl_cv_next_stdlib_h='<'stdlib.h'>'
26751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26752 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26753 if test "${gl_cv_next_stdlib_h+set}" = set; then :
26754 $as_echo_n "(cached) " >&6
26757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26758 /* end confdefs.h. */
26759 #include <stdlib.h>
26763 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26764 *) gl_absname_cpp="$ac_cpp" ;;
26766 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26767 sed -n '\#/stdlib.h#{
26768 s#.*"\(.*/stdlib.h\)".*#\1#
26776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26777 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26779 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26781 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26782 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26783 gl_next_as_first_directive='<'stdlib.h'>'
26785 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26786 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26788 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26796 # Code from module stdlib-safer:
26806 M4_LIBOBJS="$M4_LIBOBJS mkstemp-safer.$ac_objext"
26809 # Code from module strchrnul:
26822 for ac_func in strchrnul
26824 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
26825 if test "x$ac_cv_func_strchrnul" = x""yes; then :
26826 cat >>confdefs.h <<_ACEOF
26827 #define HAVE_STRCHRNUL 1
26832 M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
26838 if test $ac_cv_func_strchrnul = no; then
26850 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
26854 # Code from module streq:
26855 # Code from module strerror:
26858 if test $REPLACE_STRERROR = 1; then
26867 M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
26870 cat >>confdefs.h <<_ACEOF
26871 #define REPLACE_STRERROR $REPLACE_STRERROR
26883 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26887 # Code from module string:
26891 # Code from module strndup:
26898 if test $ac_cv_have_decl_strndup = no; then
26899 HAVE_DECL_STRNDUP=0
26902 if test $ac_cv_func_strndup = yes; then
26903 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
26904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
26905 $as_echo_n "checking for working strndup... " >&6; }
26906 if test "${gl_cv_func_strndup_works+set}" = set; then :
26907 $as_echo_n "(cached) " >&6
26909 if test "$cross_compiling" = yes; then :
26912 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
26913 *) gl_cv_func_strndup_works="guessing yes";;
26917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26918 /* end confdefs.h. */
26920 #include <string.h>
26921 #include <stdlib.h>
26926 #ifndef HAVE_DECL_STRNDUP
26927 extern char *strndup (const char *, size_t);
26930 s = strndup ("some longer string", 15);
26932 s = strndup ("shorter string", 13);
26933 return s[13] != '\0';
26938 if ac_fn_c_try_run "$LINENO"; then :
26939 gl_cv_func_strndup_works=yes
26941 gl_cv_func_strndup_works=no
26943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26944 conftest.$ac_objext conftest.beam conftest.$ac_ext
26948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
26949 $as_echo "$gl_cv_func_strndup_works" >&6; }
26950 case $gl_cv_func_strndup_works in
26961 M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
26974 M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
26985 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
26989 # Code from module strnlen:
26996 if test $ac_cv_have_decl_strnlen = no; then
26997 HAVE_DECL_STRNLEN=0
26999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
27000 $as_echo_n "checking for working strnlen... " >&6; }
27001 if test "${ac_cv_func_strnlen_working+set}" = set; then :
27002 $as_echo_n "(cached) " >&6
27004 if test "$cross_compiling" = yes; then :
27005 ac_cv_func_strnlen_working=no
27007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27008 /* end confdefs.h. */
27009 $ac_includes_default
27015 #define S_LEN (sizeof S - 1)
27017 /* At least one implementation is buggy: that of AIX 4.3 would
27018 give strnlen (S, 1) == 3. */
27021 for (i = 0; i < S_LEN + 1; ++i)
27023 int expected = i <= S_LEN ? i : S_LEN;
27024 if (strnlen (S, i) != expected)
27033 if ac_fn_c_try_run "$LINENO"; then :
27034 ac_cv_func_strnlen_working=yes
27036 ac_cv_func_strnlen_working=no
27038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27039 conftest.$ac_objext conftest.beam conftest.$ac_ext
27043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
27044 $as_echo "$ac_cv_func_strnlen_working" >&6; }
27045 test $ac_cv_func_strnlen_working = no &&
27053 M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
27056 if test $ac_cv_func_strnlen_working = no; then
27060 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
27069 M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
27081 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
27085 # Code from module strsignal:
27092 if test $ac_cv_have_decl_strsignal = no; then
27093 HAVE_DECL_STRSIGNAL=0
27096 for ac_func in strsignal
27098 ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
27099 if test "x$ac_cv_func_strsignal" = x""yes; then :
27100 cat >>confdefs.h <<_ACEOF
27101 #define HAVE_STRSIGNAL 1
27107 if test $ac_cv_func_strsignal = yes; then
27108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strsignal always returns a string" >&5
27109 $as_echo_n "checking whether strsignal always returns a string... " >&6; }
27110 if test "${gl_cv_func_working_strsignal+set}" = set; then :
27111 $as_echo_n "(cached) " >&6
27113 if test "$cross_compiling" = yes; then :
27115 solaris* | aix*) gl_cv_func_working_strsignal=no;;
27116 *) gl_cv_func_working_strsignal="guessing yes";;
27119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27120 /* end confdefs.h. */
27121 #include <string.h>
27122 #include <unistd.h> /* NetBSD 5.0 declares it in wrong header. */
27128 char *s = strsignal (-1);
27129 if (s == (char *) 0)
27131 if (s == (char *) -1)
27139 if ac_fn_c_try_run "$LINENO"; then :
27140 gl_cv_func_working_strsignal=yes
27142 gl_cv_func_working_strsignal=no
27144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27145 conftest.$ac_objext conftest.beam conftest.$ac_ext
27149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strsignal" >&5
27150 $as_echo "$gl_cv_func_working_strsignal" >&6; }
27152 gl_cv_func_working_strsignal=no
27155 if test "$gl_cv_func_working_strsignal" = no; then
27156 if test $ac_cv_func_strsignal = yes; then
27157 REPLACE_STRSIGNAL=1
27167 M4_LIBOBJS="$M4_LIBOBJS strsignal.$ac_objext"
27171 ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
27173 if test "x$ac_cv_have_decl__sys_siglist" = x""yes; then :
27179 cat >>confdefs.h <<_ACEOF
27180 #define HAVE_DECL__SYS_SIGLIST $ac_have_decl
27193 $as_echo "#define GNULIB_TEST_STRSIGNAL 1" >>confdefs.h
27197 # Code from module strstr:
27200 if test $REPLACE_STRSTR = 0; then
27201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
27202 $as_echo_n "checking whether strstr works in linear time... " >&6; }
27203 if test "${gl_cv_func_strstr_linear+set}" = set; then :
27204 $as_echo_n "(cached) " >&6
27206 if test "$cross_compiling" = yes; then :
27207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27208 /* end confdefs.h. */
27210 #include <features.h>
27211 #ifdef __GNU_LIBRARY__
27212 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
27213 && !defined __UCLIBC__
27218 #include <cygwin/version.h>
27219 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
27225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27226 $EGREP "Lucky user" >/dev/null 2>&1; then :
27227 gl_cv_func_strstr_linear=yes
27229 gl_cv_func_strstr_linear="guessing no"
27235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27236 /* end confdefs.h. */
27238 #include <signal.h> /* for signal */
27239 #include <string.h> /* for strstr */
27240 #include <stdlib.h> /* for malloc */
27241 #include <unistd.h> /* for alarm */
27242 static void quit (int sig) { exit (sig + 128); }
27249 size_t m = 1000000;
27250 char *haystack = (char *) malloc (2 * m + 2);
27251 char *needle = (char *) malloc (m + 2);
27252 /* Failure to compile this test due to missing alarm is okay,
27253 since all such platforms (mingw) also have quadratic strstr. */
27254 signal (SIGALRM, quit);
27256 /* Check for quadratic performance. */
27257 if (haystack && needle)
27259 memset (haystack, 'A', 2 * m);
27260 haystack[2 * m] = 'B';
27261 haystack[2 * m + 1] = 0;
27262 memset (needle, 'A', m);
27265 if (!strstr (haystack, needle))
27274 if ac_fn_c_try_run "$LINENO"; then :
27275 gl_cv_func_strstr_linear=yes
27277 gl_cv_func_strstr_linear=no
27279 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27280 conftest.$ac_objext conftest.beam conftest.$ac_ext
27285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
27286 $as_echo "$gl_cv_func_strstr_linear" >&6; }
27287 if test "$gl_cv_func_strstr_linear" != yes; then
27291 if test $REPLACE_STRSTR = 1; then
27300 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
27304 # Code from module strstr-simple:
27308 if test "$gl_cv_func_memchr_works" != yes; then
27318 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
27321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
27322 $as_echo_n "checking whether strstr works... " >&6; }
27323 if test "${gl_cv_func_strstr_works_always+set}" = set; then :
27324 $as_echo_n "(cached) " >&6
27326 if test "$cross_compiling" = yes; then :
27327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27328 /* end confdefs.h. */
27330 #ifdef __GNU_LIBRARY__
27331 #include <features.h>
27332 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
27333 || defined __UCLIBC__
27336 #elif defined __CYGWIN__
27337 #include <cygwin/version.h>
27338 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
27346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27347 $EGREP "Lucky user" >/dev/null 2>&1; then :
27348 gl_cv_func_strstr_works_always=yes
27350 gl_cv_func_strstr_works_always="guessing no"
27356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27357 /* end confdefs.h. */
27359 #include <string.h> /* for strstr */
27360 #define P "_EF_BF_BD"
27361 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
27362 #define NEEDLE P P P P P
27367 return !!strstr (HAYSTACK, NEEDLE);
27373 if ac_fn_c_try_run "$LINENO"; then :
27374 gl_cv_func_strstr_works_always=yes
27376 gl_cv_func_strstr_works_always=no
27378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27379 conftest.$ac_objext conftest.beam conftest.$ac_ext
27384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
27385 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
27386 if test "$gl_cv_func_strstr_works_always" != yes; then
27396 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
27408 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
27412 # Code from module strtod:
27416 if test $ac_cv_have_decl_strtod != yes; then
27419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
27420 $as_echo_n "checking whether strtod obeys C99... " >&6; }
27421 if test "${gl_cv_func_strtod_works+set}" = set; then :
27422 $as_echo_n "(cached) " >&6
27424 if test "$cross_compiling" = yes; then :
27425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27426 /* end confdefs.h. */
27428 #include <features.h>
27429 #ifdef __GNU_LIBRARY__
27430 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)) \
27431 && !defined __UCLIBC__
27437 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27438 $EGREP "Lucky user" >/dev/null 2>&1; then :
27439 gl_cv_func_strtod_works=yes
27441 gl_cv_func_strtod_works="guessing no"
27446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27447 /* end confdefs.h. */
27449 #include <stdlib.h>
27452 /* Compare two numbers with ==.
27453 This is a separate function because IRIX 6.5 "cc -O" miscompiles an
27456 numeric_equal (double x, double y)
27467 /* In some old versions of Linux (2000 or before), strtod mis-parses
27468 strings with leading '+'. */
27469 const char *string = " +69";
27471 double value = strtod (string, &term);
27472 if (value != 69 || term != (string + 4))
27476 /* Under Solaris 2.4, strtod returns the wrong value for the
27477 terminating character under some conditions. */
27478 const char *string = "NaN";
27480 strtod (string, &term);
27481 if (term != string && *(term - 1) == 0)
27485 /* Older glibc and Cygwin mis-parse "-0x". */
27486 const char *string = "-0x";
27488 double value = strtod (string, &term);
27490 if (1.0 / value != -1.0 / zero || term != (string + 2))
27494 /* Many platforms do not parse hex floats. */
27495 const char *string = "0XaP+1";
27497 double value = strtod (string, &term);
27498 if (value != 20.0 || term != (string + 6))
27502 /* Many platforms do not parse infinities. HP-UX 11.31 parses inf,
27503 but mistakenly sets errno. */
27504 const char *string = "inf";
27508 value = strtod (string, &term);
27509 if (value != HUGE_VAL || term != (string + 3) || errno)
27513 /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */
27514 const char *string = "nan()";
27516 double value = strtod (string, &term);
27517 if (numeric_equal (value, value) || term != (string + 5))
27521 /* darwin 10.6.1 misparses "nan(". */
27522 const char *string = "nan(";
27524 double value = strtod (string, &term);
27525 if (numeric_equal (value, value) || term != (string + 3))
27534 if ac_fn_c_try_run "$LINENO"; then :
27535 gl_cv_func_strtod_works=yes
27537 gl_cv_func_strtod_works=no
27539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27540 conftest.$ac_objext conftest.beam conftest.$ac_ext
27544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
27545 $as_echo "$gl_cv_func_strtod_works" >&6; }
27546 if test "$gl_cv_func_strtod_works" != yes; then
27550 if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
27559 M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
27563 if test $gl_cv_func_ldexp_no_libm = yes; then
27565 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
27578 $as_echo "#define GNULIB_TEST_STRTOD 1" >>confdefs.h
27582 # Code from module strtol:
27592 for ac_func in strtol
27594 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
27595 if test "x$ac_cv_func_strtol" = x""yes; then :
27596 cat >>confdefs.h <<_ACEOF
27597 #define HAVE_STRTOL 1
27602 M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
27609 # Code from module sys_stat:
27626 if test $gl_cv_have_include_next = yes; then
27627 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27630 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27631 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
27632 $as_echo_n "(cached) " >&6
27635 if test $ac_cv_header_sys_stat_h = yes; then
27638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27639 /* end confdefs.h. */
27640 #include <sys/stat.h>
27644 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27645 *) gl_absname_cpp="$ac_cpp" ;;
27647 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27648 sed -n '\#/sys/stat.h#{
27649 s#.*"\(.*/sys/stat.h\)".*#\1#
27655 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27661 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
27663 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
27665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27667 gl_next_as_first_directive='<'sys/stat.h'>'
27669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27670 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27672 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
27678 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27679 #include <sys/stat.h>
27681 if test "x$ac_cv_type_nlink_t" = x""yes; then :
27685 $as_echo "#define nlink_t int" >>confdefs.h
27693 # Code from module sys_time:
27698 # Code from module sys_wait:
27711 if test $gl_cv_have_include_next = yes; then
27712 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
27714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
27715 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
27716 if test "${gl_cv_next_sys_wait_h+set}" = set; then :
27717 $as_echo_n "(cached) " >&6
27720 if test $ac_cv_header_sys_wait_h = yes; then
27723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27724 /* end confdefs.h. */
27725 #include <sys/wait.h>
27729 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27730 *) gl_absname_cpp="$ac_cpp" ;;
27732 gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27733 sed -n '\#/sys/wait.h#{
27734 s#.*"\(.*/sys/wait.h\)".*#\1#
27740 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
27745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
27746 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
27748 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
27750 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27751 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27752 gl_next_as_first_directive='<'sys/wait.h'>'
27754 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27755 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
27757 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
27766 # Code from module tempname:
27778 M4_LIBOBJS="$M4_LIBOBJS tempname.$ac_objext"
27784 # Code from module threadlib:
27789 # Code from module time:
27793 # Code from module tls:
27797 # Code from module tmpdir:
27799 for ac_func in __secure_getenv
27801 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
27802 if test "x$ac_cv_func___secure_getenv" = x""yes; then :
27803 cat >>confdefs.h <<_ACEOF
27804 #define HAVE___SECURE_GETENV 1
27811 # Code from module unistd:
27825 if test $gl_cv_have_include_next = yes; then
27826 gl_cv_next_unistd_h='<'unistd.h'>'
27828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27829 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27830 if test "${gl_cv_next_unistd_h+set}" = set; then :
27831 $as_echo_n "(cached) " >&6
27834 if test $ac_cv_header_unistd_h = yes; then
27837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27838 /* end confdefs.h. */
27839 #include <unistd.h>
27843 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27844 *) gl_absname_cpp="$ac_cpp" ;;
27846 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27847 sed -n '\#/unistd.h#{
27848 s#.*"\(.*/unistd.h\)".*#\1#
27854 gl_cv_next_unistd_h='<'unistd.h'>'
27859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27860 $as_echo "$gl_cv_next_unistd_h" >&6; }
27862 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27864 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27865 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27866 gl_next_as_first_directive='<'unistd.h'>'
27868 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27869 gl_next_as_first_directive=$gl_cv_next_unistd_h
27871 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27876 if test $ac_cv_header_unistd_h = yes; then
27885 # Code from module unistd-safer:
27896 M4_LIBOBJS="$M4_LIBOBJS dup-safer.$ac_objext"
27906 M4_LIBOBJS="$M4_LIBOBJS fd-safer.$ac_objext"
27916 M4_LIBOBJS="$M4_LIBOBJS pipe-safer.$ac_objext"
27919 # Code from module unlocked-io:
27922 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
27941 # Code from module update-copyright:
27942 # Code from module useless-if-before-free:
27943 # Code from module vasnprintf:
27946 if test $ac_cv_func_vasnprintf = no; then
27957 M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
27967 M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
27977 M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
27987 M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
27989 if test $ac_cv_func_vasnprintf = yes; then
27991 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28005 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28006 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
28010 $as_echo "#define ptrdiff_t long" >>confdefs.h
28023 # Code from module vasprintf:
28025 for ac_func in vasprintf
28027 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
28028 if test "x$ac_cv_func_vasprintf" = x""yes; then :
28029 cat >>confdefs.h <<_ACEOF
28030 #define HAVE_VASPRINTF 1
28036 if test $ac_cv_func_vasprintf = no; then
28046 M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
28056 M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
28059 if test $ac_cv_func_vasprintf = yes; then
28060 REPLACE_VASPRINTF=1
28081 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
28087 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
28091 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
28093 # Code from module vasprintf-posix:
28109 gl_cv_func_vasprintf_posix=no
28110 for ac_func in vasprintf
28112 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
28113 if test "x$ac_cv_func_vasprintf" = x""yes; then :
28114 cat >>confdefs.h <<_ACEOF
28115 #define HAVE_VASPRINTF 1
28121 case "$gl_cv_func_printf_sizes_c99" in
28123 case "$gl_cv_func_printf_long_double" in
28125 case "$gl_cv_func_printf_infinite" in
28127 case "$gl_cv_func_printf_infinite_long_double" in
28129 case "$gl_cv_func_printf_directive_a" in
28131 case "$gl_cv_func_printf_directive_f" in
28133 case "$gl_cv_func_printf_directive_n" in
28135 case "$gl_cv_func_printf_directive_ls" in
28137 case "$gl_cv_func_printf_positions" in
28139 case "$gl_cv_func_printf_flag_grouping" in
28141 case "$gl_cv_func_printf_flag_leftadjust" in
28143 case "$gl_cv_func_printf_flag_zero" in
28145 case "$gl_cv_func_printf_precision" in
28147 case "$gl_cv_func_printf_enomem" in
28149 if test $ac_cv_func_vasprintf = yes; then
28150 # vasprintf exists and is
28151 # already POSIX compliant.
28152 gl_cv_func_vasprintf_posix=yes
28182 if test $gl_cv_func_vasprintf_posix = no; then
28186 case "$gl_cv_func_printf_infinite" in
28191 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
28199 case "$gl_cv_func_printf_long_double" in
28201 case "$gl_cv_func_printf_infinite_long_double" in
28206 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
28215 case "$gl_cv_func_printf_directive_a" in
28220 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
28222 for ac_func in nl_langinfo
28224 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
28225 if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
28226 cat >>confdefs.h <<_ACEOF
28227 #define HAVE_NL_LANGINFO 1
28238 case "$gl_cv_func_printf_directive_f" in
28243 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
28250 case "$gl_cv_func_printf_directive_ls" in
28255 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
28262 case "$gl_cv_func_printf_flag_grouping" in
28267 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
28274 case "$gl_cv_func_printf_flag_leftadjust" in
28279 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
28286 case "$gl_cv_func_printf_flag_zero" in
28291 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
28298 case "$gl_cv_func_printf_precision" in
28303 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
28306 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
28309 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28316 case "$gl_cv_func_printf_enomem" in
28321 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
28324 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
28327 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28342 M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
28352 M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
28362 M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
28372 M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
28374 if test $ac_cv_func_vasnprintf = yes; then
28376 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28390 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28391 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
28395 $as_echo "#define ptrdiff_t long" >>confdefs.h
28415 M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
28425 M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
28428 if test $ac_cv_func_vasprintf = yes; then
28429 REPLACE_VASPRINTF=1
28443 # Code from module vc-list-files:
28444 # Code from module verify:
28445 # Code from module verror:
28448 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
28452 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
28454 # Code from module version-etc:
28456 # Check whether --with-packager was given.
28457 if test "${with_packager+set}" = set; then :
28458 withval=$with_packager; case $withval in
28461 cat >>confdefs.h <<_ACEOF
28462 #define PACKAGE_PACKAGER "$withval"
28471 # Check whether --with-packager-version was given.
28472 if test "${with_packager_version+set}" = set; then :
28473 withval=$with_packager_version; case $withval in
28476 cat >>confdefs.h <<_ACEOF
28477 #define PACKAGE_PACKAGER_VERSION "$withval"
28486 # Check whether --with-packager-bug-reports was given.
28487 if test "${with_packager_bug_reports+set}" = set; then :
28488 withval=$with_packager_bug_reports; case $withval in
28491 cat >>confdefs.h <<_ACEOF
28492 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
28500 if test "X$with_packager" = "X" && \
28501 test "X$with_packager_version$with_packager_bug_reports" != "X"
28503 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
28506 # Code from module version-etc-fsf:
28507 # Code from module wait-process:
28511 for ac_func in waitid
28513 ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
28514 if test "x$ac_cv_func_waitid" = x""yes; then :
28515 cat >>confdefs.h <<_ACEOF
28516 #define HAVE_WAITID 1
28523 # Code from module waitpid:
28536 M4_LIBOBJS="$M4_LIBOBJS waitpid.$ac_objext"
28548 $as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
28552 # Code from module warn-on-use:
28553 # Code from module warnings:
28555 # Code from module wchar:
28568 if test $gl_cv_have_include_next = yes; then
28569 gl_cv_next_wchar_h='<'wchar.h'>'
28571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
28572 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
28573 if test "${gl_cv_next_wchar_h+set}" = set; then :
28574 $as_echo_n "(cached) " >&6
28577 if test $ac_cv_header_wchar_h = yes; then
28580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28581 /* end confdefs.h. */
28586 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28587 *) gl_absname_cpp="$ac_cpp" ;;
28589 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28590 sed -n '\#/wchar.h#{
28591 s#.*"\(.*/wchar.h\)".*#\1#
28597 gl_cv_next_wchar_h='<'wchar.h'>'
28602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
28603 $as_echo "$gl_cv_next_wchar_h" >&6; }
28605 NEXT_WCHAR_H=$gl_cv_next_wchar_h
28607 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28608 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28609 gl_next_as_first_directive='<'wchar.h'>'
28611 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28612 gl_next_as_first_directive=$gl_cv_next_wchar_h
28614 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
28619 if test $ac_cv_header_wchar_h = yes; then
28629 if test $gt_cv_c_wint_t = yes; then
28638 # Code from module wcrtomb:
28649 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
28653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
28654 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
28655 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
28656 $as_echo_n "(cached) " >&6
28660 # Guess no on AIX and OSF/1.
28661 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
28662 # Guess yes otherwise.
28663 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
28665 if test $LOCALE_JA != none; then
28666 if test "$cross_compiling" = yes; then :
28669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28670 /* end confdefs.h. */
28672 #include <locale.h>
28673 #include <string.h>
28674 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
28676 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
28677 included before <wchar.h>. */
28678 #include <stddef.h>
28684 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28686 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28690 memset (&state, '\0', sizeof (mbstate_t));
28691 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28692 if (mbsinit (&state))
28698 if ac_fn_c_try_run "$LINENO"; then :
28699 gl_cv_func_mbrtowc_incomplete_state=yes
28701 gl_cv_func_mbrtowc_incomplete_state=no
28703 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28704 conftest.$ac_objext conftest.beam conftest.$ac_ext
28710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
28711 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
28716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
28717 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
28718 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
28719 $as_echo_n "(cached) " >&6
28723 # Guess no on Solaris 8.
28724 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
28725 # Guess yes otherwise.
28726 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
28728 if test $LOCALE_ZH_CN != none; then
28729 if test "$cross_compiling" = yes; then :
28732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28733 /* end confdefs.h. */
28735 #include <locale.h>
28736 #include <stdlib.h>
28737 #include <string.h>
28738 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
28740 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
28741 included before <wchar.h>. */
28742 #include <stddef.h>
28748 /* This fails on Solaris 8:
28749 mbrtowc returns 2, and sets wc to 0x00F0.
28750 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
28751 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28753 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
28757 memset (&state, '\0', sizeof (mbstate_t));
28758 if (mbrtowc (&wc, input + 3, 6, &state) != 4
28759 && mbtowc (&wc, input + 3, 6) == 4)
28765 if ac_fn_c_try_run "$LINENO"; then :
28766 gl_cv_func_mbrtowc_sanitycheck=yes
28768 gl_cv_func_mbrtowc_sanitycheck=no
28770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28771 conftest.$ac_objext conftest.beam conftest.$ac_ext
28777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
28778 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
28780 REPLACE_MBSTATE_T=0
28781 case "$gl_cv_func_mbrtowc_incomplete_state" in
28783 *) REPLACE_MBSTATE_T=1 ;;
28785 case "$gl_cv_func_mbrtowc_sanitycheck" in
28787 *) REPLACE_MBSTATE_T=1 ;;
28790 REPLACE_MBSTATE_T=1
28792 if test $REPLACE_MBSTATE_T = 1; then
28800 if test $ac_cv_func_wcrtomb = no; then
28803 if test $REPLACE_MBSTATE_T = 1; then
28811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
28812 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
28813 if test "${gl_cv_func_wcrtomb_retval+set}" = set; then :
28814 $as_echo_n "(cached) " >&6
28818 # Guess no on AIX 4, OSF/1 and Solaris.
28819 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
28820 # Guess yes otherwise.
28821 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
28823 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
28824 if test "$cross_compiling" = yes; then :
28827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28828 /* end confdefs.h. */
28830 #include <locale.h>
28831 #include <string.h>
28832 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
28834 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
28835 included before <wchar.h>. */
28836 #include <stddef.h>
28843 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
28845 if (wcrtomb (NULL, 0, NULL) != 1)
28848 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28850 if (wcrtomb (NULL, 0, NULL) != 1)
28853 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28855 if (wcrtomb (NULL, 0, NULL) != 1)
28858 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28860 if (wcrtomb (NULL, 0, NULL) != 1)
28866 if ac_fn_c_try_run "$LINENO"; then :
28867 gl_cv_func_wcrtomb_retval=yes
28869 gl_cv_func_wcrtomb_retval=no
28871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28872 conftest.$ac_objext conftest.beam conftest.$ac_ext
28878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
28879 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
28880 case "$gl_cv_func_wcrtomb_retval" in
28882 *) REPLACE_WCRTOMB=1 ;;
28886 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
28898 M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
28912 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
28916 # Code from module wctype-h:
28922 if test $ac_cv_func_iswcntrl = yes; then
28932 if test $gt_cv_c_wint_t = yes; then
28948 if test $gl_cv_have_include_next = yes; then
28949 gl_cv_next_wctype_h='<'wctype.h'>'
28951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
28952 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
28953 if test "${gl_cv_next_wctype_h+set}" = set; then :
28954 $as_echo_n "(cached) " >&6
28957 if test $ac_cv_header_wctype_h = yes; then
28960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28961 /* end confdefs.h. */
28962 #include <wctype.h>
28966 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28967 *) gl_absname_cpp="$ac_cpp" ;;
28969 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28970 sed -n '\#/wctype.h#{
28971 s#.*"\(.*/wctype.h\)".*#\1#
28977 gl_cv_next_wctype_h='<'wctype.h'>'
28982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
28983 $as_echo "$gl_cv_next_wctype_h" >&6; }
28985 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
28987 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28988 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28989 gl_next_as_first_directive='<'wctype.h'>'
28991 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28992 gl_next_as_first_directive=$gl_cv_next_wctype_h
28994 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
28999 if test $ac_cv_header_wctype_h = yes; then
29000 if test $ac_cv_func_iswcntrl = yes; then
29001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
29002 $as_echo_n "checking whether iswcntrl works... " >&6; }
29003 if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
29004 $as_echo_n "(cached) " >&6
29007 if test "$cross_compiling" = yes; then :
29008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29009 /* end confdefs.h. */
29010 #include <stdlib.h>
29011 #if __GNU_LIBRARY__ == 1
29012 Linux libc5 i18n is broken.
29022 if ac_fn_c_try_compile "$LINENO"; then :
29023 gl_cv_func_iswcntrl_works=yes
29025 gl_cv_func_iswcntrl_works=no
29027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29031 /* end confdefs.h. */
29033 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29034 included before <wchar.h>.
29035 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29036 must be included before <wchar.h>. */
29037 #include <stddef.h>
29041 #include <wctype.h>
29042 int main () { return iswprint ('x') == 0; }
29045 if ac_fn_c_try_run "$LINENO"; then :
29046 gl_cv_func_iswcntrl_works=yes
29048 gl_cv_func_iswcntrl_works=no
29050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29051 conftest.$ac_objext conftest.beam conftest.$ac_ext
29056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
29057 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
29065 if test "$gl_cv_func_iswcntrl_works" = no; then
29072 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
29076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
29077 $as_echo_n "checking for wctype_t... " >&6; }
29078 if test "${gl_cv_type_wctype_t+set}" = set; then :
29079 $as_echo_n "(cached) " >&6
29081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29082 /* end confdefs.h. */
29083 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29084 included before <wchar.h>.
29085 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29086 must be included before <wchar.h>. */
29087 #include <stddef.h>
29092 # include <wctype.h>
29104 if ac_fn_c_try_compile "$LINENO"; then :
29105 gl_cv_type_wctype_t=yes
29107 gl_cv_type_wctype_t=no
29109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
29113 $as_echo "$gl_cv_type_wctype_t" >&6; }
29114 if test $gl_cv_type_wctype_t = no; then
29118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
29119 $as_echo_n "checking for wctrans_t... " >&6; }
29120 if test "${gl_cv_type_wctrans_t+set}" = set; then :
29121 $as_echo_n "(cached) " >&6
29123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29124 /* end confdefs.h. */
29125 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29126 included before <wchar.h>.
29127 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29128 must be included before <wchar.h>. */
29129 #include <stddef.h>
29133 #include <wctype.h>
29144 if ac_fn_c_try_compile "$LINENO"; then :
29145 gl_cv_type_wctrans_t=yes
29147 gl_cv_type_wctrans_t=no
29149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
29153 $as_echo "$gl_cv_type_wctrans_t" >&6; }
29154 if test $gl_cv_type_wctrans_t = no; then
29160 # Code from module xalloc:
29170 M4_LIBOBJS="$M4_LIBOBJS xmalloc.$ac_objext"
29181 # Code from module xalloc-die:
29182 # Code from module xlist:
29186 # Code from module xmalloca:
29187 # Code from module xoset:
29191 # Code from module xprintf:
29194 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
29198 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
29202 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
29206 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
29208 # Code from module xsize:
29212 for ac_header in stdint.h
29214 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29215 if test "x$ac_cv_header_stdint_h" = x""yes; then :
29216 cat >>confdefs.h <<_ACEOF
29217 #define HAVE_STDINT_H 1
29225 # Code from module xstrndup:
29231 # Code from module xvasprintf:
29237 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
29239 # Code from module xvasprintf-posix:
29240 # End of code from modules
29261 gl_source_base='tests'
29262 M4tests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
29264 gl_module_indicator_condition=$M4tests_WITNESS
29269 if test "$CXX_CHOICE" = no; then
29272 if test -z "$CXX"; then
29273 if test -n "$CCC"; then
29276 if test -n "$ac_tool_prefix"; then
29277 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
29279 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29280 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29282 $as_echo_n "checking for $ac_word... " >&6; }
29283 if test "${ac_cv_prog_CXX+set}" = set; then :
29284 $as_echo_n "(cached) " >&6
29286 if test -n "$CXX"; then
29287 ac_cv_prog_CXX="$CXX" # Let the user override the test.
29289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29290 for as_dir in $PATH
29293 test -z "$as_dir" && as_dir=.
29294 for ac_exec_ext in '' $ac_executable_extensions; do
29295 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29296 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
29297 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29306 CXX=$ac_cv_prog_CXX
29307 if test -n "$CXX"; then
29308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
29309 $as_echo "$CXX" >&6; }
29311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29312 $as_echo "no" >&6; }
29316 test -n "$CXX" && break
29319 if test -z "$CXX"; then
29321 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
29323 # Extract the first word of "$ac_prog", so it can be a program name with args.
29324 set dummy $ac_prog; ac_word=$2
29325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29326 $as_echo_n "checking for $ac_word... " >&6; }
29327 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
29328 $as_echo_n "(cached) " >&6
29330 if test -n "$ac_ct_CXX"; then
29331 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
29333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29334 for as_dir in $PATH
29337 test -z "$as_dir" && as_dir=.
29338 for ac_exec_ext in '' $ac_executable_extensions; do
29339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29340 ac_cv_prog_ac_ct_CXX="$ac_prog"
29341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29350 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
29351 if test -n "$ac_ct_CXX"; then
29352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
29353 $as_echo "$ac_ct_CXX" >&6; }
29355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29356 $as_echo "no" >&6; }
29360 test -n "$ac_ct_CXX" && break
29363 if test "x$ac_ct_CXX" = x; then
29366 case $cross_compiling:$ac_tool_warned in
29368 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29369 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29370 ac_tool_warned=yes ;;
29378 if test "$CXX" != ":"; then
29379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
29380 $as_echo_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
29382 ac_cpp='$CXXCPP $CPPFLAGS'
29383 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29384 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29385 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29389 echo 'int main () { return 0; }' > conftest.$ac_ext
29390 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29391 (eval $ac_link) 2>&5
29393 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29394 test $ac_status = 0; } && test -s conftest$ac_exeext; then
29395 gl_cv_prog_ansicxx_works=yes
29396 if (./conftest; exit) 2>/dev/null; then
29397 gl_cv_prog_ansicxx_cross=no
29399 gl_cv_prog_ansicxx_cross=yes
29402 gl_cv_prog_ansicxx_works=no
29406 ac_cpp='$CPP $CPPFLAGS'
29407 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29408 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29409 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
29412 $as_echo "$gl_cv_prog_ansicxx_works" >&6; }
29413 if test $gl_cv_prog_ansicxx_works = no; then
29416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
29417 $as_echo_n "checking whether the C++ compiler supports namespaces... " >&6; }
29419 ac_cpp='$CXXCPP $CPPFLAGS'
29420 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29421 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29422 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29424 cat <<EOF > conftest.$ac_ext
29425 #include <iostream>
29426 namespace test { using namespace std; }
29428 int main () { return 0; }
29430 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29431 (eval $ac_link) 2>&5
29433 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29434 test $ac_status = 0; } && test -s conftest$ac_exeext; then
29435 gl_cv_prog_ansicxx_namespaces=yes
29437 gl_cv_prog_ansicxx_namespaces=no
29441 ac_cpp='$CPP $CPPFLAGS'
29442 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29443 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29444 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
29447 $as_echo "$gl_cv_prog_ansicxx_namespaces" >&6; }
29448 if test $gl_cv_prog_ansicxx_namespaces = no; then
29456 if test "$CXX" != ":"; then
29465 if test "$CXX" != ":"; then
29467 depcc="$CXX" am_compiler_list=
29469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
29470 $as_echo_n "checking dependency style of $depcc... " >&6; }
29471 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
29472 $as_echo_n "(cached) " >&6
29474 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
29475 # We make a subdir and do the tests there. Otherwise we can end up
29476 # making bogus files that we don't know about and never remove. For
29477 # instance it was reported that on HP-UX the gcc test will end up
29478 # making a dummy file named `D' -- because `-MD' means `put the output
29481 # Copy depcomp to subdir because otherwise we won't find it if we're
29482 # using a relative directory.
29483 cp "$am_depcomp" conftest.dir
29485 # We will build objects and dependencies in a subdirectory because
29486 # it helps to detect inapplicable dependency modes. For instance
29487 # both Tru64's cc and ICC support -MD to output dependencies as a
29488 # side effect of compilation, but ICC will put the dependencies in
29489 # the current directory while Tru64 will put them in the object
29493 am_cv_CXX_dependencies_compiler_type=none
29494 if test "$am_compiler_list" = ""; then
29495 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
29497 am__universal=false
29498 case " $depcc " in #(
29499 *\ -arch\ *\ -arch\ *) am__universal=true ;;
29502 for depmode in $am_compiler_list; do
29503 # Setup a source with many dependencies, because some compilers
29504 # like to wrap large dependency lists on column 80 (with \), and
29505 # we should not choose a depcomp mode which is confused by this.
29507 # We need to recreate these files for each test, as the compiler may
29508 # overwrite some of them when testing with obscure command lines.
29509 # This happens at least with the AIX C compiler.
29511 for i in 1 2 3 4 5 6; do
29512 echo '#include "conftst'$i'.h"' >> sub/conftest.c
29513 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
29514 # Solaris 8's {/usr,}/bin/sh.
29515 touch sub/conftst$i.h
29517 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
29519 # We check with `-c' and `-o' for the sake of the "dashmstdout"
29520 # mode. It turns out that the SunPro C++ compiler does not properly
29521 # handle `-M -o', and we need to detect this. Also, some Intel
29522 # versions had trouble with output in subdirs
29523 am__obj=sub/conftest.${OBJEXT-o}
29524 am__minus_obj="-o $am__obj"
29527 # This depmode causes a compiler race in universal mode.
29528 test "$am__universal" = false || continue
29531 # after this tag, mechanisms are not by side-effect, so they'll
29532 # only be used when explicitly requested
29533 if test "x$enable_dependency_tracking" = xyes; then
29539 msvisualcpp | msvcmsys)
29540 # This compiler won't grok `-c -o', but also, the minuso test has
29541 # not run yet. These depmodes are late enough in the game, and
29542 # so weak that their functioning should not be impacted.
29543 am__obj=conftest.${OBJEXT-o}
29548 if depmode=$depmode \
29549 source=sub/conftest.c object=$am__obj \
29550 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
29551 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
29552 >/dev/null 2>conftest.err &&
29553 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
29554 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
29555 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
29556 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
29557 # icc doesn't choke on unknown options, it will just issue warnings
29558 # or remarks (even with -Werror). So we grep stderr for any message
29559 # that says an option was ignored or not supported.
29560 # When given -MP, icc 7.0 and 7.1 complain thusly:
29561 # icc: Command line warning: ignoring option '-M'; no argument required
29562 # The diagnosis changed in icc 8.0:
29563 # icc: Command line remark: option '-MP' not supported
29564 if (grep 'ignoring option' conftest.err ||
29565 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
29566 am_cv_CXX_dependencies_compiler_type=$depmode
29573 rm -rf conftest.dir
29575 am_cv_CXX_dependencies_compiler_type=none
29579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
29580 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
29581 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
29584 test "x$enable_dependency_tracking" != xno \
29585 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
29586 am__fastdepCXX_TRUE=
29587 am__fastdepCXX_FALSE='#'
29589 am__fastdepCXX_TRUE='#'
29590 am__fastdepCXX_FALSE=
29596 am__fastdepCXX_TRUE=
29597 am__fastdepCXX_FALSE='#'
29599 am__fastdepCXX_TRUE='#'
29600 am__fastdepCXX_FALSE=
29608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
29609 $as_echo_n "checking for a traditional french locale... " >&6; }
29610 if test "${gt_cv_locale_fr+set}" = set; then :
29611 $as_echo_n "(cached) " >&6
29614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29615 /* end confdefs.h. */
29617 #include <locale.h>
29619 #if HAVE_LANGINFO_CODESET
29620 # include <langinfo.h>
29622 #include <stdlib.h>
29623 #include <string.h>
29627 /* Check whether the given locale name is recognized by the system. */
29628 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29629 /* On native Win32, setlocale(category, "") looks at the system settings,
29630 not at the environment variables. Also, when an encoding suffix such
29631 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
29632 category of the locale to "C". */
29633 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29634 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29637 if (setlocale (LC_ALL, "") == NULL) return 1;
29639 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29640 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29641 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29642 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29643 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29644 some unit tests fail.
29645 On MirBSD 10, when an unsupported locale is specified, setlocale()
29646 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
29647 #if HAVE_LANGINFO_CODESET
29649 const char *cs = nl_langinfo (CODESET);
29650 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
29651 || strcmp (cs, "UTF-8") == 0)
29656 /* On Cygwin, avoid locale names without encoding suffix, because the
29657 locale_charset() function relies on the encoding suffix. Note that
29658 LC_ALL is set on the command line. */
29659 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29661 /* Check whether in the abbreviation of the second month, the second
29662 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
29663 one byte long. This excludes the UTF-8 encoding. */
29664 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29665 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
29666 /* Check whether the decimal separator is a comma.
29667 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29668 are nl_langinfo(RADIXCHAR) are both ".". */
29669 if (localeconv () ->decimal_point[0] != ',') return 1;
29674 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29675 (eval $ac_link) 2>&5
29677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29678 test $ac_status = 0; } && test -s conftest$ac_exeext; then
29680 # Handle native Windows specially, because there setlocale() interprets
29681 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29682 # "fr" or "fra" as "French" or "French_France.1252",
29683 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29684 # "ja" as "Japanese" or "Japanese_Japan.932",
29687 # Test for the native Win32 locale name.
29688 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29689 gt_cv_locale_fr=French_France.1252
29692 gt_cv_locale_fr=none
29696 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29697 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
29698 # configure script would override the LC_ALL setting. Likewise for
29699 # LC_CTYPE, which is also set at the beginning of the configure script.
29700 # Test for the usual locale name.
29701 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29702 gt_cv_locale_fr=fr_FR
29704 # Test for the locale name with explicit encoding suffix.
29705 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29706 gt_cv_locale_fr=fr_FR.ISO-8859-1
29708 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
29709 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29710 gt_cv_locale_fr=fr_FR.ISO8859-1
29712 # Test for the HP-UX locale name.
29713 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29714 gt_cv_locale_fr=fr_FR.iso88591
29716 # Test for the Solaris 7 locale name.
29717 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29721 gt_cv_locale_fr=none
29733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
29734 $as_echo "$gt_cv_locale_fr" >&6; }
29735 LOCALE_FR=$gt_cv_locale_fr
29740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
29741 $as_echo_n "checking for a french Unicode locale... " >&6; }
29742 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
29743 $as_echo_n "(cached) " >&6
29746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29747 /* end confdefs.h. */
29749 #include <locale.h>
29751 #if HAVE_LANGINFO_CODESET
29752 # include <langinfo.h>
29754 #include <stdlib.h>
29755 #include <string.h>
29759 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
29760 imitates locale dependent behaviour by looking at the environment
29761 variables, and all locales use the UTF-8 encoding. */
29762 #if !(defined __BEOS__ || defined __HAIKU__)
29763 /* Check whether the given locale name is recognized by the system. */
29764 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29765 /* On native Win32, setlocale(category, "") looks at the system settings,
29766 not at the environment variables. Also, when an encoding suffix such
29767 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
29768 category of the locale to "C". */
29769 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29770 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29773 if (setlocale (LC_ALL, "") == NULL) return 1;
29775 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29776 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29777 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29778 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29779 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29780 some unit tests fail. */
29781 # if HAVE_LANGINFO_CODESET
29783 const char *cs = nl_langinfo (CODESET);
29784 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
29789 /* On Cygwin, avoid locale names without encoding suffix, because the
29790 locale_charset() function relies on the encoding suffix. Note that
29791 LC_ALL is set on the command line. */
29792 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29794 /* Check whether in the abbreviation of the second month, the second
29795 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
29796 two bytes long, with UTF-8 encoding. */
29797 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29798 if (strftime (buf, sizeof (buf), "%b", &t) < 4
29799 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
29802 /* Check whether the decimal separator is a comma.
29803 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29804 are nl_langinfo(RADIXCHAR) are both ".". */
29805 if (localeconv () ->decimal_point[0] != ',') return 1;
29810 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29811 (eval $ac_link) 2>&5
29813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29814 test $ac_status = 0; } && test -s conftest$ac_exeext; then
29816 # Handle native Windows specially, because there setlocale() interprets
29817 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29818 # "fr" or "fra" as "French" or "French_France.1252",
29819 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29820 # "ja" as "Japanese" or "Japanese_Japan.932",
29823 # Test for the hypothetical native Win32 locale name.
29824 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29825 gt_cv_locale_fr_utf8=French_France.65001
29828 gt_cv_locale_fr_utf8=none
29832 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29833 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
29834 # configure script would override the LC_ALL setting. Likewise for
29835 # LC_CTYPE, which is also set at the beginning of the configure script.
29836 # Test for the usual locale name.
29837 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29838 gt_cv_locale_fr_utf8=fr_FR
29840 # Test for the locale name with explicit encoding suffix.
29841 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29842 gt_cv_locale_fr_utf8=fr_FR.UTF-8
29844 # Test for the Solaris 7 locale name.
29845 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29846 gt_cv_locale_fr_utf8=fr.UTF-8
29849 gt_cv_locale_fr_utf8=none
29859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
29860 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
29861 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
29867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
29868 $as_echo_n "checking for a traditional french locale... " >&6; }
29869 if test "${gt_cv_locale_fr+set}" = set; then :
29870 $as_echo_n "(cached) " >&6
29873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29874 /* end confdefs.h. */
29876 #include <locale.h>
29878 #if HAVE_LANGINFO_CODESET
29879 # include <langinfo.h>
29881 #include <stdlib.h>
29882 #include <string.h>
29886 /* Check whether the given locale name is recognized by the system. */
29887 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29888 /* On native Win32, setlocale(category, "") looks at the system settings,
29889 not at the environment variables. Also, when an encoding suffix such
29890 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
29891 category of the locale to "C". */
29892 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29893 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29896 if (setlocale (LC_ALL, "") == NULL) return 1;
29898 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29899 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29900 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29901 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29902 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29903 some unit tests fail.
29904 On MirBSD 10, when an unsupported locale is specified, setlocale()
29905 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
29906 #if HAVE_LANGINFO_CODESET
29908 const char *cs = nl_langinfo (CODESET);
29909 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
29910 || strcmp (cs, "UTF-8") == 0)
29915 /* On Cygwin, avoid locale names without encoding suffix, because the
29916 locale_charset() function relies on the encoding suffix. Note that
29917 LC_ALL is set on the command line. */
29918 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29920 /* Check whether in the abbreviation of the second month, the second
29921 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
29922 one byte long. This excludes the UTF-8 encoding. */
29923 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29924 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
29925 /* Check whether the decimal separator is a comma.
29926 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29927 are nl_langinfo(RADIXCHAR) are both ".". */
29928 if (localeconv () ->decimal_point[0] != ',') return 1;
29933 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29934 (eval $ac_link) 2>&5
29936 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29937 test $ac_status = 0; } && test -s conftest$ac_exeext; then
29939 # Handle native Windows specially, because there setlocale() interprets
29940 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29941 # "fr" or "fra" as "French" or "French_France.1252",
29942 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29943 # "ja" as "Japanese" or "Japanese_Japan.932",
29946 # Test for the native Win32 locale name.
29947 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29948 gt_cv_locale_fr=French_France.1252
29951 gt_cv_locale_fr=none
29955 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29956 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
29957 # configure script would override the LC_ALL setting. Likewise for
29958 # LC_CTYPE, which is also set at the beginning of the configure script.
29959 # Test for the usual locale name.
29960 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29961 gt_cv_locale_fr=fr_FR
29963 # Test for the locale name with explicit encoding suffix.
29964 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29965 gt_cv_locale_fr=fr_FR.ISO-8859-1
29967 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
29968 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29969 gt_cv_locale_fr=fr_FR.ISO8859-1
29971 # Test for the HP-UX locale name.
29972 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29973 gt_cv_locale_fr=fr_FR.iso88591
29975 # Test for the Solaris 7 locale name.
29976 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29980 gt_cv_locale_fr=none
29992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
29993 $as_echo "$gt_cv_locale_fr" >&6; }
29994 LOCALE_FR=$gt_cv_locale_fr
30000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
30001 $as_echo_n "checking for a turkish Unicode locale... " >&6; }
30002 if test "${gt_cv_locale_tr_utf8+set}" = set; then :
30003 $as_echo_n "(cached) " >&6
30006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30007 /* end confdefs.h. */
30009 #include <locale.h>
30011 #if HAVE_LANGINFO_CODESET
30012 # include <langinfo.h>
30014 #include <stdlib.h>
30015 #include <string.h>
30019 /* On BeOS, locales are not implemented in libc. Rather, libintl
30020 imitates locale dependent behaviour by looking at the environment
30021 variables, and all locales use the UTF-8 encoding. But BeOS does not
30022 implement the Turkish upper-/lowercase mappings. Therefore, let this
30023 program return 1 on BeOS. */
30024 /* Check whether the given locale name is recognized by the system. */
30025 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
30026 /* On native Win32, setlocale(category, "") looks at the system settings,
30027 not at the environment variables. Also, when an encoding suffix such
30028 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
30029 category of the locale to "C". */
30030 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30031 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30034 if (setlocale (LC_ALL, "") == NULL) return 1;
30036 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30037 On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
30038 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30039 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30040 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30041 some unit tests fail. */
30042 #if HAVE_LANGINFO_CODESET
30044 const char *cs = nl_langinfo (CODESET);
30045 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
30050 /* On Cygwin, avoid locale names without encoding suffix, because the
30051 locale_charset() function relies on the encoding suffix. Note that
30052 LC_ALL is set on the command line. */
30053 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30055 /* Check whether in the abbreviation of the eighth month, the second
30056 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
30057 two bytes long, with UTF-8 encoding. */
30058 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
30059 if (strftime (buf, sizeof (buf), "%b", &t) < 4
30060 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
30062 /* Check whether the upper-/lowercase mappings are as expected for
30064 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
30065 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
30071 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30072 (eval $ac_link) 2>&5
30074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30075 test $ac_status = 0; } && test -s conftest$ac_exeext; then
30077 # Handle native Windows specially, because there setlocale() interprets
30078 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30079 # "fr" or "fra" as "French" or "French_France.1252",
30080 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30081 # "ja" as "Japanese" or "Japanese_Japan.932",
30084 # Test for the hypothetical native Win32 locale name.
30085 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30086 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
30089 gt_cv_locale_tr_utf8=none
30093 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
30094 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
30095 # configure script would override the LC_ALL setting. Likewise for
30096 # LC_CTYPE, which is also set at the beginning of the configure script.
30097 # Test for the usual locale name.
30098 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30099 gt_cv_locale_tr_utf8=tr_TR
30101 # Test for the locale name with explicit encoding suffix.
30102 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30103 gt_cv_locale_tr_utf8=tr_TR.UTF-8
30105 # Test for the Solaris 7 locale name.
30106 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30107 gt_cv_locale_tr_utf8=tr.UTF-8
30110 gt_cv_locale_tr_utf8=none
30117 gt_cv_locale_tr_utf8=none
30122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
30123 $as_echo "$gt_cv_locale_tr_utf8" >&6; }
30124 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
30131 if test $REPLACE_FTELLO != 0; then
30140 M4tests_LIBOBJS="$M4tests_LIBOBJS ftell.$ac_objext"
30148 GNULIB_FTELL=$gl_module_indicator_condition
30152 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
30161 for ac_func in getpagesize
30163 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
30164 if test "x$ac_cv_func_getpagesize" = x""yes; then :
30165 cat >>confdefs.h <<_ACEOF
30166 #define HAVE_GETPAGESIZE 1
30172 if test $ac_cv_func_getpagesize = no; then
30174 for ac_header in OS.h
30176 ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
30177 if test "x$ac_cv_header_OS_h" = x""yes; then :
30178 cat >>confdefs.h <<_ACEOF
30179 #define HAVE_OS_H 1
30186 if test $ac_cv_header_OS_h = yes; then
30189 for ac_header in sys/param.h
30191 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
30192 if test "x$ac_cv_header_sys_param_h" = x""yes; then :
30193 cat >>confdefs.h <<_ACEOF
30194 #define HAVE_SYS_PARAM_H 1
30201 if test $ac_cv_header_sys_param_h = yes; then
30207 REPLACE_GETPAGESIZE=1
30216 M4tests_LIBOBJS="$M4tests_LIBOBJS getpagesize.$ac_objext"
30220 ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
30221 if test "x$ac_cv_have_decl_getpagesize" = x""yes; then :
30224 HAVE_DECL_GETPAGESIZE=0
30231 GNULIB_GETPAGESIZE=$gl_module_indicator_condition
30235 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
30240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
30241 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
30242 if test "${gl_cv_cc_double_expbit0+set}" = set; then :
30243 $as_echo_n "(cached) " >&6
30246 if test "$cross_compiling" = yes; then :
30248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30249 /* end confdefs.h. */
30251 #if defined arm || defined __arm || defined __arm__
30256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30257 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
30258 gl_cv_cc_double_expbit0="unknown"
30262 if test "${ac_cv_c_bigendian+set}" = set; then :
30263 $as_echo_n "(cached) " >&6
30265 ac_cv_c_bigendian=unknown
30266 # See if we're dealing with a universal compiler.
30267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30268 /* end confdefs.h. */
30269 #ifndef __APPLE_CC__
30270 not a universal capable compiler
30275 if ac_fn_c_try_compile "$LINENO"; then :
30277 # Check for potential -arch flags. It is not universal unless
30278 # there are at least two -arch flags with different values.
30281 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
30282 if test -n "$ac_prev"; then
30284 i?86 | x86_64 | ppc | ppc64)
30285 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
30288 ac_cv_c_bigendian=universal
30294 elif test "x$ac_word" = "x-arch"; then
30299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30300 if test $ac_cv_c_bigendian = unknown; then
30301 # See if sys/param.h defines the BYTE_ORDER macro.
30302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30303 /* end confdefs.h. */
30304 #include <sys/types.h>
30305 #include <sys/param.h>
30310 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
30311 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
30313 bogus endian macros
30320 if ac_fn_c_try_compile "$LINENO"; then :
30321 # It does; now see whether it defined to BIG_ENDIAN or not.
30322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30323 /* end confdefs.h. */
30324 #include <sys/types.h>
30325 #include <sys/param.h>
30330 #if BYTE_ORDER != BIG_ENDIAN
30338 if ac_fn_c_try_compile "$LINENO"; then :
30339 ac_cv_c_bigendian=yes
30341 ac_cv_c_bigendian=no
30343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30347 if test $ac_cv_c_bigendian = unknown; then
30348 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
30349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30350 /* end confdefs.h. */
30351 #include <limits.h>
30356 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
30357 bogus endian macros
30364 if ac_fn_c_try_compile "$LINENO"; then :
30365 # It does; now see whether it defined to _BIG_ENDIAN or not.
30366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30367 /* end confdefs.h. */
30368 #include <limits.h>
30373 #ifndef _BIG_ENDIAN
30381 if ac_fn_c_try_compile "$LINENO"; then :
30382 ac_cv_c_bigendian=yes
30384 ac_cv_c_bigendian=no
30386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30390 if test $ac_cv_c_bigendian = unknown; then
30391 # Compile a test program.
30392 if test "$cross_compiling" = yes; then :
30393 # Try to guess by grepping values from an object file.
30394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30395 /* end confdefs.h. */
30396 short int ascii_mm[] =
30397 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
30398 short int ascii_ii[] =
30399 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
30400 int use_ascii (int i) {
30401 return ascii_mm[i] + ascii_ii[i];
30403 short int ebcdic_ii[] =
30404 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
30405 short int ebcdic_mm[] =
30406 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
30407 int use_ebcdic (int i) {
30408 return ebcdic_mm[i] + ebcdic_ii[i];
30415 return use_ascii (foo) == use_ebcdic (foo);
30420 if ac_fn_c_try_compile "$LINENO"; then :
30421 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
30422 ac_cv_c_bigendian=yes
30424 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
30425 if test "$ac_cv_c_bigendian" = unknown; then
30426 ac_cv_c_bigendian=no
30428 # finding both strings is unlikely to happen, but who knows?
30429 ac_cv_c_bigendian=unknown
30433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30436 /* end confdefs.h. */
30437 $ac_includes_default
30442 /* Are we little or big endian? From Harbison&Steele. */
30446 char c[sizeof (long int)];
30449 return u.c[sizeof (long int) - 1] == 1;
30455 if ac_fn_c_try_run "$LINENO"; then :
30456 ac_cv_c_bigendian=no
30458 ac_cv_c_bigendian=yes
30460 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30461 conftest.$ac_objext conftest.beam conftest.$ac_ext
30467 case $ac_cv_c_bigendian in #(
30469 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
30471 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
30474 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
30478 gl_cv_cc_double_expbit0="unknown" ;;
30487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30488 /* end confdefs.h. */
30491 #include <stddef.h>
30493 #include <string.h>
30495 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30496 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
30497 static unsigned int ored_words[NWORDS];
30498 static unsigned int anded_words[NWORDS];
30499 static void add_to_ored_words (double x)
30503 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
30504 memset (&m, 0, sizeof (memory_double));
30506 for (i = 0; i < NWORDS; i++)
30508 ored_words[i] |= m.word[i];
30509 anded_words[i] &= m.word[i];
30515 FILE *fp = fopen ("conftest.out", "w");
30518 for (j = 0; j < NWORDS; j++)
30519 anded_words[j] = ~ (unsigned int) 0;
30520 add_to_ored_words (0.25);
30521 add_to_ored_words (0.5);
30522 add_to_ored_words (1.0);
30523 add_to_ored_words (2.0);
30524 add_to_ored_words (4.0);
30525 /* Remove bits that are common (e.g. if representation of the first mantissa
30526 bit is explicit). */
30527 for (j = 0; j < NWORDS; j++)
30528 ored_words[j] &= ~anded_words[j];
30529 /* Now find the nonzero word. */
30530 for (j = 0; j < NWORDS; j++)
30531 if (ored_words[j] != 0)
30536 for (i = j + 1; i < NWORDS; i++)
30537 if (ored_words[i] != 0)
30539 fprintf (fp, "unknown");
30540 return (fclose (fp) != 0);
30543 if ((ored_words[j] >> i) & 1)
30545 fprintf (fp, "word %d bit %d", (int) j, (int) i);
30546 return (fclose (fp) != 0);
30549 fprintf (fp, "unknown");
30550 return (fclose (fp) != 0);
30554 if ac_fn_c_try_run "$LINENO"; then :
30555 gl_cv_cc_double_expbit0=`cat conftest.out`
30557 gl_cv_cc_double_expbit0="unknown"
30559 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30560 conftest.$ac_objext conftest.beam conftest.$ac_ext
30566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
30567 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
30568 case "$gl_cv_cc_double_expbit0" in
30570 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
30571 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
30573 cat >>confdefs.h <<_ACEOF
30574 #define DBL_EXPBIT0_WORD $word
30578 cat >>confdefs.h <<_ACEOF
30579 #define DBL_EXPBIT0_BIT $bit
30586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
30587 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
30588 if test "${gl_cv_cc_float_expbit0+set}" = set; then :
30589 $as_echo_n "(cached) " >&6
30592 if test "$cross_compiling" = yes; then :
30593 gl_cv_cc_float_expbit0="word 0 bit 23"
30595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30596 /* end confdefs.h. */
30599 #include <stddef.h>
30601 #include <string.h>
30603 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30604 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
30605 static unsigned int ored_words[NWORDS];
30606 static unsigned int anded_words[NWORDS];
30607 static void add_to_ored_words (float x)
30611 /* Clear it first, in case
30612 sizeof (float) < sizeof (memory_float). */
30613 memset (&m, 0, sizeof (memory_float));
30615 for (i = 0; i < NWORDS; i++)
30617 ored_words[i] |= m.word[i];
30618 anded_words[i] &= m.word[i];
30624 FILE *fp = fopen ("conftest.out", "w");
30627 for (j = 0; j < NWORDS; j++)
30628 anded_words[j] = ~ (unsigned int) 0;
30629 add_to_ored_words (0.25f);
30630 add_to_ored_words (0.5f);
30631 add_to_ored_words (1.0f);
30632 add_to_ored_words (2.0f);
30633 add_to_ored_words (4.0f);
30634 /* Remove bits that are common (e.g. if representation of the first mantissa
30635 bit is explicit). */
30636 for (j = 0; j < NWORDS; j++)
30637 ored_words[j] &= ~anded_words[j];
30638 /* Now find the nonzero word. */
30639 for (j = 0; j < NWORDS; j++)
30640 if (ored_words[j] != 0)
30645 for (i = j + 1; i < NWORDS; i++)
30646 if (ored_words[i] != 0)
30648 fprintf (fp, "unknown");
30649 return (fclose (fp) != 0);
30652 if ((ored_words[j] >> i) & 1)
30654 fprintf (fp, "word %d bit %d", (int) j, (int) i);
30655 return (fclose (fp) != 0);
30658 fprintf (fp, "unknown");
30659 return (fclose (fp) != 0);
30663 if ac_fn_c_try_run "$LINENO"; then :
30664 gl_cv_cc_float_expbit0=`cat conftest.out`
30666 gl_cv_cc_float_expbit0="unknown"
30668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30669 conftest.$ac_objext conftest.beam conftest.$ac_ext
30675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
30676 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
30677 case "$gl_cv_cc_float_expbit0" in
30679 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
30680 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
30682 cat >>confdefs.h <<_ACEOF
30683 #define FLT_EXPBIT0_WORD $word
30687 cat >>confdefs.h <<_ACEOF
30688 #define FLT_EXPBIT0_BIT $bit
30696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
30697 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
30698 if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
30699 $as_echo_n "(cached) " >&6
30702 if test "$cross_compiling" = yes; then :
30704 gl_cv_cc_long_double_expbit0="unknown"
30707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30708 /* end confdefs.h. */
30711 #include <stddef.h>
30713 #include <string.h>
30715 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30716 typedef union { long double value; unsigned int word[NWORDS]; }
30717 memory_long_double;
30718 static unsigned int ored_words[NWORDS];
30719 static unsigned int anded_words[NWORDS];
30720 static void add_to_ored_words (long double x)
30722 memory_long_double m;
30724 /* Clear it first, in case
30725 sizeof (long double) < sizeof (memory_long_double). */
30726 memset (&m, 0, sizeof (memory_long_double));
30728 for (i = 0; i < NWORDS; i++)
30730 ored_words[i] |= m.word[i];
30731 anded_words[i] &= m.word[i];
30737 FILE *fp = fopen ("conftest.out", "w");
30740 for (j = 0; j < NWORDS; j++)
30741 anded_words[j] = ~ (unsigned int) 0;
30742 add_to_ored_words (0.25L);
30743 add_to_ored_words (0.5L);
30744 add_to_ored_words (1.0L);
30745 add_to_ored_words (2.0L);
30746 add_to_ored_words (4.0L);
30747 /* Remove bits that are common (e.g. if representation of the first mantissa
30748 bit is explicit). */
30749 for (j = 0; j < NWORDS; j++)
30750 ored_words[j] &= ~anded_words[j];
30751 /* Now find the nonzero word. */
30752 for (j = 0; j < NWORDS; j++)
30753 if (ored_words[j] != 0)
30758 for (i = j + 1; i < NWORDS; i++)
30759 if (ored_words[i] != 0)
30761 fprintf (fp, "unknown");
30762 return (fclose (fp) != 0);
30765 if ((ored_words[j] >> i) & 1)
30767 fprintf (fp, "word %d bit %d", (int) j, (int) i);
30768 return (fclose (fp) != 0);
30771 fprintf (fp, "unknown");
30772 return (fclose (fp) != 0);
30776 if ac_fn_c_try_run "$LINENO"; then :
30777 gl_cv_cc_long_double_expbit0=`cat conftest.out`
30779 gl_cv_cc_long_double_expbit0="unknown"
30781 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30782 conftest.$ac_objext conftest.beam conftest.$ac_ext
30788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
30789 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
30790 case "$gl_cv_cc_long_double_expbit0" in
30792 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
30793 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
30795 cat >>confdefs.h <<_ACEOF
30796 #define LDBL_EXPBIT0_WORD $word
30800 cat >>confdefs.h <<_ACEOF
30801 #define LDBL_EXPBIT0_BIT $bit
30810 if test $ac_cv_func_link = no; then
30820 M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
30823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link handles trailing slash correctly" >&5
30824 $as_echo_n "checking whether link handles trailing slash correctly... " >&6; }
30825 if test "${gl_cv_func_link_works+set}" = set; then :
30826 $as_echo_n "(cached) " >&6
30829 # Assume that if we have lstat, we can also check symlinks.
30830 if test $ac_cv_func_lstat = yes; then
30831 ln -s conftest.a conftest.lnk
30833 if test "$cross_compiling" = yes; then :
30834 gl_cv_func_link_works="guessing no"
30836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30837 /* end confdefs.h. */
30838 #include <unistd.h>
30844 if (!link ("conftest.a", "conftest.b/"))
30847 if (!link ("conftest.lnk/", "conftest.b"))
30856 if ac_fn_c_try_run "$LINENO"; then :
30857 gl_cv_func_link_works=yes
30859 gl_cv_func_link_works=no
30861 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30862 conftest.$ac_objext conftest.beam conftest.$ac_ext
30865 rm -f conftest.a conftest.b conftest.lnk
30867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
30868 $as_echo "$gl_cv_func_link_works" >&6; }
30869 if test "$gl_cv_func_link_works" != yes; then
30879 M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
30887 GNULIB_LINK=$gl_module_indicator_condition
30891 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
30902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
30903 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
30904 if test "${gl_cv_header_locale_h_posix2001+set}" = set; then :
30905 $as_echo_n "(cached) " >&6
30907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30908 /* end confdefs.h. */
30909 #include <locale.h>
30910 int x = LC_MESSAGES;
30919 if ac_fn_c_try_compile "$LINENO"; then :
30920 gl_cv_header_locale_h_posix2001=yes
30922 gl_cv_header_locale_h_posix2001=no
30924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
30927 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
30930 if test $ac_cv_header_xlocale_h = yes; then
30932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
30933 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
30934 if test "${gl_cv_header_locale_has_locale_t+set}" = set; then :
30935 $as_echo_n "(cached) " >&6
30937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30938 /* end confdefs.h. */
30939 #include <locale.h>
30949 if ac_fn_c_try_compile "$LINENO"; then :
30950 gl_cv_header_locale_has_locale_t=yes
30952 gl_cv_header_locale_has_locale_t=no
30954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
30958 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
30959 if test $gl_cv_header_locale_has_locale_t = yes; then
30960 gl_cv_header_locale_h_needs_xlocale_h=no
30962 gl_cv_header_locale_h_needs_xlocale_h=yes
30966 gl_cv_header_locale_h_needs_xlocale_h=no
30978 if test $gl_cv_have_include_next = yes; then
30979 gl_cv_next_locale_h='<'locale.h'>'
30981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
30982 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
30983 if test "${gl_cv_next_locale_h+set}" = set; then :
30984 $as_echo_n "(cached) " >&6
30987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30988 /* end confdefs.h. */
30989 #include <locale.h>
30993 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30994 *) gl_absname_cpp="$ac_cpp" ;;
30996 gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30997 sed -n '\#/locale.h#{
30998 s#.*"\(.*/locale.h\)".*#\1#
31006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
31007 $as_echo "$gl_cv_next_locale_h" >&6; }
31009 NEXT_LOCALE_H=$gl_cv_next_locale_h
31011 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31012 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31013 gl_next_as_first_directive='<'locale.h'>'
31015 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31016 gl_next_as_first_directive=$gl_cv_next_locale_h
31018 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
31024 if test -n "$STDDEF_H" \
31025 || test $gl_cv_header_locale_h_posix2001 = no \
31026 || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
31038 for ac_func in setlocale uselocale
31040 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
31041 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
31042 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
31043 cat >>confdefs.h <<_ACEOF
31044 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
31055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
31056 $as_echo_n "checking for a traditional french locale... " >&6; }
31057 if test "${gt_cv_locale_fr+set}" = set; then :
31058 $as_echo_n "(cached) " >&6
31061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31062 /* end confdefs.h. */
31064 #include <locale.h>
31066 #if HAVE_LANGINFO_CODESET
31067 # include <langinfo.h>
31069 #include <stdlib.h>
31070 #include <string.h>
31074 /* Check whether the given locale name is recognized by the system. */
31075 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31076 /* On native Win32, setlocale(category, "") looks at the system settings,
31077 not at the environment variables. Also, when an encoding suffix such
31078 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31079 category of the locale to "C". */
31080 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31081 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31084 if (setlocale (LC_ALL, "") == NULL) return 1;
31086 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31087 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31088 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31089 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31090 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31091 some unit tests fail.
31092 On MirBSD 10, when an unsupported locale is specified, setlocale()
31093 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
31094 #if HAVE_LANGINFO_CODESET
31096 const char *cs = nl_langinfo (CODESET);
31097 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31098 || strcmp (cs, "UTF-8") == 0)
31103 /* On Cygwin, avoid locale names without encoding suffix, because the
31104 locale_charset() function relies on the encoding suffix. Note that
31105 LC_ALL is set on the command line. */
31106 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31108 /* Check whether in the abbreviation of the second month, the second
31109 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
31110 one byte long. This excludes the UTF-8 encoding. */
31111 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31112 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
31113 /* Check whether the decimal separator is a comma.
31114 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
31115 are nl_langinfo(RADIXCHAR) are both ".". */
31116 if (localeconv () ->decimal_point[0] != ',') return 1;
31121 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31122 (eval $ac_link) 2>&5
31124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31125 test $ac_status = 0; } && test -s conftest$ac_exeext; then
31127 # Handle native Windows specially, because there setlocale() interprets
31128 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31129 # "fr" or "fra" as "French" or "French_France.1252",
31130 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31131 # "ja" as "Japanese" or "Japanese_Japan.932",
31134 # Test for the native Win32 locale name.
31135 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31136 gt_cv_locale_fr=French_France.1252
31139 gt_cv_locale_fr=none
31143 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31144 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31145 # configure script would override the LC_ALL setting. Likewise for
31146 # LC_CTYPE, which is also set at the beginning of the configure script.
31147 # Test for the usual locale name.
31148 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31149 gt_cv_locale_fr=fr_FR
31151 # Test for the locale name with explicit encoding suffix.
31152 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31153 gt_cv_locale_fr=fr_FR.ISO-8859-1
31155 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
31156 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31157 gt_cv_locale_fr=fr_FR.ISO8859-1
31159 # Test for the HP-UX locale name.
31160 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31161 gt_cv_locale_fr=fr_FR.iso88591
31163 # Test for the Solaris 7 locale name.
31164 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31168 gt_cv_locale_fr=none
31180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
31181 $as_echo "$gt_cv_locale_fr" >&6; }
31182 LOCALE_FR=$gt_cv_locale_fr
31187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
31188 $as_echo_n "checking for a french Unicode locale... " >&6; }
31189 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
31190 $as_echo_n "(cached) " >&6
31193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31194 /* end confdefs.h. */
31196 #include <locale.h>
31198 #if HAVE_LANGINFO_CODESET
31199 # include <langinfo.h>
31201 #include <stdlib.h>
31202 #include <string.h>
31206 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
31207 imitates locale dependent behaviour by looking at the environment
31208 variables, and all locales use the UTF-8 encoding. */
31209 #if !(defined __BEOS__ || defined __HAIKU__)
31210 /* Check whether the given locale name is recognized by the system. */
31211 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31212 /* On native Win32, setlocale(category, "") looks at the system settings,
31213 not at the environment variables. Also, when an encoding suffix such
31214 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31215 category of the locale to "C". */
31216 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31217 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31220 if (setlocale (LC_ALL, "") == NULL) return 1;
31222 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31223 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31224 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31225 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31226 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31227 some unit tests fail. */
31228 # if HAVE_LANGINFO_CODESET
31230 const char *cs = nl_langinfo (CODESET);
31231 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
31236 /* On Cygwin, avoid locale names without encoding suffix, because the
31237 locale_charset() function relies on the encoding suffix. Note that
31238 LC_ALL is set on the command line. */
31239 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31241 /* Check whether in the abbreviation of the second month, the second
31242 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
31243 two bytes long, with UTF-8 encoding. */
31244 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31245 if (strftime (buf, sizeof (buf), "%b", &t) < 4
31246 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
31249 /* Check whether the decimal separator is a comma.
31250 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
31251 are nl_langinfo(RADIXCHAR) are both ".". */
31252 if (localeconv () ->decimal_point[0] != ',') return 1;
31257 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31258 (eval $ac_link) 2>&5
31260 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31261 test $ac_status = 0; } && test -s conftest$ac_exeext; then
31263 # Handle native Windows specially, because there setlocale() interprets
31264 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31265 # "fr" or "fra" as "French" or "French_France.1252",
31266 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31267 # "ja" as "Japanese" or "Japanese_Japan.932",
31270 # Test for the hypothetical native Win32 locale name.
31271 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31272 gt_cv_locale_fr_utf8=French_France.65001
31275 gt_cv_locale_fr_utf8=none
31279 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31280 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31281 # configure script would override the LC_ALL setting. Likewise for
31282 # LC_CTYPE, which is also set at the beginning of the configure script.
31283 # Test for the usual locale name.
31284 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31285 gt_cv_locale_fr_utf8=fr_FR
31287 # Test for the locale name with explicit encoding suffix.
31288 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31289 gt_cv_locale_fr_utf8=fr_FR.UTF-8
31291 # Test for the Solaris 7 locale name.
31292 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31293 gt_cv_locale_fr_utf8=fr.UTF-8
31296 gt_cv_locale_fr_utf8=none
31306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
31307 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
31308 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
31314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
31315 $as_echo_n "checking for a traditional japanese locale... " >&6; }
31316 if test "${gt_cv_locale_ja+set}" = set; then :
31317 $as_echo_n "(cached) " >&6
31320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31321 /* end confdefs.h. */
31323 #include <locale.h>
31325 #if HAVE_LANGINFO_CODESET
31326 # include <langinfo.h>
31328 #include <stdlib.h>
31329 #include <string.h>
31335 /* Check whether the given locale name is recognized by the system. */
31336 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31337 /* On native Win32, setlocale(category, "") looks at the system settings,
31338 not at the environment variables. Also, when an encoding suffix such
31339 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31340 category of the locale to "C". */
31341 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31342 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31345 if (setlocale (LC_ALL, "") == NULL) return 1;
31347 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31348 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31349 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31350 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31351 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31352 some unit tests fail.
31353 On MirBSD 10, when an unsupported locale is specified, setlocale()
31354 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
31355 #if HAVE_LANGINFO_CODESET
31357 const char *cs = nl_langinfo (CODESET);
31358 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31359 || strcmp (cs, "UTF-8") == 0)
31364 /* On Cygwin, avoid locale names without encoding suffix, because the
31365 locale_charset() function relies on the encoding suffix. Note that
31366 LC_ALL is set on the command line. */
31367 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31369 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
31370 on Cygwin 1.5.x. */
31371 if (MB_CUR_MAX == 1)
31373 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
31374 This excludes the UTF-8 encoding (except on MirBSD). */
31375 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31376 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
31377 for (p = buf; *p != '\0'; p++)
31378 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
31384 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31385 (eval $ac_link) 2>&5
31387 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31388 test $ac_status = 0; } && test -s conftest$ac_exeext; then
31390 # Handle native Windows specially, because there setlocale() interprets
31391 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31392 # "fr" or "fra" as "French" or "French_France.1252",
31393 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31394 # "ja" as "Japanese" or "Japanese_Japan.932",
31397 # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
31398 # and CP932 is very different from EUC-JP, so we cannot use it here.
31399 gt_cv_locale_ja=none
31402 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31403 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31404 # configure script would override the LC_ALL setting. Likewise for
31405 # LC_CTYPE, which is also set at the beginning of the configure script.
31406 # Test for the AIX locale name.
31407 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31408 gt_cv_locale_ja=ja_JP
31410 # Test for the locale name with explicit encoding suffix.
31411 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31412 gt_cv_locale_ja=ja_JP.EUC-JP
31414 # Test for the HP-UX, OSF/1, NetBSD locale name.
31415 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31416 gt_cv_locale_ja=ja_JP.eucJP
31418 # Test for the IRIX, FreeBSD locale name.
31419 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31420 gt_cv_locale_ja=ja_JP.EUC
31422 # Test for the Solaris 7 locale name.
31423 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31426 # Special test for NetBSD 1.6.
31427 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
31428 gt_cv_locale_ja=ja_JP.eucJP
31431 gt_cv_locale_ja=none
31444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
31445 $as_echo "$gt_cv_locale_ja" >&6; }
31446 LOCALE_JA=$gt_cv_locale_ja
31452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
31453 $as_echo_n "checking for a transitional chinese locale... " >&6; }
31454 if test "${gt_cv_locale_zh_CN+set}" = set; then :
31455 $as_echo_n "(cached) " >&6
31458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31459 /* end confdefs.h. */
31461 #include <locale.h>
31462 #include <stdlib.h>
31464 #if HAVE_LANGINFO_CODESET
31465 # include <langinfo.h>
31467 #include <stdlib.h>
31468 #include <string.h>
31474 /* Check whether the given locale name is recognized by the system. */
31475 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31476 /* On native Win32, setlocale(category, "") looks at the system settings,
31477 not at the environment variables. Also, when an encoding suffix such
31478 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31479 category of the locale to "C". */
31480 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31481 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31484 if (setlocale (LC_ALL, "") == NULL) return 1;
31486 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31487 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31488 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31489 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31490 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31491 some unit tests fail.
31492 On MirBSD 10, when an unsupported locale is specified, setlocale()
31493 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
31494 #if HAVE_LANGINFO_CODESET
31496 const char *cs = nl_langinfo (CODESET);
31497 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31498 || strcmp (cs, "UTF-8") == 0)
31503 /* On Cygwin, avoid locale names without encoding suffix, because the
31504 locale_charset() function relies on the encoding suffix. Note that
31505 LC_ALL is set on the command line. */
31506 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31508 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
31509 This excludes the UTF-8 encoding (except on MirBSD). */
31510 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31511 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
31512 for (p = buf; *p != '\0'; p++)
31513 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
31515 /* Check whether a typical GB18030 multibyte sequence is recognized as a
31516 single wide character. This excludes the GB2312 and GBK encodings. */
31517 if (mblen ("\203\062\332\066", 5) != 4)
31523 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31524 (eval $ac_link) 2>&5
31526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31527 test $ac_status = 0; } && test -s conftest$ac_exeext; then
31529 # Handle native Windows specially, because there setlocale() interprets
31530 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31531 # "fr" or "fra" as "French" or "French_France.1252",
31532 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31533 # "ja" as "Japanese" or "Japanese_Japan.932",
31536 # Test for the hypothetical native Win32 locale name.
31537 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31538 gt_cv_locale_zh_CN=Chinese_China.54936
31541 gt_cv_locale_zh_CN=none
31545 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31546 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31547 # configure script would override the LC_ALL setting. Likewise for
31548 # LC_CTYPE, which is also set at the beginning of the configure script.
31549 # Test for the locale name without encoding suffix.
31550 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31551 gt_cv_locale_zh_CN=zh_CN
31553 # Test for the locale name with explicit encoding suffix.
31554 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31555 gt_cv_locale_zh_CN=zh_CN.GB18030
31558 gt_cv_locale_zh_CN=none
31564 # If there was a link error, due to mblen(), the system is so old that
31565 # it certainly doesn't have a chinese locale.
31566 gt_cv_locale_zh_CN=none
31571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
31572 $as_echo "$gt_cv_locale_zh_CN" >&6; }
31573 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
31578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
31579 $as_echo_n "checking for a french Unicode locale... " >&6; }
31580 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
31581 $as_echo_n "(cached) " >&6
31584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31585 /* end confdefs.h. */
31587 #include <locale.h>
31589 #if HAVE_LANGINFO_CODESET
31590 # include <langinfo.h>
31592 #include <stdlib.h>
31593 #include <string.h>
31597 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
31598 imitates locale dependent behaviour by looking at the environment
31599 variables, and all locales use the UTF-8 encoding. */
31600 #if !(defined __BEOS__ || defined __HAIKU__)
31601 /* Check whether the given locale name is recognized by the system. */
31602 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31603 /* On native Win32, setlocale(category, "") looks at the system settings,
31604 not at the environment variables. Also, when an encoding suffix such
31605 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31606 category of the locale to "C". */
31607 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31608 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31611 if (setlocale (LC_ALL, "") == NULL) return 1;
31613 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31614 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31615 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31616 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31617 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31618 some unit tests fail. */
31619 # if HAVE_LANGINFO_CODESET
31621 const char *cs = nl_langinfo (CODESET);
31622 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
31627 /* On Cygwin, avoid locale names without encoding suffix, because the
31628 locale_charset() function relies on the encoding suffix. Note that
31629 LC_ALL is set on the command line. */
31630 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31632 /* Check whether in the abbreviation of the second month, the second
31633 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
31634 two bytes long, with UTF-8 encoding. */
31635 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31636 if (strftime (buf, sizeof (buf), "%b", &t) < 4
31637 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
31640 /* Check whether the decimal separator is a comma.
31641 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
31642 are nl_langinfo(RADIXCHAR) are both ".". */
31643 if (localeconv () ->decimal_point[0] != ',') return 1;
31648 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31649 (eval $ac_link) 2>&5
31651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31652 test $ac_status = 0; } && test -s conftest$ac_exeext; then
31654 # Handle native Windows specially, because there setlocale() interprets
31655 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31656 # "fr" or "fra" as "French" or "French_France.1252",
31657 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31658 # "ja" as "Japanese" or "Japanese_Japan.932",
31661 # Test for the hypothetical native Win32 locale name.
31662 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31663 gt_cv_locale_fr_utf8=French_France.65001
31666 gt_cv_locale_fr_utf8=none
31670 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31671 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31672 # configure script would override the LC_ALL setting. Likewise for
31673 # LC_CTYPE, which is also set at the beginning of the configure script.
31674 # Test for the usual locale name.
31675 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31676 gt_cv_locale_fr_utf8=fr_FR
31678 # Test for the locale name with explicit encoding suffix.
31679 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31680 gt_cv_locale_fr_utf8=fr_FR.UTF-8
31682 # Test for the Solaris 7 locale name.
31683 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31684 gt_cv_locale_fr_utf8=fr.UTF-8
31687 gt_cv_locale_fr_utf8=none
31697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
31698 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
31699 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
31705 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
31706 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
31707 # irrelevant for anonymous mappings.
31708 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
31709 if test "x$ac_cv_func_mmap" = x""yes; then :
31716 # Try to allow MAP_ANONYMOUS.
31717 gl_have_mmap_anonymous=no
31718 if test $gl_have_mmap = yes; then
31719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
31720 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
31721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31722 /* end confdefs.h. */
31724 #include <sys/mman.h>
31725 #ifdef MAP_ANONYMOUS
31726 I cant identify this map.
31730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31731 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
31732 gl_have_mmap_anonymous=yes
31736 if test $gl_have_mmap_anonymous != yes; then
31737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31738 /* end confdefs.h. */
31740 #include <sys/mman.h>
31742 I cant identify this map.
31746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31747 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
31749 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
31751 gl_have_mmap_anonymous=yes
31756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
31757 $as_echo "$gl_have_mmap_anonymous" >&6; }
31758 if test $gl_have_mmap_anonymous = yes; then
31760 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
31770 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
31771 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
31772 # irrelevant for anonymous mappings.
31773 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
31774 if test "x$ac_cv_func_mmap" = x""yes; then :
31781 # Try to allow MAP_ANONYMOUS.
31782 gl_have_mmap_anonymous=no
31783 if test $gl_have_mmap = yes; then
31784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
31785 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
31786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31787 /* end confdefs.h. */
31789 #include <sys/mman.h>
31790 #ifdef MAP_ANONYMOUS
31791 I cant identify this map.
31795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31796 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
31797 gl_have_mmap_anonymous=yes
31801 if test $gl_have_mmap_anonymous != yes; then
31802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31803 /* end confdefs.h. */
31805 #include <sys/mman.h>
31807 I cant identify this map.
31811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31812 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
31814 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
31816 gl_have_mmap_anonymous=yes
31821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
31822 $as_echo "$gl_have_mmap_anonymous" >&6; }
31823 if test $gl_have_mmap_anonymous = yes; then
31825 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
31835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
31836 $as_echo_n "checking for a traditional french locale... " >&6; }
31837 if test "${gt_cv_locale_fr+set}" = set; then :
31838 $as_echo_n "(cached) " >&6
31841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31842 /* end confdefs.h. */
31844 #include <locale.h>
31846 #if HAVE_LANGINFO_CODESET
31847 # include <langinfo.h>
31849 #include <stdlib.h>
31850 #include <string.h>
31854 /* Check whether the given locale name is recognized by the system. */
31855 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31856 /* On native Win32, setlocale(category, "") looks at the system settings,
31857 not at the environment variables. Also, when an encoding suffix such
31858 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31859 category of the locale to "C". */
31860 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31861 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31864 if (setlocale (LC_ALL, "") == NULL) return 1;
31866 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31867 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31868 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31869 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31870 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31871 some unit tests fail.
31872 On MirBSD 10, when an unsupported locale is specified, setlocale()
31873 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
31874 #if HAVE_LANGINFO_CODESET
31876 const char *cs = nl_langinfo (CODESET);
31877 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31878 || strcmp (cs, "UTF-8") == 0)
31883 /* On Cygwin, avoid locale names without encoding suffix, because the
31884 locale_charset() function relies on the encoding suffix. Note that
31885 LC_ALL is set on the command line. */
31886 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31888 /* Check whether in the abbreviation of the second month, the second
31889 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
31890 one byte long. This excludes the UTF-8 encoding. */
31891 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31892 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
31893 /* Check whether the decimal separator is a comma.
31894 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
31895 are nl_langinfo(RADIXCHAR) are both ".". */
31896 if (localeconv () ->decimal_point[0] != ',') return 1;
31901 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31902 (eval $ac_link) 2>&5
31904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31905 test $ac_status = 0; } && test -s conftest$ac_exeext; then
31907 # Handle native Windows specially, because there setlocale() interprets
31908 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31909 # "fr" or "fra" as "French" or "French_France.1252",
31910 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31911 # "ja" as "Japanese" or "Japanese_Japan.932",
31914 # Test for the native Win32 locale name.
31915 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31916 gt_cv_locale_fr=French_France.1252
31919 gt_cv_locale_fr=none
31923 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31924 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31925 # configure script would override the LC_ALL setting. Likewise for
31926 # LC_CTYPE, which is also set at the beginning of the configure script.
31927 # Test for the usual locale name.
31928 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31929 gt_cv_locale_fr=fr_FR
31931 # Test for the locale name with explicit encoding suffix.
31932 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31933 gt_cv_locale_fr=fr_FR.ISO-8859-1
31935 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
31936 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31937 gt_cv_locale_fr=fr_FR.ISO8859-1
31939 # Test for the HP-UX locale name.
31940 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31941 gt_cv_locale_fr=fr_FR.iso88591
31943 # Test for the Solaris 7 locale name.
31944 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31948 gt_cv_locale_fr=none
31960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
31961 $as_echo "$gt_cv_locale_fr" >&6; }
31962 LOCALE_FR=$gt_cv_locale_fr
31967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
31968 $as_echo_n "checking for a french Unicode locale... " >&6; }
31969 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
31970 $as_echo_n "(cached) " >&6
31973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31974 /* end confdefs.h. */
31976 #include <locale.h>
31978 #if HAVE_LANGINFO_CODESET
31979 # include <langinfo.h>
31981 #include <stdlib.h>
31982 #include <string.h>
31986 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
31987 imitates locale dependent behaviour by looking at the environment
31988 variables, and all locales use the UTF-8 encoding. */
31989 #if !(defined __BEOS__ || defined __HAIKU__)
31990 /* Check whether the given locale name is recognized by the system. */
31991 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31992 /* On native Win32, setlocale(category, "") looks at the system settings,
31993 not at the environment variables. Also, when an encoding suffix such
31994 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31995 category of the locale to "C". */
31996 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31997 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32000 if (setlocale (LC_ALL, "") == NULL) return 1;
32002 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32003 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32004 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32005 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32006 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32007 some unit tests fail. */
32008 # if HAVE_LANGINFO_CODESET
32010 const char *cs = nl_langinfo (CODESET);
32011 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32016 /* On Cygwin, avoid locale names without encoding suffix, because the
32017 locale_charset() function relies on the encoding suffix. Note that
32018 LC_ALL is set on the command line. */
32019 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32021 /* Check whether in the abbreviation of the second month, the second
32022 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32023 two bytes long, with UTF-8 encoding. */
32024 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32025 if (strftime (buf, sizeof (buf), "%b", &t) < 4
32026 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32029 /* Check whether the decimal separator is a comma.
32030 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32031 are nl_langinfo(RADIXCHAR) are both ".". */
32032 if (localeconv () ->decimal_point[0] != ',') return 1;
32037 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32038 (eval $ac_link) 2>&5
32040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32041 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32043 # Handle native Windows specially, because there setlocale() interprets
32044 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32045 # "fr" or "fra" as "French" or "French_France.1252",
32046 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32047 # "ja" as "Japanese" or "Japanese_Japan.932",
32050 # Test for the hypothetical native Win32 locale name.
32051 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32052 gt_cv_locale_fr_utf8=French_France.65001
32055 gt_cv_locale_fr_utf8=none
32059 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32060 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32061 # configure script would override the LC_ALL setting. Likewise for
32062 # LC_CTYPE, which is also set at the beginning of the configure script.
32063 # Test for the usual locale name.
32064 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32065 gt_cv_locale_fr_utf8=fr_FR
32067 # Test for the locale name with explicit encoding suffix.
32068 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32069 gt_cv_locale_fr_utf8=fr_FR.UTF-8
32071 # Test for the Solaris 7 locale name.
32072 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32073 gt_cv_locale_fr_utf8=fr.UTF-8
32076 gt_cv_locale_fr_utf8=none
32086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32087 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
32088 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32092 /* end confdefs.h. */
32094 #if defined _MSC_VER || defined __MINGW32__
32099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32100 $EGREP "notposix" >/dev/null 2>&1; then :
32101 posix_spawn_ported=no
32103 posix_spawn_ported=yes
32107 if test $posix_spawn_ported = yes; then
32108 POSIX_SPAWN_PORTED_TRUE=
32109 POSIX_SPAWN_PORTED_FALSE='#'
32111 POSIX_SPAWN_PORTED_TRUE='#'
32112 POSIX_SPAWN_PORTED_FALSE=
32117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
32118 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
32119 if test "${gl_cv_func_svid_putenv+set}" = set; then :
32120 $as_echo_n "(cached) " >&6
32122 if test "$cross_compiling" = yes; then :
32123 gl_cv_func_svid_putenv=no
32125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32126 /* end confdefs.h. */
32127 $ac_includes_default
32132 /* Put it in env. */
32133 if (putenv ("CONFTEST_putenv=val"))
32136 /* Try to remove it. */
32137 if (putenv ("CONFTEST_putenv"))
32140 /* Make sure it was deleted. */
32141 if (getenv ("CONFTEST_putenv") != 0)
32150 if ac_fn_c_try_run "$LINENO"; then :
32151 gl_cv_func_svid_putenv=yes
32153 gl_cv_func_svid_putenv=no
32155 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32156 conftest.$ac_objext conftest.beam conftest.$ac_ext
32161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
32162 $as_echo "$gl_cv_func_svid_putenv" >&6; }
32163 if test $gl_cv_func_svid_putenv = no; then
32173 M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
32180 GNULIB_PUTENV=$gl_module_indicator_condition
32184 $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
32191 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
32192 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
32193 # irrelevant for anonymous mappings.
32194 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
32195 if test "x$ac_cv_func_mmap" = x""yes; then :
32202 # Try to allow MAP_ANONYMOUS.
32203 gl_have_mmap_anonymous=no
32204 if test $gl_have_mmap = yes; then
32205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
32206 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
32207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32208 /* end confdefs.h. */
32210 #include <sys/mman.h>
32211 #ifdef MAP_ANONYMOUS
32212 I cant identify this map.
32216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32217 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
32218 gl_have_mmap_anonymous=yes
32222 if test $gl_have_mmap_anonymous != yes; then
32223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32224 /* end confdefs.h. */
32226 #include <sys/mman.h>
32228 I cant identify this map.
32232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32233 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
32235 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
32237 gl_have_mmap_anonymous=yes
32242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
32243 $as_echo "$gl_have_mmap_anonymous" >&6; }
32244 if test $gl_have_mmap_anonymous = yes; then
32246 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
32255 if test $HAVE_SETENV$REPLACE_SETENV != 10; then
32264 M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
32271 GNULIB_SETENV=$gl_module_indicator_condition
32275 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
32283 mingw*) REPLACE_SETLOCALE=1 ;;
32285 if test $REPLACE_SETLOCALE = 1; then
32297 M4tests_LIBOBJS="$M4tests_LIBOBJS setlocale.$ac_objext"
32307 GNULIB_SETLOCALE=$gl_module_indicator_condition
32311 $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
32318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
32319 $as_echo_n "checking for a traditional french locale... " >&6; }
32320 if test "${gt_cv_locale_fr+set}" = set; then :
32321 $as_echo_n "(cached) " >&6
32324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32325 /* end confdefs.h. */
32327 #include <locale.h>
32329 #if HAVE_LANGINFO_CODESET
32330 # include <langinfo.h>
32332 #include <stdlib.h>
32333 #include <string.h>
32337 /* Check whether the given locale name is recognized by the system. */
32338 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
32339 /* On native Win32, setlocale(category, "") looks at the system settings,
32340 not at the environment variables. Also, when an encoding suffix such
32341 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
32342 category of the locale to "C". */
32343 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32344 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32347 if (setlocale (LC_ALL, "") == NULL) return 1;
32349 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32350 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32351 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32352 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32353 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32354 some unit tests fail.
32355 On MirBSD 10, when an unsupported locale is specified, setlocale()
32356 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
32357 #if HAVE_LANGINFO_CODESET
32359 const char *cs = nl_langinfo (CODESET);
32360 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32361 || strcmp (cs, "UTF-8") == 0)
32366 /* On Cygwin, avoid locale names without encoding suffix, because the
32367 locale_charset() function relies on the encoding suffix. Note that
32368 LC_ALL is set on the command line. */
32369 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32371 /* Check whether in the abbreviation of the second month, the second
32372 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
32373 one byte long. This excludes the UTF-8 encoding. */
32374 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32375 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
32376 /* Check whether the decimal separator is a comma.
32377 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32378 are nl_langinfo(RADIXCHAR) are both ".". */
32379 if (localeconv () ->decimal_point[0] != ',') return 1;
32384 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32385 (eval $ac_link) 2>&5
32387 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32388 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32390 # Handle native Windows specially, because there setlocale() interprets
32391 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32392 # "fr" or "fra" as "French" or "French_France.1252",
32393 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32394 # "ja" as "Japanese" or "Japanese_Japan.932",
32397 # Test for the native Win32 locale name.
32398 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32399 gt_cv_locale_fr=French_France.1252
32402 gt_cv_locale_fr=none
32406 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32407 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32408 # configure script would override the LC_ALL setting. Likewise for
32409 # LC_CTYPE, which is also set at the beginning of the configure script.
32410 # Test for the usual locale name.
32411 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32412 gt_cv_locale_fr=fr_FR
32414 # Test for the locale name with explicit encoding suffix.
32415 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32416 gt_cv_locale_fr=fr_FR.ISO-8859-1
32418 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
32419 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32420 gt_cv_locale_fr=fr_FR.ISO8859-1
32422 # Test for the HP-UX locale name.
32423 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32424 gt_cv_locale_fr=fr_FR.iso88591
32426 # Test for the Solaris 7 locale name.
32427 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32431 gt_cv_locale_fr=none
32443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
32444 $as_echo "$gt_cv_locale_fr" >&6; }
32445 LOCALE_FR=$gt_cv_locale_fr
32450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
32451 $as_echo_n "checking for a french Unicode locale... " >&6; }
32452 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
32453 $as_echo_n "(cached) " >&6
32456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32457 /* end confdefs.h. */
32459 #include <locale.h>
32461 #if HAVE_LANGINFO_CODESET
32462 # include <langinfo.h>
32464 #include <stdlib.h>
32465 #include <string.h>
32469 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
32470 imitates locale dependent behaviour by looking at the environment
32471 variables, and all locales use the UTF-8 encoding. */
32472 #if !(defined __BEOS__ || defined __HAIKU__)
32473 /* Check whether the given locale name is recognized by the system. */
32474 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
32475 /* On native Win32, setlocale(category, "") looks at the system settings,
32476 not at the environment variables. Also, when an encoding suffix such
32477 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
32478 category of the locale to "C". */
32479 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32480 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32483 if (setlocale (LC_ALL, "") == NULL) return 1;
32485 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32486 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32487 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32488 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32489 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32490 some unit tests fail. */
32491 # if HAVE_LANGINFO_CODESET
32493 const char *cs = nl_langinfo (CODESET);
32494 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32499 /* On Cygwin, avoid locale names without encoding suffix, because the
32500 locale_charset() function relies on the encoding suffix. Note that
32501 LC_ALL is set on the command line. */
32502 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32504 /* Check whether in the abbreviation of the second month, the second
32505 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32506 two bytes long, with UTF-8 encoding. */
32507 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32508 if (strftime (buf, sizeof (buf), "%b", &t) < 4
32509 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32512 /* Check whether the decimal separator is a comma.
32513 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32514 are nl_langinfo(RADIXCHAR) are both ".". */
32515 if (localeconv () ->decimal_point[0] != ',') return 1;
32520 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32521 (eval $ac_link) 2>&5
32523 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32524 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32526 # Handle native Windows specially, because there setlocale() interprets
32527 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32528 # "fr" or "fra" as "French" or "French_France.1252",
32529 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32530 # "ja" as "Japanese" or "Japanese_Japan.932",
32533 # Test for the hypothetical native Win32 locale name.
32534 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32535 gt_cv_locale_fr_utf8=French_France.65001
32538 gt_cv_locale_fr_utf8=none
32542 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32543 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32544 # configure script would override the LC_ALL setting. Likewise for
32545 # LC_CTYPE, which is also set at the beginning of the configure script.
32546 # Test for the usual locale name.
32547 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32548 gt_cv_locale_fr_utf8=fr_FR
32550 # Test for the locale name with explicit encoding suffix.
32551 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32552 gt_cv_locale_fr_utf8=fr_FR.UTF-8
32554 # Test for the Solaris 7 locale name.
32555 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32556 gt_cv_locale_fr_utf8=fr.UTF-8
32559 gt_cv_locale_fr_utf8=none
32569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32570 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
32571 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
32578 $as_echo_n "checking for a traditional japanese locale... " >&6; }
32579 if test "${gt_cv_locale_ja+set}" = set; then :
32580 $as_echo_n "(cached) " >&6
32583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32584 /* end confdefs.h. */
32586 #include <locale.h>
32588 #if HAVE_LANGINFO_CODESET
32589 # include <langinfo.h>
32591 #include <stdlib.h>
32592 #include <string.h>
32598 /* Check whether the given locale name is recognized by the system. */
32599 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
32600 /* On native Win32, setlocale(category, "") looks at the system settings,
32601 not at the environment variables. Also, when an encoding suffix such
32602 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
32603 category of the locale to "C". */
32604 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32605 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32608 if (setlocale (LC_ALL, "") == NULL) return 1;
32610 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32611 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32612 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32613 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32614 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32615 some unit tests fail.
32616 On MirBSD 10, when an unsupported locale is specified, setlocale()
32617 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
32618 #if HAVE_LANGINFO_CODESET
32620 const char *cs = nl_langinfo (CODESET);
32621 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32622 || strcmp (cs, "UTF-8") == 0)
32627 /* On Cygwin, avoid locale names without encoding suffix, because the
32628 locale_charset() function relies on the encoding suffix. Note that
32629 LC_ALL is set on the command line. */
32630 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32632 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
32633 on Cygwin 1.5.x. */
32634 if (MB_CUR_MAX == 1)
32636 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32637 This excludes the UTF-8 encoding (except on MirBSD). */
32638 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32639 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32640 for (p = buf; *p != '\0'; p++)
32641 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32647 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32648 (eval $ac_link) 2>&5
32650 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32651 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32653 # Handle native Windows specially, because there setlocale() interprets
32654 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32655 # "fr" or "fra" as "French" or "French_France.1252",
32656 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32657 # "ja" as "Japanese" or "Japanese_Japan.932",
32660 # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
32661 # and CP932 is very different from EUC-JP, so we cannot use it here.
32662 gt_cv_locale_ja=none
32665 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32666 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32667 # configure script would override the LC_ALL setting. Likewise for
32668 # LC_CTYPE, which is also set at the beginning of the configure script.
32669 # Test for the AIX locale name.
32670 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32671 gt_cv_locale_ja=ja_JP
32673 # Test for the locale name with explicit encoding suffix.
32674 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32675 gt_cv_locale_ja=ja_JP.EUC-JP
32677 # Test for the HP-UX, OSF/1, NetBSD locale name.
32678 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32679 gt_cv_locale_ja=ja_JP.eucJP
32681 # Test for the IRIX, FreeBSD locale name.
32682 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32683 gt_cv_locale_ja=ja_JP.EUC
32685 # Test for the Solaris 7 locale name.
32686 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32689 # Special test for NetBSD 1.6.
32690 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
32691 gt_cv_locale_ja=ja_JP.eucJP
32694 gt_cv_locale_ja=none
32707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
32708 $as_echo "$gt_cv_locale_ja" >&6; }
32709 LOCALE_JA=$gt_cv_locale_ja
32715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
32716 $as_echo_n "checking for a transitional chinese locale... " >&6; }
32717 if test "${gt_cv_locale_zh_CN+set}" = set; then :
32718 $as_echo_n "(cached) " >&6
32721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32722 /* end confdefs.h. */
32724 #include <locale.h>
32725 #include <stdlib.h>
32727 #if HAVE_LANGINFO_CODESET
32728 # include <langinfo.h>
32730 #include <stdlib.h>
32731 #include <string.h>
32737 /* Check whether the given locale name is recognized by the system. */
32738 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
32739 /* On native Win32, setlocale(category, "") looks at the system settings,
32740 not at the environment variables. Also, when an encoding suffix such
32741 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
32742 category of the locale to "C". */
32743 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32744 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32747 if (setlocale (LC_ALL, "") == NULL) return 1;
32749 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32750 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32751 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32752 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32753 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32754 some unit tests fail.
32755 On MirBSD 10, when an unsupported locale is specified, setlocale()
32756 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
32757 #if HAVE_LANGINFO_CODESET
32759 const char *cs = nl_langinfo (CODESET);
32760 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32761 || strcmp (cs, "UTF-8") == 0)
32766 /* On Cygwin, avoid locale names without encoding suffix, because the
32767 locale_charset() function relies on the encoding suffix. Note that
32768 LC_ALL is set on the command line. */
32769 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32771 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32772 This excludes the UTF-8 encoding (except on MirBSD). */
32773 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32774 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32775 for (p = buf; *p != '\0'; p++)
32776 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32778 /* Check whether a typical GB18030 multibyte sequence is recognized as a
32779 single wide character. This excludes the GB2312 and GBK encodings. */
32780 if (mblen ("\203\062\332\066", 5) != 4)
32786 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32787 (eval $ac_link) 2>&5
32789 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32790 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32792 # Handle native Windows specially, because there setlocale() interprets
32793 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32794 # "fr" or "fra" as "French" or "French_France.1252",
32795 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32796 # "ja" as "Japanese" or "Japanese_Japan.932",
32799 # Test for the hypothetical native Win32 locale name.
32800 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32801 gt_cv_locale_zh_CN=Chinese_China.54936
32804 gt_cv_locale_zh_CN=none
32808 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32809 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32810 # configure script would override the LC_ALL setting. Likewise for
32811 # LC_CTYPE, which is also set at the beginning of the configure script.
32812 # Test for the locale name without encoding suffix.
32813 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32814 gt_cv_locale_zh_CN=zh_CN
32816 # Test for the locale name with explicit encoding suffix.
32817 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32818 gt_cv_locale_zh_CN=zh_CN.GB18030
32821 gt_cv_locale_zh_CN=none
32827 # If there was a link error, due to mblen(), the system is so old that
32828 # it certainly doesn't have a chinese locale.
32829 gt_cv_locale_zh_CN=none
32834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
32835 $as_echo "$gt_cv_locale_zh_CN" >&6; }
32836 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
32843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
32844 $as_echo_n "checking for wchar_t... " >&6; }
32845 if test "${gt_cv_c_wchar_t+set}" = set; then :
32846 $as_echo_n "(cached) " >&6
32848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32849 /* end confdefs.h. */
32850 #include <stddef.h>
32851 wchar_t foo = (wchar_t)'\0';
32860 if ac_fn_c_try_compile "$LINENO"; then :
32861 gt_cv_c_wchar_t=yes
32865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
32868 $as_echo "$gt_cv_c_wchar_t" >&6; }
32869 if test $gt_cv_c_wchar_t = yes; then
32871 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
32876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
32877 $as_echo_n "checking for wint_t... " >&6; }
32878 if test "${gt_cv_c_wint_t+set}" = set; then :
32879 $as_echo_n "(cached) " >&6
32881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32882 /* end confdefs.h. */
32884 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32886 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
32887 before <wchar.h>. */
32888 #include <stddef.h>
32892 wint_t foo = (wchar_t)'\0';
32901 if ac_fn_c_try_compile "$LINENO"; then :
32906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
32909 $as_echo "$gt_cv_c_wint_t" >&6; }
32910 if test $gt_cv_c_wint_t = yes; then
32912 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
32920 if test $ac_cv_func_strdup = yes; then
32921 if test $gl_cv_func_malloc_posix != yes; then
32931 M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
32944 M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
32949 if test $ac_cv_have_decl_strdup = no; then
32956 GNULIB_STRDUP=$gl_module_indicator_condition
32960 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
32967 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
32968 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
32969 # irrelevant for anonymous mappings.
32970 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
32971 if test "x$ac_cv_func_mmap" = x""yes; then :
32978 # Try to allow MAP_ANONYMOUS.
32979 gl_have_mmap_anonymous=no
32980 if test $gl_have_mmap = yes; then
32981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
32982 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
32983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32984 /* end confdefs.h. */
32986 #include <sys/mman.h>
32987 #ifdef MAP_ANONYMOUS
32988 I cant identify this map.
32992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32993 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
32994 gl_have_mmap_anonymous=yes
32998 if test $gl_have_mmap_anonymous != yes; then
32999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33000 /* end confdefs.h. */
33002 #include <sys/mman.h>
33004 I cant identify this map.
33008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33009 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
33011 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
33013 gl_have_mmap_anonymous=yes
33018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
33019 $as_echo "$gl_have_mmap_anonymous" >&6; }
33020 if test $gl_have_mmap_anonymous = yes; then
33022 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
33033 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
33034 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
33035 # irrelevant for anonymous mappings.
33036 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
33037 if test "x$ac_cv_func_mmap" = x""yes; then :
33044 # Try to allow MAP_ANONYMOUS.
33045 gl_have_mmap_anonymous=no
33046 if test $gl_have_mmap = yes; then
33047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
33048 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
33049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33050 /* end confdefs.h. */
33052 #include <sys/mman.h>
33053 #ifdef MAP_ANONYMOUS
33054 I cant identify this map.
33058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33059 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
33060 gl_have_mmap_anonymous=yes
33064 if test $gl_have_mmap_anonymous != yes; then
33065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33066 /* end confdefs.h. */
33068 #include <sys/mman.h>
33070 I cant identify this map.
33074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33075 $EGREP "I cant identify this map." >/dev/null 2>&1; then :
33077 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
33079 gl_have_mmap_anonymous=yes
33084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
33085 $as_echo "$gl_have_mmap_anonymous" >&6; }
33086 if test $gl_have_mmap_anonymous = yes; then
33088 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
33098 if test $ac_cv_func_symlink = no; then
33108 M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
33111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
33112 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
33113 if test "${gl_cv_func_symlink_works+set}" = set; then :
33114 $as_echo_n "(cached) " >&6
33116 if test "$cross_compiling" = yes; then :
33117 gl_cv_func_symlink_works="guessing no"
33119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33120 /* end confdefs.h. */
33121 #include <unistd.h>
33127 if (!symlink ("a", "conftest.link/"))
33129 if (symlink ("conftest.f", "conftest.lnk2"))
33131 else if (!symlink ("a", "conftest.lnk2/"))
33139 if ac_fn_c_try_run "$LINENO"; then :
33140 gl_cv_func_symlink_works=yes
33142 gl_cv_func_symlink_works=no
33144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33145 conftest.$ac_objext conftest.beam conftest.$ac_ext
33148 rm -f conftest.f conftest.link conftest.lnk2
33150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
33151 $as_echo "$gl_cv_func_symlink_works" >&6; }
33152 if test "$gl_cv_func_symlink_works" != yes; then
33162 M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
33170 GNULIB_SYMLINK=$gl_module_indicator_condition
33174 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
33181 if test $ac_cv_have_decl_unsetenv = no; then
33182 HAVE_DECL_UNSETENV=0
33184 for ac_func in unsetenv
33186 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
33187 if test "x$ac_cv_func_unsetenv" = x""yes; then :
33188 cat >>confdefs.h <<_ACEOF
33189 #define HAVE_UNSETENV 1
33195 if test $ac_cv_func_unsetenv = no; then
33204 M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
33211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
33212 $as_echo_n "checking for unsetenv() return type... " >&6; }
33213 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
33214 $as_echo_n "(cached) " >&6
33216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33217 /* end confdefs.h. */
33220 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
33221 #include <stdlib.h>
33226 #if defined(__STDC__) || defined(__cplusplus)
33227 int unsetenv (const char *name);
33240 if ac_fn_c_try_compile "$LINENO"; then :
33241 gt_cv_func_unsetenv_ret='int'
33243 gt_cv_func_unsetenv_ret='void'
33245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
33248 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
33249 if test $gt_cv_func_unsetenv_ret = 'void'; then
33251 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
33262 M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
33266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
33267 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
33268 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
33269 $as_echo_n "(cached) " >&6
33271 if test "$cross_compiling" = yes; then :
33272 gl_cv_func_unsetenv_works="guessing no"
33274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33275 /* end confdefs.h. */
33277 #include <stdlib.h>
33279 extern char **environ;
33285 char entry1[] = "a=1";
33286 char entry2[] = "b=2";
33287 char *env[] = { entry1, entry2, NULL };
33288 if (putenv ((char *) "a=1")) return 1;
33289 if (putenv (entry2)) return 2;
33292 if (getenv ("a")) return 3;
33293 if (!unsetenv ("") || errno != EINVAL) return 4;
33296 if (!getenv ("a")) return 5;
33299 if (getenv ("a")) return 6;
33305 if ac_fn_c_try_run "$LINENO"; then :
33306 gl_cv_func_unsetenv_works=yes
33308 gl_cv_func_unsetenv_works=no
33310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33311 conftest.$ac_objext conftest.beam conftest.$ac_ext
33315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
33316 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
33317 if test "$gl_cv_func_unsetenv_works" != yes; then
33327 M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
33335 GNULIB_UNSETENV=$gl_module_indicator_condition
33339 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
33343 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
33345 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
33350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
33351 $as_echo_n "checking for a traditional french locale... " >&6; }
33352 if test "${gt_cv_locale_fr+set}" = set; then :
33353 $as_echo_n "(cached) " >&6
33356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33357 /* end confdefs.h. */
33359 #include <locale.h>
33361 #if HAVE_LANGINFO_CODESET
33362 # include <langinfo.h>
33364 #include <stdlib.h>
33365 #include <string.h>
33369 /* Check whether the given locale name is recognized by the system. */
33370 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33371 /* On native Win32, setlocale(category, "") looks at the system settings,
33372 not at the environment variables. Also, when an encoding suffix such
33373 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
33374 category of the locale to "C". */
33375 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33376 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33379 if (setlocale (LC_ALL, "") == NULL) return 1;
33381 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33382 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33383 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33384 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33385 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33386 some unit tests fail.
33387 On MirBSD 10, when an unsupported locale is specified, setlocale()
33388 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
33389 #if HAVE_LANGINFO_CODESET
33391 const char *cs = nl_langinfo (CODESET);
33392 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33393 || strcmp (cs, "UTF-8") == 0)
33398 /* On Cygwin, avoid locale names without encoding suffix, because the
33399 locale_charset() function relies on the encoding suffix. Note that
33400 LC_ALL is set on the command line. */
33401 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33403 /* Check whether in the abbreviation of the second month, the second
33404 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
33405 one byte long. This excludes the UTF-8 encoding. */
33406 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33407 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
33408 /* Check whether the decimal separator is a comma.
33409 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
33410 are nl_langinfo(RADIXCHAR) are both ".". */
33411 if (localeconv () ->decimal_point[0] != ',') return 1;
33416 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33417 (eval $ac_link) 2>&5
33419 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33420 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33422 # Handle native Windows specially, because there setlocale() interprets
33423 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33424 # "fr" or "fra" as "French" or "French_France.1252",
33425 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33426 # "ja" as "Japanese" or "Japanese_Japan.932",
33429 # Test for the native Win32 locale name.
33430 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33431 gt_cv_locale_fr=French_France.1252
33434 gt_cv_locale_fr=none
33438 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33439 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
33440 # configure script would override the LC_ALL setting. Likewise for
33441 # LC_CTYPE, which is also set at the beginning of the configure script.
33442 # Test for the usual locale name.
33443 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33444 gt_cv_locale_fr=fr_FR
33446 # Test for the locale name with explicit encoding suffix.
33447 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33448 gt_cv_locale_fr=fr_FR.ISO-8859-1
33450 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
33451 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33452 gt_cv_locale_fr=fr_FR.ISO8859-1
33454 # Test for the HP-UX locale name.
33455 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33456 gt_cv_locale_fr=fr_FR.iso88591
33458 # Test for the Solaris 7 locale name.
33459 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33463 gt_cv_locale_fr=none
33475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
33476 $as_echo "$gt_cv_locale_fr" >&6; }
33477 LOCALE_FR=$gt_cv_locale_fr
33482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
33483 $as_echo_n "checking for a french Unicode locale... " >&6; }
33484 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
33485 $as_echo_n "(cached) " >&6
33488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33489 /* end confdefs.h. */
33491 #include <locale.h>
33493 #if HAVE_LANGINFO_CODESET
33494 # include <langinfo.h>
33496 #include <stdlib.h>
33497 #include <string.h>
33501 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
33502 imitates locale dependent behaviour by looking at the environment
33503 variables, and all locales use the UTF-8 encoding. */
33504 #if !(defined __BEOS__ || defined __HAIKU__)
33505 /* Check whether the given locale name is recognized by the system. */
33506 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33507 /* On native Win32, setlocale(category, "") looks at the system settings,
33508 not at the environment variables. Also, when an encoding suffix such
33509 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
33510 category of the locale to "C". */
33511 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33512 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33515 if (setlocale (LC_ALL, "") == NULL) return 1;
33517 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33518 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33519 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33520 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33521 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33522 some unit tests fail. */
33523 # if HAVE_LANGINFO_CODESET
33525 const char *cs = nl_langinfo (CODESET);
33526 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
33531 /* On Cygwin, avoid locale names without encoding suffix, because the
33532 locale_charset() function relies on the encoding suffix. Note that
33533 LC_ALL is set on the command line. */
33534 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33536 /* Check whether in the abbreviation of the second month, the second
33537 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
33538 two bytes long, with UTF-8 encoding. */
33539 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33540 if (strftime (buf, sizeof (buf), "%b", &t) < 4
33541 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
33544 /* Check whether the decimal separator is a comma.
33545 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
33546 are nl_langinfo(RADIXCHAR) are both ".". */
33547 if (localeconv () ->decimal_point[0] != ',') return 1;
33552 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33553 (eval $ac_link) 2>&5
33555 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33556 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33558 # Handle native Windows specially, because there setlocale() interprets
33559 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33560 # "fr" or "fra" as "French" or "French_France.1252",
33561 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33562 # "ja" as "Japanese" or "Japanese_Japan.932",
33565 # Test for the hypothetical native Win32 locale name.
33566 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33567 gt_cv_locale_fr_utf8=French_France.65001
33570 gt_cv_locale_fr_utf8=none
33574 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33575 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
33576 # configure script would override the LC_ALL setting. Likewise for
33577 # LC_CTYPE, which is also set at the beginning of the configure script.
33578 # Test for the usual locale name.
33579 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33580 gt_cv_locale_fr_utf8=fr_FR
33582 # Test for the locale name with explicit encoding suffix.
33583 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33584 gt_cv_locale_fr_utf8=fr_FR.UTF-8
33586 # Test for the Solaris 7 locale name.
33587 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33588 gt_cv_locale_fr_utf8=fr.UTF-8
33591 gt_cv_locale_fr_utf8=none
33601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
33602 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
33603 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
33609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
33610 $as_echo_n "checking for a traditional japanese locale... " >&6; }
33611 if test "${gt_cv_locale_ja+set}" = set; then :
33612 $as_echo_n "(cached) " >&6
33615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33616 /* end confdefs.h. */
33618 #include <locale.h>
33620 #if HAVE_LANGINFO_CODESET
33621 # include <langinfo.h>
33623 #include <stdlib.h>
33624 #include <string.h>
33630 /* Check whether the given locale name is recognized by the system. */
33631 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33632 /* On native Win32, setlocale(category, "") looks at the system settings,
33633 not at the environment variables. Also, when an encoding suffix such
33634 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
33635 category of the locale to "C". */
33636 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33637 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33640 if (setlocale (LC_ALL, "") == NULL) return 1;
33642 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33643 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33644 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33645 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33646 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33647 some unit tests fail.
33648 On MirBSD 10, when an unsupported locale is specified, setlocale()
33649 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
33650 #if HAVE_LANGINFO_CODESET
33652 const char *cs = nl_langinfo (CODESET);
33653 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33654 || strcmp (cs, "UTF-8") == 0)
33659 /* On Cygwin, avoid locale names without encoding suffix, because the
33660 locale_charset() function relies on the encoding suffix. Note that
33661 LC_ALL is set on the command line. */
33662 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33664 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
33665 on Cygwin 1.5.x. */
33666 if (MB_CUR_MAX == 1)
33668 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33669 This excludes the UTF-8 encoding (except on MirBSD). */
33670 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33671 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33672 for (p = buf; *p != '\0'; p++)
33673 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33679 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33680 (eval $ac_link) 2>&5
33682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33683 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33685 # Handle native Windows specially, because there setlocale() interprets
33686 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33687 # "fr" or "fra" as "French" or "French_France.1252",
33688 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33689 # "ja" as "Japanese" or "Japanese_Japan.932",
33692 # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
33693 # and CP932 is very different from EUC-JP, so we cannot use it here.
33694 gt_cv_locale_ja=none
33697 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33698 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
33699 # configure script would override the LC_ALL setting. Likewise for
33700 # LC_CTYPE, which is also set at the beginning of the configure script.
33701 # Test for the AIX locale name.
33702 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33703 gt_cv_locale_ja=ja_JP
33705 # Test for the locale name with explicit encoding suffix.
33706 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33707 gt_cv_locale_ja=ja_JP.EUC-JP
33709 # Test for the HP-UX, OSF/1, NetBSD locale name.
33710 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33711 gt_cv_locale_ja=ja_JP.eucJP
33713 # Test for the IRIX, FreeBSD locale name.
33714 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33715 gt_cv_locale_ja=ja_JP.EUC
33717 # Test for the Solaris 7 locale name.
33718 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33721 # Special test for NetBSD 1.6.
33722 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
33723 gt_cv_locale_ja=ja_JP.eucJP
33726 gt_cv_locale_ja=none
33739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
33740 $as_echo "$gt_cv_locale_ja" >&6; }
33741 LOCALE_JA=$gt_cv_locale_ja
33747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
33748 $as_echo_n "checking for a transitional chinese locale... " >&6; }
33749 if test "${gt_cv_locale_zh_CN+set}" = set; then :
33750 $as_echo_n "(cached) " >&6
33753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33754 /* end confdefs.h. */
33756 #include <locale.h>
33757 #include <stdlib.h>
33759 #if HAVE_LANGINFO_CODESET
33760 # include <langinfo.h>
33762 #include <stdlib.h>
33763 #include <string.h>
33769 /* Check whether the given locale name is recognized by the system. */
33770 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33771 /* On native Win32, setlocale(category, "") looks at the system settings,
33772 not at the environment variables. Also, when an encoding suffix such
33773 as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
33774 category of the locale to "C". */
33775 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33776 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33779 if (setlocale (LC_ALL, "") == NULL) return 1;
33781 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33782 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33783 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33784 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33785 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33786 some unit tests fail.
33787 On MirBSD 10, when an unsupported locale is specified, setlocale()
33788 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
33789 #if HAVE_LANGINFO_CODESET
33791 const char *cs = nl_langinfo (CODESET);
33792 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33793 || strcmp (cs, "UTF-8") == 0)
33798 /* On Cygwin, avoid locale names without encoding suffix, because the
33799 locale_charset() function relies on the encoding suffix. Note that
33800 LC_ALL is set on the command line. */
33801 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33803 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33804 This excludes the UTF-8 encoding (except on MirBSD). */
33805 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33806 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33807 for (p = buf; *p != '\0'; p++)
33808 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33810 /* Check whether a typical GB18030 multibyte sequence is recognized as a
33811 single wide character. This excludes the GB2312 and GBK encodings. */
33812 if (mblen ("\203\062\332\066", 5) != 4)
33818 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33819 (eval $ac_link) 2>&5
33821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33822 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33824 # Handle native Windows specially, because there setlocale() interprets
33825 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33826 # "fr" or "fra" as "French" or "French_France.1252",
33827 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33828 # "ja" as "Japanese" or "Japanese_Japan.932",
33831 # Test for the hypothetical native Win32 locale name.
33832 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33833 gt_cv_locale_zh_CN=Chinese_China.54936
33836 gt_cv_locale_zh_CN=none
33840 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33841 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
33842 # configure script would override the LC_ALL setting. Likewise for
33843 # LC_CTYPE, which is also set at the beginning of the configure script.
33844 # Test for the locale name without encoding suffix.
33845 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33846 gt_cv_locale_zh_CN=zh_CN
33848 # Test for the locale name with explicit encoding suffix.
33849 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33850 gt_cv_locale_zh_CN=zh_CN.GB18030
33853 gt_cv_locale_zh_CN=none
33859 # If there was a link error, due to mblen(), the system is so old that
33860 # it certainly doesn't have a chinese locale.
33861 gt_cv_locale_zh_CN=none
33866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
33867 $as_echo "$gt_cv_locale_zh_CN" >&6; }
33868 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
33875 if test $ac_cv_func_wctob = no; then
33888 M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
33897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
33898 $as_echo_n "checking whether wctob works... " >&6; }
33899 if test "${gl_cv_func_wctob_works+set}" = set; then :
33900 $as_echo_n "(cached) " >&6
33904 # Guess no on Solaris <= 9 and Cygwin.
33905 solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
33906 gl_cv_func_wctob_works="guessing no" ;;
33907 # Guess yes otherwise.
33908 *) gl_cv_func_wctob_works="guessing yes" ;;
33912 if test "$cross_compiling" = yes; then :
33915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33916 /* end confdefs.h. */
33918 #include <locale.h>
33919 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33921 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33922 included before <wchar.h>. */
33923 #include <stddef.h>
33928 register long global __asm__ ("%ebx");
33932 setlocale (LC_ALL, "en_US.UTF-8");
33934 global = 0x12345678;
33935 if (wctob (0x00FC) != -1)
33937 if (global != 0x12345678)
33942 if ac_fn_c_try_run "$LINENO"; then :
33945 gl_cv_func_wctob_works=no
33947 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33948 conftest.$ac_objext conftest.beam conftest.$ac_ext
33953 if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
33954 if test "$cross_compiling" = yes; then :
33957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33958 /* end confdefs.h. */
33960 #include <locale.h>
33961 #include <string.h>
33962 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33964 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33965 included before <wchar.h>. */
33966 #include <stddef.h>
33972 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
33976 if (mbtowc (&wc, "\374", 1) == 1)
33977 if (wctob (wc) != (unsigned char) '\374')
33983 if ac_fn_c_try_run "$LINENO"; then :
33984 gl_cv_func_wctob_works=yes
33986 gl_cv_func_wctob_works=no
33988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33989 conftest.$ac_objext conftest.beam conftest.$ac_ext
33995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
33996 $as_echo "$gl_cv_func_wctob_works" >&6; }
33997 case "$gl_cv_func_wctob_works" in
33999 *) REPLACE_WCTOB=1 ;;
34001 if test $REPLACE_WCTOB = 1; then
34013 M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
34020 ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
34021 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
34023 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
34024 before <wchar.h>. */
34025 #include <stddef.h>
34031 if test "x$ac_cv_have_decl_wctob" = x""yes; then :
34037 cat >>confdefs.h <<_ACEOF
34038 #define HAVE_DECL_WCTOB $ac_have_decl
34041 if test $ac_cv_have_decl_wctob != yes; then
34053 GNULIB_WCTOB=$gl_module_indicator_condition
34057 $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
34067 if test $REPLACE_WCTOMB = 1; then
34076 M4tests_LIBOBJS="$M4tests_LIBOBJS wctomb.$ac_objext"
34086 GNULIB_WCTOMB=$gl_module_indicator_condition
34090 $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
34104 LIBM4_LIBDEPS="$gl_libdeps"
34106 LIBM4_LTLIBDEPS="$gl_ltlibdeps"
34108 LIBTESTS_LIBDEPS="$gltests_libdeps"
34112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
34113 $as_echo_n "checking whether an open file can be renamed... " >&6; }
34114 if test "${M4_cv_func_rename_open_file_works+set}" = set; then :
34115 $as_echo_n "(cached) " >&6
34117 if test "$cross_compiling" = yes; then :
34118 M4_cv_func_rename_open_file_works='guessing no'
34120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34121 /* end confdefs.h. */
34122 $ac_includes_default
34126 FILE *f = fopen ("conftest.1", "w+");
34127 int result = rename ("conftest.1", "conftest.2");
34128 fclose (f); remove ("conftest.1"); remove ("conftest.2");
34134 if ac_fn_c_try_run "$LINENO"; then :
34135 M4_cv_func_rename_open_file_works=yes
34137 M4_cv_func_rename_open_file_works=no
34139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34140 conftest.$ac_objext conftest.beam conftest.$ac_ext
34144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
34145 $as_echo "$M4_cv_func_rename_open_file_works" >&6; }
34146 if test "$M4_cv_func_rename_open_file_works" = yes ; then
34147 M4_rename_open_works=1
34149 M4_rename_open_works=0
34152 cat >>confdefs.h <<_ACEOF
34153 #define RENAME_OPEN_FILE_WORKS $M4_rename_open_works
34158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if changeword is wanted" >&5
34159 $as_echo_n "checking if changeword is wanted... " >&6; }
34160 # Check whether --enable-changeword was given.
34161 if test "${enable_changeword+set}" = set; then :
34162 enableval=$enable_changeword; if test "$enableval" = yes; then
34163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34164 $as_echo "yes" >&6; }
34166 $as_echo "#define ENABLE_CHANGEWORD 1" >>confdefs.h
34169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34170 $as_echo "no" >&6; }
34173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34174 $as_echo "no" >&6; }
34178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
34179 $as_echo_n "checking which shell to use for syscmd... " >&6; }
34181 # Check whether --with-syscmd-shell was given.
34182 if test "${with_syscmd_shell+set}" = set; then :
34183 withval=$with_syscmd_shell; case $withval in
34184 yes) with_syscmd_shell=no;;
34187 with_syscmd_shell=no
34190 if test "$with_syscmd_shell" = no ; then
34191 with_syscmd_shell=/bin/sh
34192 if test "$cross_compiling" != yes ; then
34193 if { test -f /bin/sh && $as_test_x /bin/sh; }; then :
34196 if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
34198 M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34199 for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
34200 command -p getconf PATH
34202 echo "/bin$PATH_SEPARATOR$PATH"
34206 test -z "$M4_dir" && continue
34207 { test -f "$M4_dir/sh" && $as_test_x "$M4_dir/sh"; } \
34208 && { with_syscmd_shell=$M4_dir/sh; break; }
34213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
34214 $as_echo "$with_syscmd_shell" >&6; }
34216 cat >>confdefs.h <<_ACEOF
34217 #define SYSCMD_SHELL "$with_syscmd_shell"
34221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
34222 $as_echo_n "checking if malloc debugging is wanted... " >&6; }
34224 # Check whether --with-dmalloc was given.
34225 if test "${with_dmalloc+set}" = set; then :
34226 withval=$with_dmalloc; if test "$withval" = yes; then
34227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34228 $as_echo "yes" >&6; }
34230 $as_echo "#define WITH_DMALLOC 1" >>confdefs.h
34232 LIBS="$LIBS -ldmalloc"
34233 LDFLAGS="$LDFLAGS -g"
34235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34236 $as_echo "no" >&6; }
34239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34240 $as_echo "no" >&6; }
34244 ac_config_commands="$ac_config_commands stamp-h"
34247 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile checks/Makefile examples/Makefile"
34250 cat >confcache <<\_ACEOF
34251 # This file is a shell script that caches the results of configure
34252 # tests run on this system so they can be shared between configure
34253 # scripts and configure runs, see configure's option --config-cache.
34254 # It is not useful on other systems. If it contains results you don't
34255 # want to keep, you may remove or edit it.
34257 # config.status only pays attention to the cache file if you give it
34258 # the --recheck option to rerun configure.
34260 # `ac_cv_env_foo' variables (set or unset) will be overridden when
34261 # loading this file, other *unset* `ac_cv_foo' will be assigned the
34262 # following values.
34266 # The following way of writing the cache mishandles newlines in values,
34267 # but we know of no workaround that is simple, portable, and efficient.
34268 # So, we kill variables containing newlines.
34269 # Ultrix sh set writes to stderr and can't be redirected directly,
34270 # and sets the high bit in the cache file unless we assign to the vars.
34272 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
34273 eval ac_val=\$$ac_var
34277 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
34278 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
34281 _ | IFS | as_nl) ;; #(
34282 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
34283 *) { eval $ac_var=; unset $ac_var;} ;;
34289 case $as_nl`(ac_space=' '; set) 2>&1` in #(
34290 *${as_nl}ac_space=\ *)
34291 # `set' does not quote correctly, so add quotes: double-quote
34292 # substitution turns \\\\ into \\, and sed turns \\ into \.
34295 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
34298 # `set' quotes correctly as required by POSIX, so do not add quotes.
34299 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
34308 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
34310 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
34312 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
34313 if test -w "$cache_file"; then
34314 test "x$cache_file" != "x/dev/null" &&
34315 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
34316 $as_echo "$as_me: updating cache $cache_file" >&6;}
34317 cat confcache >$cache_file
34319 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
34320 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
34325 test "x$prefix" = xNONE && prefix=$ac_default_prefix
34326 # Let make expand exec_prefix.
34327 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
34329 DEFS=-DHAVE_CONFIG_H
34334 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
34335 # 1. Remove the extension, and $U if already installed.
34336 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
34337 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
34338 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
34339 # will be set to the directory where LIBOBJS objects are built.
34340 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
34341 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
34343 LIBOBJS=$ac_libobjs
34345 LTLIBOBJS=$ac_ltlibobjs
34348 if test -n "$EXEEXT"; then
34350 am__EXEEXT_FALSE='#'
34352 am__EXEEXT_TRUE='#'
34356 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
34357 as_fn_error $? "conditional \"AMDEP\" was never defined.
34358 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34360 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
34361 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
34362 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34364 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
34365 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
34366 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34368 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
34371 CONFIG_INCLUDE=lib/config.h
34376 if test -n "$M4_LIBOBJS"; then
34377 # Remove the extension.
34378 sed_drop_objext='s/\.o$//;s/\.obj$//'
34379 for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
34380 M4_libobjs="$M4_libobjs $i.$ac_objext"
34381 M4_ltlibobjs="$M4_ltlibobjs $i.lo"
34384 M4_LIBOBJS=$M4_libobjs
34386 M4_LTLIBOBJS=$M4_ltlibobjs
34389 if test -z "${ANSICXX_TRUE}" && test -z "${ANSICXX_FALSE}"; then
34390 as_fn_error $? "conditional \"ANSICXX\" was never defined.
34391 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34393 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
34394 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
34395 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34397 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
34398 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
34399 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34402 if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
34403 as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
34404 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34409 if test -n "$M4tests_LIBOBJS"; then
34410 # Remove the extension.
34411 sed_drop_objext='s/\.o$//;s/\.obj$//'
34412 for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
34413 M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
34414 M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
34417 M4tests_LIBOBJS=$M4tests_libobjs
34419 M4tests_LTLIBOBJS=$M4tests_ltlibobjs
34423 : ${CONFIG_STATUS=./config.status}
34425 ac_clean_files_save=$ac_clean_files
34426 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34427 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
34428 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
34430 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
34432 # Generated by $as_me.
34433 # Run this file to recreate the current configuration.
34434 # Compiler output produced by configure, useful for debugging
34435 # configure, is in config.log if it exists.
34438 ac_cs_recheck=false
34441 SHELL=\${CONFIG_SHELL-$SHELL}
34444 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
34445 ## -------------------- ##
34446 ## M4sh Initialization. ##
34447 ## -------------------- ##
34449 # Be more Bourne compatible
34450 DUALCASE=1; export DUALCASE # for MKS sh
34451 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
34454 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34455 # is contrary to our usage. Disable this feature.
34456 alias -g '${1+"$@"}'='"$@"'
34457 setopt NO_GLOB_SUBST
34459 case `(set -o) 2>/dev/null` in #(
34471 # Printing a long string crashes Solaris 7 /usr/bin/printf.
34472 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
34473 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
34474 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
34475 # Prefer a ksh shell builtin over an external printf program on Solaris,
34476 # but without wasting forks for bash or zsh.
34477 if test -z "$BASH_VERSION$ZSH_VERSION" \
34478 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
34479 as_echo='print -r --'
34480 as_echo_n='print -rn --'
34481 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
34482 as_echo='printf %s\n'
34483 as_echo_n='printf %s'
34485 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34486 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34487 as_echo_n='/usr/ucb/echo -n'
34489 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34490 as_echo_n_body='eval
34494 expr "X$arg" : "X\\(.*\\)$as_nl";
34495 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34497 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34499 export as_echo_n_body
34500 as_echo_n='sh -c $as_echo_n_body as_echo'
34502 export as_echo_body
34503 as_echo='sh -c $as_echo_body as_echo'
34506 # The user is always right.
34507 if test "${PATH_SEPARATOR+set}" != set; then
34509 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34510 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34517 # We need space, tab and new line, in precisely that order. Quoting is
34518 # there to prevent editors from complaining about space-tab.
34519 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
34520 # splitting by setting IFS to empty value.)
34523 # Find who we are. Look in the path if we contain no directory separator.
34525 *[\\/]* ) as_myself=$0 ;;
34526 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34527 for as_dir in $PATH
34530 test -z "$as_dir" && as_dir=.
34531 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34537 # We did not find ourselves, most probably we were run as `sh COMMAND'
34538 # in which case we are not to be found in the path.
34539 if test "x$as_myself" = x; then
34542 if test ! -f "$as_myself"; then
34543 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34547 # Unset variables that we do not need and which cause bugs (e.g. in
34548 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
34549 # suppresses any "Segmentation fault" message there. '((' could
34550 # trigger a bug in pdksh 5.2.14.
34551 for as_var in BASH_ENV ENV MAIL MAILPATH
34552 do eval test x\${$as_var+set} = xset \
34553 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
34566 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
34569 # as_fn_error STATUS ERROR [LINENO LOG_FD]
34570 # ----------------------------------------
34571 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
34572 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
34573 # script with STATUS, using 1 if that was 0.
34576 as_status=$1; test $as_status -eq 0 && as_status=1
34578 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
34579 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
34581 $as_echo "$as_me: error: $2" >&2
34582 as_fn_exit $as_status
34586 # as_fn_set_status STATUS
34587 # -----------------------
34588 # Set $? to STATUS, without forking.
34589 as_fn_set_status ()
34592 } # as_fn_set_status
34594 # as_fn_exit STATUS
34595 # -----------------
34596 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
34600 as_fn_set_status $1
34606 # Portably unset VAR.
34609 { eval $1=; unset $1;}
34611 as_unset=as_fn_unset
34612 # as_fn_append VAR VALUE
34613 # ----------------------
34614 # Append the text in VALUE to the end of the definition contained in VAR. Take
34615 # advantage of any shell optimizations that allow amortized linear growth over
34616 # repeated appends, instead of the typical quadratic growth present in naive
34618 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
34619 eval 'as_fn_append ()
34630 # as_fn_arith ARG...
34631 # ------------------
34632 # Perform arithmetic evaluation on the ARGs, and store the result in the
34633 # global $as_val. Take advantage of shells that can avoid forks. The arguments
34634 # must be portable across $(()) and expr.
34635 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
34636 eval 'as_fn_arith ()
34643 as_val=`expr "$@" || test $? -eq 1`
34648 if expr a : '\(a\)' >/dev/null 2>&1 &&
34649 test "X`expr 00001 : '.*\(...\)'`" = X001; then
34655 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34656 as_basename=basename
34661 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34667 as_me=`$as_basename -- "$0" ||
34668 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34669 X"$0" : 'X\(//\)$' \| \
34670 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34672 sed '/^.*\/\([^/][^/]*\)\/*$/{
34686 # Avoid depending upon Character Ranges.
34687 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34688 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34689 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34690 as_cr_digits='0123456789'
34691 as_cr_alnum=$as_cr_Letters$as_cr_digits
34693 ECHO_C= ECHO_N= ECHO_T=
34694 case `echo -n x` in #(((((
34696 case `echo 'xy\c'` in
34697 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
34699 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
34706 rm -f conf$$ conf$$.exe conf$$.file
34707 if test -d conf$$.dir; then
34708 rm -f conf$$.dir/conf$$.file
34711 mkdir conf$$.dir 2>/dev/null
34713 if (echo >conf$$.file) 2>/dev/null; then
34714 if ln -s conf$$.file conf$$ 2>/dev/null; then
34716 # ... but there are two gotchas:
34717 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34718 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34719 # In both cases, we have to default to `cp -p'.
34720 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34722 elif ln conf$$.file conf$$ 2>/dev/null; then
34730 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34731 rmdir conf$$.dir 2>/dev/null
34736 # Create "$as_dir" as a directory, including parents if necessary.
34741 -*) as_dir=./$as_dir;;
34743 test -d "$as_dir" || eval $as_mkdir_p || {
34747 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34748 *) as_qdir=$as_dir;;
34750 as_dirs="'$as_qdir' $as_dirs"
34751 as_dir=`$as_dirname -- "$as_dir" ||
34752 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34753 X"$as_dir" : 'X\(//\)[^/]' \| \
34754 X"$as_dir" : 'X\(//\)$' \| \
34755 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34756 $as_echo X"$as_dir" |
34757 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34761 /^X\(\/\/\)[^/].*/{
34774 test -d "$as_dir" && break
34776 test -z "$as_dirs" || eval "mkdir $as_dirs"
34777 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34781 if mkdir -p . 2>/dev/null; then
34782 as_mkdir_p='mkdir -p "$as_dir"'
34784 test -d ./-p && rmdir ./-p
34788 if test -x / >/dev/null 2>&1; then
34789 as_test_x='test -x'
34791 if ls -dL / >/dev/null 2>&1; then
34798 if test -d "$1"; then
34804 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34805 ???[sx]*):;;*)false;;esac;fi
34809 as_executable_p=$as_test_x
34811 # Sed expression to map a string onto a valid CPP name.
34812 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34814 # Sed expression to map a string onto a valid variable name.
34815 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34819 ## ----------------------------------- ##
34820 ## Main body of $CONFIG_STATUS script. ##
34821 ## ----------------------------------- ##
34823 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34825 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34826 # Save the log message, to keep $0 and so on meaningful, and to
34827 # report actual input values of CONFIG_FILES etc. instead of their
34828 # values after options handling.
34830 This file was extended by GNU M4 $as_me 1.4.16, which was
34831 generated by GNU Autoconf 2.66. Invocation command line was
34833 CONFIG_FILES = $CONFIG_FILES
34834 CONFIG_HEADERS = $CONFIG_HEADERS
34835 CONFIG_LINKS = $CONFIG_LINKS
34836 CONFIG_COMMANDS = $CONFIG_COMMANDS
34839 on `(hostname || uname -n) 2>/dev/null | sed 1q`
34844 case $ac_config_files in *"
34845 "*) set x $ac_config_files; shift; ac_config_files=$*;;
34848 case $ac_config_headers in *"
34849 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34853 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34854 # Files that config.status was made for.
34855 config_files="$ac_config_files"
34856 config_headers="$ac_config_headers"
34857 config_links="$ac_config_links"
34858 config_commands="$ac_config_commands"
34862 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34864 \`$as_me' instantiates files and other configuration actions
34865 from templates according to the current configuration. Unless the files
34866 and actions are specified as TAGs, all are instantiated by default.
34868 Usage: $0 [OPTION]... [TAG]...
34870 -h, --help print this help, then exit
34871 -V, --version print version number and configuration settings, then exit
34872 --config print configuration, then exit
34873 -q, --quiet, --silent
34874 do not print progress messages
34875 -d, --debug don't remove temporary files
34876 --recheck update $as_me by reconfiguring in the same conditions
34877 --file=FILE[:TEMPLATE]
34878 instantiate the configuration file FILE
34879 --header=FILE[:TEMPLATE]
34880 instantiate the configuration header FILE
34882 Configuration files:
34885 Configuration headers:
34888 Configuration links:
34891 Configuration commands:
34894 Report bugs to <bug-m4@gnu.org>.
34895 GNU M4 home page: <http://www.gnu.org/software/m4/>.
34896 General help using GNU software: <http://www.gnu.org/gethelp/>."
34899 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34900 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34902 GNU M4 config.status 1.4.16
34903 configured by $0, generated by GNU Autoconf 2.66,
34904 with options \\"\$ac_cs_config\\"
34906 Copyright (C) 2010 Free Software Foundation, Inc.
34907 This config.status script is free software; the Free Software Foundation
34908 gives unlimited permission to copy, distribute and modify it."
34915 test -n "\$AWK" || AWK=awk
34918 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34919 # The default lists apply if the user does not specify any file.
34925 ac_option=`expr "X$1" : 'X\([^=]*\)='`
34926 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34937 # Handling of the options.
34938 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34940 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34941 $as_echo "$ac_cs_version"; exit ;;
34942 --config | --confi | --conf | --con | --co | --c )
34943 $as_echo "$ac_cs_config"; exit ;;
34944 --debug | --debu | --deb | --de | --d | -d )
34946 --file | --fil | --fi | --f )
34949 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34951 as_fn_append CONFIG_FILES " '$ac_optarg'"
34952 ac_need_defaults=false;;
34953 --header | --heade | --head | --hea )
34956 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34958 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34959 ac_need_defaults=false;;
34961 # Conflict between --help and --header
34962 as_fn_error $? "ambiguous option: \`$1'
34963 Try \`$0 --help' for more information.";;
34964 --help | --hel | -h )
34965 $as_echo "$ac_cs_usage"; exit ;;
34966 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34967 | -silent | --silent | --silen | --sile | --sil | --si | --s)
34970 # This is an error.
34971 -*) as_fn_error $? "unrecognized option: \`$1'
34972 Try \`$0 --help' for more information." ;;
34974 *) as_fn_append ac_config_targets " $1"
34975 ac_need_defaults=false ;;
34981 ac_configure_extra_args=
34983 if $ac_cs_silent; then
34985 ac_configure_extra_args="$ac_configure_extra_args --silent"
34989 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34990 if \$ac_cs_recheck; then
34991 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34993 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34994 CONFIG_SHELL='$SHELL'
34995 export CONFIG_SHELL
35000 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35004 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
35005 ## Running $as_me. ##
35011 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35015 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
35016 GNUmakefile=$GNUmakefile
35020 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35022 # Handling of arguments.
35023 for ac_config_target in $ac_config_targets
35025 case $ac_config_target in
35026 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
35027 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
35028 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
35029 "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
35030 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
35031 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
35032 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
35033 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
35034 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
35035 "checks/Makefile") CONFIG_FILES="$CONFIG_FILES checks/Makefile" ;;
35036 "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
35038 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
35043 # If the user did not use the arguments to specify the items to instantiate,
35044 # then the envvar interface is used. Set only those that are not.
35045 # We use the long form for the default assignment because of an extremely
35046 # bizarre bug on SunOS 4.1.3.
35047 if $ac_need_defaults; then
35048 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
35049 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
35050 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
35051 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
35054 # Have a temporary directory for convenience. Make it in the build tree
35055 # simply because there is no reason against having it here, and in addition,
35056 # creating and moving files from /tmp can sometimes cause problems.
35057 # Hook for its removal unless debugging.
35058 # Note that there is a small window in which the directory will not be cleaned:
35059 # after its creation but before its name has been assigned to `$tmp'.
35063 trap 'exit_status=$?
35064 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
35066 trap 'as_fn_exit 1' 1 2 13 15
35068 # Create a (secure) tmp directory for tmp files.
35071 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
35072 test -n "$tmp" && test -d "$tmp"
35075 tmp=./conf$$-$RANDOM
35076 (umask 077 && mkdir "$tmp")
35077 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
35079 # Set up the scripts for CONFIG_FILES section.
35080 # No need to generate them if there are no CONFIG_FILES.
35081 # This happens for instance with `./config.status config.h'.
35082 if test -n "$CONFIG_FILES"; then
35085 ac_cr=`echo X | tr X '\015'`
35086 # On cygwin, bash can eat \r inside `` if the user requested igncr.
35087 # But we know of no other shell where ac_cr would be empty at this
35088 # point, so we can use a bashism as a fallback.
35089 if test "x$ac_cr" = x; then
35090 eval ac_cr=\$\'\\r\'
35092 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
35093 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
35096 ac_cs_awk_cr=$ac_cr
35099 echo 'BEGIN {' >"$tmp/subs1.awk" &&
35104 echo "cat >conf$$subs.awk <<_ACEOF" &&
35105 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
35107 } >conf$$subs.sh ||
35108 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35109 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
35111 for ac_last_try in false false false false false :; do
35112 . ./conf$$subs.sh ||
35113 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35115 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
35116 if test $ac_delim_n = $ac_delim_num; then
35118 elif $ac_last_try; then
35119 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35121 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
35124 rm -f conf$$subs.sh
35126 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35127 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
35131 s/^/S["/; s/!.*/"]=/
35141 s/\(.\{148\}\)..*/\1/
35143 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
35148 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
35155 s/\(.\{148\}\)..*/\1/
35157 s/["\\]/\\&/g; s/^/"/; s/$/"/
35161 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
35166 ' <conf$$subs.awk | sed '
35171 ' >>$CONFIG_STATUS || ac_write_fail=1
35172 rm -f conf$$subs.awk
35173 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35175 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
35176 for (key in S) S_is_set[key] = 1
35182 nfields = split(line, field, "@")
35184 len = length(field[1])
35185 for (i = 2; i < nfields; i++) {
35187 keylen = length(key)
35188 if (S_is_set[key]) {
35190 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
35191 len += length(value) + length(field[++i])
35202 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35203 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
35204 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
35207 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
35208 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
35211 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
35212 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
35213 # trailing colons and then remove the whole line if VPATH becomes empty
35214 # (actually we leave an empty line to preserve line numbers).
35215 if test "x$srcdir" = x.; then
35216 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
35234 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35235 fi # test -n "$CONFIG_FILES"
35237 # Set up the scripts for CONFIG_HEADERS section.
35238 # No need to generate them if there are no CONFIG_HEADERS.
35239 # This happens for instance with `./config.status Makefile'.
35240 if test -n "$CONFIG_HEADERS"; then
35241 cat >"$tmp/defines.awk" <<\_ACAWK ||
35245 # Transform confdefs.h into an awk script `defines.awk', embedded as
35246 # here-document in config.status, that substitutes the proper values into
35247 # config.h.in to produce config.h.
35249 # Create a delimiter string that does not exist in confdefs.h, to ease
35250 # handling of long lines.
35252 for ac_last_try in false false :; do
35253 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
35254 if test -z "$ac_t"; then
35256 elif $ac_last_try; then
35257 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
35259 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
35263 # For the awk script, D is an array of macro values keyed by name,
35264 # likewise P contains macro parameters if any. Preserve backslash
35265 # newline sequences.
35267 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
35269 s/.\{148\}/&'"$ac_delim"'/g
35272 s/^[ ]*#[ ]*define[ ][ ]*/ /
35279 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
35281 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
35285 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
35286 D["\1"]=" \3\\\\\\n"\\/p
35288 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
35293 s/.\{148\}/&'"$ac_delim"'/g
35298 s/["\\]/\\&/g; s/^/"/; s/$/"/p
35301 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
35303 ' <confdefs.h | sed '
35304 s/'"$ac_delim"'/"\\\
35305 "/g' >>$CONFIG_STATUS || ac_write_fail=1
35307 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35308 for (key in D) D_is_set[key] = 1
35311 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
35313 split(line, arg, " ")
35314 if (arg[1] == "#") {
35318 defundef = substr(arg[1], 2)
35321 split(mac1, mac2, "(") #)
35323 prefix = substr(line, 1, index(line, defundef) - 1)
35324 if (D_is_set[macro]) {
35325 # Preserve the white space surrounding the "#".
35326 print prefix "define", macro P[macro] D[macro]
35329 # Replace #undef with comments. This is necessary, for example,
35330 # in the case of _POSIX_SOURCE, which is predefined and required
35331 # on some systems where configure will not decide to define it.
35332 if (defundef == "undef") {
35333 print "/*", prefix defundef, macro, "*/"
35341 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35342 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
35343 fi # test -n "$CONFIG_HEADERS"
35346 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
35351 :[FHLC]) ac_mode=$ac_tag; continue;;
35353 case $ac_mode$ac_tag in
35355 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
35356 :[FH]-) ac_tag=-:-;;
35357 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
35374 -) ac_f="$tmp/stdin";;
35375 *) # Look for the file first in the build tree, then in the source tree
35376 # (if the path is not absolute). The absolute path cannot be DOS-style,
35377 # because $ac_f cannot contain `:'.
35381 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
35383 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
35385 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
35386 as_fn_append ac_file_inputs " '$ac_f'"
35389 # Let's still pretend it is `configure' which instantiates (i.e., don't
35390 # use $as_me), people would be surprised to read:
35391 # /* config.h. Generated by config.status. */
35392 configure_input='Generated from '`
35393 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
35395 if test x"$ac_file" != x-; then
35396 configure_input="$ac_file. $configure_input"
35397 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
35398 $as_echo "$as_me: creating $ac_file" >&6;}
35400 # Neutralize special characters interpreted by sed in replacement strings.
35401 case $configure_input in #(
35402 *\&* | *\|* | *\\* )
35403 ac_sed_conf_input=`$as_echo "$configure_input" |
35404 sed 's/[\\\\&|]/\\\\&/g'`;; #(
35405 *) ac_sed_conf_input=$configure_input;;
35409 *:-:* | *:-) cat >"$tmp/stdin" \
35410 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
35415 ac_dir=`$as_dirname -- "$ac_file" ||
35416 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35417 X"$ac_file" : 'X\(//\)[^/]' \| \
35418 X"$ac_file" : 'X\(//\)$' \| \
35419 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
35420 $as_echo X"$ac_file" |
35421 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35425 /^X\(\/\/\)[^/].*/{
35438 as_dir="$ac_dir"; as_fn_mkdir_p
35442 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
35444 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
35445 # A ".." for each directory in $ac_dir_suffix.
35446 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
35447 case $ac_top_builddir_sub in
35448 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
35449 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
35452 ac_abs_top_builddir=$ac_pwd
35453 ac_abs_builddir=$ac_pwd$ac_dir_suffix
35454 # for backward compatibility:
35455 ac_top_builddir=$ac_top_build_prefix
35458 .) # We are building in place.
35460 ac_top_srcdir=$ac_top_builddir_sub
35461 ac_abs_top_srcdir=$ac_pwd ;;
35462 [\\/]* | ?:[\\/]* ) # Absolute name.
35463 ac_srcdir=$srcdir$ac_dir_suffix;
35464 ac_top_srcdir=$srcdir
35465 ac_abs_top_srcdir=$srcdir ;;
35466 *) # Relative name.
35467 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
35468 ac_top_srcdir=$ac_top_build_prefix$srcdir
35469 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35471 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
35481 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
35482 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
35484 ac_MKDIR_P=$MKDIR_P
35486 [\\/$]* | ?:[\\/]* ) ;;
35487 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
35491 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35492 # If the template does not know about datarootdir, expand it.
35493 # FIXME: This hack should be removed a few years after 2.60.
35494 ac_datarootdir_hack=; ac_datarootdir_seen=
35505 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35506 *datarootdir*) ac_datarootdir_seen=yes;;
35507 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35509 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35511 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35512 ac_datarootdir_hack='
35513 s&@datadir@&$datadir&g
35514 s&@docdir@&$docdir&g
35515 s&@infodir@&$infodir&g
35516 s&@localedir@&$localedir&g
35517 s&@mandir@&$mandir&g
35518 s&\\\${datarootdir}&$datarootdir&g' ;;
35522 # Neutralize VPATH when `$srcdir' = `.'.
35523 # Shell code in configure.ac might set extrasub.
35524 # FIXME: do we really want to maintain this feature?
35525 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35526 ac_sed_extra="$ac_vpsub
35529 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35531 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35532 s|@configure_input@|$ac_sed_conf_input|;t t
35533 s&@top_builddir@&$ac_top_builddir_sub&;t t
35534 s&@top_build_prefix@&$ac_top_build_prefix&;t t
35535 s&@srcdir@&$ac_srcdir&;t t
35536 s&@abs_srcdir@&$ac_abs_srcdir&;t t
35537 s&@top_srcdir@&$ac_top_srcdir&;t t
35538 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35539 s&@builddir@&$ac_builddir&;t t
35540 s&@abs_builddir@&$ac_abs_builddir&;t t
35541 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35542 s&@INSTALL@&$ac_INSTALL&;t t
35543 s&@MKDIR_P@&$ac_MKDIR_P&;t t
35544 $ac_datarootdir_hack
35546 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
35547 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35549 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35550 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
35551 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
35552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35553 which seems to be undefined. Please make sure it is defined" >&5
35554 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35555 which seems to be undefined. Please make sure it is defined" >&2;}
35559 -) cat "$tmp/out" && rm -f "$tmp/out";;
35560 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
35562 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35568 if test x"$ac_file" != x-; then
35570 $as_echo "/* $configure_input */" \
35571 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
35572 } >"$tmp/config.h" \
35573 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35574 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
35575 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
35576 $as_echo "$as_me: $ac_file is unchanged" >&6;}
35579 mv "$tmp/config.h" "$ac_file" \
35580 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35583 $as_echo "/* $configure_input */" \
35584 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
35585 || as_fn_error $? "could not create -" "$LINENO" 5
35587 # Compute "$ac_file"'s index in $config_headers.
35590 for _am_header in $config_headers :; do
35591 case $_am_header in
35592 $_am_arg | $_am_arg:* )
35595 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
35598 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
35599 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35600 X"$_am_arg" : 'X\(//\)[^/]' \| \
35601 X"$_am_arg" : 'X\(//\)$' \| \
35602 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
35603 $as_echo X"$_am_arg" |
35604 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35608 /^X\(\/\/\)[^/].*/{
35620 s/.*/./; q'`/stamp-h$_am_stamp_count
35627 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
35630 # Prefer the file from the source tree if names are identical.
35631 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
35632 ac_source=$srcdir/$ac_source
35635 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
35636 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
35638 if test ! -r "$ac_source"; then
35639 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
35643 # Try a relative symlink, then a hard link, then a copy.
35645 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
35646 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
35648 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
35649 ln "$ac_source" "$ac_file" 2>/dev/null ||
35650 cp -p "$ac_source" "$ac_file" ||
35651 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
35654 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
35655 $as_echo "$as_me: executing $ac_file commands" >&6;}
35660 case $ac_file$ac_mode in
35661 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
35662 # Autoconf 2.62 quotes --file arguments for eval, but not when files
35663 # are listed without --file. Let's play safe and only enable the eval
35664 # if we detect the quoting.
35665 case $CONFIG_FILES in
35666 *\'*) eval set x "$CONFIG_FILES" ;;
35667 *) set x $CONFIG_FILES ;;
35672 # Strip MF so we end up with the name of the file.
35673 mf=`echo "$mf" | sed -e 's/:.*$//'`
35674 # Check whether this is an Automake generated Makefile or not.
35675 # We used to match only the files named `Makefile.in', but
35676 # some people rename them; so instead we look at the file content.
35677 # Grep'ing the first line is not enough: some people post-process
35678 # each Makefile.in and add a new line on top of each file to say so.
35679 # Grep'ing the whole file is not good either: AIX grep has a line
35680 # limit of 2048, but all sed's we know have understand at least 4000.
35681 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
35682 dirpart=`$as_dirname -- "$mf" ||
35683 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35684 X"$mf" : 'X\(//\)[^/]' \| \
35685 X"$mf" : 'X\(//\)$' \| \
35686 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
35688 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35692 /^X\(\/\/\)[^/].*/{
35708 # Extract the definition of DEPDIR, am__include, and am__quote
35709 # from the Makefile without running `make'.
35710 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
35711 test -z "$DEPDIR" && continue
35712 am__include=`sed -n 's/^am__include = //p' < "$mf"`
35713 test -z "am__include" && continue
35714 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
35715 # When using ansi2knr, U may be empty or an underscore; expand it
35716 U=`sed -n 's/^U = //p' < "$mf"`
35717 # Find all dependency output files, they are included files with
35718 # $(DEPDIR) in their names. We invoke sed twice because it is the
35719 # simplest approach to changing $(DEPDIR) to its actual value in the
35721 for file in `sed -n "
35722 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
35723 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
35724 # Make sure the directory exists.
35725 test -f "$dirpart/$file" && continue
35726 fdir=`$as_dirname -- "$file" ||
35727 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35728 X"$file" : 'X\(//\)[^/]' \| \
35729 X"$file" : 'X\(//\)$' \| \
35730 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
35731 $as_echo X"$file" |
35732 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35736 /^X\(\/\/\)[^/].*/{
35749 as_dir=$dirpart/$fdir; as_fn_mkdir_p
35750 # echo "creating $dirpart/$file"
35751 echo '# dummy' > "$dirpart/$file"
35756 "stamp-h":C) test -z "$CONFIG_HEADERS" || date > stamp-h ;;
35764 ac_clean_files=$ac_clean_files_save
35766 test $ac_write_fail = 0 ||
35767 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
35770 # configure is writing to config.log, and then calls config.status.
35771 # config.status does its own redirection, appending to config.log.
35772 # Unfortunately, on DOS this fails, as config.log is still kept open
35773 # by configure, so config.status won't be able to write to it; its
35774 # output is simply discarded. So we exec the FD to /dev/null,
35775 # effectively closing config.log, so it can be properly (re)opened and
35776 # appended to by config.status. When coming back to configure, we
35777 # need to make the FD available again.
35778 if test "$no_create" != yes; then
35780 ac_config_status_args=
35781 test "$silent" = yes &&
35782 ac_config_status_args="$ac_config_status_args --quiet"
35784 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35786 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35787 # would make configure fail if this is the last instruction.
35788 $ac_cs_success || as_fn_exit 1
35790 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35792 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}