2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU M4 1.4.17.
5 # Report bugs to <bug-m4@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
27 case `(set -o) 2>/dev/null` in #(
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 as_echo_n='sh -c $as_echo_n_body as_echo'
71 as_echo='sh -c $as_echo_body as_echo'
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
91 # Find who we are. Look in the path if we contain no directory separator.
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
111 if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there. '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137 # Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149 *v*x* | *x*v* ) as_opts=-vx ;;
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 case \`(set -o) 2>/dev/null\` in #(
179 as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193 exitcode=1; echo positional parameters were not saved.
195 test x\$exitcode = x0 || exit 1
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 test -z "$as_dir" && as_dir=.
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
240 if test "x$CONFIG_SHELL" != x; then :
242 # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250 *v*x* | *x*v* ) as_opts=-vx ;;
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-m4@gnu.org
270 $0: about your system, including any error possibly output
271 $0: before this message. Then install a modern shell, or
272 $0: manually run the script under such a shell if you do
279 SHELL=${CONFIG_SHELL-/bin/sh}
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
290 # Portably unset VAR.
293 { eval $1=; unset $1;}
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317 # Create "$as_dir" as a directory, including parents if necessary.
322 -*) as_dir=./$as_dir;;
324 test -d "$as_dir" || eval $as_mkdir_p || {
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
355 test -d "$as_dir" && break
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
368 test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
401 as_val=`expr "$@" || test $? -eq 1`
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
413 as_status=$1; test $as_status -eq 0 && as_status=1
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
418 $as_echo "$as_me: error: $2" >&2
419 as_fn_exit $as_status
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
446 sed '/^.*\/\([^/][^/]*\)\/*$/{
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
488 chmod +x "$as_me.lineno" ||
489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
497 # original and so on. Autoconf is especially sensitive to this).
499 # Exit status is that of the last command.
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
506 case `echo 'xy\c'` in
507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
521 mkdir conf$$.dir 2>/dev/null
523 if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529 # In both cases, we have to default to `cp -pR'.
530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
532 elif ln conf$$.file conf$$ 2>/dev/null; then
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
543 if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
546 test -d ./-p && rmdir ./-p
551 as_executable_p=as_fn_executable_p
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560 test -n "$DJDIR" || exec 7<&0 </dev/null
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 ac_default_prefix=/usr/local
573 ac_config_libobj_dir=.
580 # Identity of this package.
581 PACKAGE_NAME='GNU M4'
583 PACKAGE_VERSION='1.4.17'
584 PACKAGE_STRING='GNU M4 1.4.17'
585 PACKAGE_BUGREPORT='bug-m4@gnu.org'
586 PACKAGE_URL='http://www.gnu.org/software/m4/'
588 ac_unique_file="src/m4.h"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
602 # ifdef HAVE_STDLIB_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
625 gl_use_threads_default=
628 gl_getopt_required=POSIX
629 gl_getopt_required=POSIX
630 ac_subst_vars='M4tests_LTLIBOBJS
643 POSIX_SPAWN_PORTED_FALSE
644 POSIX_SPAWN_PORTED_TRUE
646 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
648 UINT64_MAX_EQ_ULONG_MAX
649 UINT32_MAX_LT_UINTMAX_MAX
652 INT64_MAX_EQ_LONG_MAX
653 INT32_MAX_LT_INTMAX_MAX
664 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
701 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
714 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
718 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
720 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
721 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
722 TIME_H_DEFINES_STRUCT_TIMESPEC
723 NEXT_AS_FIRST_DIRECTIVE_TIME_H
732 HAVE_DECL_LOCALTIME_R
738 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
741 NEXT_AS_FIRST_DIRECTIVE_STRING_H
743 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
745 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
747 GL_GENERATE_STDINT_H_FALSE
748 GL_GENERATE_STDINT_H_TRUE
757 HAVE_SIGNED_SIG_ATOMIC_T
760 BITSIZEOF_SIG_ATOMIC_T
766 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
771 HAVE_UNSIGNED_LONG_LONG_INT
774 GL_GENERATE_STDBOOL_H_FALSE
775 GL_GENERATE_STDBOOL_H_TRUE
777 GL_GENERATE_STDARG_H_FALSE
778 GL_GENERATE_STDARG_H_TRUE
780 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
783 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
786 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
788 GL_GENERATE_SCHED_H_FALSE
789 GL_GENERATE_SCHED_H_TRUE
791 HAVE_STRUCT_SCHED_PARAM
793 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
796 REPLACE_PTHREAD_SIGMASK
798 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
799 HAVE_STRUCT_SIGACTION_SA_SIGACTION
805 HAVE_POSIX_SIGNALBLOCKING
808 GNULIB_SIGNAL_H_SIGPIPE
810 GNULIB_PTHREAD_SIGMASK
811 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
812 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
813 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
815 HAVE_POSIX_SPAWN_FILE_ACTIONS_T
816 HAVE_POSIX_SPAWNATTR_T
818 GNULIB_POSIX_SPAWNATTR_DESTROY
819 GNULIB_POSIX_SPAWNATTR_SETSIGMASK
820 GNULIB_POSIX_SPAWNATTR_GETSIGMASK
821 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
822 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
823 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
824 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
825 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
826 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
827 GNULIB_POSIX_SPAWNATTR_SETPGROUP
828 GNULIB_POSIX_SPAWNATTR_GETPGROUP
829 GNULIB_POSIX_SPAWNATTR_SETFLAGS
830 GNULIB_POSIX_SPAWNATTR_GETFLAGS
831 GNULIB_POSIX_SPAWNATTR_INIT
832 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
833 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
834 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
835 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
836 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
839 APPLE_UNIVERSAL_BUILD
916 NEXT_AS_FIRST_DIRECTIVE_MATH_H
925 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
928 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
930 GL_GENERATE_STDDEF_H_FALSE
931 GL_GENERATE_STDDEF_H_TRUE
943 LOCALCHARSET_TESTS_ENVIRONMENT
945 HAVE_LANGINFO_YESEXPR
947 HAVE_LANGINFO_T_FMT_AMPM
948 HAVE_LANGINFO_CODESET
950 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
955 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
957 REPLACE_STRUCT_TIMEVAL
965 GNULIB_GL_M4_UNISTD_H_GETOPT
968 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
970 WINDOWS_64_BIT_ST_SIZE
971 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1006 WINDOWS_64_BIT_OFF_T
1007 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1009 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1014 REPLACE_SIGNBIT_USING_GCC
1083 HAVE_DECL_REMAINDERL
1265 GL_GENERATE_FLOAT_H_FALSE
1266 GL_GENERATE_FLOAT_H_TRUE
1268 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1270 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1288 REPLACE_STDIO_WRITE_FUNCS
1289 REPLACE_STDIO_READ_FUNCS
1298 REPLACE_OBSTACK_PRINTF
1323 HAVE_DECL_OBSTACK_PRINTF
1329 GNULIB_VSPRINTF_POSIX
1331 GNULIB_VPRINTF_POSIX
1333 GNULIB_VFPRINTF_POSIX
1340 GNULIB_STDIO_H_SIGPIPE
1341 GNULIB_STDIO_H_NONBLOCKING
1342 GNULIB_SPRINTF_POSIX
1356 GNULIB_OBSTACK_PRINTF_POSIX
1357 GNULIB_OBSTACK_PRINTF
1373 GNULIB_FPRINTF_POSIX
1388 GL_GENERATE_ERRNO_H_FALSE
1389 GL_GENERATE_ERRNO_H_TRUE
1391 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1394 PRAGMA_SYSTEM_HEADER
1395 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1400 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1401 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1402 UNISTD_H_HAVE_WINSOCK2_H
1423 REPLACE_GETDOMAINNAME
1434 HAVE_DECL_SETHOSTNAME
1435 HAVE_DECL_GETUSERSHELL
1436 HAVE_DECL_GETPAGESIZE
1437 HAVE_DECL_GETLOGIN_R
1438 HAVE_DECL_GETDOMAINNAME
1477 GNULIB_UNISTD_H_SIGPIPE
1478 GNULIB_UNISTD_H_NONBLOCKING
1504 GNULIB_GETDTABLESIZE
1505 GNULIB_GETDOMAINNAME
1534 REPLACE_CANONICALIZE_FILE_NAME
1539 HAVE_STRUCT_RANDOM_DATA
1561 HAVE_DECL_GETLOADAVG
1562 HAVE_CANONICALIZE_FILE_NAME
1573 GNULIB_SECURE_GETENV
1576 GNULIB_REALLOC_POSIX
1593 GNULIB_CANONICALIZE_FILE_NAME
1695 GL_GENERATE_ALLOCA_H_FALSE
1696 GL_GENERATE_ALLOCA_H_TRUE
1699 GL_COND_LIBTOOL_FALSE
1700 GL_COND_LIBTOOL_TRUE
1735 AM_DEFAULT_VERBOSITY
1746 INSTALL_STRIP_PROGRAM
1788 program_transform_name
1801 enable_option_checking
1803 enable_dependency_tracking
1810 with_libsigsegv_prefix
1814 with_packager_version
1815 with_packager_bug_reports
1821 ac_precious_vars='build_alias
1834 # Initialize some variables set by options.
1836 ac_init_version=false
1837 ac_unrecognized_opts=
1838 ac_unrecognized_sep=
1839 # The variables have the same names as the options, with
1840 # dashes changed to underlines.
1841 cache_file=/dev/null
1848 program_transform_name=s,x,x,
1856 # Installation directory options.
1857 # These are left unexpanded so users can "make install exec_prefix=/foo"
1858 # and all the variables that are supposed to be based on exec_prefix
1859 # by default will actually change.
1860 # Use braces instead of parens because sh, perl, etc. also accept them.
1861 # (The list follows the same order as the GNU Coding Standards.)
1862 bindir='${exec_prefix}/bin'
1863 sbindir='${exec_prefix}/sbin'
1864 libexecdir='${exec_prefix}/libexec'
1865 datarootdir='${prefix}/share'
1866 datadir='${datarootdir}'
1867 sysconfdir='${prefix}/etc'
1868 sharedstatedir='${prefix}/com'
1869 localstatedir='${prefix}/var'
1870 includedir='${prefix}/include'
1871 oldincludedir='/usr/include'
1872 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1873 infodir='${datarootdir}/info'
1878 libdir='${exec_prefix}/lib'
1879 localedir='${datarootdir}/locale'
1880 mandir='${datarootdir}/man'
1886 # If the previous option needs an argument, assign it.
1887 if test -n "$ac_prev"; then
1888 eval $ac_prev=\$ac_option
1894 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1899 # Accept the important Cygnus configure options, so we can diagnose typos.
1901 case $ac_dashdash$ac_option in
1905 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1907 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1908 bindir=$ac_optarg ;;
1910 -build | --build | --buil | --bui | --bu)
1911 ac_prev=build_alias ;;
1912 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1913 build_alias=$ac_optarg ;;
1915 -cache-file | --cache-file | --cache-fil | --cache-fi \
1916 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1917 ac_prev=cache_file ;;
1918 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1919 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1920 cache_file=$ac_optarg ;;
1922 --config-cache | -C)
1923 cache_file=config.cache ;;
1925 -datadir | --datadir | --datadi | --datad)
1927 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1928 datadir=$ac_optarg ;;
1930 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1931 | --dataroo | --dataro | --datar)
1932 ac_prev=datarootdir ;;
1933 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1934 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1935 datarootdir=$ac_optarg ;;
1937 -disable-* | --disable-*)
1938 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1939 # Reject names that are not valid shell variable names.
1940 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1941 as_fn_error $? "invalid feature name: $ac_useropt"
1942 ac_useropt_orig=$ac_useropt
1943 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1944 case $ac_user_opts in
1946 "enable_$ac_useropt"
1948 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1949 ac_unrecognized_sep=', ';;
1951 eval enable_$ac_useropt=no ;;
1953 -docdir | --docdir | --docdi | --doc | --do)
1955 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1956 docdir=$ac_optarg ;;
1958 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1960 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1961 dvidir=$ac_optarg ;;
1963 -enable-* | --enable-*)
1964 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1965 # Reject names that are not valid shell variable names.
1966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1967 as_fn_error $? "invalid feature name: $ac_useropt"
1968 ac_useropt_orig=$ac_useropt
1969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1970 case $ac_user_opts in
1972 "enable_$ac_useropt"
1974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1975 ac_unrecognized_sep=', ';;
1977 eval enable_$ac_useropt=\$ac_optarg ;;
1979 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1980 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1981 | --exec | --exe | --ex)
1982 ac_prev=exec_prefix ;;
1983 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1984 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1985 | --exec=* | --exe=* | --ex=*)
1986 exec_prefix=$ac_optarg ;;
1988 -gas | --gas | --ga | --g)
1989 # Obsolete; use --with-gas.
1992 -help | --help | --hel | --he | -h)
1993 ac_init_help=long ;;
1994 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1995 ac_init_help=recursive ;;
1996 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1997 ac_init_help=short ;;
1999 -host | --host | --hos | --ho)
2000 ac_prev=host_alias ;;
2001 -host=* | --host=* | --hos=* | --ho=*)
2002 host_alias=$ac_optarg ;;
2004 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2006 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2008 htmldir=$ac_optarg ;;
2010 -includedir | --includedir | --includedi | --included | --include \
2011 | --includ | --inclu | --incl | --inc)
2012 ac_prev=includedir ;;
2013 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2014 | --includ=* | --inclu=* | --incl=* | --inc=*)
2015 includedir=$ac_optarg ;;
2017 -infodir | --infodir | --infodi | --infod | --info | --inf)
2019 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2020 infodir=$ac_optarg ;;
2022 -libdir | --libdir | --libdi | --libd)
2024 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2025 libdir=$ac_optarg ;;
2027 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2028 | --libexe | --libex | --libe)
2029 ac_prev=libexecdir ;;
2030 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2031 | --libexe=* | --libex=* | --libe=*)
2032 libexecdir=$ac_optarg ;;
2034 -localedir | --localedir | --localedi | --localed | --locale)
2035 ac_prev=localedir ;;
2036 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2037 localedir=$ac_optarg ;;
2039 -localstatedir | --localstatedir | --localstatedi | --localstated \
2040 | --localstate | --localstat | --localsta | --localst | --locals)
2041 ac_prev=localstatedir ;;
2042 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2043 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2044 localstatedir=$ac_optarg ;;
2046 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2048 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2049 mandir=$ac_optarg ;;
2051 -nfp | --nfp | --nf)
2052 # Obsolete; use --without-fp.
2055 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2056 | --no-cr | --no-c | -n)
2059 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2060 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2063 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2064 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2065 | --oldin | --oldi | --old | --ol | --o)
2066 ac_prev=oldincludedir ;;
2067 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2068 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2069 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2070 oldincludedir=$ac_optarg ;;
2072 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2074 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2075 prefix=$ac_optarg ;;
2077 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2078 | --program-pre | --program-pr | --program-p)
2079 ac_prev=program_prefix ;;
2080 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2081 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2082 program_prefix=$ac_optarg ;;
2084 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2085 | --program-suf | --program-su | --program-s)
2086 ac_prev=program_suffix ;;
2087 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2088 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2089 program_suffix=$ac_optarg ;;
2091 -program-transform-name | --program-transform-name \
2092 | --program-transform-nam | --program-transform-na \
2093 | --program-transform-n | --program-transform- \
2094 | --program-transform | --program-transfor \
2095 | --program-transfo | --program-transf \
2096 | --program-trans | --program-tran \
2097 | --progr-tra | --program-tr | --program-t)
2098 ac_prev=program_transform_name ;;
2099 -program-transform-name=* | --program-transform-name=* \
2100 | --program-transform-nam=* | --program-transform-na=* \
2101 | --program-transform-n=* | --program-transform-=* \
2102 | --program-transform=* | --program-transfor=* \
2103 | --program-transfo=* | --program-transf=* \
2104 | --program-trans=* | --program-tran=* \
2105 | --progr-tra=* | --program-tr=* | --program-t=*)
2106 program_transform_name=$ac_optarg ;;
2108 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2110 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2111 pdfdir=$ac_optarg ;;
2113 -psdir | --psdir | --psdi | --psd | --ps)
2115 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2118 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2119 | -silent | --silent | --silen | --sile | --sil)
2122 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2124 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2126 sbindir=$ac_optarg ;;
2128 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2129 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2130 | --sharedst | --shareds | --shared | --share | --shar \
2132 ac_prev=sharedstatedir ;;
2133 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2134 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2135 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2137 sharedstatedir=$ac_optarg ;;
2139 -site | --site | --sit)
2141 -site=* | --site=* | --sit=*)
2144 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2146 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2147 srcdir=$ac_optarg ;;
2149 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2150 | --syscon | --sysco | --sysc | --sys | --sy)
2151 ac_prev=sysconfdir ;;
2152 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2153 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2154 sysconfdir=$ac_optarg ;;
2156 -target | --target | --targe | --targ | --tar | --ta | --t)
2157 ac_prev=target_alias ;;
2158 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2159 target_alias=$ac_optarg ;;
2161 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2164 -version | --version | --versio | --versi | --vers | -V)
2165 ac_init_version=: ;;
2168 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2169 # Reject names that are not valid shell variable names.
2170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2171 as_fn_error $? "invalid package name: $ac_useropt"
2172 ac_useropt_orig=$ac_useropt
2173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2174 case $ac_user_opts in
2178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2179 ac_unrecognized_sep=', ';;
2181 eval with_$ac_useropt=\$ac_optarg ;;
2183 -without-* | --without-*)
2184 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2185 # Reject names that are not valid shell variable names.
2186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2187 as_fn_error $? "invalid package name: $ac_useropt"
2188 ac_useropt_orig=$ac_useropt
2189 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2190 case $ac_user_opts in
2194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2195 ac_unrecognized_sep=', ';;
2197 eval with_$ac_useropt=no ;;
2200 # Obsolete; use --with-x.
2203 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2204 | --x-incl | --x-inc | --x-in | --x-i)
2205 ac_prev=x_includes ;;
2206 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2207 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2208 x_includes=$ac_optarg ;;
2210 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2211 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2212 ac_prev=x_libraries ;;
2213 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2214 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2215 x_libraries=$ac_optarg ;;
2217 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2218 Try \`$0 --help' for more information"
2222 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2223 # Reject names that are not valid shell variable names.
2224 case $ac_envvar in #(
2225 '' | [0-9]* | *[!_$as_cr_alnum]* )
2226 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2228 eval $ac_envvar=\$ac_optarg
2229 export $ac_envvar ;;
2232 # FIXME: should be removed in autoconf 3.0.
2233 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2234 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2235 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2236 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2242 if test -n "$ac_prev"; then
2243 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2244 as_fn_error $? "missing argument to $ac_option"
2247 if test -n "$ac_unrecognized_opts"; then
2248 case $enable_option_checking in
2250 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2251 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2255 # Check all directory arguments for consistency.
2256 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2257 datadir sysconfdir sharedstatedir localstatedir includedir \
2258 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2259 libdir localedir mandir
2261 eval ac_val=\$$ac_var
2262 # Remove trailing slashes.
2265 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2266 eval $ac_var=\$ac_val;;
2268 # Be sure to have absolute directory names.
2270 [\\/$]* | ?:[\\/]* ) continue;;
2271 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2273 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2276 # There might be people who depend on the old broken behavior: `$host'
2277 # used to hold the argument of --host etc.
2278 # FIXME: To remove some day.
2281 target=$target_alias
2283 # FIXME: To remove some day.
2284 if test "x$host_alias" != x; then
2285 if test "x$build_alias" = x; then
2286 cross_compiling=maybe
2287 elif test "x$build_alias" != "x$host_alias"; then
2293 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2295 test "$silent" = yes && exec 6>/dev/null
2298 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2299 ac_ls_di=`ls -di .` &&
2300 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2301 as_fn_error $? "working directory cannot be determined"
2302 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2303 as_fn_error $? "pwd does not report name of working directory"
2306 # Find the source files, if location was not specified.
2307 if test -z "$srcdir"; then
2308 ac_srcdir_defaulted=yes
2309 # Try the directory containing this script, then the parent directory.
2310 ac_confdir=`$as_dirname -- "$as_myself" ||
2311 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2312 X"$as_myself" : 'X\(//\)[^/]' \| \
2313 X"$as_myself" : 'X\(//\)$' \| \
2314 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2315 $as_echo X"$as_myself" |
2316 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2334 if test ! -r "$srcdir/$ac_unique_file"; then
2338 ac_srcdir_defaulted=no
2340 if test ! -r "$srcdir/$ac_unique_file"; then
2341 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2342 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2344 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2346 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2348 # When building in place, set srcdir=.
2349 if test "$ac_abs_confdir" = "$ac_pwd"; then
2352 # Remove unnecessary trailing slashes from srcdir.
2353 # Double slashes in file names in object file debugging info
2354 # mess up M-x gdb in Emacs.
2356 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2358 for ac_var in $ac_precious_vars; do
2359 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2360 eval ac_env_${ac_var}_value=\$${ac_var}
2361 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2362 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2366 # Report the --help message.
2368 if test "$ac_init_help" = "long"; then
2369 # Omit some internal or obsolete options to make the list less imposing.
2370 # This message is too long to be a string in the A/UX 3.1 sh.
2372 \`configure' configures GNU M4 1.4.17 to adapt to many kinds of systems.
2374 Usage: $0 [OPTION]... [VAR=VALUE]...
2376 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2377 VAR=VALUE. See below for descriptions of some of the useful variables.
2379 Defaults for the options are specified in brackets.
2382 -h, --help display this help and exit
2383 --help=short display options specific to this package
2384 --help=recursive display the short help of all the included packages
2385 -V, --version display version information and exit
2386 -q, --quiet, --silent do not print \`checking ...' messages
2387 --cache-file=FILE cache test results in FILE [disabled]
2388 -C, --config-cache alias for \`--cache-file=config.cache'
2389 -n, --no-create do not create output files
2390 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2392 Installation directories:
2393 --prefix=PREFIX install architecture-independent files in PREFIX
2394 [$ac_default_prefix]
2395 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2398 By default, \`make install' will install all the files in
2399 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2400 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2401 for instance \`--prefix=\$HOME'.
2403 For better control, use the options below.
2405 Fine tuning of the installation directories:
2406 --bindir=DIR user executables [EPREFIX/bin]
2407 --sbindir=DIR system admin executables [EPREFIX/sbin]
2408 --libexecdir=DIR program executables [EPREFIX/libexec]
2409 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2410 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2411 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2412 --libdir=DIR object code libraries [EPREFIX/lib]
2413 --includedir=DIR C header files [PREFIX/include]
2414 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2415 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2416 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2417 --infodir=DIR info documentation [DATAROOTDIR/info]
2418 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2419 --mandir=DIR man documentation [DATAROOTDIR/man]
2420 --docdir=DIR documentation root [DATAROOTDIR/doc/m4]
2421 --htmldir=DIR html documentation [DOCDIR]
2422 --dvidir=DIR dvi documentation [DOCDIR]
2423 --pdfdir=DIR pdf documentation [DOCDIR]
2424 --psdir=DIR ps documentation [DOCDIR]
2430 --program-prefix=PREFIX prepend PREFIX to installed program names
2431 --program-suffix=SUFFIX append SUFFIX to installed program names
2432 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2435 --build=BUILD configure for building on BUILD [guessed]
2436 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2440 if test -n "$ac_init_help"; then
2441 case $ac_init_help in
2442 short | recursive ) echo "Configuration of GNU M4 1.4.17:";;
2447 --disable-option-checking ignore unrecognized --enable/--with options
2448 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2449 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2450 --enable-silent-rules less verbose build output (undo: "make V=1")
2451 --disable-silent-rules verbose build output (undo: "make V=0")
2452 --enable-dependency-tracking
2453 do not reject slow dependency extractors
2454 --disable-dependency-tracking
2455 speeds up one-time build
2456 --disable-largefile omit support for large files
2457 --enable-threads={posix|solaris|pth|windows}
2458 specify multithreading API
2459 --disable-threads build without multithread safety
2460 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
2461 --disable-assert turn off assertions
2462 --disable-rpath do not hardcode runtime library paths
2463 --enable-c++ also build C++ sources
2464 --enable-changeword enable -W and changeword() builtin
2467 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2468 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2469 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2470 --with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib
2471 --without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir
2472 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2473 --without-libpth-prefix don't search for libpth in includedir and libdir
2474 --without-included-regex
2475 don't compile regex; this is the default on systems
2476 with recent-enough versions of the GNU C Library
2477 (use with caution on other systems).
2478 --with-packager String identifying the packager of this software
2479 --with-packager-version Packager-specific version information
2480 --with-packager-bug-reports
2481 Packager info for bug reports (URL/e-mail/...)
2482 --with-syscmd-shell shell used by syscmd [/bin/sh]
2483 --with-dmalloc use dmalloc, as in dmalloc.tar.gz from
2484 @/ftp.antaire.com:antaire/src/dmalloc.
2486 Some influential environment variables:
2487 CC C compiler command
2488 CFLAGS C compiler flags
2489 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2490 nonstandard directory <lib dir>
2491 LIBS libraries to pass to the linker, e.g. -l<library>
2492 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2493 you have headers in a nonstandard directory <include dir>
2495 CXX C++ compiler command
2496 CXXFLAGS C++ compiler flags
2498 Use these variables to override the choices made by `configure' or to help
2499 it to find libraries and programs with nonstandard names/locations.
2501 Report bugs to <bug-m4@gnu.org>.
2502 GNU M4 home page: <http://www.gnu.org/software/m4/>.
2503 General help using GNU software: <http://www.gnu.org/gethelp/>.
2508 if test "$ac_init_help" = "recursive"; then
2509 # If there are subdirs, report their specific --help.
2510 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2511 test -d "$ac_dir" ||
2512 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2517 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2519 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2520 # A ".." for each directory in $ac_dir_suffix.
2521 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2522 case $ac_top_builddir_sub in
2523 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2524 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2527 ac_abs_top_builddir=$ac_pwd
2528 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2529 # for backward compatibility:
2530 ac_top_builddir=$ac_top_build_prefix
2533 .) # We are building in place.
2535 ac_top_srcdir=$ac_top_builddir_sub
2536 ac_abs_top_srcdir=$ac_pwd ;;
2537 [\\/]* | ?:[\\/]* ) # Absolute name.
2538 ac_srcdir=$srcdir$ac_dir_suffix;
2539 ac_top_srcdir=$srcdir
2540 ac_abs_top_srcdir=$srcdir ;;
2542 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2543 ac_top_srcdir=$ac_top_build_prefix$srcdir
2544 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2546 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2548 cd "$ac_dir" || { ac_status=$?; continue; }
2549 # Check for guested configure.
2550 if test -f "$ac_srcdir/configure.gnu"; then
2552 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2553 elif test -f "$ac_srcdir/configure"; then
2555 $SHELL "$ac_srcdir/configure" --help=recursive
2557 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2559 cd "$ac_pwd" || { ac_status=$?; break; }
2563 test -n "$ac_init_help" && exit $ac_status
2564 if $ac_init_version; then
2566 GNU M4 configure 1.4.17
2567 generated by GNU Autoconf 2.69
2569 Copyright (C) 2012 Free Software Foundation, Inc.
2570 This configure script is free software; the Free Software Foundation
2571 gives unlimited permission to copy, distribute and modify it.
2576 ## ------------------------ ##
2577 ## Autoconf initialization. ##
2578 ## ------------------------ ##
2580 # ac_fn_c_try_compile LINENO
2581 # --------------------------
2582 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2583 ac_fn_c_try_compile ()
2585 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586 rm -f conftest.$ac_objext
2587 if { { ac_try="$ac_compile"
2589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2590 *) ac_try_echo=$ac_try;;
2592 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2593 $as_echo "$ac_try_echo"; } >&5
2594 (eval "$ac_compile") 2>conftest.err
2596 if test -s conftest.err; then
2597 grep -v '^ *+' conftest.err >conftest.er1
2598 cat conftest.er1 >&5
2599 mv -f conftest.er1 conftest.err
2601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2602 test $ac_status = 0; } && {
2603 test -z "$ac_c_werror_flag" ||
2604 test ! -s conftest.err
2605 } && test -s conftest.$ac_objext; then :
2608 $as_echo "$as_me: failed program was:" >&5
2609 sed 's/^/| /' conftest.$ac_ext >&5
2613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2614 as_fn_set_status $ac_retval
2616 } # ac_fn_c_try_compile
2618 # ac_fn_c_try_cpp LINENO
2619 # ----------------------
2620 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2623 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2624 if { { ac_try="$ac_cpp conftest.$ac_ext"
2626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2627 *) ac_try_echo=$ac_try;;
2629 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2630 $as_echo "$ac_try_echo"; } >&5
2631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2633 if test -s conftest.err; then
2634 grep -v '^ *+' conftest.err >conftest.er1
2635 cat conftest.er1 >&5
2636 mv -f conftest.er1 conftest.err
2638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2639 test $ac_status = 0; } > conftest.i && {
2640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2641 test ! -s conftest.err
2645 $as_echo "$as_me: failed program was:" >&5
2646 sed 's/^/| /' conftest.$ac_ext >&5
2650 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2651 as_fn_set_status $ac_retval
2655 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2656 # -------------------------------------------------------
2657 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2658 # the include files in INCLUDES and setting the cache variable VAR
2660 ac_fn_c_check_header_mongrel ()
2662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2663 if eval \${$3+:} false; then :
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2665 $as_echo_n "checking for $2... " >&6; }
2666 if eval \${$3+:} false; then :
2667 $as_echo_n "(cached) " >&6
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2671 $as_echo "$ac_res" >&6; }
2673 # Is the header compilable?
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2675 $as_echo_n "checking $2 usability... " >&6; }
2676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2677 /* end confdefs.h. */
2681 if ac_fn_c_try_compile "$LINENO"; then :
2682 ac_header_compiler=yes
2684 ac_header_compiler=no
2686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2688 $as_echo "$ac_header_compiler" >&6; }
2690 # Is the header present?
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2692 $as_echo_n "checking $2 presence... " >&6; }
2693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2694 /* end confdefs.h. */
2697 if ac_fn_c_try_cpp "$LINENO"; then :
2698 ac_header_preproc=yes
2700 ac_header_preproc=no
2702 rm -f conftest.err conftest.i conftest.$ac_ext
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2704 $as_echo "$ac_header_preproc" >&6; }
2706 # So? What about this header?
2707 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2710 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2712 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2716 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2718 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2720 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2722 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2724 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2725 ( $as_echo "## ----------------------------- ##
2726 ## Report this to bug-m4@gnu.org ##
2727 ## ----------------------------- ##"
2728 ) | sed "s/^/$as_me: WARNING: /" >&2
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2732 $as_echo_n "checking for $2... " >&6; }
2733 if eval \${$3+:} false; then :
2734 $as_echo_n "(cached) " >&6
2736 eval "$3=\$ac_header_compiler"
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2740 $as_echo "$ac_res" >&6; }
2742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2744 } # ac_fn_c_check_header_mongrel
2746 # ac_fn_c_try_run LINENO
2747 # ----------------------
2748 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2749 # that executables *can* be run.
2752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2753 if { { ac_try="$ac_link"
2755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2756 *) ac_try_echo=$ac_try;;
2758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2759 $as_echo "$ac_try_echo"; } >&5
2760 (eval "$ac_link") 2>&5
2762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2763 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2764 { { case "(($ac_try" in
2765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2766 *) ac_try_echo=$ac_try;;
2768 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2769 $as_echo "$ac_try_echo"; } >&5
2770 (eval "$ac_try") 2>&5
2772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2773 test $ac_status = 0; }; }; then :
2776 $as_echo "$as_me: program exited with status $ac_status" >&5
2777 $as_echo "$as_me: failed program was:" >&5
2778 sed 's/^/| /' conftest.$ac_ext >&5
2780 ac_retval=$ac_status
2782 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2784 as_fn_set_status $ac_retval
2788 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2789 # -------------------------------------------------------
2790 # Tests whether HEADER exists and can be compiled using the include files in
2791 # INCLUDES, setting the cache variable VAR accordingly.
2792 ac_fn_c_check_header_compile ()
2794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2796 $as_echo_n "checking for $2... " >&6; }
2797 if eval \${$3+:} false; then :
2798 $as_echo_n "(cached) " >&6
2800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801 /* end confdefs.h. */
2805 if ac_fn_c_try_compile "$LINENO"; then :
2810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2814 $as_echo "$ac_res" >&6; }
2815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2817 } # ac_fn_c_check_header_compile
2819 # ac_fn_c_try_link LINENO
2820 # -----------------------
2821 # Try to link conftest.$ac_ext, and return whether this succeeded.
2824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2825 rm -f conftest.$ac_objext conftest$ac_exeext
2826 if { { ac_try="$ac_link"
2828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2829 *) ac_try_echo=$ac_try;;
2831 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2832 $as_echo "$ac_try_echo"; } >&5
2833 (eval "$ac_link") 2>conftest.err
2835 if test -s conftest.err; then
2836 grep -v '^ *+' conftest.err >conftest.er1
2837 cat conftest.er1 >&5
2838 mv -f conftest.er1 conftest.err
2840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2841 test $ac_status = 0; } && {
2842 test -z "$ac_c_werror_flag" ||
2843 test ! -s conftest.err
2844 } && test -s conftest$ac_exeext && {
2845 test "$cross_compiling" = yes ||
2846 test -x conftest$ac_exeext
2850 $as_echo "$as_me: failed program was:" >&5
2851 sed 's/^/| /' conftest.$ac_ext >&5
2855 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2856 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2857 # interfere with the next link command; also delete a directory that is
2858 # left behind by Apple's compiler. We do this before executing the actions.
2859 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2861 as_fn_set_status $ac_retval
2863 } # ac_fn_c_try_link
2865 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2866 # -------------------------------------------
2867 # Tests whether TYPE exists after having included INCLUDES, setting cache
2868 # variable VAR accordingly.
2869 ac_fn_c_check_type ()
2871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2873 $as_echo_n "checking for $2... " >&6; }
2874 if eval \${$3+:} false; then :
2875 $as_echo_n "(cached) " >&6
2878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879 /* end confdefs.h. */
2890 if ac_fn_c_try_compile "$LINENO"; then :
2891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892 /* end confdefs.h. */
2903 if ac_fn_c_try_compile "$LINENO"; then :
2908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2914 $as_echo "$ac_res" >&6; }
2915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2917 } # ac_fn_c_check_type
2919 # ac_fn_c_check_func LINENO FUNC VAR
2920 # ----------------------------------
2921 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2922 ac_fn_c_check_func ()
2924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2926 $as_echo_n "checking for $2... " >&6; }
2927 if eval \${$3+:} false; then :
2928 $as_echo_n "(cached) " >&6
2930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2931 /* end confdefs.h. */
2932 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2933 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2934 #define $2 innocuous_$2
2936 /* System header to define __stub macros and hopefully few prototypes,
2937 which can conflict with char $2 (); below.
2938 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2939 <limits.h> exists even on freestanding compilers. */
2942 # include <limits.h>
2944 # include <assert.h>
2949 /* Override any GCC internal prototype to avoid an error.
2950 Use char because int might match the return type of a GCC
2951 builtin and then its argument prototype would still apply. */
2956 /* The GNU C library defines this for functions which it implements
2957 to always fail with ENOSYS. Some functions are actually named
2958 something starting with __ and the normal name is an alias. */
2959 #if defined __stub_$2 || defined __stub___$2
2971 if ac_fn_c_try_link "$LINENO"; then :
2976 rm -f core conftest.err conftest.$ac_objext \
2977 conftest$ac_exeext conftest.$ac_ext
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2981 $as_echo "$ac_res" >&6; }
2982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2984 } # ac_fn_c_check_func
2986 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2987 # ---------------------------------------------
2988 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2990 ac_fn_c_check_decl ()
2992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2993 as_decl_name=`echo $2|sed 's/ *(.*//'`
2994 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2996 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2997 if eval \${$3+:} false; then :
2998 $as_echo_n "(cached) " >&6
3000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3001 /* end confdefs.h. */
3006 #ifndef $as_decl_name
3008 (void) $as_decl_use;
3010 (void) $as_decl_name;
3018 if ac_fn_c_try_compile "$LINENO"; then :
3023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3027 $as_echo "$ac_res" >&6; }
3028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3030 } # ac_fn_c_check_decl
3032 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3033 # --------------------------------------------
3034 # Tries to find the compile-time value of EXPR in a program that includes
3035 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3037 ac_fn_c_compute_int ()
3039 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3040 if test "$cross_compiling" = yes; then
3041 # Depending upon the size, compute the lo and hi bounds.
3042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3043 /* end confdefs.h. */
3048 static int test_array [1 - 2 * !(($2) >= 0)];
3050 return test_array [0];
3056 if ac_fn_c_try_compile "$LINENO"; then :
3059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060 /* end confdefs.h. */
3065 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3067 return test_array [0];
3073 if ac_fn_c_try_compile "$LINENO"; then :
3074 ac_hi=$ac_mid; break
3076 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3077 if test $ac_lo -le $ac_mid; then
3081 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3087 /* end confdefs.h. */
3092 static int test_array [1 - 2 * !(($2) < 0)];
3094 return test_array [0];
3100 if ac_fn_c_try_compile "$LINENO"; then :
3103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3104 /* end confdefs.h. */
3109 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3111 return test_array [0];
3117 if ac_fn_c_try_compile "$LINENO"; then :
3118 ac_lo=$ac_mid; break
3120 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3121 if test $ac_mid -le $ac_hi; then
3125 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3135 # Binary search between lo and hi bounds.
3136 while test "x$ac_lo" != "x$ac_hi"; do
3137 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3139 /* end confdefs.h. */
3144 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3146 return test_array [0];
3152 if ac_fn_c_try_compile "$LINENO"; then :
3155 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3160 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3165 /* end confdefs.h. */
3167 static long int longval () { return $2; }
3168 static unsigned long int ulongval () { return $2; }
3175 FILE *f = fopen ("conftest.val", "w");
3180 long int i = longval ();
3183 fprintf (f, "%ld", i);
3187 unsigned long int i = ulongval ();
3190 fprintf (f, "%lu", i);
3192 /* Do not output a trailing newline, as this causes \r\n confusion
3193 on some platforms. */
3194 return ferror (f) || fclose (f) != 0;
3200 if ac_fn_c_try_run "$LINENO"; then :
3201 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3206 conftest.$ac_objext conftest.beam conftest.$ac_ext
3210 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3211 as_fn_set_status $ac_retval
3213 } # ac_fn_c_compute_int
3215 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3216 # ----------------------------------------------------
3217 # Tries to find if the field MEMBER exists in type AGGR, after including
3218 # INCLUDES, setting cache variable VAR accordingly.
3219 ac_fn_c_check_member ()
3221 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3223 $as_echo_n "checking for $2.$3... " >&6; }
3224 if eval \${$4+:} false; then :
3225 $as_echo_n "(cached) " >&6
3227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3228 /* end confdefs.h. */
3240 if ac_fn_c_try_compile "$LINENO"; then :
3243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3244 /* end confdefs.h. */
3250 if (sizeof ac_aggr.$3)
3256 if ac_fn_c_try_compile "$LINENO"; then :
3261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3267 $as_echo "$ac_res" >&6; }
3268 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3270 } # ac_fn_c_check_member
3271 cat >config.log <<_ACEOF
3272 This file contains any messages produced by compilers while
3273 running configure, to aid debugging if configure makes a mistake.
3275 It was created by GNU M4 $as_me 1.4.17, which was
3276 generated by GNU Autoconf 2.69. Invocation command line was
3288 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3289 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3290 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3291 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3292 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3294 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3295 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3297 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3298 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3299 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3300 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3301 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3302 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3303 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3311 test -z "$as_dir" && as_dir=.
3312 $as_echo "PATH: $as_dir"
3328 # Keep a trace of the command line.
3329 # Strip out --no-create and --no-recursion so they do not pile up.
3330 # Strip out --silent because we don't want to record it for future runs.
3331 # Also quote any args containing shell meta-characters.
3332 # Make two passes to allow for proper duplicate-argument suppression.
3336 ac_must_keep_next=false
3342 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3343 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3344 | -silent | --silent | --silen | --sile | --sil)
3347 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3350 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3352 as_fn_append ac_configure_args1 " '$ac_arg'"
3353 if test $ac_must_keep_next = true; then
3354 ac_must_keep_next=false # Got value, back to normal.
3357 *=* | --config-cache | -C | -disable-* | --disable-* \
3358 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3359 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3360 | -with-* | --with-* | -without-* | --without-* | --x)
3361 case "$ac_configure_args0 " in
3362 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3365 -* ) ac_must_keep_next=true ;;
3368 as_fn_append ac_configure_args " '$ac_arg'"
3373 { ac_configure_args0=; unset ac_configure_args0;}
3374 { ac_configure_args1=; unset ac_configure_args1;}
3376 # When interrupted or exit'd, cleanup temporary files, and complete
3377 # config.log. We remove comments because anyway the quotes in there
3378 # would cause problems or look ugly.
3379 # WARNING: Use '\'' to represent an apostrophe within the trap.
3380 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3381 trap 'exit_status=$?
3382 # Save into config.log some information that might help in debugging.
3386 $as_echo "## ---------------- ##
3387 ## Cache variables. ##
3388 ## ---------------- ##"
3390 # The following way of writing the cache mishandles newlines in values,
3392 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3393 eval ac_val=\$$ac_var
3397 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3398 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3401 _ | IFS | as_nl) ;; #(
3402 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3403 *) { eval $ac_var=; unset $ac_var;} ;;
3408 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3409 *${as_nl}ac_space=\ *)
3411 "s/'\''/'\''\\\\'\'''\''/g;
3412 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3415 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3422 $as_echo "## ----------------- ##
3423 ## Output variables. ##
3424 ## ----------------- ##"
3426 for ac_var in $ac_subst_vars
3428 eval ac_val=\$$ac_var
3430 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3432 $as_echo "$ac_var='\''$ac_val'\''"
3436 if test -n "$ac_subst_files"; then
3437 $as_echo "## ------------------- ##
3438 ## File substitutions. ##
3439 ## ------------------- ##"
3441 for ac_var in $ac_subst_files
3443 eval ac_val=\$$ac_var
3445 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3447 $as_echo "$ac_var='\''$ac_val'\''"
3452 if test -s confdefs.h; then
3453 $as_echo "## ----------- ##
3460 test "$ac_signal" != 0 &&
3461 $as_echo "$as_me: caught signal $ac_signal"
3462 $as_echo "$as_me: exit $exit_status"
3464 rm -f core *.core core.conftest.* &&
3465 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3468 for ac_signal in 1 2 13 15; do
3469 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3473 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3474 rm -f -r conftest* confdefs.h
3476 $as_echo "/* confdefs.h */" > confdefs.h
3478 # Predefined preprocessor variables.
3480 cat >>confdefs.h <<_ACEOF
3481 #define PACKAGE_NAME "$PACKAGE_NAME"
3484 cat >>confdefs.h <<_ACEOF
3485 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3488 cat >>confdefs.h <<_ACEOF
3489 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3492 cat >>confdefs.h <<_ACEOF
3493 #define PACKAGE_STRING "$PACKAGE_STRING"
3496 cat >>confdefs.h <<_ACEOF
3497 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3500 cat >>confdefs.h <<_ACEOF
3501 #define PACKAGE_URL "$PACKAGE_URL"
3505 # Let the site file select an alternate cache file if it wants to.
3506 # Prefer an explicitly selected file to automatically selected ones.
3509 if test -n "$CONFIG_SITE"; then
3510 # We do not want a PATH search for config.site.
3511 case $CONFIG_SITE in #((
3512 -*) ac_site_file1=./$CONFIG_SITE;;
3513 */*) ac_site_file1=$CONFIG_SITE;;
3514 *) ac_site_file1=./$CONFIG_SITE;;
3516 elif test "x$prefix" != xNONE; then
3517 ac_site_file1=$prefix/share/config.site
3518 ac_site_file2=$prefix/etc/config.site
3520 ac_site_file1=$ac_default_prefix/share/config.site
3521 ac_site_file2=$ac_default_prefix/etc/config.site
3523 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3525 test "x$ac_site_file" = xNONE && continue
3526 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3528 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3529 sed 's/^/| /' "$ac_site_file" >&5
3531 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3532 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3533 as_fn_error $? "failed to load site script $ac_site_file
3534 See \`config.log' for more details" "$LINENO" 5; }
3538 if test -r "$cache_file"; then
3539 # Some versions of bash will fail to source /dev/null (special files
3540 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3541 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3543 $as_echo "$as_me: loading cache $cache_file" >&6;}
3545 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3546 *) . "./$cache_file";;
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3551 $as_echo "$as_me: creating cache $cache_file" >&6;}
3555 gl_use_threads_default=no
3556 as_fn_append ac_func_list " btowc"
3557 as_fn_append ac_func_list " setrlimit"
3558 as_fn_append ac_header_list " ucontext.h"
3559 as_fn_append ac_func_list " sigaltstack"
3560 as_fn_append ac_header_list " unistd.h"
3561 as_fn_append ac_func_list " canonicalize_file_name"
3562 as_fn_append ac_func_list " getcwd"
3563 as_fn_append ac_func_list " readlink"
3564 as_fn_append ac_func_list " realpath"
3565 as_fn_append ac_header_list " sys/param.h"
3566 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3567 as_fn_append ac_header_list " sys/socket.h"
3568 as_fn_append ac_func_list " fcntl"
3569 as_fn_append ac_func_list " symlink"
3570 as_fn_append ac_func_list " mempcpy"
3571 as_fn_append ac_header_list " stdio_ext.h"
3572 as_fn_append ac_func_list " fpurge"
3573 as_fn_append ac_func_list " __fpurge"
3574 as_fn_append ac_func_list " __freadahead"
3575 as_fn_append ac_func_list " __freading"
3576 as_fn_append ac_header_list " sys/stat.h"
3577 as_fn_append ac_func_list " getdtablesize"
3578 gl_getopt_required=GNU
3579 as_fn_append ac_header_list " getopt.h"
3580 as_fn_append ac_header_list " sys/time.h"
3581 as_fn_append ac_func_list " gettimeofday"
3582 as_fn_append ac_header_list " langinfo.h"
3583 as_fn_append ac_header_list " xlocale.h"
3584 as_fn_append ac_func_list " lstat"
3585 as_fn_append ac_header_list " math.h"
3586 as_fn_append ac_func_list " mbsinit"
3587 as_fn_append ac_func_list " mbrtowc"
3588 as_fn_append ac_header_list " sys/mman.h"
3589 as_fn_append ac_func_list " mprotect"
3590 as_fn_append ac_func_list " mkstemp"
3591 as_fn_append ac_func_list " nl_langinfo"
3592 as_fn_append ac_func_list " pipe2"
3593 as_fn_append ac_func_list " posix_spawn"
3595 as_fn_append ac_func_list " isblank"
3596 as_fn_append ac_func_list " iswctype"
3597 as_fn_append ac_func_list " wcscoll"
3598 as_fn_append ac_func_list " link"
3599 as_fn_append ac_header_list " sched.h"
3600 as_fn_append ac_func_list " secure_getenv"
3601 as_fn_append ac_func_list " sigaction"
3602 as_fn_append ac_func_list " siginterrupt"
3603 as_fn_append ac_func_list " snprintf"
3604 as_fn_append ac_header_list " spawn.h"
3605 as_fn_append ac_header_list " wchar.h"
3606 as_fn_append ac_header_list " stdint.h"
3607 as_fn_append ac_func_list " strndup"
3608 as_fn_append ac_header_list " sys/wait.h"
3609 as_fn_append ac_func_list " pipe"
3610 as_fn_append ac_func_list " vasnprintf"
3611 as_fn_append ac_header_list " features.h"
3612 as_fn_append ac_func_list " wcrtomb"
3613 as_fn_append ac_func_list " iswcntrl"
3614 as_fn_append ac_header_list " wctype.h"
3615 as_fn_append ac_header_list " dirent.h"
3616 as_fn_append ac_header_list " inttypes.h"
3617 as_fn_append ac_func_list " newlocale"
3618 as_fn_append ac_func_list " setenv"
3619 as_fn_append ac_func_list " sleep"
3620 as_fn_append ac_func_list " strdup"
3621 as_fn_append ac_func_list " wctob"
3622 # Check that the precious variables saved in the cache have kept the same
3624 ac_cache_corrupted=false
3625 for ac_var in $ac_precious_vars; do
3626 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3627 eval ac_new_set=\$ac_env_${ac_var}_set
3628 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3629 eval ac_new_val=\$ac_env_${ac_var}_value
3630 case $ac_old_set,$ac_new_set in
3632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3633 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3634 ac_cache_corrupted=: ;;
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3637 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3638 ac_cache_corrupted=: ;;
3641 if test "x$ac_old_val" != "x$ac_new_val"; then
3642 # differences in whitespace do not lead to failure.
3643 ac_old_val_w=`echo x $ac_old_val`
3644 ac_new_val_w=`echo x $ac_new_val`
3645 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3647 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3648 ac_cache_corrupted=:
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3651 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3652 eval $ac_var=\$ac_old_val
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3655 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3657 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3660 # Pass precious variables to config.status.
3661 if test "$ac_new_set" = set; then
3663 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3664 *) ac_arg=$ac_var=$ac_new_val ;;
3666 case " $ac_configure_args " in
3667 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3668 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3672 if $ac_cache_corrupted; then
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3674 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3676 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3677 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3679 ## -------------------- ##
3680 ## Main body of script. ##
3681 ## -------------------- ##
3684 ac_cpp='$CPP $CPPFLAGS'
3685 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3686 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3687 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3691 for ac_dir in build-aux "$srcdir"/build-aux; do
3692 if test -f "$ac_dir/install-sh"; then
3694 ac_install_sh="$ac_aux_dir/install-sh -c"
3696 elif test -f "$ac_dir/install.sh"; then
3698 ac_install_sh="$ac_aux_dir/install.sh -c"
3700 elif test -f "$ac_dir/shtool"; then
3702 ac_install_sh="$ac_aux_dir/shtool install -c"
3706 if test -z "$ac_aux_dir"; then
3707 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3710 # These three variables are undocumented and unsupported,
3711 # and are intended to be withdrawn in a future Autoconf release.
3712 # They can cause serious problems if a builder's source tree is in a directory
3713 # whose full name contains unusual characters.
3714 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3715 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3716 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3720 am__api_version='1.14'
3722 # Find a good install program. We prefer a C program (faster),
3723 # so one script is as good as another. But avoid the broken or
3724 # incompatible versions:
3725 # SysV /etc/install, /usr/sbin/install
3726 # SunOS /usr/etc/install
3727 # IRIX /sbin/install
3729 # AmigaOS /C/install, which installs bootblocks on floppy discs
3730 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3731 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3732 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3733 # OS/2's system install, which has a completely different semantic
3734 # ./install, which can be erroneously created by make from ./install.sh.
3735 # Reject install programs that cannot install multiple files.
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3737 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3738 if test -z "$INSTALL"; then
3739 if ${ac_cv_path_install+:} false; then :
3740 $as_echo_n "(cached) " >&6
3742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3746 test -z "$as_dir" && as_dir=.
3747 # Account for people who put trailing slashes in PATH elements.
3748 case $as_dir/ in #((
3749 ./ | .// | /[cC]/* | \
3750 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3751 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3754 # OSF1 and SCO ODT 3.0 have their own names for install.
3755 # Don't use installbsd from OSF since it installs stuff as root
3757 for ac_prog in ginstall scoinst install; do
3758 for ac_exec_ext in '' $ac_executable_extensions; do
3759 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3760 if test $ac_prog = install &&
3761 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3762 # AIX install. It has an incompatible calling convention.
3764 elif test $ac_prog = install &&
3765 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3766 # program-specific install script used by HP pwplus--don't use.
3769 rm -rf conftest.one conftest.two conftest.dir
3770 echo one > conftest.one
3771 echo two > conftest.two
3773 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3774 test -s conftest.one && test -s conftest.two &&
3775 test -s conftest.dir/conftest.one &&
3776 test -s conftest.dir/conftest.two
3778 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3791 rm -rf conftest.one conftest.two conftest.dir
3794 if test "${ac_cv_path_install+set}" = set; then
3795 INSTALL=$ac_cv_path_install
3797 # As a last resort, use the slow shell script. Don't cache a
3798 # value for INSTALL within a source directory, because that will
3799 # break other packages using the cache if that directory is
3800 # removed, or if the value is a relative name.
3801 INSTALL=$ac_install_sh
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3805 $as_echo "$INSTALL" >&6; }
3807 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3808 # It thinks the first close brace ends the variable substitution.
3809 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3811 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3813 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3816 $as_echo_n "checking whether build environment is sane... " >&6; }
3817 # Reject unsafe characters in $srcdir or the absolute working directory
3818 # name. Accept space and tab only in the latter.
3822 *[\\\"\#\$\&\'\`$am_lf]*)
3823 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3826 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3827 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3830 # Do 'set' in a subshell so we don't clobber the current shell's
3831 # arguments. Must try -L first in case configure is actually a
3832 # symlink; some systems play weird games with the mod time of symlinks
3833 # (eg FreeBSD returns the mod time of the symlink's containing
3837 for am_try in 1 2; do
3838 echo "timestamp, slept: $am_has_slept" > conftest.file
3839 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3840 if test "$*" = "X"; then
3842 set X `ls -t "$srcdir/configure" conftest.file`
3844 if test "$*" != "X $srcdir/configure conftest.file" \
3845 && test "$*" != "X conftest.file $srcdir/configure"; then
3847 # If neither matched, then we have a broken ls. This can happen
3848 # if, for instance, CONFIG_SHELL is bash and it inherits a
3849 # broken ls alias from the environment. This has actually
3850 # happened. Such a system could not be considered "sane".
3851 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3852 alias in your environment" "$LINENO" 5
3854 if test "$2" = conftest.file || test $am_try -eq 2; then
3861 test "$2" = conftest.file
3867 as_fn_error $? "newly created file is older than distributed files!
3868 Check your system clock" "$LINENO" 5
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3871 $as_echo "yes" >&6; }
3872 # If we didn't sleep, we still need to ensure time stamps of config.status and
3873 # generated files are strictly newer.
3875 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3882 test "$program_prefix" != NONE &&
3883 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3884 # Use a double $ so make ignores it.
3885 test "$program_suffix" != NONE &&
3886 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3887 # Double any \ or $.
3888 # By default was `s,x,x', remove it if useless.
3889 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3890 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3892 # expand $ac_aux_dir to an absolute path
3893 am_aux_dir=`cd $ac_aux_dir && pwd`
3895 if test x"${MISSING+set}" != xset; then
3898 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3900 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3903 # Use eval to expand $SHELL
3904 if eval "$MISSING --is-lightweight"; then
3905 am_missing_run="$MISSING "
3908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3909 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3912 if test x"${install_sh}" != xset; then
3915 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3917 install_sh="\${SHELL} $am_aux_dir/install-sh"
3921 # Installed binaries are usually stripped using 'strip' when the user
3922 # run "make install-strip". However 'strip' might not be the right
3923 # tool to use in cross-compilation environments, therefore Automake
3924 # will honor the 'STRIP' environment variable to overrule this program.
3925 if test "$cross_compiling" != no; then
3926 if test -n "$ac_tool_prefix"; then
3927 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3928 set dummy ${ac_tool_prefix}strip; ac_word=$2
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3930 $as_echo_n "checking for $ac_word... " >&6; }
3931 if ${ac_cv_prog_STRIP+:} false; then :
3932 $as_echo_n "(cached) " >&6
3934 if test -n "$STRIP"; then
3935 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3941 test -z "$as_dir" && as_dir=.
3942 for ac_exec_ext in '' $ac_executable_extensions; do
3943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3944 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3954 STRIP=$ac_cv_prog_STRIP
3955 if test -n "$STRIP"; then
3956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3957 $as_echo "$STRIP" >&6; }
3959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3960 $as_echo "no" >&6; }
3965 if test -z "$ac_cv_prog_STRIP"; then
3967 # Extract the first word of "strip", so it can be a program name with args.
3968 set dummy strip; ac_word=$2
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3970 $as_echo_n "checking for $ac_word... " >&6; }
3971 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3972 $as_echo_n "(cached) " >&6
3974 if test -n "$ac_ct_STRIP"; then
3975 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3981 test -z "$as_dir" && as_dir=.
3982 for ac_exec_ext in '' $ac_executable_extensions; do
3983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3984 ac_cv_prog_ac_ct_STRIP="strip"
3985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3994 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3995 if test -n "$ac_ct_STRIP"; then
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3997 $as_echo "$ac_ct_STRIP" >&6; }
3999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4000 $as_echo "no" >&6; }
4003 if test "x$ac_ct_STRIP" = x; then
4006 case $cross_compiling:$ac_tool_warned in
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4009 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4010 ac_tool_warned=yes ;;
4015 STRIP="$ac_cv_prog_STRIP"
4019 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4022 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4023 if test -z "$MKDIR_P"; then
4024 if ${ac_cv_path_mkdir+:} false; then :
4025 $as_echo_n "(cached) " >&6
4027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4028 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4031 test -z "$as_dir" && as_dir=.
4032 for ac_prog in mkdir gmkdir; do
4033 for ac_exec_ext in '' $ac_executable_extensions; do
4034 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4035 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4036 'mkdir (GNU coreutils) '* | \
4037 'mkdir (coreutils) '* | \
4038 'mkdir (fileutils) '4.1*)
4039 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4049 test -d ./--version && rmdir ./--version
4050 if test "${ac_cv_path_mkdir+set}" = set; then
4051 MKDIR_P="$ac_cv_path_mkdir -p"
4053 # As a last resort, use the slow shell script. Don't cache a
4054 # value for MKDIR_P within a source directory, because that will
4055 # break other packages using the cache if that directory is
4056 # removed, or if the value is a relative name.
4057 MKDIR_P="$ac_install_sh -d"
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4061 $as_echo "$MKDIR_P" >&6; }
4063 for ac_prog in gawk mawk nawk awk
4065 # Extract the first word of "$ac_prog", so it can be a program name with args.
4066 set dummy $ac_prog; ac_word=$2
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4068 $as_echo_n "checking for $ac_word... " >&6; }
4069 if ${ac_cv_prog_AWK+:} false; then :
4070 $as_echo_n "(cached) " >&6
4072 if test -n "$AWK"; then
4073 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079 test -z "$as_dir" && as_dir=.
4080 for ac_exec_ext in '' $ac_executable_extensions; do
4081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4082 ac_cv_prog_AWK="$ac_prog"
4083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4093 if test -n "$AWK"; then
4094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4095 $as_echo "$AWK" >&6; }
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4098 $as_echo "no" >&6; }
4102 test -n "$AWK" && break
4105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4106 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4108 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4109 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4110 $as_echo_n "(cached) " >&6
4112 cat >conftest.make <<\_ACEOF
4115 @echo '@@@%%%=$(MAKE)=@@@%%%'
4117 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4118 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4120 eval ac_cv_prog_make_${ac_make}_set=yes;;
4122 eval ac_cv_prog_make_${ac_make}_set=no;;
4126 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4128 $as_echo "yes" >&6; }
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4132 $as_echo "no" >&6; }
4133 SET_MAKE="MAKE=${MAKE-make}"
4136 rm -rf .tst 2>/dev/null
4137 mkdir .tst 2>/dev/null
4138 if test -d .tst; then
4143 rmdir .tst 2>/dev/null
4145 # Check whether --enable-silent-rules was given.
4146 if test "${enable_silent_rules+set}" = set; then :
4147 enableval=$enable_silent_rules;
4150 case $enable_silent_rules in # (((
4151 yes) AM_DEFAULT_VERBOSITY=0;;
4152 no) AM_DEFAULT_VERBOSITY=1;;
4153 *) AM_DEFAULT_VERBOSITY=1;;
4155 am_make=${MAKE-make}
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4157 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4158 if ${am_cv_make_support_nested_variables+:} false; then :
4159 $as_echo_n "(cached) " >&6
4161 if $as_echo 'TRUE=$(BAR$(V))
4167 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4168 am_cv_make_support_nested_variables=yes
4170 am_cv_make_support_nested_variables=no
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4174 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4175 if test $am_cv_make_support_nested_variables = yes; then
4177 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4179 AM_V=$AM_DEFAULT_VERBOSITY
4180 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4184 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4185 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4186 # is not polluted with repeated "-I."
4187 am__isrc=' -I$(srcdir)'
4188 # test to see if srcdir already configured
4189 if test -f $srcdir/config.status; then
4190 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4194 # test whether we have cygpath
4195 if test -z "$CYGPATH_W"; then
4196 if (cygpath --version) >/dev/null 2>/dev/null; then
4197 CYGPATH_W='cygpath -w'
4204 # Define the identity of the package.
4209 cat >>confdefs.h <<_ACEOF
4210 #define PACKAGE "$PACKAGE"
4214 cat >>confdefs.h <<_ACEOF
4215 #define VERSION "$VERSION"
4218 # Some tools Automake needs.
4220 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4223 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4226 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4229 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4232 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4234 # For better backward compatibility. To be removed once Automake 1.9.x
4235 # dies out for good. For more background, see:
4236 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4237 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4238 mkdir_p='$(MKDIR_P)'
4240 # We need awk for the "check" target. The system "awk" is bad on
4242 # Always define AMTAR for backward compatibility. Yes, it's still used
4243 # in the wild :-( We should find a proper way to deprecate it ...
4247 # We'll loop over all known methods to create a tar archive until one works.
4248 _am_tools='gnutar pax cpio none'
4250 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4257 # POSIX will say in a future version that running "rm -f" with no argument
4258 # is OK; and we want to be able to make that assumption in our Makefile
4259 # recipes. So use an aggressive probe to check that the usage we want is
4260 # actually supported "in the wild" to an acceptable degree.
4261 # See automake bug#10828.
4262 # To make any issue more visible, cause the running configure to be aborted
4263 # by default if the 'rm' program in use doesn't match our expectations; the
4264 # user can still override this though.
4265 if rm -f && rm -fr && rm -rf; then : OK; else
4269 Your 'rm' program seems unable to run without file operands specified
4270 on the command line, even when the '-f' option is present. This is contrary
4271 to the behaviour of most rm programs out there, and not conforming with
4272 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4274 Please tell bug-automake@gnu.org about your system, including the value
4275 of your $PATH and any error possibly output before this message. This
4276 can help us improve future automake versions.
4279 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4280 echo 'Configuration will proceed anyway, since you have set the' >&2
4281 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4285 Aborting the configuration process, to ensure you take notice of the issue.
4287 You can download and install GNU coreutils to get an 'rm' implementation
4288 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4290 If you want to complete the configuration process using your problematic
4291 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4292 to "yes", and re-run configure.
4295 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4302 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
4306 ac_cpp='$CPP $CPPFLAGS'
4307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4310 if test -n "$ac_tool_prefix"; then
4311 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4312 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4314 $as_echo_n "checking for $ac_word... " >&6; }
4315 if ${ac_cv_prog_CC+:} false; then :
4316 $as_echo_n "(cached) " >&6
4318 if test -n "$CC"; then
4319 ac_cv_prog_CC="$CC" # Let the user override the test.
4321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4325 test -z "$as_dir" && as_dir=.
4326 for ac_exec_ext in '' $ac_executable_extensions; do
4327 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4328 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4329 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4339 if test -n "$CC"; then
4340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4341 $as_echo "$CC" >&6; }
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4344 $as_echo "no" >&6; }
4349 if test -z "$ac_cv_prog_CC"; then
4351 # Extract the first word of "gcc", so it can be a program name with args.
4352 set dummy gcc; ac_word=$2
4353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354 $as_echo_n "checking for $ac_word... " >&6; }
4355 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4356 $as_echo_n "(cached) " >&6
4358 if test -n "$ac_ct_CC"; then
4359 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365 test -z "$as_dir" && as_dir=.
4366 for ac_exec_ext in '' $ac_executable_extensions; do
4367 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4368 ac_cv_prog_ac_ct_CC="gcc"
4369 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4378 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4379 if test -n "$ac_ct_CC"; then
4380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4381 $as_echo "$ac_ct_CC" >&6; }
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4384 $as_echo "no" >&6; }
4387 if test "x$ac_ct_CC" = x; then
4390 case $cross_compiling:$ac_tool_warned in
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4393 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4394 ac_tool_warned=yes ;;
4402 if test -z "$CC"; then
4403 if test -n "$ac_tool_prefix"; then
4404 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4405 set dummy ${ac_tool_prefix}cc; ac_word=$2
4406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4407 $as_echo_n "checking for $ac_word... " >&6; }
4408 if ${ac_cv_prog_CC+:} false; then :
4409 $as_echo_n "(cached) " >&6
4411 if test -n "$CC"; then
4412 ac_cv_prog_CC="$CC" # Let the user override the test.
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4418 test -z "$as_dir" && as_dir=.
4419 for ac_exec_ext in '' $ac_executable_extensions; do
4420 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4421 ac_cv_prog_CC="${ac_tool_prefix}cc"
4422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4432 if test -n "$CC"; then
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4434 $as_echo "$CC" >&6; }
4436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4437 $as_echo "no" >&6; }
4443 if test -z "$CC"; then
4444 # Extract the first word of "cc", so it can be a program name with args.
4445 set dummy cc; ac_word=$2
4446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4447 $as_echo_n "checking for $ac_word... " >&6; }
4448 if ${ac_cv_prog_CC+:} false; then :
4449 $as_echo_n "(cached) " >&6
4451 if test -n "$CC"; then
4452 ac_cv_prog_CC="$CC" # Let the user override the test.
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459 test -z "$as_dir" && as_dir=.
4460 for ac_exec_ext in '' $ac_executable_extensions; do
4461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4462 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4463 ac_prog_rejected=yes
4467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4474 if test $ac_prog_rejected = yes; then
4475 # We found a bogon in the path, so make sure we never use it.
4476 set dummy $ac_cv_prog_CC
4478 if test $# != 0; then
4479 # We chose a different compiler from the bogus one.
4480 # However, it has the same basename, so the bogon will be chosen
4481 # first if we set CC to just the basename; use the full file name.
4483 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4489 if test -n "$CC"; then
4490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4491 $as_echo "$CC" >&6; }
4493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4494 $as_echo "no" >&6; }
4499 if test -z "$CC"; then
4500 if test -n "$ac_tool_prefix"; then
4501 for ac_prog in cl.exe
4503 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4504 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4506 $as_echo_n "checking for $ac_word... " >&6; }
4507 if ${ac_cv_prog_CC+:} false; then :
4508 $as_echo_n "(cached) " >&6
4510 if test -n "$CC"; then
4511 ac_cv_prog_CC="$CC" # Let the user override the test.
4513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517 test -z "$as_dir" && as_dir=.
4518 for ac_exec_ext in '' $ac_executable_extensions; do
4519 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4520 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4531 if test -n "$CC"; then
4532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4533 $as_echo "$CC" >&6; }
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4536 $as_echo "no" >&6; }
4540 test -n "$CC" && break
4543 if test -z "$CC"; then
4545 for ac_prog in cl.exe
4547 # Extract the first word of "$ac_prog", so it can be a program name with args.
4548 set dummy $ac_prog; ac_word=$2
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4550 $as_echo_n "checking for $ac_word... " >&6; }
4551 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4552 $as_echo_n "(cached) " >&6
4554 if test -n "$ac_ct_CC"; then
4555 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4561 test -z "$as_dir" && as_dir=.
4562 for ac_exec_ext in '' $ac_executable_extensions; do
4563 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4564 ac_cv_prog_ac_ct_CC="$ac_prog"
4565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4574 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4575 if test -n "$ac_ct_CC"; then
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4577 $as_echo "$ac_ct_CC" >&6; }
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580 $as_echo "no" >&6; }
4584 test -n "$ac_ct_CC" && break
4587 if test "x$ac_ct_CC" = x; then
4590 case $cross_compiling:$ac_tool_warned in
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4593 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4594 ac_tool_warned=yes ;;
4603 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4604 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4605 as_fn_error $? "no acceptable C compiler found in \$PATH
4606 See \`config.log' for more details" "$LINENO" 5; }
4608 # Provide some information about the compiler.
4609 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4612 for ac_option in --version -v -V -qversion; do
4613 { { ac_try="$ac_compiler $ac_option >&5"
4615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4616 *) ac_try_echo=$ac_try;;
4618 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4619 $as_echo "$ac_try_echo"; } >&5
4620 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4622 if test -s conftest.err; then
4624 ... rest of stderr output deleted ...
4625 10q' conftest.err >conftest.er1
4626 cat conftest.er1 >&5
4628 rm -f conftest.er1 conftest.err
4629 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4630 test $ac_status = 0; }
4633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4634 /* end confdefs.h. */
4644 ac_clean_files_save=$ac_clean_files
4645 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4646 # Try to create an executable without -o first, disregard a.out.
4647 # It will help us diagnose broken compilers, and finding out an intuition
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4650 $as_echo_n "checking whether the C compiler works... " >&6; }
4651 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4653 # The possible output files:
4654 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4657 for ac_file in $ac_files
4660 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4661 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4666 if { { ac_try="$ac_link_default"
4668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4669 *) ac_try_echo=$ac_try;;
4671 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4672 $as_echo "$ac_try_echo"; } >&5
4673 (eval "$ac_link_default") 2>&5
4675 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4676 test $ac_status = 0; }; then :
4677 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4678 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4679 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4680 # so that the user can short-circuit this test for compilers unknown to
4682 for ac_file in $ac_files ''
4684 test -f "$ac_file" || continue
4686 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4689 # We found the default executable, but exeext='' is most
4693 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4695 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4697 # We set ac_cv_exeext here because the later test for it is not
4698 # safe: cross compilers may not add the suffix if given an `-o'
4699 # argument, so we may need to know it at that point already.
4700 # Even if this section looks crufty: it has the advantage of
4707 test "$ac_cv_exeext" = no && ac_cv_exeext=
4712 if test -z "$ac_file"; then :
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714 $as_echo "no" >&6; }
4715 $as_echo "$as_me: failed program was:" >&5
4716 sed 's/^/| /' conftest.$ac_ext >&5
4718 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4719 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4720 as_fn_error 77 "C compiler cannot create executables
4721 See \`config.log' for more details" "$LINENO" 5; }
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4724 $as_echo "yes" >&6; }
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4727 $as_echo_n "checking for C compiler default output file name... " >&6; }
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4729 $as_echo "$ac_file" >&6; }
4730 ac_exeext=$ac_cv_exeext
4732 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4733 ac_clean_files=$ac_clean_files_save
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4735 $as_echo_n "checking for suffix of executables... " >&6; }
4736 if { { ac_try="$ac_link"
4738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4739 *) ac_try_echo=$ac_try;;
4741 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4742 $as_echo "$ac_try_echo"; } >&5
4743 (eval "$ac_link") 2>&5
4745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4746 test $ac_status = 0; }; then :
4747 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4748 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4749 # work properly (i.e., refer to `conftest.exe'), while it won't with
4751 for ac_file in conftest.exe conftest conftest.*; do
4752 test -f "$ac_file" || continue
4754 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4755 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4762 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4763 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4764 See \`config.log' for more details" "$LINENO" 5; }
4766 rm -f conftest conftest$ac_cv_exeext
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4768 $as_echo "$ac_cv_exeext" >&6; }
4770 rm -f conftest.$ac_ext
4771 EXEEXT=$ac_cv_exeext
4773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4774 /* end confdefs.h. */
4779 FILE *f = fopen ("conftest.out", "w");
4780 return ferror (f) || fclose (f) != 0;
4786 ac_clean_files="$ac_clean_files conftest.out"
4787 # Check that the compiler produces executables we can run. If not, either
4788 # the compiler is broken, or we cross compile.
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4790 $as_echo_n "checking whether we are cross compiling... " >&6; }
4791 if test "$cross_compiling" != yes; then
4792 { { ac_try="$ac_link"
4794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4795 *) ac_try_echo=$ac_try;;
4797 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4798 $as_echo "$ac_try_echo"; } >&5
4799 (eval "$ac_link") 2>&5
4801 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4802 test $ac_status = 0; }
4803 if { ac_try='./conftest$ac_cv_exeext'
4804 { { case "(($ac_try" in
4805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4806 *) ac_try_echo=$ac_try;;
4808 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4809 $as_echo "$ac_try_echo"; } >&5
4810 (eval "$ac_try") 2>&5
4812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4813 test $ac_status = 0; }; }; then
4816 if test "$cross_compiling" = maybe; then
4819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4820 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4821 as_fn_error $? "cannot run C compiled programs.
4822 If you meant to cross compile, use \`--host'.
4823 See \`config.log' for more details" "$LINENO" 5; }
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4828 $as_echo "$cross_compiling" >&6; }
4830 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4831 ac_clean_files=$ac_clean_files_save
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4833 $as_echo_n "checking for suffix of object files... " >&6; }
4834 if ${ac_cv_objext+:} false; then :
4835 $as_echo_n "(cached) " >&6
4837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838 /* end confdefs.h. */
4848 rm -f conftest.o conftest.obj
4849 if { { ac_try="$ac_compile"
4851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4852 *) ac_try_echo=$ac_try;;
4854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4855 $as_echo "$ac_try_echo"; } >&5
4856 (eval "$ac_compile") 2>&5
4858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4859 test $ac_status = 0; }; then :
4860 for ac_file in conftest.o conftest.obj conftest.*; do
4861 test -f "$ac_file" || continue;
4863 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4864 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4869 $as_echo "$as_me: failed program was:" >&5
4870 sed 's/^/| /' conftest.$ac_ext >&5
4872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4873 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4874 as_fn_error $? "cannot compute suffix of object files: cannot compile
4875 See \`config.log' for more details" "$LINENO" 5; }
4877 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4880 $as_echo "$ac_cv_objext" >&6; }
4881 OBJEXT=$ac_cv_objext
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4884 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4885 if ${ac_cv_c_compiler_gnu+:} false; then :
4886 $as_echo_n "(cached) " >&6
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4902 if ac_fn_c_try_compile "$LINENO"; then :
4907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4912 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4913 if test $ac_compiler_gnu = yes; then
4918 ac_test_CFLAGS=${CFLAGS+set}
4919 ac_save_CFLAGS=$CFLAGS
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4921 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4922 if ${ac_cv_prog_cc_g+:} false; then :
4923 $as_echo_n "(cached) " >&6
4925 ac_save_c_werror_flag=$ac_c_werror_flag
4926 ac_c_werror_flag=yes
4929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4930 /* end confdefs.h. */
4940 if ac_fn_c_try_compile "$LINENO"; then :
4944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4945 /* end confdefs.h. */
4955 if ac_fn_c_try_compile "$LINENO"; then :
4958 ac_c_werror_flag=$ac_save_c_werror_flag
4960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4961 /* end confdefs.h. */
4971 if ac_fn_c_try_compile "$LINENO"; then :
4974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4979 ac_c_werror_flag=$ac_save_c_werror_flag
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4982 $as_echo "$ac_cv_prog_cc_g" >&6; }
4983 if test "$ac_test_CFLAGS" = set; then
4984 CFLAGS=$ac_save_CFLAGS
4985 elif test $ac_cv_prog_cc_g = yes; then
4986 if test "$GCC" = yes; then
4992 if test "$GCC" = yes; then
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4999 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5000 if ${ac_cv_prog_cc_c89+:} false; then :
5001 $as_echo_n "(cached) " >&6
5003 ac_cv_prog_cc_c89=no
5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006 /* end confdefs.h. */
5010 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5011 struct buf { int x; };
5012 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5013 static char *e (p, i)
5019 static char *f (char * (*g) (char **, int), char **p, ...)
5024 s = g (p, va_arg (v,int));
5029 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5030 function prototypes and stuff, but not '\xHH' hex character constants.
5031 These don't provoke an error unfortunately, instead are silently treated
5032 as 'x'. The following induces an error, until -std is added to get
5033 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5034 array size at least. It's necessary to write '\x00'==0 to get something
5035 that's true only with -std. */
5036 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5038 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5039 inside strings and character constants. */
5041 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5043 int test (int i, double x);
5044 struct s1 {int (*f) (int a);};
5045 struct s2 {int (*f) (double a);};
5046 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5052 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5057 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5058 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5060 CC="$ac_save_CC $ac_arg"
5061 if ac_fn_c_try_compile "$LINENO"; then :
5062 ac_cv_prog_cc_c89=$ac_arg
5064 rm -f core conftest.err conftest.$ac_objext
5065 test "x$ac_cv_prog_cc_c89" != "xno" && break
5067 rm -f conftest.$ac_ext
5072 case "x$ac_cv_prog_cc_c89" in
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5075 $as_echo "none needed" >&6; } ;;
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5078 $as_echo "unsupported" >&6; } ;;
5080 CC="$CC $ac_cv_prog_cc_c89"
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5082 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5084 if test "x$ac_cv_prog_cc_c89" != xno; then :
5089 ac_cpp='$CPP $CPPFLAGS'
5090 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5091 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5092 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5095 ac_cpp='$CPP $CPPFLAGS'
5096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5100 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5101 if ${am_cv_prog_cc_c_o+:} false; then :
5102 $as_echo_n "(cached) " >&6
5104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5105 /* end confdefs.h. */
5115 # Make sure it works both with $CC and with simple cc.
5116 # Following AC_PROG_CC_C_O, we do the test twice because some
5117 # compilers refuse to overwrite an existing .o file with -o,
5118 # though they will create one.
5119 am_cv_prog_cc_c_o=yes
5121 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5122 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125 (exit $ac_status); } \
5126 && test -f conftest2.$ac_objext; then
5129 am_cv_prog_cc_c_o=no
5133 rm -f core conftest*
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5137 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5138 if test "$am_cv_prog_cc_c_o" != yes; then
5139 # Losing compiler, so override with the script.
5140 # FIXME: It is wrong to rewrite CC.
5141 # But if we don't then we get into trouble of one sort or another.
5142 # A longer-term fix would be to have automake use am__CC in this case,
5143 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5144 CC="$am_aux_dir/compile $CC"
5147 ac_cpp='$CPP $CPPFLAGS'
5148 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5149 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5152 DEPDIR="${am__leading_dot}deps"
5154 ac_config_commands="$ac_config_commands depfiles"
5157 am_make=${MAKE-make}
5158 cat > confinc << 'END'
5160 @echo this is the am__doit target
5163 # If we don't find an include directive, just comment out the code.
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5165 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5169 # First try GNU make style include.
5170 echo "include confinc" > confmf
5171 # Ignore all kinds of additional output from 'make'.
5172 case `$am_make -s -f confmf 2> /dev/null` in #(
5173 *the\ am__doit\ target*)
5179 # Now try BSD make style include.
5180 if test "$am__include" = "#"; then
5181 echo '.include "confinc"' > confmf
5182 case `$am_make -s -f confmf 2> /dev/null` in #(
5183 *the\ am__doit\ target*)
5184 am__include=.include
5192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5193 $as_echo "$_am_result" >&6; }
5194 rm -f confinc confmf
5196 # Check whether --enable-dependency-tracking was given.
5197 if test "${enable_dependency_tracking+set}" = set; then :
5198 enableval=$enable_dependency_tracking;
5201 if test "x$enable_dependency_tracking" != xno; then
5202 am_depcomp="$ac_aux_dir/depcomp"
5206 if test "x$enable_dependency_tracking" != xno; then
5216 depcc="$CC" am_compiler_list=
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5219 $as_echo_n "checking dependency style of $depcc... " >&6; }
5220 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5221 $as_echo_n "(cached) " >&6
5223 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5224 # We make a subdir and do the tests there. Otherwise we can end up
5225 # making bogus files that we don't know about and never remove. For
5226 # instance it was reported that on HP-UX the gcc test will end up
5227 # making a dummy file named 'D' -- because '-MD' means "put the output
5231 # Copy depcomp to subdir because otherwise we won't find it if we're
5232 # using a relative directory.
5233 cp "$am_depcomp" conftest.dir
5235 # We will build objects and dependencies in a subdirectory because
5236 # it helps to detect inapplicable dependency modes. For instance
5237 # both Tru64's cc and ICC support -MD to output dependencies as a
5238 # side effect of compilation, but ICC will put the dependencies in
5239 # the current directory while Tru64 will put them in the object
5243 am_cv_CC_dependencies_compiler_type=none
5244 if test "$am_compiler_list" = ""; then
5245 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5248 case " $depcc " in #(
5249 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5252 for depmode in $am_compiler_list; do
5253 # Setup a source with many dependencies, because some compilers
5254 # like to wrap large dependency lists on column 80 (with \), and
5255 # we should not choose a depcomp mode which is confused by this.
5257 # We need to recreate these files for each test, as the compiler may
5258 # overwrite some of them when testing with obscure command lines.
5259 # This happens at least with the AIX C compiler.
5261 for i in 1 2 3 4 5 6; do
5262 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5263 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5264 # Solaris 10 /bin/sh.
5265 echo '/* dummy */' > sub/conftst$i.h
5267 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5269 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5270 # mode. It turns out that the SunPro C++ compiler does not properly
5271 # handle '-M -o', and we need to detect this. Also, some Intel
5272 # versions had trouble with output in subdirs.
5273 am__obj=sub/conftest.${OBJEXT-o}
5274 am__minus_obj="-o $am__obj"
5277 # This depmode causes a compiler race in universal mode.
5278 test "$am__universal" = false || continue
5281 # After this tag, mechanisms are not by side-effect, so they'll
5282 # only be used when explicitly requested.
5283 if test "x$enable_dependency_tracking" = xyes; then
5289 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5290 # This compiler won't grok '-c -o', but also, the minuso test has
5291 # not run yet. These depmodes are late enough in the game, and
5292 # so weak that their functioning should not be impacted.
5293 am__obj=conftest.${OBJEXT-o}
5298 if depmode=$depmode \
5299 source=sub/conftest.c object=$am__obj \
5300 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5301 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5302 >/dev/null 2>conftest.err &&
5303 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5304 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5305 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5306 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5307 # icc doesn't choke on unknown options, it will just issue warnings
5308 # or remarks (even with -Werror). So we grep stderr for any message
5309 # that says an option was ignored or not supported.
5310 # When given -MP, icc 7.0 and 7.1 complain thusly:
5311 # icc: Command line warning: ignoring option '-M'; no argument required
5312 # The diagnosis changed in icc 8.0:
5313 # icc: Command line remark: option '-MP' not supported
5314 if (grep 'ignoring option' conftest.err ||
5315 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5316 am_cv_CC_dependencies_compiler_type=$depmode
5325 am_cv_CC_dependencies_compiler_type=none
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5330 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5331 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5334 test "x$enable_dependency_tracking" != xno \
5335 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5337 am__fastdepCC_FALSE='#'
5339 am__fastdepCC_TRUE='#'
5340 am__fastdepCC_FALSE=
5347 ac_cpp='$CPP $CPPFLAGS'
5348 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5349 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5350 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5352 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5353 # On Suns, sometimes $CPP names a directory.
5354 if test -n "$CPP" && test -d "$CPP"; then
5357 if test -z "$CPP"; then
5358 if ${ac_cv_prog_CPP+:} false; then :
5359 $as_echo_n "(cached) " >&6
5361 # Double quotes because CPP needs to be expanded
5362 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5365 for ac_c_preproc_warn_flag in '' yes
5367 # Use a header file that comes with gcc, so configuring glibc
5368 # with a fresh cross-compiler works.
5369 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5370 # <limits.h> exists even on freestanding compilers.
5371 # On the NeXT, cc -E runs the code through the compiler's parser,
5372 # not just through cpp. "Syntax error" is here to catch this case.
5373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374 /* end confdefs.h. */
5376 # include <limits.h>
5378 # include <assert.h>
5382 if ac_fn_c_try_cpp "$LINENO"; then :
5385 # Broken: fails on valid input.
5388 rm -f conftest.err conftest.i conftest.$ac_ext
5390 # OK, works on sane cases. Now check whether nonexistent headers
5391 # can be detected and how.
5392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5393 /* end confdefs.h. */
5394 #include <ac_nonexistent.h>
5396 if ac_fn_c_try_cpp "$LINENO"; then :
5397 # Broken: success on invalid input.
5400 # Passes both tests.
5404 rm -f conftest.err conftest.i conftest.$ac_ext
5407 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5408 rm -f conftest.i conftest.err conftest.$ac_ext
5409 if $ac_preproc_ok; then :
5421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5422 $as_echo "$CPP" >&6; }
5424 for ac_c_preproc_warn_flag in '' yes
5426 # Use a header file that comes with gcc, so configuring glibc
5427 # with a fresh cross-compiler works.
5428 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5429 # <limits.h> exists even on freestanding compilers.
5430 # On the NeXT, cc -E runs the code through the compiler's parser,
5431 # not just through cpp. "Syntax error" is here to catch this case.
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5433 /* end confdefs.h. */
5435 # include <limits.h>
5437 # include <assert.h>
5441 if ac_fn_c_try_cpp "$LINENO"; then :
5444 # Broken: fails on valid input.
5447 rm -f conftest.err conftest.i conftest.$ac_ext
5449 # OK, works on sane cases. Now check whether nonexistent headers
5450 # can be detected and how.
5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5452 /* end confdefs.h. */
5453 #include <ac_nonexistent.h>
5455 if ac_fn_c_try_cpp "$LINENO"; then :
5456 # Broken: success on invalid input.
5459 # Passes both tests.
5463 rm -f conftest.err conftest.i conftest.$ac_ext
5466 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5467 rm -f conftest.i conftest.err conftest.$ac_ext
5468 if $ac_preproc_ok; then :
5471 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5472 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5473 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5474 See \`config.log' for more details" "$LINENO" 5; }
5478 ac_cpp='$CPP $CPPFLAGS'
5479 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5480 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5481 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5485 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5486 if ${ac_cv_path_GREP+:} false; then :
5487 $as_echo_n "(cached) " >&6
5489 if test -z "$GREP"; then
5490 ac_path_GREP_found=false
5491 # Loop through the user's path and test for each of PROGNAME-LIST
5492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5496 test -z "$as_dir" && as_dir=.
5497 for ac_prog in grep ggrep; do
5498 for ac_exec_ext in '' $ac_executable_extensions; do
5499 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5500 as_fn_executable_p "$ac_path_GREP" || continue
5501 # Check for GNU ac_path_GREP and select it if it is found.
5502 # Check for GNU $ac_path_GREP
5503 case `"$ac_path_GREP" --version 2>&1` in
5505 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5508 $as_echo_n 0123456789 >"conftest.in"
5511 cat "conftest.in" "conftest.in" >"conftest.tmp"
5512 mv "conftest.tmp" "conftest.in"
5513 cp "conftest.in" "conftest.nl"
5514 $as_echo 'GREP' >> "conftest.nl"
5515 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5516 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5517 as_fn_arith $ac_count + 1 && ac_count=$as_val
5518 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5519 # Best one so far, save it but keep looking for a better one
5520 ac_cv_path_GREP="$ac_path_GREP"
5521 ac_path_GREP_max=$ac_count
5523 # 10*(2^10) chars as input seems more than enough
5524 test $ac_count -gt 10 && break
5526 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5529 $ac_path_GREP_found && break 3
5534 if test -z "$ac_cv_path_GREP"; then
5535 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5538 ac_cv_path_GREP=$GREP
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5543 $as_echo "$ac_cv_path_GREP" >&6; }
5544 GREP="$ac_cv_path_GREP"
5547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5548 $as_echo_n "checking for egrep... " >&6; }
5549 if ${ac_cv_path_EGREP+:} false; then :
5550 $as_echo_n "(cached) " >&6
5552 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5553 then ac_cv_path_EGREP="$GREP -E"
5555 if test -z "$EGREP"; then
5556 ac_path_EGREP_found=false
5557 # Loop through the user's path and test for each of PROGNAME-LIST
5558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5559 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5562 test -z "$as_dir" && as_dir=.
5563 for ac_prog in egrep; do
5564 for ac_exec_ext in '' $ac_executable_extensions; do
5565 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5566 as_fn_executable_p "$ac_path_EGREP" || continue
5567 # Check for GNU ac_path_EGREP and select it if it is found.
5568 # Check for GNU $ac_path_EGREP
5569 case `"$ac_path_EGREP" --version 2>&1` in
5571 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5574 $as_echo_n 0123456789 >"conftest.in"
5577 cat "conftest.in" "conftest.in" >"conftest.tmp"
5578 mv "conftest.tmp" "conftest.in"
5579 cp "conftest.in" "conftest.nl"
5580 $as_echo 'EGREP' >> "conftest.nl"
5581 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5582 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5583 as_fn_arith $ac_count + 1 && ac_count=$as_val
5584 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5585 # Best one so far, save it but keep looking for a better one
5586 ac_cv_path_EGREP="$ac_path_EGREP"
5587 ac_path_EGREP_max=$ac_count
5589 # 10*(2^10) chars as input seems more than enough
5590 test $ac_count -gt 10 && break
5592 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5595 $ac_path_EGREP_found && break 3
5600 if test -z "$ac_cv_path_EGREP"; then
5601 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5604 ac_cv_path_EGREP=$EGREP
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5610 $as_echo "$ac_cv_path_EGREP" >&6; }
5611 EGREP="$ac_cv_path_EGREP"
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5617 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5618 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5619 $as_echo_n "(cached) " >&6
5622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5623 /* end confdefs.h. */
5630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5631 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5632 gl_cv_c_amsterdam_compiler=yes
5634 gl_cv_c_amsterdam_compiler=no
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5641 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5642 if test -z "$AR"; then
5643 if test $gl_cv_c_amsterdam_compiler = yes; then
5645 if test -z "$ARFLAGS"; then
5649 if test -n "$ac_tool_prefix"; then
5650 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5651 set dummy ${ac_tool_prefix}ar; ac_word=$2
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5653 $as_echo_n "checking for $ac_word... " >&6; }
5654 if ${ac_cv_prog_AR+:} false; then :
5655 $as_echo_n "(cached) " >&6
5657 if test -n "$AR"; then
5658 ac_cv_prog_AR="$AR" # Let the user override the test.
5660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5664 test -z "$as_dir" && as_dir=.
5665 for ac_exec_ext in '' $ac_executable_extensions; do
5666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5667 ac_cv_prog_AR="${ac_tool_prefix}ar"
5668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5678 if test -n "$AR"; then
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5680 $as_echo "$AR" >&6; }
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5683 $as_echo "no" >&6; }
5688 if test -z "$ac_cv_prog_AR"; then
5690 # Extract the first word of "ar", so it can be a program name with args.
5691 set dummy ar; ac_word=$2
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5693 $as_echo_n "checking for $ac_word... " >&6; }
5694 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5695 $as_echo_n "(cached) " >&6
5697 if test -n "$ac_ct_AR"; then
5698 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5704 test -z "$as_dir" && as_dir=.
5705 for ac_exec_ext in '' $ac_executable_extensions; do
5706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5707 ac_cv_prog_ac_ct_AR="ar"
5708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5717 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5718 if test -n "$ac_ct_AR"; then
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5720 $as_echo "$ac_ct_AR" >&6; }
5722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5723 $as_echo "no" >&6; }
5726 if test "x$ac_ct_AR" = x; then
5729 case $cross_compiling:$ac_tool_warned in
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5732 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5733 ac_tool_warned=yes ;;
5741 if test -z "$ARFLAGS"; then
5746 if test -z "$ARFLAGS"; then
5752 if test -z "$RANLIB"; then
5753 if test $gl_cv_c_amsterdam_compiler = yes; then
5756 if test -n "$ac_tool_prefix"; then
5757 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5758 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5760 $as_echo_n "checking for $ac_word... " >&6; }
5761 if ${ac_cv_prog_RANLIB+:} false; then :
5762 $as_echo_n "(cached) " >&6
5764 if test -n "$RANLIB"; then
5765 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5771 test -z "$as_dir" && as_dir=.
5772 for ac_exec_ext in '' $ac_executable_extensions; do
5773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5774 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5784 RANLIB=$ac_cv_prog_RANLIB
5785 if test -n "$RANLIB"; then
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5787 $as_echo "$RANLIB" >&6; }
5789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5790 $as_echo "no" >&6; }
5795 if test -z "$ac_cv_prog_RANLIB"; then
5796 ac_ct_RANLIB=$RANLIB
5797 # Extract the first word of "ranlib", so it can be a program name with args.
5798 set dummy ranlib; ac_word=$2
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5800 $as_echo_n "checking for $ac_word... " >&6; }
5801 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5802 $as_echo_n "(cached) " >&6
5804 if test -n "$ac_ct_RANLIB"; then
5805 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5811 test -z "$as_dir" && as_dir=.
5812 for ac_exec_ext in '' $ac_executable_extensions; do
5813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5814 ac_cv_prog_ac_ct_RANLIB="ranlib"
5815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5824 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5825 if test -n "$ac_ct_RANLIB"; then
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5827 $as_echo "$ac_ct_RANLIB" >&6; }
5829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5830 $as_echo "no" >&6; }
5833 if test "x$ac_ct_RANLIB" = x; then
5836 case $cross_compiling:$ac_tool_warned in
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5839 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5840 ac_tool_warned=yes ;;
5842 RANLIB=$ac_ct_RANLIB
5845 RANLIB="$ac_cv_prog_RANLIB"
5853 # Make sure we can run config.sub.
5854 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5855 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5858 $as_echo_n "checking build system type... " >&6; }
5859 if ${ac_cv_build+:} false; then :
5860 $as_echo_n "(cached) " >&6
5862 ac_build_alias=$build_alias
5863 test "x$ac_build_alias" = x &&
5864 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5865 test "x$ac_build_alias" = x &&
5866 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5867 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5868 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5872 $as_echo "$ac_cv_build" >&6; }
5873 case $ac_cv_build in
5875 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5878 ac_save_IFS=$IFS; IFS='-'
5884 # Remember, the first character of IFS is used to create $*,
5885 # except with old shells:
5888 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5892 $as_echo_n "checking host system type... " >&6; }
5893 if ${ac_cv_host+:} false; then :
5894 $as_echo_n "(cached) " >&6
5896 if test "x$host_alias" = x; then
5897 ac_cv_host=$ac_cv_build
5899 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5900 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5905 $as_echo "$ac_cv_host" >&6; }
5908 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5911 ac_save_IFS=$IFS; IFS='-'
5917 # Remember, the first character of IFS is used to create $*,
5918 # except with old shells:
5921 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5925 $as_echo_n "checking for ANSI C header files... " >&6; }
5926 if ${ac_cv_header_stdc+:} false; then :
5927 $as_echo_n "(cached) " >&6
5929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5930 /* end confdefs.h. */
5944 if ac_fn_c_try_compile "$LINENO"; then :
5945 ac_cv_header_stdc=yes
5947 ac_cv_header_stdc=no
5949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5951 if test $ac_cv_header_stdc = yes; then
5952 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5954 /* end confdefs.h. */
5958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5959 $EGREP "memchr" >/dev/null 2>&1; then :
5962 ac_cv_header_stdc=no
5968 if test $ac_cv_header_stdc = yes; then
5969 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5971 /* end confdefs.h. */
5975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5976 $EGREP "free" >/dev/null 2>&1; then :
5979 ac_cv_header_stdc=no
5985 if test $ac_cv_header_stdc = yes; then
5986 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5987 if test "$cross_compiling" = yes; then :
5990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5991 /* end confdefs.h. */
5994 #if ((' ' & 0x0FF) == 0x020)
5995 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5996 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5998 # define ISLOWER(c) \
5999 (('a' <= (c) && (c) <= 'i') \
6000 || ('j' <= (c) && (c) <= 'r') \
6001 || ('s' <= (c) && (c) <= 'z'))
6002 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6005 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6010 for (i = 0; i < 256; i++)
6011 if (XOR (islower (i), ISLOWER (i))
6012 || toupper (i) != TOUPPER (i))
6017 if ac_fn_c_try_run "$LINENO"; then :
6020 ac_cv_header_stdc=no
6022 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6023 conftest.$ac_objext conftest.beam conftest.$ac_ext
6028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6029 $as_echo "$ac_cv_header_stdc" >&6; }
6030 if test $ac_cv_header_stdc = yes; then
6032 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6036 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6037 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6038 inttypes.h stdint.h unistd.h
6040 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6041 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6043 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6044 cat >>confdefs.h <<_ACEOF
6045 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6054 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6055 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6062 if test "$MINIX" = yes; then
6064 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6067 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6070 $as_echo "#define _MINIX 1" >>confdefs.h
6073 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6079 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6080 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6081 $as_echo_n "(cached) " >&6
6083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6084 /* end confdefs.h. */
6086 # define __EXTENSIONS__ 1
6087 $ac_includes_default
6096 if ac_fn_c_try_compile "$LINENO"; then :
6097 ac_cv_safe_to_define___extensions__=yes
6099 ac_cv_safe_to_define___extensions__=no
6101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6104 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6105 test $ac_cv_safe_to_define___extensions__ = yes &&
6106 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6108 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6110 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6112 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6114 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6116 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6119 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6120 if ${ac_cv_should_define__xopen_source+:} false; then :
6121 $as_echo_n "(cached) " >&6
6123 ac_cv_should_define__xopen_source=no
6124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6125 /* end confdefs.h. */
6137 if ac_fn_c_try_compile "$LINENO"; then :
6140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6141 /* end confdefs.h. */
6143 #define _XOPEN_SOURCE 500
6154 if ac_fn_c_try_compile "$LINENO"; then :
6155 ac_cv_should_define__xopen_source=yes
6157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6162 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6163 test $ac_cv_should_define__xopen_source = yes &&
6164 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6174 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6175 if ${ac_cv_sys_largefile_source+:} false; then :
6176 $as_echo_n "(cached) " >&6
6179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6180 /* end confdefs.h. */
6181 #include <sys/types.h> /* for off_t */
6186 int (*fp) (FILE *, off_t, int) = fseeko;
6187 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6192 if ac_fn_c_try_link "$LINENO"; then :
6193 ac_cv_sys_largefile_source=no; break
6195 rm -f core conftest.err conftest.$ac_objext \
6196 conftest$ac_exeext conftest.$ac_ext
6197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6198 /* end confdefs.h. */
6199 #define _LARGEFILE_SOURCE 1
6200 #include <sys/types.h> /* for off_t */
6205 int (*fp) (FILE *, off_t, int) = fseeko;
6206 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6211 if ac_fn_c_try_link "$LINENO"; then :
6212 ac_cv_sys_largefile_source=1; break
6214 rm -f core conftest.err conftest.$ac_objext \
6215 conftest$ac_exeext conftest.$ac_ext
6216 ac_cv_sys_largefile_source=unknown
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6221 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6222 case $ac_cv_sys_largefile_source in #(
6225 cat >>confdefs.h <<_ACEOF
6226 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6232 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6233 # in glibc 2.1.3, but that breaks too many other things.
6234 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6235 if test $ac_cv_sys_largefile_source != unknown; then
6237 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6244 # IEEE behaviour is the default on all CPUs except Alpha and SH
6245 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6246 # and the GCC 4.1.2 manual).
6249 # On Alpha systems, a compiler option provides the behaviour.
6250 # See the ieee(3) manual page, also available at
6251 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6252 if test -n "$GCC"; then
6253 # GCC has the option -mieee.
6254 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6255 CPPFLAGS="$CPPFLAGS -mieee"
6257 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6258 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6259 CPPFLAGS="$CPPFLAGS -ieee"
6263 if test -n "$GCC"; then
6264 # GCC has the option -mieee.
6265 CPPFLAGS="$CPPFLAGS -mieee"
6270 # Check whether --enable-largefile was given.
6271 if test "${enable_largefile+set}" = set; then :
6272 enableval=$enable_largefile;
6275 if test "$enable_largefile" != no; then
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6278 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6279 if ${ac_cv_sys_largefile_CC+:} false; then :
6280 $as_echo_n "(cached) " >&6
6282 ac_cv_sys_largefile_CC=no
6283 if test "$GCC" != yes; then
6286 # IRIX 6.2 and later do not support large files by default,
6287 # so use the C compiler's -n32 option if that helps.
6288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6289 /* end confdefs.h. */
6290 #include <sys/types.h>
6291 /* Check that off_t can represent 2**63 - 1 correctly.
6292 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6293 since some C++ compilers masquerading as C compilers
6294 incorrectly reject 9223372036854775807. */
6295 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6296 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6297 && LARGE_OFF_T % 2147483647 == 1)
6307 if ac_fn_c_try_compile "$LINENO"; then :
6310 rm -f core conftest.err conftest.$ac_objext
6312 if ac_fn_c_try_compile "$LINENO"; then :
6313 ac_cv_sys_largefile_CC=' -n32'; break
6315 rm -f core conftest.err conftest.$ac_objext
6319 rm -f conftest.$ac_ext
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6323 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6324 if test "$ac_cv_sys_largefile_CC" != no; then
6325 CC=$CC$ac_cv_sys_largefile_CC
6328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6329 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6330 if ${ac_cv_sys_file_offset_bits+:} false; then :
6331 $as_echo_n "(cached) " >&6
6334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6335 /* end confdefs.h. */
6336 #include <sys/types.h>
6337 /* Check that off_t can represent 2**63 - 1 correctly.
6338 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6339 since some C++ compilers masquerading as C compilers
6340 incorrectly reject 9223372036854775807. */
6341 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6342 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6343 && LARGE_OFF_T % 2147483647 == 1)
6353 if ac_fn_c_try_compile "$LINENO"; then :
6354 ac_cv_sys_file_offset_bits=no; break
6356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6358 /* end confdefs.h. */
6359 #define _FILE_OFFSET_BITS 64
6360 #include <sys/types.h>
6361 /* Check that off_t can represent 2**63 - 1 correctly.
6362 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6363 since some C++ compilers masquerading as C compilers
6364 incorrectly reject 9223372036854775807. */
6365 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6366 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6367 && LARGE_OFF_T % 2147483647 == 1)
6377 if ac_fn_c_try_compile "$LINENO"; then :
6378 ac_cv_sys_file_offset_bits=64; break
6380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6381 ac_cv_sys_file_offset_bits=unknown
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6386 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6387 case $ac_cv_sys_file_offset_bits in #(
6390 cat >>confdefs.h <<_ACEOF
6391 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6396 if test $ac_cv_sys_file_offset_bits = unknown; then
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6398 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6399 if ${ac_cv_sys_large_files+:} false; then :
6400 $as_echo_n "(cached) " >&6
6403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6404 /* end confdefs.h. */
6405 #include <sys/types.h>
6406 /* Check that off_t can represent 2**63 - 1 correctly.
6407 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6408 since some C++ compilers masquerading as C compilers
6409 incorrectly reject 9223372036854775807. */
6410 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6411 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6412 && LARGE_OFF_T % 2147483647 == 1)
6422 if ac_fn_c_try_compile "$LINENO"; then :
6423 ac_cv_sys_large_files=no; break
6425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6427 /* end confdefs.h. */
6428 #define _LARGE_FILES 1
6429 #include <sys/types.h>
6430 /* Check that off_t can represent 2**63 - 1 correctly.
6431 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6432 since some C++ compilers masquerading as C compilers
6433 incorrectly reject 9223372036854775807. */
6434 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6435 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6436 && LARGE_OFF_T % 2147483647 == 1)
6446 if ac_fn_c_try_compile "$LINENO"; then :
6447 ac_cv_sys_large_files=1; break
6449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6450 ac_cv_sys_large_files=unknown
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6455 $as_echo "$ac_cv_sys_large_files" >&6; }
6456 case $ac_cv_sys_large_files in #(
6459 cat >>confdefs.h <<_ACEOF
6460 #define _LARGE_FILES $ac_cv_sys_large_files
6468 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6472 case $ac_cv_prog_cc_stdc in #(
6474 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6477 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6478 if ${ac_cv_prog_cc_c99+:} false; then :
6479 $as_echo_n "(cached) " >&6
6481 ac_cv_prog_cc_c99=no
6483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6484 /* end confdefs.h. */
6486 #include <stdbool.h>
6491 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6492 #define debug(...) fprintf (stderr, __VA_ARGS__)
6493 #define showlist(...) puts (#__VA_ARGS__)
6494 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6496 test_varargs_macros (void)
6501 debug ("X = %d\n", x);
6502 showlist (The first, second, and third items.);
6503 report (x>y, "x is %d but y is %d", x, y);
6506 // Check long long types.
6507 #define BIG64 18446744073709551615ull
6508 #define BIG32 4294967295ul
6509 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6511 your preprocessor is broken;
6515 your preprocessor is broken;
6517 static long long int bignum = -9223372036854775807LL;
6518 static unsigned long long int ubignum = BIG64;
6520 struct incomplete_array
6528 const wchar_t *name;
6532 typedef const char *ccp;
6535 test_restrict (ccp restrict text)
6537 // See if C++-style comments work.
6538 // Iterate through items via the restricted pointer.
6539 // Also check for declarations in for loops.
6540 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6545 // Check varargs and va_copy.
6547 test_varargs (const char *format, ...)
6550 va_start (args, format);
6552 va_copy (args_copy, args);
6563 str = va_arg (args_copy, const char *);
6566 number = va_arg (args_copy, int);
6569 fnumber = va_arg (args_copy, double);
6584 _Bool success = false;
6587 if (test_restrict ("String literal") == 0)
6589 char *restrict newvar = "Another string";
6592 test_varargs ("s, d' f .", "string", 65, 34.234);
6593 test_varargs_macros ();
6595 // Check flexible array members.
6596 struct incomplete_array *ia =
6597 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6599 for (int i = 0; i < ia->datasize; ++i)
6600 ia->data[i] = i * 1.234;
6602 // Check named initializers.
6603 struct named_init ni = {
6605 .name = L"Test wide string",
6606 .average = 543.34343,
6611 int dynamic_array[ni.number];
6612 dynamic_array[ni.number - 1] = 543;
6614 // work around unused variable warnings
6615 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6616 || dynamic_array[ni.number - 1] != 543);
6622 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6624 CC="$ac_save_CC $ac_arg"
6625 if ac_fn_c_try_compile "$LINENO"; then :
6626 ac_cv_prog_cc_c99=$ac_arg
6628 rm -f core conftest.err conftest.$ac_objext
6629 test "x$ac_cv_prog_cc_c99" != "xno" && break
6631 rm -f conftest.$ac_ext
6636 case "x$ac_cv_prog_cc_c99" in
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6639 $as_echo "none needed" >&6; } ;;
6641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6642 $as_echo "unsupported" >&6; } ;;
6644 CC="$CC $ac_cv_prog_cc_c99"
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6646 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6648 if test "x$ac_cv_prog_cc_c99" != xno; then :
6649 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6652 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6653 if ${ac_cv_prog_cc_c89+:} false; then :
6654 $as_echo_n "(cached) " >&6
6656 ac_cv_prog_cc_c89=no
6658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6659 /* end confdefs.h. */
6663 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6664 struct buf { int x; };
6665 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6666 static char *e (p, i)
6672 static char *f (char * (*g) (char **, int), char **p, ...)
6677 s = g (p, va_arg (v,int));
6682 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6683 function prototypes and stuff, but not '\xHH' hex character constants.
6684 These don't provoke an error unfortunately, instead are silently treated
6685 as 'x'. The following induces an error, until -std is added to get
6686 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6687 array size at least. It's necessary to write '\x00'==0 to get something
6688 that's true only with -std. */
6689 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6691 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6692 inside strings and character constants. */
6694 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6696 int test (int i, double x);
6697 struct s1 {int (*f) (int a);};
6698 struct s2 {int (*f) (double a);};
6699 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6705 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6710 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6711 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6713 CC="$ac_save_CC $ac_arg"
6714 if ac_fn_c_try_compile "$LINENO"; then :
6715 ac_cv_prog_cc_c89=$ac_arg
6717 rm -f core conftest.err conftest.$ac_objext
6718 test "x$ac_cv_prog_cc_c89" != "xno" && break
6720 rm -f conftest.$ac_ext
6725 case "x$ac_cv_prog_cc_c89" in
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6728 $as_echo "none needed" >&6; } ;;
6730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6731 $as_echo "unsupported" >&6; } ;;
6733 CC="$CC $ac_cv_prog_cc_c89"
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6735 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6737 if test "x$ac_cv_prog_cc_c89" != xno; then :
6738 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6740 ac_cv_prog_cc_stdc=no
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6747 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6748 if ${ac_cv_prog_cc_stdc+:} false; then :
6749 $as_echo_n "(cached) " >&6
6752 case $ac_cv_prog_cc_stdc in #(
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6755 $as_echo "unsupported" >&6; } ;; #(
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6758 $as_echo "none needed" >&6; } ;; #(
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6761 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6769 # Check whether --enable-threads was given.
6770 if test "${enable_threads+set}" = set; then :
6771 enableval=$enable_threads; gl_use_threads=$enableval
6773 if test -n "$gl_use_threads_default"; then
6774 gl_use_threads="$gl_use_threads_default"
6777 osf*) gl_use_threads=no ;;
6780 1.[0-5].*) gl_use_threads=no ;;
6781 *) gl_use_threads=yes ;;
6784 *) gl_use_threads=yes ;;
6790 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
6791 # For using <pthread.h>:
6794 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6795 # groks <pthread.h>. cc also understands the flag -pthread, but
6796 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6797 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6798 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6799 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6800 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6803 # Some systems optimize for single-threaded programs by default, and
6804 # need special flags to disable these optimizations. For example, the
6805 # definition of 'errno' in <errno.h>.
6807 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6808 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6815 # Code from module alloca-opt:
6816 # Code from module alloca-opt-tests:
6817 # Code from module announce-gen:
6818 # Code from module ansi-c++-opt:
6819 # Code from module array-list:
6820 # Code from module array-list-tests:
6821 # Code from module array-oset:
6822 # Code from module array-oset-tests:
6823 # Code from module assert:
6824 # Code from module autobuild:
6829 if test -z "$AB_PACKAGE"; then
6830 AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
6833 $as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;}
6835 if test -z "$AB_VERSION"; then
6836 AB_VERSION=${PACKAGE_VERSION:-$VERSION}
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
6839 $as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;}
6842 if test "$hostname"; then
6843 { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
6844 $as_echo "$as_me: autobuild hostname... $hostname" >&6;}
6849 date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
6850 if test "$?" != 0; then
6853 if test "$date"; then
6854 { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
6855 $as_echo "$as_me: autobuild timestamp... $date" >&6;}
6858 # Code from module avltree-oset:
6859 # Code from module avltree-oset-tests:
6860 # Code from module binary-io:
6861 # Code from module binary-io-tests:
6862 # Code from module btowc:
6863 # Code from module btowc-tests:
6864 # Code from module c-ctype:
6865 # Code from module c-ctype-tests:
6866 # Code from module c-stack:
6867 # Code from module c-stack-tests:
6868 # Code from module c-strcase:
6869 # Code from module c-strcase-tests:
6870 # Code from module c-strcaseeq:
6871 # Code from module canonicalize-lgpl:
6872 # Code from module canonicalize-lgpl-tests:
6873 # Code from module chdir:
6874 # Code from module chdir-tests:
6875 # Code from module clean-temp:
6876 # Code from module cloexec:
6877 # Code from module cloexec-tests:
6878 # Code from module close:
6879 # Code from module close-stream:
6880 # Code from module close-tests:
6881 # Code from module closedir:
6882 # Code from module closein:
6883 # Code from module closein-tests:
6884 # Code from module closeout:
6885 # Code from module config-h:
6886 # Code from module configmake:
6887 # Code from module dirent:
6888 # Code from module dirent-c++-tests:
6889 # Code from module dirent-tests:
6890 # Code from module dirname:
6891 # Code from module dirname-lgpl:
6892 # Code from module dirname-tests:
6893 # Code from module dosname:
6894 # Code from module double-slash-root:
6895 # Code from module dup:
6896 # Code from module dup-tests:
6897 # Code from module dup2:
6898 # Code from module dup2-tests:
6899 # Code from module environ:
6900 # Code from module environ-tests:
6901 # Code from module errno:
6902 # Code from module errno-tests:
6903 # Code from module error:
6904 # Code from module execute:
6905 # Code from module exitfail:
6906 # Code from module extensions:
6908 # Code from module extern-inline:
6909 # Code from module fatal-signal:
6910 # Code from module fclose:
6911 # Code from module fclose-tests:
6912 # Code from module fcntl:
6913 # Code from module fcntl-h:
6914 # Code from module fcntl-h-c++-tests:
6915 # Code from module fcntl-h-tests:
6916 # Code from module fcntl-tests:
6917 # Code from module fd-hook:
6918 # Code from module fd-safer-flag:
6919 # Code from module fdl-1.3:
6920 # Code from module fdopen:
6921 # Code from module fdopen-tests:
6922 # Code from module fflush:
6924 # Code from module fflush-tests:
6925 # Code from module fgetc-tests:
6926 # Code from module filename:
6927 # Code from module filenamecat:
6928 # Code from module filenamecat-lgpl:
6929 # Code from module filenamecat-tests:
6930 # Code from module float:
6931 # Code from module float-tests:
6932 # Code from module fopen:
6933 # Code from module fopen-safer:
6934 # Code from module fopen-safer-tests:
6935 # Code from module fopen-tests:
6936 # Code from module fpending:
6937 # Code from module fpending-tests:
6938 # Code from module fpieee:
6940 # Code from module fpucw:
6941 # Code from module fpurge:
6942 # Code from module fpurge-tests:
6943 # Code from module fputc-tests:
6944 # Code from module fread-tests:
6945 # Code from module freadahead:
6946 # Code from module freadahead-tests:
6947 # Code from module freading:
6948 # Code from module freading-tests:
6949 # Code from module frexp-nolibm:
6950 # Code from module frexp-nolibm-tests:
6951 # Code from module frexpl-nolibm:
6952 # Code from module frexpl-nolibm-tests:
6953 # Code from module fseek:
6954 # Code from module fseek-tests:
6955 # Code from module fseeko:
6957 # Code from module fseeko-tests:
6958 # Code from module fstat:
6959 # Code from module fstat-tests:
6960 # Code from module ftell:
6961 # Code from module ftell-tests:
6962 # Code from module ftello:
6964 # Code from module ftello-tests:
6965 # Code from module fwrite-tests:
6966 # Code from module gendocs:
6967 # Code from module getcwd-lgpl:
6968 # Code from module getcwd-lgpl-tests:
6969 # Code from module getdtablesize:
6970 # Code from module getdtablesize-tests:
6971 # Code from module getopt-gnu:
6972 # Code from module getopt-posix:
6973 # Code from module getopt-posix-tests:
6974 # Code from module getpagesize:
6975 # Code from module gettext-h:
6976 # Code from module gettimeofday:
6977 # Code from module gettimeofday-tests:
6978 # Code from module git-version-gen:
6979 # Code from module gnu-web-doc-update:
6980 # Code from module gnumakefile:
6981 # Code from module gnupload:
6982 # Code from module gpl-3.0:
6983 # Code from module havelib:
6984 # Code from module ignore-value:
6985 # Code from module ignore-value-tests:
6986 # Code from module include_next:
6987 # Code from module intprops:
6988 # Code from module intprops-tests:
6989 # Code from module inttypes:
6990 # Code from module inttypes-incomplete:
6991 # Code from module inttypes-tests:
6992 # Code from module isnand-nolibm:
6993 # Code from module isnand-nolibm-tests:
6994 # Code from module isnanf-nolibm:
6995 # Code from module isnanf-nolibm-tests:
6996 # Code from module isnanl-nolibm:
6997 # Code from module isnanl-nolibm-tests:
6998 # Code from module langinfo:
6999 # Code from module langinfo-c++-tests:
7000 # Code from module langinfo-tests:
7001 # Code from module largefile:
7003 # Code from module libsigsegv:
7004 # Code from module link:
7005 # Code from module link-tests:
7006 # Code from module linkedhash-list:
7007 # Code from module linkedhash-list-tests:
7008 # Code from module list:
7009 # Code from module localcharset:
7010 # Code from module locale:
7011 # Code from module locale-c++-tests:
7012 # Code from module locale-tests:
7013 # Code from module localeconv:
7014 # Code from module localeconv-tests:
7015 # Code from module localename:
7016 # Code from module localename-tests:
7017 # Code from module lock:
7018 # Code from module lseek:
7019 # Code from module lseek-tests:
7020 # Code from module lstat:
7021 # Code from module lstat-tests:
7022 # Code from module maintainer-makefile:
7023 # Code from module malloc-gnu:
7024 # Code from module malloc-gnu-tests:
7025 # Code from module malloc-posix:
7026 # Code from module malloca:
7027 # Code from module malloca-tests:
7028 # Code from module manywarnings:
7029 # Code from module math:
7030 # Code from module math-c++-tests:
7031 # Code from module math-tests:
7032 # Code from module mbrtowc:
7033 # Code from module mbrtowc-tests:
7034 # Code from module mbsinit:
7035 # Code from module mbsinit-tests:
7036 # Code from module mbtowc:
7037 # Code from module memchr:
7038 # Code from module memchr-tests:
7039 # Code from module memchr2:
7040 # Code from module memchr2-tests:
7041 # Code from module mkdtemp:
7042 # Code from module mkstemp:
7043 # Code from module msvc-inval:
7044 # Code from module msvc-nothrow:
7045 # Code from module multiarch:
7046 # Code from module nl_langinfo:
7047 # Code from module nl_langinfo-tests:
7048 # Code from module nocrash:
7049 # Code from module obstack:
7050 # Code from module open:
7051 # Code from module open-tests:
7052 # Code from module opendir:
7053 # Code from module oset:
7054 # Code from module pathmax:
7055 # Code from module pathmax-tests:
7056 # Code from module pipe2:
7057 # Code from module pipe2-safer:
7058 # Code from module pipe2-tests:
7059 # Code from module posix_spawn-internal:
7060 # Code from module posix_spawn_file_actions_addclose:
7061 # Code from module posix_spawn_file_actions_addclose-tests:
7062 # Code from module posix_spawn_file_actions_adddup2:
7063 # Code from module posix_spawn_file_actions_adddup2-tests:
7064 # Code from module posix_spawn_file_actions_addopen:
7065 # Code from module posix_spawn_file_actions_addopen-tests:
7066 # Code from module posix_spawn_file_actions_destroy:
7067 # Code from module posix_spawn_file_actions_init:
7068 # Code from module posix_spawnattr_destroy:
7069 # Code from module posix_spawnattr_init:
7070 # Code from module posix_spawnattr_setflags:
7071 # Code from module posix_spawnattr_setsigmask:
7072 # Code from module posix_spawnp:
7073 # Code from module posix_spawnp-tests:
7074 # Code from module printf-frexp:
7075 # Code from module printf-frexp-tests:
7076 # Code from module printf-frexpl:
7077 # Code from module printf-frexpl-tests:
7078 # Code from module printf-safe:
7079 # Code from module progname:
7080 # Code from module putenv:
7081 # Code from module quotearg:
7082 # Code from module quotearg-simple:
7083 # Code from module quotearg-simple-tests:
7084 # Code from module raise:
7085 # Code from module raise-tests:
7086 # Code from module rawmemchr:
7087 # Code from module rawmemchr-tests:
7088 # Code from module readdir:
7089 # Code from module readlink:
7090 # Code from module readlink-tests:
7091 # Code from module regex:
7092 # Code from module regex-tests:
7093 # Code from module rename:
7094 # Code from module rename-tests:
7095 # Code from module rmdir:
7096 # Code from module rmdir-tests:
7097 # Code from module same-inode:
7098 # Code from module sched:
7099 # Code from module sched-tests:
7100 # Code from module secure_getenv:
7101 # Code from module setenv:
7102 # Code from module setenv-tests:
7103 # Code from module setlocale:
7104 # Code from module setlocale-tests:
7105 # Code from module sigaction:
7106 # Code from module sigaction-tests:
7107 # Code from module signal-h:
7108 # Code from module signal-h-c++-tests:
7109 # Code from module signal-h-tests:
7110 # Code from module signbit:
7111 # Code from module signbit-tests:
7112 # Code from module sigpipe:
7113 # Code from module sigpipe-tests:
7114 # Code from module sigprocmask:
7115 # Code from module sigprocmask-tests:
7116 # Code from module size_max:
7117 # Code from module sleep:
7118 # Code from module sleep-tests:
7119 # Code from module snippet/_Noreturn:
7120 # Code from module snippet/arg-nonnull:
7121 # Code from module snippet/c++defs:
7122 # Code from module snippet/unused-parameter:
7123 # Code from module snippet/warn-on-use:
7124 # Code from module snprintf:
7125 # Code from module snprintf-tests:
7126 # Code from module spawn:
7127 # Code from module spawn-c++-tests:
7128 # Code from module spawn-pipe:
7129 # Code from module spawn-pipe-tests:
7130 # Code from module spawn-tests:
7131 # Code from module ssize_t:
7132 # Code from module stat:
7133 # Code from module stat-tests:
7134 # Code from module stdarg:
7138 # Code from module stdbool:
7139 # Code from module stdbool-tests:
7140 # Code from module stddef:
7141 # Code from module stddef-tests:
7142 # Code from module stdint:
7143 # Code from module stdint-tests:
7144 # Code from module stdio:
7145 # Code from module stdio-c++-tests:
7146 # Code from module stdio-tests:
7147 # Code from module stdlib:
7148 # Code from module stdlib-c++-tests:
7149 # Code from module stdlib-safer:
7150 # Code from module stdlib-tests:
7151 # Code from module strchrnul:
7152 # Code from module strchrnul-tests:
7153 # Code from module strdup-posix:
7154 # Code from module streq:
7155 # Code from module strerror:
7156 # Code from module strerror-override:
7157 # Code from module strerror-tests:
7158 # Code from module string:
7159 # Code from module string-c++-tests:
7160 # Code from module string-tests:
7161 # Code from module strndup:
7162 # Code from module strnlen:
7163 # Code from module strnlen-tests:
7164 # Code from module strsignal:
7165 # Code from module strsignal-tests:
7166 # Code from module strstr:
7167 # Code from module strstr-simple:
7168 # Code from module strstr-tests:
7169 # Code from module strtod:
7170 # Code from module strtod-tests:
7171 # Code from module symlink:
7172 # Code from module symlink-tests:
7173 # Code from module sys_stat:
7174 # Code from module sys_stat-c++-tests:
7175 # Code from module sys_stat-tests:
7176 # Code from module sys_time:
7177 # Code from module sys_time-c++-tests:
7178 # Code from module sys_time-tests:
7179 # Code from module sys_types:
7180 # Code from module sys_types-c++-tests:
7181 # Code from module sys_types-tests:
7182 # Code from module sys_wait:
7183 # Code from module sys_wait-c++-tests:
7184 # Code from module sys_wait-tests:
7185 # Code from module tempname:
7186 # Code from module test-framework-sh:
7187 # Code from module test-framework-sh-tests:
7188 # Code from module threadlib:
7192 # Code from module time:
7193 # Code from module time-c++-tests:
7194 # Code from module time-tests:
7195 # Code from module tls:
7196 # Code from module tmpdir:
7197 # Code from module unistd:
7198 # Code from module unistd-c++-tests:
7199 # Code from module unistd-safer:
7200 # Code from module unistd-safer-tests:
7201 # Code from module unistd-tests:
7202 # Code from module unlocked-io:
7203 # Code from module unsetenv:
7204 # Code from module unsetenv-tests:
7205 # Code from module update-copyright:
7206 # Code from module update-copyright-tests:
7207 # Code from module useless-if-before-free:
7208 # Code from module vasnprintf:
7209 # Code from module vasnprintf-tests:
7210 # Code from module vasprintf:
7211 # Code from module vasprintf-posix:
7212 # Code from module vasprintf-posix-tests:
7213 # Code from module vasprintf-tests:
7214 # Code from module vc-list-files:
7215 # Code from module vc-list-files-tests:
7216 # Code from module verify:
7217 # Code from module verify-tests:
7218 # Code from module verror:
7219 # Code from module version-etc:
7220 # Code from module version-etc-fsf:
7221 # Code from module version-etc-tests:
7222 # Code from module wait-process:
7223 # Code from module waitpid:
7224 # Code from module warnings:
7225 # Code from module wchar:
7226 # Code from module wchar-c++-tests:
7227 # Code from module wchar-tests:
7228 # Code from module wcrtomb:
7229 # Code from module wcrtomb-tests:
7230 # Code from module wctob:
7231 # Code from module wctomb:
7232 # Code from module wctype-h:
7233 # Code from module wctype-h-c++-tests:
7234 # Code from module wctype-h-tests:
7235 # Code from module write:
7236 # Code from module write-tests:
7237 # Code from module xalloc:
7238 # Code from module xalloc-die:
7239 # Code from module xalloc-die-tests:
7240 # Code from module xalloc-oversized:
7241 # Code from module xlist:
7242 # Code from module xmalloca:
7243 # Code from module xoset:
7244 # Code from module xprintf:
7245 # Code from module xsize:
7246 # Code from module xstrndup:
7247 # Code from module xvasprintf:
7248 # Code from module xvasprintf-posix:
7249 # Code from module xvasprintf-tests:
7252 # Maintainer note - comment this line out if you plan to rerun
7253 # GNULIB_POSIXCHECK testing to see if M4 should be using more modules.
7254 # Leave it uncommented for normal releases, for faster ./configure.
7259 # M4 is single-threaded; so we can optimize gnulib code by using this:
7264 # Check whether --enable-gcc-warnings was given.
7265 if test "${enable_gcc_warnings+set}" = set; then :
7266 enableval=$enable_gcc_warnings; case $enableval in
7268 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7270 gl_gcc_warnings=$enableval
7272 if test -d "$srcdir"/.git; then
7281 if test "$gl_gcc_warnings" = yes; then
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7283 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7284 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
7285 $as_echo_n "(cached) " >&6
7288 gl_save_compiler_FLAGS="$CFLAGS"
7289 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7291 /* end confdefs.h. */
7301 if ac_fn_c_try_compile "$LINENO"; then :
7302 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7304 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7307 CFLAGS="$gl_save_compiler_FLAGS"
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7311 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7312 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
7313 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7315 gl_unknown_warnings_are_errors=
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7320 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7321 if ${gl_cv_warn_c__Werror+:} false; then :
7322 $as_echo_n "(cached) " >&6
7325 gl_save_compiler_FLAGS="$CFLAGS"
7326 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7328 /* end confdefs.h. */
7338 if ac_fn_c_try_compile "$LINENO"; then :
7339 gl_cv_warn_c__Werror=yes
7341 gl_cv_warn_c__Werror=no
7343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7344 CFLAGS="$gl_save_compiler_FLAGS"
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7348 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7349 if test "x$gl_cv_warn_c__Werror" = xyes; then :
7350 as_fn_append WERROR_CFLAGS " -Werror"
7356 # We use '#pragma GCC diagnostic push' to silence some
7357 # warnings, but older gcc doesn't support this.
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
7359 $as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; }
7360 if ${M4_cv_gcc_pragma_push_works+:} false; then :
7361 $as_echo_n "(cached) " >&6
7365 CFLAGS='-Wunknown-pragmas -Werror'
7366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7367 /* end confdefs.h. */
7369 #pragma GCC diagnostic push
7370 #pragma GCC diagnostic pop
7380 if ac_fn_c_try_compile "$LINENO"; then :
7381 M4_cv_gcc_pragma_push_works=yes
7383 M4_cv_gcc_pragma_push_works=no
7385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
7389 $as_echo "$M4_cv_gcc_pragma_push_works" >&6; }
7391 # This, $nw, is the list of warnings we disable.
7393 nw="$nw -Waggregate-return" # K&R is anachronistic
7394 nw="$nw -Wtraditional-conversion" # K&R is anachronistic
7395 nw="$nw -Wundef" # K&R is anachronistic
7396 nw="$nw -Wtraditional" # K&R is anachronistic
7397 nw="$nw -Wlong-long" # C90 is anachronistic
7398 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7399 nw="$nw -Wpadded" # Our structs are not packed
7400 nw="$nw -Wconversion" # Too many warnings for now
7401 nw="$nw -Wsign-conversion" # Too many warnings for now
7402 nw="$nw -Wcast-qual" # Too many warnings for now
7403 nw="$nw -Wswitch-enum" # Too many warnings for now
7404 # gcc 4.4.6 complains enum-compare is C++ only; gcc 4.7.0 implies it in -Wall
7405 nw="$nw -Wenum-compare"
7407 # Gnulib uses '#pragma GCC diagnostic push' to silence some
7408 # warnings, but older gcc doesn't support this.
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
7410 $as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; }
7411 if ${M4_cv_gcc_pragma_push_works+:} false; then :
7412 $as_echo_n "(cached) " >&6
7416 CFLAGS='-Wunknown-pragmas -Werror'
7417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7418 /* end confdefs.h. */
7420 #pragma GCC diagnostic push
7421 #pragma GCC diagnostic pop
7431 if ac_fn_c_try_compile "$LINENO"; then :
7432 M4_cv_gcc_pragma_push_works=yes
7434 M4_cv_gcc_pragma_push_works=no
7436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
7440 $as_echo "$M4_cv_gcc_pragma_push_works" >&6; }
7441 if test $M4_cv_gcc_pragma_push_works = no; then
7442 nw="$nw -Wmissing-prototypes"
7443 nw="$nw -Wmissing-declarations"
7444 nw="$nw -Wunreachable-code"
7449 if test -n "$GCC"; then
7451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7452 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7453 if ${gl_cv_cc_nomfi_supported+:} false; then :
7454 $as_echo_n "(cached) " >&6
7457 gl_save_CFLAGS="$CFLAGS"
7458 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7460 /* end confdefs.h. */
7470 if ac_fn_c_try_compile "$LINENO"; then :
7471 gl_cv_cc_nomfi_supported=yes
7473 gl_cv_cc_nomfi_supported=no
7475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7476 CFLAGS="$gl_save_CFLAGS"
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7480 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7482 if test "$gl_cv_cc_nomfi_supported" = yes; then
7483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7484 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7485 if ${gl_cv_cc_nomfi_needed+:} false; then :
7486 $as_echo_n "(cached) " >&6
7489 gl_save_CFLAGS="$CFLAGS"
7490 CFLAGS="$CFLAGS -W -Werror"
7491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7492 /* end confdefs.h. */
7495 typedef struct { int a; int b; } s_t;
7507 if ac_fn_c_try_compile "$LINENO"; then :
7508 gl_cv_cc_nomfi_needed=no
7510 gl_cv_cc_nomfi_needed=yes
7512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7513 CFLAGS="$gl_save_CFLAGS"
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7518 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7522 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7523 if ${gl_cv_cc_uninitialized_supported+:} false; then :
7524 $as_echo_n "(cached) " >&6
7527 gl_save_CFLAGS="$CFLAGS"
7528 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7530 /* end confdefs.h. */
7540 if ac_fn_c_try_compile "$LINENO"; then :
7541 gl_cv_cc_uninitialized_supported=yes
7543 gl_cv_cc_uninitialized_supported=no
7545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7546 CFLAGS="$gl_save_CFLAGS"
7549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7550 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7554 # List all gcc warning categories.
7556 for gl_manywarn_item in \
7560 -Waggressive-loop-optimizations \
7564 -Wbad-function-cast \
7565 -Wbuiltin-macro-redefined \
7571 -Wcoverage-mismatch \
7574 -Wdeprecated-declarations \
7575 -Wdisabled-optimization \
7577 -Wdouble-promotion \
7582 -Wformat-contains-nul \
7583 -Wformat-extra-args \
7584 -Wformat-nonliteral \
7587 -Wformat-zero-length \
7588 -Wfree-nonheap-object \
7589 -Wignored-qualifiers \
7591 -Wimplicit-function-declaration \
7595 -Wint-to-pointer-cast \
7596 -Winvalid-memory-model \
7598 -Wjump-misses-init \
7601 -Wmaybe-uninitialized \
7603 -Wmissing-declarations \
7604 -Wmissing-field-initializers \
7605 -Wmissing-include-dirs \
7606 -Wmissing-parameter-type \
7607 -Wmissing-prototypes \
7614 -Wold-style-declaration \
7615 -Wold-style-definition \
7617 -Woverlength-strings \
7620 -Wpacked-bitfield-compat \
7624 -Wpointer-to-int-cast \
7626 -Wreturn-local-addr \
7630 -Wsizeof-pointer-memaccess \
7634 -Wstrict-prototypes \
7635 -Wsuggest-attribute=const \
7636 -Wsuggest-attribute=format \
7637 -Wsuggest-attribute=noreturn \
7638 -Wsuggest-attribute=pure \
7648 -Wunsafe-loop-optimizations \
7650 -Wunused-but-set-parameter \
7651 -Wunused-but-set-variable \
7654 -Wunused-local-typedefs \
7656 -Wunused-parameter \
7662 -Wvector-operation-performance \
7664 -Wvolatile-register-var \
7668 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7671 # Disable specific options as needed.
7672 if test "$gl_cv_cc_nomfi_needed" = yes; then
7673 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7676 if test "$gl_cv_cc_uninitialized_supported" = no; then
7677 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7688 *" $gl_warn_item "*)
7691 gl_warn_set="$gl_warn_set $gl_warn_item"
7699 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7701 case $gl_positive in
7702 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7705 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7706 if eval \${$as_gl_Warn+:} false; then :
7707 $as_echo_n "(cached) " >&6
7710 gl_save_compiler_FLAGS="$CFLAGS"
7711 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
7712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7713 /* end confdefs.h. */
7723 if ac_fn_c_try_compile "$LINENO"; then :
7724 eval "$as_gl_Warn=yes"
7726 eval "$as_gl_Warn=no"
7728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7729 CFLAGS="$gl_save_compiler_FLAGS"
7732 eval ac_res=\$$as_gl_Warn
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7734 $as_echo "$ac_res" >&6; }
7735 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
7736 as_fn_append WARN_CFLAGS " $w"
7742 # Gnulib turns on -Wformat=2, which implies -Wformat-nonliteral, but
7743 # we temporarily override it in format.c if possible.
7744 if test $M4_cv_gcc_pragma_push_works = no; then
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7747 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7748 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
7749 $as_echo_n "(cached) " >&6
7752 gl_save_compiler_FLAGS="$CFLAGS"
7753 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
7754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7755 /* end confdefs.h. */
7765 if ac_fn_c_try_compile "$LINENO"; then :
7766 gl_cv_warn_c__Wno_format_nonliteral=yes
7768 gl_cv_warn_c__Wno_format_nonliteral=no
7770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7771 CFLAGS="$gl_save_compiler_FLAGS"
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7775 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7776 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
7777 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7785 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7786 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
7787 $as_echo_n "(cached) " >&6
7790 gl_save_compiler_FLAGS="$CFLAGS"
7791 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
7792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7793 /* end confdefs.h. */
7803 if ac_fn_c_try_compile "$LINENO"; then :
7804 gl_cv_warn_c__fdiagnostics_show_option=yes
7806 gl_cv_warn_c__fdiagnostics_show_option=no
7808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7809 CFLAGS="$gl_save_compiler_FLAGS"
7812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7813 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7814 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
7815 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7821 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7822 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
7823 $as_echo_n "(cached) " >&6
7826 gl_save_compiler_FLAGS="$CFLAGS"
7827 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
7828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7829 /* end confdefs.h. */
7839 if ac_fn_c_try_compile "$LINENO"; then :
7840 gl_cv_warn_c__funit_at_a_time=yes
7842 gl_cv_warn_c__funit_at_a_time=no
7844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7845 CFLAGS="$gl_save_compiler_FLAGS"
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7849 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7850 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
7851 as_fn_append WARN_CFLAGS " -funit-at-a-time"
7861 # Tandem/NSK is broken - it has 'long long int' but not
7862 # 'unsigned long long int', which confuses assumptions made by gnulib.
7863 # Simply pretend that neither type exists if both do not work.
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7866 $as_echo_n "checking for unsigned long long int... " >&6; }
7867 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7868 $as_echo_n "(cached) " >&6
7870 ac_cv_type_unsigned_long_long_int=yes
7871 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7873 /* end confdefs.h. */
7875 /* For now, do not test the preprocessor; as of 2007 there are too many
7876 implementations with broken preprocessors. Perhaps this can
7877 be revisited in 2012. In the meantime, code should not expect
7878 #if to work with literals wider than 32 bits. */
7879 /* Test literals. */
7880 long long int ll = 9223372036854775807ll;
7881 long long int nll = -9223372036854775807LL;
7882 unsigned long long int ull = 18446744073709551615ULL;
7883 /* Test constant expressions. */
7884 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7886 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7892 /* Test availability of runtime routines for shift and division. */
7893 long long int llmax = 9223372036854775807ll;
7894 unsigned long long int ullmax = 18446744073709551615ull;
7895 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7896 | (llmax / ll) | (llmax % ll)
7897 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7898 | (ullmax / ull) | (ullmax % ull));
7904 if ac_fn_c_try_link "$LINENO"; then :
7907 ac_cv_type_unsigned_long_long_int=no
7909 rm -f core conftest.err conftest.$ac_objext \
7910 conftest$ac_exeext conftest.$ac_ext
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7914 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7915 if test $ac_cv_type_unsigned_long_long_int = yes; then
7917 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
7924 $as_echo_n "checking for long long int... " >&6; }
7925 if ${ac_cv_type_long_long_int+:} false; then :
7926 $as_echo_n "(cached) " >&6
7928 ac_cv_type_long_long_int=yes
7929 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7930 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
7931 if test $ac_cv_type_long_long_int = yes; then
7932 if test "$cross_compiling" = yes; then :
7935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7936 /* end confdefs.h. */
7940 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
7941 # define LLONG_MAX (HALF - 1 + HALF)
7946 long long int n = 1;
7950 long long int m = n << i;
7953 if (LLONG_MAX / 2 < m)
7961 if ac_fn_c_try_run "$LINENO"; then :
7964 ac_cv_type_long_long_int=no
7966 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7967 conftest.$ac_objext conftest.beam conftest.$ac_ext
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7974 $as_echo "$ac_cv_type_long_long_int" >&6; }
7975 if test $ac_cv_type_long_long_int = yes; then
7977 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7983 $as_echo_n "checking for unsigned long long int... " >&6; }
7984 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7985 $as_echo_n "(cached) " >&6
7987 ac_cv_type_unsigned_long_long_int=yes
7988 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7990 /* end confdefs.h. */
7992 /* For now, do not test the preprocessor; as of 2007 there are too many
7993 implementations with broken preprocessors. Perhaps this can
7994 be revisited in 2012. In the meantime, code should not expect
7995 #if to work with literals wider than 32 bits. */
7996 /* Test literals. */
7997 long long int ll = 9223372036854775807ll;
7998 long long int nll = -9223372036854775807LL;
7999 unsigned long long int ull = 18446744073709551615ULL;
8000 /* Test constant expressions. */
8001 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8003 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8009 /* Test availability of runtime routines for shift and division. */
8010 long long int llmax = 9223372036854775807ll;
8011 unsigned long long int ullmax = 18446744073709551615ull;
8012 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8013 | (llmax / ll) | (llmax % ll)
8014 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8015 | (ullmax / ull) | (ullmax % ull));
8021 if ac_fn_c_try_link "$LINENO"; then :
8024 ac_cv_type_unsigned_long_long_int=no
8026 rm -f core conftest.err conftest.$ac_objext \
8027 conftest$ac_exeext conftest.$ac_ext
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8031 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
8032 if test $ac_cv_type_unsigned_long_long_int = yes; then
8034 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8038 if test $ac_cv_type_long_long_int:$ac_cv_type_unsigned_long_long_int = yes:no
8040 ac_cv_type_long_long_int=no
8042 $as_echo "#define HAVE_LONG_LONG_INT 0" >>confdefs.h
8051 LIBC_FATAL_STDERR_=1
8052 export LIBC_FATAL_STDERR_
8054 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8055 if test "x$ac_cv_type_size_t" = xyes; then :
8059 cat >>confdefs.h <<_ACEOF
8060 #define size_t unsigned int
8065 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8066 # for constant arguments. Useless!
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8068 $as_echo_n "checking for working alloca.h... " >&6; }
8069 if ${ac_cv_working_alloca_h+:} false; then :
8070 $as_echo_n "(cached) " >&6
8072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8073 /* end confdefs.h. */
8078 char *p = (char *) alloca (2 * sizeof (int));
8084 if ac_fn_c_try_link "$LINENO"; then :
8085 ac_cv_working_alloca_h=yes
8087 ac_cv_working_alloca_h=no
8089 rm -f core conftest.err conftest.$ac_objext \
8090 conftest$ac_exeext conftest.$ac_ext
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8093 $as_echo "$ac_cv_working_alloca_h" >&6; }
8094 if test $ac_cv_working_alloca_h = yes; then
8096 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8101 $as_echo_n "checking for alloca... " >&6; }
8102 if ${ac_cv_func_alloca_works+:} false; then :
8103 $as_echo_n "(cached) " >&6
8105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8106 /* end confdefs.h. */
8108 # define alloca __builtin_alloca
8111 # include <malloc.h>
8112 # define alloca _alloca
8114 # ifdef HAVE_ALLOCA_H
8115 # include <alloca.h>
8120 # ifndef alloca /* predefined by HP cc +Olibcalls */
8121 void *alloca (size_t);
8131 char *p = (char *) alloca (1);
8137 if ac_fn_c_try_link "$LINENO"; then :
8138 ac_cv_func_alloca_works=yes
8140 ac_cv_func_alloca_works=no
8142 rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext conftest.$ac_ext
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8146 $as_echo "$ac_cv_func_alloca_works" >&6; }
8148 if test $ac_cv_func_alloca_works = yes; then
8150 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8153 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8154 # that cause trouble. Some versions do not even contain alloca or
8155 # contain a buggy version. If you still want to use their alloca,
8156 # use ar to extract alloca.o from them instead of compiling alloca.c.
8162 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8164 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8168 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8169 if ${ac_cv_os_cray+:} false; then :
8170 $as_echo_n "(cached) " >&6
8172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8173 /* end confdefs.h. */
8174 #if defined CRAY && ! defined CRAY2
8181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8182 $EGREP "webecray" >/dev/null 2>&1; then :
8190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8191 $as_echo "$ac_cv_os_cray" >&6; }
8192 if test $ac_cv_os_cray = yes; then
8193 for ac_func in _getb67 GETB67 getb67; do
8194 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8195 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8196 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8198 cat >>confdefs.h <<_ACEOF
8199 #define CRAY_STACKSEG_END $ac_func
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8209 $as_echo_n "checking stack direction for C alloca... " >&6; }
8210 if ${ac_cv_c_stack_direction+:} false; then :
8211 $as_echo_n "(cached) " >&6
8213 if test "$cross_compiling" = yes; then :
8214 ac_cv_c_stack_direction=0
8216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8217 /* end confdefs.h. */
8218 $ac_includes_default
8220 find_stack_direction (int *addr, int depth)
8225 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8226 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8231 main (int argc, char **argv)
8233 return find_stack_direction (0, argc + !argv + 20) < 0;
8236 if ac_fn_c_try_run "$LINENO"; then :
8237 ac_cv_c_stack_direction=1
8239 ac_cv_c_stack_direction=-1
8241 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8242 conftest.$ac_objext conftest.beam conftest.$ac_ext
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8247 $as_echo "$ac_cv_c_stack_direction" >&6; }
8248 cat >>confdefs.h <<_ACEOF
8249 #define STACK_DIRECTION $ac_cv_c_stack_direction
8262 GNULIB_MBSNRTOWCS=0;
8265 GNULIB_WCSNRTOMBS=0;
8282 GNULIB_WCSCASECMP=0;
8283 GNULIB_WCSNCASECMP=0;
8333 HAVE_DECL_WCWIDTH=1;
8334 REPLACE_MBSTATE_T=0;
8340 REPLACE_MBSRTOWCS=0;
8341 REPLACE_MBSNRTOWCS=0;
8343 REPLACE_WCSRTOMBS=0;
8344 REPLACE_WCSNRTOMBS=0;
8349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8350 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8351 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8352 $as_echo_n "(cached) " >&6
8354 gl_cv_header_wchar_h_correct_inline=yes
8355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8356 /* end confdefs.h. */
8358 #define wcstod renamed_wcstod
8359 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8361 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8362 included before <wchar.h>. */
8367 extern int zero (void);
8368 int main () { return zero(); }
8371 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8372 (eval $ac_compile) 2>&5
8374 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8375 test $ac_status = 0; }; then
8376 mv conftest.$ac_objext conftest1.$ac_objext
8377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8378 /* end confdefs.h. */
8380 #define wcstod renamed_wcstod
8381 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8383 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8384 included before <wchar.h>. */
8389 int zero (void) { return 0; }
8392 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8393 (eval $ac_compile) 2>&5
8395 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8396 test $ac_status = 0; }; then
8397 mv conftest.$ac_objext conftest2.$ac_objext
8398 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8401 gl_cv_header_wchar_h_correct_inline=no
8405 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8409 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8410 if test $gl_cv_header_wchar_h_correct_inline = no; then
8411 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8412 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8413 C99 mode. You have four options:
8414 - Add the flag -fgnu89-inline to CC and reconfigure, or
8415 - Fix your include files, using parts of
8416 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8417 - Use a gcc version older than 4.3, or
8418 - Don't use the flags -std=c99 or -std=gnu99.
8419 Configuration aborted." "$LINENO" 5
8425 for ac_func in $ac_func_list
8427 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8428 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8429 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8430 cat >>confdefs.h <<_ACEOF
8431 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8441 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8442 if ${am_cv_langinfo_codeset+:} false; then :
8443 $as_echo_n "(cached) " >&6
8445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8446 /* end confdefs.h. */
8447 #include <langinfo.h>
8451 char* cs = nl_langinfo(CODESET); return !cs;
8456 if ac_fn_c_try_link "$LINENO"; then :
8457 am_cv_langinfo_codeset=yes
8459 am_cv_langinfo_codeset=no
8461 rm -f core conftest.err conftest.$ac_objext \
8462 conftest$ac_exeext conftest.$ac_ext
8465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8466 $as_echo "$am_cv_langinfo_codeset" >&6; }
8467 if test $am_cv_langinfo_codeset = yes; then
8469 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8477 $as_echo_n "checking for a traditional french locale... " >&6; }
8478 if ${gt_cv_locale_fr+:} false; then :
8479 $as_echo_n "(cached) " >&6
8482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8483 /* end confdefs.h. */
8487 #if HAVE_LANGINFO_CODESET
8488 # include <langinfo.h>
8495 /* Check whether the given locale name is recognized by the system. */
8496 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8497 /* On native Windows, setlocale(category, "") looks at the system settings,
8498 not at the environment variables. Also, when an encoding suffix such
8499 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8500 category of the locale to "C". */
8501 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8502 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8505 if (setlocale (LC_ALL, "") == NULL) return 1;
8507 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8508 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8509 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8510 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8511 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8512 some unit tests fail.
8513 On MirBSD 10, when an unsupported locale is specified, setlocale()
8514 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8515 #if HAVE_LANGINFO_CODESET
8517 const char *cs = nl_langinfo (CODESET);
8518 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8519 || strcmp (cs, "UTF-8") == 0)
8524 /* On Cygwin, avoid locale names without encoding suffix, because the
8525 locale_charset() function relies on the encoding suffix. Note that
8526 LC_ALL is set on the command line. */
8527 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8529 /* Check whether in the abbreviation of the second month, the second
8530 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8531 one byte long. This excludes the UTF-8 encoding. */
8532 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8533 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8534 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8535 /* Check whether the decimal separator is a comma.
8536 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8537 are nl_langinfo(RADIXCHAR) are both ".". */
8538 if (localeconv () ->decimal_point[0] != ',') return 1;
8544 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8545 (eval $ac_link) 2>&5
8547 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8548 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8550 # Handle native Windows specially, because there setlocale() interprets
8551 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8552 # "fr" or "fra" as "French" or "French_France.1252",
8553 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8554 # "ja" as "Japanese" or "Japanese_Japan.932",
8557 # Test for the native Windows locale name.
8558 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8559 gt_cv_locale_fr=French_France.1252
8562 gt_cv_locale_fr=none
8566 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8567 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8568 # configure script would override the LC_ALL setting. Likewise for
8569 # LC_CTYPE, which is also set at the beginning of the configure script.
8570 # Test for the usual locale name.
8571 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8572 gt_cv_locale_fr=fr_FR
8574 # Test for the locale name with explicit encoding suffix.
8575 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8576 gt_cv_locale_fr=fr_FR.ISO-8859-1
8578 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8579 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8580 gt_cv_locale_fr=fr_FR.ISO8859-1
8582 # Test for the HP-UX locale name.
8583 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8584 gt_cv_locale_fr=fr_FR.iso88591
8586 # Test for the Solaris 7 locale name.
8587 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8591 gt_cv_locale_fr=none
8603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8604 $as_echo "$gt_cv_locale_fr" >&6; }
8605 LOCALE_FR=$gt_cv_locale_fr
8613 for ac_header in $ac_header_list
8615 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8616 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8618 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8619 cat >>confdefs.h <<_ACEOF
8620 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8635 sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
8636 FAULT_YIELDS_SIGBUS=1 ;;
8638 FAULT_YIELDS_SIGBUS=1 ;;
8639 macos* | darwin*) # Mac OS X
8640 FAULT_YIELDS_SIGBUS=1 ;;
8642 FAULT_YIELDS_SIGBUS=1 ;;
8644 FAULT_YIELDS_SIGBUS=0 ;;
8647 cat >>confdefs.h <<_ACEOF
8648 #define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
8653 $as_echo_n "checking for working C stack overflow detection... " >&6; }
8654 if ${ac_cv_sys_stack_overflow_works+:} false; then :
8655 $as_echo_n "(cached) " >&6
8657 if test "$cross_compiling" = yes; then :
8658 ac_cv_sys_stack_overflow_works=cross-compiling
8660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8661 /* end confdefs.h. */
8666 # include <sys/types.h>
8667 # include <sys/time.h>
8668 # include <sys/resource.h>
8671 # define SIGSTKSZ 16384
8676 char buffer[2 * SIGSTKSZ];
8680 } alternate_signal_stack;
8683 segv_handler (int signo)
8692 struct sigaction act;
8696 /* Use the midpoint to avoid Irix sigaltstack bug. */
8697 st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
8698 st.ss_size = SIGSTKSZ;
8699 r = sigaltstack (&st, 0);
8703 sigemptyset (&act.sa_mask);
8704 act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
8705 act.sa_handler = segv_handler;
8706 #if FAULT_YIELDS_SIGBUS
8707 if (sigaction (SIGBUS, &act, 0) < 0)
8710 if (sigaction (SIGSEGV, &act, 0) < 0)
8714 static volatile int *
8715 recurse_1 (volatile int n, volatile int *p)
8718 *recurse_1 (n + 1, p) += n;
8722 recurse (volatile int n)
8725 return *recurse_1 (n, &sum);
8731 #if HAVE_SETRLIMIT && defined RLIMIT_STACK
8732 /* Before starting the endless recursion, try to be friendly
8733 to the user's machine. On some Linux 2.2.x systems, there
8734 is no stack limit for user processes at all. We don't want
8735 to kill such systems. */
8737 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
8738 setrlimit (RLIMIT_STACK, &rl);
8741 result = c_stack_action ();
8748 if ac_fn_c_try_run "$LINENO"; then :
8749 ac_cv_sys_stack_overflow_works=yes
8751 ac_cv_sys_stack_overflow_works=no
8753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8754 conftest.$ac_objext conftest.beam conftest.$ac_ext
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5
8759 $as_echo "$ac_cv_sys_stack_overflow_works" >&6; }
8761 if test $ac_cv_sys_stack_overflow_works = yes; then
8763 $as_echo "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
8767 $as_echo_n "checking for correct stack_t interpretation... " >&6; }
8768 if ${gl_cv_sigaltstack_low_base+:} false; then :
8769 $as_echo_n "(cached) " >&6
8772 if test "$cross_compiling" = yes; then :
8773 gl_cv_sigaltstack_low_base=cross-compiling
8775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8776 /* end confdefs.h. */
8781 #if HAVE_SYS_SIGNAL_H
8782 # include <sys/signal.h>
8785 # define SIGSTKSZ 16384
8787 volatile char *stack_lower_bound;
8788 volatile char *stack_upper_bound;
8789 static void check_stack_location (volatile char *addr)
8791 if (addr >= stack_lower_bound && addr <= stack_upper_bound)
8796 static void stackoverflow_handler (int sig)
8799 check_stack_location (&dummy);
8803 char mystack[2 * SIGSTKSZ];
8805 struct sigaction action;
8806 /* Install the alternate stack. */
8807 altstack.ss_sp = mystack + SIGSTKSZ;
8808 altstack.ss_size = SIGSTKSZ;
8809 stack_lower_bound = (char *) altstack.ss_sp;
8810 stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
8811 altstack.ss_flags = 0; /* no SS_DISABLE */
8812 if (sigaltstack (&altstack, NULL) < 0)
8814 /* Install the SIGSEGV handler. */
8815 sigemptyset (&action.sa_mask);
8816 action.sa_handler = &stackoverflow_handler;
8817 action.sa_flags = SA_ONSTACK;
8818 if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
8820 /* Provoke a SIGSEGV. */
8825 if ac_fn_c_try_run "$LINENO"; then :
8826 gl_cv_sigaltstack_low_base=yes
8828 gl_cv_sigaltstack_low_base=no
8830 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8831 conftest.$ac_objext conftest.beam conftest.$ac_ext
8835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5
8836 $as_echo "$gl_cv_sigaltstack_low_base" >&6; }
8837 if test "$gl_cv_sigaltstack_low_base" = no; then
8839 $as_echo "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
8843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
8844 $as_echo_n "checking for precise C stack overflow detection... " >&6; }
8845 if ${ac_cv_sys_xsi_stack_overflow_heuristic+:} false; then :
8846 $as_echo_n "(cached) " >&6
8848 if test "$cross_compiling" = yes; then :
8849 ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling
8851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8852 /* end confdefs.h. */
8857 # include <ucontext.h>
8860 # include <sys/types.h>
8861 # include <sys/time.h>
8862 # include <sys/resource.h>
8865 # define SIGSTKSZ 16384
8870 char buffer[2 * SIGSTKSZ];
8874 } alternate_signal_stack;
8877 # define find_stack_direction(ptr) STACK_DIRECTION
8880 find_stack_direction (char const *addr)
8883 return (! addr ? find_stack_direction (&dummy)
8884 : addr < &dummy ? 1 : -1);
8889 segv_handler (int signo, siginfo_t *info, void *context)
8891 if (0 < info->si_code)
8893 /* For XSI heuristics to work, we need uc_stack to describe
8894 the interrupted stack (as on Solaris), and not the
8895 currently executing stack (as on Linux). */
8896 ucontext_t const *user_context = context;
8897 char const *stack_min = user_context->uc_stack.ss_sp;
8898 size_t stack_size = user_context->uc_stack.ss_size;
8899 char const *faulting_address = info->si_addr;
8900 size_t s = faulting_address - stack_min;
8901 size_t page_size = sysconf (_SC_PAGESIZE);
8902 if (find_stack_direction (0) < 0)
8904 if (s < stack_size + page_size)
8915 struct sigaction act;
8919 /* Use the midpoint to avoid Irix sigaltstack bug. */
8920 st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
8921 st.ss_size = SIGSTKSZ;
8922 r = sigaltstack (&st, 0);
8926 sigemptyset (&act.sa_mask);
8927 act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
8928 act.sa_sigaction = segv_handler;
8929 #if FAULT_YIELDS_SIGBUS
8930 if (sigaction (SIGBUS, &act, 0) < 0)
8933 if (sigaction (SIGSEGV, &act, 0) < 0)
8937 static volatile int *
8938 recurse_1 (volatile int n, volatile int *p)
8941 *recurse_1 (n + 1, p) += n;
8945 recurse (volatile int n)
8948 return *recurse_1 (n, &sum);
8954 #if HAVE_SETRLIMIT && defined RLIMIT_STACK
8955 /* Before starting the endless recursion, try to be friendly
8956 to the user's machine. On some Linux 2.2.x systems, there
8957 is no stack limit for user processes at all. We don't want
8958 to kill such systems. */
8960 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
8961 setrlimit (RLIMIT_STACK, &rl);
8964 result = c_stack_action ();
8971 if ac_fn_c_try_run "$LINENO"; then :
8972 ac_cv_sys_xsi_stack_overflow_heuristic=yes
8974 ac_cv_sys_xsi_stack_overflow_heuristic=no
8976 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8977 conftest.$ac_objext conftest.beam conftest.$ac_ext
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5
8982 $as_echo "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; }
8984 if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
8986 $as_echo "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
8991 if test "X$prefix" = "XNONE"; then
8992 acl_final_prefix="$ac_default_prefix"
8994 acl_final_prefix="$prefix"
8996 if test "X$exec_prefix" = "XNONE"; then
8997 acl_final_exec_prefix='${prefix}'
8999 acl_final_exec_prefix="$exec_prefix"
9001 acl_save_prefix="$prefix"
9002 prefix="$acl_final_prefix"
9003 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9004 prefix="$acl_save_prefix"
9008 # Check whether --with-gnu-ld was given.
9009 if test "${with_gnu_ld+set}" = set; then :
9010 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9015 # Prepare PATH_SEPARATOR.
9016 # The user is always right.
9017 if test "${PATH_SEPARATOR+set}" != set; then
9018 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
9019 # contains only /bin. Note that ksh looks also at the FPATH variable,
9020 # so we have to set that as well for the test.
9022 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9023 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9024 || PATH_SEPARATOR=';'
9029 if test "$GCC" = yes; then
9030 # Check if gcc -print-prog-name=ld gives a path.
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
9032 $as_echo_n "checking for ld used by $CC... " >&6; }
9035 # gcc leaves a trailing carriage return which upsets mingw
9036 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9038 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9041 # Accept absolute paths.
9043 re_direlt='/[^/][^/]*/\.\./'
9044 # Canonicalize the pathname of ld
9045 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
9046 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
9047 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9049 test -z "$LD" && LD="$ac_prog"
9052 # If it fails, then pretend we aren't using GCC.
9056 # If it is relative, then search for the first ld in PATH.
9060 elif test "$with_gnu_ld" = yes; then
9061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9062 $as_echo_n "checking for GNU ld... " >&6; }
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9065 $as_echo_n "checking for non-GNU ld... " >&6; }
9067 if ${acl_cv_path_LD+:} false; then :
9068 $as_echo_n "(cached) " >&6
9070 if test -z "$LD"; then
9071 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9072 for ac_dir in $PATH; do
9074 test -z "$ac_dir" && ac_dir=.
9075 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9076 acl_cv_path_LD="$ac_dir/$ac_prog"
9077 # Check to see if the program is GNU ld. I'd rather use --version,
9078 # but apparently some variants of GNU ld only accept -v.
9079 # Break only if it was the GNU/non-GNU ld that we prefer.
9080 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
9081 *GNU* | *'with BFD'*)
9082 test "$with_gnu_ld" != no && break
9085 test "$with_gnu_ld" != yes && break
9092 acl_cv_path_LD="$LD" # Let the user override the test with a path.
9096 LD="$acl_cv_path_LD"
9097 if test -n "$LD"; then
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9099 $as_echo "$LD" >&6; }
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9102 $as_echo "no" >&6; }
9104 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9106 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9107 if ${acl_cv_prog_gnu_ld+:} false; then :
9108 $as_echo_n "(cached) " >&6
9110 # I'd rather use --version here, but apparently some GNU lds only accept -v.
9111 case `$LD -v 2>&1 </dev/null` in
9112 *GNU* | *'with BFD'*)
9113 acl_cv_prog_gnu_ld=yes
9116 acl_cv_prog_gnu_ld=no
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9121 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
9122 with_gnu_ld=$acl_cv_prog_gnu_ld
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9128 $as_echo_n "checking for shared library run path origin... " >&6; }
9129 if ${acl_cv_rpath+:} false; then :
9130 $as_echo_n "(cached) " >&6
9133 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9134 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9141 $as_echo "$acl_cv_rpath" >&6; }
9143 acl_libext="$acl_cv_libext"
9144 acl_shlibext="$acl_cv_shlibext"
9145 acl_libname_spec="$acl_cv_libname_spec"
9146 acl_library_names_spec="$acl_cv_library_names_spec"
9147 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9148 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9149 acl_hardcode_direct="$acl_cv_hardcode_direct"
9150 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
9151 # Check whether --enable-rpath was given.
9152 if test "${enable_rpath+set}" = set; then :
9153 enableval=$enable_rpath; :
9165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
9166 $as_echo_n "checking for 64-bit host... " >&6; }
9167 if ${gl_cv_solaris_64bit+:} false; then :
9168 $as_echo_n "(cached) " >&6
9170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9171 /* end confdefs.h. */
9178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9179 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
9180 gl_cv_solaris_64bit=yes
9182 gl_cv_solaris_64bit=no
9188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
9189 $as_echo "$gl_cv_solaris_64bit" >&6; }
9190 if test $gl_cv_solaris_64bit = yes; then
9191 acl_libdirstem=lib/64
9193 sparc*) acl_libdirstem2=lib/sparcv9 ;;
9194 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
9199 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
9200 if test -n "$searchpath"; then
9201 acl_save_IFS="${IFS= }"; IFS=":"
9202 for searchdir in $searchpath; do
9203 if test -d "$searchdir"; then
9204 case "$searchdir" in
9205 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
9207 # Better ignore directories of this form. They are misleading.
9209 *) searchdir=`cd "$searchdir" && pwd`
9210 case "$searchdir" in
9211 */lib64 ) acl_libdirstem=lib64 ;;
9220 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
9238 acl_save_prefix="$prefix"
9239 prefix="$acl_final_prefix"
9240 acl_save_exec_prefix="$exec_prefix"
9241 exec_prefix="$acl_final_exec_prefix"
9243 eval additional_includedir=\"$includedir\"
9244 eval additional_libdir=\"$libdir\"
9246 exec_prefix="$acl_save_exec_prefix"
9247 prefix="$acl_save_prefix"
9250 # Check whether --with-libsigsegv-prefix was given.
9251 if test "${with_libsigsegv_prefix+set}" = set; then :
9252 withval=$with_libsigsegv_prefix;
9253 if test "X$withval" = "Xno"; then
9256 if test "X$withval" = "X"; then
9258 acl_save_prefix="$prefix"
9259 prefix="$acl_final_prefix"
9260 acl_save_exec_prefix="$exec_prefix"
9261 exec_prefix="$acl_final_exec_prefix"
9263 eval additional_includedir=\"$includedir\"
9264 eval additional_libdir=\"$libdir\"
9266 exec_prefix="$acl_save_exec_prefix"
9267 prefix="$acl_save_prefix"
9270 additional_includedir="$withval/include"
9271 additional_libdir="$withval/$acl_libdirstem"
9272 if test "$acl_libdirstem2" != "$acl_libdirstem" \
9273 && ! test -d "$withval/$acl_libdirstem"; then
9274 additional_libdir="$withval/$acl_libdirstem2"
9288 names_already_handled=
9289 names_next_round='sigsegv '
9290 while test -n "$names_next_round"; do
9291 names_this_round="$names_next_round"
9293 for name in $names_this_round; do
9295 for n in $names_already_handled; do
9296 if test "$n" = "$name"; then
9301 if test -z "$already_handled"; then
9302 names_already_handled="$names_already_handled $name"
9303 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
9304 eval value=\"\$HAVE_LIB$uppername\"
9305 if test -n "$value"; then
9306 if test "$value" = yes; then
9307 eval value=\"\$LIB$uppername\"
9308 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
9309 eval value=\"\$LTLIB$uppername\"
9310 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
9319 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
9320 if test -n "$acl_shlibext"; then
9321 shrext=".$acl_shlibext" # typically: shrext=.so
9325 if test $use_additional = yes; then
9326 dir="$additional_libdir"
9327 if test -n "$acl_shlibext"; then
9328 if test -f "$dir/$libname$shrext"; then
9330 found_so="$dir/$libname$shrext"
9332 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9333 ver=`(cd "$dir" && \
9334 for f in "$libname$shrext".*; do echo "$f"; done \
9335 | sed -e "s,^$libname$shrext\\\\.,," \
9336 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9337 | sed 1q ) 2>/dev/null`
9338 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9340 found_so="$dir/$libname$shrext.$ver"
9343 eval library_names=\"$acl_library_names_spec\"
9344 for f in $library_names; do
9345 if test -f "$dir/$f"; then
9354 if test "X$found_dir" = "X"; then
9355 if test -f "$dir/$libname.$acl_libext"; then
9357 found_a="$dir/$libname.$acl_libext"
9360 if test "X$found_dir" != "X"; then
9361 if test -f "$dir/$libname.la"; then
9362 found_la="$dir/$libname.la"
9366 if test "X$found_dir" = "X"; then
9367 for x in $LDFLAGS $LTLIBSIGSEGV; do
9369 acl_save_prefix="$prefix"
9370 prefix="$acl_final_prefix"
9371 acl_save_exec_prefix="$exec_prefix"
9372 exec_prefix="$acl_final_exec_prefix"
9374 exec_prefix="$acl_save_exec_prefix"
9375 prefix="$acl_save_prefix"
9379 dir=`echo "X$x" | sed -e 's/^X-L//'`
9380 if test -n "$acl_shlibext"; then
9381 if test -f "$dir/$libname$shrext"; then
9383 found_so="$dir/$libname$shrext"
9385 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9386 ver=`(cd "$dir" && \
9387 for f in "$libname$shrext".*; do echo "$f"; done \
9388 | sed -e "s,^$libname$shrext\\\\.,," \
9389 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9390 | sed 1q ) 2>/dev/null`
9391 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9393 found_so="$dir/$libname$shrext.$ver"
9396 eval library_names=\"$acl_library_names_spec\"
9397 for f in $library_names; do
9398 if test -f "$dir/$f"; then
9407 if test "X$found_dir" = "X"; then
9408 if test -f "$dir/$libname.$acl_libext"; then
9410 found_a="$dir/$libname.$acl_libext"
9413 if test "X$found_dir" != "X"; then
9414 if test -f "$dir/$libname.la"; then
9415 found_la="$dir/$libname.la"
9420 if test "X$found_dir" != "X"; then
9425 if test "X$found_dir" != "X"; then
9426 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
9427 if test "X$found_so" != "X"; then
9428 if test "$enable_rpath" = no \
9429 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
9430 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
9431 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9434 for x in $ltrpathdirs; do
9435 if test "X$x" = "X$found_dir"; then
9440 if test -z "$haveit"; then
9441 ltrpathdirs="$ltrpathdirs $found_dir"
9443 if test "$acl_hardcode_direct" = yes; then
9444 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9446 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
9447 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9449 for x in $rpathdirs; do
9450 if test "X$x" = "X$found_dir"; then
9455 if test -z "$haveit"; then
9456 rpathdirs="$rpathdirs $found_dir"
9460 for x in $LDFLAGS $LIBSIGSEGV; do
9462 acl_save_prefix="$prefix"
9463 prefix="$acl_final_prefix"
9464 acl_save_exec_prefix="$exec_prefix"
9465 exec_prefix="$acl_final_exec_prefix"
9467 exec_prefix="$acl_save_exec_prefix"
9468 prefix="$acl_save_prefix"
9470 if test "X$x" = "X-L$found_dir"; then
9475 if test -z "$haveit"; then
9476 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
9478 if test "$acl_hardcode_minus_L" != no; then
9479 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9481 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
9487 if test "X$found_a" != "X"; then
9488 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
9490 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
9493 additional_includedir=
9494 case "$found_dir" in
9495 */$acl_libdirstem | */$acl_libdirstem/)
9496 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
9497 if test "$name" = 'sigsegv'; then
9498 LIBSIGSEGV_PREFIX="$basedir"
9500 additional_includedir="$basedir/include"
9502 */$acl_libdirstem2 | */$acl_libdirstem2/)
9503 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
9504 if test "$name" = 'sigsegv'; then
9505 LIBSIGSEGV_PREFIX="$basedir"
9507 additional_includedir="$basedir/include"
9510 if test "X$additional_includedir" != "X"; then
9511 if test "X$additional_includedir" != "X/usr/include"; then
9513 if test "X$additional_includedir" = "X/usr/local/include"; then
9514 if test -n "$GCC"; then
9516 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9520 if test -z "$haveit"; then
9521 for x in $CPPFLAGS $INCSIGSEGV; do
9523 acl_save_prefix="$prefix"
9524 prefix="$acl_final_prefix"
9525 acl_save_exec_prefix="$exec_prefix"
9526 exec_prefix="$acl_final_exec_prefix"
9528 exec_prefix="$acl_save_exec_prefix"
9529 prefix="$acl_save_prefix"
9531 if test "X$x" = "X-I$additional_includedir"; then
9536 if test -z "$haveit"; then
9537 if test -d "$additional_includedir"; then
9538 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
9544 if test -n "$found_la"; then
9545 save_libdir="$libdir"
9547 */* | *\\*) . "$found_la" ;;
9548 *) . "./$found_la" ;;
9550 libdir="$save_libdir"
9551 for dep in $dependency_libs; do
9554 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9555 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
9556 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
9558 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
9559 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
9560 if test -n "$GCC"; then
9562 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9566 if test -z "$haveit"; then
9568 for x in $LDFLAGS $LIBSIGSEGV; do
9570 acl_save_prefix="$prefix"
9571 prefix="$acl_final_prefix"
9572 acl_save_exec_prefix="$exec_prefix"
9573 exec_prefix="$acl_final_exec_prefix"
9575 exec_prefix="$acl_save_exec_prefix"
9576 prefix="$acl_save_prefix"
9578 if test "X$x" = "X-L$additional_libdir"; then
9583 if test -z "$haveit"; then
9584 if test -d "$additional_libdir"; then
9585 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
9589 for x in $LDFLAGS $LTLIBSIGSEGV; do
9591 acl_save_prefix="$prefix"
9592 prefix="$acl_final_prefix"
9593 acl_save_exec_prefix="$exec_prefix"
9594 exec_prefix="$acl_final_exec_prefix"
9596 exec_prefix="$acl_save_exec_prefix"
9597 prefix="$acl_save_prefix"
9599 if test "X$x" = "X-L$additional_libdir"; then
9604 if test -z "$haveit"; then
9605 if test -d "$additional_libdir"; then
9606 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
9613 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9614 if test "$enable_rpath" != no; then
9616 for x in $rpathdirs; do
9617 if test "X$x" = "X$dir"; then
9622 if test -z "$haveit"; then
9623 rpathdirs="$rpathdirs $dir"
9626 for x in $ltrpathdirs; do
9627 if test "X$x" = "X$dir"; then
9632 if test -z "$haveit"; then
9633 ltrpathdirs="$ltrpathdirs $dir"
9638 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9641 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9644 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
9645 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
9651 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
9652 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
9658 if test "X$rpathdirs" != "X"; then
9659 if test -n "$acl_hardcode_libdir_separator"; then
9661 for found_dir in $rpathdirs; do
9662 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
9664 acl_save_libdir="$libdir"
9666 eval flag=\"$acl_hardcode_libdir_flag_spec\"
9667 libdir="$acl_save_libdir"
9668 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
9670 for found_dir in $rpathdirs; do
9671 acl_save_libdir="$libdir"
9673 eval flag=\"$acl_hardcode_libdir_flag_spec\"
9674 libdir="$acl_save_libdir"
9675 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
9679 if test "X$ltrpathdirs" != "X"; then
9680 for found_dir in $ltrpathdirs; do
9681 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
9691 ac_save_CPPFLAGS="$CPPFLAGS"
9693 for element in $INCSIGSEGV; do
9695 for x in $CPPFLAGS; do
9697 acl_save_prefix="$prefix"
9698 prefix="$acl_final_prefix"
9699 acl_save_exec_prefix="$exec_prefix"
9700 exec_prefix="$acl_final_exec_prefix"
9702 exec_prefix="$acl_save_exec_prefix"
9703 prefix="$acl_save_prefix"
9705 if test "X$x" = "X$element"; then
9710 if test -z "$haveit"; then
9711 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
9717 $as_echo_n "checking for libsigsegv... " >&6; }
9718 if ${ac_cv_libsigsegv+:} false; then :
9719 $as_echo_n "(cached) " >&6
9722 ac_save_LIBS="$LIBS"
9723 case " $LIBSIGSEGV" in
9724 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
9725 *) LIBS="$LIBSIGSEGV $LIBS" ;;
9727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9728 /* end confdefs.h. */
9729 #include <sigsegv.h>
9733 sigsegv_deinstall_handler();
9738 if ac_fn_c_try_link "$LINENO"; then :
9739 ac_cv_libsigsegv=yes
9741 ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
9743 rm -f core conftest.err conftest.$ac_objext \
9744 conftest$ac_exeext conftest.$ac_ext
9745 LIBS="$ac_save_LIBS"
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
9749 $as_echo "$ac_cv_libsigsegv" >&6; }
9750 if test "$ac_cv_libsigsegv" = yes; then
9753 $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
9756 $as_echo_n "checking how to link with libsigsegv... " >&6; }
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
9758 $as_echo "$LIBSIGSEGV" >&6; }
9761 CPPFLAGS="$ac_save_CPPFLAGS"
9773 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
9782 GNULIB_CALLOC_POSIX=0;
9783 GNULIB_CANONICALIZE_FILE_NAME=0;
9784 GNULIB_GETLOADAVG=0;
9787 GNULIB_MALLOC_POSIX=0;
9794 GNULIB_POSIX_OPENPT=0;
9800 GNULIB_REALLOC_POSIX=0;
9803 GNULIB_SECURE_GETENV=0;
9808 GNULIB_SYSTEM_POSIX=0;
9814 HAVE_CANONICALIZE_FILE_NAME=1;
9815 HAVE_DECL_GETLOADAVG=1;
9823 HAVE_POSIX_OPENPT=1;
9831 HAVE_SECURE_GETENV=1;
9837 HAVE_STRUCT_RANDOM_DATA=1;
9838 HAVE_SYS_LOADAVG_H=0;
9840 HAVE_DECL_UNSETENV=1;
9842 REPLACE_CANONICALIZE_FILE_NAME=0;
9847 REPLACE_PTSNAME_R=0;
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9866 $as_echo_n "checking whether // is distinct from /... " >&6; }
9867 if ${gl_cv_double_slash_root+:} false; then :
9868 $as_echo_n "(cached) " >&6
9870 if test x"$cross_compiling" = xyes ; then
9871 # When cross-compiling, there is no way to tell whether // is special
9872 # short of a list of hosts. However, the only known hosts to date
9873 # that have a distinct // are Apollo DomainOS (too old to port to),
9874 # Cygwin, and z/OS. If anyone knows of another system for which // has
9875 # special semantics and is distinct from /, please report it to
9876 # <bug-gnulib@gnu.org>.
9878 *-cygwin | i370-ibm-openedition)
9879 gl_cv_double_slash_root=yes ;;
9881 # Be optimistic and assume that / and // are the same when we
9883 gl_cv_double_slash_root='unknown, assuming no' ;;
9886 set x `ls -di / // 2>/dev/null`
9887 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9888 gl_cv_double_slash_root=no
9890 gl_cv_double_slash_root=yes
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9895 $as_echo "$gl_cv_double_slash_root" >&6; }
9896 if test "$gl_cv_double_slash_root" = yes; then
9898 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
9907 $as_echo_n "checking whether realpath works... " >&6; }
9908 if ${gl_cv_func_realpath_works+:} false; then :
9909 $as_echo_n "(cached) " >&6
9914 if test "$cross_compiling" = yes; then :
9916 # Guess yes on glibc systems.
9917 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
9918 # If we don't know, assume the worst.
9919 *) gl_cv_func_realpath_works="guessing no" ;;
9923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9924 /* end confdefs.h. */
9929 #if defined __MACH__ && defined __APPLE__
9930 /* Avoid a crash on Mac OS X. */
9931 #include <mach/mach.h>
9932 #include <mach/mach_error.h>
9933 #include <mach/thread_status.h>
9934 #include <mach/exception.h>
9935 #include <mach/task.h>
9936 #include <pthread.h>
9937 /* The exception port on which our thread listens. */
9938 static mach_port_t our_exception_port;
9939 /* The main function of the thread listening for exceptions of type
9942 mach_exception_thread (void *arg)
9944 /* Buffer for a message to be received. */
9946 mach_msg_header_t head;
9947 mach_msg_body_t msgh_body;
9950 mach_msg_return_t retval;
9951 /* Wait for a message on the exception port. */
9952 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9953 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9954 if (retval != MACH_MSG_SUCCESS)
9961 mach_port_t self = mach_task_self ();
9962 /* Allocate a port on which the thread shall listen for exceptions. */
9963 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9965 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9966 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9967 MACH_MSG_TYPE_MAKE_SEND)
9969 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9971 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9972 /* Create the thread listening on the exception port. */
9973 pthread_attr_t attr;
9975 if (pthread_attr_init (&attr) == 0
9976 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9977 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9978 pthread_attr_destroy (&attr);
9979 /* Replace the exception port info for these exceptions with our own.
9980 Note that we replace the exception port for the entire task, not only
9981 for a particular thread. This has the effect that when our exception
9982 port gets the message, the thread specific exception port has already
9983 been asked, and we don't need to bother about it.
9984 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9985 task_set_exception_ports (self, mask, our_exception_port,
9986 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9991 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9992 /* Avoid a crash on native Windows. */
9993 #define WIN32_LEAN_AND_MEAN
9994 #include <windows.h>
9995 #include <winerror.h>
9997 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9999 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10001 case EXCEPTION_ACCESS_VIOLATION:
10002 case EXCEPTION_IN_PAGE_ERROR:
10003 case EXCEPTION_STACK_OVERFLOW:
10004 case EXCEPTION_GUARD_PAGE:
10005 case EXCEPTION_PRIV_INSTRUCTION:
10006 case EXCEPTION_ILLEGAL_INSTRUCTION:
10007 case EXCEPTION_DATATYPE_MISALIGNMENT:
10008 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10009 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10012 return EXCEPTION_CONTINUE_SEARCH;
10015 nocrash_init (void)
10017 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10020 /* Avoid a crash on POSIX systems. */
10021 #include <signal.h>
10022 /* A POSIX signal handler. */
10024 exception_handler (int sig)
10029 nocrash_init (void)
10032 signal (SIGSEGV, exception_handler);
10035 signal (SIGBUS, exception_handler);
10040 #include <stdlib.h>
10041 #include <string.h>
10049 char *name = realpath ("conftest.a", NULL);
10050 if (!(name && *name == '/'))
10054 char *name = realpath ("conftest.b/../conftest.a", NULL);
10059 char *name = realpath ("conftest.a/", NULL);
10064 char *name1 = realpath (".", NULL);
10065 char *name2 = realpath ("conftest.d//./..", NULL);
10066 if (strcmp (name1, name2) != 0)
10076 if ac_fn_c_try_run "$LINENO"; then :
10077 gl_cv_func_realpath_works=yes
10079 gl_cv_func_realpath_works=no
10081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10082 conftest.$ac_objext conftest.beam conftest.$ac_ext
10085 rm -rf conftest.a conftest.d
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
10089 $as_echo "$gl_cv_func_realpath_works" >&6; }
10090 case "$gl_cv_func_realpath_works" in
10093 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
10115 GNULIB_EUIDACCESS=0;
10116 GNULIB_FACCESSAT=0;
10119 GNULIB_FDATASYNC=0;
10121 GNULIB_FTRUNCATE=0;
10123 GNULIB_GETDOMAINNAME=0;
10124 GNULIB_GETDTABLESIZE=0;
10125 GNULIB_GETGROUPS=0;
10126 GNULIB_GETHOSTNAME=0;
10128 GNULIB_GETLOGIN_R=0;
10129 GNULIB_GETPAGESIZE=0;
10130 GNULIB_GETUSERSHELL=0;
10131 GNULIB_GROUP_MEMBER=0;
10143 GNULIB_READLINKAT=0;
10145 GNULIB_SETHOSTNAME=0;
10148 GNULIB_SYMLINKAT=0;
10149 GNULIB_TTYNAME_R=0;
10150 GNULIB_UNISTD_H_NONBLOCKING=0;
10151 GNULIB_UNISTD_H_SIGPIPE=0;
10166 HAVE_GETDTABLESIZE=1;
10168 HAVE_GETHOSTNAME=1;
10170 HAVE_GETPAGESIZE=1;
10171 HAVE_GROUP_MEMBER=1;
10181 HAVE_SETHOSTNAME=1;
10187 HAVE_DECL_ENVIRON=1;
10188 HAVE_DECL_FCHDIR=1;
10189 HAVE_DECL_FDATASYNC=1;
10190 HAVE_DECL_GETDOMAINNAME=1;
10191 HAVE_DECL_GETLOGIN_R=1;
10192 HAVE_DECL_GETPAGESIZE=1;
10193 HAVE_DECL_GETUSERSHELL=1;
10194 HAVE_DECL_SETHOSTNAME=1;
10195 HAVE_DECL_TTYNAME_R=1;
10197 HAVE_SYS_PARAM_H=0;
10202 REPLACE_FCHOWNAT=0;
10203 REPLACE_FTRUNCATE=0;
10205 REPLACE_GETDOMAINNAME=0;
10206 REPLACE_GETLOGIN_R=0;
10207 REPLACE_GETGROUPS=0;
10208 REPLACE_GETPAGESIZE=0;
10217 REPLACE_READLINK=0;
10221 REPLACE_TTYNAME_R=0;
10223 REPLACE_UNLINKAT=0;
10226 UNISTD_H_HAVE_WINSOCK2_H=0;
10227 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
10234 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10235 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
10237 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
10240 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
10257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
10258 $as_echo_n "checking if environ is properly declared... " >&6; }
10259 if ${gt_cv_var_environ_declaration+:} false; then :
10260 $as_echo_n "(cached) " >&6
10263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10264 /* end confdefs.h. */
10266 #include <unistd.h>
10268 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
10269 #include <stdlib.h>
10271 extern struct { int foo; } environ;
10280 if ac_fn_c_try_compile "$LINENO"; then :
10281 gt_cv_var_environ_declaration=no
10283 gt_cv_var_environ_declaration=yes
10285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
10289 $as_echo "$gt_cv_var_environ_declaration" >&6; }
10290 if test $gt_cv_var_environ_declaration = yes; then
10292 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
10297 if test $gt_cv_var_environ_declaration != yes; then
10298 HAVE_DECL_ENVIRON=0
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
10304 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
10305 if ${gl_cv_have_include_next+:} false; then :
10306 $as_echo_n "(cached) " >&6
10308 rm -rf conftestd1a conftestd1b conftestd2
10309 mkdir conftestd1a conftestd1b conftestd2
10310 cat <<EOF > conftestd1a/conftest.h
10311 #define DEFINED_IN_CONFTESTD1
10312 #include_next <conftest.h>
10313 #ifdef DEFINED_IN_CONFTESTD2
10316 #error "include_next doesn't work"
10319 cat <<EOF > conftestd1b/conftest.h
10320 #define DEFINED_IN_CONFTESTD1
10322 #include_next <conftest.h>
10323 #ifdef DEFINED_IN_CONFTESTD2
10326 #error "include_next doesn't work"
10329 cat <<EOF > conftestd2/conftest.h
10330 #ifndef DEFINED_IN_CONFTESTD1
10331 #error "include_next test doesn't work"
10333 #define DEFINED_IN_CONFTESTD2
10335 gl_save_CPPFLAGS="$CPPFLAGS"
10336 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
10337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10338 /* end confdefs.h. */
10339 #include <conftest.h>
10341 if ac_fn_c_try_compile "$LINENO"; then :
10342 gl_cv_have_include_next=yes
10344 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
10345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10346 /* end confdefs.h. */
10347 #include <conftest.h>
10349 if ac_fn_c_try_compile "$LINENO"; then :
10350 gl_cv_have_include_next=buggy
10352 gl_cv_have_include_next=no
10354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10358 CPPFLAGS="$gl_save_CPPFLAGS"
10359 rm -rf conftestd1a conftestd1b conftestd2
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
10363 $as_echo "$gl_cv_have_include_next" >&6; }
10364 PRAGMA_SYSTEM_HEADER=
10365 if test $gl_cv_have_include_next = yes; then
10366 INCLUDE_NEXT=include_next
10367 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
10368 if test -n "$GCC"; then
10369 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
10372 if test $gl_cv_have_include_next = buggy; then
10373 INCLUDE_NEXT=include
10374 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
10376 INCLUDE_NEXT=include
10377 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
10384 $as_echo_n "checking whether system header files limit the line length... " >&6; }
10385 if ${gl_cv_pragma_columns+:} false; then :
10386 $as_echo_n "(cached) " >&6
10388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10389 /* end confdefs.h. */
10396 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10397 $EGREP "choke me" >/dev/null 2>&1; then :
10398 gl_cv_pragma_columns=yes
10400 gl_cv_pragma_columns=no
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
10407 $as_echo "$gl_cv_pragma_columns" >&6; }
10408 if test $gl_cv_pragma_columns = yes; then
10409 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
10418 $as_echo_n "checking for complete errno.h... " >&6; }
10419 if ${gl_cv_header_errno_h_complete+:} false; then :
10420 $as_echo_n "(cached) " >&6
10423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10424 /* end confdefs.h. */
10427 #if !defined ETXTBSY
10430 #if !defined ENOMSG
10436 #if !defined ENOLINK
10439 #if !defined EPROTO
10442 #if !defined EMULTIHOP
10445 #if !defined EBADMSG
10448 #if !defined EOVERFLOW
10451 #if !defined ENOTSUP
10454 #if !defined ENETRESET
10457 #if !defined ECONNABORTED
10460 #if !defined ESTALE
10463 #if !defined EDQUOT
10466 #if !defined ECANCELED
10469 #if !defined EOWNERDEAD
10472 #if !defined ENOTRECOVERABLE
10475 #if !defined EILSEQ
10480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10481 $EGREP "booboo" >/dev/null 2>&1; then :
10482 gl_cv_header_errno_h_complete=no
10484 gl_cv_header_errno_h_complete=yes
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10491 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
10492 if test $gl_cv_header_errno_h_complete = yes; then
10503 if test $gl_cv_have_include_next = yes; then
10504 gl_cv_next_errno_h='<'errno.h'>'
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10507 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
10508 if ${gl_cv_next_errno_h+:} false; then :
10509 $as_echo_n "(cached) " >&6
10512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10513 /* end confdefs.h. */
10518 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10519 *) gl_absname_cpp="$ac_cpp" ;;
10524 gl_dirsep_regex='[/\\]'
10527 gl_dirsep_regex='\/'
10530 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10532 gl_header_literal_regex=`echo 'errno.h' \
10533 | sed -e "$gl_make_literal_regex_sed"`
10534 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10535 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10540 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10541 sed -n "$gl_absolute_header_sed"`'"'
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10546 $as_echo "$gl_cv_next_errno_h" >&6; }
10548 NEXT_ERRNO_H=$gl_cv_next_errno_h
10550 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10552 gl_next_as_first_directive='<'errno.h'>'
10554 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10555 gl_next_as_first_directive=$gl_cv_next_errno_h
10557 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10565 if test -n "$ERRNO_H"; then
10566 GL_GENERATE_ERRNO_H_TRUE=
10567 GL_GENERATE_ERRNO_H_FALSE='#'
10569 GL_GENERATE_ERRNO_H_TRUE='#'
10570 GL_GENERATE_ERRNO_H_FALSE=
10574 if test -n "$ERRNO_H"; then
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10576 $as_echo_n "checking for EMULTIHOP value... " >&6; }
10577 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10578 $as_echo_n "(cached) " >&6
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582 /* end confdefs.h. */
10590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10591 $EGREP "yes" >/dev/null 2>&1; then :
10592 gl_cv_header_errno_h_EMULTIHOP=yes
10594 gl_cv_header_errno_h_EMULTIHOP=no
10598 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10600 /* end confdefs.h. */
10602 #define _XOPEN_SOURCE_EXTENDED 1
10609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10610 $EGREP "yes" >/dev/null 2>&1; then :
10611 gl_cv_header_errno_h_EMULTIHOP=hidden
10615 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10616 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
10617 #define _XOPEN_SOURCE_EXTENDED 1
10619 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10621 #include <stdlib.h>
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10631 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10632 case $gl_cv_header_errno_h_EMULTIHOP in
10634 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10637 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10645 if test -n "$ERRNO_H"; then
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10647 $as_echo_n "checking for ENOLINK value... " >&6; }
10648 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10649 $as_echo_n "(cached) " >&6
10652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10653 /* end confdefs.h. */
10661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10662 $EGREP "yes" >/dev/null 2>&1; then :
10663 gl_cv_header_errno_h_ENOLINK=yes
10665 gl_cv_header_errno_h_ENOLINK=no
10669 if test $gl_cv_header_errno_h_ENOLINK = no; then
10670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671 /* end confdefs.h. */
10673 #define _XOPEN_SOURCE_EXTENDED 1
10680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10681 $EGREP "yes" >/dev/null 2>&1; then :
10682 gl_cv_header_errno_h_ENOLINK=hidden
10686 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10687 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
10688 #define _XOPEN_SOURCE_EXTENDED 1
10690 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10692 #include <stdlib.h>
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10702 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10703 case $gl_cv_header_errno_h_ENOLINK in
10705 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10708 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10716 if test -n "$ERRNO_H"; then
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10718 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10719 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10720 $as_echo_n "(cached) " >&6
10723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10724 /* end confdefs.h. */
10732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10733 $EGREP "yes" >/dev/null 2>&1; then :
10734 gl_cv_header_errno_h_EOVERFLOW=yes
10736 gl_cv_header_errno_h_EOVERFLOW=no
10740 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10742 /* end confdefs.h. */
10744 #define _XOPEN_SOURCE_EXTENDED 1
10751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10752 $EGREP "yes" >/dev/null 2>&1; then :
10753 gl_cv_header_errno_h_EOVERFLOW=hidden
10757 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10758 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
10759 #define _XOPEN_SOURCE_EXTENDED 1
10761 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10763 #include <stdlib.h>
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10773 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10774 case $gl_cv_header_errno_h_EOVERFLOW in
10776 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10779 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10787 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10788 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10794 cat >>confdefs.h <<_ACEOF
10795 #define HAVE_DECL_STRERROR_R $ac_have_decl
10798 for ac_func in strerror_r
10800 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10801 if test "x$ac_cv_func_strerror_r" = xyes; then :
10802 cat >>confdefs.h <<_ACEOF
10803 #define HAVE_STRERROR_R 1
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10810 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10811 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10812 $as_echo_n "(cached) " >&6
10815 ac_cv_func_strerror_r_char_p=no
10816 if test $ac_cv_have_decl_strerror_r = yes; then
10817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10818 /* end confdefs.h. */
10819 $ac_includes_default
10825 char x = *strerror_r (0, buf, sizeof buf);
10826 char *p = strerror_r (0, buf, sizeof buf);
10833 if ac_fn_c_try_compile "$LINENO"; then :
10834 ac_cv_func_strerror_r_char_p=yes
10836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10838 # strerror_r is not declared. Choose between
10839 # systems that have relatively inaccessible declarations for the
10840 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
10841 # former has a strerror_r that returns char*, while the latter
10842 # has a strerror_r that returns `int'.
10843 # This test should segfault on the DEC system.
10844 if test "$cross_compiling" = yes; then :
10847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10848 /* end confdefs.h. */
10849 $ac_includes_default
10850 extern char *strerror_r ();
10855 char x = *strerror_r (0, buf, sizeof buf);
10856 return ! isalpha (x);
10861 if ac_fn_c_try_run "$LINENO"; then :
10862 ac_cv_func_strerror_r_char_p=yes
10864 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10865 conftest.$ac_objext conftest.beam conftest.$ac_ext
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10872 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10873 if test $ac_cv_func_strerror_r_char_p = yes; then
10875 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10879 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10880 if test "x$ac_cv_type_mode_t" = xyes; then :
10884 cat >>confdefs.h <<_ACEOF
10894 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
10896 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
10898 cat >>confdefs.h <<_ACEOF
10899 #define HAVE_SIG_ATOMIC_T 1
10905 $as_echo "#define sig_atomic_t int" >>confdefs.h
10919 GNULIB_FPRINTF_POSIX=0;
10935 GNULIB_OBSTACK_PRINTF=0;
10936 GNULIB_OBSTACK_PRINTF_POSIX=0;
10941 GNULIB_PRINTF_POSIX=0;
10950 GNULIB_SPRINTF_POSIX=0;
10951 GNULIB_STDIO_H_NONBLOCKING=0;
10952 GNULIB_STDIO_H_SIGPIPE=0;
10954 GNULIB_VASPRINTF=0;
10959 GNULIB_VFPRINTF_POSIX=0;
10961 GNULIB_VPRINTF_POSIX=0;
10962 GNULIB_VSNPRINTF=0;
10963 GNULIB_VSPRINTF_POSIX=0;
10964 HAVE_DECL_FPURGE=1;
10965 HAVE_DECL_FSEEKO=1;
10966 HAVE_DECL_FTELLO=1;
10967 HAVE_DECL_GETDELIM=1;
10968 HAVE_DECL_GETLINE=1;
10969 HAVE_DECL_OBSTACK_PRINTF=1;
10970 HAVE_DECL_SNPRINTF=1;
10971 HAVE_DECL_VSNPRINTF=1;
10992 REPLACE_GETDELIM=0;
10994 REPLACE_OBSTACK_PRINTF=0;
11000 REPLACE_RENAMEAT=0;
11001 REPLACE_SNPRINTF=0;
11003 REPLACE_STDIO_READ_FUNCS=0;
11004 REPLACE_STDIO_WRITE_FUNCS=0;
11006 REPLACE_VASPRINTF=0;
11007 REPLACE_VDPRINTF=0;
11008 REPLACE_VFPRINTF=0;
11010 REPLACE_VSNPRINTF=0;
11011 REPLACE_VSPRINTF=0;
11015 GNULIB_NONBLOCKING=0;
11033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
11034 $as_echo_n "checking for working fcntl.h... " >&6; }
11035 if ${gl_cv_header_working_fcntl_h+:} false; then :
11036 $as_echo_n "(cached) " >&6
11038 if test "$cross_compiling" = yes; then :
11039 gl_cv_header_working_fcntl_h=cross-compiling
11041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11042 /* end confdefs.h. */
11043 #include <sys/types.h>
11044 #include <sys/stat.h>
11046 # include <unistd.h>
11047 #else /* on Windows with MSVC */
11049 # include <stdlib.h>
11050 # defined sleep(n) _sleep ((n) * 1000)
11054 #define O_NOATIME 0
11057 #define O_NOFOLLOW 0
11059 static int const constants[] =
11061 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
11062 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
11069 int result = !constants;
11072 static char const sym[] = "conftest.sym";
11073 if (symlink ("/dev/null", sym) != 0)
11077 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
11084 if (unlink (sym) != 0 || symlink (".", sym) != 0)
11088 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
11099 static char const file[] = "confdefs.h";
11100 int fd = open (file, O_RDONLY | O_NOATIME);
11106 if (fstat (fd, &st0) != 0)
11112 if (read (fd, &c, 1) != 1)
11116 if (close (fd) != 0)
11121 if (stat (file, &st1) != 0)
11124 if (st0.st_atime != st1.st_atime)
11136 if ac_fn_c_try_run "$LINENO"; then :
11137 gl_cv_header_working_fcntl_h=yes
11140 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
11141 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
11142 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
11143 *) gl_cv_header_working_fcntl_h='no';;
11146 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11147 conftest.$ac_objext conftest.beam conftest.$ac_ext
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
11152 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
11154 case $gl_cv_header_working_fcntl_h in #(
11155 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
11159 cat >>confdefs.h <<_ACEOF
11160 #define HAVE_WORKING_O_NOATIME $ac_val
11164 case $gl_cv_header_working_fcntl_h in #(
11165 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
11169 cat >>confdefs.h <<_ACEOF
11170 #define HAVE_WORKING_O_NOFOLLOW $ac_val
11174 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11175 if test "x$ac_cv_type_pid_t" = xyes; then :
11179 cat >>confdefs.h <<_ACEOF
11215 GNULIB_COPYSIGNF=0;
11216 GNULIB_COPYSIGNL=0;
11275 GNULIB_REMAINDER=0;
11276 GNULIB_REMAINDERF=0;
11277 GNULIB_REMAINDERL=0;
11363 HAVE_DECL_COPYSIGNF=1;
11369 HAVE_DECL_EXPM1L=1;
11370 HAVE_DECL_FLOORF=1;
11371 HAVE_DECL_FLOORL=1;
11372 HAVE_DECL_FREXPL=1;
11373 HAVE_DECL_LDEXPL=1;
11375 HAVE_DECL_LOG10L=1;
11380 HAVE_DECL_REMAINDER=1;
11381 HAVE_DECL_REMAINDERL=1;
11384 HAVE_DECL_ROUNDF=1;
11385 HAVE_DECL_ROUNDL=1;
11390 HAVE_DECL_TRUNCF=1;
11391 HAVE_DECL_TRUNCL=1;
11414 REPLACE_HUGE_VAL=0;
11420 REPLACE_ISFINITE=0;
11443 REPLACE_REMAINDER=0;
11444 REPLACE_REMAINDERF=0;
11445 REPLACE_REMAINDERL=0;
11450 REPLACE_SIGNBIT_USING_GCC=0;
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11458 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
11459 if ${gl_cv_func_frexp_no_libm+:} false; then :
11460 $as_echo_n "(cached) " >&6
11463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11464 /* end confdefs.h. */
11470 int e; return frexp (x, &e) > 0;
11475 if ac_fn_c_try_link "$LINENO"; then :
11476 gl_cv_func_frexp_no_libm=yes
11478 gl_cv_func_frexp_no_libm=no
11480 rm -f core conftest.err conftest.$ac_objext \
11481 conftest$ac_exeext conftest.$ac_ext
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11485 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
11487 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
11488 if test "x$ac_cv_have_decl_alarm" = xyes; then :
11494 cat >>confdefs.h <<_ACEOF
11495 #define HAVE_DECL_ALARM $ac_have_decl
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
11500 $as_echo_n "checking whether long double and double are the same... " >&6; }
11501 if ${gl_cv_long_double_equals_double+:} false; then :
11502 $as_echo_n "(cached) " >&6
11504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11505 /* end confdefs.h. */
11510 typedef int check[sizeof (long double) == sizeof (double)
11511 && LDBL_MANT_DIG == DBL_MANT_DIG
11512 && LDBL_MAX_EXP == DBL_MAX_EXP
11513 && LDBL_MIN_EXP == DBL_MIN_EXP
11520 if ac_fn_c_try_compile "$LINENO"; then :
11521 gl_cv_long_double_equals_double=yes
11523 gl_cv_long_double_equals_double=no
11525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
11529 $as_echo "$gl_cv_long_double_equals_double" >&6; }
11530 if test $gl_cv_long_double_equals_double = yes; then
11532 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
11534 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
11536 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11542 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
11543 if ${gl_cv_var_stdin_large_offset+:} false; then :
11544 $as_echo_n "(cached) " >&6
11546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11547 /* end confdefs.h. */
11552 #if defined __SL64 && defined __SCLE /* cygwin */
11553 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11554 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
11555 it is easier to do a version check than building a runtime test. */
11556 # include <cygwin/version.h>
11557 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11565 if ac_fn_c_try_link "$LINENO"; then :
11566 gl_cv_var_stdin_large_offset=yes
11568 gl_cv_var_stdin_large_offset=no
11570 rm -f core conftest.err conftest.$ac_objext \
11571 conftest$ac_exeext conftest.$ac_ext
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11574 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
11582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11583 $as_echo_n "checking for 64-bit off_t... " >&6; }
11584 if ${gl_cv_type_off_t_64+:} false; then :
11585 $as_echo_n "(cached) " >&6
11587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11588 /* end confdefs.h. */
11589 #include <sys/types.h>
11590 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11600 if ac_fn_c_try_compile "$LINENO"; then :
11601 gl_cv_type_off_t_64=yes
11603 gl_cv_type_off_t_64=no
11605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11609 $as_echo "$gl_cv_type_off_t_64" >&6; }
11610 if test $gl_cv_type_off_t_64 = no; then
11611 WINDOWS_64_BIT_OFF_T=1
11613 WINDOWS_64_BIT_OFF_T=0
11615 WINDOWS_64_BIT_ST_SIZE=1
11618 WINDOWS_64_BIT_OFF_T=0
11619 WINDOWS_64_BIT_ST_SIZE=0
11639 if test $gl_cv_have_include_next = yes; then
11640 gl_cv_next_sys_types_h='<'sys/types.h'>'
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
11643 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
11644 if ${gl_cv_next_sys_types_h+:} false; then :
11645 $as_echo_n "(cached) " >&6
11648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h. */
11650 #include <sys/types.h>
11654 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11655 *) gl_absname_cpp="$ac_cpp" ;;
11660 gl_dirsep_regex='[/\\]'
11663 gl_dirsep_regex='\/'
11666 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11668 gl_header_literal_regex=`echo 'sys/types.h' \
11669 | sed -e "$gl_make_literal_regex_sed"`
11670 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11671 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11676 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11677 sed -n "$gl_absolute_header_sed"`'"'
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
11682 $as_echo "$gl_cv_next_sys_types_h" >&6; }
11684 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
11686 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11687 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11688 gl_next_as_first_directive='<'sys/types.h'>'
11690 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11691 gl_next_as_first_directive=$gl_cv_next_sys_types_h
11693 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
11705 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11706 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11712 cat >>confdefs.h <<_ACEOF
11713 #define HAVE_DECL_FSEEKO $ac_have_decl
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11725 $as_echo_n "checking for fseeko... " >&6; }
11726 if ${gl_cv_func_fseeko+:} false; then :
11727 $as_echo_n "(cached) " >&6
11730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11731 /* end confdefs.h. */
11737 fseeko (stdin, 0, 0);
11742 if ac_fn_c_try_link "$LINENO"; then :
11743 gl_cv_func_fseeko=yes
11745 gl_cv_func_fseeko=no
11747 rm -f core conftest.err conftest.$ac_objext \
11748 conftest$ac_exeext conftest.$ac_ext
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11752 $as_echo "$gl_cv_func_fseeko" >&6; }
11755 if test $ac_cv_have_decl_fseeko = no; then
11759 if test $gl_cv_func_fseeko = no; then
11762 if test $WINDOWS_64_BIT_OFF_T = 1; then
11765 if test $gl_cv_var_stdin_large_offset = no; then
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
11772 $as_echo_n "checking whether fflush works on input streams... " >&6; }
11773 if ${gl_cv_func_fflush_stdin+:} false; then :
11774 $as_echo_n "(cached) " >&6
11776 echo hello world > conftest.txt
11777 if test "$cross_compiling" = yes; then :
11778 gl_cv_func_fflush_stdin=cross
11780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h. */
11785 # include <unistd.h>
11786 #else /* on Windows with MSVC */
11793 FILE *f = fopen ("conftest.txt", "r");
11800 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
11802 /* For deterministic results, ensure f read a bigger buffer. */
11803 if (lseek (fd, 0, SEEK_CUR) == 5)
11805 /* POSIX requires fflush-fseek to set file offset of fd. This fails
11806 on BSD systems and on mingw. */
11807 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
11809 if (lseek (fd, 0, SEEK_CUR) != 5)
11811 /* Verify behaviour of fflush after ungetc. See
11812 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
11813 /* Verify behaviour of fflush after a backup ungetc. This fails on
11818 if (fgetc (f) != c)
11820 /* Verify behaviour of fflush after a non-backup ungetc. This fails
11821 on glibc 2.8 and on BSD systems. */
11825 if (fgetc (f) != c)
11833 if ac_fn_c_try_run "$LINENO"; then :
11834 gl_cv_func_fflush_stdin=yes
11836 gl_cv_func_fflush_stdin=no
11838 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11839 conftest.$ac_objext conftest.beam conftest.$ac_ext
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
11846 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
11847 case $gl_cv_func_fflush_stdin in
11848 yes) gl_func_fflush_stdin=1 ;;
11849 no) gl_func_fflush_stdin=0 ;;
11850 *) gl_func_fflush_stdin='(-1)' ;;
11853 cat >>confdefs.h <<_ACEOF
11854 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
11858 if test $gl_cv_func_fflush_stdin != yes; then
11877 GNULIB_UTIMENSAT=0;
11891 REPLACE_FUTIMENS=0;
11897 REPLACE_UTIMENSAT=0;
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11900 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11901 if ${ac_cv_header_stat_broken+:} false; then :
11902 $as_echo_n "(cached) " >&6
11904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11905 /* end confdefs.h. */
11906 #include <sys/types.h>
11907 #include <sys/stat.h>
11909 #if defined S_ISBLK && defined S_IFDIR
11910 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11913 #if defined S_ISBLK && defined S_IFCHR
11914 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11917 #if defined S_ISLNK && defined S_IFREG
11918 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11921 #if defined S_ISSOCK && defined S_IFREG
11922 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11926 if ac_fn_c_try_compile "$LINENO"; then :
11927 ac_cv_header_stat_broken=no
11929 ac_cv_header_stat_broken=yes
11931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11934 $as_echo "$ac_cv_header_stat_broken" >&6; }
11935 if test $ac_cv_header_stat_broken = yes; then
11937 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11957 if test $gl_cv_have_include_next = yes; then
11958 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11961 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11962 if ${gl_cv_next_sys_stat_h+:} false; then :
11963 $as_echo_n "(cached) " >&6
11966 if test $ac_cv_header_sys_stat_h = yes; then
11969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11970 /* end confdefs.h. */
11971 #include <sys/stat.h>
11975 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11976 *) gl_absname_cpp="$ac_cpp" ;;
11981 gl_dirsep_regex='[/\\]'
11984 gl_dirsep_regex='\/'
11987 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11989 gl_header_literal_regex=`echo 'sys/stat.h' \
11990 | sed -e "$gl_make_literal_regex_sed"`
11991 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11992 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11997 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11998 sed -n "$gl_absolute_header_sed"`'"'
12000 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12006 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
12008 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12010 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12011 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12012 gl_next_as_first_directive='<'sys/stat.h'>'
12014 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12015 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12017 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12029 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
12031 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
12035 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12036 #include <sys/stat.h>
12038 if test "x$ac_cv_type_nlink_t" = xyes; then :
12042 $as_echo "#define nlink_t int" >>confdefs.h
12049 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12050 if test "x$ac_cv_have_decl_ftello" = xyes; then :
12056 cat >>confdefs.h <<_ACEOF
12057 #define HAVE_DECL_FTELLO $ac_have_decl
12069 if test $ac_cv_have_decl_ftello = no; then
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12074 $as_echo_n "checking for ftello... " >&6; }
12075 if ${gl_cv_func_ftello+:} false; then :
12076 $as_echo_n "(cached) " >&6
12079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12080 /* end confdefs.h. */
12090 if ac_fn_c_try_link "$LINENO"; then :
12091 gl_cv_func_ftello=yes
12093 gl_cv_func_ftello=no
12095 rm -f core conftest.err conftest.$ac_objext \
12096 conftest$ac_exeext conftest.$ac_ext
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12100 $as_echo "$gl_cv_func_ftello" >&6; }
12101 if test $gl_cv_func_ftello = no; then
12104 if test $WINDOWS_64_BIT_OFF_T = 1; then
12107 if test $gl_cv_var_stdin_large_offset = no; then
12110 if test $REPLACE_FTELLO = 0; then
12112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12113 $as_echo_n "checking whether ftello works... " >&6; }
12114 if ${gl_cv_func_ftello_works+:} false; then :
12115 $as_echo_n "(cached) " >&6
12119 # Guess no on Solaris.
12120 solaris*) gl_cv_func_ftello_works="guessing no" ;;
12121 # Guess yes otherwise.
12122 *) gl_cv_func_ftello_works="guessing yes" ;;
12124 if test "$cross_compiling" = yes; then :
12127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128 /* end confdefs.h. */
12131 #include <stdlib.h>
12132 #include <string.h>
12133 #define TESTFILE "conftest.tmp"
12139 /* Create a file with some contents. */
12140 fp = fopen (TESTFILE, "w");
12143 if (fwrite ("foogarsh", 1, 8, fp) < 8)
12148 /* The file's contents is now "foogarsh". */
12150 /* Try writing after reading to EOF. */
12151 fp = fopen (TESTFILE, "r+");
12154 if (fseek (fp, -1, SEEK_END))
12156 if (!(getc (fp) == 'h'))
12158 if (!(getc (fp) == EOF))
12160 if (!(ftell (fp) == 8))
12162 if (!(ftell (fp) == 8))
12164 if (!(putc ('!', fp) == '!'))
12166 if (!(ftell (fp) == 9))
12168 if (!(fclose (fp) == 0))
12170 fp = fopen (TESTFILE, "r");
12175 if (!(fread (buf, 1, 10, fp) == 9))
12177 if (!(memcmp (buf, "foogarsh!", 9) == 0))
12180 if (!(fclose (fp) == 0))
12183 /* The file's contents is now "foogarsh!". */
12188 if ac_fn_c_try_run "$LINENO"; then :
12189 gl_cv_func_ftello_works=yes
12191 gl_cv_func_ftello_works=no
12193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12194 conftest.$ac_objext conftest.beam conftest.$ac_ext
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12200 $as_echo "$gl_cv_func_ftello_works" >&6; }
12201 case "$gl_cv_func_ftello_works" in
12206 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12230 if test $gl_cv_have_include_next = yes; then
12231 gl_cv_next_getopt_h='<'getopt.h'>'
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12234 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
12235 if ${gl_cv_next_getopt_h+:} false; then :
12236 $as_echo_n "(cached) " >&6
12239 if test $ac_cv_header_getopt_h = yes; then
12242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243 /* end confdefs.h. */
12244 #include <getopt.h>
12248 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12249 *) gl_absname_cpp="$ac_cpp" ;;
12254 gl_dirsep_regex='[/\\]'
12257 gl_dirsep_regex='\/'
12260 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12262 gl_header_literal_regex=`echo 'getopt.h' \
12263 | sed -e "$gl_make_literal_regex_sed"`
12264 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12265 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12270 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12271 sed -n "$gl_absolute_header_sed"`'"'
12273 gl_cv_next_getopt_h='<'getopt.h'>'
12278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12279 $as_echo "$gl_cv_next_getopt_h" >&6; }
12281 NEXT_GETOPT_H=$gl_cv_next_getopt_h
12283 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12284 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12285 gl_next_as_first_directive='<'getopt.h'>'
12287 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12288 gl_next_as_first_directive=$gl_cv_next_getopt_h
12290 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12295 if test $ac_cv_header_getopt_h = yes; then
12304 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12305 for ac_header in getopt.h
12307 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12308 if test "x$ac_cv_header_getopt_h" = xyes; then :
12309 cat >>confdefs.h <<_ACEOF
12310 #define HAVE_GETOPT_H 1
12314 gl_replace_getopt=yes
12321 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12322 for ac_func in getopt_long_only
12324 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12325 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
12326 cat >>confdefs.h <<_ACEOF
12327 #define HAVE_GETOPT_LONG_ONLY 1
12331 gl_replace_getopt=yes
12337 if test -z "$gl_replace_getopt"; then
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12339 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
12340 if ${gl_cv_func_getopt_posix+:} false; then :
12341 $as_echo_n "(cached) " >&6
12344 if test $cross_compiling = no; then
12345 if test "$cross_compiling" = yes; then :
12346 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12347 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12348 as_fn_error $? "cannot run test program while cross compiling
12349 See \`config.log' for more details" "$LINENO" 5; }
12351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12352 /* end confdefs.h. */
12354 #include <unistd.h>
12355 #include <stdlib.h>
12356 #include <string.h>
12361 static char program[] = "program";
12362 static char a[] = "-a";
12363 static char foo[] = "foo";
12364 static char bar[] = "bar";
12365 char *argv[] = { program, a, foo, bar, NULL };
12368 c = getopt (4, argv, "ab");
12371 c = getopt (4, argv, "ab");
12374 if (!(optind == 2))
12380 if ac_fn_c_try_run "$LINENO"; then :
12381 gl_cv_func_getopt_posix=maybe
12383 gl_cv_func_getopt_posix=no
12385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12386 conftest.$ac_objext conftest.beam conftest.$ac_ext
12389 if test $gl_cv_func_getopt_posix = maybe; then
12390 if test "$cross_compiling" = yes; then :
12391 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12392 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12393 as_fn_error $? "cannot run test program while cross compiling
12394 See \`config.log' for more details" "$LINENO" 5; }
12396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12397 /* end confdefs.h. */
12399 #include <unistd.h>
12400 #include <stdlib.h>
12401 #include <string.h>
12406 static char program[] = "program";
12407 static char donald[] = "donald";
12408 static char p[] = "-p";
12409 static char billy[] = "billy";
12410 static char duck[] = "duck";
12411 static char a[] = "-a";
12412 static char bar[] = "bar";
12413 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
12416 c = getopt (7, argv, "+abp:q:");
12419 if (!(strcmp (argv[0], "program") == 0))
12421 if (!(strcmp (argv[1], "donald") == 0))
12423 if (!(strcmp (argv[2], "-p") == 0))
12425 if (!(strcmp (argv[3], "billy") == 0))
12427 if (!(strcmp (argv[4], "duck") == 0))
12429 if (!(strcmp (argv[5], "-a") == 0))
12431 if (!(strcmp (argv[6], "bar") == 0))
12433 if (!(optind == 1))
12439 if ac_fn_c_try_run "$LINENO"; then :
12440 gl_cv_func_getopt_posix=maybe
12442 gl_cv_func_getopt_posix=no
12444 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12445 conftest.$ac_objext conftest.beam conftest.$ac_ext
12449 if test $gl_cv_func_getopt_posix = maybe; then
12450 if test "$cross_compiling" = yes; then :
12451 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12452 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12453 as_fn_error $? "cannot run test program while cross compiling
12454 See \`config.log' for more details" "$LINENO" 5; }
12456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457 /* end confdefs.h. */
12459 #include <unistd.h>
12460 #include <stdlib.h>
12461 #include <string.h>
12466 static char program[] = "program";
12467 static char ab[] = "-ab";
12468 char *argv[3] = { program, ab, NULL };
12469 if (getopt (2, argv, "ab:") != 'a')
12471 if (getopt (2, argv, "ab:") != '?')
12481 if ac_fn_c_try_run "$LINENO"; then :
12482 gl_cv_func_getopt_posix=yes
12484 gl_cv_func_getopt_posix=no
12486 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12487 conftest.$ac_objext conftest.beam conftest.$ac_ext
12493 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
12494 *) gl_cv_func_getopt_posix="guessing yes";;
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
12500 $as_echo "$gl_cv_func_getopt_posix" >&6; }
12501 case "$gl_cv_func_getopt_posix" in
12502 *no) gl_replace_getopt=yes ;;
12506 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12508 $as_echo_n "checking for working GNU getopt function... " >&6; }
12509 if ${gl_cv_func_getopt_gnu+:} false; then :
12510 $as_echo_n "(cached) " >&6
12512 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
12513 # optstring is necessary for programs like m4 that have POSIX-mandated
12514 # semantics for supporting options interspersed with files.
12515 # Also, since getopt_long is a GNU extension, we require optind=0.
12516 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
12517 # so take care to revert to the correct (non-)export state.
12518 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
12519 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
12520 xx) gl_had_POSIXLY_CORRECT=exported ;;
12521 x) gl_had_POSIXLY_CORRECT=yes ;;
12522 *) gl_had_POSIXLY_CORRECT= ;;
12525 export POSIXLY_CORRECT
12526 if test "$cross_compiling" = yes; then :
12527 gl_cv_func_getopt_gnu="guessing no"
12530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12531 /* end confdefs.h. */
12532 #include <getopt.h>
12533 #include <stddef.h>
12534 #include <string.h>
12536 #include <stdlib.h>
12537 #if defined __MACH__ && defined __APPLE__
12538 /* Avoid a crash on Mac OS X. */
12539 #include <mach/mach.h>
12540 #include <mach/mach_error.h>
12541 #include <mach/thread_status.h>
12542 #include <mach/exception.h>
12543 #include <mach/task.h>
12544 #include <pthread.h>
12545 /* The exception port on which our thread listens. */
12546 static mach_port_t our_exception_port;
12547 /* The main function of the thread listening for exceptions of type
12550 mach_exception_thread (void *arg)
12552 /* Buffer for a message to be received. */
12554 mach_msg_header_t head;
12555 mach_msg_body_t msgh_body;
12558 mach_msg_return_t retval;
12559 /* Wait for a message on the exception port. */
12560 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12561 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12562 if (retval != MACH_MSG_SUCCESS)
12567 nocrash_init (void)
12569 mach_port_t self = mach_task_self ();
12570 /* Allocate a port on which the thread shall listen for exceptions. */
12571 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12573 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
12574 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12575 MACH_MSG_TYPE_MAKE_SEND)
12577 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
12579 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12580 /* Create the thread listening on the exception port. */
12581 pthread_attr_t attr;
12583 if (pthread_attr_init (&attr) == 0
12584 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12585 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12586 pthread_attr_destroy (&attr);
12587 /* Replace the exception port info for these exceptions with our own.
12588 Note that we replace the exception port for the entire task, not only
12589 for a particular thread. This has the effect that when our exception
12590 port gets the message, the thread specific exception port has already
12591 been asked, and we don't need to bother about it.
12592 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
12593 task_set_exception_ports (self, mask, our_exception_port,
12594 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12599 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12600 /* Avoid a crash on native Windows. */
12601 #define WIN32_LEAN_AND_MEAN
12602 #include <windows.h>
12603 #include <winerror.h>
12605 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12607 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12609 case EXCEPTION_ACCESS_VIOLATION:
12610 case EXCEPTION_IN_PAGE_ERROR:
12611 case EXCEPTION_STACK_OVERFLOW:
12612 case EXCEPTION_GUARD_PAGE:
12613 case EXCEPTION_PRIV_INSTRUCTION:
12614 case EXCEPTION_ILLEGAL_INSTRUCTION:
12615 case EXCEPTION_DATATYPE_MISALIGNMENT:
12616 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12617 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12620 return EXCEPTION_CONTINUE_SEARCH;
12623 nocrash_init (void)
12625 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12628 /* Avoid a crash on POSIX systems. */
12629 #include <signal.h>
12630 /* A POSIX signal handler. */
12632 exception_handler (int sig)
12637 nocrash_init (void)
12640 signal (SIGSEGV, exception_handler);
12643 signal (SIGBUS, exception_handler);
12657 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12658 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12659 OSF/1 5.1, Solaris 10. */
12661 static char conftest[] = "conftest";
12662 static char plus[] = "-+";
12663 char *argv[3] = { conftest, plus, NULL };
12665 if (getopt (2, argv, "+a") != '?')
12668 /* This code succeeds on glibc 2.8, mingw,
12669 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12670 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
12672 static char program[] = "program";
12673 static char p[] = "-p";
12674 static char foo[] = "foo";
12675 static char bar[] = "bar";
12676 char *argv[] = { program, p, foo, bar, NULL };
12679 if (getopt (4, argv, "p::") != 'p')
12681 else if (optarg != NULL)
12683 else if (getopt (4, argv, "p::") != -1)
12685 else if (optind != 2)
12688 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
12690 static char program[] = "program";
12691 static char foo[] = "foo";
12692 static char p[] = "-p";
12693 char *argv[] = { program, foo, p, NULL };
12695 if (getopt (3, argv, "-p") != 1)
12697 else if (getopt (3, argv, "-p") != 'p')
12700 /* This code fails on glibc 2.11. */
12702 static char program[] = "program";
12703 static char b[] = "-b";
12704 static char a[] = "-a";
12705 char *argv[] = { program, b, a, NULL };
12706 optind = opterr = 0;
12707 if (getopt (3, argv, "+:a:b") != 'b')
12709 else if (getopt (3, argv, "+:a:b") != ':')
12712 /* This code dumps core on glibc 2.14. */
12714 static char program[] = "program";
12715 static char w[] = "-W";
12716 static char dummy[] = "dummy";
12717 char *argv[] = { program, w, dummy, NULL };
12718 optind = opterr = 1;
12719 if (getopt (3, argv, "W;") != 'W')
12728 if ac_fn_c_try_run "$LINENO"; then :
12729 gl_cv_func_getopt_gnu=yes
12731 gl_cv_func_getopt_gnu=no
12733 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12734 conftest.$ac_objext conftest.beam conftest.$ac_ext
12737 case $gl_had_POSIXLY_CORRECT in
12739 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12740 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12745 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
12746 if test "$gl_cv_func_getopt_gnu" != yes; then
12747 gl_replace_getopt=yes
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
12750 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
12751 if ${gl_cv_func_getopt_long_gnu+:} false; then :
12752 $as_echo_n "(cached) " >&6
12754 if test "$cross_compiling" = yes; then :
12756 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
12757 *) gl_cv_func_getopt_long_gnu="guessing yes";;
12761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12762 /* end confdefs.h. */
12763 #include <getopt.h>
12764 #include <stddef.h>
12765 #include <string.h>
12770 static const struct option long_options[] =
12772 { "xtremely-",no_argument, NULL, 1003 },
12773 { "xtra", no_argument, NULL, 1001 },
12774 { "xtreme", no_argument, NULL, 1002 },
12775 { "xtremely", no_argument, NULL, 1003 },
12776 { NULL, 0, NULL, 0 }
12778 /* This code fails on OpenBSD 5.0. */
12780 static char program[] = "program";
12781 static char xtremel[] = "--xtremel";
12782 char *argv[] = { program, xtremel, NULL };
12784 optind = 1; opterr = 0;
12785 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
12794 if ac_fn_c_try_run "$LINENO"; then :
12795 gl_cv_func_getopt_long_gnu=yes
12797 gl_cv_func_getopt_long_gnu=no
12799 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12800 conftest.$ac_objext conftest.beam conftest.$ac_ext
12805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
12806 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
12807 case "$gl_cv_func_getopt_long_gnu" in
12809 *) gl_replace_getopt=yes ;;
12820 if test -n "$gl_replace_getopt"; then
12824 if test $REPLACE_GETOPT = 1; then
12828 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12834 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12835 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12841 cat >>confdefs.h <<_ACEOF
12842 #define HAVE_DECL_GETENV $ac_have_decl
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12846 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12847 if ${ac_cv_c_restrict+:} false; then :
12848 $as_echo_n "(cached) " >&6
12850 ac_cv_c_restrict=no
12851 # The order here caters to the fact that C++ does not require restrict.
12852 for ac_kw in __restrict __restrict__ _Restrict restrict; do
12853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854 /* end confdefs.h. */
12855 typedef int * int_ptr;
12856 int foo (int_ptr $ac_kw ip) {
12863 int * $ac_kw t = s;
12870 if ac_fn_c_try_compile "$LINENO"; then :
12871 ac_cv_c_restrict=$ac_kw
12873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12874 test "$ac_cv_c_restrict" != no && break
12878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12879 $as_echo "$ac_cv_c_restrict" >&6; }
12881 case $ac_cv_c_restrict in
12883 no) $as_echo "#define restrict /**/" >>confdefs.h
12885 *) cat >>confdefs.h <<_ACEOF
12886 #define restrict $ac_cv_c_restrict
12892 GNULIB_GETTIMEOFDAY=0;
12893 HAVE_GETTIMEOFDAY=1;
12894 HAVE_STRUCT_TIMEVAL=1;
12896 REPLACE_GETTIMEOFDAY=0;
12897 REPLACE_STRUCT_TIMEVAL=0;
12914 if test $gl_cv_have_include_next = yes; then
12915 gl_cv_next_sys_time_h='<'sys/time.h'>'
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12918 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12919 if ${gl_cv_next_sys_time_h+:} false; then :
12920 $as_echo_n "(cached) " >&6
12923 if test $ac_cv_header_sys_time_h = yes; then
12926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12927 /* end confdefs.h. */
12928 #include <sys/time.h>
12932 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12933 *) gl_absname_cpp="$ac_cpp" ;;
12938 gl_dirsep_regex='[/\\]'
12941 gl_dirsep_regex='\/'
12944 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12946 gl_header_literal_regex=`echo 'sys/time.h' \
12947 | sed -e "$gl_make_literal_regex_sed"`
12948 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12949 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12954 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12955 sed -n "$gl_absolute_header_sed"`'"'
12957 gl_cv_next_sys_time_h='<'sys/time.h'>'
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12963 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12965 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12967 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12968 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12969 gl_next_as_first_directive='<'sys/time.h'>'
12971 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12972 gl_next_as_first_directive=$gl_cv_next_sys_time_h
12974 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12980 if test $ac_cv_header_sys_time_h != yes; then
12988 if test $ac_cv_header_sys_socket_h != yes; then
12989 for ac_header in winsock2.h
12991 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12992 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12993 cat >>confdefs.h <<_ACEOF
12994 #define HAVE_WINSOCK2_H 1
13002 if test "$ac_cv_header_winsock2_h" = yes; then
13004 UNISTD_H_HAVE_WINSOCK2_H=1
13005 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13012 $as_echo_n "checking for struct timeval... " >&6; }
13013 if ${gl_cv_sys_struct_timeval+:} false; then :
13014 $as_echo_n "(cached) " >&6
13016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13017 /* end confdefs.h. */
13018 #if HAVE_SYS_TIME_H
13019 #include <sys/time.h>
13022 #if HAVE_WINSOCK2_H
13023 # include <winsock2.h>
13029 static struct timeval x; x.tv_sec = x.tv_usec;
13034 if ac_fn_c_try_compile "$LINENO"; then :
13035 gl_cv_sys_struct_timeval=yes
13037 gl_cv_sys_struct_timeval=no
13039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13043 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
13044 if test $gl_cv_sys_struct_timeval != yes; then
13045 HAVE_STRUCT_TIMEVAL=0
13047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13048 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13049 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
13050 $as_echo_n "(cached) " >&6
13052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053 /* end confdefs.h. */
13054 #if HAVE_SYS_TIME_H
13055 #include <sys/time.h>
13058 #if HAVE_WINSOCK2_H
13059 # include <winsock2.h>
13065 static struct timeval x;
13066 typedef int verify_tv_sec_type[
13067 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13074 if ac_fn_c_try_compile "$LINENO"; then :
13075 gl_cv_sys_struct_timeval_tv_sec=yes
13077 gl_cv_sys_struct_timeval_tv_sec=no
13079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13083 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13084 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13085 REPLACE_STRUCT_TIMEVAL=1
13097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13098 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13099 if ${gl_cv_cc_double_expbit0+:} false; then :
13100 $as_echo_n "(cached) " >&6
13103 if test "$cross_compiling" = yes; then :
13105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13106 /* end confdefs.h. */
13108 #if defined arm || defined __arm || defined __arm__
13113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13114 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
13115 gl_cv_cc_double_expbit0="unknown"
13119 if ${ac_cv_c_bigendian+:} false; then :
13120 $as_echo_n "(cached) " >&6
13122 ac_cv_c_bigendian=unknown
13123 # See if we're dealing with a universal compiler.
13124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13125 /* end confdefs.h. */
13126 #ifndef __APPLE_CC__
13127 not a universal capable compiler
13132 if ac_fn_c_try_compile "$LINENO"; then :
13134 # Check for potential -arch flags. It is not universal unless
13135 # there are at least two -arch flags with different values.
13138 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13139 if test -n "$ac_prev"; then
13141 i?86 | x86_64 | ppc | ppc64)
13142 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13145 ac_cv_c_bigendian=universal
13151 elif test "x$ac_word" = "x-arch"; then
13156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13157 if test $ac_cv_c_bigendian = unknown; then
13158 # See if sys/param.h defines the BYTE_ORDER macro.
13159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160 /* end confdefs.h. */
13161 #include <sys/types.h>
13162 #include <sys/param.h>
13167 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13168 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13170 bogus endian macros
13177 if ac_fn_c_try_compile "$LINENO"; then :
13178 # It does; now see whether it defined to BIG_ENDIAN or not.
13179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13180 /* end confdefs.h. */
13181 #include <sys/types.h>
13182 #include <sys/param.h>
13187 #if BYTE_ORDER != BIG_ENDIAN
13195 if ac_fn_c_try_compile "$LINENO"; then :
13196 ac_cv_c_bigendian=yes
13198 ac_cv_c_bigendian=no
13200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13204 if test $ac_cv_c_bigendian = unknown; then
13205 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h. */
13208 #include <limits.h>
13213 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13214 bogus endian macros
13221 if ac_fn_c_try_compile "$LINENO"; then :
13222 # It does; now see whether it defined to _BIG_ENDIAN or not.
13223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224 /* end confdefs.h. */
13225 #include <limits.h>
13230 #ifndef _BIG_ENDIAN
13238 if ac_fn_c_try_compile "$LINENO"; then :
13239 ac_cv_c_bigendian=yes
13241 ac_cv_c_bigendian=no
13243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13247 if test $ac_cv_c_bigendian = unknown; then
13248 # Compile a test program.
13249 if test "$cross_compiling" = yes; then :
13250 # Try to guess by grepping values from an object file.
13251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252 /* end confdefs.h. */
13253 short int ascii_mm[] =
13254 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13255 short int ascii_ii[] =
13256 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13257 int use_ascii (int i) {
13258 return ascii_mm[i] + ascii_ii[i];
13260 short int ebcdic_ii[] =
13261 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13262 short int ebcdic_mm[] =
13263 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13264 int use_ebcdic (int i) {
13265 return ebcdic_mm[i] + ebcdic_ii[i];
13272 return use_ascii (foo) == use_ebcdic (foo);
13277 if ac_fn_c_try_compile "$LINENO"; then :
13278 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13279 ac_cv_c_bigendian=yes
13281 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13282 if test "$ac_cv_c_bigendian" = unknown; then
13283 ac_cv_c_bigendian=no
13285 # finding both strings is unlikely to happen, but who knows?
13286 ac_cv_c_bigendian=unknown
13290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13293 /* end confdefs.h. */
13294 $ac_includes_default
13299 /* Are we little or big endian? From Harbison&Steele. */
13303 char c[sizeof (long int)];
13306 return u.c[sizeof (long int) - 1] == 1;
13312 if ac_fn_c_try_run "$LINENO"; then :
13313 ac_cv_c_bigendian=no
13315 ac_cv_c_bigendian=yes
13317 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13318 conftest.$ac_objext conftest.beam conftest.$ac_ext
13324 case $ac_cv_c_bigendian in #(
13326 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13328 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13331 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13335 gl_cv_cc_double_expbit0="unknown" ;;
13344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13345 /* end confdefs.h. */
13348 #include <stddef.h>
13350 #include <string.h>
13352 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13353 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13354 static unsigned int ored_words[NWORDS];
13355 static unsigned int anded_words[NWORDS];
13356 static void add_to_ored_words (double x)
13360 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
13361 memset (&m, 0, sizeof (memory_double));
13363 for (i = 0; i < NWORDS; i++)
13365 ored_words[i] |= m.word[i];
13366 anded_words[i] &= m.word[i];
13372 FILE *fp = fopen ("conftest.out", "w");
13375 for (j = 0; j < NWORDS; j++)
13376 anded_words[j] = ~ (unsigned int) 0;
13377 add_to_ored_words (0.25);
13378 add_to_ored_words (0.5);
13379 add_to_ored_words (1.0);
13380 add_to_ored_words (2.0);
13381 add_to_ored_words (4.0);
13382 /* Remove bits that are common (e.g. if representation of the first mantissa
13383 bit is explicit). */
13384 for (j = 0; j < NWORDS; j++)
13385 ored_words[j] &= ~anded_words[j];
13386 /* Now find the nonzero word. */
13387 for (j = 0; j < NWORDS; j++)
13388 if (ored_words[j] != 0)
13393 for (i = j + 1; i < NWORDS; i++)
13394 if (ored_words[i] != 0)
13396 fprintf (fp, "unknown");
13397 return (fclose (fp) != 0);
13400 if ((ored_words[j] >> i) & 1)
13402 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13403 return (fclose (fp) != 0);
13406 fprintf (fp, "unknown");
13407 return (fclose (fp) != 0);
13411 if ac_fn_c_try_run "$LINENO"; then :
13412 gl_cv_cc_double_expbit0=`cat conftest.out`
13414 gl_cv_cc_double_expbit0="unknown"
13416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13417 conftest.$ac_objext conftest.beam conftest.$ac_ext
13423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13424 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13425 case "$gl_cv_cc_double_expbit0" in
13427 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13428 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13430 cat >>confdefs.h <<_ACEOF
13431 #define DBL_EXPBIT0_WORD $word
13435 cat >>confdefs.h <<_ACEOF
13436 #define DBL_EXPBIT0_BIT $bit
13443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
13444 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
13445 if ${gl_cv_cc_float_expbit0+:} false; then :
13446 $as_echo_n "(cached) " >&6
13449 if test "$cross_compiling" = yes; then :
13450 gl_cv_cc_float_expbit0="word 0 bit 23"
13452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13453 /* end confdefs.h. */
13456 #include <stddef.h>
13458 #include <string.h>
13460 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13461 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13462 static unsigned int ored_words[NWORDS];
13463 static unsigned int anded_words[NWORDS];
13464 static void add_to_ored_words (float x)
13468 /* Clear it first, in case
13469 sizeof (float) < sizeof (memory_float). */
13470 memset (&m, 0, sizeof (memory_float));
13472 for (i = 0; i < NWORDS; i++)
13474 ored_words[i] |= m.word[i];
13475 anded_words[i] &= m.word[i];
13481 FILE *fp = fopen ("conftest.out", "w");
13484 for (j = 0; j < NWORDS; j++)
13485 anded_words[j] = ~ (unsigned int) 0;
13486 add_to_ored_words (0.25f);
13487 add_to_ored_words (0.5f);
13488 add_to_ored_words (1.0f);
13489 add_to_ored_words (2.0f);
13490 add_to_ored_words (4.0f);
13491 /* Remove bits that are common (e.g. if representation of the first mantissa
13492 bit is explicit). */
13493 for (j = 0; j < NWORDS; j++)
13494 ored_words[j] &= ~anded_words[j];
13495 /* Now find the nonzero word. */
13496 for (j = 0; j < NWORDS; j++)
13497 if (ored_words[j] != 0)
13502 for (i = j + 1; i < NWORDS; i++)
13503 if (ored_words[i] != 0)
13505 fprintf (fp, "unknown");
13506 return (fclose (fp) != 0);
13509 if ((ored_words[j] >> i) & 1)
13511 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13512 return (fclose (fp) != 0);
13515 fprintf (fp, "unknown");
13516 return (fclose (fp) != 0);
13520 if ac_fn_c_try_run "$LINENO"; then :
13521 gl_cv_cc_float_expbit0=`cat conftest.out`
13523 gl_cv_cc_float_expbit0="unknown"
13525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13526 conftest.$ac_objext conftest.beam conftest.$ac_ext
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13533 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
13534 case "$gl_cv_cc_float_expbit0" in
13536 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13537 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13539 cat >>confdefs.h <<_ACEOF
13540 #define FLT_EXPBIT0_WORD $word
13544 cat >>confdefs.h <<_ACEOF
13545 #define FLT_EXPBIT0_BIT $bit
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13553 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13554 if ${ac_cv_c_bigendian+:} false; then :
13555 $as_echo_n "(cached) " >&6
13557 ac_cv_c_bigendian=unknown
13558 # See if we're dealing with a universal compiler.
13559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13560 /* end confdefs.h. */
13561 #ifndef __APPLE_CC__
13562 not a universal capable compiler
13567 if ac_fn_c_try_compile "$LINENO"; then :
13569 # Check for potential -arch flags. It is not universal unless
13570 # there are at least two -arch flags with different values.
13573 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13574 if test -n "$ac_prev"; then
13576 i?86 | x86_64 | ppc | ppc64)
13577 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13580 ac_cv_c_bigendian=universal
13586 elif test "x$ac_word" = "x-arch"; then
13591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13592 if test $ac_cv_c_bigendian = unknown; then
13593 # See if sys/param.h defines the BYTE_ORDER macro.
13594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595 /* end confdefs.h. */
13596 #include <sys/types.h>
13597 #include <sys/param.h>
13602 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13603 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13605 bogus endian macros
13612 if ac_fn_c_try_compile "$LINENO"; then :
13613 # It does; now see whether it defined to BIG_ENDIAN or not.
13614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13615 /* end confdefs.h. */
13616 #include <sys/types.h>
13617 #include <sys/param.h>
13622 #if BYTE_ORDER != BIG_ENDIAN
13630 if ac_fn_c_try_compile "$LINENO"; then :
13631 ac_cv_c_bigendian=yes
13633 ac_cv_c_bigendian=no
13635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13639 if test $ac_cv_c_bigendian = unknown; then
13640 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642 /* end confdefs.h. */
13643 #include <limits.h>
13648 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13649 bogus endian macros
13656 if ac_fn_c_try_compile "$LINENO"; then :
13657 # It does; now see whether it defined to _BIG_ENDIAN or not.
13658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13659 /* end confdefs.h. */
13660 #include <limits.h>
13665 #ifndef _BIG_ENDIAN
13673 if ac_fn_c_try_compile "$LINENO"; then :
13674 ac_cv_c_bigendian=yes
13676 ac_cv_c_bigendian=no
13678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13682 if test $ac_cv_c_bigendian = unknown; then
13683 # Compile a test program.
13684 if test "$cross_compiling" = yes; then :
13685 # Try to guess by grepping values from an object file.
13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687 /* end confdefs.h. */
13688 short int ascii_mm[] =
13689 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13690 short int ascii_ii[] =
13691 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13692 int use_ascii (int i) {
13693 return ascii_mm[i] + ascii_ii[i];
13695 short int ebcdic_ii[] =
13696 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13697 short int ebcdic_mm[] =
13698 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13699 int use_ebcdic (int i) {
13700 return ebcdic_mm[i] + ebcdic_ii[i];
13707 return use_ascii (foo) == use_ebcdic (foo);
13712 if ac_fn_c_try_compile "$LINENO"; then :
13713 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13714 ac_cv_c_bigendian=yes
13716 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13717 if test "$ac_cv_c_bigendian" = unknown; then
13718 ac_cv_c_bigendian=no
13720 # finding both strings is unlikely to happen, but who knows?
13721 ac_cv_c_bigendian=unknown
13725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13728 /* end confdefs.h. */
13729 $ac_includes_default
13734 /* Are we little or big endian? From Harbison&Steele. */
13738 char c[sizeof (long int)];
13741 return u.c[sizeof (long int) - 1] == 1;
13747 if ac_fn_c_try_run "$LINENO"; then :
13748 ac_cv_c_bigendian=no
13750 ac_cv_c_bigendian=yes
13752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13753 conftest.$ac_objext conftest.beam conftest.$ac_ext
13758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13759 $as_echo "$ac_cv_c_bigendian" >&6; }
13760 case $ac_cv_c_bigendian in #(
13762 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13768 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13772 as_fn_error $? "unknown endianness
13773 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13778 GNULIB_NL_LANGINFO=0;
13779 HAVE_NL_LANGINFO=1;
13780 REPLACE_NL_LANGINFO=0;
13784 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13785 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13791 cat >>confdefs.h <<_ACEOF
13792 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13797 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13798 if ${ac_cv_gnu_library_2_1+:} false; then :
13799 $as_echo_n "(cached) " >&6
13801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13802 /* end confdefs.h. */
13804 #include <features.h>
13805 #ifdef __GNU_LIBRARY__
13806 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13816 $EGREP "Lucky" >/dev/null 2>&1; then :
13817 ac_cv_gnu_library_2_1=yes
13819 ac_cv_gnu_library_2_1=no
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13827 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13829 GLIBC21="$ac_cv_gnu_library_2_1"
13833 GNULIB_LOCALECONV=0;
13834 GNULIB_SETLOCALE=0;
13835 GNULIB_DUPLOCALE=0;
13837 REPLACE_LOCALECONV=0;
13838 REPLACE_SETLOCALE=0;
13839 REPLACE_DUPLOCALE=0;
13840 REPLACE_STRUCT_LCONV=0;
13847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13848 $as_echo_n "checking for wchar_t... " >&6; }
13849 if ${gt_cv_c_wchar_t+:} false; then :
13850 $as_echo_n "(cached) " >&6
13852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13853 /* end confdefs.h. */
13854 #include <stddef.h>
13855 wchar_t foo = (wchar_t)'\0';
13864 if ac_fn_c_try_compile "$LINENO"; then :
13865 gt_cv_c_wchar_t=yes
13869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13872 $as_echo "$gt_cv_c_wchar_t" >&6; }
13873 if test $gt_cv_c_wchar_t = yes; then
13875 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13883 if test $gt_cv_c_wchar_t = no; then
13887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13888 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13889 if ${gl_cv_decl_null_works+:} false; then :
13890 $as_echo_n "(cached) " >&6
13892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h. */
13894 #include <stddef.h>
13895 int test[2 * (sizeof NULL == sizeof (void *)) -1];
13905 if ac_fn_c_try_compile "$LINENO"; then :
13906 gl_cv_decl_null_works=yes
13908 gl_cv_decl_null_works=no
13910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13913 $as_echo "$gl_cv_decl_null_works" >&6; }
13914 if test $gl_cv_decl_null_works = no; then
13919 if test -n "$STDDEF_H"; then
13920 GL_GENERATE_STDDEF_H_TRUE=
13921 GL_GENERATE_STDDEF_H_FALSE='#'
13923 GL_GENERATE_STDDEF_H_TRUE='#'
13924 GL_GENERATE_STDDEF_H_FALSE=
13927 if test -n "$STDDEF_H"; then
13936 if test $gl_cv_have_include_next = yes; then
13937 gl_cv_next_stddef_h='<'stddef.h'>'
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13940 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13941 if ${gl_cv_next_stddef_h+:} false; then :
13942 $as_echo_n "(cached) " >&6
13945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13946 /* end confdefs.h. */
13947 #include <stddef.h>
13951 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13952 *) gl_absname_cpp="$ac_cpp" ;;
13957 gl_dirsep_regex='[/\\]'
13960 gl_dirsep_regex='\/'
13963 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13965 gl_header_literal_regex=`echo 'stddef.h' \
13966 | sed -e "$gl_make_literal_regex_sed"`
13967 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13968 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13973 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13974 sed -n "$gl_absolute_header_sed"`'"'
13978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13979 $as_echo "$gl_cv_next_stddef_h" >&6; }
13981 NEXT_STDDEF_H=$gl_cv_next_stddef_h
13983 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13984 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13985 gl_next_as_first_directive='<'stddef.h'>'
13987 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13988 gl_next_as_first_directive=$gl_cv_next_stddef_h
13990 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14001 gl_threads_api=none
14006 if test "$gl_use_threads" != no; then
14007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14008 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14009 if ${gl_cv_have_weak+:} false; then :
14010 $as_echo_n "(cached) " >&6
14013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14014 /* end confdefs.h. */
14015 extern void xyzzy ();
14025 if ac_fn_c_try_link "$LINENO"; then :
14026 gl_cv_have_weak=maybe
14028 rm -f core conftest.err conftest.$ac_objext \
14029 conftest$ac_exeext conftest.$ac_ext
14030 if test $gl_cv_have_weak = maybe; then
14031 if test "$cross_compiling" = yes; then :
14032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14033 /* end confdefs.h. */
14035 Extensible Linking Format
14039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14040 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14041 gl_cv_have_weak="guessing yes"
14043 gl_cv_have_weak="guessing no"
14049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14050 /* end confdefs.h. */
14056 return (fputs == NULL);
14059 if ac_fn_c_try_run "$LINENO"; then :
14060 gl_cv_have_weak=yes
14064 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14065 conftest.$ac_objext conftest.beam conftest.$ac_ext
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14072 $as_echo "$gl_cv_have_weak" >&6; }
14073 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
14074 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14075 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
14076 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14077 if test "x$ac_cv_header_pthread_h" = xyes; then :
14078 gl_have_pthread_h=yes
14080 gl_have_pthread_h=no
14084 if test "$gl_have_pthread_h" = yes; then
14085 # Other possible tests:
14086 # -lpthreads (FSU threads, PCthreads)
14089 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14090 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14091 # the second one only in libpthread, and lock.c needs it.
14092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14093 /* end confdefs.h. */
14094 #include <pthread.h>
14098 pthread_mutex_lock((pthread_mutex_t*)0);
14099 pthread_mutexattr_init((pthread_mutexattr_t*)0);
14104 if ac_fn_c_try_link "$LINENO"; then :
14105 gl_have_pthread=yes
14107 rm -f core conftest.err conftest.$ac_objext \
14108 conftest$ac_exeext conftest.$ac_ext
14109 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14110 # since it is defined as a macro on OSF/1.)
14111 if test -n "$gl_have_pthread"; then
14112 # The program links fine without libpthread. But it may actually
14113 # need to link with libpthread in order to create multiple threads.
14114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14115 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14116 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14117 $as_echo_n "(cached) " >&6
14119 ac_check_lib_save_LIBS=$LIBS
14120 LIBS="-lpthread $LIBS"
14121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14122 /* end confdefs.h. */
14124 /* Override any GCC internal prototype to avoid an error.
14125 Use char because int might match the return type of a GCC
14126 builtin and then its argument prototype would still apply. */
14130 char pthread_kill ();
14134 return pthread_kill ();
14139 if ac_fn_c_try_link "$LINENO"; then :
14140 ac_cv_lib_pthread_pthread_kill=yes
14142 ac_cv_lib_pthread_pthread_kill=no
14144 rm -f core conftest.err conftest.$ac_objext \
14145 conftest$ac_exeext conftest.$ac_ext
14146 LIBS=$ac_check_lib_save_LIBS
14148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14149 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14150 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14151 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14152 # On Solaris and HP-UX, most pthread functions exist also in libc.
14153 # Therefore pthread_in_use() needs to actually try to create a
14154 # thread: pthread_create from libc will fail, whereas
14155 # pthread_create will actually create a thread.
14159 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14166 # Some library is needed. Try libpthread and libc_r.
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14168 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14169 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14170 $as_echo_n "(cached) " >&6
14172 ac_check_lib_save_LIBS=$LIBS
14173 LIBS="-lpthread $LIBS"
14174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14175 /* end confdefs.h. */
14177 /* Override any GCC internal prototype to avoid an error.
14178 Use char because int might match the return type of a GCC
14179 builtin and then its argument prototype would still apply. */
14183 char pthread_kill ();
14187 return pthread_kill ();
14192 if ac_fn_c_try_link "$LINENO"; then :
14193 ac_cv_lib_pthread_pthread_kill=yes
14195 ac_cv_lib_pthread_pthread_kill=no
14197 rm -f core conftest.err conftest.$ac_objext \
14198 conftest$ac_exeext conftest.$ac_ext
14199 LIBS=$ac_check_lib_save_LIBS
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14202 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14203 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14204 gl_have_pthread=yes
14205 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
14206 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14209 if test -z "$gl_have_pthread"; then
14211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14212 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14213 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14214 $as_echo_n "(cached) " >&6
14216 ac_check_lib_save_LIBS=$LIBS
14218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14219 /* end confdefs.h. */
14221 /* Override any GCC internal prototype to avoid an error.
14222 Use char because int might match the return type of a GCC
14223 builtin and then its argument prototype would still apply. */
14227 char pthread_kill ();
14231 return pthread_kill ();
14236 if ac_fn_c_try_link "$LINENO"; then :
14237 ac_cv_lib_c_r_pthread_kill=yes
14239 ac_cv_lib_c_r_pthread_kill=no
14241 rm -f core conftest.err conftest.$ac_objext \
14242 conftest$ac_exeext conftest.$ac_ext
14243 LIBS=$ac_check_lib_save_LIBS
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14246 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14247 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14248 gl_have_pthread=yes
14249 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
14250 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
14255 if test -n "$gl_have_pthread"; then
14256 gl_threads_api=posix
14258 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14260 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14261 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14263 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14272 if test -z "$gl_have_pthread"; then
14273 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
14274 gl_have_solaristhread=
14275 gl_save_LIBS="$LIBS"
14276 LIBS="$LIBS -lthread"
14277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14278 /* end confdefs.h. */
14280 #include <thread.h>
14291 if ac_fn_c_try_link "$LINENO"; then :
14292 gl_have_solaristhread=yes
14294 rm -f core conftest.err conftest.$ac_objext \
14295 conftest$ac_exeext conftest.$ac_ext
14296 LIBS="$gl_save_LIBS"
14297 if test -n "$gl_have_solaristhread"; then
14298 gl_threads_api=solaris
14300 LTLIBTHREAD=-lthread
14301 LIBMULTITHREAD="$LIBTHREAD"
14302 LTLIBMULTITHREAD="$LTLIBTHREAD"
14304 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
14306 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14308 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
14316 if test "$gl_use_threads" = pth; then
14317 gl_save_CPPFLAGS="$CPPFLAGS"
14323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
14324 $as_echo_n "checking how to link with libpth... " >&6; }
14325 if ${ac_cv_libpth_libs+:} false; then :
14326 $as_echo_n "(cached) " >&6
14338 acl_save_prefix="$prefix"
14339 prefix="$acl_final_prefix"
14340 acl_save_exec_prefix="$exec_prefix"
14341 exec_prefix="$acl_final_exec_prefix"
14343 eval additional_includedir=\"$includedir\"
14344 eval additional_libdir=\"$libdir\"
14346 exec_prefix="$acl_save_exec_prefix"
14347 prefix="$acl_save_prefix"
14350 # Check whether --with-libpth-prefix was given.
14351 if test "${with_libpth_prefix+set}" = set; then :
14352 withval=$with_libpth_prefix;
14353 if test "X$withval" = "Xno"; then
14356 if test "X$withval" = "X"; then
14358 acl_save_prefix="$prefix"
14359 prefix="$acl_final_prefix"
14360 acl_save_exec_prefix="$exec_prefix"
14361 exec_prefix="$acl_final_exec_prefix"
14363 eval additional_includedir=\"$includedir\"
14364 eval additional_libdir=\"$libdir\"
14366 exec_prefix="$acl_save_exec_prefix"
14367 prefix="$acl_save_prefix"
14370 additional_includedir="$withval/include"
14371 additional_libdir="$withval/$acl_libdirstem"
14372 if test "$acl_libdirstem2" != "$acl_libdirstem" \
14373 && ! test -d "$withval/$acl_libdirstem"; then
14374 additional_libdir="$withval/$acl_libdirstem2"
14388 names_already_handled=
14389 names_next_round='pth '
14390 while test -n "$names_next_round"; do
14391 names_this_round="$names_next_round"
14393 for name in $names_this_round; do
14395 for n in $names_already_handled; do
14396 if test "$n" = "$name"; then
14397 already_handled=yes
14401 if test -z "$already_handled"; then
14402 names_already_handled="$names_already_handled $name"
14403 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14404 eval value=\"\$HAVE_LIB$uppername\"
14405 if test -n "$value"; then
14406 if test "$value" = yes; then
14407 eval value=\"\$LIB$uppername\"
14408 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
14409 eval value=\"\$LTLIB$uppername\"
14410 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
14419 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
14420 if test -n "$acl_shlibext"; then
14421 shrext=".$acl_shlibext" # typically: shrext=.so
14425 if test $use_additional = yes; then
14426 dir="$additional_libdir"
14427 if test -n "$acl_shlibext"; then
14428 if test -f "$dir/$libname$shrext"; then
14430 found_so="$dir/$libname$shrext"
14432 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14433 ver=`(cd "$dir" && \
14434 for f in "$libname$shrext".*; do echo "$f"; done \
14435 | sed -e "s,^$libname$shrext\\\\.,," \
14436 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14437 | sed 1q ) 2>/dev/null`
14438 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14440 found_so="$dir/$libname$shrext.$ver"
14443 eval library_names=\"$acl_library_names_spec\"
14444 for f in $library_names; do
14445 if test -f "$dir/$f"; then
14454 if test "X$found_dir" = "X"; then
14455 if test -f "$dir/$libname.$acl_libext"; then
14457 found_a="$dir/$libname.$acl_libext"
14460 if test "X$found_dir" != "X"; then
14461 if test -f "$dir/$libname.la"; then
14462 found_la="$dir/$libname.la"
14466 if test "X$found_dir" = "X"; then
14467 for x in $LDFLAGS $LTLIBPTH; do
14469 acl_save_prefix="$prefix"
14470 prefix="$acl_final_prefix"
14471 acl_save_exec_prefix="$exec_prefix"
14472 exec_prefix="$acl_final_exec_prefix"
14474 exec_prefix="$acl_save_exec_prefix"
14475 prefix="$acl_save_prefix"
14479 dir=`echo "X$x" | sed -e 's/^X-L//'`
14480 if test -n "$acl_shlibext"; then
14481 if test -f "$dir/$libname$shrext"; then
14483 found_so="$dir/$libname$shrext"
14485 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14486 ver=`(cd "$dir" && \
14487 for f in "$libname$shrext".*; do echo "$f"; done \
14488 | sed -e "s,^$libname$shrext\\\\.,," \
14489 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14490 | sed 1q ) 2>/dev/null`
14491 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14493 found_so="$dir/$libname$shrext.$ver"
14496 eval library_names=\"$acl_library_names_spec\"
14497 for f in $library_names; do
14498 if test -f "$dir/$f"; then
14507 if test "X$found_dir" = "X"; then
14508 if test -f "$dir/$libname.$acl_libext"; then
14510 found_a="$dir/$libname.$acl_libext"
14513 if test "X$found_dir" != "X"; then
14514 if test -f "$dir/$libname.la"; then
14515 found_la="$dir/$libname.la"
14520 if test "X$found_dir" != "X"; then
14525 if test "X$found_dir" != "X"; then
14526 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
14527 if test "X$found_so" != "X"; then
14528 if test "$enable_rpath" = no \
14529 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14530 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14531 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14534 for x in $ltrpathdirs; do
14535 if test "X$x" = "X$found_dir"; then
14540 if test -z "$haveit"; then
14541 ltrpathdirs="$ltrpathdirs $found_dir"
14543 if test "$acl_hardcode_direct" = yes; then
14544 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14546 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14547 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14549 for x in $rpathdirs; do
14550 if test "X$x" = "X$found_dir"; then
14555 if test -z "$haveit"; then
14556 rpathdirs="$rpathdirs $found_dir"
14560 for x in $LDFLAGS $LIBPTH; do
14562 acl_save_prefix="$prefix"
14563 prefix="$acl_final_prefix"
14564 acl_save_exec_prefix="$exec_prefix"
14565 exec_prefix="$acl_final_exec_prefix"
14567 exec_prefix="$acl_save_exec_prefix"
14568 prefix="$acl_save_prefix"
14570 if test "X$x" = "X-L$found_dir"; then
14575 if test -z "$haveit"; then
14576 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
14578 if test "$acl_hardcode_minus_L" != no; then
14579 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14581 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14587 if test "X$found_a" != "X"; then
14588 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
14590 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
14593 additional_includedir=
14594 case "$found_dir" in
14595 */$acl_libdirstem | */$acl_libdirstem/)
14596 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14597 if test "$name" = 'pth'; then
14598 LIBPTH_PREFIX="$basedir"
14600 additional_includedir="$basedir/include"
14602 */$acl_libdirstem2 | */$acl_libdirstem2/)
14603 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14604 if test "$name" = 'pth'; then
14605 LIBPTH_PREFIX="$basedir"
14607 additional_includedir="$basedir/include"
14610 if test "X$additional_includedir" != "X"; then
14611 if test "X$additional_includedir" != "X/usr/include"; then
14613 if test "X$additional_includedir" = "X/usr/local/include"; then
14614 if test -n "$GCC"; then
14616 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14620 if test -z "$haveit"; then
14621 for x in $CPPFLAGS $INCPTH; do
14623 acl_save_prefix="$prefix"
14624 prefix="$acl_final_prefix"
14625 acl_save_exec_prefix="$exec_prefix"
14626 exec_prefix="$acl_final_exec_prefix"
14628 exec_prefix="$acl_save_exec_prefix"
14629 prefix="$acl_save_prefix"
14631 if test "X$x" = "X-I$additional_includedir"; then
14636 if test -z "$haveit"; then
14637 if test -d "$additional_includedir"; then
14638 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
14644 if test -n "$found_la"; then
14645 save_libdir="$libdir"
14646 case "$found_la" in
14647 */* | *\\*) . "$found_la" ;;
14648 *) . "./$found_la" ;;
14650 libdir="$save_libdir"
14651 for dep in $dependency_libs; do
14654 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14655 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14656 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14658 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14659 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14660 if test -n "$GCC"; then
14662 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14666 if test -z "$haveit"; then
14668 for x in $LDFLAGS $LIBPTH; do
14670 acl_save_prefix="$prefix"
14671 prefix="$acl_final_prefix"
14672 acl_save_exec_prefix="$exec_prefix"
14673 exec_prefix="$acl_final_exec_prefix"
14675 exec_prefix="$acl_save_exec_prefix"
14676 prefix="$acl_save_prefix"
14678 if test "X$x" = "X-L$additional_libdir"; then
14683 if test -z "$haveit"; then
14684 if test -d "$additional_libdir"; then
14685 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
14689 for x in $LDFLAGS $LTLIBPTH; do
14691 acl_save_prefix="$prefix"
14692 prefix="$acl_final_prefix"
14693 acl_save_exec_prefix="$exec_prefix"
14694 exec_prefix="$acl_final_exec_prefix"
14696 exec_prefix="$acl_save_exec_prefix"
14697 prefix="$acl_save_prefix"
14699 if test "X$x" = "X-L$additional_libdir"; then
14704 if test -z "$haveit"; then
14705 if test -d "$additional_libdir"; then
14706 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
14713 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14714 if test "$enable_rpath" != no; then
14716 for x in $rpathdirs; do
14717 if test "X$x" = "X$dir"; then
14722 if test -z "$haveit"; then
14723 rpathdirs="$rpathdirs $dir"
14726 for x in $ltrpathdirs; do
14727 if test "X$x" = "X$dir"; then
14732 if test -z "$haveit"; then
14733 ltrpathdirs="$ltrpathdirs $dir"
14738 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14741 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14744 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
14745 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14751 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14752 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14758 if test "X$rpathdirs" != "X"; then
14759 if test -n "$acl_hardcode_libdir_separator"; then
14761 for found_dir in $rpathdirs; do
14762 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14764 acl_save_libdir="$libdir"
14766 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14767 libdir="$acl_save_libdir"
14768 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14770 for found_dir in $rpathdirs; do
14771 acl_save_libdir="$libdir"
14772 libdir="$found_dir"
14773 eval flag=\"$acl_hardcode_libdir_flag_spec\"
14774 libdir="$acl_save_libdir"
14775 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14779 if test "X$ltrpathdirs" != "X"; then
14780 for found_dir in $ltrpathdirs; do
14781 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14790 ac_cv_libpth_libs="$LIBPTH"
14791 ac_cv_libpth_ltlibs="$LTLIBPTH"
14792 ac_cv_libpth_cppflags="$INCPTH"
14793 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14797 $as_echo "$ac_cv_libpth_libs" >&6; }
14798 LIBPTH="$ac_cv_libpth_libs"
14799 LTLIBPTH="$ac_cv_libpth_ltlibs"
14800 INCPTH="$ac_cv_libpth_cppflags"
14801 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14803 for element in $INCPTH; do
14805 for x in $CPPFLAGS; do
14807 acl_save_prefix="$prefix"
14808 prefix="$acl_final_prefix"
14809 acl_save_exec_prefix="$exec_prefix"
14810 exec_prefix="$acl_final_exec_prefix"
14812 exec_prefix="$acl_save_exec_prefix"
14813 prefix="$acl_save_prefix"
14815 if test "X$x" = "X$element"; then
14820 if test -z "$haveit"; then
14821 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14833 gl_save_LIBS="$LIBS"
14834 LIBS="$LIBS $LIBPTH"
14835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14836 /* end confdefs.h. */
14846 if ac_fn_c_try_link "$LINENO"; then :
14849 rm -f core conftest.err conftest.$ac_objext \
14850 conftest$ac_exeext conftest.$ac_ext
14851 LIBS="$gl_save_LIBS"
14852 if test -n "$gl_have_pth"; then
14854 LIBTHREAD="$LIBPTH"
14855 LTLIBTHREAD="$LTLIBPTH"
14856 LIBMULTITHREAD="$LIBTHREAD"
14857 LTLIBMULTITHREAD="$LTLIBTHREAD"
14859 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
14861 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14862 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14864 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
14871 CPPFLAGS="$gl_save_CPPFLAGS"
14874 if test -z "$gl_have_pthread"; then
14875 case "$gl_use_threads" in
14876 yes | windows | win32) # The 'win32' is for backward compatibility.
14877 if { case "$host_os" in
14882 gl_threads_api=windows
14884 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14892 $as_echo_n "checking for multithread API to use... " >&6; }
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14894 $as_echo "$gl_threads_api" >&6; }
14907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
14908 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
14909 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
14910 $as_echo_n "(cached) " >&6
14912 rm -f conftest.sym conftest.file
14913 echo >conftest.file
14914 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
14915 if test "$cross_compiling" = yes; then :
14917 # Guess yes on glibc systems.
14918 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14919 # If we don't know, assume the worst.
14920 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14925 /* end confdefs.h. */
14926 $ac_includes_default
14931 /* Linux will dereference the symlink and fail, as required by
14932 POSIX. That is better in the sense that it means we will not
14933 have to compile and use the lstat wrapper. */
14934 return lstat ("conftest.sym/", &sbuf) == 0;
14940 if ac_fn_c_try_run "$LINENO"; then :
14941 gl_cv_func_lstat_dereferences_slashed_symlink=yes
14943 gl_cv_func_lstat_dereferences_slashed_symlink=no
14945 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14946 conftest.$ac_objext conftest.beam conftest.$ac_ext
14950 # If the 'ln -s' command failed, then we probably don't even
14951 # have an lstat function.
14952 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
14954 rm -f conftest.sym conftest.file
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
14958 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
14959 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14962 cat >>confdefs.h <<_ACEOF
14963 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
14970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
14971 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
14972 if ${gl_cv_func_malloc_posix+:} false; then :
14973 $as_echo_n "(cached) " >&6
14976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14977 /* end confdefs.h. */
14982 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
14990 if ac_fn_c_try_compile "$LINENO"; then :
14991 gl_cv_func_malloc_posix=yes
14993 gl_cv_func_malloc_posix=no
14995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
14999 $as_echo "$gl_cv_func_malloc_posix" >&6; }
15003 for ac_header in stdlib.h
15005 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
15006 if test "x$ac_cv_header_stdlib_h" = xyes; then :
15007 cat >>confdefs.h <<_ACEOF
15008 #define HAVE_STDLIB_H 1
15015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15016 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15017 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15018 $as_echo_n "(cached) " >&6
15020 if test "$cross_compiling" = yes; then :
15022 # Guess yes on platforms where we know the result.
15023 *-gnu* | freebsd* | netbsd* | openbsd* \
15024 | hpux* | solaris* | cygwin* | mingw*)
15025 ac_cv_func_malloc_0_nonnull=yes ;;
15026 # If we don't know, assume the worst.
15027 *) ac_cv_func_malloc_0_nonnull=no ;;
15031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15032 /* end confdefs.h. */
15033 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15034 # include <stdlib.h>
15042 return ! malloc (0);
15048 if ac_fn_c_try_run "$LINENO"; then :
15049 ac_cv_func_malloc_0_nonnull=yes
15051 ac_cv_func_malloc_0_nonnull=no
15053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15054 conftest.$ac_objext conftest.beam conftest.$ac_ext
15059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15060 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15061 if test $ac_cv_func_malloc_0_nonnull = yes; then :
15062 gl_cv_func_malloc_0_nonnull=1
15064 gl_cv_func_malloc_0_nonnull=0
15068 cat >>confdefs.h <<_ACEOF
15069 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15078 $as_echo_n "checking for mbstate_t... " >&6; }
15079 if ${ac_cv_type_mbstate_t+:} false; then :
15080 $as_echo_n "(cached) " >&6
15082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15083 /* end confdefs.h. */
15084 $ac_includes_default
15085 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15087 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15088 included before <wchar.h>. */
15089 #include <stddef.h>
15096 mbstate_t x; return sizeof x;
15101 if ac_fn_c_try_compile "$LINENO"; then :
15102 ac_cv_type_mbstate_t=yes
15104 ac_cv_type_mbstate_t=no
15106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15109 $as_echo "$ac_cv_type_mbstate_t" >&6; }
15110 if test $ac_cv_type_mbstate_t = yes; then
15112 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
15116 $as_echo "#define mbstate_t int" >>confdefs.h
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15128 $as_echo_n "checking for a traditional japanese locale... " >&6; }
15129 if ${gt_cv_locale_ja+:} false; then :
15130 $as_echo_n "(cached) " >&6
15133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15134 /* end confdefs.h. */
15136 #include <locale.h>
15138 #if HAVE_LANGINFO_CODESET
15139 # include <langinfo.h>
15141 #include <stdlib.h>
15142 #include <string.h>
15148 /* Check whether the given locale name is recognized by the system. */
15149 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15150 /* On native Windows, setlocale(category, "") looks at the system settings,
15151 not at the environment variables. Also, when an encoding suffix such
15152 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15153 category of the locale to "C". */
15154 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15155 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15158 if (setlocale (LC_ALL, "") == NULL) return 1;
15160 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15161 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15162 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15163 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15164 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15165 some unit tests fail.
15166 On MirBSD 10, when an unsupported locale is specified, setlocale()
15167 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15168 #if HAVE_LANGINFO_CODESET
15170 const char *cs = nl_langinfo (CODESET);
15171 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15172 || strcmp (cs, "UTF-8") == 0)
15177 /* On Cygwin, avoid locale names without encoding suffix, because the
15178 locale_charset() function relies on the encoding suffix. Note that
15179 LC_ALL is set on the command line. */
15180 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15182 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15183 on Cygwin 1.5.x. */
15184 if (MB_CUR_MAX == 1)
15186 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15187 This excludes the UTF-8 encoding (except on MirBSD). */
15188 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15189 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15190 for (p = buf; *p != '\0'; p++)
15191 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15197 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15198 (eval $ac_link) 2>&5
15200 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15201 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15203 # Handle native Windows specially, because there setlocale() interprets
15204 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15205 # "fr" or "fra" as "French" or "French_France.1252",
15206 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15207 # "ja" as "Japanese" or "Japanese_Japan.932",
15210 # Note that on native Windows, the Japanese locale is
15211 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15212 # cannot use it here.
15213 gt_cv_locale_ja=none
15216 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15217 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15218 # configure script would override the LC_ALL setting. Likewise for
15219 # LC_CTYPE, which is also set at the beginning of the configure script.
15220 # Test for the AIX locale name.
15221 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15222 gt_cv_locale_ja=ja_JP
15224 # Test for the locale name with explicit encoding suffix.
15225 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15226 gt_cv_locale_ja=ja_JP.EUC-JP
15228 # Test for the HP-UX, OSF/1, NetBSD locale name.
15229 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15230 gt_cv_locale_ja=ja_JP.eucJP
15232 # Test for the IRIX, FreeBSD locale name.
15233 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15234 gt_cv_locale_ja=ja_JP.EUC
15236 # Test for the Solaris 7 locale name.
15237 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15240 # Special test for NetBSD 1.6.
15241 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15242 gt_cv_locale_ja=ja_JP.eucJP
15245 gt_cv_locale_ja=none
15258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15259 $as_echo "$gt_cv_locale_ja" >&6; }
15260 LOCALE_JA=$gt_cv_locale_ja
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15267 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15268 if ${gt_cv_locale_zh_CN+:} false; then :
15269 $as_echo_n "(cached) " >&6
15272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15273 /* end confdefs.h. */
15275 #include <locale.h>
15276 #include <stdlib.h>
15278 #if HAVE_LANGINFO_CODESET
15279 # include <langinfo.h>
15281 #include <stdlib.h>
15282 #include <string.h>
15288 /* Check whether the given locale name is recognized by the system. */
15289 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15290 /* On native Windows, setlocale(category, "") looks at the system settings,
15291 not at the environment variables. Also, when an encoding suffix such
15292 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15293 category of the locale to "C". */
15294 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15295 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15298 if (setlocale (LC_ALL, "") == NULL) return 1;
15300 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15301 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15302 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15303 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15304 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15305 some unit tests fail.
15306 On MirBSD 10, when an unsupported locale is specified, setlocale()
15307 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15308 #if HAVE_LANGINFO_CODESET
15310 const char *cs = nl_langinfo (CODESET);
15311 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15312 || strcmp (cs, "UTF-8") == 0)
15317 /* On Cygwin, avoid locale names without encoding suffix, because the
15318 locale_charset() function relies on the encoding suffix. Note that
15319 LC_ALL is set on the command line. */
15320 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15322 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15323 This excludes the UTF-8 encoding (except on MirBSD). */
15324 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15325 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15326 for (p = buf; *p != '\0'; p++)
15327 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15329 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15330 single wide character. This excludes the GB2312 and GBK encodings. */
15331 if (mblen ("\203\062\332\066", 5) != 4)
15337 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15338 (eval $ac_link) 2>&5
15340 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15341 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15343 # Handle native Windows specially, because there setlocale() interprets
15344 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15345 # "fr" or "fra" as "French" or "French_France.1252",
15346 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15347 # "ja" as "Japanese" or "Japanese_Japan.932",
15350 # Test for the hypothetical native Windows locale name.
15351 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15352 gt_cv_locale_zh_CN=Chinese_China.54936
15355 gt_cv_locale_zh_CN=none
15359 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15360 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15361 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15362 gt_cv_locale_zh_CN=none
15365 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15366 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15367 # configure script would override the LC_ALL setting. Likewise for
15368 # LC_CTYPE, which is also set at the beginning of the configure script.
15369 # Test for the locale name without encoding suffix.
15370 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15371 gt_cv_locale_zh_CN=zh_CN
15373 # Test for the locale name with explicit encoding suffix.
15374 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15375 gt_cv_locale_zh_CN=zh_CN.GB18030
15378 gt_cv_locale_zh_CN=none
15384 # If there was a link error, due to mblen(), the system is so old that
15385 # it certainly doesn't have a chinese locale.
15386 gt_cv_locale_zh_CN=none
15391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15392 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15393 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15399 $as_echo_n "checking for a french Unicode locale... " >&6; }
15400 if ${gt_cv_locale_fr_utf8+:} false; then :
15401 $as_echo_n "(cached) " >&6
15404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15405 /* end confdefs.h. */
15407 #include <locale.h>
15409 #if HAVE_LANGINFO_CODESET
15410 # include <langinfo.h>
15412 #include <stdlib.h>
15413 #include <string.h>
15417 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15418 imitates locale dependent behaviour by looking at the environment
15419 variables, and all locales use the UTF-8 encoding. */
15420 #if !(defined __BEOS__ || defined __HAIKU__)
15421 /* Check whether the given locale name is recognized by the system. */
15422 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15423 /* On native Windows, setlocale(category, "") looks at the system settings,
15424 not at the environment variables. Also, when an encoding suffix such
15425 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15426 category of the locale to "C". */
15427 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15428 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15431 if (setlocale (LC_ALL, "") == NULL) return 1;
15433 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15434 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15435 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15436 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15437 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15438 some unit tests fail. */
15439 # if HAVE_LANGINFO_CODESET
15441 const char *cs = nl_langinfo (CODESET);
15442 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15447 /* On Cygwin, avoid locale names without encoding suffix, because the
15448 locale_charset() function relies on the encoding suffix. Note that
15449 LC_ALL is set on the command line. */
15450 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15452 /* Check whether in the abbreviation of the second month, the second
15453 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15454 two bytes long, with UTF-8 encoding. */
15455 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15456 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15457 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15460 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15461 /* Check whether the decimal separator is a comma.
15462 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15463 are nl_langinfo(RADIXCHAR) are both ".". */
15464 if (localeconv () ->decimal_point[0] != ',') return 1;
15470 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15471 (eval $ac_link) 2>&5
15473 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15474 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15476 # Handle native Windows specially, because there setlocale() interprets
15477 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15478 # "fr" or "fra" as "French" or "French_France.1252",
15479 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15480 # "ja" as "Japanese" or "Japanese_Japan.932",
15483 # Test for the hypothetical native Windows locale name.
15484 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15485 gt_cv_locale_fr_utf8=French_France.65001
15488 gt_cv_locale_fr_utf8=none
15492 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15493 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15494 # configure script would override the LC_ALL setting. Likewise for
15495 # LC_CTYPE, which is also set at the beginning of the configure script.
15496 # Test for the usual locale name.
15497 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15498 gt_cv_locale_fr_utf8=fr_FR
15500 # Test for the locale name with explicit encoding suffix.
15501 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15502 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15504 # Test for the Solaris 7 locale name.
15505 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15506 gt_cv_locale_fr_utf8=fr.UTF-8
15509 gt_cv_locale_fr_utf8=none
15519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15520 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15521 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15535 GNULIB_RAWMEMCHR=0;
15538 GNULIB_STRCHRNUL=0;
15546 GNULIB_STRCASESTR=0;
15553 GNULIB_MBSCASECMP=0;
15554 GNULIB_MBSNCASECMP=0;
15555 GNULIB_MBSPCASECMP=0;
15556 GNULIB_MBSCASESTR=0;
15563 GNULIB_STRERROR_R=0;
15564 GNULIB_STRSIGNAL=0;
15565 GNULIB_STRVERSCMP=0;
15570 HAVE_DECL_MEMMEM=1;
15572 HAVE_DECL_MEMRCHR=1;
15577 HAVE_DECL_STRDUP=1;
15578 HAVE_DECL_STRNDUP=1;
15579 HAVE_DECL_STRNLEN=1;
15583 HAVE_DECL_STRTOK_R=1;
15584 HAVE_DECL_STRERROR_R=1;
15585 HAVE_DECL_STRSIGNAL=1;
15592 REPLACE_STRCASESTR=0;
15593 REPLACE_STRCHRNUL=0;
15594 REPLACE_STRERROR=0;
15595 REPLACE_STRERROR_R=0;
15599 REPLACE_STRSIGNAL=0;
15600 REPLACE_STRTOK_R=0;
15601 UNDEFINE_STRTOK_R=0;
15607 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15608 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15609 # irrelevant for anonymous mappings.
15610 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15611 if test "x$ac_cv_func_mmap" = xyes; then :
15618 # Try to allow MAP_ANONYMOUS.
15619 gl_have_mmap_anonymous=no
15620 if test $gl_have_mmap = yes; then
15621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15622 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
15623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15624 /* end confdefs.h. */
15626 #include <sys/mman.h>
15627 #ifdef MAP_ANONYMOUS
15628 I cannot identify this map
15632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15633 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15634 gl_have_mmap_anonymous=yes
15638 if test $gl_have_mmap_anonymous != yes; then
15639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15640 /* end confdefs.h. */
15642 #include <sys/mman.h>
15644 I cannot identify this map
15648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15649 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15651 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15653 gl_have_mmap_anonymous=yes
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15659 $as_echo "$gl_have_mmap_anonymous" >&6; }
15660 if test $gl_have_mmap_anonymous = yes; then
15662 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15672 if test $HAVE_MEMCHR = 1; then
15673 # Detect platform-specific bugs in some versions of glibc:
15674 # memchr should not dereference anything with length 0
15675 # http://bugzilla.redhat.com/499689
15676 # memchr should not dereference overestimated length after a match
15677 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15678 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15679 # Assume that memchr works on platforms that lack mprotect.
15680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15681 $as_echo_n "checking whether memchr works... " >&6; }
15682 if ${gl_cv_func_memchr_works+:} false; then :
15683 $as_echo_n "(cached) " >&6
15685 if test "$cross_compiling" = yes; then :
15686 gl_cv_func_memchr_works="guessing no"
15688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15689 /* end confdefs.h. */
15691 #include <string.h>
15692 #if HAVE_SYS_MMAN_H
15693 # include <fcntl.h>
15694 # include <unistd.h>
15695 # include <sys/types.h>
15696 # include <sys/mman.h>
15698 # define MAP_FILE 0
15707 char *fence = NULL;
15708 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15709 # if HAVE_MAP_ANONYMOUS
15710 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15712 # else /* !HAVE_MAP_ANONYMOUS */
15713 const int flags = MAP_FILE | MAP_PRIVATE;
15714 int fd = open ("/dev/zero", O_RDONLY, 0666);
15718 int pagesize = getpagesize ();
15720 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15722 if (two_pages != (char *)(-1)
15723 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15724 fence = two_pages + pagesize;
15729 if (memchr (fence, 0, 0))
15731 strcpy (fence - 9, "12345678");
15732 if (memchr (fence - 9, 0, 79) != fence - 1)
15734 if (memchr (fence - 1, 0, 3) != fence - 1)
15743 if ac_fn_c_try_run "$LINENO"; then :
15744 gl_cv_func_memchr_works=yes
15746 gl_cv_func_memchr_works=no
15748 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15749 conftest.$ac_objext conftest.beam conftest.$ac_ext
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15754 $as_echo "$gl_cv_func_memchr_works" >&6; }
15755 if test "$gl_cv_func_memchr_works" != yes; then
15763 gl_cv_c_multiarch=no
15764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15765 /* end confdefs.h. */
15766 #ifndef __APPLE_CC__
15767 not a universal capable compiler
15772 if ac_fn_c_try_compile "$LINENO"; then :
15776 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
15777 if test -n "$prev"; then
15779 i?86 | x86_64 | ppc | ppc64)
15780 if test -z "$arch" || test "$arch" = "$word"; then
15783 gl_cv_c_multiarch=yes
15789 if test "x$word" = "x-arch"; then
15796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15797 if test $gl_cv_c_multiarch = yes; then
15798 APPLE_UNIVERSAL_BUILD=1
15800 APPLE_UNIVERSAL_BUILD=0
15808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
15809 $as_echo_n "checking for promoted mode_t type... " >&6; }
15810 if ${gl_cv_promoted_mode_t+:} false; then :
15811 $as_echo_n "(cached) " >&6
15814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15815 /* end confdefs.h. */
15816 #include <sys/types.h>
15820 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
15825 if ac_fn_c_try_compile "$LINENO"; then :
15826 gl_cv_promoted_mode_t='int'
15828 gl_cv_promoted_mode_t='mode_t'
15830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
15834 $as_echo "$gl_cv_promoted_mode_t" >&6; }
15836 cat >>confdefs.h <<_ACEOF
15837 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
15844 GNULIB_POSIX_SPAWN=0;
15845 GNULIB_POSIX_SPAWNP=0;
15846 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
15847 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
15848 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
15849 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
15850 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
15851 GNULIB_POSIX_SPAWNATTR_INIT=0;
15852 GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
15853 GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
15854 GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
15855 GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
15856 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
15857 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
15858 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
15859 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
15860 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
15861 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
15862 GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
15863 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
15864 GNULIB_POSIX_SPAWNATTR_DESTROY=0;
15865 HAVE_POSIX_SPAWN=1;
15866 HAVE_POSIX_SPAWNATTR_T=1;
15867 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
15869 REPLACE_POSIX_SPAWN=0;
15870 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
15872 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
15874 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
15883 if test $ac_cv_func_posix_spawn != yes; then
15890 if test $ac_cv_func_posix_spawn = yes; then
15893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
15894 $as_echo_n "checking whether posix_spawn works... " >&6; }
15895 if ${gl_cv_func_posix_spawn_works+:} false; then :
15896 $as_echo_n "(cached) " >&6
15898 if test $cross_compiling = no; then
15899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900 /* end confdefs.h. */
15904 #include <signal.h>
15906 #include <stdbool.h>
15908 #include <stdlib.h>
15909 #include <string.h>
15910 #include <unistd.h>
15911 #include <sys/types.h>
15912 #include <sys/wait.h>
15914 extern char **environ;
15916 #ifndef STDIN_FILENO
15917 # define STDIN_FILENO 0
15919 #ifndef STDOUT_FILENO
15920 # define STDOUT_FILENO 1
15922 #ifndef STDERR_FILENO
15923 # define STDERR_FILENO 2
15927 # define WTERMSIG(x) ((x) & 0x7f)
15930 # define WIFEXITED(x) (WTERMSIG (x) == 0)
15932 #ifndef WEXITSTATUS
15933 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
15936 #define CHILD_PROGRAM_FILENAME "/non/exist/ent"
15941 if (0 <= fd && fd <= 2)
15943 int f = fd_safer (dup (fd));
15956 char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
15958 sigset_t blocked_signals;
15959 sigset_t fatal_signal_set;
15960 posix_spawn_file_actions_t actions;
15961 bool actions_allocated;
15962 posix_spawnattr_t attrs;
15963 bool attrs_allocated;
15969 setvbuf (stdout, NULL, _IOFBF, 0);
15970 puts ("This should be seen only once.");
15971 if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
15973 perror ("cannot create pipe");
15976 sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
15977 sigemptyset (&fatal_signal_set);
15978 sigaddset (&fatal_signal_set, SIGINT);
15979 sigaddset (&fatal_signal_set, SIGTERM);
15980 sigaddset (&fatal_signal_set, SIGHUP);
15981 sigaddset (&fatal_signal_set, SIGPIPE);
15982 sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
15983 actions_allocated = false;
15984 attrs_allocated = false;
15985 if ((err = posix_spawn_file_actions_init (&actions)) != 0
15986 || (actions_allocated = true,
15987 (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
15988 || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
15989 || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
15990 || (err = posix_spawnattr_init (&attrs)) != 0
15991 || (attrs_allocated = true,
15992 (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
15993 || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
15994 || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
15996 if (actions_allocated)
15997 posix_spawn_file_actions_destroy (&actions);
15998 if (attrs_allocated)
15999 posix_spawnattr_destroy (&attrs);
16000 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
16006 perror ("subprocess failed");
16010 posix_spawn_file_actions_destroy (&actions);
16011 posix_spawnattr_destroy (&attrs);
16012 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
16016 while (waitpid (child, &status, 0) != child)
16018 if (!WIFEXITED (status))
16020 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
16023 exitstatus = WEXITSTATUS (status);
16024 if (exitstatus != 127)
16026 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
16033 if ac_fn_c_try_link "$LINENO"; then :
16034 if test -s conftest$ac_exeext \
16035 && ./conftest$ac_exeext > conftest.out \
16036 && echo 'This should be seen only once.' > conftest.ok \
16037 && cmp conftest.out conftest.ok > /dev/null; then
16038 gl_cv_func_posix_spawn_works=yes
16040 gl_cv_func_posix_spawn_works=no
16043 gl_cv_func_posix_spawn_works=no
16045 rm -f core conftest.err conftest.$ac_objext \
16046 conftest$ac_exeext conftest.$ac_ext
16047 if test $gl_cv_func_posix_spawn_works = yes; then
16048 if test "$cross_compiling" = yes; then :
16049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16050 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16051 as_fn_error $? "cannot run test program while cross compiling
16052 See \`config.log' for more details" "$LINENO" 5; }
16054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16055 /* end confdefs.h. */
16057 /* Test whether posix_spawn_file_actions_addopen supports filename arguments
16058 that contain special characters such as '*'. */
16062 #include <signal.h>
16064 #include <stdbool.h>
16066 #include <string.h>
16067 #include <unistd.h>
16068 #include <sys/types.h>
16069 #include <sys/wait.h>
16071 extern char **environ;
16073 #ifndef STDIN_FILENO
16074 # define STDIN_FILENO 0
16076 #ifndef STDOUT_FILENO
16077 # define STDOUT_FILENO 1
16079 #ifndef STDERR_FILENO
16080 # define STDERR_FILENO 2
16084 # define WTERMSIG(x) ((x) & 0x7f)
16087 # define WIFEXITED(x) (WTERMSIG (x) == 0)
16089 #ifndef WEXITSTATUS
16090 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
16093 #define CHILD_PROGRAM_FILENAME "conftest"
16094 #define DATA_FILENAME "conftest%=*#?"
16100 char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
16101 posix_spawn_file_actions_t actions;
16102 bool actions_allocated;
16108 /* Create a data file with specific contents. */
16109 fp = fopen (DATA_FILENAME, "wb");
16112 perror ("cannot create data file");
16115 fwrite ("Halle Potta", 1, 11, fp);
16116 if (fflush (fp) || fclose (fp))
16118 perror ("cannot prepare data file");
16122 /* Avoid reading from our stdin, as it could block. */
16123 freopen ("/dev/null", "rb", stdin);
16125 /* Test whether posix_spawn_file_actions_addopen with this file name
16126 actually works, but spawning a child that reads from this file. */
16127 actions_allocated = false;
16128 if ((err = posix_spawn_file_actions_init (&actions)) != 0
16129 || (actions_allocated = true,
16130 (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
16131 || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
16133 if (actions_allocated)
16134 posix_spawn_file_actions_destroy (&actions);
16136 perror ("subprocess failed");
16139 posix_spawn_file_actions_destroy (&actions);
16141 while (waitpid (child, &status, 0) != child)
16143 if (!WIFEXITED (status))
16145 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
16148 exitstatus = WEXITSTATUS (status);
16149 if (exitstatus != 0)
16151 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
16162 /* See if reading from STDIN_FILENO yields the expected contents. */
16163 if (fread (buf, 1, sizeof (buf), stdin) == 11
16164 && memcmp (buf, "Halle Potta", 11) == 0)
16171 cleanup_then_die (int sig)
16173 /* Clean up data file. */
16174 unlink (DATA_FILENAME);
16176 /* Re-raise the signal and die from it. */
16177 signal (sig, SIG_DFL);
16182 main (int argc, char *argv[])
16186 if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
16188 /* This is the parent process. */
16189 signal (SIGINT, cleanup_then_die);
16190 signal (SIGTERM, cleanup_then_die);
16192 signal (SIGHUP, cleanup_then_die);
16195 exitstatus = parent_main ();
16199 /* This is the child process. */
16201 exitstatus = child_main ();
16203 unlink (DATA_FILENAME);
16208 if ac_fn_c_try_run "$LINENO"; then :
16211 gl_cv_func_posix_spawn_works=no
16213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16214 conftest.$ac_objext conftest.beam conftest.$ac_ext
16220 aix*) gl_cv_func_posix_spawn_works="guessing no";;
16221 *) gl_cv_func_posix_spawn_works="guessing yes";;
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
16227 $as_echo "$gl_cv_func_posix_spawn_works" >&6; }
16229 case "$gl_cv_func_posix_spawn_works" in
16232 $as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
16234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
16235 $as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
16236 if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
16237 $as_echo_n "(cached) " >&6
16239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16240 /* end confdefs.h. */
16243 #if POSIX_SPAWN_SETSCHEDULER
16244 POSIX scheduling supported
16248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16249 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
16250 gl_cv_func_spawnattr_setschedpolicy=yes
16252 gl_cv_func_spawnattr_setschedpolicy=no
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
16259 $as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
16261 $as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
16262 if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
16263 $as_echo_n "(cached) " >&6
16265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16266 /* end confdefs.h. */
16269 #if POSIX_SPAWN_SETSCHEDPARAM
16270 POSIX scheduling supported
16274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16275 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
16276 gl_cv_func_spawnattr_setschedparam=yes
16278 gl_cv_func_spawnattr_setschedparam=no
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
16285 $as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
16287 *) REPLACE_POSIX_SPAWN=1 ;;
16292 GNULIB_PTHREAD_SIGMASK=0;
16294 GNULIB_SIGNAL_H_SIGPIPE=0;
16295 GNULIB_SIGPROCMASK=0;
16296 GNULIB_SIGACTION=0;
16297 HAVE_POSIX_SIGNALBLOCKING=1;
16298 HAVE_PTHREAD_SIGMASK=1;
16303 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16305 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16307 HAVE_SIGHANDLER_T=1;
16308 REPLACE_PTHREAD_SIGMASK=0;
16312 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16313 #include <signal.h>
16314 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
16315 #include <sys/types.h>
16318 if test "x$ac_cv_type_sigset_t" = xyes; then :
16320 cat >>confdefs.h <<_ACEOF
16321 #define HAVE_SIGSET_T 1
16324 gl_cv_type_sigset_t=yes
16326 gl_cv_type_sigset_t=no
16329 if test $gl_cv_type_sigset_t != yes; then
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPIPE" >&5
16336 $as_echo_n "checking for SIGPIPE... " >&6; }
16337 if ${gl_cv_header_signal_h_SIGPIPE+:} false; then :
16338 $as_echo_n "(cached) " >&6
16341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16342 /* end confdefs.h. */
16344 #include <signal.h>
16345 #if !defined SIGPIPE
16350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16351 $EGREP "booboo" >/dev/null 2>&1; then :
16352 gl_cv_header_signal_h_SIGPIPE=no
16354 gl_cv_header_signal_h_SIGPIPE=yes
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_signal_h_SIGPIPE" >&5
16361 $as_echo "$gl_cv_header_signal_h_SIGPIPE" >&6; }
16363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16364 $as_echo_n "checking for inline... " >&6; }
16365 if ${ac_cv_c_inline+:} false; then :
16366 $as_echo_n "(cached) " >&6
16369 for ac_kw in inline __inline__ __inline; do
16370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16371 /* end confdefs.h. */
16372 #ifndef __cplusplus
16374 static $ac_kw foo_t static_foo () {return 0; }
16375 $ac_kw foo_t foo () {return 0; }
16379 if ac_fn_c_try_compile "$LINENO"; then :
16380 ac_cv_c_inline=$ac_kw
16382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16383 test "$ac_cv_c_inline" != no && break
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16388 $as_echo "$ac_cv_c_inline" >&6; }
16390 case $ac_cv_c_inline in
16393 case $ac_cv_c_inline in
16395 *) ac_val=$ac_cv_c_inline;;
16397 cat >>confdefs.h <<_ACEOF
16398 #ifndef __cplusplus
16399 #define inline $ac_val
16419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16420 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
16421 if ${ac_cv_type_uid_t+:} false; then :
16422 $as_echo_n "(cached) " >&6
16424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16425 /* end confdefs.h. */
16426 #include <sys/types.h>
16429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16430 $EGREP "uid_t" >/dev/null 2>&1; then :
16431 ac_cv_type_uid_t=yes
16433 ac_cv_type_uid_t=no
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16439 $as_echo "$ac_cv_type_uid_t" >&6; }
16440 if test $ac_cv_type_uid_t = no; then
16442 $as_echo "#define uid_t int" >>confdefs.h
16445 $as_echo "#define gid_t int" >>confdefs.h
16452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16453 /* end confdefs.h. */
16460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16461 $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
16463 gl_c_asm_opt='-c -Fa'
16475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
16476 $as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
16477 if ${gl_cv_prog_as_underscore+:} false; then :
16478 $as_echo_n "(cached) " >&6
16480 cat > conftest.c <<EOF
16482 extern "C" int foo (void);
16484 int foo(void) { return 0; }
16486 # Look for the assembly language name in the .s file.
16487 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16488 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16489 (eval $ac_try) 2>&5
16491 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16492 test $ac_status = 0; }; } >/dev/null 2>&1
16493 if grep _foo conftest.$gl_asmext >/dev/null ; then
16494 gl_cv_prog_as_underscore=yes
16496 gl_cv_prog_as_underscore=no
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16502 $as_echo "$gl_cv_prog_as_underscore" >&6; }
16503 if test $gl_cv_prog_as_underscore = yes; then
16504 USER_LABEL_PREFIX=_
16509 cat >>confdefs.h <<_ACEOF
16510 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
16513 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
16525 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
16526 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
16527 $as_echo_n "(cached) " >&6
16530 if test "$cross_compiling" = yes; then :
16533 # Guess yes on glibc systems.
16534 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16535 # Guess yes on FreeBSD >= 5.
16536 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
16537 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16538 # Guess yes on Mac OS X >= 10.3.
16539 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
16540 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16541 # Guess yes on OpenBSD >= 3.9.
16542 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
16543 gl_cv_func_snprintf_retval_c99="guessing no";;
16544 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16545 # Guess yes on Solaris >= 2.10.
16546 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
16547 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
16548 # Guess yes on AIX >= 4.
16549 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
16550 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16551 # Guess yes on NetBSD >= 3.
16552 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
16553 gl_cv_func_snprintf_retval_c99="guessing no";;
16554 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16555 # Guess yes on BeOS.
16556 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16557 # If we don't know, assume the worst.
16558 *) gl_cv_func_snprintf_retval_c99="guessing no";;
16562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16563 /* end confdefs.h. */
16566 #include <string.h>
16568 # define my_snprintf snprintf
16570 # include <stdarg.h>
16571 static int my_snprintf (char *buf, int size, const char *format, ...)
16575 va_start (args, format);
16576 ret = vsnprintf (buf, size, format, args);
16581 static char buf[100];
16584 strcpy (buf, "ABCDEF");
16585 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
16587 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
16589 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
16594 if ac_fn_c_try_run "$LINENO"; then :
16595 gl_cv_func_snprintf_retval_c99=yes
16597 gl_cv_func_snprintf_retval_c99=no
16599 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16600 conftest.$ac_objext conftest.beam conftest.$ac_ext
16605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
16606 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
16608 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
16609 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
16615 cat >>confdefs.h <<_ACEOF
16616 #define HAVE_DECL_SNPRINTF $ac_have_decl
16621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16622 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16623 if ${ac_cv_header_stdbool_h+:} false; then :
16624 $as_echo_n "(cached) " >&6
16626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627 /* end confdefs.h. */
16629 #include <stdbool.h>
16631 "error: bool is not defined"
16634 "error: false is not defined"
16637 "error: false is not 0"
16640 "error: true is not defined"
16643 "error: true is not 1"
16645 #ifndef __bool_true_false_are_defined
16646 "error: __bool_true_false_are_defined is not defined"
16649 struct s { _Bool s: 1; _Bool t; } s;
16651 char a[true == 1 ? 1 : -1];
16652 char b[false == 0 ? 1 : -1];
16653 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16654 char d[(bool) 0.5 == true ? 1 : -1];
16655 /* See body of main program for 'e'. */
16656 char f[(_Bool) 0.0 == false ? 1 : -1];
16658 char h[sizeof (_Bool)];
16659 char i[sizeof s.t];
16660 enum { j = false, k = true, l = false * true, m = true * 256 };
16661 /* The following fails for
16662 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16664 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16665 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16666 /* Catch a bug in an HP-UX C compiler. See
16667 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16668 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
16680 /* Refer to every declared value, to avoid compiler optimizations. */
16681 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16682 + !m + !n + !o + !p + !q + !pq);
16688 if ac_fn_c_try_compile "$LINENO"; then :
16689 ac_cv_header_stdbool_h=yes
16691 ac_cv_header_stdbool_h=no
16693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16696 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16697 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16698 if test "x$ac_cv_type__Bool" = xyes; then :
16700 cat >>confdefs.h <<_ACEOF
16701 #define HAVE__BOOL 1
16715 if test $ac_cv_type_long_long_int = yes; then
16716 HAVE_LONG_LONG_INT=1
16718 HAVE_LONG_LONG_INT=0
16722 if test $ac_cv_type_unsigned_long_long_int = yes; then
16723 HAVE_UNSIGNED_LONG_LONG_INT=1
16725 HAVE_UNSIGNED_LONG_LONG_INT=0
16730 if test $ac_cv_header_wchar_h = yes; then
16737 if test $ac_cv_header_inttypes_h = yes; then
16744 if test $ac_cv_header_sys_types_h = yes; then
16760 if test $gl_cv_have_include_next = yes; then
16761 gl_cv_next_stdint_h='<'stdint.h'>'
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
16764 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
16765 if ${gl_cv_next_stdint_h+:} false; then :
16766 $as_echo_n "(cached) " >&6
16769 if test $ac_cv_header_stdint_h = yes; then
16772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16773 /* end confdefs.h. */
16774 #include <stdint.h>
16778 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16779 *) gl_absname_cpp="$ac_cpp" ;;
16784 gl_dirsep_regex='[/\\]'
16787 gl_dirsep_regex='\/'
16790 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16792 gl_header_literal_regex=`echo 'stdint.h' \
16793 | sed -e "$gl_make_literal_regex_sed"`
16794 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16795 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16800 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16801 sed -n "$gl_absolute_header_sed"`'"'
16803 gl_cv_next_stdint_h='<'stdint.h'>'
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
16809 $as_echo "$gl_cv_next_stdint_h" >&6; }
16811 NEXT_STDINT_H=$gl_cv_next_stdint_h
16813 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16814 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16815 gl_next_as_first_directive='<'stdint.h'>'
16817 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16818 gl_next_as_first_directive=$gl_cv_next_stdint_h
16820 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
16825 if test $ac_cv_header_stdint_h = yes; then
16832 if test $ac_cv_header_stdint_h = yes; then
16833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
16834 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
16835 if ${gl_cv_header_working_stdint_h+:} false; then :
16836 $as_echo_n "(cached) " >&6
16838 gl_cv_header_working_stdint_h=no
16839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16840 /* end confdefs.h. */
16843 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16844 #include <stdint.h>
16845 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
16846 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
16847 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
16851 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16852 included before <wchar.h>. */
16853 #include <stddef.h>
16854 #include <signal.h>
16856 # include <stdio.h>
16858 # include <wchar.h>
16863 int8_t a1 = INT8_MAX;
16864 int8_t a1min = INT8_MIN;
16867 int16_t a2 = INT16_MAX;
16868 int16_t a2min = INT16_MIN;
16871 int32_t a3 = INT32_MAX;
16872 int32_t a3min = INT32_MIN;
16875 int64_t a4 = INT64_MAX;
16876 int64_t a4min = INT64_MIN;
16879 uint8_t b1 = UINT8_MAX;
16881 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
16884 uint16_t b2 = UINT16_MAX;
16887 uint32_t b3 = UINT32_MAX;
16890 uint64_t b4 = UINT64_MAX;
16892 int_least8_t c1 = INT8_C (0x7f);
16893 int_least8_t c1max = INT_LEAST8_MAX;
16894 int_least8_t c1min = INT_LEAST8_MIN;
16895 int_least16_t c2 = INT16_C (0x7fff);
16896 int_least16_t c2max = INT_LEAST16_MAX;
16897 int_least16_t c2min = INT_LEAST16_MIN;
16898 int_least32_t c3 = INT32_C (0x7fffffff);
16899 int_least32_t c3max = INT_LEAST32_MAX;
16900 int_least32_t c3min = INT_LEAST32_MIN;
16901 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
16902 int_least64_t c4max = INT_LEAST64_MAX;
16903 int_least64_t c4min = INT_LEAST64_MIN;
16904 uint_least8_t d1 = UINT8_C (0xff);
16905 uint_least8_t d1max = UINT_LEAST8_MAX;
16906 uint_least16_t d2 = UINT16_C (0xffff);
16907 uint_least16_t d2max = UINT_LEAST16_MAX;
16908 uint_least32_t d3 = UINT32_C (0xffffffff);
16909 uint_least32_t d3max = UINT_LEAST32_MAX;
16910 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
16911 uint_least64_t d4max = UINT_LEAST64_MAX;
16912 int_fast8_t e1 = INT_FAST8_MAX;
16913 int_fast8_t e1min = INT_FAST8_MIN;
16914 int_fast16_t e2 = INT_FAST16_MAX;
16915 int_fast16_t e2min = INT_FAST16_MIN;
16916 int_fast32_t e3 = INT_FAST32_MAX;
16917 int_fast32_t e3min = INT_FAST32_MIN;
16918 int_fast64_t e4 = INT_FAST64_MAX;
16919 int_fast64_t e4min = INT_FAST64_MIN;
16920 uint_fast8_t f1 = UINT_FAST8_MAX;
16921 uint_fast16_t f2 = UINT_FAST16_MAX;
16922 uint_fast32_t f3 = UINT_FAST32_MAX;
16923 uint_fast64_t f4 = UINT_FAST64_MAX;
16925 intptr_t g = INTPTR_MAX;
16926 intptr_t gmin = INTPTR_MIN;
16929 uintptr_t h = UINTPTR_MAX;
16931 intmax_t i = INTMAX_MAX;
16932 uintmax_t j = UINTMAX_MAX;
16934 #include <limits.h> /* for CHAR_BIT */
16935 #define TYPE_MINIMUM(t) \
16936 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16937 #define TYPE_MAXIMUM(t) \
16938 ((t) ((t) 0 < (t) -1 \
16940 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16943 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
16944 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
16946 /* Detect bug in FreeBSD 6.0 / ia64. */
16947 int check_SIG_ATOMIC:
16948 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
16949 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
16951 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
16953 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
16954 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
16956 /* Detect bug in mingw. */
16958 WINT_MIN == TYPE_MINIMUM (wint_t)
16959 && WINT_MAX == TYPE_MAXIMUM (wint_t)
16962 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
16964 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
16965 int check_UINT16_C:
16966 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
16968 /* Detect bugs in OpenBSD 3.9 stdint.h. */
16970 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
16973 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
16976 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
16979 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
16981 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
16982 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
16983 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
16984 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
16985 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
16986 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
16987 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
16988 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
16989 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
16990 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
16991 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17002 if ac_fn_c_try_compile "$LINENO"; then :
17003 if test "$cross_compiling" = yes; then :
17004 gl_cv_header_working_stdint_h=yes
17007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17008 /* end confdefs.h. */
17011 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17012 #include <stdint.h>
17015 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17016 included before <wchar.h>. */
17017 #include <stddef.h>
17018 #include <signal.h>
17020 # include <stdio.h>
17022 # include <wchar.h>
17027 #include <string.h>
17028 #define MVAL(macro) MVAL1(macro)
17029 #define MVAL1(expression) #expression
17030 static const char *macro_values[] =
17064 for (mv = macro_values; *mv != NULL; mv++)
17066 const char *value = *mv;
17067 /* Test whether it looks like a cast expression. */
17068 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17069 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17070 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17071 || strncmp (value, "((int)"/*)*/, 6) == 0
17072 || strncmp (value, "((signed short)"/*)*/, 15) == 0
17073 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17074 return mv - macro_values + 1;
17082 if ac_fn_c_try_run "$LINENO"; then :
17083 gl_cv_header_working_stdint_h=yes
17085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17086 conftest.$ac_objext conftest.beam conftest.$ac_ext
17091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17095 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
17097 if test "$gl_cv_header_working_stdint_h" = yes; then
17100 for ac_header in sys/inttypes.h sys/bitypes.h
17102 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17103 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17104 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17105 cat >>confdefs.h <<_ACEOF
17106 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17113 if test $ac_cv_header_sys_inttypes_h = yes; then
17114 HAVE_SYS_INTTYPES_H=1
17116 HAVE_SYS_INTTYPES_H=0
17119 if test $ac_cv_header_sys_bitypes_h = yes; then
17120 HAVE_SYS_BITYPES_H=1
17122 HAVE_SYS_BITYPES_H=0
17128 if test $APPLE_UNIVERSAL_BUILD = 0; then
17131 for gltype in ptrdiff_t size_t ; do
17132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17133 $as_echo_n "checking for bit size of $gltype... " >&6; }
17134 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
17135 $as_echo_n "(cached) " >&6
17137 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17138 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17139 included before <wchar.h>. */
17140 #include <stddef.h>
17141 #include <signal.h>
17143 # include <stdio.h>
17145 # include <wchar.h>
17148 #include <limits.h>"; then :
17154 eval gl_cv_bitsizeof_${gltype}=\$result
17157 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17159 $as_echo "$ac_res" >&6; }
17160 eval result=\$gl_cv_bitsizeof_${gltype}
17161 if test $result = unknown; then
17164 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17165 cat >>confdefs.h <<_ACEOF
17166 #define BITSIZEOF_${GLTYPE} $result
17169 eval BITSIZEOF_${GLTYPE}=\$result
17176 for gltype in sig_atomic_t wchar_t wint_t ; do
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17178 $as_echo_n "checking for bit size of $gltype... " >&6; }
17179 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
17180 $as_echo_n "(cached) " >&6
17182 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17183 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17184 included before <wchar.h>. */
17185 #include <stddef.h>
17186 #include <signal.h>
17188 # include <stdio.h>
17190 # include <wchar.h>
17193 #include <limits.h>"; then :
17199 eval gl_cv_bitsizeof_${gltype}=\$result
17202 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17204 $as_echo "$ac_res" >&6; }
17205 eval result=\$gl_cv_bitsizeof_${gltype}
17206 if test $result = unknown; then
17209 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17210 cat >>confdefs.h <<_ACEOF
17211 #define BITSIZEOF_${GLTYPE} $result
17214 eval BITSIZEOF_${GLTYPE}=\$result
17220 for gltype in sig_atomic_t wchar_t wint_t ; do
17221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17222 $as_echo_n "checking whether $gltype is signed... " >&6; }
17223 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
17224 $as_echo_n "(cached) " >&6
17226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227 /* end confdefs.h. */
17229 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17230 included before <wchar.h>. */
17231 #include <stddef.h>
17232 #include <signal.h>
17234 # include <stdio.h>
17236 # include <wchar.h>
17239 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
17248 if ac_fn_c_try_compile "$LINENO"; then :
17253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17254 eval gl_cv_type_${gltype}_signed=\$result
17257 eval ac_res=\$gl_cv_type_${gltype}_signed
17258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17259 $as_echo "$ac_res" >&6; }
17260 eval result=\$gl_cv_type_${gltype}_signed
17261 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17262 if test "$result" = yes; then
17263 cat >>confdefs.h <<_ACEOF
17264 #define HAVE_SIGNED_${GLTYPE} 1
17267 eval HAVE_SIGNED_${GLTYPE}=1
17269 eval HAVE_SIGNED_${GLTYPE}=0
17274 gl_cv_type_ptrdiff_t_signed=yes
17275 gl_cv_type_size_t_signed=no
17276 if test $APPLE_UNIVERSAL_BUILD = 0; then
17279 for gltype in ptrdiff_t size_t ; do
17280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17281 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
17282 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
17283 $as_echo_n "(cached) " >&6
17285 eval gl_cv_type_${gltype}_suffix=no
17286 eval result=\$gl_cv_type_${gltype}_signed
17287 if test "$result" = yes; then
17292 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17294 '') gltype1='int';;
17295 l) gltype1='long int';;
17296 ll) gltype1='long long int';;
17297 i64) gltype1='__int64';;
17298 u) gltype1='unsigned int';;
17299 ul) gltype1='unsigned long int';;
17300 ull) gltype1='unsigned long long int';;
17301 ui64)gltype1='unsigned __int64';;
17303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17304 /* end confdefs.h. */
17306 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17307 included before <wchar.h>. */
17308 #include <stddef.h>
17309 #include <signal.h>
17311 # include <stdio.h>
17313 # include <wchar.h>
17316 extern $gltype foo;
17317 extern $gltype1 foo;
17326 if ac_fn_c_try_compile "$LINENO"; then :
17327 eval gl_cv_type_${gltype}_suffix=\$glsuf
17329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17330 eval result=\$gl_cv_type_${gltype}_suffix
17331 test "$result" != no && break
17334 eval ac_res=\$gl_cv_type_${gltype}_suffix
17335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17336 $as_echo "$ac_res" >&6; }
17337 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17338 eval result=\$gl_cv_type_${gltype}_suffix
17339 test "$result" = no && result=
17340 eval ${GLTYPE}_SUFFIX=\$result
17341 cat >>confdefs.h <<_ACEOF
17342 #define ${GLTYPE}_SUFFIX $result
17351 for gltype in sig_atomic_t wchar_t wint_t ; do
17352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17353 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
17354 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
17355 $as_echo_n "(cached) " >&6
17357 eval gl_cv_type_${gltype}_suffix=no
17358 eval result=\$gl_cv_type_${gltype}_signed
17359 if test "$result" = yes; then
17364 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17366 '') gltype1='int';;
17367 l) gltype1='long int';;
17368 ll) gltype1='long long int';;
17369 i64) gltype1='__int64';;
17370 u) gltype1='unsigned int';;
17371 ul) gltype1='unsigned long int';;
17372 ull) gltype1='unsigned long long int';;
17373 ui64)gltype1='unsigned __int64';;
17375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17376 /* end confdefs.h. */
17378 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17379 included before <wchar.h>. */
17380 #include <stddef.h>
17381 #include <signal.h>
17383 # include <stdio.h>
17385 # include <wchar.h>
17388 extern $gltype foo;
17389 extern $gltype1 foo;
17398 if ac_fn_c_try_compile "$LINENO"; then :
17399 eval gl_cv_type_${gltype}_suffix=\$glsuf
17401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17402 eval result=\$gl_cv_type_${gltype}_suffix
17403 test "$result" != no && break
17406 eval ac_res=\$gl_cv_type_${gltype}_suffix
17407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17408 $as_echo "$ac_res" >&6; }
17409 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17410 eval result=\$gl_cv_type_${gltype}_suffix
17411 test "$result" = no && result=
17412 eval ${GLTYPE}_SUFFIX=\$result
17413 cat >>confdefs.h <<_ACEOF
17414 #define ${GLTYPE}_SUFFIX $result
17421 if test $BITSIZEOF_WINT_T -lt 32; then
17422 BITSIZEOF_WINT_T=32
17428 if test -n "$STDINT_H"; then
17429 GL_GENERATE_STDINT_H_TRUE=
17430 GL_GENERATE_STDINT_H_FALSE='#'
17432 GL_GENERATE_STDINT_H_TRUE='#'
17433 GL_GENERATE_STDINT_H_FALSE=
17438 REPLACE_STRERROR_0=0
17439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
17440 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
17441 if ${gl_cv_func_strerror_0_works+:} false; then :
17442 $as_echo_n "(cached) " >&6
17444 if test "$cross_compiling" = yes; then :
17446 # Guess yes on glibc systems.
17447 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
17448 # If we don't know, assume the worst.
17449 *) gl_cv_func_strerror_0_works="guessing no" ;;
17453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17454 /* end confdefs.h. */
17455 #include <string.h>
17464 str = strerror (0);
17465 if (!*str) result |= 1;
17466 if (errno) result |= 2;
17467 if (strstr (str, "nknown") || strstr (str, "ndefined"))
17474 if ac_fn_c_try_run "$LINENO"; then :
17475 gl_cv_func_strerror_0_works=yes
17477 gl_cv_func_strerror_0_works=no
17479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17480 conftest.$ac_objext conftest.beam conftest.$ac_ext
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
17486 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
17487 case "$gl_cv_func_strerror_0_works" in
17490 REPLACE_STRERROR_0=1
17492 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
17508 if test $gl_cv_have_include_next = yes; then
17509 gl_cv_next_string_h='<'string.h'>'
17511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17512 $as_echo_n "checking absolute name of <string.h>... " >&6; }
17513 if ${gl_cv_next_string_h+:} false; then :
17514 $as_echo_n "(cached) " >&6
17517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17518 /* end confdefs.h. */
17519 #include <string.h>
17523 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17524 *) gl_absname_cpp="$ac_cpp" ;;
17529 gl_dirsep_regex='[/\\]'
17532 gl_dirsep_regex='\/'
17535 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17537 gl_header_literal_regex=`echo 'string.h' \
17538 | sed -e "$gl_make_literal_regex_sed"`
17539 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17540 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17545 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17546 sed -n "$gl_absolute_header_sed"`'"'
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17551 $as_echo "$gl_cv_next_string_h" >&6; }
17553 NEXT_STRING_H=$gl_cv_next_string_h
17555 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17556 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17557 gl_next_as_first_directive='<'string.h'>'
17559 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17560 gl_next_as_first_directive=$gl_cv_next_string_h
17562 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17570 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
17571 if test "x$ac_cv_have_decl_strndup" = xyes; then :
17577 cat >>confdefs.h <<_ACEOF
17578 #define HAVE_DECL_STRNDUP $ac_have_decl
17583 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17584 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
17590 cat >>confdefs.h <<_ACEOF
17591 #define HAVE_DECL_STRNLEN $ac_have_decl
17594 ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
17595 if test "x$ac_cv_have_decl_strsignal" = xyes; then :
17601 cat >>confdefs.h <<_ACEOF
17602 #define HAVE_DECL_STRSIGNAL $ac_have_decl
17605 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
17606 /* NetBSD declares sys_siglist in unistd.h. */
17607 #ifdef HAVE_UNISTD_H
17608 # include <unistd.h>
17612 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
17618 cat >>confdefs.h <<_ACEOF
17619 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
17626 if test "$gl_cv_func_memchr_works" != yes; then
17629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
17630 $as_echo_n "checking whether strstr works... " >&6; }
17631 if ${gl_cv_func_strstr_works_always+:} false; then :
17632 $as_echo_n "(cached) " >&6
17634 if test "$cross_compiling" = yes; then :
17635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17636 /* end confdefs.h. */
17638 #ifdef __GNU_LIBRARY__
17639 #include <features.h>
17640 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
17641 || defined __UCLIBC__
17644 #elif defined __CYGWIN__
17645 #include <cygwin/version.h>
17646 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
17654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17655 $EGREP "Lucky user" >/dev/null 2>&1; then :
17656 gl_cv_func_strstr_works_always="guessing yes"
17658 gl_cv_func_strstr_works_always="guessing no"
17664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17665 /* end confdefs.h. */
17667 #include <string.h> /* for strstr */
17668 #define P "_EF_BF_BD"
17669 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
17670 #define NEEDLE P P P P P
17675 return !!strstr (HAYSTACK, NEEDLE);
17681 if ac_fn_c_try_run "$LINENO"; then :
17682 gl_cv_func_strstr_works_always=yes
17684 gl_cv_func_strstr_works_always=no
17686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17687 conftest.$ac_objext conftest.beam conftest.$ac_ext
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
17693 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
17694 case "$gl_cv_func_strstr_works_always" in
17703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
17704 $as_echo_n "checking whether ldexp() can be used without linking with libm... " >&6; }
17705 if ${gl_cv_func_ldexp_no_libm+:} false; then :
17706 $as_echo_n "(cached) " >&6
17709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17710 /* end confdefs.h. */
17711 #ifndef __NO_MATH_INLINES
17712 # define __NO_MATH_INLINES 1 /* for glibc */
17715 double (*funcptr) (double, int) = ldexp;
17720 return ldexp (x, -1) > 0;
17725 if ac_fn_c_try_link "$LINENO"; then :
17726 gl_cv_func_ldexp_no_libm=yes
17728 gl_cv_func_ldexp_no_libm=no
17730 rm -f core conftest.err conftest.$ac_objext \
17731 conftest$ac_exeext conftest.$ac_ext
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
17735 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
17744 GNULIB_NANOSLEEP=0;
17748 HAVE_DECL_LOCALTIME_R=1;
17752 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17753 REPLACE_MKTIME=GNULIB_PORTCHECK;
17754 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17755 REPLACE_TIMEGM=GNULIB_PORTCHECK;
17759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17760 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
17761 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17762 $as_echo_n "(cached) " >&6
17764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17765 /* end confdefs.h. */
17771 static struct timespec x; x.tv_sec = x.tv_nsec;
17776 if ac_fn_c_try_compile "$LINENO"; then :
17777 gl_cv_sys_struct_timespec_in_time_h=yes
17779 gl_cv_sys_struct_timespec_in_time_h=no
17781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17784 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17786 TIME_H_DEFINES_STRUCT_TIMESPEC=0
17787 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17788 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17789 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17790 TIME_H_DEFINES_STRUCT_TIMESPEC=1
17792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17793 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
17794 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17795 $as_echo_n "(cached) " >&6
17797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17798 /* end confdefs.h. */
17799 #include <sys/time.h>
17804 static struct timespec x; x.tv_sec = x.tv_nsec;
17809 if ac_fn_c_try_compile "$LINENO"; then :
17810 gl_cv_sys_struct_timespec_in_sys_time_h=yes
17812 gl_cv_sys_struct_timespec_in_sys_time_h=no
17814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17817 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17818 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17819 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17822 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17823 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17824 $as_echo_n "(cached) " >&6
17826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17827 /* end confdefs.h. */
17828 #include <pthread.h>
17833 static struct timespec x; x.tv_sec = x.tv_nsec;
17838 if ac_fn_c_try_compile "$LINENO"; then :
17839 gl_cv_sys_struct_timespec_in_pthread_h=yes
17841 gl_cv_sys_struct_timespec_in_pthread_h=no
17843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17846 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17847 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17848 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17867 if test $gl_cv_have_include_next = yes; then
17868 gl_cv_next_time_h='<'time.h'>'
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17871 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17872 if ${gl_cv_next_time_h+:} false; then :
17873 $as_echo_n "(cached) " >&6
17876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17877 /* end confdefs.h. */
17882 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17883 *) gl_absname_cpp="$ac_cpp" ;;
17888 gl_dirsep_regex='[/\\]'
17891 gl_dirsep_regex='\/'
17894 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17896 gl_header_literal_regex=`echo 'time.h' \
17897 | sed -e "$gl_make_literal_regex_sed"`
17898 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17899 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17904 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17905 sed -n "$gl_absolute_header_sed"`'"'
17909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17910 $as_echo "$gl_cv_next_time_h" >&6; }
17912 NEXT_TIME_H=$gl_cv_next_time_h
17914 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17915 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17916 gl_next_as_first_directive='<'time.h'>'
17918 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17919 gl_next_as_first_directive=$gl_cv_next_time_h
17921 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17930 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
17931 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
17937 cat >>confdefs.h <<_ACEOF
17938 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
17941 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
17942 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
17948 cat >>confdefs.h <<_ACEOF
17949 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
17952 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
17953 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
17959 cat >>confdefs.h <<_ACEOF
17960 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
17963 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
17964 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
17970 cat >>confdefs.h <<_ACEOF
17971 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
17974 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
17975 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
17981 cat >>confdefs.h <<_ACEOF
17982 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
17985 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
17986 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
17992 cat >>confdefs.h <<_ACEOF
17993 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
17996 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
17997 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
18003 cat >>confdefs.h <<_ACEOF
18004 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
18007 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
18008 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
18014 cat >>confdefs.h <<_ACEOF
18015 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
18018 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
18019 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
18025 cat >>confdefs.h <<_ACEOF
18026 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
18029 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
18030 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
18036 cat >>confdefs.h <<_ACEOF
18037 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
18040 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
18041 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
18047 cat >>confdefs.h <<_ACEOF
18048 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
18051 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
18052 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
18058 cat >>confdefs.h <<_ACEOF
18059 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
18065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
18066 $as_echo_n "checking for wint_t... " >&6; }
18067 if ${gt_cv_c_wint_t+:} false; then :
18068 $as_echo_n "(cached) " >&6
18070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18071 /* end confdefs.h. */
18073 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18075 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
18076 before <wchar.h>. */
18077 #include <stddef.h>
18081 wint_t foo = (wchar_t)'\0';
18090 if ac_fn_c_try_compile "$LINENO"; then :
18095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
18098 $as_echo "$gt_cv_c_wint_t" >&6; }
18099 if test $gt_cv_c_wint_t = yes; then
18101 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
18109 if test $ac_cv_header_features_h = yes; then
18117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
18118 $as_echo_n "checking for inttypes.h... " >&6; }
18119 if ${gl_cv_header_inttypes_h+:} false; then :
18120 $as_echo_n "(cached) " >&6
18122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18123 /* end confdefs.h. */
18125 #include <sys/types.h>
18126 #include <inttypes.h>
18131 uintmax_t i = (uintmax_t) -1; return !i;
18136 if ac_fn_c_try_compile "$LINENO"; then :
18137 gl_cv_header_inttypes_h=yes
18139 gl_cv_header_inttypes_h=no
18141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
18144 $as_echo "$gl_cv_header_inttypes_h" >&6; }
18145 if test $gl_cv_header_inttypes_h = yes; then
18147 cat >>confdefs.h <<_ACEOF
18148 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
18154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
18155 $as_echo_n "checking for stdint.h... " >&6; }
18156 if ${gl_cv_header_stdint_h+:} false; then :
18157 $as_echo_n "(cached) " >&6
18159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18160 /* end confdefs.h. */
18161 #include <sys/types.h>
18162 #include <stdint.h>
18166 uintmax_t i = (uintmax_t) -1; return !i;
18171 if ac_fn_c_try_compile "$LINENO"; then :
18172 gl_cv_header_stdint_h=yes
18174 gl_cv_header_stdint_h=no
18176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
18179 $as_echo "$gl_cv_header_stdint_h" >&6; }
18180 if test $gl_cv_header_stdint_h = yes; then
18182 cat >>confdefs.h <<_ACEOF
18183 #define HAVE_STDINT_H_WITH_UINTMAX 1
18191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
18192 $as_echo_n "checking for intmax_t... " >&6; }
18193 if ${gt_cv_c_intmax_t+:} false; then :
18194 $as_echo_n "(cached) " >&6
18196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18197 /* end confdefs.h. */
18199 #include <stddef.h>
18200 #include <stdlib.h>
18201 #if HAVE_STDINT_H_WITH_UINTMAX
18202 #include <stdint.h>
18204 #if HAVE_INTTYPES_H_WITH_UINTMAX
18205 #include <inttypes.h>
18211 intmax_t x = -1; return !x;
18216 if ac_fn_c_try_compile "$LINENO"; then :
18217 gt_cv_c_intmax_t=yes
18219 gt_cv_c_intmax_t=no
18221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
18224 $as_echo "$gt_cv_c_intmax_t" >&6; }
18225 if test $gt_cv_c_intmax_t = yes; then
18227 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
18231 test $ac_cv_type_long_long_int = yes \
18232 && ac_type='long long' \
18235 cat >>confdefs.h <<_ACEOF
18236 #define intmax_t $ac_type
18246 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
18248 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18249 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18250 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18251 cat >>confdefs.h <<_ACEOF
18252 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18258 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
18260 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
18266 cat >>confdefs.h <<_ACEOF
18267 #define HAVE_DECL__SNPRINTF $ac_have_decl
18272 case "$gl_cv_func_snprintf_retval_c99" in
18275 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
18284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
18285 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
18286 if ${gl_cv_func_printf_sizes_c99+:} false; then :
18287 $as_echo_n "(cached) " >&6
18290 if test "$cross_compiling" = yes; then :
18293 # Guess yes on glibc systems.
18294 *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
18295 # Guess yes on FreeBSD >= 5.
18296 freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
18297 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
18298 # Guess yes on Mac OS X >= 10.3.
18299 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
18300 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
18301 # Guess yes on OpenBSD >= 3.9.
18302 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
18303 gl_cv_func_printf_sizes_c99="guessing no";;
18304 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
18305 # Guess yes on Solaris >= 2.10.
18306 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
18307 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
18308 # Guess yes on NetBSD >= 3.
18309 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18310 gl_cv_func_printf_sizes_c99="guessing no";;
18311 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
18312 # If we don't know, assume the worst.
18313 *) gl_cv_func_printf_sizes_c99="guessing no";;
18317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18318 /* end confdefs.h. */
18320 #include <stddef.h>
18322 #include <string.h>
18323 #include <sys/types.h>
18324 #if HAVE_STDINT_H_WITH_UINTMAX
18325 # include <stdint.h>
18327 #if HAVE_INTTYPES_H_WITH_UINTMAX
18328 # include <inttypes.h>
18330 static char buf[100];
18334 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
18336 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
18337 || strcmp (buf, "12345671 33") != 0)
18341 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
18342 || strcmp (buf, "12345672 33") != 0)
18345 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
18346 || strcmp (buf, "12345673 33") != 0)
18349 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
18350 || strcmp (buf, "1.5 33") != 0)
18355 if ac_fn_c_try_run "$LINENO"; then :
18356 gl_cv_func_printf_sizes_c99=yes
18358 gl_cv_func_printf_sizes_c99=no
18360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18361 conftest.$ac_objext conftest.beam conftest.$ac_ext
18366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
18367 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
18372 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
18373 if ${gl_cv_func_printf_long_double+:} false; then :
18374 $as_echo_n "(cached) " >&6
18377 if test "$cross_compiling" = yes; then :
18380 beos*) gl_cv_func_printf_long_double="guessing no";;
18381 mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
18382 *) gl_cv_func_printf_long_double="guessing yes";;
18386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18387 /* end confdefs.h. */
18390 #include <string.h>
18391 static char buf[10000];
18396 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
18397 || strcmp (buf, "1.750000 33") != 0)
18400 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
18401 || strcmp (buf, "1.750000e+00 33") != 0)
18404 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
18405 || strcmp (buf, "1.75 33") != 0)
18410 if ac_fn_c_try_run "$LINENO"; then :
18411 gl_cv_func_printf_long_double=yes
18413 gl_cv_func_printf_long_double=no
18415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18416 conftest.$ac_objext conftest.beam conftest.$ac_ext
18421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
18422 $as_echo "$gl_cv_func_printf_long_double" >&6; }
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
18427 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
18428 if ${gl_cv_func_printf_infinite+:} false; then :
18429 $as_echo_n "(cached) " >&6
18432 if test "$cross_compiling" = yes; then :
18435 # Guess yes on glibc systems.
18436 *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
18437 # Guess yes on FreeBSD >= 6.
18438 freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
18439 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
18440 # Guess yes on Mac OS X >= 10.3.
18441 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
18442 darwin*) gl_cv_func_printf_infinite="guessing yes";;
18443 # Guess yes on HP-UX >= 11.
18444 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
18445 hpux*) gl_cv_func_printf_infinite="guessing yes";;
18446 # Guess yes on NetBSD >= 3.
18447 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18448 gl_cv_func_printf_infinite="guessing no";;
18449 netbsd*) gl_cv_func_printf_infinite="guessing yes";;
18450 # Guess yes on BeOS.
18451 beos*) gl_cv_func_printf_infinite="guessing yes";;
18452 # If we don't know, assume the worst.
18453 *) gl_cv_func_printf_infinite="guessing no";;
18457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18458 /* end confdefs.h. */
18461 #include <string.h>
18463 strisnan (const char *string, size_t start_index, size_t end_index)
18465 if (start_index < end_index)
18467 if (string[start_index] == '-')
18469 if (start_index + 3 <= end_index
18470 && memcmp (string + start_index, "nan", 3) == 0)
18473 if (start_index == end_index
18474 || (string[start_index] == '(' && string[end_index - 1] == ')'))
18483 static double plus_zero = 0.0;
18484 double minus_zero = - plus_zero;
18485 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
18487 static char buf[10000];
18488 static double zero = 0.0;
18492 if (sprintf (buf, "%f", 1.0 / zero) < 0
18493 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18495 if (sprintf (buf, "%f", -1.0 / zero) < 0
18496 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18498 if (sprintf (buf, "%f", zero / zero) < 0
18499 || !strisnan (buf, 0, strlen (buf)))
18501 if (sprintf (buf, "%e", 1.0 / zero) < 0
18502 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18504 if (sprintf (buf, "%e", -1.0 / zero) < 0
18505 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18507 if (sprintf (buf, "%e", zero / zero) < 0
18508 || !strisnan (buf, 0, strlen (buf)))
18510 if (sprintf (buf, "%g", 1.0 / zero) < 0
18511 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18513 if (sprintf (buf, "%g", -1.0 / zero) < 0
18514 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18516 if (sprintf (buf, "%g", zero / zero) < 0
18517 || !strisnan (buf, 0, strlen (buf)))
18519 /* This test fails on HP-UX 10.20. */
18520 if (have_minus_zero ())
18521 if (sprintf (buf, "%g", - zero) < 0
18522 || strcmp (buf, "-0") != 0)
18527 if ac_fn_c_try_run "$LINENO"; then :
18528 gl_cv_func_printf_infinite=yes
18530 gl_cv_func_printf_infinite=no
18532 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18533 conftest.$ac_objext conftest.beam conftest.$ac_ext
18538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
18539 $as_echo "$gl_cv_func_printf_infinite" >&6; }
18546 if test -n "$gl_printf_safe"; then
18548 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
18551 case "$gl_cv_func_printf_long_double" in
18553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
18554 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
18555 if ${gl_cv_func_printf_infinite_long_double+:} false; then :
18556 $as_echo_n "(cached) " >&6
18559 if test "$cross_compiling" = yes; then :
18561 case "$host_cpu" in
18562 # Guess no on ia64, x86_64, i386.
18563 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
18566 # Guess yes on glibc systems.
18567 *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
18568 # Guess yes on FreeBSD >= 6.
18569 freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
18570 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
18571 # Guess yes on HP-UX >= 11.
18572 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
18573 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
18574 # If we don't know, assume the worst.
18575 *) gl_cv_func_printf_infinite_long_double="guessing no";;
18581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18582 /* end confdefs.h. */
18585 #include <stdlib.h>
18586 #if defined __MACH__ && defined __APPLE__
18587 /* Avoid a crash on Mac OS X. */
18588 #include <mach/mach.h>
18589 #include <mach/mach_error.h>
18590 #include <mach/thread_status.h>
18591 #include <mach/exception.h>
18592 #include <mach/task.h>
18593 #include <pthread.h>
18594 /* The exception port on which our thread listens. */
18595 static mach_port_t our_exception_port;
18596 /* The main function of the thread listening for exceptions of type
18599 mach_exception_thread (void *arg)
18601 /* Buffer for a message to be received. */
18603 mach_msg_header_t head;
18604 mach_msg_body_t msgh_body;
18607 mach_msg_return_t retval;
18608 /* Wait for a message on the exception port. */
18609 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
18610 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
18611 if (retval != MACH_MSG_SUCCESS)
18616 nocrash_init (void)
18618 mach_port_t self = mach_task_self ();
18619 /* Allocate a port on which the thread shall listen for exceptions. */
18620 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
18622 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
18623 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
18624 MACH_MSG_TYPE_MAKE_SEND)
18626 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
18628 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
18629 /* Create the thread listening on the exception port. */
18630 pthread_attr_t attr;
18632 if (pthread_attr_init (&attr) == 0
18633 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
18634 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
18635 pthread_attr_destroy (&attr);
18636 /* Replace the exception port info for these exceptions with our own.
18637 Note that we replace the exception port for the entire task, not only
18638 for a particular thread. This has the effect that when our exception
18639 port gets the message, the thread specific exception port has already
18640 been asked, and we don't need to bother about it.
18641 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
18642 task_set_exception_ports (self, mask, our_exception_port,
18643 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
18648 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18649 /* Avoid a crash on native Windows. */
18650 #define WIN32_LEAN_AND_MEAN
18651 #include <windows.h>
18652 #include <winerror.h>
18654 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
18656 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
18658 case EXCEPTION_ACCESS_VIOLATION:
18659 case EXCEPTION_IN_PAGE_ERROR:
18660 case EXCEPTION_STACK_OVERFLOW:
18661 case EXCEPTION_GUARD_PAGE:
18662 case EXCEPTION_PRIV_INSTRUCTION:
18663 case EXCEPTION_ILLEGAL_INSTRUCTION:
18664 case EXCEPTION_DATATYPE_MISALIGNMENT:
18665 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
18666 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
18669 return EXCEPTION_CONTINUE_SEARCH;
18672 nocrash_init (void)
18674 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
18677 /* Avoid a crash on POSIX systems. */
18678 #include <signal.h>
18679 /* A POSIX signal handler. */
18681 exception_handler (int sig)
18686 nocrash_init (void)
18689 signal (SIGSEGV, exception_handler);
18692 signal (SIGBUS, exception_handler);
18699 #include <string.h>
18701 strisnan (const char *string, size_t start_index, size_t end_index)
18703 if (start_index < end_index)
18705 if (string[start_index] == '-')
18707 if (start_index + 3 <= end_index
18708 && memcmp (string + start_index, "nan", 3) == 0)
18711 if (start_index == end_index
18712 || (string[start_index] == '(' && string[end_index - 1] == ')'))
18718 static char buf[10000];
18719 static long double zeroL = 0.0L;
18724 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
18725 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18727 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
18728 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18730 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
18731 || !strisnan (buf, 0, strlen (buf)))
18733 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
18734 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18736 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
18737 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18739 if (sprintf (buf, "%Le", zeroL / zeroL) < 0
18740 || !strisnan (buf, 0, strlen (buf)))
18742 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
18743 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18745 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
18746 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18748 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
18749 || !strisnan (buf, 0, strlen (buf)))
18751 #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
18752 /* Representation of an 80-bit 'long double' as an initializer for a sequence
18753 of 'unsigned int' words. */
18754 # ifdef WORDS_BIGENDIAN
18755 # define LDBL80_WORDS(exponent,manthi,mantlo) \
18756 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
18757 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
18758 (unsigned int) (mantlo) << 16 \
18761 # define LDBL80_WORDS(exponent,manthi,mantlo) \
18762 { mantlo, manthi, exponent }
18765 static union { unsigned int word[4]; long double value; } x =
18766 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
18767 if (sprintf (buf, "%Lf", x.value) < 0
18768 || !strisnan (buf, 0, strlen (buf)))
18770 if (sprintf (buf, "%Le", x.value) < 0
18771 || !strisnan (buf, 0, strlen (buf)))
18773 if (sprintf (buf, "%Lg", x.value) < 0
18774 || !strisnan (buf, 0, strlen (buf)))
18778 /* Signalling NaN. */
18779 static union { unsigned int word[4]; long double value; } x =
18780 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
18781 if (sprintf (buf, "%Lf", x.value) < 0
18782 || !strisnan (buf, 0, strlen (buf)))
18784 if (sprintf (buf, "%Le", x.value) < 0
18785 || !strisnan (buf, 0, strlen (buf)))
18787 if (sprintf (buf, "%Lg", x.value) < 0
18788 || !strisnan (buf, 0, strlen (buf)))
18791 { /* Pseudo-NaN. */
18792 static union { unsigned int word[4]; long double value; } x =
18793 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
18794 if (sprintf (buf, "%Lf", x.value) < 0
18795 || !strisnan (buf, 0, strlen (buf)))
18797 if (sprintf (buf, "%Le", x.value) < 0
18798 || !strisnan (buf, 0, strlen (buf)))
18800 if (sprintf (buf, "%Lg", x.value) < 0
18801 || !strisnan (buf, 0, strlen (buf)))
18804 { /* Pseudo-Infinity. */
18805 static union { unsigned int word[4]; long double value; } x =
18806 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
18807 if (sprintf (buf, "%Lf", x.value) < 0
18808 || !strisnan (buf, 0, strlen (buf)))
18810 if (sprintf (buf, "%Le", x.value) < 0
18811 || !strisnan (buf, 0, strlen (buf)))
18813 if (sprintf (buf, "%Lg", x.value) < 0
18814 || !strisnan (buf, 0, strlen (buf)))
18817 { /* Pseudo-Zero. */
18818 static union { unsigned int word[4]; long double value; } x =
18819 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
18820 if (sprintf (buf, "%Lf", x.value) < 0
18821 || !strisnan (buf, 0, strlen (buf)))
18823 if (sprintf (buf, "%Le", x.value) < 0
18824 || !strisnan (buf, 0, strlen (buf)))
18826 if (sprintf (buf, "%Lg", x.value) < 0
18827 || !strisnan (buf, 0, strlen (buf)))
18830 { /* Unnormalized number. */
18831 static union { unsigned int word[4]; long double value; } x =
18832 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
18833 if (sprintf (buf, "%Lf", x.value) < 0
18834 || !strisnan (buf, 0, strlen (buf)))
18836 if (sprintf (buf, "%Le", x.value) < 0
18837 || !strisnan (buf, 0, strlen (buf)))
18839 if (sprintf (buf, "%Lg", x.value) < 0
18840 || !strisnan (buf, 0, strlen (buf)))
18843 { /* Pseudo-Denormal. */
18844 static union { unsigned int word[4]; long double value; } x =
18845 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
18846 if (sprintf (buf, "%Lf", x.value) < 0
18847 || !strisnan (buf, 0, strlen (buf)))
18849 if (sprintf (buf, "%Le", x.value) < 0
18850 || !strisnan (buf, 0, strlen (buf)))
18852 if (sprintf (buf, "%Lg", x.value) < 0
18853 || !strisnan (buf, 0, strlen (buf)))
18860 if ac_fn_c_try_run "$LINENO"; then :
18861 gl_cv_func_printf_infinite_long_double=yes
18863 gl_cv_func_printf_infinite_long_double=no
18865 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18866 conftest.$ac_objext conftest.beam conftest.$ac_ext
18871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
18872 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
18875 gl_cv_func_printf_infinite_long_double="irrelevant"
18881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
18882 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
18883 if ${gl_cv_func_printf_directive_a+:} false; then :
18884 $as_echo_n "(cached) " >&6
18887 if test "$cross_compiling" = yes; then :
18890 # Guess yes on glibc >= 2.5 systems.
18892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18893 /* end confdefs.h. */
18895 #include <features.h>
18896 #ifdef __GNU_LIBRARY__
18897 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
18903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18904 $EGREP "BZ2908" >/dev/null 2>&1; then :
18905 gl_cv_func_printf_directive_a="guessing yes"
18907 gl_cv_func_printf_directive_a="guessing no"
18912 # If we don't know, assume the worst.
18913 *) gl_cv_func_printf_directive_a="guessing no";;
18917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18918 /* end confdefs.h. */
18921 #include <string.h>
18922 static char buf[100];
18923 static double zero = 0.0;
18927 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
18928 || (strcmp (buf, "0x1.922p+1 33") != 0
18929 && strcmp (buf, "0x3.244p+0 33") != 0
18930 && strcmp (buf, "0x6.488p-1 33") != 0
18931 && strcmp (buf, "0xc.91p-2 33") != 0))
18933 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
18934 || (strcmp (buf, "-0X1.922P+1 33") != 0
18935 && strcmp (buf, "-0X3.244P+0 33") != 0
18936 && strcmp (buf, "-0X6.488P-1 33") != 0
18937 && strcmp (buf, "-0XC.91P-2 33") != 0))
18939 /* This catches a FreeBSD 6.1 bug: it doesn't round. */
18940 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
18941 || (strcmp (buf, "0x1.83p+0 33") != 0
18942 && strcmp (buf, "0x3.05p-1 33") != 0
18943 && strcmp (buf, "0x6.0ap-2 33") != 0
18944 && strcmp (buf, "0xc.14p-3 33") != 0))
18946 /* This catches a FreeBSD 6.1 bug. See
18947 <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
18948 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
18951 /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
18952 if (sprintf (buf, "%.1a", 1.999) < 0
18953 || (strcmp (buf, "0x1.0p+1") != 0
18954 && strcmp (buf, "0x2.0p+0") != 0
18955 && strcmp (buf, "0x4.0p-1") != 0
18956 && strcmp (buf, "0x8.0p-2") != 0))
18958 /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
18959 glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
18960 if (sprintf (buf, "%.1La", 1.999L) < 0
18961 || (strcmp (buf, "0x1.0p+1") != 0
18962 && strcmp (buf, "0x2.0p+0") != 0
18963 && strcmp (buf, "0x4.0p-1") != 0
18964 && strcmp (buf, "0x8.0p-2") != 0))
18969 if ac_fn_c_try_run "$LINENO"; then :
18970 gl_cv_func_printf_directive_a=yes
18972 gl_cv_func_printf_directive_a=no
18974 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18975 conftest.$ac_objext conftest.beam conftest.$ac_ext
18980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
18981 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
18986 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
18987 if ${gl_cv_func_printf_directive_f+:} false; then :
18988 $as_echo_n "(cached) " >&6
18991 if test "$cross_compiling" = yes; then :
18994 # Guess yes on glibc systems.
18995 *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
18996 # Guess yes on FreeBSD >= 6.
18997 freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
18998 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
18999 # Guess yes on Mac OS X >= 10.3.
19000 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
19001 darwin*) gl_cv_func_printf_directive_f="guessing yes";;
19002 # Guess yes on Solaris >= 2.10.
19003 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
19004 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
19005 # If we don't know, assume the worst.
19006 *) gl_cv_func_printf_directive_f="guessing no";;
19010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19011 /* end confdefs.h. */
19014 #include <string.h>
19015 static char buf[100];
19016 static double zero = 0.0;
19020 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
19021 || strcmp (buf, "1234567.000000 33") != 0)
19023 if (sprintf (buf, "%F", 1.0 / zero) < 0
19024 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
19026 /* This catches a Cygwin 1.5.x bug. */
19027 if (sprintf (buf, "%.F", 1234.0) < 0
19028 || strcmp (buf, "1234") != 0)
19033 if ac_fn_c_try_run "$LINENO"; then :
19034 gl_cv_func_printf_directive_f=yes
19036 gl_cv_func_printf_directive_f=no
19038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19039 conftest.$ac_objext conftest.beam conftest.$ac_ext
19044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
19045 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
19049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
19050 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
19051 if ${gl_cv_func_printf_directive_n+:} false; then :
19052 $as_echo_n "(cached) " >&6
19055 if test "$cross_compiling" = yes; then :
19058 mingw*) gl_cv_func_printf_directive_n="guessing no";;
19059 *) gl_cv_func_printf_directive_n="guessing yes";;
19063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19064 /* end confdefs.h. */
19067 #include <stdlib.h>
19068 #include <string.h>
19070 /* See page about "Parameter Validation" on msdn.microsoft.com. */
19072 invalid_parameter_handler (const wchar_t *expression,
19073 const wchar_t *function,
19074 const wchar_t *file, unsigned int line,
19080 static char fmtstring[10];
19081 static char buf[100];
19086 _set_invalid_parameter_handler (invalid_parameter_handler);
19088 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
19089 support %n in format strings in read-only memory but not in writable
19091 strcpy (fmtstring, "%d %n");
19092 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
19093 || strcmp (buf, "123 ") != 0
19099 if ac_fn_c_try_run "$LINENO"; then :
19100 gl_cv_func_printf_directive_n=yes
19102 gl_cv_func_printf_directive_n=no
19104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19105 conftest.$ac_objext conftest.beam conftest.$ac_ext
19110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
19111 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
19115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
19116 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
19117 if ${gl_cv_func_printf_directive_ls+:} false; then :
19118 $as_echo_n "(cached) " >&6
19121 if test "$cross_compiling" = yes; then :
19124 openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
19125 irix*) gl_cv_func_printf_directive_ls="guessing no";;
19126 solaris*) gl_cv_func_printf_directive_ls="guessing no";;
19127 cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
19128 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
19129 *) gl_cv_func_printf_directive_ls="guessing yes";;
19133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19134 /* end confdefs.h. */
19136 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19138 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19139 included before <wchar.h>. */
19140 #include <stddef.h>
19144 #include <string.h>
19149 /* Test whether %ls works at all.
19150 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
19153 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
19155 if (sprintf (buf, "%ls", wstring) < 0
19156 || strcmp (buf, "abc") != 0)
19159 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
19160 assertion failure inside libc), but not on OpenBSD 4.0. */
19162 static const wchar_t wstring[] = { 'a', 0 };
19164 if (sprintf (buf, "%ls", wstring) < 0
19165 || strcmp (buf, "a") != 0)
19168 /* Test whether precisions in %ls are supported as specified in ISO C 99
19170 "If a precision is specified, no more than that many bytes are written
19171 (including shift sequences, if any), and the array shall contain a
19172 null wide character if, to equal the multibyte character sequence
19173 length given by the precision, the function would need to access a
19174 wide character one past the end of the array."
19175 This test fails on Solaris 10. */
19177 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
19179 if (sprintf (buf, "%.2ls", wstring) < 0
19180 || strcmp (buf, "ab") != 0)
19186 if ac_fn_c_try_run "$LINENO"; then :
19187 gl_cv_func_printf_directive_ls=yes
19189 gl_cv_func_printf_directive_ls=no
19191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19192 conftest.$ac_objext conftest.beam conftest.$ac_ext
19197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
19198 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
19202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
19203 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
19204 if ${gl_cv_func_printf_flag_grouping+:} false; then :
19205 $as_echo_n "(cached) " >&6
19208 if test "$cross_compiling" = yes; then :
19211 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
19212 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
19213 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
19214 *) gl_cv_func_printf_flag_grouping="guessing yes";;
19218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19219 /* end confdefs.h. */
19222 #include <string.h>
19223 static char buf[100];
19226 if (sprintf (buf, "%'d %d", 1234567, 99) < 0
19227 || buf[strlen (buf) - 1] != '9')
19232 if ac_fn_c_try_run "$LINENO"; then :
19233 gl_cv_func_printf_flag_grouping=yes
19235 gl_cv_func_printf_flag_grouping=no
19237 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19238 conftest.$ac_objext conftest.beam conftest.$ac_ext
19243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
19244 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
19248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
19249 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
19250 if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
19251 $as_echo_n "(cached) " >&6
19254 if test "$cross_compiling" = yes; then :
19257 # Guess yes on HP-UX 11.
19258 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
19259 # Guess no on HP-UX 10 and older.
19260 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
19261 # Guess yes otherwise.
19262 *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
19266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19267 /* end confdefs.h. */
19270 #include <string.h>
19271 static char buf[100];
19274 /* Check that a '-' flag is not annihilated by a negative width. */
19275 if (sprintf (buf, "a%-*sc", -3, "b") < 0
19276 || strcmp (buf, "ab c") != 0)
19281 if ac_fn_c_try_run "$LINENO"; then :
19282 gl_cv_func_printf_flag_leftadjust=yes
19284 gl_cv_func_printf_flag_leftadjust=no
19286 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19287 conftest.$ac_objext conftest.beam conftest.$ac_ext
19292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
19293 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
19297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
19298 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
19299 if ${gl_cv_func_printf_flag_zero+:} false; then :
19300 $as_echo_n "(cached) " >&6
19303 if test "$cross_compiling" = yes; then :
19306 # Guess yes on glibc systems.
19307 *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
19308 # Guess yes on BeOS.
19309 beos*) gl_cv_func_printf_flag_zero="guessing yes";;
19310 # If we don't know, assume the worst.
19311 *) gl_cv_func_printf_flag_zero="guessing no";;
19315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19316 /* end confdefs.h. */
19319 #include <string.h>
19320 static char buf[100];
19321 static double zero = 0.0;
19324 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
19325 || (strcmp (buf, " inf") != 0
19326 && strcmp (buf, " infinity") != 0))
19331 if ac_fn_c_try_run "$LINENO"; then :
19332 gl_cv_func_printf_flag_zero=yes
19334 gl_cv_func_printf_flag_zero=no
19336 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19337 conftest.$ac_objext conftest.beam conftest.$ac_ext
19342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
19343 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
19347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
19348 $as_echo_n "checking whether printf supports large precisions... " >&6; }
19349 if ${gl_cv_func_printf_precision+:} false; then :
19350 $as_echo_n "(cached) " >&6
19353 if test "$cross_compiling" = yes; then :
19356 # Guess no only on Solaris, native Windows, and BeOS systems.
19357 solaris*) gl_cv_func_printf_precision="guessing no" ;;
19358 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
19359 beos*) gl_cv_func_printf_precision="guessing no" ;;
19360 *) gl_cv_func_printf_precision="guessing yes" ;;
19364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19365 /* end confdefs.h. */
19368 #include <string.h>
19369 static char buf[5000];
19374 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
19377 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
19379 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
19381 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
19384 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
19390 if ac_fn_c_try_run "$LINENO"; then :
19391 gl_cv_func_printf_precision=yes
19393 gl_cv_func_printf_precision=no
19395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19396 conftest.$ac_objext conftest.beam conftest.$ac_ext
19401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
19402 $as_echo "$gl_cv_func_printf_precision" >&6; }
19407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
19408 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
19409 if ${gl_cv_func_printf_enomem+:} false; then :
19410 $as_echo_n "(cached) " >&6
19413 gl_cv_func_printf_enomem="guessing no"
19414 if test "$cross_compiling" = no; then
19415 if test $APPLE_UNIVERSAL_BUILD = 0; then
19416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19417 /* end confdefs.h. */
19420 #include <stdlib.h>
19421 #if defined __MACH__ && defined __APPLE__
19422 /* Avoid a crash on Mac OS X. */
19423 #include <mach/mach.h>
19424 #include <mach/mach_error.h>
19425 #include <mach/thread_status.h>
19426 #include <mach/exception.h>
19427 #include <mach/task.h>
19428 #include <pthread.h>
19429 /* The exception port on which our thread listens. */
19430 static mach_port_t our_exception_port;
19431 /* The main function of the thread listening for exceptions of type
19434 mach_exception_thread (void *arg)
19436 /* Buffer for a message to be received. */
19438 mach_msg_header_t head;
19439 mach_msg_body_t msgh_body;
19442 mach_msg_return_t retval;
19443 /* Wait for a message on the exception port. */
19444 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19445 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19446 if (retval != MACH_MSG_SUCCESS)
19451 nocrash_init (void)
19453 mach_port_t self = mach_task_self ();
19454 /* Allocate a port on which the thread shall listen for exceptions. */
19455 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19457 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19458 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19459 MACH_MSG_TYPE_MAKE_SEND)
19461 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19463 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19464 /* Create the thread listening on the exception port. */
19465 pthread_attr_t attr;
19467 if (pthread_attr_init (&attr) == 0
19468 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19469 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19470 pthread_attr_destroy (&attr);
19471 /* Replace the exception port info for these exceptions with our own.
19472 Note that we replace the exception port for the entire task, not only
19473 for a particular thread. This has the effect that when our exception
19474 port gets the message, the thread specific exception port has already
19475 been asked, and we don't need to bother about it.
19476 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19477 task_set_exception_ports (self, mask, our_exception_port,
19478 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19483 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19484 /* Avoid a crash on native Windows. */
19485 #define WIN32_LEAN_AND_MEAN
19486 #include <windows.h>
19487 #include <winerror.h>
19489 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19491 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19493 case EXCEPTION_ACCESS_VIOLATION:
19494 case EXCEPTION_IN_PAGE_ERROR:
19495 case EXCEPTION_STACK_OVERFLOW:
19496 case EXCEPTION_GUARD_PAGE:
19497 case EXCEPTION_PRIV_INSTRUCTION:
19498 case EXCEPTION_ILLEGAL_INSTRUCTION:
19499 case EXCEPTION_DATATYPE_MISALIGNMENT:
19500 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19501 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19504 return EXCEPTION_CONTINUE_SEARCH;
19507 nocrash_init (void)
19509 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19512 /* Avoid a crash on POSIX systems. */
19513 #include <signal.h>
19514 /* A POSIX signal handler. */
19516 exception_handler (int sig)
19521 nocrash_init (void)
19524 signal (SIGSEGV, exception_handler);
19527 signal (SIGBUS, exception_handler);
19533 #include <sys/types.h>
19534 #include <sys/time.h>
19535 #include <sys/resource.h>
19539 struct rlimit limit;
19542 /* Some printf implementations allocate temporary space with malloc. */
19543 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
19545 if (getrlimit (RLIMIT_DATA, &limit) < 0)
19547 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
19548 limit.rlim_max = 5000000;
19549 limit.rlim_cur = limit.rlim_max;
19550 if (setrlimit (RLIMIT_DATA, &limit) < 0)
19553 /* On Linux systems, malloc() is limited by RLIMIT_AS. */
19555 if (getrlimit (RLIMIT_AS, &limit) < 0)
19557 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
19558 limit.rlim_max = 5000000;
19559 limit.rlim_cur = limit.rlim_max;
19560 if (setrlimit (RLIMIT_AS, &limit) < 0)
19563 /* Some printf implementations allocate temporary space on the stack. */
19564 #ifdef RLIMIT_STACK
19565 if (getrlimit (RLIMIT_STACK, &limit) < 0)
19567 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
19568 limit.rlim_max = 5000000;
19569 limit.rlim_cur = limit.rlim_max;
19570 if (setrlimit (RLIMIT_STACK, &limit) < 0)
19573 ret = printf ("%.5000000f", 1.0);
19574 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
19578 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19579 (eval $ac_link) 2>&5
19581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19582 test $ac_status = 0; } && test -s conftest$ac_exeext; then
19585 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
19586 if test $result != 0 && test $result != 77; then result=1; fi
19588 ) >/dev/null 2>/dev/null
19590 0) gl_cv_func_printf_enomem="yes" ;;
19591 77) gl_cv_func_printf_enomem="guessing no" ;;
19592 *) gl_cv_func_printf_enomem="no" ;;
19595 gl_cv_func_printf_enomem="guessing no"
19599 gl_cv_func_printf_enomem="guessing no"
19602 if test "$gl_cv_func_printf_enomem" = "guessing no"; then
19604 # Guess yes on glibc systems.
19605 *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
19606 # Guess yes on Solaris.
19607 solaris*) gl_cv_func_printf_enomem="guessing yes";;
19608 # Guess yes on AIX.
19609 aix*) gl_cv_func_printf_enomem="guessing yes";;
19610 # Guess yes on HP-UX/hppa.
19611 hpux*) case "$host_cpu" in
19612 hppa*) gl_cv_func_printf_enomem="guessing yes";;
19613 *) gl_cv_func_printf_enomem="guessing no";;
19616 # Guess yes on IRIX.
19617 irix*) gl_cv_func_printf_enomem="guessing yes";;
19618 # Guess yes on OSF/1.
19619 osf*) gl_cv_func_printf_enomem="guessing yes";;
19620 # Guess yes on BeOS.
19621 beos*) gl_cv_func_printf_enomem="guessing yes";;
19622 # Guess yes on Haiku.
19623 haiku*) gl_cv_func_printf_enomem="guessing yes";;
19624 # If we don't know, assume the worst.
19625 *) gl_cv_func_printf_enomem="guessing no";;
19630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
19631 $as_echo "$gl_cv_func_printf_enomem" >&6; }
19635 case "$gl_cv_func_printf_long_double" in
19640 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19652 GNULIB_TOWCTRANS=0;
19656 REPLACE_ISWBLANK=0;
19663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use C++" >&5
19664 $as_echo_n "checking whether to use C++... " >&6; }
19665 # Check whether --enable-c++ was given.
19666 if test "${enable_c__+set}" = set; then :
19667 enableval=$enable_c__; CXX_CHOICE="$enableval"
19672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_CHOICE" >&5
19673 $as_echo "$CXX_CHOICE" >&6; }
19679 GNULIB_REWINDDIR=0;
19682 GNULIB_FDOPENDIR=0;
19684 GNULIB_ALPHASORT=0;
19690 HAVE_DECL_FDOPENDIR=1;
19695 REPLACE_CLOSEDIR=0;
19697 REPLACE_FDOPENDIR=0;
19704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
19705 $as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
19706 if ${gl_cv_func_ungetc_works+:} false; then :
19707 $as_echo_n "(cached) " >&6
19709 if test "$cross_compiling" = yes; then :
19711 # Guess yes on glibc systems.
19712 *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
19713 # If we don't know, assume the worst.
19714 *) gl_cv_func_ungetc_works="guessing no" ;;
19718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19719 /* end confdefs.h. */
19727 if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
19728 if (fputs ("abc", f) < 0) return 2;
19730 if (fgetc (f) != 'a') return 3;
19731 if (fgetc (f) != 'b') return 4;
19732 if (ungetc ('d', f) != 'd') return 5;
19733 if (ftell (f) != 1) return 6;
19734 if (fgetc (f) != 'd') return 7;
19735 if (ftell (f) != 2) return 8;
19736 if (fseek (f, 0, SEEK_CUR) != 0) return 9;
19737 if (ftell (f) != 2) return 10;
19738 if (fgetc (f) != 'c') return 11;
19739 fclose (f); remove ("conftest.tmp");
19744 if ac_fn_c_try_run "$LINENO"; then :
19745 gl_cv_func_ungetc_works=yes
19747 gl_cv_func_ungetc_works=no
19749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19750 conftest.$ac_objext conftest.beam conftest.$ac_ext
19755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
19756 $as_echo "$gl_cv_func_ungetc_works" >&6; }
19757 case "$gl_cv_func_ungetc_works" in
19761 $as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
19768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
19769 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
19770 if ${gl_cv_func_getcwd_null+:} false; then :
19771 $as_echo_n "(cached) " >&6
19773 if test "$cross_compiling" = yes; then :
19775 # Guess yes on glibc systems.
19776 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
19777 # Guess yes on Cygwin.
19778 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
19779 # If we don't know, assume the worst.
19780 *) gl_cv_func_getcwd_null="guessing no";;
19784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19785 /* end confdefs.h. */
19788 # include <unistd.h>
19789 # else /* on Windows with MSVC */
19790 # include <direct.h>
19800 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19801 /* mingw cwd does not start with '/', but getcwd does allocate.
19802 However, mingw fails to honor non-zero size. */
19804 if (chdir ("/") != 0)
19808 char *f = getcwd (NULL, 0);
19823 if ac_fn_c_try_run "$LINENO"; then :
19824 gl_cv_func_getcwd_null=yes
19826 gl_cv_func_getcwd_null=no
19828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19829 conftest.$ac_objext conftest.beam conftest.$ac_ext
19833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
19834 $as_echo "$gl_cv_func_getcwd_null" >&6; }
19837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
19838 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
19839 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
19840 $as_echo_n "(cached) " >&6
19842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19843 /* end confdefs.h. */
19844 #include <unistd.h>
19852 char *getcwd (char *, size_t);
19859 if ac_fn_c_try_compile "$LINENO"; then :
19860 gl_cv_func_getcwd_posix_signature=yes
19862 gl_cv_func_getcwd_posix_signature=no
19864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
19868 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
19875 GNULIB_STRTOIMAX=0;
19876 GNULIB_STRTOUMAX=0;
19877 HAVE_DECL_IMAXABS=1;
19878 HAVE_DECL_IMAXDIV=1;
19879 HAVE_DECL_STRTOIMAX=1;
19880 HAVE_DECL_STRTOUMAX=1;
19881 REPLACE_STRTOIMAX=0;
19882 INT32_MAX_LT_INTMAX_MAX=1;
19883 INT64_MAX_EQ_LONG_MAX='defined _LP64';
19884 PRI_MACROS_BROKEN=0;
19885 PRIPTR_PREFIX=__PRIPTR_PREFIX;
19886 UINT32_MAX_LT_UINTMAX_MAX=1;
19887 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
19903 if test $gl_cv_have_include_next = yes; then
19904 gl_cv_next_inttypes_h='<'inttypes.h'>'
19906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19907 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19908 if ${gl_cv_next_inttypes_h+:} false; then :
19909 $as_echo_n "(cached) " >&6
19912 if test $ac_cv_header_inttypes_h = yes; then
19915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19916 /* end confdefs.h. */
19917 #include <inttypes.h>
19921 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19922 *) gl_absname_cpp="$ac_cpp" ;;
19927 gl_dirsep_regex='[/\\]'
19930 gl_dirsep_regex='\/'
19933 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19935 gl_header_literal_regex=`echo 'inttypes.h' \
19936 | sed -e "$gl_make_literal_regex_sed"`
19937 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19938 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19943 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19944 sed -n "$gl_absolute_header_sed"`'"'
19946 gl_cv_next_inttypes_h='<'inttypes.h'>'
19951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19952 $as_echo "$gl_cv_next_inttypes_h" >&6; }
19954 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
19956 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19957 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19958 gl_next_as_first_directive='<'inttypes.h'>'
19960 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19961 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19963 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
19974 for ac_header in inttypes.h
19976 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
19977 if test "x$ac_cv_header_inttypes_h" = xyes; then :
19978 cat >>confdefs.h <<_ACEOF
19979 #define HAVE_INTTYPES_H 1
19986 if test $ac_cv_header_inttypes_h = yes; then
19987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
19988 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
19989 if ${gt_cv_inttypes_pri_broken+:} false; then :
19990 $as_echo_n "(cached) " >&6
19993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19994 /* end confdefs.h. */
19996 #include <inttypes.h>
20009 if ac_fn_c_try_compile "$LINENO"; then :
20010 gt_cv_inttypes_pri_broken=no
20012 gt_cv_inttypes_pri_broken=yes
20014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
20018 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
20020 if test "$gt_cv_inttypes_pri_broken" = yes; then
20022 cat >>confdefs.h <<_ACEOF
20023 #define PRI_MACROS_BROKEN 1
20026 PRI_MACROS_BROKEN=1
20028 PRI_MACROS_BROKEN=0
20035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
20036 $as_echo_n "checking for LC_MESSAGES... " >&6; }
20037 if ${gt_cv_val_LC_MESSAGES+:} false; then :
20038 $as_echo_n "(cached) " >&6
20040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20041 /* end confdefs.h. */
20042 #include <locale.h>
20051 if ac_fn_c_try_link "$LINENO"; then :
20052 gt_cv_val_LC_MESSAGES=yes
20054 gt_cv_val_LC_MESSAGES=no
20056 rm -f core conftest.err conftest.$ac_objext \
20057 conftest$ac_exeext conftest.$ac_ext
20059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
20060 $as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
20061 if test $gt_cv_val_LC_MESSAGES = yes; then
20063 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
20068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
20069 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
20070 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
20071 $as_echo_n "(cached) " >&6
20073 gt_save_LIBS="$LIBS"
20074 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
20075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20076 /* end confdefs.h. */
20077 #include <CoreFoundation/CFPreferences.h>
20081 CFPreferencesCopyAppValue(NULL, NULL)
20086 if ac_fn_c_try_link "$LINENO"; then :
20087 gt_cv_func_CFPreferencesCopyAppValue=yes
20089 gt_cv_func_CFPreferencesCopyAppValue=no
20091 rm -f core conftest.err conftest.$ac_objext \
20092 conftest$ac_exeext conftest.$ac_ext
20093 LIBS="$gt_save_LIBS"
20095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
20096 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
20097 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
20099 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
20102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
20103 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
20104 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
20105 $as_echo_n "(cached) " >&6
20107 gt_save_LIBS="$LIBS"
20108 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
20109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20110 /* end confdefs.h. */
20111 #include <CoreFoundation/CFLocale.h>
20115 CFLocaleCopyCurrent();
20120 if ac_fn_c_try_link "$LINENO"; then :
20121 gt_cv_func_CFLocaleCopyCurrent=yes
20123 gt_cv_func_CFLocaleCopyCurrent=no
20125 rm -f core conftest.err conftest.$ac_objext \
20126 conftest$ac_exeext conftest.$ac_ext
20127 LIBS="$gt_save_LIBS"
20129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
20130 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
20131 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
20133 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
20137 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
20138 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
20142 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
20143 if test "x$ac_cv_have_decl_setenv" = xyes; then :
20149 cat >>confdefs.h <<_ACEOF
20150 #define HAVE_DECL_SETENV $ac_have_decl
20158 if test $ac_cv_have_decl_setenv = no; then
20166 for ac_header in search.h
20168 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
20169 if test "x$ac_cv_header_search_h" = xyes; then :
20170 cat >>confdefs.h <<_ACEOF
20171 #define HAVE_SEARCH_H 1
20178 for ac_func in tsearch
20180 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
20181 if test "x$ac_cv_func_tsearch" = xyes; then :
20182 cat >>confdefs.h <<_ACEOF
20183 #define HAVE_TSEARCH 1
20195 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
20196 if test "x$ac_cv_have_decl_strdup" = xyes; then :
20202 cat >>confdefs.h <<_ACEOF
20203 #define HAVE_DECL_STRDUP $ac_have_decl
20206 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
20207 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
20213 cat >>confdefs.h <<_ACEOF
20214 #define HAVE_DECL_UNSETENV $ac_have_decl
20221 GL_COND_LIBTOOL_TRUE=
20222 GL_COND_LIBTOOL_FALSE='#'
20224 GL_COND_LIBTOOL_TRUE='#'
20225 GL_COND_LIBTOOL_FALSE=
20228 gl_cond_libtool=false
20241 gl_source_base='lib'
20244 if test $ac_cv_func_alloca_works = no; then
20248 # Define an additional variable used in the Makefile substitution.
20249 if test $ac_cv_working_alloca_h = yes; then
20250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20251 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20252 if ${gl_cv_rpl_alloca+:} false; then :
20253 $as_echo_n "(cached) " >&6
20256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20257 /* end confdefs.h. */
20259 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
20264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20265 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20266 gl_cv_rpl_alloca=yes
20268 gl_cv_rpl_alloca=no
20274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20275 $as_echo "$gl_cv_rpl_alloca" >&6; }
20276 if test $gl_cv_rpl_alloca = yes; then
20278 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20288 if test -n "$ALLOCA_H"; then
20289 GL_GENERATE_ALLOCA_H_TRUE=
20290 GL_GENERATE_ALLOCA_H_FALSE='#'
20292 GL_GENERATE_ALLOCA_H_TRUE='#'
20293 GL_GENERATE_ALLOCA_H_FALSE=
20298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
20299 $as_echo_n "checking whether to enable assertions... " >&6; }
20300 # Check whether --enable-assert was given.
20301 if test "${enable_assert+set}" = set; then :
20302 enableval=$enable_assert; if test "x$enableval" = xno; then :
20304 $as_echo "#define NDEBUG 1" >>confdefs.h
20306 elif test "x$enableval" != xyes; then :
20307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
20308 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
20315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
20316 $as_echo "$enable_assert" >&6; }
20324 if test $ac_cv_func_btowc = no; then
20331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
20332 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
20333 if ${gl_cv_func_btowc_nul+:} false; then :
20334 $as_echo_n "(cached) " >&6
20337 if test "$cross_compiling" = yes; then :
20340 # Guess no on Cygwin.
20341 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
20342 # Guess yes otherwise.
20343 *) gl_cv_func_btowc_nul="guessing yes" ;;
20347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20348 /* end confdefs.h. */
20350 #include <string.h>
20351 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20353 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20354 included before <wchar.h>. */
20355 #include <stddef.h>
20361 if (btowc ('\0') != 0)
20366 if ac_fn_c_try_run "$LINENO"; then :
20367 gl_cv_func_btowc_nul=yes
20369 gl_cv_func_btowc_nul=no
20371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20372 conftest.$ac_objext conftest.beam conftest.$ac_ext
20377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
20378 $as_echo "$gl_cv_func_btowc_nul" >&6; }
20380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
20381 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
20382 if ${gl_cv_func_btowc_eof+:} false; then :
20383 $as_echo_n "(cached) " >&6
20387 # Guess no on IRIX.
20388 irix*) gl_cv_func_btowc_eof="guessing no" ;;
20389 # Guess yes otherwise.
20390 *) gl_cv_func_btowc_eof="guessing yes" ;;
20392 if test $LOCALE_FR != none; then
20393 if test "$cross_compiling" = yes; then :
20396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20397 /* end confdefs.h. */
20399 #include <locale.h>
20400 #include <string.h>
20401 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20403 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20404 included before <wchar.h>. */
20405 #include <stddef.h>
20411 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
20413 if (btowc (EOF) != WEOF)
20419 if ac_fn_c_try_run "$LINENO"; then :
20420 gl_cv_func_btowc_eof=yes
20422 gl_cv_func_btowc_eof=no
20424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20425 conftest.$ac_objext conftest.beam conftest.$ac_ext
20431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
20432 $as_echo "$gl_cv_func_btowc_eof" >&6; }
20434 case "$gl_cv_func_btowc_nul" in
20436 *) REPLACE_BTOWC=1 ;;
20438 case "$gl_cv_func_btowc_eof" in
20440 *) REPLACE_BTOWC=1 ;;
20444 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
20453 M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
20470 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
20478 # for STACK_DIRECTION
20482 ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
20484 if test "x$ac_cv_have_decl_sigaltstack" = xyes; then :
20490 cat >>confdefs.h <<_ACEOF
20491 #define HAVE_DECL_SIGALTSTACK $ac_have_decl
20497 ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
20499 if test "x$ac_cv_type_stack_t" = xyes; then :
20501 cat >>confdefs.h <<_ACEOF
20502 #define HAVE_STACK_T 1
20509 if test "$gl_cv_lib_sigsegv" = yes \
20510 && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
20511 LIBCSTACK=$LIBSIGSEGV
20513 LTLIBCSTACK=$LTLIBSIGSEGV
20521 if test $ac_cv_func_canonicalize_file_name = no; then
20522 HAVE_CANONICALIZE_FILE_NAME=0
20523 if test $ac_cv_func_realpath = no; then
20526 case "$gl_cv_func_realpath_works" in
20528 *) REPLACE_REALPATH=1 ;;
20532 case "$gl_cv_func_realpath_works" in
20536 REPLACE_CANONICALIZE_FILE_NAME=1
20542 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
20551 M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
20556 cat >>confdefs.h <<_ACEOF
20557 #define GNULIB_CANONICALIZE_LGPL 1
20566 GNULIB_CANONICALIZE_FILE_NAME=1
20572 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
20587 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
20602 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
20607 $as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
20611 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
20617 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20625 if test $ac_cv_header_sys_socket_h != yes; then
20626 for ac_header in winsock2.h
20628 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20629 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20630 cat >>confdefs.h <<_ACEOF
20631 #define HAVE_WINSOCK2_H 1
20639 if test "$ac_cv_header_winsock2_h" = yes; then
20641 UNISTD_H_HAVE_WINSOCK2_H=1
20642 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20648 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
20654 if test $REPLACE_CLOSE = 1; then
20663 M4_LIBOBJS="$M4_LIBOBJS close.$ac_objext"
20677 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
20686 cat >>confdefs.h <<_ACEOF
20687 #define GNULIB_CLOSE_STREAM 1
20699 if test "x$datarootdir" = x; then
20700 datarootdir='${datadir}'
20703 if test "x$docdir" = x; then
20704 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
20707 if test "x$htmldir" = x; then
20708 htmldir='${docdir}'
20711 if test "x$dvidir" = x; then
20715 if test "x$pdfdir" = x; then
20719 if test "x$psdir" = x; then
20723 if test "x$lispdir" = x; then
20724 lispdir='${datarootdir}/emacs/site-lisp'
20727 if test "x$localedir" = x; then
20728 localedir='${datarootdir}/locale'
20732 pkglibexecdir='${libexecdir}/${PACKAGE}'
20740 cat >>confdefs.h <<_ACEOF
20741 #define GNULIB_DIRNAME 1
20751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
20752 $as_echo_n "checking whether // is distinct from /... " >&6; }
20753 if ${gl_cv_double_slash_root+:} false; then :
20754 $as_echo_n "(cached) " >&6
20756 if test x"$cross_compiling" = xyes ; then
20757 # When cross-compiling, there is no way to tell whether // is special
20758 # short of a list of hosts. However, the only known hosts to date
20759 # that have a distinct // are Apollo DomainOS (too old to port to),
20760 # Cygwin, and z/OS. If anyone knows of another system for which // has
20761 # special semantics and is distinct from /, please report it to
20762 # <bug-gnulib@gnu.org>.
20764 *-cygwin | i370-ibm-openedition)
20765 gl_cv_double_slash_root=yes ;;
20767 # Be optimistic and assume that / and // are the same when we
20769 gl_cv_double_slash_root='unknown, assuming no' ;;
20772 set x `ls -di / // 2>/dev/null`
20773 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
20774 gl_cv_double_slash_root=no
20776 gl_cv_double_slash_root=yes
20780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
20781 $as_echo "$gl_cv_double_slash_root" >&6; }
20782 if test "$gl_cv_double_slash_root" = yes; then
20784 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
20793 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
20796 if test $HAVE_DUP2 = 1; then
20797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20798 $as_echo_n "checking whether dup2 works... " >&6; }
20799 if ${gl_cv_func_dup2_works+:} false; then :
20800 $as_echo_n "(cached) " >&6
20802 if test "$cross_compiling" = yes; then :
20804 mingw*) # on this platform, dup2 always returns 0 for success
20805 gl_cv_func_dup2_works="guessing no" ;;
20806 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20807 gl_cv_func_dup2_works="guessing no" ;;
20808 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20809 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20810 gl_cv_func_dup2_works="guessing no" ;;
20811 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20812 gl_cv_func_dup2_works="guessing no" ;;
20813 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20814 gl_cv_func_dup2_works="guessing no" ;;
20815 *) gl_cv_func_dup2_works="guessing yes" ;;
20818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20819 /* end confdefs.h. */
20821 #include <unistd.h>
20829 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20832 if (dup2 (1, 1) == 0)
20835 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20839 if (dup2 (0, 0) != -1)
20841 /* Many gnulib modules require POSIX conformance of EBADF. */
20842 if (dup2 (2, 1000000) == -1 && errno != EBADF)
20844 /* Flush out a cygwin core dump. */
20845 if (dup2 (2, -1) != -1 || errno != EBADF)
20854 if ac_fn_c_try_run "$LINENO"; then :
20855 gl_cv_func_dup2_works=yes
20857 gl_cv_func_dup2_works=no
20859 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20860 conftest.$ac_objext conftest.beam conftest.$ac_ext
20865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20866 $as_echo "$gl_cv_func_dup2_works" >&6; }
20867 case "$gl_cv_func_dup2_works" in
20876 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
20885 M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
20900 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
20916 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
20922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
20923 $as_echo_n "checking for error_at_line... " >&6; }
20924 if ${ac_cv_lib_error_at_line+:} false; then :
20925 $as_echo_n "(cached) " >&6
20927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20928 /* end confdefs.h. */
20933 error_at_line (0, 0, "", 0, "an error occurred");
20938 if ac_fn_c_try_link "$LINENO"; then :
20939 ac_cv_lib_error_at_line=yes
20941 ac_cv_lib_error_at_line=no
20943 rm -f core conftest.err conftest.$ac_objext \
20944 conftest$ac_exeext conftest.$ac_ext
20946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
20947 $as_echo "$ac_cv_lib_error_at_line" >&6; }
20949 if test $ac_cv_lib_error_at_line = no; then
20958 M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
20980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20981 $as_echo_n "checking whether fflush works on input streams... " >&6; }
20982 if ${gl_cv_func_fflush_stdin+:} false; then :
20983 $as_echo_n "(cached) " >&6
20985 echo hello world > conftest.txt
20986 if test "$cross_compiling" = yes; then :
20987 gl_cv_func_fflush_stdin=cross
20989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20990 /* end confdefs.h. */
20994 # include <unistd.h>
20995 #else /* on Windows with MSVC */
21002 FILE *f = fopen ("conftest.txt", "r");
21009 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21011 /* For deterministic results, ensure f read a bigger buffer. */
21012 if (lseek (fd, 0, SEEK_CUR) == 5)
21014 /* POSIX requires fflush-fseek to set file offset of fd. This fails
21015 on BSD systems and on mingw. */
21016 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21018 if (lseek (fd, 0, SEEK_CUR) != 5)
21020 /* Verify behaviour of fflush after ungetc. See
21021 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
21022 /* Verify behaviour of fflush after a backup ungetc. This fails on
21027 if (fgetc (f) != c)
21029 /* Verify behaviour of fflush after a non-backup ungetc. This fails
21030 on glibc 2.8 and on BSD systems. */
21034 if (fgetc (f) != c)
21042 if ac_fn_c_try_run "$LINENO"; then :
21043 gl_cv_func_fflush_stdin=yes
21045 gl_cv_func_fflush_stdin=no
21047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21048 conftest.$ac_objext conftest.beam conftest.$ac_ext
21054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21055 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
21056 case $gl_cv_func_fflush_stdin in
21057 yes) gl_func_fflush_stdin=1 ;;
21058 no) gl_func_fflush_stdin=0 ;;
21059 *) gl_func_fflush_stdin='(-1)' ;;
21062 cat >>confdefs.h <<_ACEOF
21063 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
21067 if test $gl_cv_func_fflush_stdin != yes; then
21072 if test $REPLACE_CLOSE = 1; then
21076 if test $REPLACE_FCLOSE = 1; then
21085 M4_LIBOBJS="$M4_LIBOBJS fclose.$ac_objext"
21099 $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
21108 if test $ac_cv_func_fcntl = no; then
21112 if test $ac_cv_func_fcntl = no; then
21119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
21120 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
21121 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
21122 $as_echo_n "(cached) " >&6
21124 if test "$cross_compiling" = yes; then :
21125 # Guess that it works on glibc systems
21126 case $host_os in #((
21127 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
21128 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
21131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21132 /* end confdefs.h. */
21141 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
21142 if (errno != EINVAL) result |= 2;
21149 if ac_fn_c_try_run "$LINENO"; then :
21150 gl_cv_func_fcntl_f_dupfd_works=yes
21152 gl_cv_func_fcntl_f_dupfd_works=no
21154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21155 conftest.$ac_objext conftest.beam conftest.$ac_ext
21159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
21160 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
21161 case $gl_cv_func_fcntl_f_dupfd_works in
21166 if test $ac_cv_func_fcntl = no; then
21173 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
21177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
21178 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
21179 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
21180 $as_echo_n "(cached) " >&6
21182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21183 /* end confdefs.h. */
21186 #ifndef F_DUPFD_CLOEXEC
21198 if ac_fn_c_try_compile "$LINENO"; then :
21199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21200 /* end confdefs.h. */
21203 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
21204 it to support the semantics on older kernels that failed with EINVAL. */
21216 if ac_fn_c_try_compile "$LINENO"; then :
21217 gl_cv_func_fcntl_f_dupfd_cloexec=yes
21219 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
21221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21223 gl_cv_func_fcntl_f_dupfd_cloexec=no
21225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
21228 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
21229 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
21233 if test $ac_cv_func_fcntl = no; then
21243 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
21252 M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
21266 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
21281 if test $gl_cv_have_include_next = yes; then
21282 gl_cv_next_fcntl_h='<'fcntl.h'>'
21284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21285 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21286 if ${gl_cv_next_fcntl_h+:} false; then :
21287 $as_echo_n "(cached) " >&6
21290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21291 /* end confdefs.h. */
21296 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21297 *) gl_absname_cpp="$ac_cpp" ;;
21302 gl_dirsep_regex='[/\\]'
21305 gl_dirsep_regex='\/'
21308 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21310 gl_header_literal_regex=`echo 'fcntl.h' \
21311 | sed -e "$gl_make_literal_regex_sed"`
21312 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21313 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21318 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21319 sed -n "$gl_absolute_header_sed"`'"'
21323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21324 $as_echo "$gl_cv_next_fcntl_h" >&6; }
21326 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21328 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21329 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21330 gl_next_as_first_directive='<'fcntl.h'>'
21332 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21333 gl_next_as_first_directive=$gl_cv_next_fcntl_h
21335 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21349 cat >>confdefs.h <<_ACEOF
21350 #define GNULIB_FD_SAFER_FLAG 1
21358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
21359 $as_echo_n "checking whether fflush works on input streams... " >&6; }
21360 if ${gl_cv_func_fflush_stdin+:} false; then :
21361 $as_echo_n "(cached) " >&6
21363 echo hello world > conftest.txt
21364 if test "$cross_compiling" = yes; then :
21365 gl_cv_func_fflush_stdin=cross
21367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21368 /* end confdefs.h. */
21372 # include <unistd.h>
21373 #else /* on Windows with MSVC */
21380 FILE *f = fopen ("conftest.txt", "r");
21387 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21389 /* For deterministic results, ensure f read a bigger buffer. */
21390 if (lseek (fd, 0, SEEK_CUR) == 5)
21392 /* POSIX requires fflush-fseek to set file offset of fd. This fails
21393 on BSD systems and on mingw. */
21394 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21396 if (lseek (fd, 0, SEEK_CUR) != 5)
21398 /* Verify behaviour of fflush after ungetc. See
21399 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
21400 /* Verify behaviour of fflush after a backup ungetc. This fails on
21405 if (fgetc (f) != c)
21407 /* Verify behaviour of fflush after a non-backup ungetc. This fails
21408 on glibc 2.8 and on BSD systems. */
21412 if (fgetc (f) != c)
21420 if ac_fn_c_try_run "$LINENO"; then :
21421 gl_cv_func_fflush_stdin=yes
21423 gl_cv_func_fflush_stdin=no
21425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21426 conftest.$ac_objext conftest.beam conftest.$ac_ext
21432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21433 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
21434 case $gl_cv_func_fflush_stdin in
21435 yes) gl_func_fflush_stdin=1 ;;
21436 no) gl_func_fflush_stdin=0 ;;
21437 *) gl_func_fflush_stdin='(-1)' ;;
21440 cat >>confdefs.h <<_ACEOF
21441 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
21445 if test $gl_cv_func_fflush_stdin != yes; then
21449 if test $REPLACE_FFLUSH = 1; then
21458 M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
21464 cat >>confdefs.h <<_ACEOF
21465 #define GNULIB_FFLUSH 1
21480 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
21489 cat >>confdefs.h <<_ACEOF
21490 #define GNULIB_FILENAMECAT 1
21501 REPLACE_FLOAT_LDBL=0
21503 aix* | beos* | openbsd* | mirbsd* | irix*)
21507 case "$host_cpu" in
21512 # On x86_64 systems, the C compiler may still be generating
21514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21515 /* end confdefs.h. */
21516 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
21520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21521 $EGREP "yes" >/dev/null 2>&1; then :
21532 case "$host_cpu" in
21540 aix* | freebsd* | linux*)
21541 if test -n "$FLOAT_H"; then
21542 REPLACE_FLOAT_LDBL=1
21548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
21549 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
21550 if ${gl_cv_func_itold_works+:} false; then :
21551 $as_echo_n "(cached) " >&6
21554 if test "$cross_compiling" = yes; then :
21557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21558 /* end confdefs.h. */
21559 #if defined __LP64__ || defined __arch64__
21563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21564 $EGREP "yes" >/dev/null 2>&1; then :
21565 gl_cv_func_itold_works="guessing no"
21567 gl_cv_func_itold_works="guessing yes"
21572 *) gl_cv_func_itold_works="guessing yes" ;;
21576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21577 /* end confdefs.h. */
21580 volatile long double ld;
21589 if ac_fn_c_try_run "$LINENO"; then :
21590 gl_cv_func_itold_works=yes
21592 gl_cv_func_itold_works=no
21594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21595 conftest.$ac_objext conftest.beam conftest.$ac_ext
21600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
21601 $as_echo "$gl_cv_func_itold_works" >&6; }
21602 case "$gl_cv_func_itold_works" in
21609 if test -n "$FLOAT_H"; then
21618 if test $gl_cv_have_include_next = yes; then
21619 gl_cv_next_float_h='<'float.h'>'
21621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
21622 $as_echo_n "checking absolute name of <float.h>... " >&6; }
21623 if ${gl_cv_next_float_h+:} false; then :
21624 $as_echo_n "(cached) " >&6
21627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21628 /* end confdefs.h. */
21633 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21634 *) gl_absname_cpp="$ac_cpp" ;;
21639 gl_dirsep_regex='[/\\]'
21642 gl_dirsep_regex='\/'
21645 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21647 gl_header_literal_regex=`echo 'float.h' \
21648 | sed -e "$gl_make_literal_regex_sed"`
21649 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21650 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21655 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21656 sed -n "$gl_absolute_header_sed"`'"'
21660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
21661 $as_echo "$gl_cv_next_float_h" >&6; }
21663 NEXT_FLOAT_H=$gl_cv_next_float_h
21665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21667 gl_next_as_first_directive='<'float.h'>'
21669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21670 gl_next_as_first_directive=$gl_cv_next_float_h
21672 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
21679 if test -n "$FLOAT_H"; then
21680 GL_GENERATE_FLOAT_H_TRUE=
21681 GL_GENERATE_FLOAT_H_FALSE='#'
21683 GL_GENERATE_FLOAT_H_TRUE='#'
21684 GL_GENERATE_FLOAT_H_FALSE=
21689 if test $REPLACE_FLOAT_LDBL = 1; then
21698 M4_LIBOBJS="$M4_LIBOBJS float.$ac_objext"
21701 if test $REPLACE_ITOLD = 1; then
21710 M4_LIBOBJS="$M4_LIBOBJS itold.$ac_objext"
21719 gl_cv_func_fopen_slash="guessing no"
21722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
21723 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
21724 if ${gl_cv_func_fopen_slash+:} false; then :
21725 $as_echo_n "(cached) " >&6
21728 if test "$cross_compiling" = yes; then :
21731 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
21732 gl_cv_func_fopen_slash="guessing no" ;;
21734 gl_cv_func_fopen_slash="guessing yes" ;;
21738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21739 /* end confdefs.h. */
21741 #include <stddef.h>
21745 return fopen ("conftest.sl/", "w") != NULL;
21748 if ac_fn_c_try_run "$LINENO"; then :
21749 gl_cv_func_fopen_slash=yes
21751 gl_cv_func_fopen_slash=no
21753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21754 conftest.$ac_objext conftest.beam conftest.$ac_ext
21760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
21761 $as_echo "$gl_cv_func_fopen_slash" >&6; }
21764 case "$gl_cv_func_fopen_slash" in
21767 $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
21773 if test $REPLACE_FOPEN = 1; then
21782 M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
21797 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
21803 cat >>confdefs.h <<_ACEOF
21804 #define GNULIB_FOPEN_SAFER 1
21810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
21811 $as_echo_n "checking for __fpending... " >&6; }
21812 if ${gl_cv_func___fpending+:} false; then :
21813 $as_echo_n "(cached) " >&6
21816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21817 /* end confdefs.h. */
21819 #if HAVE_STDIO_EXT_H
21820 # include <stdio_ext.h>
21826 return ! __fpending (stdin);
21831 if ac_fn_c_try_link "$LINENO"; then :
21832 gl_cv_func___fpending=yes
21834 gl_cv_func___fpending=no
21836 rm -f core conftest.err conftest.$ac_objext \
21837 conftest$ac_exeext conftest.$ac_ext
21840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
21841 $as_echo "$gl_cv_func___fpending" >&6; }
21843 if test $gl_cv_func___fpending = no; then
21852 M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
21855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
21856 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
21857 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
21858 $as_echo_n "(cached) " >&6
21864 'fp->_IO_write_ptr - fp->_IO_write_base' \
21866 '# traditional Unix' \
21867 'fp->_ptr - fp->_base' \
21870 'fp->_p - fp->_bf._base' \
21872 '# SCO, Unixware' \
21873 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
21876 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
21879 'fp->__bufp - fp->__buffer' \
21881 '# old glibc iostream?' \
21882 'fp->_pptr - fp->_pbase' \
21885 'fp->_ptr - fp->_buffer' \
21888 'fp->_ptr - fp->_buf' \
21891 'fp->wp - fp->buf' \
21894 '(*fp)->_ptr - (*fp)->_base' \
21896 '# e.g., DGUX R4.11; the info is not available' \
21900 # Skip each embedded comment.
21901 case "$ac_expr" in '#'*) continue;; esac
21903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21904 /* end confdefs.h. */
21909 FILE *fp = stdin; (void) ($ac_expr);
21914 if ac_fn_c_try_compile "$LINENO"; then :
21918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21919 test "$fp_done" = yes && break
21922 ac_cv_sys_pending_output_n_bytes=$ac_expr
21926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
21927 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
21929 cat >>confdefs.h <<_ACEOF
21930 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
21939 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
21941 if test "x$ac_cv_have_decl_fpurge" = xyes; then :
21947 cat >>confdefs.h <<_ACEOF
21948 #define HAVE_DECL_FPURGE $ac_have_decl
21951 if test "x$ac_cv_func_fpurge" = xyes; then
21953 # Detect BSD bug. Only cygwin 1.7 is known to be immune.
21954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
21955 $as_echo_n "checking whether fpurge works... " >&6; }
21956 if ${gl_cv_func_fpurge_works+:} false; then :
21957 $as_echo_n "(cached) " >&6
21959 if test "$cross_compiling" = yes; then :
21960 gl_cv_func_fpurge_works='guessing no'
21962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963 /* end confdefs.h. */
21969 FILE *f = fopen ("conftest.txt", "w+");
21971 if (fputc ('a', f) != 'a') return 2;
21973 if (fgetc (f) != 'a') return 3;
21974 if (fgetc (f) != EOF) return 4;
21975 if (fpurge (f) != 0) return 5;
21976 if (putc ('b', f) != 'b') return 6;
21977 if (fclose (f) != 0) return 7;
21978 if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
21979 if (fgetc (f) != 'a') return 9;
21980 if (fgetc (f) != 'b') return 10;
21981 if (fgetc (f) != EOF) return 11;
21982 if (fclose (f) != 0) return 12;
21983 if (remove ("conftest.txt") != 0) return 13;
21989 if ac_fn_c_try_run "$LINENO"; then :
21990 gl_cv_func_fpurge_works=yes
21992 gl_cv_func_fpurge_works=no
21994 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21995 conftest.$ac_objext conftest.beam conftest.$ac_ext
21999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
22000 $as_echo "$gl_cv_func_fpurge_works" >&6; }
22001 if test "x$gl_cv_func_fpurge_works" != xyes; then
22007 if test "x$ac_cv_have_decl_fpurge" = xno; then
22011 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
22020 M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
22034 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
22041 if test $ac_cv_func___freadahead = no; then
22050 M4_LIBOBJS="$M4_LIBOBJS freadahead.$ac_objext"
22059 if test $gl_cv_func_frexp_no_libm = yes; then
22063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
22064 $as_echo_n "checking whether frexp works... " >&6; }
22065 if ${gl_cv_func_frexp_works+:} false; then :
22066 $as_echo_n "(cached) " >&6
22069 if test "$cross_compiling" = yes; then :
22071 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
22072 *) gl_cv_func_frexp_works="guessing yes";;
22076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22077 /* end confdefs.h. */
22081 #include <string.h>
22082 #if HAVE_DECL_ALARM
22083 # include <signal.h>
22084 # include <unistd.h>
22086 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
22087 ICC 10.0 has a bug when optimizing the expression -zero.
22088 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
22089 to PowerPC on Mac OS X 10.5. */
22090 #if defined __hpux || defined __sgi || defined __ICC
22092 compute_minus_zero (void)
22094 return -DBL_MIN * DBL_MIN;
22096 # define minus_zero compute_minus_zero ()
22098 double minus_zero = -0.0;
22106 #if HAVE_DECL_ALARM
22107 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
22108 number. Let the test fail in this case. */
22109 signal (SIGALRM, SIG_DFL);
22112 /* Test on denormalized numbers. */
22113 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
22118 double y = frexp (x, &exp);
22119 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
22120 On NetBSD: y = 0.75. Correct: y = 0.5. */
22124 /* Test on infinite numbers. */
22128 double y = frexp (x, &exp);
22132 /* Test on negative zero. */
22136 double y = frexp (x, &exp);
22137 if (memcmp (&y, &x, sizeof x))
22143 if ac_fn_c_try_run "$LINENO"; then :
22144 gl_cv_func_frexp_works=yes
22146 gl_cv_func_frexp_works=no
22148 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22149 conftest.$ac_objext conftest.beam conftest.$ac_ext
22154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
22155 $as_echo "$gl_cv_func_frexp_works" >&6; }
22157 case "$gl_cv_func_frexp_works" in
22158 *yes) gl_func_frexp_no_libm=yes ;;
22159 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
22162 gl_func_frexp_no_libm=no
22165 if test $gl_func_frexp_no_libm = yes; then
22167 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
22171 if test $gl_func_frexp_no_libm != yes; then
22180 M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
22194 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
22201 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
22203 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
22209 if test $HAVE_DECL_FREXPL = 1; then
22211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
22212 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
22213 if ${gl_cv_func_frexpl_no_libm+:} false; then :
22214 $as_echo_n "(cached) " >&6
22217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22218 /* end confdefs.h. */
22224 int e; return frexpl (x, &e) > 0;
22229 if ac_fn_c_try_link "$LINENO"; then :
22230 gl_cv_func_frexpl_no_libm=yes
22232 gl_cv_func_frexpl_no_libm=no
22234 rm -f core conftest.err conftest.$ac_objext \
22235 conftest$ac_exeext conftest.$ac_ext
22238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
22239 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
22241 if test $gl_cv_func_frexpl_no_libm = yes; then
22244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
22245 $as_echo_n "checking whether frexpl works... " >&6; }
22246 if ${gl_cv_func_frexpl_works+:} false; then :
22247 $as_echo_n "(cached) " >&6
22250 if test "$cross_compiling" = yes; then :
22253 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
22254 gl_cv_func_frexpl_works="guessing no";;
22255 *) gl_cv_func_frexpl_works="guessing yes";;
22259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22260 /* end confdefs.h. */
22264 /* Override the values of <float.h>, like done in float.in.h. */
22265 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
22266 # undef LDBL_MIN_EXP
22267 # define LDBL_MIN_EXP (-16381)
22269 #if defined __i386__ && defined __FreeBSD__
22270 # undef LDBL_MIN_EXP
22271 # define LDBL_MIN_EXP (-16381)
22273 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
22274 # undef LDBL_MIN_EXP
22275 # define LDBL_MIN_EXP DBL_MIN_EXP
22277 #if defined __sgi && (LDBL_MANT_DIG >= 106)
22278 # if defined __GNUC__
22279 # undef LDBL_MIN_EXP
22280 # define LDBL_MIN_EXP DBL_MIN_EXP
22287 long double frexpl (long double, int *);
22291 volatile long double x;
22292 /* Test on finite numbers that fails on AIX 5.1. */
22300 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
22301 function returns an invalid (incorrectly normalized) value: it returns
22302 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
22303 but the correct result is
22304 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
22308 long double y = frexpl (x, &exp);
22309 if (!(exp == 1 && y == 0.505L))
22312 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
22313 LDBL_MAX_EXP = 16384.
22314 In the loop end test, we test x against Infinity, rather than comparing
22315 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
22318 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
22329 /* Test on denormalized numbers. */
22332 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
22337 long double y = frexpl (x, &exp);
22338 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
22339 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
22340 if (exp != LDBL_MIN_EXP - 1)
22344 /* Test on infinite numbers. */
22348 long double y = frexpl (x, &exp);
22355 if ac_fn_c_try_run "$LINENO"; then :
22356 gl_cv_func_frexpl_works=yes
22358 gl_cv_func_frexpl_works=no
22360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22361 conftest.$ac_objext conftest.beam conftest.$ac_ext
22366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
22367 $as_echo "$gl_cv_func_frexpl_works" >&6; }
22369 case "$gl_cv_func_frexpl_works" in
22370 *yes) gl_func_frexpl_no_libm=yes ;;
22371 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
22374 gl_func_frexpl_no_libm=no
22377 if test $gl_func_frexpl_no_libm = yes; then
22379 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
22384 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
22393 M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
22407 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
22414 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
22418 if test $REPLACE_FSEEK = 1; then
22427 M4_LIBOBJS="$M4_LIBOBJS fseek.$ac_objext"
22441 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
22453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
22454 $as_echo_n "checking for fseeko... " >&6; }
22455 if ${gl_cv_func_fseeko+:} false; then :
22456 $as_echo_n "(cached) " >&6
22459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22460 /* end confdefs.h. */
22466 fseeko (stdin, 0, 0);
22471 if ac_fn_c_try_link "$LINENO"; then :
22472 gl_cv_func_fseeko=yes
22474 gl_cv_func_fseeko=no
22476 rm -f core conftest.err conftest.$ac_objext \
22477 conftest$ac_exeext conftest.$ac_ext
22480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
22481 $as_echo "$gl_cv_func_fseeko" >&6; }
22484 if test $ac_cv_have_decl_fseeko = no; then
22488 if test $gl_cv_func_fseeko = no; then
22491 if test $WINDOWS_64_BIT_OFF_T = 1; then
22494 if test $gl_cv_var_stdin_large_offset = no; then
22500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
22501 $as_echo_n "checking whether fflush works on input streams... " >&6; }
22502 if ${gl_cv_func_fflush_stdin+:} false; then :
22503 $as_echo_n "(cached) " >&6
22505 echo hello world > conftest.txt
22506 if test "$cross_compiling" = yes; then :
22507 gl_cv_func_fflush_stdin=cross
22509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22510 /* end confdefs.h. */
22514 # include <unistd.h>
22515 #else /* on Windows with MSVC */
22522 FILE *f = fopen ("conftest.txt", "r");
22529 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
22531 /* For deterministic results, ensure f read a bigger buffer. */
22532 if (lseek (fd, 0, SEEK_CUR) == 5)
22534 /* POSIX requires fflush-fseek to set file offset of fd. This fails
22535 on BSD systems and on mingw. */
22536 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
22538 if (lseek (fd, 0, SEEK_CUR) != 5)
22540 /* Verify behaviour of fflush after ungetc. See
22541 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
22542 /* Verify behaviour of fflush after a backup ungetc. This fails on
22547 if (fgetc (f) != c)
22549 /* Verify behaviour of fflush after a non-backup ungetc. This fails
22550 on glibc 2.8 and on BSD systems. */
22554 if (fgetc (f) != c)
22562 if ac_fn_c_try_run "$LINENO"; then :
22563 gl_cv_func_fflush_stdin=yes
22565 gl_cv_func_fflush_stdin=no
22567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22568 conftest.$ac_objext conftest.beam conftest.$ac_ext
22574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
22575 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
22576 case $gl_cv_func_fflush_stdin in
22577 yes) gl_func_fflush_stdin=1 ;;
22578 no) gl_func_fflush_stdin=0 ;;
22579 *) gl_func_fflush_stdin='(-1)' ;;
22582 cat >>confdefs.h <<_ACEOF
22583 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
22587 if test $gl_cv_func_fflush_stdin != yes; then
22593 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
22602 M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
22605 for ac_func in _fseeki64
22607 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
22608 if test "x$ac_cv_func__fseeki64" = xyes; then :
22609 cat >>confdefs.h <<_ACEOF
22610 #define HAVE__FSEEKI64 1
22629 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
22637 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
22642 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
22648 if test $REPLACE_FSTAT = 1; then
22657 M4_LIBOBJS="$M4_LIBOBJS fstat.$ac_objext"
22672 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
22679 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22683 if test $REPLACE_FTELL = 1; then
22692 M4_LIBOBJS="$M4_LIBOBJS ftell.$ac_objext"
22706 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
22719 if test $ac_cv_have_decl_ftello = no; then
22723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
22724 $as_echo_n "checking for ftello... " >&6; }
22725 if ${gl_cv_func_ftello+:} false; then :
22726 $as_echo_n "(cached) " >&6
22729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22730 /* end confdefs.h. */
22740 if ac_fn_c_try_link "$LINENO"; then :
22741 gl_cv_func_ftello=yes
22743 gl_cv_func_ftello=no
22745 rm -f core conftest.err conftest.$ac_objext \
22746 conftest$ac_exeext conftest.$ac_ext
22749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
22750 $as_echo "$gl_cv_func_ftello" >&6; }
22751 if test $gl_cv_func_ftello = no; then
22754 if test $WINDOWS_64_BIT_OFF_T = 1; then
22757 if test $gl_cv_var_stdin_large_offset = no; then
22760 if test $REPLACE_FTELLO = 0; then
22762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
22763 $as_echo_n "checking whether ftello works... " >&6; }
22764 if ${gl_cv_func_ftello_works+:} false; then :
22765 $as_echo_n "(cached) " >&6
22769 # Guess no on Solaris.
22770 solaris*) gl_cv_func_ftello_works="guessing no" ;;
22771 # Guess yes otherwise.
22772 *) gl_cv_func_ftello_works="guessing yes" ;;
22774 if test "$cross_compiling" = yes; then :
22777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22778 /* end confdefs.h. */
22781 #include <stdlib.h>
22782 #include <string.h>
22783 #define TESTFILE "conftest.tmp"
22789 /* Create a file with some contents. */
22790 fp = fopen (TESTFILE, "w");
22793 if (fwrite ("foogarsh", 1, 8, fp) < 8)
22798 /* The file's contents is now "foogarsh". */
22800 /* Try writing after reading to EOF. */
22801 fp = fopen (TESTFILE, "r+");
22804 if (fseek (fp, -1, SEEK_END))
22806 if (!(getc (fp) == 'h'))
22808 if (!(getc (fp) == EOF))
22810 if (!(ftell (fp) == 8))
22812 if (!(ftell (fp) == 8))
22814 if (!(putc ('!', fp) == '!'))
22816 if (!(ftell (fp) == 9))
22818 if (!(fclose (fp) == 0))
22820 fp = fopen (TESTFILE, "r");
22825 if (!(fread (buf, 1, 10, fp) == 9))
22827 if (!(memcmp (buf, "foogarsh!", 9) == 0))
22830 if (!(fclose (fp) == 0))
22833 /* The file's contents is now "foogarsh!". */
22838 if ac_fn_c_try_run "$LINENO"; then :
22839 gl_cv_func_ftello_works=yes
22841 gl_cv_func_ftello_works=no
22843 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22844 conftest.$ac_objext conftest.beam conftest.$ac_ext
22849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
22850 $as_echo "$gl_cv_func_ftello_works" >&6; }
22851 case "$gl_cv_func_ftello_works" in
22856 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
22863 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22872 M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
22875 for ac_func in _ftelli64
22877 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
22878 if test "x$ac_cv_func__ftelli64" = xyes; then :
22879 cat >>confdefs.h <<_ACEOF
22880 #define HAVE__FTELLI64 1
22899 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
22906 if test $ac_cv_func_getdtablesize != yes; then
22907 HAVE_GETDTABLESIZE=0
22910 if test $HAVE_GETDTABLESIZE = 0; then
22919 M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
22928 GNULIB_GETDTABLESIZE=1
22934 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
22943 if test $REPLACE_GETOPT = 1; then
22952 M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
22962 M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
22967 GNULIB_GL_M4_UNISTD_H_GETOPT=1
22972 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
22981 if test -n "$gl_replace_getopt"; then
22985 if test $REPLACE_GETOPT = 1; then
22989 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22995 if test $REPLACE_GETOPT = 1; then
23004 M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
23014 M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
23019 GNULIB_GL_M4_UNISTD_H_GETOPT=1
23030 gl_gettimeofday_timezone=void
23031 if test $ac_cv_func_gettimeofday != yes; then
23032 HAVE_GETTIMEOFDAY=0
23037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23038 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23039 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
23040 $as_echo_n "(cached) " >&6
23042 if test "$cross_compiling" = yes; then :
23043 # When cross-compiling:
23045 # Guess all is fine on glibc systems.
23046 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23047 # If we don't know, assume the worst.
23048 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23053 /* end confdefs.h. */
23054 #include <string.h>
23055 #include <sys/time.h>
23057 #include <stdlib.h>
23065 struct tm saved_lt;
23067 lt = localtime (&t);
23069 gettimeofday (&tv, NULL);
23070 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
23076 if ac_fn_c_try_run "$LINENO"; then :
23077 gl_cv_func_gettimeofday_clobber=no
23079 gl_cv_func_gettimeofday_clobber=yes
23081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23082 conftest.$ac_objext conftest.beam conftest.$ac_ext
23086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23087 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
23089 case "$gl_cv_func_gettimeofday_clobber" in
23091 REPLACE_GETTIMEOFDAY=1
23094 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
23097 $as_echo "#define localtime rpl_localtime" >>confdefs.h
23101 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23107 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23108 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
23109 $as_echo_n "(cached) " >&6
23111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23112 /* end confdefs.h. */
23113 #include <sys/time.h>
23115 int gettimeofday (struct timeval *restrict, void *restrict);
23120 /* glibc uses struct timezone * rather than the POSIX void *
23121 if _GNU_SOURCE is defined. However, since the only portable
23122 use of gettimeofday uses NULL as the second parameter, and
23123 since the glibc definition is actually more typesafe, it is
23124 not worth wrapping this to get a compliant signature. */
23125 int (*f) (struct timeval *restrict, void *restrict)
23128 return !(x | c.tv_sec | c.tv_usec);
23134 if ac_fn_c_try_compile "$LINENO"; then :
23135 gl_cv_func_gettimeofday_posix_signature=yes
23137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23138 /* end confdefs.h. */
23139 #include <sys/time.h>
23140 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23150 if ac_fn_c_try_compile "$LINENO"; then :
23151 gl_cv_func_gettimeofday_posix_signature=almost
23153 gl_cv_func_gettimeofday_posix_signature=no
23155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23160 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23161 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23162 gl_gettimeofday_timezone='struct timezone'
23163 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23164 REPLACE_GETTIMEOFDAY=1
23166 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23167 REPLACE_GETTIMEOFDAY=1
23172 cat >>confdefs.h <<_ACEOF
23173 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23177 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23186 M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
23189 for ac_header in sys/timeb.h
23191 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23192 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
23193 cat >>confdefs.h <<_ACEOF
23194 #define HAVE_SYS_TIMEB_H 1
23201 for ac_func in _ftime
23203 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23204 if test "x$ac_cv_func__ftime" = xyes; then :
23205 cat >>confdefs.h <<_ACEOF
23206 #define HAVE__FTIME 1
23219 GNULIB_GETTIMEOFDAY=1
23225 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
23229 # Autoconf 2.61a.99 and earlier don't support linking a file only
23230 # in VPATH builds. But since GNUmakefile is for maintainer use
23231 # only, it does not matter if we skip the link with older autoconf.
23232 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
23233 # builds, so use a shell variable to bypass this.
23234 GNUmakefile=GNUmakefile
23235 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
23239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
23240 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
23241 if ${gl_cv_func_isnand_no_libm+:} false; then :
23242 $as_echo_n "(cached) " >&6
23245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23246 /* end confdefs.h. */
23250 # define isnand(x) __builtin_isnan ((double)(x))
23253 # define isnand(x) isnan ((double)(x))
23264 if ac_fn_c_try_link "$LINENO"; then :
23265 gl_cv_func_isnand_no_libm=yes
23267 gl_cv_func_isnand_no_libm=no
23269 rm -f core conftest.err conftest.$ac_objext \
23270 conftest$ac_exeext conftest.$ac_ext
23273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
23274 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
23276 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
23277 if test $gl_cv_func_isnand_no_libm = yes; then
23279 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
23283 if test $gl_func_isnand_no_libm != yes; then
23292 M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
23300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
23301 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
23302 if ${gl_cv_func_isnanf_no_libm+:} false; then :
23303 $as_echo_n "(cached) " >&6
23306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23307 /* end confdefs.h. */
23311 # define isnanf(x) __builtin_isnanf ((float)(x))
23312 #elif defined isnan
23314 # define isnanf(x) isnan ((float)(x))
23325 if ac_fn_c_try_link "$LINENO"; then :
23326 gl_cv_func_isnanf_no_libm=yes
23328 gl_cv_func_isnanf_no_libm=no
23330 rm -f core conftest.err conftest.$ac_objext \
23331 conftest$ac_exeext conftest.$ac_ext
23334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
23335 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
23337 if test $gl_cv_func_isnanf_no_libm = yes; then
23341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
23342 $as_echo_n "checking whether isnan(float) works... " >&6; }
23343 if ${gl_cv_func_isnanf_works+:} false; then :
23344 $as_echo_n "(cached) " >&6
23347 if test "$cross_compiling" = yes; then :
23349 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
23350 *) gl_cv_func_isnanf_works="guessing yes";;
23354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23355 /* end confdefs.h. */
23360 # define isnanf(x) __builtin_isnanf ((float)(x))
23361 #elif defined isnan
23363 # define isnanf(x) isnan ((float)(x))
23365 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
23370 static float zero = 0.0f;
23371 return zero / zero;
23374 # define NaN() (0.0f / 0.0f)
23377 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23378 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
23383 if (isnanf (1.0f / 0.0f))
23386 if (!isnanf (NaN ()))
23389 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
23390 /* The isnanf function should be immune against changes in the sign bit and
23391 in the mantissa bits. The xor operation twiddles a bit that can only be
23392 a sign bit or a mantissa bit. */
23393 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
23398 /* Set the bits below the exponent to 01111...111. */
23399 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
23400 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
23401 if (!isnanf (m.value))
23409 if ac_fn_c_try_run "$LINENO"; then :
23410 gl_cv_func_isnanf_works=yes
23412 gl_cv_func_isnanf_works=no
23414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23415 conftest.$ac_objext conftest.beam conftest.$ac_ext
23420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
23421 $as_echo "$gl_cv_func_isnanf_works" >&6; }
23424 if test $gl_cv_func_isnanf_no_libm = yes \
23425 && { case "$gl_cv_func_isnanf_works" in
23430 gl_func_isnanf_no_libm=yes
23432 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
23435 gl_func_isnanf_no_libm=no
23438 if test $gl_func_isnanf_no_libm != yes; then
23447 M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
23451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
23452 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
23453 if ${gl_cv_cc_float_expbit0+:} false; then :
23454 $as_echo_n "(cached) " >&6
23457 if test "$cross_compiling" = yes; then :
23458 gl_cv_cc_float_expbit0="word 0 bit 23"
23460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23461 /* end confdefs.h. */
23464 #include <stddef.h>
23466 #include <string.h>
23468 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23469 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
23470 static unsigned int ored_words[NWORDS];
23471 static unsigned int anded_words[NWORDS];
23472 static void add_to_ored_words (float x)
23476 /* Clear it first, in case
23477 sizeof (float) < sizeof (memory_float). */
23478 memset (&m, 0, sizeof (memory_float));
23480 for (i = 0; i < NWORDS; i++)
23482 ored_words[i] |= m.word[i];
23483 anded_words[i] &= m.word[i];
23489 FILE *fp = fopen ("conftest.out", "w");
23492 for (j = 0; j < NWORDS; j++)
23493 anded_words[j] = ~ (unsigned int) 0;
23494 add_to_ored_words (0.25f);
23495 add_to_ored_words (0.5f);
23496 add_to_ored_words (1.0f);
23497 add_to_ored_words (2.0f);
23498 add_to_ored_words (4.0f);
23499 /* Remove bits that are common (e.g. if representation of the first mantissa
23500 bit is explicit). */
23501 for (j = 0; j < NWORDS; j++)
23502 ored_words[j] &= ~anded_words[j];
23503 /* Now find the nonzero word. */
23504 for (j = 0; j < NWORDS; j++)
23505 if (ored_words[j] != 0)
23510 for (i = j + 1; i < NWORDS; i++)
23511 if (ored_words[i] != 0)
23513 fprintf (fp, "unknown");
23514 return (fclose (fp) != 0);
23517 if ((ored_words[j] >> i) & 1)
23519 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23520 return (fclose (fp) != 0);
23523 fprintf (fp, "unknown");
23524 return (fclose (fp) != 0);
23528 if ac_fn_c_try_run "$LINENO"; then :
23529 gl_cv_cc_float_expbit0=`cat conftest.out`
23531 gl_cv_cc_float_expbit0="unknown"
23533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23534 conftest.$ac_objext conftest.beam conftest.$ac_ext
23540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
23541 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
23542 case "$gl_cv_cc_float_expbit0" in
23544 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23545 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
23547 cat >>confdefs.h <<_ACEOF
23548 #define FLT_EXPBIT0_WORD $word
23552 cat >>confdefs.h <<_ACEOF
23553 #define FLT_EXPBIT0_BIT $bit
23563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
23564 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
23565 if ${gl_cv_func_isnanl_no_libm+:} false; then :
23566 $as_echo_n "(cached) " >&6
23569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23570 /* end confdefs.h. */
23574 # define isnanl(x) __builtin_isnanl ((long double)(x))
23575 #elif defined isnan
23577 # define isnanl(x) isnan ((long double)(x))
23588 if ac_fn_c_try_link "$LINENO"; then :
23589 gl_cv_func_isnanl_no_libm=yes
23591 gl_cv_func_isnanl_no_libm=no
23593 rm -f core conftest.err conftest.$ac_objext \
23594 conftest$ac_exeext conftest.$ac_ext
23597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
23598 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
23600 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
23601 if test $gl_func_isnanl_no_libm = yes; then
23606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
23607 $as_echo_n "checking whether isnanl works... " >&6; }
23608 if ${gl_cv_func_isnanl_works+:} false; then :
23609 $as_echo_n "(cached) " >&6
23612 if test "$cross_compiling" = yes; then :
23613 case "$host_cpu" in
23614 # Guess no on ia64, x86_64, i386.
23615 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
23618 netbsd*) gl_cv_func_isnanl_works="guessing no";;
23619 *) gl_cv_func_isnanl_works="guessing yes";;
23625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23626 /* end confdefs.h. */
23629 #include <limits.h>
23633 # define isnanl(x) __builtin_isnanl ((long double)(x))
23634 #elif defined isnan
23636 # define isnanl(x) isnan ((long double)(x))
23639 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23640 typedef union { unsigned int word[NWORDS]; long double value; }
23641 memory_long_double;
23642 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
23643 runtime type conversion. */
23645 static long double NaNl ()
23648 return zero / zero;
23651 # define NaNl() (0.0L / 0.0L)
23657 if (!isnanl (NaNl ()))
23661 memory_long_double m;
23664 /* The isnanl function should be immune against changes in the sign bit and
23665 in the mantissa bits. The xor operation twiddles a bit that can only be
23666 a sign bit or a mantissa bit (since the exponent never extends to
23669 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
23670 for (i = 0; i < NWORDS; i++)
23672 if (!isnanl (m.value))
23676 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
23677 /* Representation of an 80-bit 'long double' as an initializer for a sequence
23678 of 'unsigned int' words. */
23679 # ifdef WORDS_BIGENDIAN
23680 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23681 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
23682 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
23683 (unsigned int) (mantlo) << 16 \
23686 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23687 { mantlo, manthi, exponent }
23690 static memory_long_double x =
23691 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
23692 if (!isnanl (x.value))
23696 /* Signalling NaN. */
23697 static memory_long_double x =
23698 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
23699 if (!isnanl (x.value))
23702 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
23703 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
23704 Intel IA-64 Architecture Software Developer's Manual, Volume 1:
23705 Application Architecture.
23706 Table 5-2 "Floating-Point Register Encodings"
23707 Figure 5-6 "Memory to Floating-Point Register Data Translation"
23709 { /* Pseudo-NaN. */
23710 static memory_long_double x =
23711 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
23712 if (!isnanl (x.value))
23715 { /* Pseudo-Infinity. */
23716 static memory_long_double x =
23717 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
23718 if (!isnanl (x.value))
23721 { /* Pseudo-Zero. */
23722 static memory_long_double x =
23723 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
23724 if (!isnanl (x.value))
23727 { /* Unnormalized number. */
23728 static memory_long_double x =
23729 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23730 if (!isnanl (x.value))
23733 { /* Pseudo-Denormal. */
23734 static memory_long_double x =
23735 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23736 if (!isnanl (x.value))
23744 if ac_fn_c_try_run "$LINENO"; then :
23745 gl_cv_func_isnanl_works=yes
23747 gl_cv_func_isnanl_works=no
23749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23750 conftest.$ac_objext conftest.beam conftest.$ac_ext
23755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23756 $as_echo "$gl_cv_func_isnanl_works" >&6; }
23758 case "$gl_cv_func_isnanl_works" in
23760 *) gl_func_isnanl_no_libm=no ;;
23763 if test $gl_func_isnanl_no_libm = yes; then
23765 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23769 if test $gl_func_isnanl_no_libm != yes; then
23778 M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
23783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23784 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
23785 if ${gl_cv_cc_long_double_expbit0+:} false; then :
23786 $as_echo_n "(cached) " >&6
23789 if test "$cross_compiling" = yes; then :
23791 gl_cv_cc_long_double_expbit0="unknown"
23794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23795 /* end confdefs.h. */
23798 #include <stddef.h>
23800 #include <string.h>
23802 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23803 typedef union { long double value; unsigned int word[NWORDS]; }
23804 memory_long_double;
23805 static unsigned int ored_words[NWORDS];
23806 static unsigned int anded_words[NWORDS];
23807 static void add_to_ored_words (long double x)
23809 memory_long_double m;
23811 /* Clear it first, in case
23812 sizeof (long double) < sizeof (memory_long_double). */
23813 memset (&m, 0, sizeof (memory_long_double));
23815 for (i = 0; i < NWORDS; i++)
23817 ored_words[i] |= m.word[i];
23818 anded_words[i] &= m.word[i];
23824 FILE *fp = fopen ("conftest.out", "w");
23827 for (j = 0; j < NWORDS; j++)
23828 anded_words[j] = ~ (unsigned int) 0;
23829 add_to_ored_words (0.25L);
23830 add_to_ored_words (0.5L);
23831 add_to_ored_words (1.0L);
23832 add_to_ored_words (2.0L);
23833 add_to_ored_words (4.0L);
23834 /* Remove bits that are common (e.g. if representation of the first mantissa
23835 bit is explicit). */
23836 for (j = 0; j < NWORDS; j++)
23837 ored_words[j] &= ~anded_words[j];
23838 /* Now find the nonzero word. */
23839 for (j = 0; j < NWORDS; j++)
23840 if (ored_words[j] != 0)
23845 for (i = j + 1; i < NWORDS; i++)
23846 if (ored_words[i] != 0)
23848 fprintf (fp, "unknown");
23849 return (fclose (fp) != 0);
23852 if ((ored_words[j] >> i) & 1)
23854 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23855 return (fclose (fp) != 0);
23858 fprintf (fp, "unknown");
23859 return (fclose (fp) != 0);
23863 if ac_fn_c_try_run "$LINENO"; then :
23864 gl_cv_cc_long_double_expbit0=`cat conftest.out`
23866 gl_cv_cc_long_double_expbit0="unknown"
23868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23869 conftest.$ac_objext conftest.beam conftest.$ac_ext
23875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23876 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
23877 case "$gl_cv_cc_long_double_expbit0" in
23879 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23880 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23882 cat >>confdefs.h <<_ACEOF
23883 #define LDBL_EXPBIT0_WORD $word
23887 cat >>confdefs.h <<_ACEOF
23888 #define LDBL_EXPBIT0_BIT $bit
23911 if test $gl_cv_have_include_next = yes; then
23912 gl_cv_next_langinfo_h='<'langinfo.h'>'
23914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
23915 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
23916 if ${gl_cv_next_langinfo_h+:} false; then :
23917 $as_echo_n "(cached) " >&6
23920 if test $ac_cv_header_langinfo_h = yes; then
23923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23924 /* end confdefs.h. */
23925 #include <langinfo.h>
23929 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23930 *) gl_absname_cpp="$ac_cpp" ;;
23935 gl_dirsep_regex='[/\\]'
23938 gl_dirsep_regex='\/'
23941 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23943 gl_header_literal_regex=`echo 'langinfo.h' \
23944 | sed -e "$gl_make_literal_regex_sed"`
23945 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23946 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23951 gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23952 sed -n "$gl_absolute_header_sed"`'"'
23954 gl_cv_next_langinfo_h='<'langinfo.h'>'
23959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
23960 $as_echo "$gl_cv_next_langinfo_h" >&6; }
23962 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
23964 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23965 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23966 gl_next_as_first_directive='<'langinfo.h'>'
23968 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23969 gl_next_as_first_directive=$gl_cv_next_langinfo_h
23971 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
23977 HAVE_LANGINFO_CODESET=0
23978 HAVE_LANGINFO_T_FMT_AMPM=0
23979 HAVE_LANGINFO_ERA=0
23980 HAVE_LANGINFO_YESEXPR=0
23982 if test $ac_cv_header_langinfo_h = yes; then
23984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
23985 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
23986 if ${gl_cv_header_langinfo_codeset+:} false; then :
23987 $as_echo_n "(cached) " >&6
23989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23990 /* end confdefs.h. */
23991 #include <langinfo.h>
24002 if ac_fn_c_try_compile "$LINENO"; then :
24003 gl_cv_header_langinfo_codeset=yes
24005 gl_cv_header_langinfo_codeset=no
24007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
24011 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
24012 if test $gl_cv_header_langinfo_codeset = yes; then
24013 HAVE_LANGINFO_CODESET=1
24015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
24016 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
24017 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
24018 $as_echo_n "(cached) " >&6
24020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24021 /* end confdefs.h. */
24022 #include <langinfo.h>
24023 int a = T_FMT_AMPM;
24033 if ac_fn_c_try_compile "$LINENO"; then :
24034 gl_cv_header_langinfo_t_fmt_ampm=yes
24036 gl_cv_header_langinfo_t_fmt_ampm=no
24038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
24042 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
24043 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
24044 HAVE_LANGINFO_T_FMT_AMPM=1
24046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
24047 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
24048 if ${gl_cv_header_langinfo_era+:} false; then :
24049 $as_echo_n "(cached) " >&6
24051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24052 /* end confdefs.h. */
24053 #include <langinfo.h>
24064 if ac_fn_c_try_compile "$LINENO"; then :
24065 gl_cv_header_langinfo_era=yes
24067 gl_cv_header_langinfo_era=no
24069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
24073 $as_echo "$gl_cv_header_langinfo_era" >&6; }
24074 if test $gl_cv_header_langinfo_era = yes; then
24075 HAVE_LANGINFO_ERA=1
24077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
24078 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
24079 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
24080 $as_echo_n "(cached) " >&6
24082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24083 /* end confdefs.h. */
24084 #include <langinfo.h>
24095 if ac_fn_c_try_compile "$LINENO"; then :
24096 gl_cv_header_langinfo_yesexpr=yes
24098 gl_cv_header_langinfo_yesexpr=no
24100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
24104 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
24105 if test $gl_cv_header_langinfo_yesexpr = yes; then
24106 HAVE_LANGINFO_YESEXPR=1
24136 acl_save_prefix="$prefix"
24137 prefix="$acl_final_prefix"
24138 acl_save_exec_prefix="$exec_prefix"
24139 exec_prefix="$acl_final_exec_prefix"
24141 eval additional_includedir=\"$includedir\"
24142 eval additional_libdir=\"$libdir\"
24144 exec_prefix="$acl_save_exec_prefix"
24145 prefix="$acl_save_prefix"
24148 # Check whether --with-libsigsegv-prefix was given.
24149 if test "${with_libsigsegv_prefix+set}" = set; then :
24150 withval=$with_libsigsegv_prefix;
24151 if test "X$withval" = "Xno"; then
24154 if test "X$withval" = "X"; then
24156 acl_save_prefix="$prefix"
24157 prefix="$acl_final_prefix"
24158 acl_save_exec_prefix="$exec_prefix"
24159 exec_prefix="$acl_final_exec_prefix"
24161 eval additional_includedir=\"$includedir\"
24162 eval additional_libdir=\"$libdir\"
24164 exec_prefix="$acl_save_exec_prefix"
24165 prefix="$acl_save_prefix"
24168 additional_includedir="$withval/include"
24169 additional_libdir="$withval/$acl_libdirstem"
24170 if test "$acl_libdirstem2" != "$acl_libdirstem" \
24171 && ! test -d "$withval/$acl_libdirstem"; then
24172 additional_libdir="$withval/$acl_libdirstem2"
24186 names_already_handled=
24187 names_next_round='sigsegv '
24188 while test -n "$names_next_round"; do
24189 names_this_round="$names_next_round"
24191 for name in $names_this_round; do
24193 for n in $names_already_handled; do
24194 if test "$n" = "$name"; then
24195 already_handled=yes
24199 if test -z "$already_handled"; then
24200 names_already_handled="$names_already_handled $name"
24201 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
24202 eval value=\"\$HAVE_LIB$uppername\"
24203 if test -n "$value"; then
24204 if test "$value" = yes; then
24205 eval value=\"\$LIB$uppername\"
24206 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
24207 eval value=\"\$LTLIB$uppername\"
24208 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
24217 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
24218 if test -n "$acl_shlibext"; then
24219 shrext=".$acl_shlibext" # typically: shrext=.so
24223 if test $use_additional = yes; then
24224 dir="$additional_libdir"
24225 if test -n "$acl_shlibext"; then
24226 if test -f "$dir/$libname$shrext"; then
24228 found_so="$dir/$libname$shrext"
24230 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
24231 ver=`(cd "$dir" && \
24232 for f in "$libname$shrext".*; do echo "$f"; done \
24233 | sed -e "s,^$libname$shrext\\\\.,," \
24234 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
24235 | sed 1q ) 2>/dev/null`
24236 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
24238 found_so="$dir/$libname$shrext.$ver"
24241 eval library_names=\"$acl_library_names_spec\"
24242 for f in $library_names; do
24243 if test -f "$dir/$f"; then
24252 if test "X$found_dir" = "X"; then
24253 if test -f "$dir/$libname.$acl_libext"; then
24255 found_a="$dir/$libname.$acl_libext"
24258 if test "X$found_dir" != "X"; then
24259 if test -f "$dir/$libname.la"; then
24260 found_la="$dir/$libname.la"
24264 if test "X$found_dir" = "X"; then
24265 for x in $LDFLAGS $LTLIBSIGSEGV; do
24267 acl_save_prefix="$prefix"
24268 prefix="$acl_final_prefix"
24269 acl_save_exec_prefix="$exec_prefix"
24270 exec_prefix="$acl_final_exec_prefix"
24272 exec_prefix="$acl_save_exec_prefix"
24273 prefix="$acl_save_prefix"
24277 dir=`echo "X$x" | sed -e 's/^X-L//'`
24278 if test -n "$acl_shlibext"; then
24279 if test -f "$dir/$libname$shrext"; then
24281 found_so="$dir/$libname$shrext"
24283 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
24284 ver=`(cd "$dir" && \
24285 for f in "$libname$shrext".*; do echo "$f"; done \
24286 | sed -e "s,^$libname$shrext\\\\.,," \
24287 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
24288 | sed 1q ) 2>/dev/null`
24289 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
24291 found_so="$dir/$libname$shrext.$ver"
24294 eval library_names=\"$acl_library_names_spec\"
24295 for f in $library_names; do
24296 if test -f "$dir/$f"; then
24305 if test "X$found_dir" = "X"; then
24306 if test -f "$dir/$libname.$acl_libext"; then
24308 found_a="$dir/$libname.$acl_libext"
24311 if test "X$found_dir" != "X"; then
24312 if test -f "$dir/$libname.la"; then
24313 found_la="$dir/$libname.la"
24318 if test "X$found_dir" != "X"; then
24323 if test "X$found_dir" != "X"; then
24324 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
24325 if test "X$found_so" != "X"; then
24326 if test "$enable_rpath" = no \
24327 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
24328 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
24329 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
24332 for x in $ltrpathdirs; do
24333 if test "X$x" = "X$found_dir"; then
24338 if test -z "$haveit"; then
24339 ltrpathdirs="$ltrpathdirs $found_dir"
24341 if test "$acl_hardcode_direct" = yes; then
24342 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
24344 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
24345 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
24347 for x in $rpathdirs; do
24348 if test "X$x" = "X$found_dir"; then
24353 if test -z "$haveit"; then
24354 rpathdirs="$rpathdirs $found_dir"
24358 for x in $LDFLAGS $LIBSIGSEGV; do
24360 acl_save_prefix="$prefix"
24361 prefix="$acl_final_prefix"
24362 acl_save_exec_prefix="$exec_prefix"
24363 exec_prefix="$acl_final_exec_prefix"
24365 exec_prefix="$acl_save_exec_prefix"
24366 prefix="$acl_save_prefix"
24368 if test "X$x" = "X-L$found_dir"; then
24373 if test -z "$haveit"; then
24374 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
24376 if test "$acl_hardcode_minus_L" != no; then
24377 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
24379 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
24385 if test "X$found_a" != "X"; then
24386 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
24388 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
24391 additional_includedir=
24392 case "$found_dir" in
24393 */$acl_libdirstem | */$acl_libdirstem/)
24394 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
24395 if test "$name" = 'sigsegv'; then
24396 LIBSIGSEGV_PREFIX="$basedir"
24398 additional_includedir="$basedir/include"
24400 */$acl_libdirstem2 | */$acl_libdirstem2/)
24401 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
24402 if test "$name" = 'sigsegv'; then
24403 LIBSIGSEGV_PREFIX="$basedir"
24405 additional_includedir="$basedir/include"
24408 if test "X$additional_includedir" != "X"; then
24409 if test "X$additional_includedir" != "X/usr/include"; then
24411 if test "X$additional_includedir" = "X/usr/local/include"; then
24412 if test -n "$GCC"; then
24414 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24418 if test -z "$haveit"; then
24419 for x in $CPPFLAGS $INCSIGSEGV; do
24421 acl_save_prefix="$prefix"
24422 prefix="$acl_final_prefix"
24423 acl_save_exec_prefix="$exec_prefix"
24424 exec_prefix="$acl_final_exec_prefix"
24426 exec_prefix="$acl_save_exec_prefix"
24427 prefix="$acl_save_prefix"
24429 if test "X$x" = "X-I$additional_includedir"; then
24434 if test -z "$haveit"; then
24435 if test -d "$additional_includedir"; then
24436 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
24442 if test -n "$found_la"; then
24443 save_libdir="$libdir"
24444 case "$found_la" in
24445 */* | *\\*) . "$found_la" ;;
24446 *) . "./$found_la" ;;
24448 libdir="$save_libdir"
24449 for dep in $dependency_libs; do
24452 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
24453 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
24454 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
24456 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
24457 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
24458 if test -n "$GCC"; then
24460 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24464 if test -z "$haveit"; then
24466 for x in $LDFLAGS $LIBSIGSEGV; do
24468 acl_save_prefix="$prefix"
24469 prefix="$acl_final_prefix"
24470 acl_save_exec_prefix="$exec_prefix"
24471 exec_prefix="$acl_final_exec_prefix"
24473 exec_prefix="$acl_save_exec_prefix"
24474 prefix="$acl_save_prefix"
24476 if test "X$x" = "X-L$additional_libdir"; then
24481 if test -z "$haveit"; then
24482 if test -d "$additional_libdir"; then
24483 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
24487 for x in $LDFLAGS $LTLIBSIGSEGV; do
24489 acl_save_prefix="$prefix"
24490 prefix="$acl_final_prefix"
24491 acl_save_exec_prefix="$exec_prefix"
24492 exec_prefix="$acl_final_exec_prefix"
24494 exec_prefix="$acl_save_exec_prefix"
24495 prefix="$acl_save_prefix"
24497 if test "X$x" = "X-L$additional_libdir"; then
24502 if test -z "$haveit"; then
24503 if test -d "$additional_libdir"; then
24504 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
24511 dir=`echo "X$dep" | sed -e 's/^X-R//'`
24512 if test "$enable_rpath" != no; then
24514 for x in $rpathdirs; do
24515 if test "X$x" = "X$dir"; then
24520 if test -z "$haveit"; then
24521 rpathdirs="$rpathdirs $dir"
24524 for x in $ltrpathdirs; do
24525 if test "X$x" = "X$dir"; then
24530 if test -z "$haveit"; then
24531 ltrpathdirs="$ltrpathdirs $dir"
24536 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
24539 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
24542 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
24543 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
24549 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
24550 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
24556 if test "X$rpathdirs" != "X"; then
24557 if test -n "$acl_hardcode_libdir_separator"; then
24559 for found_dir in $rpathdirs; do
24560 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
24562 acl_save_libdir="$libdir"
24564 eval flag=\"$acl_hardcode_libdir_flag_spec\"
24565 libdir="$acl_save_libdir"
24566 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
24568 for found_dir in $rpathdirs; do
24569 acl_save_libdir="$libdir"
24570 libdir="$found_dir"
24571 eval flag=\"$acl_hardcode_libdir_flag_spec\"
24572 libdir="$acl_save_libdir"
24573 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
24577 if test "X$ltrpathdirs" != "X"; then
24578 for found_dir in $ltrpathdirs; do
24579 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
24589 ac_save_CPPFLAGS="$CPPFLAGS"
24591 for element in $INCSIGSEGV; do
24593 for x in $CPPFLAGS; do
24595 acl_save_prefix="$prefix"
24596 prefix="$acl_final_prefix"
24597 acl_save_exec_prefix="$exec_prefix"
24598 exec_prefix="$acl_final_exec_prefix"
24600 exec_prefix="$acl_save_exec_prefix"
24601 prefix="$acl_save_prefix"
24603 if test "X$x" = "X$element"; then
24608 if test -z "$haveit"; then
24609 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
24614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
24615 $as_echo_n "checking for libsigsegv... " >&6; }
24616 if ${ac_cv_libsigsegv+:} false; then :
24617 $as_echo_n "(cached) " >&6
24620 ac_save_LIBS="$LIBS"
24621 case " $LIBSIGSEGV" in
24622 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
24623 *) LIBS="$LIBSIGSEGV $LIBS" ;;
24625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24626 /* end confdefs.h. */
24627 #include <sigsegv.h>
24631 sigsegv_deinstall_handler();
24636 if ac_fn_c_try_link "$LINENO"; then :
24637 ac_cv_libsigsegv=yes
24639 ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
24641 rm -f core conftest.err conftest.$ac_objext \
24642 conftest$ac_exeext conftest.$ac_ext
24643 LIBS="$ac_save_LIBS"
24646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
24647 $as_echo "$ac_cv_libsigsegv" >&6; }
24648 if test "$ac_cv_libsigsegv" = yes; then
24649 HAVE_LIBSIGSEGV=yes
24651 $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
24653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
24654 $as_echo_n "checking how to link with libsigsegv... " >&6; }
24655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
24656 $as_echo "$LIBSIGSEGV" >&6; }
24659 CPPFLAGS="$ac_save_CPPFLAGS"
24671 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
24681 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
24694 $as_echo "#define _LCONV_C99 1" >>confdefs.h
24699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
24700 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
24701 if ${gl_cv_header_locale_h_posix2001+:} false; then :
24702 $as_echo_n "(cached) " >&6
24704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24705 /* end confdefs.h. */
24706 #include <locale.h>
24707 int x = LC_MESSAGES;
24708 int y = sizeof (((struct lconv *) 0)->decimal_point);
24717 if ac_fn_c_try_compile "$LINENO"; then :
24718 gl_cv_header_locale_h_posix2001=yes
24720 gl_cv_header_locale_h_posix2001=no
24722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
24725 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
24728 if test $ac_cv_header_xlocale_h = yes; then
24730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
24731 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
24732 if ${gl_cv_header_locale_has_locale_t+:} false; then :
24733 $as_echo_n "(cached) " >&6
24735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24736 /* end confdefs.h. */
24737 #include <locale.h>
24747 if ac_fn_c_try_compile "$LINENO"; then :
24748 gl_cv_header_locale_has_locale_t=yes
24750 gl_cv_header_locale_has_locale_t=no
24752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
24756 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
24757 if test $gl_cv_header_locale_has_locale_t = yes; then
24758 gl_cv_header_locale_h_needs_xlocale_h=no
24760 gl_cv_header_locale_h_needs_xlocale_h=yes
24764 gl_cv_header_locale_h_needs_xlocale_h=no
24768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
24769 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
24770 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
24771 $as_echo_n "(cached) " >&6
24773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24774 /* end confdefs.h. */
24775 #include <locale.h>
24777 int x = sizeof (l.decimal_point);
24778 int y = sizeof (l.int_p_cs_precedes);
24787 if ac_fn_c_try_compile "$LINENO"; then :
24788 gl_cv_sys_struct_lconv_ok=yes
24790 gl_cv_sys_struct_lconv_ok=no
24792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
24796 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
24797 if test $gl_cv_sys_struct_lconv_ok = no; then
24798 REPLACE_STRUCT_LCONV=1
24809 if test $gl_cv_have_include_next = yes; then
24810 gl_cv_next_locale_h='<'locale.h'>'
24812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
24813 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
24814 if ${gl_cv_next_locale_h+:} false; then :
24815 $as_echo_n "(cached) " >&6
24818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24819 /* end confdefs.h. */
24820 #include <locale.h>
24824 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24825 *) gl_absname_cpp="$ac_cpp" ;;
24830 gl_dirsep_regex='[/\\]'
24833 gl_dirsep_regex='\/'
24836 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24838 gl_header_literal_regex=`echo 'locale.h' \
24839 | sed -e "$gl_make_literal_regex_sed"`
24840 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24841 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24846 gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24847 sed -n "$gl_absolute_header_sed"`'"'
24851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
24852 $as_echo "$gl_cv_next_locale_h" >&6; }
24854 NEXT_LOCALE_H=$gl_cv_next_locale_h
24856 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24857 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24858 gl_next_as_first_directive='<'locale.h'>'
24860 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24861 gl_next_as_first_directive=$gl_cv_next_locale_h
24863 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
24875 if test $REPLACE_STRUCT_LCONV = 1; then
24876 REPLACE_LOCALECONV=1
24879 if test $REPLACE_LOCALECONV = 1; then
24888 M4_LIBOBJS="$M4_LIBOBJS localeconv.$ac_objext"
24891 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
24893 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
24895 cat >>confdefs.h <<_ACEOF
24896 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
24909 GNULIB_LOCALECONV=1
24915 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
24921 if test "$gl_threads_api" = posix; then
24922 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
24923 # pthread_rwlock_* functions.
24924 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
24926 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
24928 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
24932 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24934 /* end confdefs.h. */
24936 #include <pthread.h>
24941 #if __FreeBSD__ == 4
24942 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24943 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
24944 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
24945 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24947 int x = (int)PTHREAD_MUTEX_RECURSIVE;
24955 if ac_fn_c_try_compile "$LINENO"; then :
24957 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24966 cat >>confdefs.h <<_ACEOF
24967 #define GNULIB_LOCK 1
24977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
24978 $as_echo_n "checking whether lseek detects pipes... " >&6; }
24979 if ${gl_cv_func_lseek_pipe+:} false; then :
24980 $as_echo_n "(cached) " >&6
24984 gl_cv_func_lseek_pipe=no
24987 if test $cross_compiling = no; then
24988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24989 /* end confdefs.h. */
24991 #include <sys/types.h> /* for off_t */
24992 #include <stdio.h> /* for SEEK_CUR */
24994 # include <unistd.h>
24995 #else /* on Windows with MSVC */
25003 /* Exit with success only if stdin is seekable. */
25004 return lseek (0, (off_t)0, SEEK_CUR) < 0;
25010 if ac_fn_c_try_link "$LINENO"; then :
25011 if test -s conftest$ac_exeext \
25012 && ./conftest$ac_exeext < conftest.$ac_ext \
25013 && test 1 = "`echo hi \
25014 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
25015 gl_cv_func_lseek_pipe=yes
25017 gl_cv_func_lseek_pipe=no
25021 gl_cv_func_lseek_pipe=no
25023 rm -f core conftest.err conftest.$ac_objext \
25024 conftest$ac_exeext conftest.$ac_ext
25026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25027 /* end confdefs.h. */
25029 #if defined __BEOS__
25030 /* BeOS mistakenly return 0 when trying to seek on pipes. */
25034 if ac_fn_c_try_compile "$LINENO"; then :
25035 gl_cv_func_lseek_pipe=yes
25037 gl_cv_func_lseek_pipe=no
25039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
25046 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
25047 if test $gl_cv_func_lseek_pipe = no; then
25050 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
25055 if test $WINDOWS_64_BIT_OFF_T = 1; then
25059 if test $REPLACE_LSEEK = 1; then
25068 M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
25082 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
25089 if test $ac_cv_func_lstat = yes; then
25091 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
25100 if test $REPLACE_LSTAT = 1; then
25109 M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
25124 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
25132 for ac_header in stdlib.h
25134 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
25135 if test "x$ac_cv_header_stdlib_h" = xyes; then :
25136 cat >>confdefs.h <<_ACEOF
25137 #define HAVE_STDLIB_H 1
25144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
25145 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
25146 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
25147 $as_echo_n "(cached) " >&6
25149 if test "$cross_compiling" = yes; then :
25151 # Guess yes on platforms where we know the result.
25152 *-gnu* | freebsd* | netbsd* | openbsd* \
25153 | hpux* | solaris* | cygwin* | mingw*)
25154 ac_cv_func_malloc_0_nonnull=yes ;;
25155 # If we don't know, assume the worst.
25156 *) ac_cv_func_malloc_0_nonnull=no ;;
25160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25161 /* end confdefs.h. */
25162 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
25163 # include <stdlib.h>
25171 return ! malloc (0);
25177 if ac_fn_c_try_run "$LINENO"; then :
25178 ac_cv_func_malloc_0_nonnull=yes
25180 ac_cv_func_malloc_0_nonnull=no
25182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25183 conftest.$ac_objext conftest.beam conftest.$ac_ext
25188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
25189 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
25190 if test $ac_cv_func_malloc_0_nonnull = yes; then :
25192 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
25195 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
25202 if test $REPLACE_MALLOC = 1; then
25211 M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
25216 cat >>confdefs.h <<_ACEOF
25217 #define GNULIB_MALLOC_GNU 1
25224 if test $gl_cv_func_malloc_posix = yes; then
25226 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
25232 if test $REPLACE_MALLOC = 1; then
25241 M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
25249 GNULIB_MALLOC_POSIX=1
25255 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
25274 if test $gl_cv_have_include_next = yes; then
25275 gl_cv_next_math_h='<'math.h'>'
25277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
25278 $as_echo_n "checking absolute name of <math.h>... " >&6; }
25279 if ${gl_cv_next_math_h+:} false; then :
25280 $as_echo_n "(cached) " >&6
25283 if test $ac_cv_header_math_h = yes; then
25286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25287 /* end confdefs.h. */
25292 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25293 *) gl_absname_cpp="$ac_cpp" ;;
25298 gl_dirsep_regex='[/\\]'
25301 gl_dirsep_regex='\/'
25304 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25306 gl_header_literal_regex=`echo 'math.h' \
25307 | sed -e "$gl_make_literal_regex_sed"`
25308 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25309 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25314 gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25315 sed -n "$gl_absolute_header_sed"`'"'
25317 gl_cv_next_math_h='<'math.h'>'
25322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
25323 $as_echo "$gl_cv_next_math_h" >&6; }
25325 NEXT_MATH_H=$gl_cv_next_math_h
25327 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25328 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25329 gl_next_as_first_directive='<'math.h'>'
25331 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25332 gl_next_as_first_directive=$gl_cv_next_math_h
25334 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
25340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
25341 $as_echo_n "checking whether NAN macro works... " >&6; }
25342 if ${gl_cv_header_math_nan_works+:} false; then :
25343 $as_echo_n "(cached) " >&6
25345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25346 /* end confdefs.h. */
25351 /* Solaris 10 has a broken definition of NAN. Other platforms
25352 fail to provide NAN, or provide it only in C99 mode; this
25353 test only needs to fail when NAN is provided but wrong. */
25363 if ac_fn_c_try_compile "$LINENO"; then :
25364 gl_cv_header_math_nan_works=yes
25366 gl_cv_header_math_nan_works=no
25368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
25371 $as_echo "$gl_cv_header_math_nan_works" >&6; }
25372 if test $gl_cv_header_math_nan_works = no; then
25375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
25376 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
25377 if ${gl_cv_header_math_huge_val_works+:} false; then :
25378 $as_echo_n "(cached) " >&6
25380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25381 /* end confdefs.h. */
25386 /* Solaris 10 has a broken definition of HUGE_VAL. */
25387 double d = HUGE_VAL;
25393 if ac_fn_c_try_compile "$LINENO"; then :
25394 gl_cv_header_math_huge_val_works=yes
25396 gl_cv_header_math_huge_val_works=no
25398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
25401 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
25402 if test $gl_cv_header_math_huge_val_works = no; then
25418 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
25422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25423 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25424 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25425 $as_echo_n "(cached) " >&6
25429 # Guess no on AIX and OSF/1.
25430 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25431 # Guess yes otherwise.
25432 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25434 if test $LOCALE_JA != none; then
25435 if test "$cross_compiling" = yes; then :
25438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25439 /* end confdefs.h. */
25441 #include <locale.h>
25442 #include <string.h>
25443 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25445 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25446 included before <wchar.h>. */
25447 #include <stddef.h>
25453 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25455 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25459 memset (&state, '\0', sizeof (mbstate_t));
25460 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25461 if (mbsinit (&state))
25467 if ac_fn_c_try_run "$LINENO"; then :
25468 gl_cv_func_mbrtowc_incomplete_state=yes
25470 gl_cv_func_mbrtowc_incomplete_state=no
25472 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25473 conftest.$ac_objext conftest.beam conftest.$ac_ext
25479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25480 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25486 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25487 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25488 $as_echo_n "(cached) " >&6
25492 # Guess no on Solaris 8.
25493 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25494 # Guess yes otherwise.
25495 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25497 if test $LOCALE_ZH_CN != none; then
25498 if test "$cross_compiling" = yes; then :
25501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25502 /* end confdefs.h. */
25504 #include <locale.h>
25505 #include <stdlib.h>
25506 #include <string.h>
25507 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25509 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25510 included before <wchar.h>. */
25511 #include <stddef.h>
25517 /* This fails on Solaris 8:
25518 mbrtowc returns 2, and sets wc to 0x00F0.
25519 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25520 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25522 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25526 memset (&state, '\0', sizeof (mbstate_t));
25527 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25528 && mbtowc (&wc, input + 3, 6) == 4)
25534 if ac_fn_c_try_run "$LINENO"; then :
25535 gl_cv_func_mbrtowc_sanitycheck=yes
25537 gl_cv_func_mbrtowc_sanitycheck=no
25539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25540 conftest.$ac_objext conftest.beam conftest.$ac_ext
25546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25547 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25549 REPLACE_MBSTATE_T=0
25550 case "$gl_cv_func_mbrtowc_incomplete_state" in
25552 *) REPLACE_MBSTATE_T=1 ;;
25554 case "$gl_cv_func_mbrtowc_sanitycheck" in
25556 *) REPLACE_MBSTATE_T=1 ;;
25559 REPLACE_MBSTATE_T=1
25564 if test $ac_cv_func_mbrtowc = no; then
25566 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
25567 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25569 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25570 included before <wchar.h>. */
25571 #include <stddef.h>
25577 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
25583 cat >>confdefs.h <<_ACEOF
25584 #define HAVE_DECL_MBRTOWC $ac_have_decl
25587 if test $ac_cv_have_decl_mbrtowc = yes; then
25591 if test $REPLACE_MBSTATE_T = 1; then
25597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
25598 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
25599 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
25600 $as_echo_n "(cached) " >&6
25604 # Guess no on Solaris.
25605 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
25606 # Guess yes otherwise.
25607 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
25609 if test $LOCALE_FR_UTF8 != none; then
25610 if test "$cross_compiling" = yes; then :
25613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25614 /* end confdefs.h. */
25616 #include <locale.h>
25617 #include <stdlib.h>
25618 #include <string.h>
25619 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25621 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25622 included before <wchar.h>. */
25623 #include <stddef.h>
25631 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25633 char input[] = "\303\237er";
25638 memset (&state, '\0', sizeof (mbstate_t));
25639 wc = (wchar_t) 0xBADFACE;
25640 ret = mbrtowc (&wc, input, 5, &state);
25643 if (!mbsinit (&state))
25646 memset (&state, '\0', sizeof (mbstate_t));
25647 ret = mbrtowc (NULL, input, 5, &state);
25648 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
25650 if (!mbsinit (&state))
25656 if ac_fn_c_try_run "$LINENO"; then :
25657 gl_cv_func_mbrtowc_null_arg1=yes
25659 gl_cv_func_mbrtowc_null_arg1=no
25661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25662 conftest.$ac_objext conftest.beam conftest.$ac_ext
25668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
25669 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
25674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
25675 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
25676 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
25677 $as_echo_n "(cached) " >&6
25681 # Guess no on OSF/1.
25682 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
25683 # Guess yes otherwise.
25684 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
25686 if test $LOCALE_FR_UTF8 != none; then
25687 if test "$cross_compiling" = yes; then :
25690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25691 /* end confdefs.h. */
25693 #include <locale.h>
25694 #include <string.h>
25695 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25697 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25698 included before <wchar.h>. */
25699 #include <stddef.h>
25705 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25711 memset (&state, '\0', sizeof (mbstate_t));
25712 wc = (wchar_t) 0xBADFACE;
25713 mbrtowc (&wc, NULL, 5, &state);
25714 /* Check that wc was not modified. */
25715 if (wc != (wchar_t) 0xBADFACE)
25721 if ac_fn_c_try_run "$LINENO"; then :
25722 gl_cv_func_mbrtowc_null_arg2=yes
25724 gl_cv_func_mbrtowc_null_arg2=no
25726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25727 conftest.$ac_objext conftest.beam conftest.$ac_ext
25733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
25734 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
25741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
25742 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
25743 if ${gl_cv_func_mbrtowc_retval+:} false; then :
25744 $as_echo_n "(cached) " >&6
25748 # Guess no on HP-UX, Solaris, native Windows.
25749 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
25750 # Guess yes otherwise.
25751 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
25753 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
25754 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
25755 if test "$cross_compiling" = yes; then :
25758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25759 /* end confdefs.h. */
25761 #include <locale.h>
25762 #include <string.h>
25763 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25765 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25766 included before <wchar.h>. */
25767 #include <stddef.h>
25774 int found_some_locale = 0;
25775 /* This fails on Solaris. */
25776 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25778 char input[] = "B\303\274\303\237er"; /* "Büßer" */
25782 memset (&state, '\0', sizeof (mbstate_t));
25783 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25786 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
25789 found_some_locale = 1;
25791 /* This fails on HP-UX 11.11. */
25792 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25794 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25798 memset (&state, '\0', sizeof (mbstate_t));
25799 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25802 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
25805 found_some_locale = 1;
25807 /* This fails on native Windows. */
25808 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
25810 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
25814 memset (&state, '\0', sizeof (mbstate_t));
25815 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25818 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25821 found_some_locale = 1;
25823 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
25825 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
25829 memset (&state, '\0', sizeof (mbstate_t));
25830 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25833 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25836 found_some_locale = 1;
25838 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
25840 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
25844 memset (&state, '\0', sizeof (mbstate_t));
25845 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25848 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25851 found_some_locale = 1;
25853 return (found_some_locale ? result : 77);
25856 if ac_fn_c_try_run "$LINENO"; then :
25857 gl_cv_func_mbrtowc_retval=yes
25859 if test $? != 77; then
25860 gl_cv_func_mbrtowc_retval=no
25864 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25865 conftest.$ac_objext conftest.beam conftest.$ac_ext
25871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
25872 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
25877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
25878 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
25879 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
25880 $as_echo_n "(cached) " >&6
25884 # Guess no on Solaris 8 and 9.
25885 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
25886 # Guess yes otherwise.
25887 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
25889 if test $LOCALE_ZH_CN != none; then
25890 if test "$cross_compiling" = yes; then :
25893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25894 /* end confdefs.h. */
25896 #include <locale.h>
25897 #include <string.h>
25898 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25900 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25901 included before <wchar.h>. */
25902 #include <stddef.h>
25908 /* This fails on Solaris 8 and 9. */
25909 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25914 memset (&state, '\0', sizeof (mbstate_t));
25915 if (mbrtowc (&wc, "", 1, &state) != 0)
25921 if ac_fn_c_try_run "$LINENO"; then :
25922 gl_cv_func_mbrtowc_nul_retval=yes
25924 gl_cv_func_mbrtowc_nul_retval=no
25926 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25927 conftest.$ac_objext conftest.beam conftest.$ac_ext
25933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
25934 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
25936 case "$gl_cv_func_mbrtowc_null_arg1" in
25939 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
25944 case "$gl_cv_func_mbrtowc_null_arg2" in
25947 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
25952 case "$gl_cv_func_mbrtowc_retval" in
25955 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
25960 case "$gl_cv_func_mbrtowc_nul_retval" in
25963 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
25971 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
25980 M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
25997 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
26012 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
26016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
26017 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
26018 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
26019 $as_echo_n "(cached) " >&6
26023 # Guess no on AIX and OSF/1.
26024 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
26025 # Guess yes otherwise.
26026 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
26028 if test $LOCALE_JA != none; then
26029 if test "$cross_compiling" = yes; then :
26032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26033 /* end confdefs.h. */
26035 #include <locale.h>
26036 #include <string.h>
26037 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26039 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26040 included before <wchar.h>. */
26041 #include <stddef.h>
26047 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
26049 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
26053 memset (&state, '\0', sizeof (mbstate_t));
26054 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
26055 if (mbsinit (&state))
26061 if ac_fn_c_try_run "$LINENO"; then :
26062 gl_cv_func_mbrtowc_incomplete_state=yes
26064 gl_cv_func_mbrtowc_incomplete_state=no
26066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26067 conftest.$ac_objext conftest.beam conftest.$ac_ext
26073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
26074 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
26079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
26080 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
26081 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
26082 $as_echo_n "(cached) " >&6
26086 # Guess no on Solaris 8.
26087 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
26088 # Guess yes otherwise.
26089 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
26091 if test $LOCALE_ZH_CN != none; then
26092 if test "$cross_compiling" = yes; then :
26095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26096 /* end confdefs.h. */
26098 #include <locale.h>
26099 #include <stdlib.h>
26100 #include <string.h>
26101 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26103 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26104 included before <wchar.h>. */
26105 #include <stddef.h>
26111 /* This fails on Solaris 8:
26112 mbrtowc returns 2, and sets wc to 0x00F0.
26113 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
26114 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
26116 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
26120 memset (&state, '\0', sizeof (mbstate_t));
26121 if (mbrtowc (&wc, input + 3, 6, &state) != 4
26122 && mbtowc (&wc, input + 3, 6) == 4)
26128 if ac_fn_c_try_run "$LINENO"; then :
26129 gl_cv_func_mbrtowc_sanitycheck=yes
26131 gl_cv_func_mbrtowc_sanitycheck=no
26133 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26134 conftest.$ac_objext conftest.beam conftest.$ac_ext
26140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
26141 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
26143 REPLACE_MBSTATE_T=0
26144 case "$gl_cv_func_mbrtowc_incomplete_state" in
26146 *) REPLACE_MBSTATE_T=1 ;;
26148 case "$gl_cv_func_mbrtowc_sanitycheck" in
26150 *) REPLACE_MBSTATE_T=1 ;;
26153 REPLACE_MBSTATE_T=1
26158 if test $ac_cv_func_mbsinit = no; then
26160 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
26161 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26163 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26164 included before <wchar.h>. */
26165 #include <stddef.h>
26171 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
26177 cat >>confdefs.h <<_ACEOF
26178 #define HAVE_DECL_MBSINIT $ac_have_decl
26181 if test $ac_cv_have_decl_mbsinit = yes; then
26185 if test $REPLACE_MBSTATE_T = 1; then
26189 mingw*) REPLACE_MBSINIT=1 ;;
26194 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
26203 M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
26220 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
26231 if test $REPLACE_MBTOWC = 1; then
26240 M4_LIBOBJS="$M4_LIBOBJS mbtowc.$ac_objext"
26257 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
26262 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
26271 M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
26274 for ac_header in bp-sym.h
26276 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
26277 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
26278 cat >>confdefs.h <<_ACEOF
26279 #define HAVE_BP_SYM_H 1
26299 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
26305 for ac_func in mkdtemp
26307 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
26308 if test "x$ac_cv_func_mkdtemp" = xyes; then :
26309 cat >>confdefs.h <<_ACEOF
26310 #define HAVE_MKDTEMP 1
26316 if test $ac_cv_func_mkdtemp = no; then
26320 if test $HAVE_MKDTEMP = 0; then
26329 M4_LIBOBJS="$M4_LIBOBJS mkdtemp.$ac_objext"
26345 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
26353 if test $ac_cv_func_mkstemp = yes; then
26354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
26355 $as_echo_n "checking for working mkstemp... " >&6; }
26356 if ${gl_cv_func_working_mkstemp+:} false; then :
26357 $as_echo_n "(cached) " >&6
26360 mkdir conftest.mkstemp
26361 if test "$cross_compiling" = yes; then :
26363 # Guess yes on glibc systems.
26364 *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
26365 # If we don't know, assume the worst.
26366 *) gl_cv_func_working_mkstemp="guessing no" ;;
26370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26371 /* end confdefs.h. */
26372 $ac_includes_default
26378 off_t large = (off_t) 4294967295u;
26380 large = 2147483647;
26382 for (i = 0; i < 70; i++)
26384 char templ[] = "conftest.mkstemp/coXXXXXX";
26385 int (*mkstemp_function) (char *) = mkstemp;
26386 int fd = mkstemp_function (templ);
26392 if (lseek (fd, large, SEEK_SET) != large)
26394 if (fstat (fd, &st) < 0)
26396 else if (st.st_mode & 0077)
26407 if ac_fn_c_try_run "$LINENO"; then :
26408 gl_cv_func_working_mkstemp=yes
26410 gl_cv_func_working_mkstemp=no
26412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26413 conftest.$ac_objext conftest.beam conftest.$ac_ext
26416 rm -rf conftest.mkstemp
26419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
26420 $as_echo "$gl_cv_func_working_mkstemp" >&6; }
26421 case "$gl_cv_func_working_mkstemp" in
26431 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
26440 M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
26456 $as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
26462 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
26463 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
26465 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
26468 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
26472 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26481 M4_LIBOBJS="$M4_LIBOBJS msvc-inval.$ac_objext"
26487 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26496 M4_LIBOBJS="$M4_LIBOBJS msvc-nothrow.$ac_objext"
26504 if test $ac_cv_func_nl_langinfo = yes; then
26505 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
26506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
26507 $as_echo_n "checking whether YESEXPR works... " >&6; }
26508 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
26509 $as_echo_n "(cached) " >&6
26511 if test "$cross_compiling" = yes; then :
26514 # Guess no on irix systems.
26515 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
26516 # Guess yes elsewhere.
26517 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
26521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26522 /* end confdefs.h. */
26523 #include <langinfo.h>
26528 return !*nl_langinfo(YESEXPR);
26534 if ac_fn_c_try_run "$LINENO"; then :
26535 gl_cv_func_nl_langinfo_yesexpr_works=yes
26537 gl_cv_func_nl_langinfo_yesexpr_works=no
26539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26540 conftest.$ac_objext conftest.beam conftest.$ac_ext
26545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
26546 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
26547 case $gl_cv_func_nl_langinfo_yesexpr_works in
26548 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
26549 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
26552 cat >>confdefs.h <<_ACEOF
26553 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
26556 if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
26557 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
26560 REPLACE_NL_LANGINFO=1
26562 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
26569 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
26578 M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
26586 GNULIB_NL_LANGINFO=1
26592 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
26608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
26609 $as_echo_n "checking for obstacks... " >&6; }
26610 if ${ac_cv_func_obstack+:} false; then :
26611 $as_echo_n "(cached) " >&6
26613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26614 /* end confdefs.h. */
26615 $ac_includes_default
26616 #include "obstack.h"
26620 struct obstack mem;
26621 #define obstack_chunk_alloc malloc
26622 #define obstack_chunk_free free
26623 obstack_init (&mem);
26624 obstack_free (&mem, 0);
26629 if ac_fn_c_try_link "$LINENO"; then :
26630 ac_cv_func_obstack=yes
26632 ac_cv_func_obstack=no
26634 rm -f core conftest.err conftest.$ac_objext \
26635 conftest$ac_exeext conftest.$ac_ext
26637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
26638 $as_echo "$ac_cv_func_obstack" >&6; }
26639 if test $ac_cv_func_obstack = yes; then
26641 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
26652 M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
26664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26665 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26666 if ${gl_cv_func_open_slash+:} false; then :
26667 $as_echo_n "(cached) " >&6
26669 # Assume that if we have lstat, we can also check symlinks.
26670 if test $ac_cv_func_lstat = yes; then
26672 ln -s conftest.tmp conftest.lnk
26674 if test "$cross_compiling" = yes; then :
26677 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
26678 gl_cv_func_open_slash="guessing no" ;;
26680 gl_cv_func_open_slash="guessing yes" ;;
26684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26685 /* end confdefs.h. */
26689 # include <unistd.h>
26695 if (open ("conftest.lnk/", O_RDONLY) != -1)
26698 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26703 if ac_fn_c_try_run "$LINENO"; then :
26704 gl_cv_func_open_slash=yes
26706 gl_cv_func_open_slash=no
26708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26709 conftest.$ac_objext conftest.beam conftest.$ac_ext
26712 rm -f conftest.sl conftest.tmp conftest.lnk
26715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26716 $as_echo "$gl_cv_func_open_slash" >&6; }
26717 case "$gl_cv_func_open_slash" in
26720 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
26730 if test $REPLACE_OPEN = 1; then
26739 M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
26757 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26770 if test $ac_cv_func_pipe2 != yes; then
26785 $as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
26791 cat >>confdefs.h <<_ACEOF
26792 #define GNULIB_PIPE2_SAFER 1
26802 if test $REPLACE_POSIX_SPAWN = 1; then
26803 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
26805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
26806 $as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
26807 if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
26808 $as_echo_n "(cached) " >&6
26810 if test "$cross_compiling" = yes; then :
26811 # Guess no on Solaris, yes otherwise.
26813 solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";;
26814 *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";;
26818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26819 /* end confdefs.h. */
26824 posix_spawn_file_actions_t actions;
26825 if (posix_spawn_file_actions_init (&actions) != 0)
26827 if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
26832 if ac_fn_c_try_run "$LINENO"; then :
26833 gl_cv_func_posix_spawn_file_actions_addclose_works=yes
26835 gl_cv_func_posix_spawn_file_actions_addclose_works=no
26837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26838 conftest.$ac_objext conftest.beam conftest.$ac_ext
26843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
26844 $as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
26845 case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
26847 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
26851 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
26860 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
26868 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
26874 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
26884 if test $REPLACE_POSIX_SPAWN = 1; then
26885 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
26887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
26888 $as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
26889 if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
26890 $as_echo_n "(cached) " >&6
26892 if test "$cross_compiling" = yes; then :
26893 # Guess no on Solaris, yes otherwise.
26895 solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
26896 *) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
26900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26901 /* end confdefs.h. */
26906 posix_spawn_file_actions_t actions;
26907 if (posix_spawn_file_actions_init (&actions) != 0)
26909 if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
26914 if ac_fn_c_try_run "$LINENO"; then :
26915 gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
26917 gl_cv_func_posix_spawn_file_actions_adddup2_works=no
26919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26920 conftest.$ac_objext conftest.beam conftest.$ac_ext
26925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
26926 $as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
26927 case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
26929 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
26933 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
26942 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
26950 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
26956 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
26966 if test $REPLACE_POSIX_SPAWN = 1; then
26967 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
26969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
26970 $as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
26971 if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
26972 $as_echo_n "(cached) " >&6
26974 if test "$cross_compiling" = yes; then :
26975 # Guess no on Solaris, yes otherwise.
26977 solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
26978 *) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
26982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26983 /* end confdefs.h. */
26989 posix_spawn_file_actions_t actions;
26990 if (posix_spawn_file_actions_init (&actions) != 0)
26992 if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
26998 if ac_fn_c_try_run "$LINENO"; then :
26999 gl_cv_func_posix_spawn_file_actions_addopen_works=yes
27001 gl_cv_func_posix_spawn_file_actions_addopen_works=no
27003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27004 conftest.$ac_objext conftest.beam conftest.$ac_ext
27009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
27010 $as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
27011 case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
27013 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
27017 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
27026 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
27034 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
27040 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
27047 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27056 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
27064 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
27070 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
27077 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27086 M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
27094 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
27100 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
27107 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27116 M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
27124 GNULIB_POSIX_SPAWNATTR_DESTROY=1
27130 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
27137 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27146 M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
27154 GNULIB_POSIX_SPAWNATTR_INIT=1
27160 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
27167 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27176 M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
27184 GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
27190 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
27197 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27206 M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
27214 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
27220 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
27227 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27236 M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
27246 M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
27249 for ac_header in paths.h
27251 ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
27252 if test "x$ac_cv_header_paths_h" = xyes; then :
27253 cat >>confdefs.h <<_ACEOF
27254 #define HAVE_PATHS_H 1
27261 for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
27263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27264 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27265 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27266 cat >>confdefs.h <<_ACEOF
27267 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27280 GNULIB_POSIX_SPAWNP=1
27286 $as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
27292 if test $gl_cv_func_frexp_no_libm = yes; then
27296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
27297 $as_echo_n "checking whether frexp works... " >&6; }
27298 if ${gl_cv_func_frexp_works+:} false; then :
27299 $as_echo_n "(cached) " >&6
27302 if test "$cross_compiling" = yes; then :
27304 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
27305 *) gl_cv_func_frexp_works="guessing yes";;
27309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27310 /* end confdefs.h. */
27314 #include <string.h>
27315 #if HAVE_DECL_ALARM
27316 # include <signal.h>
27317 # include <unistd.h>
27319 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
27320 ICC 10.0 has a bug when optimizing the expression -zero.
27321 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
27322 to PowerPC on Mac OS X 10.5. */
27323 #if defined __hpux || defined __sgi || defined __ICC
27325 compute_minus_zero (void)
27327 return -DBL_MIN * DBL_MIN;
27329 # define minus_zero compute_minus_zero ()
27331 double minus_zero = -0.0;
27339 #if HAVE_DECL_ALARM
27340 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
27341 number. Let the test fail in this case. */
27342 signal (SIGALRM, SIG_DFL);
27345 /* Test on denormalized numbers. */
27346 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
27351 double y = frexp (x, &exp);
27352 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
27353 On NetBSD: y = 0.75. Correct: y = 0.5. */
27357 /* Test on infinite numbers. */
27361 double y = frexp (x, &exp);
27365 /* Test on negative zero. */
27369 double y = frexp (x, &exp);
27370 if (memcmp (&y, &x, sizeof x))
27376 if ac_fn_c_try_run "$LINENO"; then :
27377 gl_cv_func_frexp_works=yes
27379 gl_cv_func_frexp_works=no
27381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27382 conftest.$ac_objext conftest.beam conftest.$ac_ext
27387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
27388 $as_echo "$gl_cv_func_frexp_works" >&6; }
27390 case "$gl_cv_func_frexp_works" in
27393 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
27399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
27400 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
27401 if ${gl_cv_func_ldexp_no_libm+:} false; then :
27402 $as_echo_n "(cached) " >&6
27405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27406 /* end confdefs.h. */
27413 return ldexp (x, y) < 1;
27418 if ac_fn_c_try_link "$LINENO"; then :
27419 gl_cv_func_ldexp_no_libm=yes
27421 gl_cv_func_ldexp_no_libm=no
27423 rm -f core conftest.err conftest.$ac_objext \
27424 conftest$ac_exeext conftest.$ac_ext
27427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
27428 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
27429 if test $gl_cv_func_ldexp_no_libm = yes; then
27431 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
27440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
27441 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
27442 if ${gl_cv_func_frexpl_no_libm+:} false; then :
27443 $as_echo_n "(cached) " >&6
27446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27447 /* end confdefs.h. */
27453 int e; return frexpl (x, &e) > 0;
27458 if ac_fn_c_try_link "$LINENO"; then :
27459 gl_cv_func_frexpl_no_libm=yes
27461 gl_cv_func_frexpl_no_libm=no
27463 rm -f core conftest.err conftest.$ac_objext \
27464 conftest$ac_exeext conftest.$ac_ext
27467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
27468 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
27470 if test $gl_cv_func_frexpl_no_libm = yes; then
27473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
27474 $as_echo_n "checking whether frexpl works... " >&6; }
27475 if ${gl_cv_func_frexpl_works+:} false; then :
27476 $as_echo_n "(cached) " >&6
27479 if test "$cross_compiling" = yes; then :
27482 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
27483 gl_cv_func_frexpl_works="guessing no";;
27484 *) gl_cv_func_frexpl_works="guessing yes";;
27488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27489 /* end confdefs.h. */
27493 /* Override the values of <float.h>, like done in float.in.h. */
27494 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
27495 # undef LDBL_MIN_EXP
27496 # define LDBL_MIN_EXP (-16381)
27498 #if defined __i386__ && defined __FreeBSD__
27499 # undef LDBL_MIN_EXP
27500 # define LDBL_MIN_EXP (-16381)
27502 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
27503 # undef LDBL_MIN_EXP
27504 # define LDBL_MIN_EXP DBL_MIN_EXP
27506 #if defined __sgi && (LDBL_MANT_DIG >= 106)
27507 # if defined __GNUC__
27508 # undef LDBL_MIN_EXP
27509 # define LDBL_MIN_EXP DBL_MIN_EXP
27516 long double frexpl (long double, int *);
27520 volatile long double x;
27521 /* Test on finite numbers that fails on AIX 5.1. */
27529 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
27530 function returns an invalid (incorrectly normalized) value: it returns
27531 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
27532 but the correct result is
27533 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
27537 long double y = frexpl (x, &exp);
27538 if (!(exp == 1 && y == 0.505L))
27541 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
27542 LDBL_MAX_EXP = 16384.
27543 In the loop end test, we test x against Infinity, rather than comparing
27544 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
27547 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
27558 /* Test on denormalized numbers. */
27561 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
27566 long double y = frexpl (x, &exp);
27567 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
27568 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
27569 if (exp != LDBL_MIN_EXP - 1)
27573 /* Test on infinite numbers. */
27577 long double y = frexpl (x, &exp);
27584 if ac_fn_c_try_run "$LINENO"; then :
27585 gl_cv_func_frexpl_works=yes
27587 gl_cv_func_frexpl_works=no
27589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27590 conftest.$ac_objext conftest.beam conftest.$ac_ext
27595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
27596 $as_echo "$gl_cv_func_frexpl_works" >&6; }
27598 case "$gl_cv_func_frexpl_works" in
27599 *yes) gl_func_frexpl_no_libm=yes ;;
27600 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
27603 gl_func_frexpl_no_libm=no
27606 if test $gl_func_frexpl_no_libm = yes; then
27608 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
27610 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
27612 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
27621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
27622 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
27623 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
27624 $as_echo_n "(cached) " >&6
27627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27628 /* end confdefs.h. */
27634 return ldexpl (x, -1) > 0;
27639 if ac_fn_c_try_link "$LINENO"; then :
27640 gl_cv_func_ldexpl_no_libm=yes
27642 gl_cv_func_ldexpl_no_libm=no
27644 rm -f core conftest.err conftest.$ac_objext \
27645 conftest$ac_exeext conftest.$ac_ext
27648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
27649 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
27651 if test $gl_cv_func_ldexpl_no_libm = yes; then
27654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
27655 $as_echo_n "checking whether ldexpl works... " >&6; }
27656 if ${gl_cv_func_ldexpl_works+:} false; then :
27657 $as_echo_n "(cached) " >&6
27660 if test "$cross_compiling" = yes; then :
27663 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
27664 *) gl_cv_func_ldexpl_works="guessing yes";;
27668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27669 /* end confdefs.h. */
27676 long double ldexpl (long double, int);
27681 volatile long double x = 1.0;
27682 volatile long double y = ldexpl (x, -1);
27687 volatile long double x = 1.73205L;
27688 volatile long double y = ldexpl (x, 0);
27695 if ac_fn_c_try_run "$LINENO"; then :
27696 gl_cv_func_ldexpl_works=yes
27698 gl_cv_func_ldexpl_works=no
27700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27701 conftest.$ac_objext conftest.beam conftest.$ac_ext
27706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
27707 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
27709 case "$gl_cv_func_ldexpl_works" in
27712 $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
27714 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
27716 if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
27727 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
27729 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
27735 cat >>confdefs.h <<_ACEOF
27736 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
27739 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
27741 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
27747 cat >>confdefs.h <<_ACEOF
27748 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
27758 for ac_func in raise
27760 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
27761 if test "x$ac_cv_func_raise" = xyes; then :
27762 cat >>confdefs.h <<_ACEOF
27763 #define HAVE_RAISE 1
27769 if test $ac_cv_func_raise = no; then
27772 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27779 if test $gl_cv_type_sigset_t = yes; then
27780 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
27781 if test "x$ac_cv_func_sigprocmask" = xyes; then :
27782 gl_cv_func_sigprocmask=1
27786 if test -z "$gl_cv_func_sigprocmask"; then
27787 HAVE_POSIX_SIGNALBLOCKING=0
27790 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
27795 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
27803 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
27812 M4_LIBOBJS="$M4_LIBOBJS raise.$ac_objext"
27827 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
27835 for ac_func in rawmemchr
27837 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
27838 if test "x$ac_cv_func_rawmemchr" = xyes; then :
27839 cat >>confdefs.h <<_ACEOF
27840 #define HAVE_RAWMEMCHR 1
27846 if test $ac_cv_func_rawmemchr = no; then
27850 if test $HAVE_RAWMEMCHR = 0; then
27859 M4_LIBOBJS="$M4_LIBOBJS rawmemchr.$ac_objext"
27874 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
27881 if test $ac_cv_func_readlink = no; then
27884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
27885 $as_echo_n "checking whether readlink signature is correct... " >&6; }
27886 if ${gl_cv_decl_readlink_works+:} false; then :
27887 $as_echo_n "(cached) " >&6
27889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27890 /* end confdefs.h. */
27891 #include <unistd.h>
27892 /* Cause compilation failure if original declaration has wrong type. */
27893 ssize_t readlink (const char *, char *, size_t);
27902 if ac_fn_c_try_compile "$LINENO"; then :
27903 gl_cv_decl_readlink_works=yes
27905 gl_cv_decl_readlink_works=no
27907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
27910 $as_echo "$gl_cv_decl_readlink_works" >&6; }
27911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
27912 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
27913 if ${gl_cv_func_readlink_works+:} false; then :
27914 $as_echo_n "(cached) " >&6
27916 # We have readlink, so assume ln -s works.
27917 ln -s conftest.no-such conftest.link
27918 ln -s conftest.link conftest.lnk2
27919 if test "$cross_compiling" = yes; then :
27921 # Guess yes on glibc systems.
27922 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
27923 # If we don't know, assume the worst.
27924 *) gl_cv_func_readlink_works="guessing no" ;;
27928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27929 /* end confdefs.h. */
27930 #include <unistd.h>
27936 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
27941 if ac_fn_c_try_run "$LINENO"; then :
27942 gl_cv_func_readlink_works=yes
27944 gl_cv_func_readlink_works=no
27946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27947 conftest.$ac_objext conftest.beam conftest.$ac_ext
27950 rm -f conftest.link conftest.lnk2
27952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
27953 $as_echo "$gl_cv_func_readlink_works" >&6; }
27954 case "$gl_cv_func_readlink_works" in
27956 if test "$gl_cv_decl_readlink_works" != yes; then
27962 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
27969 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
27978 M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
27995 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
28001 # Check whether --with-included-regex was given.
28002 if test "${with_included_regex+set}" = set; then :
28003 withval=$with_included_regex;
28007 case $with_included_regex in #(
28008 yes|no) ac_use_included_regex=$with_included_regex
28011 # If the system regex support is good enough that it passes the
28012 # following run test, then default to *not* using the included regex.c.
28013 # If cross compiling, assume the test would fail and use the included
28016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
28017 $as_echo_n "checking for working re_compile_pattern... " >&6; }
28018 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
28019 $as_echo_n "(cached) " >&6
28021 if test "$cross_compiling" = yes; then :
28022 gl_cv_func_re_compile_pattern_working=no
28024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28025 /* end confdefs.h. */
28028 #include <locale.h>
28029 #include <limits.h>
28030 #include <string.h>
28031 #if HAVE_DECL_ALARM
28032 # include <unistd.h>
28033 # include <signal.h>
28040 static struct re_pattern_buffer regex;
28041 unsigned char folded_chars[UCHAR_MAX + 1];
28044 struct re_registers regs;
28046 #if HAVE_DECL_ALARM
28047 /* Some builds of glibc go into an infinite loop on this test. */
28048 signal (SIGALRM, SIG_DFL);
28051 if (setlocale (LC_ALL, "en_US.UTF-8"))
28054 /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
28055 This test needs valgrind to catch the bug on Debian
28056 GNU/Linux 3.1 x86, but it might catch the bug better
28057 on other platforms and it shouldn't hurt to try the
28059 static char const pat[] = "insert into";
28060 static char const data[] =
28061 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
28062 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
28064 memset (®ex, 0, sizeof regex);
28065 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
28068 else if (re_search (®ex, data, sizeof data - 1,
28069 0, sizeof data - 1, ®s)
28075 /* This test is from glibc bug 15078.
28076 The test case is from Andreas Schwab in
28077 <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
28079 static char const pat[] = "[^x]x";
28080 static char const data[] =
28081 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
28092 memset (®ex, 0, sizeof regex);
28093 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
28098 i = re_search (®ex, data, sizeof data - 1,
28099 0, sizeof data - 1, 0);
28100 if (i != 0 && i != 21)
28105 if (! setlocale (LC_ALL, "C"))
28109 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
28110 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
28111 memset (®ex, 0, sizeof regex);
28112 s = re_compile_pattern ("a[^x]b", 6, ®ex);
28115 /* This should fail, but succeeds for glibc-2.5. */
28116 else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
28119 /* This regular expression is from Spencer ere test number 75
28121 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
28122 memset (®ex, 0, sizeof regex);
28123 for (i = 0; i <= UCHAR_MAX; i++)
28124 folded_chars[i] = i;
28125 regex.translate = folded_chars;
28126 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
28127 /* This should fail with _Invalid character class name_ error. */
28131 /* Ensure that [b-a] is diagnosed as invalid, when
28132 using RE_NO_EMPTY_RANGES. */
28133 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
28134 memset (®ex, 0, sizeof regex);
28135 s = re_compile_pattern ("a[b-a]", 6, ®ex);
28139 /* This should succeed, but does not for glibc-2.1.3. */
28140 memset (®ex, 0, sizeof regex);
28141 s = re_compile_pattern ("{1", 2, ®ex);
28145 /* The following example is derived from a problem report
28146 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
28147 memset (®ex, 0, sizeof regex);
28148 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
28151 /* This should match, but does not for glibc-2.2.1. */
28152 else if (re_match (®ex, "an", 2, 0, ®s) != 2)
28155 memset (®ex, 0, sizeof regex);
28156 s = re_compile_pattern ("x", 1, ®ex);
28159 /* glibc-2.2.93 does not work with a negative RANGE argument. */
28160 else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
28163 /* The version of regex.c in older versions of gnulib
28164 ignored RE_ICASE. Detect that problem too. */
28165 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
28166 memset (®ex, 0, sizeof regex);
28167 s = re_compile_pattern ("x", 1, ®ex);
28170 else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
28173 /* Catch a bug reported by Vin Shelton in
28174 http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
28176 re_set_syntax (RE_SYNTAX_POSIX_BASIC
28177 & ~RE_CONTEXT_INVALID_DUP
28178 & ~RE_NO_EMPTY_RANGES);
28179 memset (®ex, 0, sizeof regex);
28180 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
28184 /* REG_STARTEND was added to glibc on 2004-01-15.
28185 Reject older versions. */
28186 if (! REG_STARTEND)
28190 /* It would be nice to reject hosts whose regoff_t values are too
28191 narrow (including glibc on hosts with 64-bit ptrdiff_t and
28192 32-bit int), but we should wait until glibc implements this
28193 feature. Otherwise, support for equivalence classes and
28194 multibyte collation symbols would always be broken except
28195 when compiling --without-included-regex. */
28196 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
28197 || sizeof (regoff_t) < sizeof (ssize_t))
28207 if ac_fn_c_try_run "$LINENO"; then :
28208 gl_cv_func_re_compile_pattern_working=yes
28210 gl_cv_func_re_compile_pattern_working=no
28212 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28213 conftest.$ac_objext conftest.beam conftest.$ac_ext
28217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
28218 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
28219 case $gl_cv_func_re_compile_pattern_working in #(
28220 yes) ac_use_included_regex=no;; #(
28221 no) ac_use_included_regex=yes;;
28224 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
28228 if test $ac_use_included_regex = yes; then
28230 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
28233 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
28236 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
28239 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
28242 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
28245 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
28248 $as_echo "#define re_search rpl_re_search" >>confdefs.h
28251 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
28254 $as_echo "#define re_match rpl_re_match" >>confdefs.h
28257 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
28260 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
28263 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
28266 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
28269 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
28272 $as_echo "#define regexec rpl_regexec" >>confdefs.h
28275 $as_echo "#define regerror rpl_regerror" >>confdefs.h
28278 $as_echo "#define regfree rpl_regfree" >>confdefs.h
28282 if test $ac_use_included_regex = yes; then
28291 M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
28300 for ac_header in libintl.h
28302 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
28303 if test "x$ac_cv_header_libintl_h" = xyes; then :
28304 cat >>confdefs.h <<_ACEOF
28305 #define HAVE_LIBINTL_H 1
28313 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
28315 if test "x$ac_cv_have_decl_isblank" = xyes; then :
28321 cat >>confdefs.h <<_ACEOF
28322 #define HAVE_DECL_ISBLANK $ac_have_decl
28332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
28333 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
28334 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
28335 $as_echo_n "(cached) " >&6
28337 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
28338 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
28339 as_fn_error $? "cannot create temporary files" "$LINENO" 5
28340 # Assume that if we have lstat, we can also check symlinks.
28341 if test $ac_cv_func_lstat = yes; then
28342 ln -s conftest.f conftest.lnk
28344 if test "$cross_compiling" = yes; then :
28346 # Guess yes on glibc systems.
28347 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
28348 # If we don't know, assume the worst.
28349 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
28353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28354 /* end confdefs.h. */
28356 # include <stdio.h>
28357 # include <stdlib.h>
28363 if (rename ("conftest.f1", "conftest.f2/") == 0)
28365 if (rename ("conftest.d1", "conftest.d2/") != 0)
28368 if (rename ("conftest.f", "conftest.lnk/") == 0)
28377 if ac_fn_c_try_run "$LINENO"; then :
28378 gl_cv_func_rename_slash_dst_works=yes
28380 gl_cv_func_rename_slash_dst_works=no
28382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28383 conftest.$ac_objext conftest.beam conftest.$ac_ext
28386 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
28389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
28390 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
28391 case "$gl_cv_func_rename_slash_dst_works" in
28396 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
28401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
28402 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
28403 if ${gl_cv_func_rename_slash_src_works+:} false; then :
28404 $as_echo_n "(cached) " >&6
28406 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
28407 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
28408 as_fn_error $? "cannot create temporary files" "$LINENO" 5
28409 # Assume that if we have lstat, we can also check symlinks.
28410 if test $ac_cv_func_lstat = yes; then
28411 ln -s conftest.f conftest.lnk
28413 if test "$cross_compiling" = yes; then :
28415 # Guess yes on glibc systems.
28416 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
28417 # If we don't know, assume the worst.
28418 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
28422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28423 /* end confdefs.h. */
28425 # include <stdio.h>
28426 # include <stdlib.h>
28432 if (rename ("conftest.f1/", "conftest.d3") == 0)
28434 if (rename ("conftest.d1/", "conftest.d2") != 0)
28437 if (rename ("conftest.lnk/", "conftest.f") == 0)
28446 if ac_fn_c_try_run "$LINENO"; then :
28447 gl_cv_func_rename_slash_src_works=yes
28449 gl_cv_func_rename_slash_src_works=no
28451 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28452 conftest.$ac_objext conftest.beam conftest.$ac_ext
28455 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
28458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
28459 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
28460 case "$gl_cv_func_rename_slash_src_works" in
28465 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
28471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
28472 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
28473 if ${gl_cv_func_rename_link_works+:} false; then :
28474 $as_echo_n "(cached) " >&6
28476 if test $ac_cv_func_link = yes; then
28477 rm -rf conftest.f conftest.f1
28478 if touch conftest.f && ln conftest.f conftest.f1 &&
28479 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
28480 if test "$cross_compiling" = yes; then :
28482 # Guess yes on glibc systems.
28483 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
28484 # If we don't know, assume the worst.
28485 *) gl_cv_func_rename_link_works="guessing no" ;;
28489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28490 /* end confdefs.h. */
28492 # include <stdio.h>
28493 # include <stdlib.h>
28494 # include <unistd.h>
28500 if (rename ("conftest.f", "conftest.f1"))
28502 if (unlink ("conftest.f1"))
28504 if (rename ("conftest.f", "conftest.f"))
28506 if (rename ("conftest.f1", "conftest.f1") == 0)
28514 if ac_fn_c_try_run "$LINENO"; then :
28515 gl_cv_func_rename_link_works=yes
28517 gl_cv_func_rename_link_works=no
28519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28520 conftest.$ac_objext conftest.beam conftest.$ac_ext
28524 gl_cv_func_rename_link_works="guessing no"
28526 rm -rf conftest.f conftest.f1
28528 gl_cv_func_rename_link_works=yes
28532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
28533 $as_echo "$gl_cv_func_rename_link_works" >&6; }
28534 case "$gl_cv_func_rename_link_works" in
28539 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
28544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
28545 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
28546 if ${gl_cv_func_rename_dest_works+:} false; then :
28547 $as_echo_n "(cached) " >&6
28549 rm -rf conftest.f conftest.d1 conftest.d2
28550 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
28551 as_fn_error $? "cannot create temporary files" "$LINENO" 5
28552 if test "$cross_compiling" = yes; then :
28554 # Guess yes on glibc systems.
28555 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
28556 # If we don't know, assume the worst.
28557 *) gl_cv_func_rename_dest_works="guessing no" ;;
28561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28562 /* end confdefs.h. */
28564 # include <stdio.h>
28565 # include <stdlib.h>
28571 if (rename ("conftest.d1", "conftest.d2") != 0)
28573 if (rename ("conftest.d2", "conftest.f") == 0)
28581 if ac_fn_c_try_run "$LINENO"; then :
28582 gl_cv_func_rename_dest_works=yes
28584 gl_cv_func_rename_dest_works=no
28586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28587 conftest.$ac_objext conftest.beam conftest.$ac_ext
28590 rm -rf conftest.f conftest.d1 conftest.d2
28593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
28594 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
28595 case "$gl_cv_func_rename_dest_works" in
28600 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
28605 if test $REPLACE_RENAME = 1; then
28614 M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
28628 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
28635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
28636 $as_echo_n "checking whether rmdir works... " >&6; }
28637 if ${gl_cv_func_rmdir_works+:} false; then :
28638 $as_echo_n "(cached) " >&6
28641 touch conftest.file
28642 if test "$cross_compiling" = yes; then :
28644 # Guess yes on glibc systems.
28645 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
28646 # If we don't know, assume the worst.
28647 *) gl_cv_func_rmdir_works="guessing no" ;;
28651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28652 /* end confdefs.h. */
28656 # include <unistd.h>
28657 #else /* on Windows with MSVC */
28658 # include <direct.h>
28665 if (!rmdir ("conftest.file/"))
28667 else if (errno != ENOTDIR)
28669 if (!rmdir ("conftest.dir/./"))
28677 if ac_fn_c_try_run "$LINENO"; then :
28678 gl_cv_func_rmdir_works=yes
28680 gl_cv_func_rmdir_works=no
28682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28683 conftest.$ac_objext conftest.beam conftest.$ac_ext
28686 rm -rf conftest.dir conftest.file
28688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
28689 $as_echo "$gl_cv_func_rmdir_works" >&6; }
28690 case "$gl_cv_func_rmdir_works" in
28697 if test $REPLACE_RMDIR = 1; then
28706 M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
28720 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
28725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28726 /* end confdefs.h. */
28729 struct sched_param a;
28730 int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
28741 if ac_fn_c_try_compile "$LINENO"; then :
28755 if test $gl_cv_have_include_next = yes; then
28756 gl_cv_next_sched_h='<'sched.h'>'
28758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
28759 $as_echo_n "checking absolute name of <sched.h>... " >&6; }
28760 if ${gl_cv_next_sched_h+:} false; then :
28761 $as_echo_n "(cached) " >&6
28764 if test $ac_cv_header_sched_h = yes; then
28767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28768 /* end confdefs.h. */
28773 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28774 *) gl_absname_cpp="$ac_cpp" ;;
28779 gl_dirsep_regex='[/\\]'
28782 gl_dirsep_regex='\/'
28785 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28787 gl_header_literal_regex=`echo 'sched.h' \
28788 | sed -e "$gl_make_literal_regex_sed"`
28789 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28790 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28795 gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28796 sed -n "$gl_absolute_header_sed"`'"'
28798 gl_cv_next_sched_h='<'sched.h'>'
28803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
28804 $as_echo "$gl_cv_next_sched_h" >&6; }
28806 NEXT_SCHED_H=$gl_cv_next_sched_h
28808 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28809 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28810 gl_next_as_first_directive='<'sched.h'>'
28812 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28813 gl_next_as_first_directive=$gl_cv_next_sched_h
28815 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
28821 if test $ac_cv_header_sched_h = yes; then
28828 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
28830 if test "x$ac_cv_type_struct_sched_param" = xyes; then :
28831 HAVE_STRUCT_SCHED_PARAM=1
28833 HAVE_STRUCT_SCHED_PARAM=0
28841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28843 if test -n "$SCHED_H"; then
28844 GL_GENERATE_SCHED_H_TRUE=
28845 GL_GENERATE_SCHED_H_FALSE='#'
28847 GL_GENERATE_SCHED_H_TRUE='#'
28848 GL_GENERATE_SCHED_H_FALSE=
28857 if test $ac_cv_func_secure_getenv = no; then
28858 HAVE_SECURE_GETENV=0
28861 if test $HAVE_SECURE_GETENV = 0; then
28870 M4_LIBOBJS="$M4_LIBOBJS secure_getenv.$ac_objext"
28873 for ac_func in __secure_getenv
28875 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28876 if test "x$ac_cv_func___secure_getenv" = xyes; then :
28877 cat >>confdefs.h <<_ACEOF
28878 #define HAVE___SECURE_GETENV 1
28884 if test $ac_cv_func___secure_getenv = no; then
28885 for ac_func in issetugid
28887 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28888 if test "x$ac_cv_func_issetugid" = xyes; then :
28889 cat >>confdefs.h <<_ACEOF
28890 #define HAVE_ISSETUGID 1
28904 GNULIB_SECURE_GETENV=1
28910 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
28917 if test $ac_cv_func_sigaction = yes; then
28918 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
28920 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
28922 cat >>confdefs.h <<_ACEOF
28923 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
28929 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
28930 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
28936 if test $HAVE_SIGACTION = 0; then
28945 M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
28953 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
28954 #include <signal.h>
28957 if test "x$ac_cv_type_siginfo_t" = xyes; then :
28959 cat >>confdefs.h <<_ACEOF
28960 #define HAVE_SIGINFO_T 1
28966 if test $ac_cv_type_siginfo_t = no; then
28982 $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
28997 if test $gl_cv_have_include_next = yes; then
28998 gl_cv_next_signal_h='<'signal.h'>'
29000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
29001 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
29002 if ${gl_cv_next_signal_h+:} false; then :
29003 $as_echo_n "(cached) " >&6
29006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29007 /* end confdefs.h. */
29008 #include <signal.h>
29012 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29013 *) gl_absname_cpp="$ac_cpp" ;;
29018 gl_dirsep_regex='[/\\]'
29021 gl_dirsep_regex='\/'
29024 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29026 gl_header_literal_regex=`echo 'signal.h' \
29027 | sed -e "$gl_make_literal_regex_sed"`
29028 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29029 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29034 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29035 sed -n "$gl_absolute_header_sed"`'"'
29039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
29040 $as_echo "$gl_cv_next_signal_h" >&6; }
29042 NEXT_SIGNAL_H=$gl_cv_next_signal_h
29044 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29045 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29046 gl_next_as_first_directive='<'signal.h'>'
29048 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29049 gl_next_as_first_directive=$gl_cv_next_signal_h
29051 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
29057 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
29058 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
29059 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
29060 #include <signal.h>
29063 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
29066 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
29075 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
29076 #include <signal.h>
29079 if test "x$ac_cv_type_sighandler_t" = xyes; then :
29082 HAVE_SIGHANDLER_T=0
29090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
29091 $as_echo_n "checking for signbit macro... " >&6; }
29092 if ${gl_cv_func_signbit+:} false; then :
29093 $as_echo_n "(cached) " >&6
29096 if test "$cross_compiling" = yes; then :
29098 # Guess yes on glibc systems.
29099 *-gnu*) gl_cv_func_signbit="guessing yes" ;;
29100 # If we don't know, assume the worst.
29101 *) gl_cv_func_signbit="guessing no" ;;
29105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29106 /* end confdefs.h. */
29109 /* If signbit is defined as a function, don't use it, since calling it for
29110 'float' or 'long double' arguments would involve conversions.
29111 If signbit is not declared at all but exists as a library function, don't
29112 use it, since the prototype may not match.
29113 If signbit is not declared at all but exists as a compiler built-in, don't
29114 use it, since it's preferable to use __builtin_signbit* (no warnings,
29115 no conversions). */
29117 # error "signbit should be a macro"
29119 #include <string.h>
29121 /* Global variables.
29122 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
29123 but cannot constant-fold __builtin_signbitl (variable). */
29129 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
29130 So we use -p0f and -p0d instead. */
29135 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
29136 So we use another constant expression instead.
29137 But that expression does not work on other platforms, such as when
29138 cross-compiling to PowerPC on Mac OS X 10.5. */
29139 long double p0l = 0.0L;
29140 #if defined __hpux || defined __sgi
29141 long double m0l = -LDBL_MIN * LDBL_MIN;
29143 long double m0l = -p0l;
29146 if (signbit (vf)) /* link check */
29149 float plus_inf = 1.0f / p0f;
29150 float minus_inf = -1.0f / p0f;
29151 if (!(!signbit (255.0f)
29152 && signbit (-255.0f)
29154 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
29155 && !signbit (plus_inf)
29156 && signbit (minus_inf)))
29159 if (signbit (vd)) /* link check */
29162 double plus_inf = 1.0 / p0d;
29163 double minus_inf = -1.0 / p0d;
29164 if (!(!signbit (255.0)
29165 && signbit (-255.0)
29167 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
29168 && !signbit (plus_inf)
29169 && signbit (minus_inf)))
29172 if (signbit (vl)) /* link check */
29175 long double plus_inf = 1.0L / p0l;
29176 long double minus_inf = -1.0L / p0l;
29177 if (signbit (255.0L))
29179 if (!signbit (-255.0L))
29183 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
29185 if (signbit (plus_inf))
29187 if (!signbit (minus_inf))
29195 if ac_fn_c_try_run "$LINENO"; then :
29196 gl_cv_func_signbit=yes
29198 gl_cv_func_signbit=no
29200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29201 conftest.$ac_objext conftest.beam conftest.$ac_ext
29206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
29207 $as_echo "$gl_cv_func_signbit" >&6; }
29208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
29209 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
29210 if ${gl_cv_func_signbit_gcc+:} false; then :
29211 $as_echo_n "(cached) " >&6
29214 if test "$cross_compiling" = yes; then :
29216 # Guess yes on glibc systems.
29217 *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
29218 # If we don't know, assume the worst.
29219 *) gl_cv_func_signbit_gcc="guessing no" ;;
29223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29224 /* end confdefs.h. */
29227 # define signbit(x) \
29228 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
29229 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
29230 __builtin_signbitf (x))
29232 # error "signbit should be three compiler built-ins"
29234 #include <string.h>
29236 /* Global variables.
29237 Needed because GCC 4 constant-folds __builtin_signbitl (literal)
29238 but cannot constant-fold __builtin_signbitl (variable). */
29244 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
29245 So we use -p0f and -p0d instead. */
29250 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
29251 So we use another constant expression instead.
29252 But that expression does not work on other platforms, such as when
29253 cross-compiling to PowerPC on Mac OS X 10.5. */
29254 long double p0l = 0.0L;
29255 #if defined __hpux || defined __sgi
29256 long double m0l = -LDBL_MIN * LDBL_MIN;
29258 long double m0l = -p0l;
29261 if (signbit (vf)) /* link check */
29264 float plus_inf = 1.0f / p0f;
29265 float minus_inf = -1.0f / p0f;
29266 if (!(!signbit (255.0f)
29267 && signbit (-255.0f)
29269 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
29270 && !signbit (plus_inf)
29271 && signbit (minus_inf)))
29274 if (signbit (vd)) /* link check */
29277 double plus_inf = 1.0 / p0d;
29278 double minus_inf = -1.0 / p0d;
29279 if (!(!signbit (255.0)
29280 && signbit (-255.0)
29282 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
29283 && !signbit (plus_inf)
29284 && signbit (minus_inf)))
29287 if (signbit (vl)) /* link check */
29290 long double plus_inf = 1.0L / p0l;
29291 long double minus_inf = -1.0L / p0l;
29292 if (signbit (255.0L))
29294 if (!signbit (-255.0L))
29298 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
29300 if (signbit (plus_inf))
29302 if (!signbit (minus_inf))
29310 if ac_fn_c_try_run "$LINENO"; then :
29311 gl_cv_func_signbit_gcc=yes
29313 gl_cv_func_signbit_gcc=no
29315 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29316 conftest.$ac_objext conftest.beam conftest.$ac_ext
29321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
29322 $as_echo "$gl_cv_func_signbit_gcc" >&6; }
29323 case "$gl_cv_func_signbit_gcc" in
29325 REPLACE_SIGNBIT_USING_GCC=1
29328 case "$gl_cv_func_signbit" in
29334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
29335 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
29336 if ${gl_cv_cc_float_signbit+:} false; then :
29337 $as_echo_n "(cached) " >&6
29340 if test "$cross_compiling" = yes; then :
29342 gl_cv_cc_float_signbit="unknown"
29345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29346 /* end confdefs.h. */
29348 #include <stddef.h>
29351 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
29352 typedef union { float value; unsigned int word[NWORDS]; }
29354 static memory_float plus = { 1.0f };
29355 static memory_float minus = { -1.0f };
29360 FILE *fp = fopen ("conftest.out", "w");
29363 /* Find the different bit. */
29365 for (j = 0; j < NWORDS; j++)
29367 unsigned int x = plus.word[j] ^ minus.word[j];
29368 if ((x & (x - 1)) || (x && m))
29370 /* More than one bit difference. */
29371 fprintf (fp, "unknown");
29382 /* No difference. */
29383 fprintf (fp, "unknown");
29386 /* Now m = plus.word[k] ^ ~minus.word[k]. */
29387 if (plus.word[k] & ~minus.word[k])
29389 /* Oh? The sign bit is set in the positive and cleared in the negative
29391 fprintf (fp, "unknown");
29397 fprintf (fp, "word %d bit %d", (int) k, (int) i);
29398 if (fclose (fp) != 0)
29404 if ac_fn_c_try_run "$LINENO"; then :
29405 gl_cv_cc_float_signbit=`cat conftest.out`
29407 gl_cv_cc_float_signbit="unknown"
29409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29410 conftest.$ac_objext conftest.beam conftest.$ac_ext
29416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
29417 $as_echo "$gl_cv_cc_float_signbit" >&6; }
29418 case "$gl_cv_cc_float_signbit" in
29420 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
29421 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
29423 cat >>confdefs.h <<_ACEOF
29424 #define FLT_SIGNBIT_WORD $word
29428 cat >>confdefs.h <<_ACEOF
29429 #define FLT_SIGNBIT_BIT $bit
29438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
29439 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
29440 if ${gl_cv_cc_double_signbit+:} false; then :
29441 $as_echo_n "(cached) " >&6
29444 if test "$cross_compiling" = yes; then :
29446 gl_cv_cc_double_signbit="unknown"
29449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29450 /* end confdefs.h. */
29452 #include <stddef.h>
29455 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
29456 typedef union { double value; unsigned int word[NWORDS]; }
29458 static memory_float plus = { 1.0 };
29459 static memory_float minus = { -1.0 };
29464 FILE *fp = fopen ("conftest.out", "w");
29467 /* Find the different bit. */
29469 for (j = 0; j < NWORDS; j++)
29471 unsigned int x = plus.word[j] ^ minus.word[j];
29472 if ((x & (x - 1)) || (x && m))
29474 /* More than one bit difference. */
29475 fprintf (fp, "unknown");
29486 /* No difference. */
29487 fprintf (fp, "unknown");
29490 /* Now m = plus.word[k] ^ ~minus.word[k]. */
29491 if (plus.word[k] & ~minus.word[k])
29493 /* Oh? The sign bit is set in the positive and cleared in the negative
29495 fprintf (fp, "unknown");
29501 fprintf (fp, "word %d bit %d", (int) k, (int) i);
29502 if (fclose (fp) != 0)
29508 if ac_fn_c_try_run "$LINENO"; then :
29509 gl_cv_cc_double_signbit=`cat conftest.out`
29511 gl_cv_cc_double_signbit="unknown"
29513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29514 conftest.$ac_objext conftest.beam conftest.$ac_ext
29520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
29521 $as_echo "$gl_cv_cc_double_signbit" >&6; }
29522 case "$gl_cv_cc_double_signbit" in
29524 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
29525 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
29527 cat >>confdefs.h <<_ACEOF
29528 #define DBL_SIGNBIT_WORD $word
29532 cat >>confdefs.h <<_ACEOF
29533 #define DBL_SIGNBIT_BIT $bit
29542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
29543 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
29544 if ${gl_cv_cc_long_double_signbit+:} false; then :
29545 $as_echo_n "(cached) " >&6
29548 if test "$cross_compiling" = yes; then :
29550 gl_cv_cc_long_double_signbit="unknown"
29553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29554 /* end confdefs.h. */
29556 #include <stddef.h>
29559 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
29560 typedef union { long double value; unsigned int word[NWORDS]; }
29562 static memory_float plus = { 1.0L };
29563 static memory_float minus = { -1.0L };
29568 FILE *fp = fopen ("conftest.out", "w");
29571 /* Find the different bit. */
29573 for (j = 0; j < NWORDS; j++)
29575 unsigned int x = plus.word[j] ^ minus.word[j];
29576 if ((x & (x - 1)) || (x && m))
29578 /* More than one bit difference. */
29579 fprintf (fp, "unknown");
29590 /* No difference. */
29591 fprintf (fp, "unknown");
29594 /* Now m = plus.word[k] ^ ~minus.word[k]. */
29595 if (plus.word[k] & ~minus.word[k])
29597 /* Oh? The sign bit is set in the positive and cleared in the negative
29599 fprintf (fp, "unknown");
29605 fprintf (fp, "word %d bit %d", (int) k, (int) i);
29606 if (fclose (fp) != 0)
29612 if ac_fn_c_try_run "$LINENO"; then :
29613 gl_cv_cc_long_double_signbit=`cat conftest.out`
29615 gl_cv_cc_long_double_signbit="unknown"
29617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29618 conftest.$ac_objext conftest.beam conftest.$ac_ext
29624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
29625 $as_echo "$gl_cv_cc_long_double_signbit" >&6; }
29626 case "$gl_cv_cc_long_double_signbit" in
29628 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
29629 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
29631 cat >>confdefs.h <<_ACEOF
29632 #define LDBL_SIGNBIT_WORD $word
29636 cat >>confdefs.h <<_ACEOF
29637 #define LDBL_SIGNBIT_BIT $bit
29644 if test "$gl_cv_cc_float_signbit" = unknown; then
29645 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
29647 if test "x$ac_cv_have_decl_copysignf" = xyes; then :
29653 cat >>confdefs.h <<_ACEOF
29654 #define HAVE_DECL_COPYSIGNF $ac_have_decl
29657 if test "$ac_cv_have_decl_copysignf" = yes; then
29658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
29659 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
29660 if ${gl_cv_func_copysignf_no_libm+:} false; then :
29661 $as_echo_n "(cached) " >&6
29664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29665 /* end confdefs.h. */
29671 return copysignf (x, y) < 0;
29676 if ac_fn_c_try_link "$LINENO"; then :
29677 gl_cv_func_copysignf_no_libm=yes
29679 gl_cv_func_copysignf_no_libm=no
29681 rm -f core conftest.err conftest.$ac_objext \
29682 conftest$ac_exeext conftest.$ac_ext
29685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
29686 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
29687 if test $gl_cv_func_copysignf_no_libm = yes; then
29689 $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
29694 if test "$gl_cv_cc_double_signbit" = unknown; then
29695 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
29697 if test "x$ac_cv_have_decl_copysign" = xyes; then :
29703 cat >>confdefs.h <<_ACEOF
29704 #define HAVE_DECL_COPYSIGN $ac_have_decl
29707 if test "$ac_cv_have_decl_copysign" = yes; then
29708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
29709 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
29710 if ${gl_cv_func_copysign_no_libm+:} false; then :
29711 $as_echo_n "(cached) " >&6
29714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29715 /* end confdefs.h. */
29721 return copysign (x, y) < 0;
29726 if ac_fn_c_try_link "$LINENO"; then :
29727 gl_cv_func_copysign_no_libm=yes
29729 gl_cv_func_copysign_no_libm=no
29731 rm -f core conftest.err conftest.$ac_objext \
29732 conftest$ac_exeext conftest.$ac_ext
29735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
29736 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
29737 if test $gl_cv_func_copysign_no_libm = yes; then
29739 $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
29744 if test "$gl_cv_cc_long_double_signbit" = unknown; then
29745 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
29747 if test "x$ac_cv_have_decl_copysignl" = xyes; then :
29753 cat >>confdefs.h <<_ACEOF
29754 #define HAVE_DECL_COPYSIGNL $ac_have_decl
29757 if test "$ac_cv_have_decl_copysignl" = yes; then
29758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
29759 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
29760 if ${gl_cv_func_copysignl_no_libm+:} false; then :
29761 $as_echo_n "(cached) " >&6
29764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29765 /* end confdefs.h. */
29771 return copysignl (x, y) < 0;
29776 if ac_fn_c_try_link "$LINENO"; then :
29777 gl_cv_func_copysignl_no_libm=yes
29779 gl_cv_func_copysignl_no_libm=no
29781 rm -f core conftest.err conftest.$ac_objext \
29782 conftest$ac_exeext conftest.$ac_ext
29785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
29786 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
29787 if test $gl_cv_func_copysignl_no_libm = yes; then
29789 $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
29799 if test $REPLACE_SIGNBIT = 1; then
29808 M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
29818 M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
29828 M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
29842 $as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
29851 cat >>confdefs.h <<_ACEOF
29852 #define GNULIB_SIGPIPE 1
29857 GNULIB_SIGNAL_H_SIGPIPE=1
29860 GNULIB_STDIO_H_SIGPIPE=1
29862 GNULIB_UNISTD_H_SIGPIPE=1
29866 if test $gl_cv_type_sigset_t = yes; then
29867 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
29868 if test "x$ac_cv_func_sigprocmask" = xyes; then :
29869 gl_cv_func_sigprocmask=1
29873 if test -z "$gl_cv_func_sigprocmask"; then
29874 HAVE_POSIX_SIGNALBLOCKING=0
29877 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
29886 M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
29895 GNULIB_SIGPROCMASK=1
29901 $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
29906 for ac_header in stdint.h
29908 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29909 if test "x$ac_cv_header_stdint_h" = xyes; then :
29910 cat >>confdefs.h <<_ACEOF
29911 #define HAVE_STDINT_H 1
29918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
29919 $as_echo_n "checking for SIZE_MAX... " >&6; }
29920 if ${gl_cv_size_max+:} false; then :
29921 $as_echo_n "(cached) " >&6
29925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29926 /* end confdefs.h. */
29928 #include <limits.h>
29930 #include <stdint.h>
29937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29938 $EGREP "Found it" >/dev/null 2>&1; then :
29943 if test -z "$gl_cv_size_max"; then
29944 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
29945 #include <limits.h>"; then :
29948 size_t_bits_minus_1=
29951 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
29957 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
29958 if test $fits_in_uint = 1; then
29959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29960 /* end confdefs.h. */
29961 #include <stddef.h>
29963 extern unsigned long foo;
29973 if ac_fn_c_try_compile "$LINENO"; then :
29976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29978 if test $fits_in_uint = 1; then
29979 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
29981 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
29984 gl_cv_size_max='((size_t)~(size_t)0)'
29989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
29990 $as_echo "$gl_cv_size_max" >&6; }
29991 if test "$gl_cv_size_max" != yes; then
29993 cat >>confdefs.h <<_ACEOF
29994 #define SIZE_MAX $gl_cv_size_max
30002 gl_cv_func_snprintf_usable=no
30003 for ac_func in snprintf
30005 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
30006 if test "x$ac_cv_func_snprintf" = xyes; then :
30007 cat >>confdefs.h <<_ACEOF
30008 #define HAVE_SNPRINTF 1
30014 if test $ac_cv_func_snprintf = yes; then
30018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
30019 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
30020 if ${gl_cv_func_snprintf_size1+:} false; then :
30021 $as_echo_n "(cached) " >&6
30024 if test "$cross_compiling" = yes; then :
30025 gl_cv_func_snprintf_size1="guessing yes"
30027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30028 /* end confdefs.h. */
30032 # define my_snprintf snprintf
30034 # include <stdarg.h>
30035 static int my_snprintf (char *buf, int size, const char *format, ...)
30039 va_start (args, format);
30040 ret = vsnprintf (buf, size, format, args);
30047 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
30048 my_snprintf (buf, 1, "%d", 12345);
30049 return buf[1] != 'E';
30052 if ac_fn_c_try_run "$LINENO"; then :
30053 gl_cv_func_snprintf_size1=yes
30055 gl_cv_func_snprintf_size1=no
30057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30058 conftest.$ac_objext conftest.beam conftest.$ac_ext
30063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
30064 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
30066 case "$gl_cv_func_snprintf_size1" in
30069 case "$gl_cv_func_snprintf_retval_c99" in
30073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
30074 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
30075 if ${gl_cv_func_printf_positions+:} false; then :
30076 $as_echo_n "(cached) " >&6
30079 if test "$cross_compiling" = yes; then :
30082 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
30083 gl_cv_func_printf_positions="guessing no";;
30084 beos*) gl_cv_func_printf_positions="guessing no";;
30085 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
30086 *) gl_cv_func_printf_positions="guessing yes";;
30090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30091 /* end confdefs.h. */
30094 #include <string.h>
30095 /* The string "%2$d %1$d", with dollar characters protected from the shell's
30096 dollar expansion (possibly an autoconf bug). */
30097 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
30098 static char buf[100];
30101 sprintf (buf, format, 33, 55);
30102 return (strcmp (buf, "55 33") != 0);
30105 if ac_fn_c_try_run "$LINENO"; then :
30106 gl_cv_func_printf_positions=yes
30108 gl_cv_func_printf_positions=no
30110 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30111 conftest.$ac_objext conftest.beam conftest.$ac_ext
30116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
30117 $as_echo "$gl_cv_func_printf_positions" >&6; }
30119 case "$gl_cv_func_printf_positions" in
30121 gl_cv_func_snprintf_usable=yes
30129 if test $gl_cv_func_snprintf_usable = no; then
30140 M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
30142 if test $ac_cv_func_snprintf = yes; then
30149 if test $ac_cv_have_decl_snprintf = no; then
30150 HAVE_DECL_SNPRINTF=0
30164 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
30170 cat >>confdefs.h <<_ACEOF
30171 #define GNULIB_SNPRINTF 1
30187 if test $gl_cv_have_include_next = yes; then
30188 gl_cv_next_spawn_h='<'spawn.h'>'
30190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
30191 $as_echo_n "checking absolute name of <spawn.h>... " >&6; }
30192 if ${gl_cv_next_spawn_h+:} false; then :
30193 $as_echo_n "(cached) " >&6
30196 if test $ac_cv_header_spawn_h = yes; then
30199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30200 /* end confdefs.h. */
30205 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30206 *) gl_absname_cpp="$ac_cpp" ;;
30211 gl_dirsep_regex='[/\\]'
30214 gl_dirsep_regex='\/'
30217 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30219 gl_header_literal_regex=`echo 'spawn.h' \
30220 | sed -e "$gl_make_literal_regex_sed"`
30221 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30222 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30227 gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30228 sed -n "$gl_absolute_header_sed"`'"'
30230 gl_cv_next_spawn_h='<'spawn.h'>'
30235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
30236 $as_echo "$gl_cv_next_spawn_h" >&6; }
30238 NEXT_SPAWN_H=$gl_cv_next_spawn_h
30240 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30241 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30242 gl_next_as_first_directive='<'spawn.h'>'
30244 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30245 gl_next_as_first_directive=$gl_cv_next_spawn_h
30247 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
30253 if test $ac_cv_header_spawn_h = yes; then
30255 ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
30259 if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
30261 cat >>confdefs.h <<_ACEOF
30262 #define HAVE_POSIX_SPAWNATTR_T 1
30267 HAVE_POSIX_SPAWNATTR_T=0
30270 ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
30274 if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
30276 cat >>confdefs.h <<_ACEOF
30277 #define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
30282 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
30287 HAVE_POSIX_SPAWNATTR_T=0
30288 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
30306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
30307 $as_echo_n "checking for ssize_t... " >&6; }
30308 if ${gt_cv_ssize_t+:} false; then :
30309 $as_echo_n "(cached) " >&6
30311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30312 /* end confdefs.h. */
30313 #include <sys/types.h>
30317 int x = sizeof (ssize_t *) + sizeof (ssize_t);
30323 if ac_fn_c_try_compile "$LINENO"; then :
30328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
30331 $as_echo "$gt_cv_ssize_t" >&6; }
30332 if test $gt_cv_ssize_t = no; then
30334 $as_echo "#define ssize_t int" >>confdefs.h
30341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
30342 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
30343 if ${gl_cv_func_stat_dir_slash+:} false; then :
30344 $as_echo_n "(cached) " >&6
30346 if test "$cross_compiling" = yes; then :
30348 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
30349 *) gl_cv_func_stat_dir_slash="guessing yes";;
30352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30353 /* end confdefs.h. */
30354 #include <sys/stat.h>
30359 struct stat st; return stat (".", &st) != stat ("./", &st);
30364 if ac_fn_c_try_run "$LINENO"; then :
30365 gl_cv_func_stat_dir_slash=yes
30367 gl_cv_func_stat_dir_slash=no
30369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30370 conftest.$ac_objext conftest.beam conftest.$ac_ext
30374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
30375 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
30376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
30377 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
30378 if ${gl_cv_func_stat_file_slash+:} false; then :
30379 $as_echo_n "(cached) " >&6
30382 # Assume that if we have lstat, we can also check symlinks.
30383 if test $ac_cv_func_lstat = yes; then
30384 ln -s conftest.tmp conftest.lnk
30386 if test "$cross_compiling" = yes; then :
30388 # Guess yes on glibc systems.
30389 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
30390 # If we don't know, assume the worst.
30391 *) gl_cv_func_stat_file_slash="guessing no" ;;
30395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30396 /* end confdefs.h. */
30397 #include <sys/stat.h>
30404 if (!stat ("conftest.tmp/", &st))
30407 if (!stat ("conftest.lnk/", &st))
30416 if ac_fn_c_try_run "$LINENO"; then :
30417 gl_cv_func_stat_file_slash=yes
30419 gl_cv_func_stat_file_slash=no
30421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30422 conftest.$ac_objext conftest.beam conftest.$ac_ext
30425 rm -f conftest.tmp conftest.lnk
30427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
30428 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
30429 case $gl_cv_func_stat_dir_slash in
30430 *no) REPLACE_STAT=1
30432 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
30435 case $gl_cv_func_stat_file_slash in
30436 *no) REPLACE_STAT=1
30438 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
30442 if test $REPLACE_STAT = 1; then
30451 M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
30466 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
30472 NEXT_STDARG_H='<stdarg.h>'
30473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
30474 $as_echo_n "checking for va_copy... " >&6; }
30475 if ${gl_cv_func_va_copy+:} false; then :
30476 $as_echo_n "(cached) " >&6
30479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30480 /* end confdefs.h. */
30481 #include <stdarg.h>
30487 void (*func) (va_list, va_list) = va_copy;
30494 if ac_fn_c_try_compile "$LINENO"; then :
30495 gl_cv_func_va_copy=yes
30497 gl_cv_func_va_copy=no
30499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
30503 $as_echo "$gl_cv_func_va_copy" >&6; }
30504 if test $gl_cv_func_va_copy = no; then
30505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30506 /* end confdefs.h. */
30507 #if defined _AIX && !defined __GNUC__
30512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30513 $EGREP "vaccine" >/dev/null 2>&1; then :
30520 if test $gl_aixcc = yes; then
30530 if test $gl_cv_have_include_next = yes; then
30531 gl_cv_next_stdarg_h='<'stdarg.h'>'
30533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
30534 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
30535 if ${gl_cv_next_stdarg_h+:} false; then :
30536 $as_echo_n "(cached) " >&6
30539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30540 /* end confdefs.h. */
30541 #include <stdarg.h>
30545 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30546 *) gl_absname_cpp="$ac_cpp" ;;
30551 gl_dirsep_regex='[/\\]'
30554 gl_dirsep_regex='\/'
30557 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30559 gl_header_literal_regex=`echo 'stdarg.h' \
30560 | sed -e "$gl_make_literal_regex_sed"`
30561 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30562 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30567 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30568 sed -n "$gl_absolute_header_sed"`'"'
30572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
30573 $as_echo "$gl_cv_next_stdarg_h" >&6; }
30575 NEXT_STDARG_H=$gl_cv_next_stdarg_h
30577 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30578 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30579 gl_next_as_first_directive='<'stdarg.h'>'
30581 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30582 gl_next_as_first_directive=$gl_cv_next_stdarg_h
30584 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
30589 if test "$gl_cv_next_stdarg_h" = '""'; then
30590 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
30591 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
30595 saved_as_echo_n="$as_echo_n"
30597 if ${gl_cv_func___va_copy+:} false; then :
30598 $as_echo_n "(cached) " >&6
30601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30602 /* end confdefs.h. */
30603 #include <stdarg.h>
30616 if ac_fn_c_try_compile "$LINENO"; then :
30617 gl_cv_func___va_copy=yes
30619 gl_cv_func___va_copy=no
30621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30624 as_echo_n="$saved_as_echo_n"
30626 if test $gl_cv_func___va_copy = yes; then
30628 $as_echo "#define va_copy __va_copy" >>confdefs.h
30633 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
30639 if test -n "$STDARG_H"; then
30640 GL_GENERATE_STDARG_H_TRUE=
30641 GL_GENERATE_STDARG_H_FALSE='#'
30643 GL_GENERATE_STDARG_H_TRUE='#'
30644 GL_GENERATE_STDARG_H_FALSE=
30652 # Define two additional variables used in the Makefile substitution.
30654 if test "$ac_cv_header_stdbool_h" = yes; then
30657 STDBOOL_H='stdbool.h'
30660 if test -n "$STDBOOL_H"; then
30661 GL_GENERATE_STDBOOL_H_TRUE=
30662 GL_GENERATE_STDBOOL_H_FALSE='#'
30664 GL_GENERATE_STDBOOL_H_TRUE='#'
30665 GL_GENERATE_STDBOOL_H_FALSE=
30669 if test "$ac_cv_type__Bool" = yes; then
30680 if test $gt_cv_c_wchar_t = no; then
30684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
30685 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
30686 if ${gl_cv_decl_null_works+:} false; then :
30687 $as_echo_n "(cached) " >&6
30689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30690 /* end confdefs.h. */
30691 #include <stddef.h>
30692 int test[2 * (sizeof NULL == sizeof (void *)) -1];
30702 if ac_fn_c_try_compile "$LINENO"; then :
30703 gl_cv_decl_null_works=yes
30705 gl_cv_decl_null_works=no
30707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
30710 $as_echo "$gl_cv_decl_null_works" >&6; }
30711 if test $gl_cv_decl_null_works = no; then
30716 if test -n "$STDDEF_H"; then
30717 GL_GENERATE_STDDEF_H_TRUE=
30718 GL_GENERATE_STDDEF_H_FALSE='#'
30720 GL_GENERATE_STDDEF_H_TRUE='#'
30721 GL_GENERATE_STDDEF_H_FALSE=
30724 if test -n "$STDDEF_H"; then
30733 if test $gl_cv_have_include_next = yes; then
30734 gl_cv_next_stddef_h='<'stddef.h'>'
30736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
30737 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
30738 if ${gl_cv_next_stddef_h+:} false; then :
30739 $as_echo_n "(cached) " >&6
30742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30743 /* end confdefs.h. */
30744 #include <stddef.h>
30748 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30749 *) gl_absname_cpp="$ac_cpp" ;;
30754 gl_dirsep_regex='[/\\]'
30757 gl_dirsep_regex='\/'
30760 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30762 gl_header_literal_regex=`echo 'stddef.h' \
30763 | sed -e "$gl_make_literal_regex_sed"`
30764 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30765 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30770 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30771 sed -n "$gl_absolute_header_sed"`'"'
30775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
30776 $as_echo "$gl_cv_next_stddef_h" >&6; }
30778 NEXT_STDDEF_H=$gl_cv_next_stddef_h
30780 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30781 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30782 gl_next_as_first_directive='<'stddef.h'>'
30784 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30785 gl_next_as_first_directive=$gl_cv_next_stddef_h
30787 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
30805 if test $gl_cv_have_include_next = yes; then
30806 gl_cv_next_stdio_h='<'stdio.h'>'
30808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
30809 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
30810 if ${gl_cv_next_stdio_h+:} false; then :
30811 $as_echo_n "(cached) " >&6
30814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30815 /* end confdefs.h. */
30820 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30821 *) gl_absname_cpp="$ac_cpp" ;;
30826 gl_dirsep_regex='[/\\]'
30829 gl_dirsep_regex='\/'
30832 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30834 gl_header_literal_regex=`echo 'stdio.h' \
30835 | sed -e "$gl_make_literal_regex_sed"`
30836 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30837 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30842 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30843 sed -n "$gl_absolute_header_sed"`'"'
30847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
30848 $as_echo "$gl_cv_next_stdio_h" >&6; }
30850 NEXT_STDIO_H=$gl_cv_next_stdio_h
30852 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30853 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30854 gl_next_as_first_directive='<'stdio.h'>'
30856 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30857 gl_next_as_first_directive=$gl_cv_next_stdio_h
30859 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
30868 cat >>confdefs.h <<_ACEOF
30869 #define GNULIB_FSCANF 1
30876 cat >>confdefs.h <<_ACEOF
30877 #define GNULIB_SCANF 1
30902 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
30903 REPLACE_STDIO_WRITE_FUNCS=1
30912 M4_LIBOBJS="$M4_LIBOBJS stdio-write.$ac_objext"
30930 if test $gl_cv_have_include_next = yes; then
30931 gl_cv_next_stdlib_h='<'stdlib.h'>'
30933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
30934 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
30935 if ${gl_cv_next_stdlib_h+:} false; then :
30936 $as_echo_n "(cached) " >&6
30939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30940 /* end confdefs.h. */
30941 #include <stdlib.h>
30945 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30946 *) gl_absname_cpp="$ac_cpp" ;;
30951 gl_dirsep_regex='[/\\]'
30954 gl_dirsep_regex='\/'
30957 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30959 gl_header_literal_regex=`echo 'stdlib.h' \
30960 | sed -e "$gl_make_literal_regex_sed"`
30961 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30962 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30967 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30968 sed -n "$gl_absolute_header_sed"`'"'
30972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
30973 $as_echo "$gl_cv_next_stdlib_h" >&6; }
30975 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
30977 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30978 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30979 gl_next_as_first_directive='<'stdlib.h'>'
30981 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30982 gl_next_as_first_directive=$gl_cv_next_stdlib_h
30984 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
30996 for ac_func in strchrnul
30998 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
30999 if test "x$ac_cv_func_strchrnul" = xyes; then :
31000 cat >>confdefs.h <<_ACEOF
31001 #define HAVE_STRCHRNUL 1
31007 if test $ac_cv_func_strchrnul = no; then
31010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
31011 $as_echo_n "checking whether strchrnul works... " >&6; }
31012 if ${gl_cv_func_strchrnul_works+:} false; then :
31013 $as_echo_n "(cached) " >&6
31015 if test "$cross_compiling" = yes; then :
31016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31017 /* end confdefs.h. */
31019 #if defined __CYGWIN__
31020 #include <cygwin/version.h>
31021 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
31029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31030 $EGREP "Lucky user" >/dev/null 2>&1; then :
31031 gl_cv_func_strchrnul_works="guessing yes"
31033 gl_cv_func_strchrnul_works="guessing no"
31039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31040 /* end confdefs.h. */
31042 #include <string.h> /* for strchrnul */
31047 const char *buf = "a";
31048 return strchrnul (buf, 'b') != buf + 1;
31054 if ac_fn_c_try_run "$LINENO"; then :
31055 gl_cv_func_strchrnul_works=yes
31057 gl_cv_func_strchrnul_works=no
31059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31060 conftest.$ac_objext conftest.beam conftest.$ac_ext
31065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
31066 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
31067 case "$gl_cv_func_strchrnul_works" in
31069 *) REPLACE_STRCHRNUL=1 ;;
31073 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
31082 M4_LIBOBJS="$M4_LIBOBJS strchrnul.$ac_objext"
31097 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
31106 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
31107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
31108 $as_echo_n "checking for working strerror function... " >&6; }
31109 if ${gl_cv_func_working_strerror+:} false; then :
31110 $as_echo_n "(cached) " >&6
31112 if test "$cross_compiling" = yes; then :
31114 # Guess yes on glibc systems.
31115 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
31116 # If we don't know, assume the worst.
31117 *) gl_cv_func_working_strerror="guessing no" ;;
31121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31122 /* end confdefs.h. */
31123 #include <string.h>
31128 if (!*strerror (-2)) return 1;
31133 if ac_fn_c_try_run "$LINENO"; then :
31134 gl_cv_func_working_strerror=yes
31136 gl_cv_func_working_strerror=no
31138 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31139 conftest.$ac_objext conftest.beam conftest.$ac_ext
31144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
31145 $as_echo "$gl_cv_func_working_strerror" >&6; }
31146 case "$gl_cv_func_working_strerror" in
31157 if test $REPLACE_STRERROR = 1; then
31166 M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
31171 cat >>confdefs.h <<_ACEOF
31172 #define GNULIB_STRERROR 1
31187 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
31193 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
31202 M4_LIBOBJS="$M4_LIBOBJS strerror-override.$ac_objext"
31208 if test $ac_cv_header_sys_socket_h != yes; then
31209 for ac_header in winsock2.h
31211 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
31212 if test "x$ac_cv_header_winsock2_h" = xyes; then :
31213 cat >>confdefs.h <<_ACEOF
31214 #define HAVE_WINSOCK2_H 1
31222 if test "$ac_cv_header_winsock2_h" = yes; then
31224 UNISTD_H_HAVE_WINSOCK2_H=1
31225 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
31241 if test $ac_cv_have_decl_strndup = no; then
31242 HAVE_DECL_STRNDUP=0
31245 if test $ac_cv_func_strndup = yes; then
31247 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
31248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
31249 $as_echo_n "checking for working strndup... " >&6; }
31250 if ${gl_cv_func_strndup_works+:} false; then :
31251 $as_echo_n "(cached) " >&6
31253 if test "$cross_compiling" = yes; then :
31256 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
31257 *) gl_cv_func_strndup_works="guessing yes";;
31261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31262 /* end confdefs.h. */
31264 #include <string.h>
31265 #include <stdlib.h>
31270 #if !HAVE_DECL_STRNDUP
31275 char *strndup (const char *, size_t);
31278 s = strndup ("some longer string", 15);
31280 s = strndup ("shorter string", 13);
31281 return s[13] != '\0';
31286 if ac_fn_c_try_run "$LINENO"; then :
31287 gl_cv_func_strndup_works=yes
31289 gl_cv_func_strndup_works=no
31291 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31292 conftest.$ac_objext conftest.beam conftest.$ac_ext
31296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
31297 $as_echo "$gl_cv_func_strndup_works" >&6; }
31298 case $gl_cv_func_strndup_works in
31299 *no) REPLACE_STRNDUP=1 ;;
31305 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
31314 M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
31328 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
31338 if test $ac_cv_have_decl_strnlen = no; then
31339 HAVE_DECL_STRNLEN=0
31342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
31343 $as_echo_n "checking for working strnlen... " >&6; }
31344 if ${ac_cv_func_strnlen_working+:} false; then :
31345 $as_echo_n "(cached) " >&6
31347 if test "$cross_compiling" = yes; then :
31348 # Guess no on AIX systems, yes otherwise.
31350 aix*) ac_cv_func_strnlen_working=no;;
31351 *) ac_cv_func_strnlen_working=yes;;
31354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31355 /* end confdefs.h. */
31356 $ac_includes_default
31362 #define S_LEN (sizeof S - 1)
31364 /* At least one implementation is buggy: that of AIX 4.3 would
31365 give strnlen (S, 1) == 3. */
31368 for (i = 0; i < S_LEN + 1; ++i)
31370 int expected = i <= S_LEN ? i : S_LEN;
31371 if (strnlen (S, i) != expected)
31380 if ac_fn_c_try_run "$LINENO"; then :
31381 ac_cv_func_strnlen_working=yes
31383 ac_cv_func_strnlen_working=no
31385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31386 conftest.$ac_objext conftest.beam conftest.$ac_ext
31390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
31391 $as_echo "$ac_cv_func_strnlen_working" >&6; }
31392 test $ac_cv_func_strnlen_working = no && :
31395 if test $ac_cv_func_strnlen_working = no; then
31400 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
31409 M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
31424 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
31434 if test $ac_cv_have_decl_strsignal = no; then
31435 HAVE_DECL_STRSIGNAL=0
31438 for ac_func in strsignal
31440 ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
31441 if test "x$ac_cv_func_strsignal" = xyes; then :
31442 cat >>confdefs.h <<_ACEOF
31443 #define HAVE_STRSIGNAL 1
31449 if test $ac_cv_func_strsignal = yes; then
31451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strsignal always returns a string" >&5
31452 $as_echo_n "checking whether strsignal always returns a string... " >&6; }
31453 if ${gl_cv_func_working_strsignal+:} false; then :
31454 $as_echo_n "(cached) " >&6
31456 if test "$cross_compiling" = yes; then :
31458 solaris* | aix*) gl_cv_func_working_strsignal=no;;
31459 *) gl_cv_func_working_strsignal="guessing yes";;
31462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31463 /* end confdefs.h. */
31464 #include <string.h>
31465 #include <unistd.h> /* NetBSD 5.0 declares it in wrong header. */
31471 char *s = strsignal (-1);
31472 if (s == (char *) 0)
31474 if (s == (char *) -1)
31482 if ac_fn_c_try_run "$LINENO"; then :
31483 gl_cv_func_working_strsignal=yes
31485 gl_cv_func_working_strsignal=no
31487 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31488 conftest.$ac_objext conftest.beam conftest.$ac_ext
31492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strsignal" >&5
31493 $as_echo "$gl_cv_func_working_strsignal" >&6; }
31494 if test "$gl_cv_func_working_strsignal" = no; then
31495 REPLACE_STRSIGNAL=1
31501 if test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1; then
31510 M4_LIBOBJS="$M4_LIBOBJS strsignal.$ac_objext"
31515 ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
31517 if test "x$ac_cv_have_decl__sys_siglist" = xyes; then :
31523 cat >>confdefs.h <<_ACEOF
31524 #define HAVE_DECL__SYS_SIGLIST $ac_have_decl
31540 $as_echo "#define GNULIB_TEST_STRSIGNAL 1" >>confdefs.h
31546 if test $REPLACE_STRSTR = 0; then
31547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
31548 $as_echo_n "checking whether strstr works in linear time... " >&6; }
31549 if ${gl_cv_func_strstr_linear+:} false; then :
31550 $as_echo_n "(cached) " >&6
31552 if test "$cross_compiling" = yes; then :
31553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31554 /* end confdefs.h. */
31556 #include <features.h>
31557 #ifdef __GNU_LIBRARY__
31558 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
31559 && !(defined __i386__ || defined __x86_64__) \
31560 && !defined __UCLIBC__
31565 #include <cygwin/version.h>
31566 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
31572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31573 $EGREP "Lucky user" >/dev/null 2>&1; then :
31574 gl_cv_func_strstr_linear="guessing yes"
31576 gl_cv_func_strstr_linear="guessing no"
31582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31583 /* end confdefs.h. */
31585 #include <signal.h> /* for signal */
31586 #include <string.h> /* for strstr */
31587 #include <stdlib.h> /* for malloc */
31588 #include <unistd.h> /* for alarm */
31589 static void quit (int sig) { exit (sig + 128); }
31596 size_t m = 1000000;
31597 char *haystack = (char *) malloc (2 * m + 2);
31598 char *needle = (char *) malloc (m + 2);
31599 /* Failure to compile this test due to missing alarm is okay,
31600 since all such platforms (mingw) also have quadratic strstr. */
31601 signal (SIGALRM, quit);
31603 /* Check for quadratic performance. */
31604 if (haystack && needle)
31606 memset (haystack, 'A', 2 * m);
31607 haystack[2 * m] = 'B';
31608 haystack[2 * m + 1] = 0;
31609 memset (needle, 'A', m);
31612 if (!strstr (haystack, needle))
31621 if ac_fn_c_try_run "$LINENO"; then :
31622 gl_cv_func_strstr_linear=yes
31624 gl_cv_func_strstr_linear=no
31626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31627 conftest.$ac_objext conftest.beam conftest.$ac_ext
31632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
31633 $as_echo "$gl_cv_func_strstr_linear" >&6; }
31634 case "$gl_cv_func_strstr_linear" in
31642 if test $REPLACE_STRSTR = 1; then
31651 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
31657 if test "$gl_cv_func_memchr_works" != yes; then
31660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
31661 $as_echo_n "checking whether strstr works... " >&6; }
31662 if ${gl_cv_func_strstr_works_always+:} false; then :
31663 $as_echo_n "(cached) " >&6
31665 if test "$cross_compiling" = yes; then :
31666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31667 /* end confdefs.h. */
31669 #ifdef __GNU_LIBRARY__
31670 #include <features.h>
31671 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
31672 || defined __UCLIBC__
31675 #elif defined __CYGWIN__
31676 #include <cygwin/version.h>
31677 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
31685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31686 $EGREP "Lucky user" >/dev/null 2>&1; then :
31687 gl_cv_func_strstr_works_always="guessing yes"
31689 gl_cv_func_strstr_works_always="guessing no"
31695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31696 /* end confdefs.h. */
31698 #include <string.h> /* for strstr */
31699 #define P "_EF_BF_BD"
31700 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
31701 #define NEEDLE P P P P P
31706 return !!strstr (HAYSTACK, NEEDLE);
31712 if ac_fn_c_try_run "$LINENO"; then :
31713 gl_cv_func_strstr_works_always=yes
31715 gl_cv_func_strstr_works_always=no
31717 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31718 conftest.$ac_objext conftest.beam conftest.$ac_ext
31723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
31724 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
31725 case "$gl_cv_func_strstr_works_always" in
31733 if test $REPLACE_STRSTR = 1; then
31742 M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
31756 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
31763 if test $HAVE_STRTOD = 1; then
31764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
31765 $as_echo_n "checking whether strtod obeys C99... " >&6; }
31766 if ${gl_cv_func_strtod_works+:} false; then :
31767 $as_echo_n "(cached) " >&6
31769 if test "$cross_compiling" = yes; then :
31770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31771 /* end confdefs.h. */
31773 #include <features.h>
31774 #ifdef __GNU_LIBRARY__
31775 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)) \
31776 && !defined __UCLIBC__
31782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31783 $EGREP "Lucky user" >/dev/null 2>&1; then :
31784 gl_cv_func_strtod_works="guessing yes"
31786 gl_cv_func_strtod_works="guessing no"
31791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31792 /* end confdefs.h. */
31794 #include <stdlib.h>
31797 /* Compare two numbers with ==.
31798 This is a separate function because IRIX 6.5 "cc -O" miscompiles an
31801 numeric_equal (double x, double y)
31812 /* In some old versions of Linux (2000 or before), strtod mis-parses
31813 strings with leading '+'. */
31814 const char *string = " +69";
31816 double value = strtod (string, &term);
31817 if (value != 69 || term != (string + 4))
31821 /* Under Solaris 2.4, strtod returns the wrong value for the
31822 terminating character under some conditions. */
31823 const char *string = "NaN";
31825 strtod (string, &term);
31826 if (term != string && *(term - 1) == 0)
31830 /* Older glibc and Cygwin mis-parse "-0x". */
31831 const char *string = "-0x";
31833 double value = strtod (string, &term);
31835 if (1.0 / value != -1.0 / zero || term != (string + 2))
31839 /* Many platforms do not parse hex floats. */
31840 const char *string = "0XaP+1";
31842 double value = strtod (string, &term);
31843 if (value != 20.0 || term != (string + 6))
31847 /* Many platforms do not parse infinities. HP-UX 11.31 parses inf,
31848 but mistakenly sets errno. */
31849 const char *string = "inf";
31853 value = strtod (string, &term);
31854 if (value != HUGE_VAL || term != (string + 3) || errno)
31858 /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */
31859 const char *string = "nan()";
31861 double value = strtod (string, &term);
31862 if (numeric_equal (value, value) || term != (string + 5))
31866 /* darwin 10.6.1 misparses "nan(". */
31867 const char *string = "nan(";
31869 double value = strtod (string, &term);
31870 if (numeric_equal (value, value) || term != (string + 3))
31879 if ac_fn_c_try_run "$LINENO"; then :
31880 gl_cv_func_strtod_works=yes
31882 gl_cv_func_strtod_works=no
31884 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31885 conftest.$ac_objext conftest.beam conftest.$ac_ext
31889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
31890 $as_echo "$gl_cv_func_strtod_works" >&6; }
31891 case "$gl_cv_func_strtod_works" in
31899 if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
31908 M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
31912 if test $gl_cv_func_ldexp_no_libm = yes; then
31914 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
31930 $as_echo "#define GNULIB_TEST_STRTOD 1" >>confdefs.h
31948 if test $gl_cv_have_include_next = yes; then
31949 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
31951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
31952 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
31953 if ${gl_cv_next_sys_stat_h+:} false; then :
31954 $as_echo_n "(cached) " >&6
31957 if test $ac_cv_header_sys_stat_h = yes; then
31960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31961 /* end confdefs.h. */
31962 #include <sys/stat.h>
31966 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31967 *) gl_absname_cpp="$ac_cpp" ;;
31972 gl_dirsep_regex='[/\\]'
31975 gl_dirsep_regex='\/'
31978 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31980 gl_header_literal_regex=`echo 'sys/stat.h' \
31981 | sed -e "$gl_make_literal_regex_sed"`
31982 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31983 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31988 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31989 sed -n "$gl_absolute_header_sed"`'"'
31991 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
31996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
31997 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
31999 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
32001 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32002 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32003 gl_next_as_first_directive='<'sys/stat.h'>'
32005 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32006 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
32008 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
32020 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
32022 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
32026 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
32027 #include <sys/stat.h>
32029 if test "x$ac_cv_type_nlink_t" = xyes; then :
32033 $as_echo "#define nlink_t int" >>confdefs.h
32059 if test $gl_cv_have_include_next = yes; then
32060 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
32062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
32063 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
32064 if ${gl_cv_next_sys_wait_h+:} false; then :
32065 $as_echo_n "(cached) " >&6
32068 if test $ac_cv_header_sys_wait_h = yes; then
32071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32072 /* end confdefs.h. */
32073 #include <sys/wait.h>
32077 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32078 *) gl_absname_cpp="$ac_cpp" ;;
32083 gl_dirsep_regex='[/\\]'
32086 gl_dirsep_regex='\/'
32089 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32091 gl_header_literal_regex=`echo 'sys/wait.h' \
32092 | sed -e "$gl_make_literal_regex_sed"`
32093 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32094 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32099 gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32100 sed -n "$gl_absolute_header_sed"`'"'
32102 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
32107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
32108 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
32110 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
32112 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32113 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32114 gl_next_as_first_directive='<'sys/wait.h'>'
32116 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32117 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
32119 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
32158 if test $gl_cv_have_include_next = yes; then
32159 gl_cv_next_unistd_h='<'unistd.h'>'
32161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
32162 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
32163 if ${gl_cv_next_unistd_h+:} false; then :
32164 $as_echo_n "(cached) " >&6
32167 if test $ac_cv_header_unistd_h = yes; then
32170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32171 /* end confdefs.h. */
32172 #include <unistd.h>
32176 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32177 *) gl_absname_cpp="$ac_cpp" ;;
32182 gl_dirsep_regex='[/\\]'
32185 gl_dirsep_regex='\/'
32188 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32190 gl_header_literal_regex=`echo 'unistd.h' \
32191 | sed -e "$gl_make_literal_regex_sed"`
32192 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32193 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32198 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32199 sed -n "$gl_absolute_header_sed"`'"'
32201 gl_cv_next_unistd_h='<'unistd.h'>'
32206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
32207 $as_echo "$gl_cv_next_unistd_h" >&6; }
32209 NEXT_UNISTD_H=$gl_cv_next_unistd_h
32211 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32212 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32213 gl_next_as_first_directive='<'unistd.h'>'
32215 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32216 gl_next_as_first_directive=$gl_cv_next_unistd_h
32218 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
32223 if test $ac_cv_header_unistd_h = yes; then
32241 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
32262 if test $ac_cv_func_vasnprintf = no; then
32273 M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
32283 M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
32293 M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
32303 M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
32305 if test $ac_cv_func_vasnprintf = yes; then
32307 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
32321 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
32322 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
32326 $as_echo "#define ptrdiff_t long" >>confdefs.h
32340 for ac_func in vasprintf
32342 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
32343 if test "x$ac_cv_func_vasprintf" = xyes; then :
32344 cat >>confdefs.h <<_ACEOF
32345 #define HAVE_VASPRINTF 1
32351 if test $ac_cv_func_vasprintf = no; then
32361 M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
32371 M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
32374 if test $ac_cv_func_vasprintf = yes; then
32375 REPLACE_VASPRINTF=1
32400 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
32420 gl_cv_func_vasprintf_posix=no
32421 for ac_func in vasprintf
32423 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
32424 if test "x$ac_cv_func_vasprintf" = xyes; then :
32425 cat >>confdefs.h <<_ACEOF
32426 #define HAVE_VASPRINTF 1
32432 case "$gl_cv_func_printf_sizes_c99" in
32434 case "$gl_cv_func_printf_long_double" in
32436 case "$gl_cv_func_printf_infinite" in
32438 case "$gl_cv_func_printf_infinite_long_double" in
32440 case "$gl_cv_func_printf_directive_a" in
32442 case "$gl_cv_func_printf_directive_f" in
32444 case "$gl_cv_func_printf_directive_n" in
32446 case "$gl_cv_func_printf_directive_ls" in
32448 case "$gl_cv_func_printf_positions" in
32450 case "$gl_cv_func_printf_flag_grouping" in
32452 case "$gl_cv_func_printf_flag_leftadjust" in
32454 case "$gl_cv_func_printf_flag_zero" in
32456 case "$gl_cv_func_printf_precision" in
32458 case "$gl_cv_func_printf_enomem" in
32460 if test $ac_cv_func_vasprintf = yes; then
32461 # vasprintf exists and is
32462 # already POSIX compliant.
32463 gl_cv_func_vasprintf_posix=yes
32493 if test $gl_cv_func_vasprintf_posix = no; then
32497 case "$gl_cv_func_printf_infinite" in
32502 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
32510 case "$gl_cv_func_printf_long_double" in
32512 case "$gl_cv_func_printf_infinite_long_double" in
32517 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
32526 case "$gl_cv_func_printf_directive_a" in
32531 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
32533 for ac_func in nl_langinfo
32535 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
32536 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
32537 cat >>confdefs.h <<_ACEOF
32538 #define HAVE_NL_LANGINFO 1
32549 case "$gl_cv_func_printf_directive_f" in
32554 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
32561 case "$gl_cv_func_printf_directive_ls" in
32566 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
32573 case "$gl_cv_func_printf_flag_grouping" in
32578 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
32585 case "$gl_cv_func_printf_flag_leftadjust" in
32590 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
32597 case "$gl_cv_func_printf_flag_zero" in
32602 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
32609 case "$gl_cv_func_printf_precision" in
32614 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
32617 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
32620 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
32627 case "$gl_cv_func_printf_enomem" in
32632 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
32635 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
32638 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
32653 M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
32663 M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
32673 M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
32683 M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
32685 if test $ac_cv_func_vasnprintf = yes; then
32687 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
32701 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
32702 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
32706 $as_echo "#define ptrdiff_t long" >>confdefs.h
32726 M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
32736 M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
32739 if test $ac_cv_func_vasprintf = yes; then
32740 REPLACE_VASPRINTF=1
32756 # Check whether --with-packager was given.
32757 if test "${with_packager+set}" = set; then :
32758 withval=$with_packager; case $withval in
32761 cat >>confdefs.h <<_ACEOF
32762 #define PACKAGE_PACKAGER "$withval"
32771 # Check whether --with-packager-version was given.
32772 if test "${with_packager_version+set}" = set; then :
32773 withval=$with_packager_version; case $withval in
32776 cat >>confdefs.h <<_ACEOF
32777 #define PACKAGE_PACKAGER_VERSION "$withval"
32786 # Check whether --with-packager-bug-reports was given.
32787 if test "${with_packager_bug_reports+set}" = set; then :
32788 withval=$with_packager_bug_reports; case $withval in
32791 cat >>confdefs.h <<_ACEOF
32792 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
32800 if test "X$with_packager" = "X" && \
32801 test "X$with_packager_version$with_packager_bug_reports" != "X"
32803 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
32808 for ac_func in waitid
32810 ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
32811 if test "x$ac_cv_func_waitid" = xyes; then :
32812 cat >>confdefs.h <<_ACEOF
32813 #define HAVE_WAITID 1
32824 mingw*) HAVE_WAITPID=0 ;;
32827 if test $HAVE_WAITPID = 0; then
32836 M4_LIBOBJS="$M4_LIBOBJS waitpid.$ac_objext"
32850 $as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
32866 if test $gl_cv_have_include_next = yes; then
32867 gl_cv_next_wchar_h='<'wchar.h'>'
32869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
32870 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
32871 if ${gl_cv_next_wchar_h+:} false; then :
32872 $as_echo_n "(cached) " >&6
32875 if test $ac_cv_header_wchar_h = yes; then
32878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32879 /* end confdefs.h. */
32884 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32885 *) gl_absname_cpp="$ac_cpp" ;;
32890 gl_dirsep_regex='[/\\]'
32893 gl_dirsep_regex='\/'
32896 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32898 gl_header_literal_regex=`echo 'wchar.h' \
32899 | sed -e "$gl_make_literal_regex_sed"`
32900 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32901 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32906 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32907 sed -n "$gl_absolute_header_sed"`'"'
32909 gl_cv_next_wchar_h='<'wchar.h'>'
32914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
32915 $as_echo "$gl_cv_next_wchar_h" >&6; }
32917 NEXT_WCHAR_H=$gl_cv_next_wchar_h
32919 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32920 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32921 gl_next_as_first_directive='<'wchar.h'>'
32923 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32924 gl_next_as_first_directive=$gl_cv_next_wchar_h
32926 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
32931 if test $ac_cv_header_wchar_h = yes; then
32941 if test $gt_cv_c_wint_t = yes; then
32960 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
32964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
32965 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
32966 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
32967 $as_echo_n "(cached) " >&6
32971 # Guess no on AIX and OSF/1.
32972 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
32973 # Guess yes otherwise.
32974 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
32976 if test $LOCALE_JA != none; then
32977 if test "$cross_compiling" = yes; then :
32980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32981 /* end confdefs.h. */
32983 #include <locale.h>
32984 #include <string.h>
32985 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32987 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32988 included before <wchar.h>. */
32989 #include <stddef.h>
32995 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32997 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
33001 memset (&state, '\0', sizeof (mbstate_t));
33002 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33003 if (mbsinit (&state))
33009 if ac_fn_c_try_run "$LINENO"; then :
33010 gl_cv_func_mbrtowc_incomplete_state=yes
33012 gl_cv_func_mbrtowc_incomplete_state=no
33014 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33015 conftest.$ac_objext conftest.beam conftest.$ac_ext
33021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
33022 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
33027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
33028 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
33029 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
33030 $as_echo_n "(cached) " >&6
33034 # Guess no on Solaris 8.
33035 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
33036 # Guess yes otherwise.
33037 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
33039 if test $LOCALE_ZH_CN != none; then
33040 if test "$cross_compiling" = yes; then :
33043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33044 /* end confdefs.h. */
33046 #include <locale.h>
33047 #include <stdlib.h>
33048 #include <string.h>
33049 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33051 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33052 included before <wchar.h>. */
33053 #include <stddef.h>
33059 /* This fails on Solaris 8:
33060 mbrtowc returns 2, and sets wc to 0x00F0.
33061 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
33062 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33064 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
33068 memset (&state, '\0', sizeof (mbstate_t));
33069 if (mbrtowc (&wc, input + 3, 6, &state) != 4
33070 && mbtowc (&wc, input + 3, 6) == 4)
33076 if ac_fn_c_try_run "$LINENO"; then :
33077 gl_cv_func_mbrtowc_sanitycheck=yes
33079 gl_cv_func_mbrtowc_sanitycheck=no
33081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33082 conftest.$ac_objext conftest.beam conftest.$ac_ext
33088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
33089 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
33091 REPLACE_MBSTATE_T=0
33092 case "$gl_cv_func_mbrtowc_incomplete_state" in
33094 *) REPLACE_MBSTATE_T=1 ;;
33096 case "$gl_cv_func_mbrtowc_sanitycheck" in
33098 *) REPLACE_MBSTATE_T=1 ;;
33101 REPLACE_MBSTATE_T=1
33106 if test $ac_cv_func_wcrtomb = no; then
33108 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
33109 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33111 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33112 included before <wchar.h>. */
33113 #include <stddef.h>
33119 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
33125 cat >>confdefs.h <<_ACEOF
33126 #define HAVE_DECL_WCRTOMB $ac_have_decl
33129 if test $ac_cv_have_decl_wcrtomb = yes; then
33133 if test $REPLACE_MBSTATE_T = 1; then
33141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
33142 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
33143 if ${gl_cv_func_wcrtomb_retval+:} false; then :
33144 $as_echo_n "(cached) " >&6
33148 # Guess no on AIX 4, OSF/1 and Solaris.
33149 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
33150 # Guess yes otherwise.
33151 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
33153 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
33154 if test "$cross_compiling" = yes; then :
33157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33158 /* end confdefs.h. */
33160 #include <locale.h>
33161 #include <string.h>
33162 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33164 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33165 included before <wchar.h>. */
33166 #include <stddef.h>
33173 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
33175 if (wcrtomb (NULL, 0, NULL) != 1)
33178 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33180 if (wcrtomb (NULL, 0, NULL) != 1)
33183 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33185 if (wcrtomb (NULL, 0, NULL) != 1)
33188 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33190 if (wcrtomb (NULL, 0, NULL) != 1)
33196 if ac_fn_c_try_run "$LINENO"; then :
33197 gl_cv_func_wcrtomb_retval=yes
33199 gl_cv_func_wcrtomb_retval=no
33201 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33202 conftest.$ac_objext conftest.beam conftest.$ac_ext
33208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
33209 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
33210 case "$gl_cv_func_wcrtomb_retval" in
33212 *) REPLACE_WCRTOMB=1 ;;
33217 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
33226 M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
33243 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
33252 if test $ac_cv_func_iswcntrl = yes; then
33260 if test $gt_cv_c_wint_t = yes; then
33276 if test $gl_cv_have_include_next = yes; then
33277 gl_cv_next_wctype_h='<'wctype.h'>'
33279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
33280 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
33281 if ${gl_cv_next_wctype_h+:} false; then :
33282 $as_echo_n "(cached) " >&6
33285 if test $ac_cv_header_wctype_h = yes; then
33288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33289 /* end confdefs.h. */
33290 #include <wctype.h>
33294 aix*) gl_absname_cpp="$ac_cpp -C" ;;
33295 *) gl_absname_cpp="$ac_cpp" ;;
33300 gl_dirsep_regex='[/\\]'
33303 gl_dirsep_regex='\/'
33306 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33308 gl_header_literal_regex=`echo 'wctype.h' \
33309 | sed -e "$gl_make_literal_regex_sed"`
33310 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33311 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33316 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33317 sed -n "$gl_absolute_header_sed"`'"'
33319 gl_cv_next_wctype_h='<'wctype.h'>'
33324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
33325 $as_echo "$gl_cv_next_wctype_h" >&6; }
33327 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
33329 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33330 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33331 gl_next_as_first_directive='<'wctype.h'>'
33333 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33334 gl_next_as_first_directive=$gl_cv_next_wctype_h
33336 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
33341 if test $ac_cv_header_wctype_h = yes; then
33342 if test $ac_cv_func_iswcntrl = yes; then
33343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
33344 $as_echo_n "checking whether iswcntrl works... " >&6; }
33345 if ${gl_cv_func_iswcntrl_works+:} false; then :
33346 $as_echo_n "(cached) " >&6
33349 if test "$cross_compiling" = yes; then :
33350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33351 /* end confdefs.h. */
33352 #include <stdlib.h>
33353 #if __GNU_LIBRARY__ == 1
33354 Linux libc5 i18n is broken.
33364 if ac_fn_c_try_compile "$LINENO"; then :
33365 gl_cv_func_iswcntrl_works="guessing yes"
33367 gl_cv_func_iswcntrl_works="guessing no"
33369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33373 /* end confdefs.h. */
33375 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33376 included before <wchar.h>.
33377 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33378 must be included before <wchar.h>. */
33379 #include <stddef.h>
33383 #include <wctype.h>
33384 int main () { return iswprint ('x') == 0; }
33387 if ac_fn_c_try_run "$LINENO"; then :
33388 gl_cv_func_iswcntrl_works=yes
33390 gl_cv_func_iswcntrl_works=no
33392 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33393 conftest.$ac_objext conftest.beam conftest.$ac_ext
33398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
33399 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
33407 case "$gl_cv_func_iswcntrl_works" in
33408 *yes) REPLACE_ISWCNTRL=0 ;;
33409 *) REPLACE_ISWCNTRL=1 ;;
33413 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
33417 if test $REPLACE_ISWCNTRL = 1; then
33420 for ac_func in towlower
33422 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
33423 if test "x$ac_cv_func_towlower" = xyes; then :
33424 cat >>confdefs.h <<_ACEOF
33425 #define HAVE_TOWLOWER 1
33431 if test $ac_cv_func_towlower = yes; then
33434 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33435 included before <wchar.h>.
33436 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33437 must be included before <wchar.h>. */
33438 #include <stddef.h>
33443 # include <wctype.h>
33447 if test "x$ac_cv_have_decl_towlower" = xyes; then :
33453 cat >>confdefs.h <<_ACEOF
33454 #define HAVE_DECL_TOWLOWER $ac_have_decl
33457 if test $ac_cv_have_decl_towlower = yes; then
33466 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
33470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
33471 $as_echo_n "checking for wctype_t... " >&6; }
33472 if ${gl_cv_type_wctype_t+:} false; then :
33473 $as_echo_n "(cached) " >&6
33475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33476 /* end confdefs.h. */
33477 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33478 included before <wchar.h>.
33479 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33480 must be included before <wchar.h>. */
33481 #include <stddef.h>
33486 # include <wctype.h>
33498 if ac_fn_c_try_compile "$LINENO"; then :
33499 gl_cv_type_wctype_t=yes
33501 gl_cv_type_wctype_t=no
33503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
33507 $as_echo "$gl_cv_type_wctype_t" >&6; }
33508 if test $gl_cv_type_wctype_t = no; then
33512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
33513 $as_echo_n "checking for wctrans_t... " >&6; }
33514 if ${gl_cv_type_wctrans_t+:} false; then :
33515 $as_echo_n "(cached) " >&6
33517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33518 /* end confdefs.h. */
33519 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33520 included before <wchar.h>.
33521 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33522 must be included before <wchar.h>. */
33523 #include <stddef.h>
33527 #include <wctype.h>
33538 if ac_fn_c_try_compile "$LINENO"; then :
33539 gl_cv_type_wctrans_t=yes
33541 gl_cv_type_wctrans_t=no
33543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
33547 $as_echo "$gl_cv_type_wctrans_t" >&6; }
33548 if test $gl_cv_type_wctrans_t = no; then
33558 for ac_header in stdint.h
33560 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
33561 if test "x$ac_cv_header_stdint_h" = xyes; then :
33562 cat >>confdefs.h <<_ACEOF
33563 #define HAVE_STDINT_H 1
33578 # End of code from modules
33599 gl_source_base='tests'
33600 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
33602 gl_module_indicator_condition=$M4tests_WITNESS
33607 if test "$CXX_CHOICE" = no; then
33610 if test -z "$CXX"; then
33611 if test -n "$CCC"; then
33614 if test -n "$ac_tool_prefix"; then
33615 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
33617 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33620 $as_echo_n "checking for $ac_word... " >&6; }
33621 if ${ac_cv_prog_CXX+:} false; then :
33622 $as_echo_n "(cached) " >&6
33624 if test -n "$CXX"; then
33625 ac_cv_prog_CXX="$CXX" # Let the user override the test.
33627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33628 for as_dir in $PATH
33631 test -z "$as_dir" && as_dir=.
33632 for ac_exec_ext in '' $ac_executable_extensions; do
33633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33634 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33644 CXX=$ac_cv_prog_CXX
33645 if test -n "$CXX"; then
33646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33647 $as_echo "$CXX" >&6; }
33649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33650 $as_echo "no" >&6; }
33654 test -n "$CXX" && break
33657 if test -z "$CXX"; then
33659 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
33661 # Extract the first word of "$ac_prog", so it can be a program name with args.
33662 set dummy $ac_prog; ac_word=$2
33663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33664 $as_echo_n "checking for $ac_word... " >&6; }
33665 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33666 $as_echo_n "(cached) " >&6
33668 if test -n "$ac_ct_CXX"; then
33669 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33672 for as_dir in $PATH
33675 test -z "$as_dir" && as_dir=.
33676 for ac_exec_ext in '' $ac_executable_extensions; do
33677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33678 ac_cv_prog_ac_ct_CXX="$ac_prog"
33679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33688 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33689 if test -n "$ac_ct_CXX"; then
33690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33691 $as_echo "$ac_ct_CXX" >&6; }
33693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33694 $as_echo "no" >&6; }
33698 test -n "$ac_ct_CXX" && break
33701 if test "x$ac_ct_CXX" = x; then
33704 case $cross_compiling:$ac_tool_warned in
33706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33707 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33708 ac_tool_warned=yes ;;
33716 if test "$CXX" != no; then
33717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
33718 $as_echo_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
33720 ac_cpp='$CXXCPP $CPPFLAGS'
33721 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33722 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33723 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33727 echo 'int main () { return 0; }' > conftest.$ac_ext
33728 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33729 (eval $ac_link) 2>&5
33731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33732 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33733 gl_cv_prog_ansicxx_works=yes
33734 if (./conftest; exit) 2>/dev/null; then
33735 gl_cv_prog_ansicxx_cross=no
33737 gl_cv_prog_ansicxx_cross=yes
33740 gl_cv_prog_ansicxx_works=no
33744 ac_cpp='$CPP $CPPFLAGS'
33745 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33746 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33747 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
33750 $as_echo "$gl_cv_prog_ansicxx_works" >&6; }
33751 if test $gl_cv_prog_ansicxx_works = no; then
33754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
33755 $as_echo_n "checking whether the C++ compiler supports namespaces... " >&6; }
33757 ac_cpp='$CXXCPP $CPPFLAGS'
33758 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33759 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33760 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33762 cat <<EOF > conftest.$ac_ext
33763 #include <iostream>
33764 namespace test { using namespace std; }
33766 int main () { return 0; }
33768 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33769 (eval $ac_link) 2>&5
33771 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33772 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33773 gl_cv_prog_ansicxx_namespaces=yes
33775 gl_cv_prog_ansicxx_namespaces=no
33779 ac_cpp='$CPP $CPPFLAGS'
33780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
33785 $as_echo "$gl_cv_prog_ansicxx_namespaces" >&6; }
33786 if test $gl_cv_prog_ansicxx_namespaces = no; then
33794 if test "$CXX" != no; then
33803 if test "$CXX" != no; then
33805 depcc="$CXX" am_compiler_list=
33807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
33808 $as_echo_n "checking dependency style of $depcc... " >&6; }
33809 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
33810 $as_echo_n "(cached) " >&6
33812 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
33813 # We make a subdir and do the tests there. Otherwise we can end up
33814 # making bogus files that we don't know about and never remove. For
33815 # instance it was reported that on HP-UX the gcc test will end up
33816 # making a dummy file named 'D' -- because '-MD' means "put the output
33818 rm -rf conftest.dir
33820 # Copy depcomp to subdir because otherwise we won't find it if we're
33821 # using a relative directory.
33822 cp "$am_depcomp" conftest.dir
33824 # We will build objects and dependencies in a subdirectory because
33825 # it helps to detect inapplicable dependency modes. For instance
33826 # both Tru64's cc and ICC support -MD to output dependencies as a
33827 # side effect of compilation, but ICC will put the dependencies in
33828 # the current directory while Tru64 will put them in the object
33832 am_cv_CXX_dependencies_compiler_type=none
33833 if test "$am_compiler_list" = ""; then
33834 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
33836 am__universal=false
33837 case " $depcc " in #(
33838 *\ -arch\ *\ -arch\ *) am__universal=true ;;
33841 for depmode in $am_compiler_list; do
33842 # Setup a source with many dependencies, because some compilers
33843 # like to wrap large dependency lists on column 80 (with \), and
33844 # we should not choose a depcomp mode which is confused by this.
33846 # We need to recreate these files for each test, as the compiler may
33847 # overwrite some of them when testing with obscure command lines.
33848 # This happens at least with the AIX C compiler.
33850 for i in 1 2 3 4 5 6; do
33851 echo '#include "conftst'$i'.h"' >> sub/conftest.c
33852 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
33853 # Solaris 10 /bin/sh.
33854 echo '/* dummy */' > sub/conftst$i.h
33856 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
33858 # We check with '-c' and '-o' for the sake of the "dashmstdout"
33859 # mode. It turns out that the SunPro C++ compiler does not properly
33860 # handle '-M -o', and we need to detect this. Also, some Intel
33861 # versions had trouble with output in subdirs.
33862 am__obj=sub/conftest.${OBJEXT-o}
33863 am__minus_obj="-o $am__obj"
33866 # This depmode causes a compiler race in universal mode.
33867 test "$am__universal" = false || continue
33870 # After this tag, mechanisms are not by side-effect, so they'll
33871 # only be used when explicitly requested.
33872 if test "x$enable_dependency_tracking" = xyes; then
33878 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
33879 # This compiler won't grok '-c -o', but also, the minuso test has
33880 # not run yet. These depmodes are late enough in the game, and
33881 # so weak that their functioning should not be impacted.
33882 am__obj=conftest.${OBJEXT-o}
33887 if depmode=$depmode \
33888 source=sub/conftest.c object=$am__obj \
33889 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
33890 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
33891 >/dev/null 2>conftest.err &&
33892 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
33893 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
33894 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
33895 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
33896 # icc doesn't choke on unknown options, it will just issue warnings
33897 # or remarks (even with -Werror). So we grep stderr for any message
33898 # that says an option was ignored or not supported.
33899 # When given -MP, icc 7.0 and 7.1 complain thusly:
33900 # icc: Command line warning: ignoring option '-M'; no argument required
33901 # The diagnosis changed in icc 8.0:
33902 # icc: Command line remark: option '-MP' not supported
33903 if (grep 'ignoring option' conftest.err ||
33904 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
33905 am_cv_CXX_dependencies_compiler_type=$depmode
33912 rm -rf conftest.dir
33914 am_cv_CXX_dependencies_compiler_type=none
33918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
33919 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
33920 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
33923 test "x$enable_dependency_tracking" != xno \
33924 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
33925 am__fastdepCXX_TRUE=
33926 am__fastdepCXX_FALSE='#'
33928 am__fastdepCXX_TRUE='#'
33929 am__fastdepCXX_FALSE=
33935 am__fastdepCXX_TRUE=
33936 am__fastdepCXX_FALSE='#'
33938 am__fastdepCXX_TRUE='#'
33939 am__fastdepCXX_FALSE=
33947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
33948 $as_echo_n "checking for a traditional french locale... " >&6; }
33949 if ${gt_cv_locale_fr+:} false; then :
33950 $as_echo_n "(cached) " >&6
33953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33954 /* end confdefs.h. */
33956 #include <locale.h>
33958 #if HAVE_LANGINFO_CODESET
33959 # include <langinfo.h>
33961 #include <stdlib.h>
33962 #include <string.h>
33966 /* Check whether the given locale name is recognized by the system. */
33967 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33968 /* On native Windows, setlocale(category, "") looks at the system settings,
33969 not at the environment variables. Also, when an encoding suffix such
33970 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33971 category of the locale to "C". */
33972 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33973 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33976 if (setlocale (LC_ALL, "") == NULL) return 1;
33978 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33979 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33980 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33981 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33982 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33983 some unit tests fail.
33984 On MirBSD 10, when an unsupported locale is specified, setlocale()
33985 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
33986 #if HAVE_LANGINFO_CODESET
33988 const char *cs = nl_langinfo (CODESET);
33989 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33990 || strcmp (cs, "UTF-8") == 0)
33995 /* On Cygwin, avoid locale names without encoding suffix, because the
33996 locale_charset() function relies on the encoding suffix. Note that
33997 LC_ALL is set on the command line. */
33998 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34000 /* Check whether in the abbreviation of the second month, the second
34001 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
34002 one byte long. This excludes the UTF-8 encoding. */
34003 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34004 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
34005 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
34006 /* Check whether the decimal separator is a comma.
34007 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34008 are nl_langinfo(RADIXCHAR) are both ".". */
34009 if (localeconv () ->decimal_point[0] != ',') return 1;
34015 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34016 (eval $ac_link) 2>&5
34018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34019 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34021 # Handle native Windows specially, because there setlocale() interprets
34022 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34023 # "fr" or "fra" as "French" or "French_France.1252",
34024 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34025 # "ja" as "Japanese" or "Japanese_Japan.932",
34028 # Test for the native Windows locale name.
34029 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34030 gt_cv_locale_fr=French_France.1252
34033 gt_cv_locale_fr=none
34037 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34038 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34039 # configure script would override the LC_ALL setting. Likewise for
34040 # LC_CTYPE, which is also set at the beginning of the configure script.
34041 # Test for the usual locale name.
34042 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34043 gt_cv_locale_fr=fr_FR
34045 # Test for the locale name with explicit encoding suffix.
34046 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34047 gt_cv_locale_fr=fr_FR.ISO-8859-1
34049 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
34050 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34051 gt_cv_locale_fr=fr_FR.ISO8859-1
34053 # Test for the HP-UX locale name.
34054 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34055 gt_cv_locale_fr=fr_FR.iso88591
34057 # Test for the Solaris 7 locale name.
34058 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34062 gt_cv_locale_fr=none
34074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
34075 $as_echo "$gt_cv_locale_fr" >&6; }
34076 LOCALE_FR=$gt_cv_locale_fr
34081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
34082 $as_echo_n "checking for a french Unicode locale... " >&6; }
34083 if ${gt_cv_locale_fr_utf8+:} false; then :
34084 $as_echo_n "(cached) " >&6
34087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34088 /* end confdefs.h. */
34090 #include <locale.h>
34092 #if HAVE_LANGINFO_CODESET
34093 # include <langinfo.h>
34095 #include <stdlib.h>
34096 #include <string.h>
34100 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
34101 imitates locale dependent behaviour by looking at the environment
34102 variables, and all locales use the UTF-8 encoding. */
34103 #if !(defined __BEOS__ || defined __HAIKU__)
34104 /* Check whether the given locale name is recognized by the system. */
34105 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
34106 /* On native Windows, setlocale(category, "") looks at the system settings,
34107 not at the environment variables. Also, when an encoding suffix such
34108 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34109 category of the locale to "C". */
34110 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34111 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34114 if (setlocale (LC_ALL, "") == NULL) return 1;
34116 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34117 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34118 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34119 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34120 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34121 some unit tests fail. */
34122 # if HAVE_LANGINFO_CODESET
34124 const char *cs = nl_langinfo (CODESET);
34125 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
34130 /* On Cygwin, avoid locale names without encoding suffix, because the
34131 locale_charset() function relies on the encoding suffix. Note that
34132 LC_ALL is set on the command line. */
34133 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34135 /* Check whether in the abbreviation of the second month, the second
34136 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
34137 two bytes long, with UTF-8 encoding. */
34138 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34139 if (strftime (buf, sizeof (buf), "%b", &t) < 4
34140 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
34143 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
34144 /* Check whether the decimal separator is a comma.
34145 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34146 are nl_langinfo(RADIXCHAR) are both ".". */
34147 if (localeconv () ->decimal_point[0] != ',') return 1;
34153 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34154 (eval $ac_link) 2>&5
34156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34157 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34159 # Handle native Windows specially, because there setlocale() interprets
34160 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34161 # "fr" or "fra" as "French" or "French_France.1252",
34162 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34163 # "ja" as "Japanese" or "Japanese_Japan.932",
34166 # Test for the hypothetical native Windows locale name.
34167 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34168 gt_cv_locale_fr_utf8=French_France.65001
34171 gt_cv_locale_fr_utf8=none
34175 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34176 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34177 # configure script would override the LC_ALL setting. Likewise for
34178 # LC_CTYPE, which is also set at the beginning of the configure script.
34179 # Test for the usual locale name.
34180 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34181 gt_cv_locale_fr_utf8=fr_FR
34183 # Test for the locale name with explicit encoding suffix.
34184 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34185 gt_cv_locale_fr_utf8=fr_FR.UTF-8
34187 # Test for the Solaris 7 locale name.
34188 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34189 gt_cv_locale_fr_utf8=fr.UTF-8
34192 gt_cv_locale_fr_utf8=none
34202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
34203 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
34204 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
34210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
34211 $as_echo_n "checking for a traditional french locale... " >&6; }
34212 if ${gt_cv_locale_fr+:} false; then :
34213 $as_echo_n "(cached) " >&6
34216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34217 /* end confdefs.h. */
34219 #include <locale.h>
34221 #if HAVE_LANGINFO_CODESET
34222 # include <langinfo.h>
34224 #include <stdlib.h>
34225 #include <string.h>
34229 /* Check whether the given locale name is recognized by the system. */
34230 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
34231 /* On native Windows, setlocale(category, "") looks at the system settings,
34232 not at the environment variables. Also, when an encoding suffix such
34233 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34234 category of the locale to "C". */
34235 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34236 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34239 if (setlocale (LC_ALL, "") == NULL) return 1;
34241 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34242 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34243 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34244 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34245 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34246 some unit tests fail.
34247 On MirBSD 10, when an unsupported locale is specified, setlocale()
34248 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
34249 #if HAVE_LANGINFO_CODESET
34251 const char *cs = nl_langinfo (CODESET);
34252 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
34253 || strcmp (cs, "UTF-8") == 0)
34258 /* On Cygwin, avoid locale names without encoding suffix, because the
34259 locale_charset() function relies on the encoding suffix. Note that
34260 LC_ALL is set on the command line. */
34261 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34263 /* Check whether in the abbreviation of the second month, the second
34264 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
34265 one byte long. This excludes the UTF-8 encoding. */
34266 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34267 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
34268 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
34269 /* Check whether the decimal separator is a comma.
34270 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34271 are nl_langinfo(RADIXCHAR) are both ".". */
34272 if (localeconv () ->decimal_point[0] != ',') return 1;
34278 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34279 (eval $ac_link) 2>&5
34281 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34282 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34284 # Handle native Windows specially, because there setlocale() interprets
34285 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34286 # "fr" or "fra" as "French" or "French_France.1252",
34287 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34288 # "ja" as "Japanese" or "Japanese_Japan.932",
34291 # Test for the native Windows locale name.
34292 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34293 gt_cv_locale_fr=French_France.1252
34296 gt_cv_locale_fr=none
34300 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34301 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34302 # configure script would override the LC_ALL setting. Likewise for
34303 # LC_CTYPE, which is also set at the beginning of the configure script.
34304 # Test for the usual locale name.
34305 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34306 gt_cv_locale_fr=fr_FR
34308 # Test for the locale name with explicit encoding suffix.
34309 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34310 gt_cv_locale_fr=fr_FR.ISO-8859-1
34312 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
34313 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34314 gt_cv_locale_fr=fr_FR.ISO8859-1
34316 # Test for the HP-UX locale name.
34317 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34318 gt_cv_locale_fr=fr_FR.iso88591
34320 # Test for the Solaris 7 locale name.
34321 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34325 gt_cv_locale_fr=none
34337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
34338 $as_echo "$gt_cv_locale_fr" >&6; }
34339 LOCALE_FR=$gt_cv_locale_fr
34345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
34346 $as_echo_n "checking for a turkish Unicode locale... " >&6; }
34347 if ${gt_cv_locale_tr_utf8+:} false; then :
34348 $as_echo_n "(cached) " >&6
34351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34352 /* end confdefs.h. */
34354 #include <locale.h>
34356 #if HAVE_LANGINFO_CODESET
34357 # include <langinfo.h>
34359 #include <stdlib.h>
34360 #include <string.h>
34364 /* On BeOS, locales are not implemented in libc. Rather, libintl
34365 imitates locale dependent behaviour by looking at the environment
34366 variables, and all locales use the UTF-8 encoding. But BeOS does not
34367 implement the Turkish upper-/lowercase mappings. Therefore, let this
34368 program return 1 on BeOS. */
34369 /* Check whether the given locale name is recognized by the system. */
34370 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
34371 /* On native Windows, setlocale(category, "") looks at the system settings,
34372 not at the environment variables. Also, when an encoding suffix such
34373 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34374 category of the locale to "C". */
34375 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34376 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34379 if (setlocale (LC_ALL, "") == NULL) return 1;
34381 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34382 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
34383 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34384 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34385 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34386 some unit tests fail. */
34387 #if HAVE_LANGINFO_CODESET
34389 const char *cs = nl_langinfo (CODESET);
34390 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
34395 /* On Cygwin, avoid locale names without encoding suffix, because the
34396 locale_charset() function relies on the encoding suffix. Note that
34397 LC_ALL is set on the command line. */
34398 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34400 /* Check whether in the abbreviation of the eighth month, the second
34401 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
34402 two bytes long, with UTF-8 encoding. */
34403 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
34404 if (strftime (buf, sizeof (buf), "%b", &t) < 4
34405 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
34407 /* Check whether the upper-/lowercase mappings are as expected for
34409 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
34410 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
34416 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34417 (eval $ac_link) 2>&5
34419 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34420 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34422 # Handle native Windows specially, because there setlocale() interprets
34423 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34424 # "fr" or "fra" as "French" or "French_France.1252",
34425 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34426 # "ja" as "Japanese" or "Japanese_Japan.932",
34429 # Test for the hypothetical native Windows locale name.
34430 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34431 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
34434 gt_cv_locale_tr_utf8=none
34438 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34439 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34440 # configure script would override the LC_ALL setting. Likewise for
34441 # LC_CTYPE, which is also set at the beginning of the configure script.
34442 # Test for the usual locale name.
34443 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34444 gt_cv_locale_tr_utf8=tr_TR
34446 # Test for the locale name with explicit encoding suffix.
34447 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34448 gt_cv_locale_tr_utf8=tr_TR.UTF-8
34450 # Test for the Solaris 7 locale name.
34451 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34452 gt_cv_locale_tr_utf8=tr.UTF-8
34455 gt_cv_locale_tr_utf8=none
34462 gt_cv_locale_tr_utf8=none
34467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
34468 $as_echo "$gt_cv_locale_tr_utf8" >&6; }
34469 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
34475 for ac_func in closedir
34477 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
34478 if test "x$ac_cv_func_closedir" = xyes; then :
34479 cat >>confdefs.h <<_ACEOF
34480 #define HAVE_CLOSEDIR 1
34486 if test $ac_cv_func_closedir = no; then
34491 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
34500 M4tests_LIBOBJS="$M4tests_LIBOBJS closedir.$ac_objext"
34508 if test "$GNULIB_CLOSEDIR" != 1; then
34509 if test "$GNULIB_CLOSEDIR" = 0; then
34510 GNULIB_CLOSEDIR=$gl_module_indicator_condition
34512 GNULIB_CLOSEDIR="($GNULIB_CLOSEDIR || $gl_module_indicator_condition)"
34520 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
34536 if test $gl_cv_have_include_next = yes; then
34537 gl_cv_next_dirent_h='<'dirent.h'>'
34539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
34540 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
34541 if ${gl_cv_next_dirent_h+:} false; then :
34542 $as_echo_n "(cached) " >&6
34545 if test $ac_cv_header_dirent_h = yes; then
34548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34549 /* end confdefs.h. */
34550 #include <dirent.h>
34554 aix*) gl_absname_cpp="$ac_cpp -C" ;;
34555 *) gl_absname_cpp="$ac_cpp" ;;
34560 gl_dirsep_regex='[/\\]'
34563 gl_dirsep_regex='\/'
34566 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34568 gl_header_literal_regex=`echo 'dirent.h' \
34569 | sed -e "$gl_make_literal_regex_sed"`
34570 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34571 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34576 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34577 sed -n "$gl_absolute_header_sed"`'"'
34579 gl_cv_next_dirent_h='<'dirent.h'>'
34584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
34585 $as_echo "$gl_cv_next_dirent_h" >&6; }
34587 NEXT_DIRENT_H=$gl_cv_next_dirent_h
34589 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34590 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34591 gl_next_as_first_directive='<'dirent.h'>'
34593 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34594 gl_next_as_first_directive=$gl_cv_next_dirent_h
34596 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
34601 if test $ac_cv_header_dirent_h = yes; then
34613 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
34618 if test $REPLACE_DUP = 1; then
34627 M4tests_LIBOBJS="$M4tests_LIBOBJS dup.$ac_objext"
34636 if test "$GNULIB_DUP" != 1; then
34637 if test "$GNULIB_DUP" = 0; then
34638 GNULIB_DUP=$gl_module_indicator_condition
34640 GNULIB_DUP="($GNULIB_DUP || $gl_module_indicator_condition)"
34648 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
34655 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
34658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
34659 $as_echo_n "checking whether fdopen sets errno... " >&6; }
34660 if ${gl_cv_func_fdopen_works+:} false; then :
34661 $as_echo_n "(cached) " >&6
34664 if test "$cross_compiling" = yes; then :
34666 mingw*) gl_cv_func_fdopen_works="guessing no" ;;
34667 *) gl_cv_func_fdopen_works="guessing yes" ;;
34671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34672 /* end confdefs.h. */
34681 fp = fdopen (-1, "r");
34682 if (fp == NULL && errno == 0)
34687 if ac_fn_c_try_run "$LINENO"; then :
34688 gl_cv_func_fdopen_works=yes
34690 gl_cv_func_fdopen_works=no
34692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34693 conftest.$ac_objext conftest.beam conftest.$ac_ext
34698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
34699 $as_echo "$gl_cv_func_fdopen_works" >&6; }
34700 case "$gl_cv_func_fdopen_works" in
34701 *no) REPLACE_FDOPEN=1 ;;
34705 if test $REPLACE_FDOPEN = 1; then
34714 M4tests_LIBOBJS="$M4tests_LIBOBJS fdopen.$ac_objext"
34723 if test "$GNULIB_FDOPEN" != 1; then
34724 if test "$GNULIB_FDOPEN" = 0; then
34725 GNULIB_FDOPEN=$gl_module_indicator_condition
34727 GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
34735 $as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
34748 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
34755 if test $REPLACE_GETCWD = 1; then
34764 M4tests_LIBOBJS="$M4tests_LIBOBJS getcwd-lgpl.$ac_objext"
34772 if test "$GNULIB_GETCWD" != 1; then
34773 if test "$GNULIB_GETCWD" = 0; then
34774 GNULIB_GETCWD=$gl_module_indicator_condition
34776 GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)"
34784 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
34791 for ac_func in getpagesize
34793 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
34794 if test "x$ac_cv_func_getpagesize" = xyes; then :
34795 cat >>confdefs.h <<_ACEOF
34796 #define HAVE_GETPAGESIZE 1
34802 if test $ac_cv_func_getpagesize = no; then
34804 for ac_header in OS.h
34806 ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
34807 if test "x$ac_cv_header_OS_h" = xyes; then :
34808 cat >>confdefs.h <<_ACEOF
34809 #define HAVE_OS_H 1
34816 if test $ac_cv_header_OS_h = yes; then
34819 for ac_header in sys/param.h
34821 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
34822 if test "x$ac_cv_header_sys_param_h" = xyes; then :
34823 cat >>confdefs.h <<_ACEOF
34824 #define HAVE_SYS_PARAM_H 1
34831 if test $ac_cv_header_sys_param_h = yes; then
34837 REPLACE_GETPAGESIZE=1
34840 ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
34841 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
34844 HAVE_DECL_GETPAGESIZE=0
34848 if test $REPLACE_GETPAGESIZE = 1; then
34857 M4tests_LIBOBJS="$M4tests_LIBOBJS getpagesize.$ac_objext"
34865 if test "$GNULIB_GETPAGESIZE" != 1; then
34866 if test "$GNULIB_GETPAGESIZE" = 0; then
34867 GNULIB_GETPAGESIZE=$gl_module_indicator_condition
34869 GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
34877 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
34887 if test -n "$STDINT_H"; then
34888 PRIPTR_PREFIX='"l"'
34890 for glpfx in '' l ll I64; do
34892 '') gltype1='int';;
34893 l) gltype1='long int';;
34894 ll) gltype1='long long int';;
34895 I64) gltype1='__int64';;
34897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34898 /* end confdefs.h. */
34899 #include <stdint.h>
34900 extern intptr_t foo;
34901 extern $gltype1 foo;
34910 if ac_fn_c_try_compile "$LINENO"; then :
34911 PRIPTR_PREFIX='"'$glpfx'"'
34913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34914 test -n "$PRIPTR_PREFIX" && break
34920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
34921 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
34922 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
34923 $as_echo_n "(cached) " >&6
34925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34926 /* end confdefs.h. */
34927 /* Work also in C++ mode. */
34928 #define __STDC_LIMIT_MACROS 1
34930 /* Work if build is not clean. */
34931 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
34933 #include <limits.h>
34935 #include <stdint.h>
34938 #if defined INT32_MAX && defined INTMAX_MAX
34939 #define CONDITION (INT32_MAX < INTMAX_MAX)
34940 #elif HAVE_LONG_LONG_INT
34941 #define CONDITION (sizeof (int) < sizeof (long long int))
34943 #define CONDITION 0
34945 int test[CONDITION ? 1 : -1];
34954 if ac_fn_c_try_compile "$LINENO"; then :
34955 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
34957 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
34959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
34962 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
34963 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
34964 INT32_MAX_LT_INTMAX_MAX=1;
34966 INT32_MAX_LT_INTMAX_MAX=0;
34970 if test $APPLE_UNIVERSAL_BUILD = 0; then
34972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
34973 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
34974 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
34975 $as_echo_n "(cached) " >&6
34977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34978 /* end confdefs.h. */
34979 /* Work also in C++ mode. */
34980 #define __STDC_LIMIT_MACROS 1
34982 /* Work if build is not clean. */
34983 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
34985 #include <limits.h>
34987 #include <stdint.h>
34990 #if defined INT64_MAX
34991 #define CONDITION (INT64_MAX == LONG_MAX)
34992 #elif HAVE_LONG_LONG_INT
34993 #define CONDITION (sizeof (long long int) == sizeof (long int))
34995 #define CONDITION 0
34997 int test[CONDITION ? 1 : -1];
35006 if ac_fn_c_try_compile "$LINENO"; then :
35007 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
35009 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
35011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
35014 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
35015 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
35016 INT64_MAX_EQ_LONG_MAX=1;
35018 INT64_MAX_EQ_LONG_MAX=0;
35023 INT64_MAX_EQ_LONG_MAX=-1
35026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
35027 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
35028 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
35029 $as_echo_n "(cached) " >&6
35031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35032 /* end confdefs.h. */
35033 /* Work also in C++ mode. */
35034 #define __STDC_LIMIT_MACROS 1
35036 /* Work if build is not clean. */
35037 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
35039 #include <limits.h>
35041 #include <stdint.h>
35044 #if defined UINT32_MAX && defined UINTMAX_MAX
35045 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
35046 #elif HAVE_LONG_LONG_INT
35047 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
35049 #define CONDITION 0
35051 int test[CONDITION ? 1 : -1];
35060 if ac_fn_c_try_compile "$LINENO"; then :
35061 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
35063 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
35065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
35068 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
35069 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
35070 UINT32_MAX_LT_UINTMAX_MAX=1;
35072 UINT32_MAX_LT_UINTMAX_MAX=0;
35076 if test $APPLE_UNIVERSAL_BUILD = 0; then
35078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
35079 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
35080 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
35081 $as_echo_n "(cached) " >&6
35083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35084 /* end confdefs.h. */
35085 /* Work also in C++ mode. */
35086 #define __STDC_LIMIT_MACROS 1
35088 /* Work if build is not clean. */
35089 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
35091 #include <limits.h>
35093 #include <stdint.h>
35096 #if defined UINT64_MAX
35097 #define CONDITION (UINT64_MAX == ULONG_MAX)
35098 #elif HAVE_LONG_LONG_INT
35099 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
35101 #define CONDITION 0
35103 int test[CONDITION ? 1 : -1];
35112 if ac_fn_c_try_compile "$LINENO"; then :
35113 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
35115 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
35117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
35120 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
35121 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
35122 UINT64_MAX_EQ_ULONG_MAX=1;
35124 UINT64_MAX_EQ_ULONG_MAX=0;
35129 UINT64_MAX_EQ_ULONG_MAX=-1
35135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
35136 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
35137 if ${gl_cv_cc_double_expbit0+:} false; then :
35138 $as_echo_n "(cached) " >&6
35141 if test "$cross_compiling" = yes; then :
35143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35144 /* end confdefs.h. */
35146 #if defined arm || defined __arm || defined __arm__
35151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35152 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
35153 gl_cv_cc_double_expbit0="unknown"
35157 if ${ac_cv_c_bigendian+:} false; then :
35158 $as_echo_n "(cached) " >&6
35160 ac_cv_c_bigendian=unknown
35161 # See if we're dealing with a universal compiler.
35162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35163 /* end confdefs.h. */
35164 #ifndef __APPLE_CC__
35165 not a universal capable compiler
35170 if ac_fn_c_try_compile "$LINENO"; then :
35172 # Check for potential -arch flags. It is not universal unless
35173 # there are at least two -arch flags with different values.
35176 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
35177 if test -n "$ac_prev"; then
35179 i?86 | x86_64 | ppc | ppc64)
35180 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
35183 ac_cv_c_bigendian=universal
35189 elif test "x$ac_word" = "x-arch"; then
35194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35195 if test $ac_cv_c_bigendian = unknown; then
35196 # See if sys/param.h defines the BYTE_ORDER macro.
35197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35198 /* end confdefs.h. */
35199 #include <sys/types.h>
35200 #include <sys/param.h>
35205 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
35206 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
35208 bogus endian macros
35215 if ac_fn_c_try_compile "$LINENO"; then :
35216 # It does; now see whether it defined to BIG_ENDIAN or not.
35217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35218 /* end confdefs.h. */
35219 #include <sys/types.h>
35220 #include <sys/param.h>
35225 #if BYTE_ORDER != BIG_ENDIAN
35233 if ac_fn_c_try_compile "$LINENO"; then :
35234 ac_cv_c_bigendian=yes
35236 ac_cv_c_bigendian=no
35238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35242 if test $ac_cv_c_bigendian = unknown; then
35243 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
35244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35245 /* end confdefs.h. */
35246 #include <limits.h>
35251 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
35252 bogus endian macros
35259 if ac_fn_c_try_compile "$LINENO"; then :
35260 # It does; now see whether it defined to _BIG_ENDIAN or not.
35261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35262 /* end confdefs.h. */
35263 #include <limits.h>
35268 #ifndef _BIG_ENDIAN
35276 if ac_fn_c_try_compile "$LINENO"; then :
35277 ac_cv_c_bigendian=yes
35279 ac_cv_c_bigendian=no
35281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35285 if test $ac_cv_c_bigendian = unknown; then
35286 # Compile a test program.
35287 if test "$cross_compiling" = yes; then :
35288 # Try to guess by grepping values from an object file.
35289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35290 /* end confdefs.h. */
35291 short int ascii_mm[] =
35292 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
35293 short int ascii_ii[] =
35294 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
35295 int use_ascii (int i) {
35296 return ascii_mm[i] + ascii_ii[i];
35298 short int ebcdic_ii[] =
35299 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
35300 short int ebcdic_mm[] =
35301 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
35302 int use_ebcdic (int i) {
35303 return ebcdic_mm[i] + ebcdic_ii[i];
35310 return use_ascii (foo) == use_ebcdic (foo);
35315 if ac_fn_c_try_compile "$LINENO"; then :
35316 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
35317 ac_cv_c_bigendian=yes
35319 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
35320 if test "$ac_cv_c_bigendian" = unknown; then
35321 ac_cv_c_bigendian=no
35323 # finding both strings is unlikely to happen, but who knows?
35324 ac_cv_c_bigendian=unknown
35328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35331 /* end confdefs.h. */
35332 $ac_includes_default
35337 /* Are we little or big endian? From Harbison&Steele. */
35341 char c[sizeof (long int)];
35344 return u.c[sizeof (long int) - 1] == 1;
35350 if ac_fn_c_try_run "$LINENO"; then :
35351 ac_cv_c_bigendian=no
35353 ac_cv_c_bigendian=yes
35355 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35356 conftest.$ac_objext conftest.beam conftest.$ac_ext
35362 case $ac_cv_c_bigendian in #(
35364 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
35366 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
35369 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
35373 gl_cv_cc_double_expbit0="unknown" ;;
35382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35383 /* end confdefs.h. */
35386 #include <stddef.h>
35388 #include <string.h>
35390 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35391 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
35392 static unsigned int ored_words[NWORDS];
35393 static unsigned int anded_words[NWORDS];
35394 static void add_to_ored_words (double x)
35398 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
35399 memset (&m, 0, sizeof (memory_double));
35401 for (i = 0; i < NWORDS; i++)
35403 ored_words[i] |= m.word[i];
35404 anded_words[i] &= m.word[i];
35410 FILE *fp = fopen ("conftest.out", "w");
35413 for (j = 0; j < NWORDS; j++)
35414 anded_words[j] = ~ (unsigned int) 0;
35415 add_to_ored_words (0.25);
35416 add_to_ored_words (0.5);
35417 add_to_ored_words (1.0);
35418 add_to_ored_words (2.0);
35419 add_to_ored_words (4.0);
35420 /* Remove bits that are common (e.g. if representation of the first mantissa
35421 bit is explicit). */
35422 for (j = 0; j < NWORDS; j++)
35423 ored_words[j] &= ~anded_words[j];
35424 /* Now find the nonzero word. */
35425 for (j = 0; j < NWORDS; j++)
35426 if (ored_words[j] != 0)
35431 for (i = j + 1; i < NWORDS; i++)
35432 if (ored_words[i] != 0)
35434 fprintf (fp, "unknown");
35435 return (fclose (fp) != 0);
35438 if ((ored_words[j] >> i) & 1)
35440 fprintf (fp, "word %d bit %d", (int) j, (int) i);
35441 return (fclose (fp) != 0);
35444 fprintf (fp, "unknown");
35445 return (fclose (fp) != 0);
35449 if ac_fn_c_try_run "$LINENO"; then :
35450 gl_cv_cc_double_expbit0=`cat conftest.out`
35452 gl_cv_cc_double_expbit0="unknown"
35454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35455 conftest.$ac_objext conftest.beam conftest.$ac_ext
35461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
35462 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
35463 case "$gl_cv_cc_double_expbit0" in
35465 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
35466 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
35468 cat >>confdefs.h <<_ACEOF
35469 #define DBL_EXPBIT0_WORD $word
35473 cat >>confdefs.h <<_ACEOF
35474 #define DBL_EXPBIT0_BIT $bit
35481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
35482 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
35483 if ${gl_cv_cc_float_expbit0+:} false; then :
35484 $as_echo_n "(cached) " >&6
35487 if test "$cross_compiling" = yes; then :
35488 gl_cv_cc_float_expbit0="word 0 bit 23"
35490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35491 /* end confdefs.h. */
35494 #include <stddef.h>
35496 #include <string.h>
35498 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35499 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
35500 static unsigned int ored_words[NWORDS];
35501 static unsigned int anded_words[NWORDS];
35502 static void add_to_ored_words (float x)
35506 /* Clear it first, in case
35507 sizeof (float) < sizeof (memory_float). */
35508 memset (&m, 0, sizeof (memory_float));
35510 for (i = 0; i < NWORDS; i++)
35512 ored_words[i] |= m.word[i];
35513 anded_words[i] &= m.word[i];
35519 FILE *fp = fopen ("conftest.out", "w");
35522 for (j = 0; j < NWORDS; j++)
35523 anded_words[j] = ~ (unsigned int) 0;
35524 add_to_ored_words (0.25f);
35525 add_to_ored_words (0.5f);
35526 add_to_ored_words (1.0f);
35527 add_to_ored_words (2.0f);
35528 add_to_ored_words (4.0f);
35529 /* Remove bits that are common (e.g. if representation of the first mantissa
35530 bit is explicit). */
35531 for (j = 0; j < NWORDS; j++)
35532 ored_words[j] &= ~anded_words[j];
35533 /* Now find the nonzero word. */
35534 for (j = 0; j < NWORDS; j++)
35535 if (ored_words[j] != 0)
35540 for (i = j + 1; i < NWORDS; i++)
35541 if (ored_words[i] != 0)
35543 fprintf (fp, "unknown");
35544 return (fclose (fp) != 0);
35547 if ((ored_words[j] >> i) & 1)
35549 fprintf (fp, "word %d bit %d", (int) j, (int) i);
35550 return (fclose (fp) != 0);
35553 fprintf (fp, "unknown");
35554 return (fclose (fp) != 0);
35558 if ac_fn_c_try_run "$LINENO"; then :
35559 gl_cv_cc_float_expbit0=`cat conftest.out`
35561 gl_cv_cc_float_expbit0="unknown"
35563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35564 conftest.$ac_objext conftest.beam conftest.$ac_ext
35570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
35571 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
35572 case "$gl_cv_cc_float_expbit0" in
35574 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
35575 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
35577 cat >>confdefs.h <<_ACEOF
35578 #define FLT_EXPBIT0_WORD $word
35582 cat >>confdefs.h <<_ACEOF
35583 #define FLT_EXPBIT0_BIT $bit
35591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
35592 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
35593 if ${gl_cv_cc_long_double_expbit0+:} false; then :
35594 $as_echo_n "(cached) " >&6
35597 if test "$cross_compiling" = yes; then :
35599 gl_cv_cc_long_double_expbit0="unknown"
35602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35603 /* end confdefs.h. */
35606 #include <stddef.h>
35608 #include <string.h>
35610 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35611 typedef union { long double value; unsigned int word[NWORDS]; }
35612 memory_long_double;
35613 static unsigned int ored_words[NWORDS];
35614 static unsigned int anded_words[NWORDS];
35615 static void add_to_ored_words (long double x)
35617 memory_long_double m;
35619 /* Clear it first, in case
35620 sizeof (long double) < sizeof (memory_long_double). */
35621 memset (&m, 0, sizeof (memory_long_double));
35623 for (i = 0; i < NWORDS; i++)
35625 ored_words[i] |= m.word[i];
35626 anded_words[i] &= m.word[i];
35632 FILE *fp = fopen ("conftest.out", "w");
35635 for (j = 0; j < NWORDS; j++)
35636 anded_words[j] = ~ (unsigned int) 0;
35637 add_to_ored_words (0.25L);
35638 add_to_ored_words (0.5L);
35639 add_to_ored_words (1.0L);
35640 add_to_ored_words (2.0L);
35641 add_to_ored_words (4.0L);
35642 /* Remove bits that are common (e.g. if representation of the first mantissa
35643 bit is explicit). */
35644 for (j = 0; j < NWORDS; j++)
35645 ored_words[j] &= ~anded_words[j];
35646 /* Now find the nonzero word. */
35647 for (j = 0; j < NWORDS; j++)
35648 if (ored_words[j] != 0)
35653 for (i = j + 1; i < NWORDS; i++)
35654 if (ored_words[i] != 0)
35656 fprintf (fp, "unknown");
35657 return (fclose (fp) != 0);
35660 if ((ored_words[j] >> i) & 1)
35662 fprintf (fp, "word %d bit %d", (int) j, (int) i);
35663 return (fclose (fp) != 0);
35666 fprintf (fp, "unknown");
35667 return (fclose (fp) != 0);
35671 if ac_fn_c_try_run "$LINENO"; then :
35672 gl_cv_cc_long_double_expbit0=`cat conftest.out`
35674 gl_cv_cc_long_double_expbit0="unknown"
35676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35677 conftest.$ac_objext conftest.beam conftest.$ac_ext
35683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
35684 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
35685 case "$gl_cv_cc_long_double_expbit0" in
35687 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
35688 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
35690 cat >>confdefs.h <<_ACEOF
35691 #define LDBL_EXPBIT0_WORD $word
35695 cat >>confdefs.h <<_ACEOF
35696 #define LDBL_EXPBIT0_BIT $bit
35706 if test $ac_cv_func_link = no; then
35709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
35710 $as_echo_n "checking whether link obeys POSIX... " >&6; }
35711 if ${gl_cv_func_link_works+:} false; then :
35712 $as_echo_n "(cached) " >&6
35715 # Assume that if we have lstat, we can also check symlinks.
35716 if test $ac_cv_func_lstat = yes; then
35717 ln -s conftest.a conftest.lnk
35719 if test "$cross_compiling" = yes; then :
35721 # Guess yes on glibc systems.
35722 *-gnu*) gl_cv_func_link_works="guessing yes" ;;
35723 # If we don't know, assume the worst.
35724 *) gl_cv_func_link_works="guessing no" ;;
35728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35729 /* end confdefs.h. */
35730 #include <unistd.h>
35736 if (!link ("conftest.a", "conftest.b/"))
35739 if (!link ("conftest.lnk/", "conftest.b"))
35741 if (rename ("conftest.a", "conftest.b"))
35743 if (!link ("conftest.b", "conftest.lnk"))
35752 if ac_fn_c_try_run "$LINENO"; then :
35753 gl_cv_func_link_works=yes
35755 gl_cv_func_link_works=no
35757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35758 conftest.$ac_objext conftest.beam conftest.$ac_ext
35761 rm -f conftest.a conftest.b conftest.lnk
35763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
35764 $as_echo "$gl_cv_func_link_works" >&6; }
35765 case "$gl_cv_func_link_works" in
35773 if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
35782 M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
35790 if test "$GNULIB_LINK" != 1; then
35791 if test "$GNULIB_LINK" = 0; then
35792 GNULIB_LINK=$gl_module_indicator_condition
35794 GNULIB_LINK="($GNULIB_LINK || $gl_module_indicator_condition)"
35802 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
35810 for ac_func in setlocale uselocale
35812 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
35813 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
35814 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
35815 cat >>confdefs.h <<_ACEOF
35816 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
35827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
35828 $as_echo_n "checking for a traditional french locale... " >&6; }
35829 if ${gt_cv_locale_fr+:} false; then :
35830 $as_echo_n "(cached) " >&6
35833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35834 /* end confdefs.h. */
35836 #include <locale.h>
35838 #if HAVE_LANGINFO_CODESET
35839 # include <langinfo.h>
35841 #include <stdlib.h>
35842 #include <string.h>
35846 /* Check whether the given locale name is recognized by the system. */
35847 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
35848 /* On native Windows, setlocale(category, "") looks at the system settings,
35849 not at the environment variables. Also, when an encoding suffix such
35850 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35851 category of the locale to "C". */
35852 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35853 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35856 if (setlocale (LC_ALL, "") == NULL) return 1;
35858 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35859 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35860 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35861 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35862 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35863 some unit tests fail.
35864 On MirBSD 10, when an unsupported locale is specified, setlocale()
35865 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
35866 #if HAVE_LANGINFO_CODESET
35868 const char *cs = nl_langinfo (CODESET);
35869 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
35870 || strcmp (cs, "UTF-8") == 0)
35875 /* On Cygwin, avoid locale names without encoding suffix, because the
35876 locale_charset() function relies on the encoding suffix. Note that
35877 LC_ALL is set on the command line. */
35878 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35880 /* Check whether in the abbreviation of the second month, the second
35881 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
35882 one byte long. This excludes the UTF-8 encoding. */
35883 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35884 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
35885 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
35886 /* Check whether the decimal separator is a comma.
35887 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
35888 are nl_langinfo(RADIXCHAR) are both ".". */
35889 if (localeconv () ->decimal_point[0] != ',') return 1;
35895 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35896 (eval $ac_link) 2>&5
35898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35899 test $ac_status = 0; } && test -s conftest$ac_exeext; then
35901 # Handle native Windows specially, because there setlocale() interprets
35902 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35903 # "fr" or "fra" as "French" or "French_France.1252",
35904 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35905 # "ja" as "Japanese" or "Japanese_Japan.932",
35908 # Test for the native Windows locale name.
35909 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35910 gt_cv_locale_fr=French_France.1252
35913 gt_cv_locale_fr=none
35917 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35918 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35919 # configure script would override the LC_ALL setting. Likewise for
35920 # LC_CTYPE, which is also set at the beginning of the configure script.
35921 # Test for the usual locale name.
35922 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35923 gt_cv_locale_fr=fr_FR
35925 # Test for the locale name with explicit encoding suffix.
35926 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35927 gt_cv_locale_fr=fr_FR.ISO-8859-1
35929 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
35930 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35931 gt_cv_locale_fr=fr_FR.ISO8859-1
35933 # Test for the HP-UX locale name.
35934 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35935 gt_cv_locale_fr=fr_FR.iso88591
35937 # Test for the Solaris 7 locale name.
35938 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35942 gt_cv_locale_fr=none
35954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
35955 $as_echo "$gt_cv_locale_fr" >&6; }
35956 LOCALE_FR=$gt_cv_locale_fr
35961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
35962 $as_echo_n "checking for a french Unicode locale... " >&6; }
35963 if ${gt_cv_locale_fr_utf8+:} false; then :
35964 $as_echo_n "(cached) " >&6
35967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35968 /* end confdefs.h. */
35970 #include <locale.h>
35972 #if HAVE_LANGINFO_CODESET
35973 # include <langinfo.h>
35975 #include <stdlib.h>
35976 #include <string.h>
35980 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
35981 imitates locale dependent behaviour by looking at the environment
35982 variables, and all locales use the UTF-8 encoding. */
35983 #if !(defined __BEOS__ || defined __HAIKU__)
35984 /* Check whether the given locale name is recognized by the system. */
35985 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
35986 /* On native Windows, setlocale(category, "") looks at the system settings,
35987 not at the environment variables. Also, when an encoding suffix such
35988 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35989 category of the locale to "C". */
35990 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35991 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35994 if (setlocale (LC_ALL, "") == NULL) return 1;
35996 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35997 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35998 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35999 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36000 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36001 some unit tests fail. */
36002 # if HAVE_LANGINFO_CODESET
36004 const char *cs = nl_langinfo (CODESET);
36005 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
36010 /* On Cygwin, avoid locale names without encoding suffix, because the
36011 locale_charset() function relies on the encoding suffix. Note that
36012 LC_ALL is set on the command line. */
36013 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36015 /* Check whether in the abbreviation of the second month, the second
36016 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
36017 two bytes long, with UTF-8 encoding. */
36018 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36019 if (strftime (buf, sizeof (buf), "%b", &t) < 4
36020 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
36023 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
36024 /* Check whether the decimal separator is a comma.
36025 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36026 are nl_langinfo(RADIXCHAR) are both ".". */
36027 if (localeconv () ->decimal_point[0] != ',') return 1;
36033 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36034 (eval $ac_link) 2>&5
36036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36037 test $ac_status = 0; } && test -s conftest$ac_exeext; then
36039 # Handle native Windows specially, because there setlocale() interprets
36040 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36041 # "fr" or "fra" as "French" or "French_France.1252",
36042 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36043 # "ja" as "Japanese" or "Japanese_Japan.932",
36046 # Test for the hypothetical native Windows locale name.
36047 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36048 gt_cv_locale_fr_utf8=French_France.65001
36051 gt_cv_locale_fr_utf8=none
36055 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36056 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36057 # configure script would override the LC_ALL setting. Likewise for
36058 # LC_CTYPE, which is also set at the beginning of the configure script.
36059 # Test for the usual locale name.
36060 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36061 gt_cv_locale_fr_utf8=fr_FR
36063 # Test for the locale name with explicit encoding suffix.
36064 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36065 gt_cv_locale_fr_utf8=fr_FR.UTF-8
36067 # Test for the Solaris 7 locale name.
36068 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36069 gt_cv_locale_fr_utf8=fr.UTF-8
36072 gt_cv_locale_fr_utf8=none
36082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
36083 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
36084 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
36090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
36091 $as_echo_n "checking for a traditional japanese locale... " >&6; }
36092 if ${gt_cv_locale_ja+:} false; then :
36093 $as_echo_n "(cached) " >&6
36096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36097 /* end confdefs.h. */
36099 #include <locale.h>
36101 #if HAVE_LANGINFO_CODESET
36102 # include <langinfo.h>
36104 #include <stdlib.h>
36105 #include <string.h>
36111 /* Check whether the given locale name is recognized by the system. */
36112 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36113 /* On native Windows, setlocale(category, "") looks at the system settings,
36114 not at the environment variables. Also, when an encoding suffix such
36115 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36116 category of the locale to "C". */
36117 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36118 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36121 if (setlocale (LC_ALL, "") == NULL) return 1;
36123 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36124 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36125 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36126 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36127 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36128 some unit tests fail.
36129 On MirBSD 10, when an unsupported locale is specified, setlocale()
36130 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
36131 #if HAVE_LANGINFO_CODESET
36133 const char *cs = nl_langinfo (CODESET);
36134 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36135 || strcmp (cs, "UTF-8") == 0)
36140 /* On Cygwin, avoid locale names without encoding suffix, because the
36141 locale_charset() function relies on the encoding suffix. Note that
36142 LC_ALL is set on the command line. */
36143 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36145 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
36146 on Cygwin 1.5.x. */
36147 if (MB_CUR_MAX == 1)
36149 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
36150 This excludes the UTF-8 encoding (except on MirBSD). */
36151 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36152 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
36153 for (p = buf; *p != '\0'; p++)
36154 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
36160 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36161 (eval $ac_link) 2>&5
36163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36164 test $ac_status = 0; } && test -s conftest$ac_exeext; then
36166 # Handle native Windows specially, because there setlocale() interprets
36167 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36168 # "fr" or "fra" as "French" or "French_France.1252",
36169 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36170 # "ja" as "Japanese" or "Japanese_Japan.932",
36173 # Note that on native Windows, the Japanese locale is
36174 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
36175 # cannot use it here.
36176 gt_cv_locale_ja=none
36179 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36180 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36181 # configure script would override the LC_ALL setting. Likewise for
36182 # LC_CTYPE, which is also set at the beginning of the configure script.
36183 # Test for the AIX locale name.
36184 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36185 gt_cv_locale_ja=ja_JP
36187 # Test for the locale name with explicit encoding suffix.
36188 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36189 gt_cv_locale_ja=ja_JP.EUC-JP
36191 # Test for the HP-UX, OSF/1, NetBSD locale name.
36192 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36193 gt_cv_locale_ja=ja_JP.eucJP
36195 # Test for the IRIX, FreeBSD locale name.
36196 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36197 gt_cv_locale_ja=ja_JP.EUC
36199 # Test for the Solaris 7 locale name.
36200 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36203 # Special test for NetBSD 1.6.
36204 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
36205 gt_cv_locale_ja=ja_JP.eucJP
36208 gt_cv_locale_ja=none
36221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
36222 $as_echo "$gt_cv_locale_ja" >&6; }
36223 LOCALE_JA=$gt_cv_locale_ja
36229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
36230 $as_echo_n "checking for a transitional chinese locale... " >&6; }
36231 if ${gt_cv_locale_zh_CN+:} false; then :
36232 $as_echo_n "(cached) " >&6
36235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36236 /* end confdefs.h. */
36238 #include <locale.h>
36239 #include <stdlib.h>
36241 #if HAVE_LANGINFO_CODESET
36242 # include <langinfo.h>
36244 #include <stdlib.h>
36245 #include <string.h>
36251 /* Check whether the given locale name is recognized by the system. */
36252 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36253 /* On native Windows, setlocale(category, "") looks at the system settings,
36254 not at the environment variables. Also, when an encoding suffix such
36255 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36256 category of the locale to "C". */
36257 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36258 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36261 if (setlocale (LC_ALL, "") == NULL) return 1;
36263 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36264 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36265 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36266 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36267 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36268 some unit tests fail.
36269 On MirBSD 10, when an unsupported locale is specified, setlocale()
36270 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
36271 #if HAVE_LANGINFO_CODESET
36273 const char *cs = nl_langinfo (CODESET);
36274 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36275 || strcmp (cs, "UTF-8") == 0)
36280 /* On Cygwin, avoid locale names without encoding suffix, because the
36281 locale_charset() function relies on the encoding suffix. Note that
36282 LC_ALL is set on the command line. */
36283 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36285 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
36286 This excludes the UTF-8 encoding (except on MirBSD). */
36287 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36288 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
36289 for (p = buf; *p != '\0'; p++)
36290 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
36292 /* Check whether a typical GB18030 multibyte sequence is recognized as a
36293 single wide character. This excludes the GB2312 and GBK encodings. */
36294 if (mblen ("\203\062\332\066", 5) != 4)
36300 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36301 (eval $ac_link) 2>&5
36303 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36304 test $ac_status = 0; } && test -s conftest$ac_exeext; then
36306 # Handle native Windows specially, because there setlocale() interprets
36307 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36308 # "fr" or "fra" as "French" or "French_France.1252",
36309 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36310 # "ja" as "Japanese" or "Japanese_Japan.932",
36313 # Test for the hypothetical native Windows locale name.
36314 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36315 gt_cv_locale_zh_CN=Chinese_China.54936
36318 gt_cv_locale_zh_CN=none
36322 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
36323 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
36324 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
36325 gt_cv_locale_zh_CN=none
36328 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36329 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36330 # configure script would override the LC_ALL setting. Likewise for
36331 # LC_CTYPE, which is also set at the beginning of the configure script.
36332 # Test for the locale name without encoding suffix.
36333 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36334 gt_cv_locale_zh_CN=zh_CN
36336 # Test for the locale name with explicit encoding suffix.
36337 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36338 gt_cv_locale_zh_CN=zh_CN.GB18030
36341 gt_cv_locale_zh_CN=none
36347 # If there was a link error, due to mblen(), the system is so old that
36348 # it certainly doesn't have a chinese locale.
36349 gt_cv_locale_zh_CN=none
36354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
36355 $as_echo "$gt_cv_locale_zh_CN" >&6; }
36356 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
36361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
36362 $as_echo_n "checking for a french Unicode locale... " >&6; }
36363 if ${gt_cv_locale_fr_utf8+:} false; then :
36364 $as_echo_n "(cached) " >&6
36367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36368 /* end confdefs.h. */
36370 #include <locale.h>
36372 #if HAVE_LANGINFO_CODESET
36373 # include <langinfo.h>
36375 #include <stdlib.h>
36376 #include <string.h>
36380 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
36381 imitates locale dependent behaviour by looking at the environment
36382 variables, and all locales use the UTF-8 encoding. */
36383 #if !(defined __BEOS__ || defined __HAIKU__)
36384 /* Check whether the given locale name is recognized by the system. */
36385 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36386 /* On native Windows, setlocale(category, "") looks at the system settings,
36387 not at the environment variables. Also, when an encoding suffix such
36388 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36389 category of the locale to "C". */
36390 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36391 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36394 if (setlocale (LC_ALL, "") == NULL) return 1;
36396 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36397 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36398 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36399 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36400 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36401 some unit tests fail. */
36402 # if HAVE_LANGINFO_CODESET
36404 const char *cs = nl_langinfo (CODESET);
36405 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
36410 /* On Cygwin, avoid locale names without encoding suffix, because the
36411 locale_charset() function relies on the encoding suffix. Note that
36412 LC_ALL is set on the command line. */
36413 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36415 /* Check whether in the abbreviation of the second month, the second
36416 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
36417 two bytes long, with UTF-8 encoding. */
36418 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36419 if (strftime (buf, sizeof (buf), "%b", &t) < 4
36420 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
36423 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
36424 /* Check whether the decimal separator is a comma.
36425 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36426 are nl_langinfo(RADIXCHAR) are both ".". */
36427 if (localeconv () ->decimal_point[0] != ',') return 1;
36433 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36434 (eval $ac_link) 2>&5
36436 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36437 test $ac_status = 0; } && test -s conftest$ac_exeext; then
36439 # Handle native Windows specially, because there setlocale() interprets
36440 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36441 # "fr" or "fra" as "French" or "French_France.1252",
36442 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36443 # "ja" as "Japanese" or "Japanese_Japan.932",
36446 # Test for the hypothetical native Windows locale name.
36447 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36448 gt_cv_locale_fr_utf8=French_France.65001
36451 gt_cv_locale_fr_utf8=none
36455 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36456 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36457 # configure script would override the LC_ALL setting. Likewise for
36458 # LC_CTYPE, which is also set at the beginning of the configure script.
36459 # Test for the usual locale name.
36460 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36461 gt_cv_locale_fr_utf8=fr_FR
36463 # Test for the locale name with explicit encoding suffix.
36464 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36465 gt_cv_locale_fr_utf8=fr_FR.UTF-8
36467 # Test for the Solaris 7 locale name.
36468 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36469 gt_cv_locale_fr_utf8=fr.UTF-8
36472 gt_cv_locale_fr_utf8=none
36482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
36483 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
36484 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
36490 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
36491 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
36492 # irrelevant for anonymous mappings.
36493 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
36494 if test "x$ac_cv_func_mmap" = xyes; then :
36501 # Try to allow MAP_ANONYMOUS.
36502 gl_have_mmap_anonymous=no
36503 if test $gl_have_mmap = yes; then
36504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
36505 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
36506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36507 /* end confdefs.h. */
36509 #include <sys/mman.h>
36510 #ifdef MAP_ANONYMOUS
36511 I cannot identify this map
36515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36516 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
36517 gl_have_mmap_anonymous=yes
36521 if test $gl_have_mmap_anonymous != yes; then
36522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36523 /* end confdefs.h. */
36525 #include <sys/mman.h>
36527 I cannot identify this map
36531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36532 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
36534 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
36536 gl_have_mmap_anonymous=yes
36541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
36542 $as_echo "$gl_have_mmap_anonymous" >&6; }
36543 if test $gl_have_mmap_anonymous = yes; then
36545 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
36555 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
36556 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
36557 # irrelevant for anonymous mappings.
36558 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
36559 if test "x$ac_cv_func_mmap" = xyes; then :
36566 # Try to allow MAP_ANONYMOUS.
36567 gl_have_mmap_anonymous=no
36568 if test $gl_have_mmap = yes; then
36569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
36570 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
36571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36572 /* end confdefs.h. */
36574 #include <sys/mman.h>
36575 #ifdef MAP_ANONYMOUS
36576 I cannot identify this map
36580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36581 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
36582 gl_have_mmap_anonymous=yes
36586 if test $gl_have_mmap_anonymous != yes; then
36587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36588 /* end confdefs.h. */
36590 #include <sys/mman.h>
36592 I cannot identify this map
36596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36597 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
36599 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
36601 gl_have_mmap_anonymous=yes
36606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
36607 $as_echo "$gl_have_mmap_anonymous" >&6; }
36608 if test $gl_have_mmap_anonymous = yes; then
36610 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
36620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
36621 $as_echo_n "checking for a traditional french locale... " >&6; }
36622 if ${gt_cv_locale_fr+:} false; then :
36623 $as_echo_n "(cached) " >&6
36626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36627 /* end confdefs.h. */
36629 #include <locale.h>
36631 #if HAVE_LANGINFO_CODESET
36632 # include <langinfo.h>
36634 #include <stdlib.h>
36635 #include <string.h>
36639 /* Check whether the given locale name is recognized by the system. */
36640 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36641 /* On native Windows, setlocale(category, "") looks at the system settings,
36642 not at the environment variables. Also, when an encoding suffix such
36643 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36644 category of the locale to "C". */
36645 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36646 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36649 if (setlocale (LC_ALL, "") == NULL) return 1;
36651 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36652 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36653 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36654 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36655 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36656 some unit tests fail.
36657 On MirBSD 10, when an unsupported locale is specified, setlocale()
36658 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
36659 #if HAVE_LANGINFO_CODESET
36661 const char *cs = nl_langinfo (CODESET);
36662 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36663 || strcmp (cs, "UTF-8") == 0)
36668 /* On Cygwin, avoid locale names without encoding suffix, because the
36669 locale_charset() function relies on the encoding suffix. Note that
36670 LC_ALL is set on the command line. */
36671 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36673 /* Check whether in the abbreviation of the second month, the second
36674 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
36675 one byte long. This excludes the UTF-8 encoding. */
36676 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36677 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
36678 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
36679 /* Check whether the decimal separator is a comma.
36680 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36681 are nl_langinfo(RADIXCHAR) are both ".". */
36682 if (localeconv () ->decimal_point[0] != ',') return 1;
36688 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36689 (eval $ac_link) 2>&5
36691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36692 test $ac_status = 0; } && test -s conftest$ac_exeext; then
36694 # Handle native Windows specially, because there setlocale() interprets
36695 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36696 # "fr" or "fra" as "French" or "French_France.1252",
36697 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36698 # "ja" as "Japanese" or "Japanese_Japan.932",
36701 # Test for the native Windows locale name.
36702 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36703 gt_cv_locale_fr=French_France.1252
36706 gt_cv_locale_fr=none
36710 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36711 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36712 # configure script would override the LC_ALL setting. Likewise for
36713 # LC_CTYPE, which is also set at the beginning of the configure script.
36714 # Test for the usual locale name.
36715 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36716 gt_cv_locale_fr=fr_FR
36718 # Test for the locale name with explicit encoding suffix.
36719 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36720 gt_cv_locale_fr=fr_FR.ISO-8859-1
36722 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
36723 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36724 gt_cv_locale_fr=fr_FR.ISO8859-1
36726 # Test for the HP-UX locale name.
36727 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36728 gt_cv_locale_fr=fr_FR.iso88591
36730 # Test for the Solaris 7 locale name.
36731 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36735 gt_cv_locale_fr=none
36747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
36748 $as_echo "$gt_cv_locale_fr" >&6; }
36749 LOCALE_FR=$gt_cv_locale_fr
36754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
36755 $as_echo_n "checking for a french Unicode locale... " >&6; }
36756 if ${gt_cv_locale_fr_utf8+:} false; then :
36757 $as_echo_n "(cached) " >&6
36760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36761 /* end confdefs.h. */
36763 #include <locale.h>
36765 #if HAVE_LANGINFO_CODESET
36766 # include <langinfo.h>
36768 #include <stdlib.h>
36769 #include <string.h>
36773 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
36774 imitates locale dependent behaviour by looking at the environment
36775 variables, and all locales use the UTF-8 encoding. */
36776 #if !(defined __BEOS__ || defined __HAIKU__)
36777 /* Check whether the given locale name is recognized by the system. */
36778 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36779 /* On native Windows, setlocale(category, "") looks at the system settings,
36780 not at the environment variables. Also, when an encoding suffix such
36781 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36782 category of the locale to "C". */
36783 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36784 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36787 if (setlocale (LC_ALL, "") == NULL) return 1;
36789 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36790 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36791 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36792 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36793 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36794 some unit tests fail. */
36795 # if HAVE_LANGINFO_CODESET
36797 const char *cs = nl_langinfo (CODESET);
36798 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
36803 /* On Cygwin, avoid locale names without encoding suffix, because the
36804 locale_charset() function relies on the encoding suffix. Note that
36805 LC_ALL is set on the command line. */
36806 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36808 /* Check whether in the abbreviation of the second month, the second
36809 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
36810 two bytes long, with UTF-8 encoding. */
36811 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36812 if (strftime (buf, sizeof (buf), "%b", &t) < 4
36813 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
36816 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
36817 /* Check whether the decimal separator is a comma.
36818 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36819 are nl_langinfo(RADIXCHAR) are both ".". */
36820 if (localeconv () ->decimal_point[0] != ',') return 1;
36826 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36827 (eval $ac_link) 2>&5
36829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36830 test $ac_status = 0; } && test -s conftest$ac_exeext; then
36832 # Handle native Windows specially, because there setlocale() interprets
36833 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36834 # "fr" or "fra" as "French" or "French_France.1252",
36835 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36836 # "ja" as "Japanese" or "Japanese_Japan.932",
36839 # Test for the hypothetical native Windows locale name.
36840 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36841 gt_cv_locale_fr_utf8=French_France.65001
36844 gt_cv_locale_fr_utf8=none
36848 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36849 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36850 # configure script would override the LC_ALL setting. Likewise for
36851 # LC_CTYPE, which is also set at the beginning of the configure script.
36852 # Test for the usual locale name.
36853 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36854 gt_cv_locale_fr_utf8=fr_FR
36856 # Test for the locale name with explicit encoding suffix.
36857 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36858 gt_cv_locale_fr_utf8=fr_FR.UTF-8
36860 # Test for the Solaris 7 locale name.
36861 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36862 gt_cv_locale_fr_utf8=fr.UTF-8
36865 gt_cv_locale_fr_utf8=none
36875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
36876 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
36877 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
36883 for ac_func in opendir
36885 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
36886 if test "x$ac_cv_func_opendir" = xyes; then :
36887 cat >>confdefs.h <<_ACEOF
36888 #define HAVE_OPENDIR 1
36894 if test $ac_cv_func_opendir = no; then
36899 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
36908 M4tests_LIBOBJS="$M4tests_LIBOBJS opendir.$ac_objext"
36916 if test "$GNULIB_OPENDIR" != 1; then
36917 if test "$GNULIB_OPENDIR" = 0; then
36918 GNULIB_OPENDIR=$gl_module_indicator_condition
36920 GNULIB_OPENDIR="($GNULIB_OPENDIR || $gl_module_indicator_condition)"
36928 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
36932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36933 /* end confdefs.h. */
36935 #if defined _MSC_VER || defined __MINGW32__
36940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36941 $EGREP "notposix" >/dev/null 2>&1; then :
36942 posix_spawn_ported=no
36944 posix_spawn_ported=yes
36948 if test $posix_spawn_ported = yes; then
36949 POSIX_SPAWN_PORTED_TRUE=
36950 POSIX_SPAWN_PORTED_FALSE='#'
36952 POSIX_SPAWN_PORTED_TRUE='#'
36953 POSIX_SPAWN_PORTED_FALSE=
36958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
36959 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
36960 if ${gl_cv_func_svid_putenv+:} false; then :
36961 $as_echo_n "(cached) " >&6
36963 if test "$cross_compiling" = yes; then :
36965 # Guess yes on glibc systems.
36966 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
36967 # If we don't know, assume the worst.
36968 *) gl_cv_func_svid_putenv="guessing no" ;;
36972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36973 /* end confdefs.h. */
36974 $ac_includes_default
36979 /* Put it in env. */
36980 if (putenv ("CONFTEST_putenv=val"))
36983 /* Try to remove it. */
36984 if (putenv ("CONFTEST_putenv"))
36987 /* Make sure it was deleted. */
36988 if (getenv ("CONFTEST_putenv") != 0)
36997 if ac_fn_c_try_run "$LINENO"; then :
36998 gl_cv_func_svid_putenv=yes
37000 gl_cv_func_svid_putenv=no
37002 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37003 conftest.$ac_objext conftest.beam conftest.$ac_ext
37008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
37009 $as_echo "$gl_cv_func_svid_putenv" >&6; }
37010 case "$gl_cv_func_svid_putenv" in
37017 if test $REPLACE_PUTENV = 1; then
37026 M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
37029 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
37030 if test "x$ac_cv_have_decl__putenv" = xyes; then :
37036 cat >>confdefs.h <<_ACEOF
37037 #define HAVE_DECL__PUTENV $ac_have_decl
37047 if test "$GNULIB_PUTENV" != 1; then
37048 if test "$GNULIB_PUTENV" = 0; then
37049 GNULIB_PUTENV=$gl_module_indicator_condition
37051 GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
37059 $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
37066 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
37067 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
37068 # irrelevant for anonymous mappings.
37069 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
37070 if test "x$ac_cv_func_mmap" = xyes; then :
37077 # Try to allow MAP_ANONYMOUS.
37078 gl_have_mmap_anonymous=no
37079 if test $gl_have_mmap = yes; then
37080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
37081 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
37082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37083 /* end confdefs.h. */
37085 #include <sys/mman.h>
37086 #ifdef MAP_ANONYMOUS
37087 I cannot identify this map
37091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37092 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
37093 gl_have_mmap_anonymous=yes
37097 if test $gl_have_mmap_anonymous != yes; then
37098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37099 /* end confdefs.h. */
37101 #include <sys/mman.h>
37103 I cannot identify this map
37107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37108 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
37110 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
37112 gl_have_mmap_anonymous=yes
37117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
37118 $as_echo "$gl_have_mmap_anonymous" >&6; }
37119 if test $gl_have_mmap_anonymous = yes; then
37121 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
37131 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
37132 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
37133 # irrelevant for anonymous mappings.
37134 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
37135 if test "x$ac_cv_func_mmap" = xyes; then :
37142 # Try to allow MAP_ANONYMOUS.
37143 gl_have_mmap_anonymous=no
37144 if test $gl_have_mmap = yes; then
37145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
37146 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
37147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37148 /* end confdefs.h. */
37150 #include <sys/mman.h>
37151 #ifdef MAP_ANONYMOUS
37152 I cannot identify this map
37156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37157 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
37158 gl_have_mmap_anonymous=yes
37162 if test $gl_have_mmap_anonymous != yes; then
37163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37164 /* end confdefs.h. */
37166 #include <sys/mman.h>
37168 I cannot identify this map
37172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37173 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
37175 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
37177 gl_have_mmap_anonymous=yes
37182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
37183 $as_echo "$gl_have_mmap_anonymous" >&6; }
37184 if test $gl_have_mmap_anonymous = yes; then
37186 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
37196 for ac_func in readdir
37198 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
37199 if test "x$ac_cv_func_readdir" = xyes; then :
37200 cat >>confdefs.h <<_ACEOF
37201 #define HAVE_READDIR 1
37207 if test $ac_cv_func_readdir = no; then
37211 if test $HAVE_READDIR = 0; then
37220 M4tests_LIBOBJS="$M4tests_LIBOBJS readdir.$ac_objext"
37228 if test "$GNULIB_READDIR" != 1; then
37229 if test "$GNULIB_READDIR" = 0; then
37230 GNULIB_READDIR=$gl_module_indicator_condition
37232 GNULIB_READDIR="($GNULIB_READDIR || $gl_module_indicator_condition)"
37240 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
37246 if test $ac_cv_func_setenv = no; then
37249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
37250 $as_echo_n "checking whether setenv validates arguments... " >&6; }
37251 if ${gl_cv_func_setenv_works+:} false; then :
37252 $as_echo_n "(cached) " >&6
37254 if test "$cross_compiling" = yes; then :
37256 # Guess yes on glibc systems.
37257 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
37258 # If we don't know, assume the worst.
37259 *) gl_cv_func_setenv_works="guessing no" ;;
37263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37264 /* end confdefs.h. */
37266 #include <stdlib.h>
37268 #include <string.h>
37276 if (setenv ("", "", 0) != -1)
37278 else if (errno != EINVAL)
37282 if (setenv ("a", "=", 1) != 0)
37284 else if (strcmp (getenv ("a"), "=") != 0)
37293 if ac_fn_c_try_run "$LINENO"; then :
37294 gl_cv_func_setenv_works=yes
37296 gl_cv_func_setenv_works=no
37298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37299 conftest.$ac_objext conftest.beam conftest.$ac_ext
37303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
37304 $as_echo "$gl_cv_func_setenv_works" >&6; }
37305 case "$gl_cv_func_setenv_works" in
37313 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
37322 M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
37330 if test "$GNULIB_SETENV" != 1; then
37331 if test "$GNULIB_SETENV" = 0; then
37332 GNULIB_SETENV=$gl_module_indicator_condition
37334 GNULIB_SETENV="($GNULIB_SETENV || $gl_module_indicator_condition)"
37342 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
37350 mingw*) REPLACE_SETLOCALE=1 ;;
37353 1.5.*) REPLACE_SETLOCALE=1 ;;
37358 if test $REPLACE_SETLOCALE = 1; then
37367 M4tests_LIBOBJS="$M4tests_LIBOBJS setlocale.$ac_objext"
37378 if test "$GNULIB_SETLOCALE" != 1; then
37379 if test "$GNULIB_SETLOCALE" = 0; then
37380 GNULIB_SETLOCALE=$gl_module_indicator_condition
37382 GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
37390 $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
37397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
37398 $as_echo_n "checking for a traditional french locale... " >&6; }
37399 if ${gt_cv_locale_fr+:} false; then :
37400 $as_echo_n "(cached) " >&6
37403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37404 /* end confdefs.h. */
37406 #include <locale.h>
37408 #if HAVE_LANGINFO_CODESET
37409 # include <langinfo.h>
37411 #include <stdlib.h>
37412 #include <string.h>
37416 /* Check whether the given locale name is recognized by the system. */
37417 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
37418 /* On native Windows, setlocale(category, "") looks at the system settings,
37419 not at the environment variables. Also, when an encoding suffix such
37420 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37421 category of the locale to "C". */
37422 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37423 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37426 if (setlocale (LC_ALL, "") == NULL) return 1;
37428 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37429 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37430 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37431 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37432 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37433 some unit tests fail.
37434 On MirBSD 10, when an unsupported locale is specified, setlocale()
37435 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
37436 #if HAVE_LANGINFO_CODESET
37438 const char *cs = nl_langinfo (CODESET);
37439 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
37440 || strcmp (cs, "UTF-8") == 0)
37445 /* On Cygwin, avoid locale names without encoding suffix, because the
37446 locale_charset() function relies on the encoding suffix. Note that
37447 LC_ALL is set on the command line. */
37448 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37450 /* Check whether in the abbreviation of the second month, the second
37451 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
37452 one byte long. This excludes the UTF-8 encoding. */
37453 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37454 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
37455 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
37456 /* Check whether the decimal separator is a comma.
37457 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
37458 are nl_langinfo(RADIXCHAR) are both ".". */
37459 if (localeconv () ->decimal_point[0] != ',') return 1;
37465 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37466 (eval $ac_link) 2>&5
37468 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37469 test $ac_status = 0; } && test -s conftest$ac_exeext; then
37471 # Handle native Windows specially, because there setlocale() interprets
37472 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37473 # "fr" or "fra" as "French" or "French_France.1252",
37474 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37475 # "ja" as "Japanese" or "Japanese_Japan.932",
37478 # Test for the native Windows locale name.
37479 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37480 gt_cv_locale_fr=French_France.1252
37483 gt_cv_locale_fr=none
37487 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37488 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37489 # configure script would override the LC_ALL setting. Likewise for
37490 # LC_CTYPE, which is also set at the beginning of the configure script.
37491 # Test for the usual locale name.
37492 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37493 gt_cv_locale_fr=fr_FR
37495 # Test for the locale name with explicit encoding suffix.
37496 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37497 gt_cv_locale_fr=fr_FR.ISO-8859-1
37499 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
37500 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37501 gt_cv_locale_fr=fr_FR.ISO8859-1
37503 # Test for the HP-UX locale name.
37504 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37505 gt_cv_locale_fr=fr_FR.iso88591
37507 # Test for the Solaris 7 locale name.
37508 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37512 gt_cv_locale_fr=none
37524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
37525 $as_echo "$gt_cv_locale_fr" >&6; }
37526 LOCALE_FR=$gt_cv_locale_fr
37531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
37532 $as_echo_n "checking for a french Unicode locale... " >&6; }
37533 if ${gt_cv_locale_fr_utf8+:} false; then :
37534 $as_echo_n "(cached) " >&6
37537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37538 /* end confdefs.h. */
37540 #include <locale.h>
37542 #if HAVE_LANGINFO_CODESET
37543 # include <langinfo.h>
37545 #include <stdlib.h>
37546 #include <string.h>
37550 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
37551 imitates locale dependent behaviour by looking at the environment
37552 variables, and all locales use the UTF-8 encoding. */
37553 #if !(defined __BEOS__ || defined __HAIKU__)
37554 /* Check whether the given locale name is recognized by the system. */
37555 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
37556 /* On native Windows, setlocale(category, "") looks at the system settings,
37557 not at the environment variables. Also, when an encoding suffix such
37558 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37559 category of the locale to "C". */
37560 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37561 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37564 if (setlocale (LC_ALL, "") == NULL) return 1;
37566 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37567 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37568 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37569 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37570 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37571 some unit tests fail. */
37572 # if HAVE_LANGINFO_CODESET
37574 const char *cs = nl_langinfo (CODESET);
37575 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
37580 /* On Cygwin, avoid locale names without encoding suffix, because the
37581 locale_charset() function relies on the encoding suffix. Note that
37582 LC_ALL is set on the command line. */
37583 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37585 /* Check whether in the abbreviation of the second month, the second
37586 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
37587 two bytes long, with UTF-8 encoding. */
37588 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37589 if (strftime (buf, sizeof (buf), "%b", &t) < 4
37590 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
37593 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
37594 /* Check whether the decimal separator is a comma.
37595 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
37596 are nl_langinfo(RADIXCHAR) are both ".". */
37597 if (localeconv () ->decimal_point[0] != ',') return 1;
37603 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37604 (eval $ac_link) 2>&5
37606 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37607 test $ac_status = 0; } && test -s conftest$ac_exeext; then
37609 # Handle native Windows specially, because there setlocale() interprets
37610 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37611 # "fr" or "fra" as "French" or "French_France.1252",
37612 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37613 # "ja" as "Japanese" or "Japanese_Japan.932",
37616 # Test for the hypothetical native Windows locale name.
37617 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37618 gt_cv_locale_fr_utf8=French_France.65001
37621 gt_cv_locale_fr_utf8=none
37625 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37626 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37627 # configure script would override the LC_ALL setting. Likewise for
37628 # LC_CTYPE, which is also set at the beginning of the configure script.
37629 # Test for the usual locale name.
37630 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37631 gt_cv_locale_fr_utf8=fr_FR
37633 # Test for the locale name with explicit encoding suffix.
37634 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37635 gt_cv_locale_fr_utf8=fr_FR.UTF-8
37637 # Test for the Solaris 7 locale name.
37638 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37639 gt_cv_locale_fr_utf8=fr.UTF-8
37642 gt_cv_locale_fr_utf8=none
37652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
37653 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
37654 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
37660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
37661 $as_echo_n "checking for a traditional japanese locale... " >&6; }
37662 if ${gt_cv_locale_ja+:} false; then :
37663 $as_echo_n "(cached) " >&6
37666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37667 /* end confdefs.h. */
37669 #include <locale.h>
37671 #if HAVE_LANGINFO_CODESET
37672 # include <langinfo.h>
37674 #include <stdlib.h>
37675 #include <string.h>
37681 /* Check whether the given locale name is recognized by the system. */
37682 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
37683 /* On native Windows, setlocale(category, "") looks at the system settings,
37684 not at the environment variables. Also, when an encoding suffix such
37685 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37686 category of the locale to "C". */
37687 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37688 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37691 if (setlocale (LC_ALL, "") == NULL) return 1;
37693 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37694 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37695 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37696 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37697 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37698 some unit tests fail.
37699 On MirBSD 10, when an unsupported locale is specified, setlocale()
37700 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
37701 #if HAVE_LANGINFO_CODESET
37703 const char *cs = nl_langinfo (CODESET);
37704 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
37705 || strcmp (cs, "UTF-8") == 0)
37710 /* On Cygwin, avoid locale names without encoding suffix, because the
37711 locale_charset() function relies on the encoding suffix. Note that
37712 LC_ALL is set on the command line. */
37713 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37715 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
37716 on Cygwin 1.5.x. */
37717 if (MB_CUR_MAX == 1)
37719 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
37720 This excludes the UTF-8 encoding (except on MirBSD). */
37721 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37722 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
37723 for (p = buf; *p != '\0'; p++)
37724 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
37730 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37731 (eval $ac_link) 2>&5
37733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37734 test $ac_status = 0; } && test -s conftest$ac_exeext; then
37736 # Handle native Windows specially, because there setlocale() interprets
37737 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37738 # "fr" or "fra" as "French" or "French_France.1252",
37739 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37740 # "ja" as "Japanese" or "Japanese_Japan.932",
37743 # Note that on native Windows, the Japanese locale is
37744 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
37745 # cannot use it here.
37746 gt_cv_locale_ja=none
37749 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37750 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37751 # configure script would override the LC_ALL setting. Likewise for
37752 # LC_CTYPE, which is also set at the beginning of the configure script.
37753 # Test for the AIX locale name.
37754 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37755 gt_cv_locale_ja=ja_JP
37757 # Test for the locale name with explicit encoding suffix.
37758 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37759 gt_cv_locale_ja=ja_JP.EUC-JP
37761 # Test for the HP-UX, OSF/1, NetBSD locale name.
37762 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37763 gt_cv_locale_ja=ja_JP.eucJP
37765 # Test for the IRIX, FreeBSD locale name.
37766 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37767 gt_cv_locale_ja=ja_JP.EUC
37769 # Test for the Solaris 7 locale name.
37770 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37773 # Special test for NetBSD 1.6.
37774 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
37775 gt_cv_locale_ja=ja_JP.eucJP
37778 gt_cv_locale_ja=none
37791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
37792 $as_echo "$gt_cv_locale_ja" >&6; }
37793 LOCALE_JA=$gt_cv_locale_ja
37799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
37800 $as_echo_n "checking for a transitional chinese locale... " >&6; }
37801 if ${gt_cv_locale_zh_CN+:} false; then :
37802 $as_echo_n "(cached) " >&6
37805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37806 /* end confdefs.h. */
37808 #include <locale.h>
37809 #include <stdlib.h>
37811 #if HAVE_LANGINFO_CODESET
37812 # include <langinfo.h>
37814 #include <stdlib.h>
37815 #include <string.h>
37821 /* Check whether the given locale name is recognized by the system. */
37822 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
37823 /* On native Windows, setlocale(category, "") looks at the system settings,
37824 not at the environment variables. Also, when an encoding suffix such
37825 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37826 category of the locale to "C". */
37827 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37828 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37831 if (setlocale (LC_ALL, "") == NULL) return 1;
37833 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37834 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37835 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37836 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37837 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37838 some unit tests fail.
37839 On MirBSD 10, when an unsupported locale is specified, setlocale()
37840 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
37841 #if HAVE_LANGINFO_CODESET
37843 const char *cs = nl_langinfo (CODESET);
37844 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
37845 || strcmp (cs, "UTF-8") == 0)
37850 /* On Cygwin, avoid locale names without encoding suffix, because the
37851 locale_charset() function relies on the encoding suffix. Note that
37852 LC_ALL is set on the command line. */
37853 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37855 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
37856 This excludes the UTF-8 encoding (except on MirBSD). */
37857 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37858 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
37859 for (p = buf; *p != '\0'; p++)
37860 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
37862 /* Check whether a typical GB18030 multibyte sequence is recognized as a
37863 single wide character. This excludes the GB2312 and GBK encodings. */
37864 if (mblen ("\203\062\332\066", 5) != 4)
37870 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37871 (eval $ac_link) 2>&5
37873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37874 test $ac_status = 0; } && test -s conftest$ac_exeext; then
37876 # Handle native Windows specially, because there setlocale() interprets
37877 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37878 # "fr" or "fra" as "French" or "French_France.1252",
37879 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37880 # "ja" as "Japanese" or "Japanese_Japan.932",
37883 # Test for the hypothetical native Windows locale name.
37884 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37885 gt_cv_locale_zh_CN=Chinese_China.54936
37888 gt_cv_locale_zh_CN=none
37892 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
37893 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
37894 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
37895 gt_cv_locale_zh_CN=none
37898 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37899 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37900 # configure script would override the LC_ALL setting. Likewise for
37901 # LC_CTYPE, which is also set at the beginning of the configure script.
37902 # Test for the locale name without encoding suffix.
37903 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37904 gt_cv_locale_zh_CN=zh_CN
37906 # Test for the locale name with explicit encoding suffix.
37907 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37908 gt_cv_locale_zh_CN=zh_CN.GB18030
37911 gt_cv_locale_zh_CN=none
37917 # If there was a link error, due to mblen(), the system is so old that
37918 # it certainly doesn't have a chinese locale.
37919 gt_cv_locale_zh_CN=none
37924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
37925 $as_echo "$gt_cv_locale_zh_CN" >&6; }
37926 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
37934 ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
37936 if test "x$ac_cv_have_decl_sleep" = xyes; then :
37942 cat >>confdefs.h <<_ACEOF
37943 #define HAVE_DECL_SLEEP $ac_have_decl
37947 if test $ac_cv_have_decl_sleep != yes; then
37950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
37951 $as_echo_n "checking for working sleep... " >&6; }
37952 if ${gl_cv_func_sleep_works+:} false; then :
37953 $as_echo_n "(cached) " >&6
37955 if test "$cross_compiling" = yes; then :
37957 # Guess yes on glibc systems.
37958 *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
37959 # If we don't know, assume the worst.
37960 *) gl_cv_func_sleep_works="guessing no" ;;
37964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37965 /* end confdefs.h. */
37968 #include <unistd.h>
37969 #include <signal.h>
37971 handle_alarm (int sig)
37973 if (sig != SIGALRM)
37981 /* Failure to compile this test due to missing alarm is okay,
37982 since all such platforms (mingw) also lack sleep. */
37983 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
37984 unsigned int remaining;
37985 signal (SIGALRM, handle_alarm);
37987 remaining = sleep (pentecost);
37988 if (remaining > pentecost)
37990 if (remaining <= pentecost - 10)
37998 if ac_fn_c_try_run "$LINENO"; then :
37999 gl_cv_func_sleep_works=yes
38001 gl_cv_func_sleep_works=no
38003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38004 conftest.$ac_objext conftest.beam conftest.$ac_ext
38008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
38009 $as_echo "$gl_cv_func_sleep_works" >&6; }
38010 case "$gl_cv_func_sleep_works" in
38018 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
38027 M4tests_LIBOBJS="$M4tests_LIBOBJS sleep.$ac_objext"
38035 if test "$GNULIB_SLEEP" != 1; then
38036 if test "$GNULIB_SLEEP" = 0; then
38037 GNULIB_SLEEP=$gl_module_indicator_condition
38039 GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
38047 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
38058 if test $ac_cv_func_strdup = yes; then
38059 if test $gl_cv_func_malloc_posix != yes; then
38064 if test $ac_cv_have_decl_strdup = no; then
38068 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
38077 M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
38086 if test "$GNULIB_STRDUP" != 1; then
38087 if test "$GNULIB_STRDUP" = 0; then
38088 GNULIB_STRDUP=$gl_module_indicator_condition
38090 GNULIB_STRDUP="($GNULIB_STRDUP || $gl_module_indicator_condition)"
38098 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
38105 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
38106 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
38107 # irrelevant for anonymous mappings.
38108 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
38109 if test "x$ac_cv_func_mmap" = xyes; then :
38116 # Try to allow MAP_ANONYMOUS.
38117 gl_have_mmap_anonymous=no
38118 if test $gl_have_mmap = yes; then
38119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
38120 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
38121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38122 /* end confdefs.h. */
38124 #include <sys/mman.h>
38125 #ifdef MAP_ANONYMOUS
38126 I cannot identify this map
38130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38131 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
38132 gl_have_mmap_anonymous=yes
38136 if test $gl_have_mmap_anonymous != yes; then
38137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38138 /* end confdefs.h. */
38140 #include <sys/mman.h>
38142 I cannot identify this map
38146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38147 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
38149 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
38151 gl_have_mmap_anonymous=yes
38156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
38157 $as_echo "$gl_have_mmap_anonymous" >&6; }
38158 if test $gl_have_mmap_anonymous = yes; then
38160 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
38171 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
38172 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
38173 # irrelevant for anonymous mappings.
38174 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
38175 if test "x$ac_cv_func_mmap" = xyes; then :
38182 # Try to allow MAP_ANONYMOUS.
38183 gl_have_mmap_anonymous=no
38184 if test $gl_have_mmap = yes; then
38185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
38186 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
38187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38188 /* end confdefs.h. */
38190 #include <sys/mman.h>
38191 #ifdef MAP_ANONYMOUS
38192 I cannot identify this map
38196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38197 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
38198 gl_have_mmap_anonymous=yes
38202 if test $gl_have_mmap_anonymous != yes; then
38203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38204 /* end confdefs.h. */
38206 #include <sys/mman.h>
38208 I cannot identify this map
38212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38213 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
38215 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
38217 gl_have_mmap_anonymous=yes
38222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
38223 $as_echo "$gl_have_mmap_anonymous" >&6; }
38224 if test $gl_have_mmap_anonymous = yes; then
38226 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
38236 if test $ac_cv_func_symlink = no; then
38239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
38240 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
38241 if ${gl_cv_func_symlink_works+:} false; then :
38242 $as_echo_n "(cached) " >&6
38244 if test "$cross_compiling" = yes; then :
38246 # Guess yes on glibc systems.
38247 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
38248 # If we don't know, assume the worst.
38249 *) gl_cv_func_symlink_works="guessing no" ;;
38253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38254 /* end confdefs.h. */
38255 #include <unistd.h>
38261 if (!symlink ("a", "conftest.link/"))
38263 if (symlink ("conftest.f", "conftest.lnk2"))
38265 else if (!symlink ("a", "conftest.lnk2/"))
38273 if ac_fn_c_try_run "$LINENO"; then :
38274 gl_cv_func_symlink_works=yes
38276 gl_cv_func_symlink_works=no
38278 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38279 conftest.$ac_objext conftest.beam conftest.$ac_ext
38282 rm -f conftest.f conftest.link conftest.lnk2
38284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
38285 $as_echo "$gl_cv_func_symlink_works" >&6; }
38286 case "$gl_cv_func_symlink_works" in
38294 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
38303 M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
38311 if test "$GNULIB_SYMLINK" != 1; then
38312 if test "$GNULIB_SYMLINK" = 0; then
38313 GNULIB_SYMLINK=$gl_module_indicator_condition
38315 GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
38323 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
38330 if test $ac_cv_have_decl_unsetenv = no; then
38331 HAVE_DECL_UNSETENV=0
38333 for ac_func in unsetenv
38335 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
38336 if test "x$ac_cv_func_unsetenv" = xyes; then :
38337 cat >>confdefs.h <<_ACEOF
38338 #define HAVE_UNSETENV 1
38344 if test $ac_cv_func_unsetenv = no; then
38348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
38349 $as_echo_n "checking for unsetenv() return type... " >&6; }
38350 if ${gt_cv_func_unsetenv_ret+:} false; then :
38351 $as_echo_n "(cached) " >&6
38353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38354 /* end confdefs.h. */
38357 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
38358 #include <stdlib.h>
38363 int unsetenv (const char *name);
38373 if ac_fn_c_try_compile "$LINENO"; then :
38374 gt_cv_func_unsetenv_ret='int'
38376 gt_cv_func_unsetenv_ret='void'
38378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
38381 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
38382 if test $gt_cv_func_unsetenv_ret = 'void'; then
38384 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
38389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
38390 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
38391 if ${gl_cv_func_unsetenv_works+:} false; then :
38392 $as_echo_n "(cached) " >&6
38394 if test "$cross_compiling" = yes; then :
38396 # Guess yes on glibc systems.
38397 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
38398 # If we don't know, assume the worst.
38399 *) gl_cv_func_unsetenv_works="guessing no" ;;
38403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38404 /* end confdefs.h. */
38406 #include <stdlib.h>
38408 extern char **environ;
38414 char entry1[] = "a=1";
38415 char entry2[] = "b=2";
38416 char *env[] = { entry1, entry2, NULL };
38417 if (putenv ((char *) "a=1")) return 1;
38418 if (putenv (entry2)) return 2;
38421 if (getenv ("a")) return 3;
38422 if (!unsetenv ("") || errno != EINVAL) return 4;
38425 if (!getenv ("a")) return 5;
38428 if (getenv ("a")) return 6;
38434 if ac_fn_c_try_run "$LINENO"; then :
38435 gl_cv_func_unsetenv_works=yes
38437 gl_cv_func_unsetenv_works=no
38439 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38440 conftest.$ac_objext conftest.beam conftest.$ac_ext
38444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
38445 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
38446 case "$gl_cv_func_unsetenv_works" in
38454 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
38463 M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
38475 if test "$GNULIB_UNSETENV" != 1; then
38476 if test "$GNULIB_UNSETENV" = 0; then
38477 GNULIB_UNSETENV=$gl_module_indicator_condition
38479 GNULIB_UNSETENV="($GNULIB_UNSETENV || $gl_module_indicator_condition)"
38487 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
38491 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
38494 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
38499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
38500 $as_echo_n "checking for a traditional french locale... " >&6; }
38501 if ${gt_cv_locale_fr+:} false; then :
38502 $as_echo_n "(cached) " >&6
38505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38506 /* end confdefs.h. */
38508 #include <locale.h>
38510 #if HAVE_LANGINFO_CODESET
38511 # include <langinfo.h>
38513 #include <stdlib.h>
38514 #include <string.h>
38518 /* Check whether the given locale name is recognized by the system. */
38519 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
38520 /* On native Windows, setlocale(category, "") looks at the system settings,
38521 not at the environment variables. Also, when an encoding suffix such
38522 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38523 category of the locale to "C". */
38524 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38525 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38528 if (setlocale (LC_ALL, "") == NULL) return 1;
38530 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38531 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38532 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38533 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38534 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38535 some unit tests fail.
38536 On MirBSD 10, when an unsupported locale is specified, setlocale()
38537 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
38538 #if HAVE_LANGINFO_CODESET
38540 const char *cs = nl_langinfo (CODESET);
38541 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38542 || strcmp (cs, "UTF-8") == 0)
38547 /* On Cygwin, avoid locale names without encoding suffix, because the
38548 locale_charset() function relies on the encoding suffix. Note that
38549 LC_ALL is set on the command line. */
38550 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38552 /* Check whether in the abbreviation of the second month, the second
38553 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
38554 one byte long. This excludes the UTF-8 encoding. */
38555 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38556 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
38557 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
38558 /* Check whether the decimal separator is a comma.
38559 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38560 are nl_langinfo(RADIXCHAR) are both ".". */
38561 if (localeconv () ->decimal_point[0] != ',') return 1;
38567 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38568 (eval $ac_link) 2>&5
38570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38571 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38573 # Handle native Windows specially, because there setlocale() interprets
38574 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38575 # "fr" or "fra" as "French" or "French_France.1252",
38576 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38577 # "ja" as "Japanese" or "Japanese_Japan.932",
38580 # Test for the native Windows locale name.
38581 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38582 gt_cv_locale_fr=French_France.1252
38585 gt_cv_locale_fr=none
38589 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38590 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38591 # configure script would override the LC_ALL setting. Likewise for
38592 # LC_CTYPE, which is also set at the beginning of the configure script.
38593 # Test for the usual locale name.
38594 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38595 gt_cv_locale_fr=fr_FR
38597 # Test for the locale name with explicit encoding suffix.
38598 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38599 gt_cv_locale_fr=fr_FR.ISO-8859-1
38601 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
38602 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38603 gt_cv_locale_fr=fr_FR.ISO8859-1
38605 # Test for the HP-UX locale name.
38606 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38607 gt_cv_locale_fr=fr_FR.iso88591
38609 # Test for the Solaris 7 locale name.
38610 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38614 gt_cv_locale_fr=none
38626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
38627 $as_echo "$gt_cv_locale_fr" >&6; }
38628 LOCALE_FR=$gt_cv_locale_fr
38633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
38634 $as_echo_n "checking for a french Unicode locale... " >&6; }
38635 if ${gt_cv_locale_fr_utf8+:} false; then :
38636 $as_echo_n "(cached) " >&6
38639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38640 /* end confdefs.h. */
38642 #include <locale.h>
38644 #if HAVE_LANGINFO_CODESET
38645 # include <langinfo.h>
38647 #include <stdlib.h>
38648 #include <string.h>
38652 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
38653 imitates locale dependent behaviour by looking at the environment
38654 variables, and all locales use the UTF-8 encoding. */
38655 #if !(defined __BEOS__ || defined __HAIKU__)
38656 /* Check whether the given locale name is recognized by the system. */
38657 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
38658 /* On native Windows, setlocale(category, "") looks at the system settings,
38659 not at the environment variables. Also, when an encoding suffix such
38660 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38661 category of the locale to "C". */
38662 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38663 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38666 if (setlocale (LC_ALL, "") == NULL) return 1;
38668 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38669 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38670 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38671 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38672 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38673 some unit tests fail. */
38674 # if HAVE_LANGINFO_CODESET
38676 const char *cs = nl_langinfo (CODESET);
38677 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
38682 /* On Cygwin, avoid locale names without encoding suffix, because the
38683 locale_charset() function relies on the encoding suffix. Note that
38684 LC_ALL is set on the command line. */
38685 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38687 /* Check whether in the abbreviation of the second month, the second
38688 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
38689 two bytes long, with UTF-8 encoding. */
38690 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38691 if (strftime (buf, sizeof (buf), "%b", &t) < 4
38692 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
38695 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
38696 /* Check whether the decimal separator is a comma.
38697 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38698 are nl_langinfo(RADIXCHAR) are both ".". */
38699 if (localeconv () ->decimal_point[0] != ',') return 1;
38705 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38706 (eval $ac_link) 2>&5
38708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38709 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38711 # Handle native Windows specially, because there setlocale() interprets
38712 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38713 # "fr" or "fra" as "French" or "French_France.1252",
38714 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38715 # "ja" as "Japanese" or "Japanese_Japan.932",
38718 # Test for the hypothetical native Windows locale name.
38719 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38720 gt_cv_locale_fr_utf8=French_France.65001
38723 gt_cv_locale_fr_utf8=none
38727 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38728 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38729 # configure script would override the LC_ALL setting. Likewise for
38730 # LC_CTYPE, which is also set at the beginning of the configure script.
38731 # Test for the usual locale name.
38732 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38733 gt_cv_locale_fr_utf8=fr_FR
38735 # Test for the locale name with explicit encoding suffix.
38736 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38737 gt_cv_locale_fr_utf8=fr_FR.UTF-8
38739 # Test for the Solaris 7 locale name.
38740 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38741 gt_cv_locale_fr_utf8=fr.UTF-8
38744 gt_cv_locale_fr_utf8=none
38754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
38755 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
38756 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
38762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
38763 $as_echo_n "checking for a traditional japanese locale... " >&6; }
38764 if ${gt_cv_locale_ja+:} false; then :
38765 $as_echo_n "(cached) " >&6
38768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38769 /* end confdefs.h. */
38771 #include <locale.h>
38773 #if HAVE_LANGINFO_CODESET
38774 # include <langinfo.h>
38776 #include <stdlib.h>
38777 #include <string.h>
38783 /* Check whether the given locale name is recognized by the system. */
38784 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
38785 /* On native Windows, setlocale(category, "") looks at the system settings,
38786 not at the environment variables. Also, when an encoding suffix such
38787 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38788 category of the locale to "C". */
38789 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38790 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38793 if (setlocale (LC_ALL, "") == NULL) return 1;
38795 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38796 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38797 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38798 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38799 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38800 some unit tests fail.
38801 On MirBSD 10, when an unsupported locale is specified, setlocale()
38802 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
38803 #if HAVE_LANGINFO_CODESET
38805 const char *cs = nl_langinfo (CODESET);
38806 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38807 || strcmp (cs, "UTF-8") == 0)
38812 /* On Cygwin, avoid locale names without encoding suffix, because the
38813 locale_charset() function relies on the encoding suffix. Note that
38814 LC_ALL is set on the command line. */
38815 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38817 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
38818 on Cygwin 1.5.x. */
38819 if (MB_CUR_MAX == 1)
38821 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
38822 This excludes the UTF-8 encoding (except on MirBSD). */
38823 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38824 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
38825 for (p = buf; *p != '\0'; p++)
38826 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
38832 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38833 (eval $ac_link) 2>&5
38835 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38836 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38838 # Handle native Windows specially, because there setlocale() interprets
38839 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38840 # "fr" or "fra" as "French" or "French_France.1252",
38841 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38842 # "ja" as "Japanese" or "Japanese_Japan.932",
38845 # Note that on native Windows, the Japanese locale is
38846 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
38847 # cannot use it here.
38848 gt_cv_locale_ja=none
38851 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38852 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38853 # configure script would override the LC_ALL setting. Likewise for
38854 # LC_CTYPE, which is also set at the beginning of the configure script.
38855 # Test for the AIX locale name.
38856 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38857 gt_cv_locale_ja=ja_JP
38859 # Test for the locale name with explicit encoding suffix.
38860 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38861 gt_cv_locale_ja=ja_JP.EUC-JP
38863 # Test for the HP-UX, OSF/1, NetBSD locale name.
38864 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38865 gt_cv_locale_ja=ja_JP.eucJP
38867 # Test for the IRIX, FreeBSD locale name.
38868 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38869 gt_cv_locale_ja=ja_JP.EUC
38871 # Test for the Solaris 7 locale name.
38872 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38875 # Special test for NetBSD 1.6.
38876 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
38877 gt_cv_locale_ja=ja_JP.eucJP
38880 gt_cv_locale_ja=none
38893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
38894 $as_echo "$gt_cv_locale_ja" >&6; }
38895 LOCALE_JA=$gt_cv_locale_ja
38901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
38902 $as_echo_n "checking for a transitional chinese locale... " >&6; }
38903 if ${gt_cv_locale_zh_CN+:} false; then :
38904 $as_echo_n "(cached) " >&6
38907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38908 /* end confdefs.h. */
38910 #include <locale.h>
38911 #include <stdlib.h>
38913 #if HAVE_LANGINFO_CODESET
38914 # include <langinfo.h>
38916 #include <stdlib.h>
38917 #include <string.h>
38923 /* Check whether the given locale name is recognized by the system. */
38924 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
38925 /* On native Windows, setlocale(category, "") looks at the system settings,
38926 not at the environment variables. Also, when an encoding suffix such
38927 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38928 category of the locale to "C". */
38929 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38930 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38933 if (setlocale (LC_ALL, "") == NULL) return 1;
38935 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38936 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38937 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38938 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38939 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38940 some unit tests fail.
38941 On MirBSD 10, when an unsupported locale is specified, setlocale()
38942 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
38943 #if HAVE_LANGINFO_CODESET
38945 const char *cs = nl_langinfo (CODESET);
38946 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38947 || strcmp (cs, "UTF-8") == 0)
38952 /* On Cygwin, avoid locale names without encoding suffix, because the
38953 locale_charset() function relies on the encoding suffix. Note that
38954 LC_ALL is set on the command line. */
38955 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38957 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
38958 This excludes the UTF-8 encoding (except on MirBSD). */
38959 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38960 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
38961 for (p = buf; *p != '\0'; p++)
38962 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
38964 /* Check whether a typical GB18030 multibyte sequence is recognized as a
38965 single wide character. This excludes the GB2312 and GBK encodings. */
38966 if (mblen ("\203\062\332\066", 5) != 4)
38972 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38973 (eval $ac_link) 2>&5
38975 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38976 test $ac_status = 0; } && test -s conftest$ac_exeext; then
38978 # Handle native Windows specially, because there setlocale() interprets
38979 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38980 # "fr" or "fra" as "French" or "French_France.1252",
38981 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38982 # "ja" as "Japanese" or "Japanese_Japan.932",
38985 # Test for the hypothetical native Windows locale name.
38986 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38987 gt_cv_locale_zh_CN=Chinese_China.54936
38990 gt_cv_locale_zh_CN=none
38994 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
38995 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
38996 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
38997 gt_cv_locale_zh_CN=none
39000 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39001 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39002 # configure script would override the LC_ALL setting. Likewise for
39003 # LC_CTYPE, which is also set at the beginning of the configure script.
39004 # Test for the locale name without encoding suffix.
39005 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39006 gt_cv_locale_zh_CN=zh_CN
39008 # Test for the locale name with explicit encoding suffix.
39009 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39010 gt_cv_locale_zh_CN=zh_CN.GB18030
39013 gt_cv_locale_zh_CN=none
39019 # If there was a link error, due to mblen(), the system is so old that
39020 # it certainly doesn't have a chinese locale.
39021 gt_cv_locale_zh_CN=none
39026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
39027 $as_echo "$gt_cv_locale_zh_CN" >&6; }
39028 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
39035 if test $ac_cv_func_wctob = no; then
39043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
39044 $as_echo_n "checking whether wctob works... " >&6; }
39045 if ${gl_cv_func_wctob_works+:} false; then :
39046 $as_echo_n "(cached) " >&6
39050 # Guess no on Solaris <= 9 and Cygwin.
39051 solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
39052 gl_cv_func_wctob_works="guessing no" ;;
39053 # Guess yes otherwise.
39054 *) gl_cv_func_wctob_works="guessing yes" ;;
39058 if test "$cross_compiling" = yes; then :
39061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39062 /* end confdefs.h. */
39064 #include <locale.h>
39065 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39067 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
39068 included before <wchar.h>. */
39069 #include <stddef.h>
39074 register long global __asm__ ("%ebx");
39078 setlocale (LC_ALL, "en_US.UTF-8");
39080 global = 0x12345678;
39081 if (wctob (0x00FC) != -1)
39083 if (global != 0x12345678)
39088 if ac_fn_c_try_run "$LINENO"; then :
39091 gl_cv_func_wctob_works=no
39093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39094 conftest.$ac_objext conftest.beam conftest.$ac_ext
39099 if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
39100 if test "$cross_compiling" = yes; then :
39103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39104 /* end confdefs.h. */
39106 #include <locale.h>
39107 #include <string.h>
39108 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39110 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
39111 included before <wchar.h>. */
39112 #include <stddef.h>
39118 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
39122 if (mbtowc (&wc, "\374", 1) == 1)
39123 if (wctob (wc) != (unsigned char) '\374')
39129 if ac_fn_c_try_run "$LINENO"; then :
39130 gl_cv_func_wctob_works=yes
39132 gl_cv_func_wctob_works=no
39134 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39135 conftest.$ac_objext conftest.beam conftest.$ac_ext
39141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
39142 $as_echo "$gl_cv_func_wctob_works" >&6; }
39143 case "$gl_cv_func_wctob_works" in
39145 *) REPLACE_WCTOB=1 ;;
39147 if test $REPLACE_WCTOB = 0; then
39149 ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
39150 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39152 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
39153 before <wchar.h>. */
39154 #include <stddef.h>
39160 if test "x$ac_cv_have_decl_wctob" = xyes; then :
39166 cat >>confdefs.h <<_ACEOF
39167 #define HAVE_DECL_WCTOB $ac_have_decl
39170 if test $ac_cv_have_decl_wctob != yes; then
39176 if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
39185 M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
39196 if test "$GNULIB_WCTOB" != 1; then
39197 if test "$GNULIB_WCTOB" = 0; then
39198 GNULIB_WCTOB=$gl_module_indicator_condition
39200 GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
39208 $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
39219 if test $REPLACE_WCTOMB = 1; then
39228 M4tests_LIBOBJS="$M4tests_LIBOBJS wctomb.$ac_objext"
39239 if test "$GNULIB_WCTOMB" != 1; then
39240 if test "$GNULIB_WCTOMB" = 0; then
39241 GNULIB_WCTOMB=$gl_module_indicator_condition
39243 GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
39251 $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
39258 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
39265 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
39271 if test $REPLACE_WRITE = 1; then
39280 M4tests_LIBOBJS="$M4tests_LIBOBJS write.$ac_objext"
39289 if test "$GNULIB_WRITE" != 1; then
39290 if test "$GNULIB_WRITE" = 0; then
39291 GNULIB_WRITE=$gl_module_indicator_condition
39293 GNULIB_WRITE="($GNULIB_WRITE || $gl_module_indicator_condition)"
39301 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
39315 LIBM4_LIBDEPS="$gl_libdeps"
39317 LIBM4_LTLIBDEPS="$gl_ltlibdeps"
39319 LIBTESTS_LIBDEPS="$gltests_libdeps"
39323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
39324 $as_echo_n "checking whether an open file can be renamed... " >&6; }
39325 if ${M4_cv_func_rename_open_file_works+:} false; then :
39326 $as_echo_n "(cached) " >&6
39328 if test "$cross_compiling" = yes; then :
39329 M4_cv_func_rename_open_file_works='guessing no'
39331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39332 /* end confdefs.h. */
39333 $ac_includes_default
39337 FILE *f = fopen ("conftest.1", "w+");
39338 int result = rename ("conftest.1", "conftest.2");
39339 fclose (f); remove ("conftest.1"); remove ("conftest.2");
39345 if ac_fn_c_try_run "$LINENO"; then :
39346 M4_cv_func_rename_open_file_works=yes
39348 M4_cv_func_rename_open_file_works=no
39350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39351 conftest.$ac_objext conftest.beam conftest.$ac_ext
39355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
39356 $as_echo "$M4_cv_func_rename_open_file_works" >&6; }
39357 if test "$M4_cv_func_rename_open_file_works" = yes ; then
39358 M4_rename_open_works=1
39360 M4_rename_open_works=0
39363 cat >>confdefs.h <<_ACEOF
39364 #define RENAME_OPEN_FILE_WORKS $M4_rename_open_works
39369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if changeword is wanted" >&5
39370 $as_echo_n "checking if changeword is wanted... " >&6; }
39371 # Check whether --enable-changeword was given.
39372 if test "${enable_changeword+set}" = set; then :
39373 enableval=$enable_changeword; if test "$enableval" = yes; then
39374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39375 $as_echo "yes" >&6; }
39377 $as_echo "#define ENABLE_CHANGEWORD 1" >>confdefs.h
39380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39381 $as_echo "no" >&6; }
39384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39385 $as_echo "no" >&6; }
39389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
39390 $as_echo_n "checking which shell to use for syscmd... " >&6; }
39392 # Check whether --with-syscmd-shell was given.
39393 if test "${with_syscmd_shell+set}" = set; then :
39394 withval=$with_syscmd_shell; case $withval in
39395 yes) with_syscmd_shell=no;;
39398 with_syscmd_shell=no
39401 if test "$with_syscmd_shell" = no ; then
39402 with_syscmd_shell=/bin/sh
39403 if test "$cross_compiling" != yes ; then
39404 if as_fn_executable_p /bin/sh; then :
39407 if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
39409 M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39410 for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
39411 command -p getconf PATH
39413 echo "/bin$PATH_SEPARATOR$PATH"
39417 test -z "$M4_dir" && continue
39418 as_fn_executable_p "$M4_dir/sh" \
39419 && { with_syscmd_shell=$M4_dir/sh; break; }
39424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
39425 $as_echo "$with_syscmd_shell" >&6; }
39427 cat >>confdefs.h <<_ACEOF
39428 #define SYSCMD_SHELL "$with_syscmd_shell"
39432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
39433 $as_echo_n "checking if malloc debugging is wanted... " >&6; }
39435 # Check whether --with-dmalloc was given.
39436 if test "${with_dmalloc+set}" = set; then :
39437 withval=$with_dmalloc; if test "$withval" = yes; then
39438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39439 $as_echo "yes" >&6; }
39441 $as_echo "#define WITH_DMALLOC 1" >>confdefs.h
39443 LIBS="$LIBS -ldmalloc"
39444 LDFLAGS="$LDFLAGS -g"
39446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39447 $as_echo "no" >&6; }
39450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39451 $as_echo "no" >&6; }
39455 ac_config_commands="$ac_config_commands stamp-h"
39458 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile checks/Makefile examples/Makefile"
39461 cat >confcache <<\_ACEOF
39462 # This file is a shell script that caches the results of configure
39463 # tests run on this system so they can be shared between configure
39464 # scripts and configure runs, see configure's option --config-cache.
39465 # It is not useful on other systems. If it contains results you don't
39466 # want to keep, you may remove or edit it.
39468 # config.status only pays attention to the cache file if you give it
39469 # the --recheck option to rerun configure.
39471 # `ac_cv_env_foo' variables (set or unset) will be overridden when
39472 # loading this file, other *unset* `ac_cv_foo' will be assigned the
39473 # following values.
39477 # The following way of writing the cache mishandles newlines in values,
39478 # but we know of no workaround that is simple, portable, and efficient.
39479 # So, we kill variables containing newlines.
39480 # Ultrix sh set writes to stderr and can't be redirected directly,
39481 # and sets the high bit in the cache file unless we assign to the vars.
39483 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
39484 eval ac_val=\$$ac_var
39488 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
39489 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
39492 _ | IFS | as_nl) ;; #(
39493 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
39494 *) { eval $ac_var=; unset $ac_var;} ;;
39500 case $as_nl`(ac_space=' '; set) 2>&1` in #(
39501 *${as_nl}ac_space=\ *)
39502 # `set' does not quote correctly, so add quotes: double-quote
39503 # substitution turns \\\\ into \\, and sed turns \\ into \.
39506 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
39509 # `set' quotes correctly as required by POSIX, so do not add quotes.
39510 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
39519 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
39521 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
39523 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
39524 if test -w "$cache_file"; then
39525 if test "x$cache_file" != "x/dev/null"; then
39526 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
39527 $as_echo "$as_me: updating cache $cache_file" >&6;}
39528 if test ! -f "$cache_file" || test -h "$cache_file"; then
39529 cat confcache >"$cache_file"
39531 case $cache_file in #(
39533 mv -f confcache "$cache_file"$$ &&
39534 mv -f "$cache_file"$$ "$cache_file" ;; #(
39536 mv -f confcache "$cache_file" ;;
39541 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
39542 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
39547 test "x$prefix" = xNONE && prefix=$ac_default_prefix
39548 # Let make expand exec_prefix.
39549 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
39551 DEFS=-DHAVE_CONFIG_H
39556 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
39557 # 1. Remove the extension, and $U if already installed.
39558 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
39559 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
39560 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
39561 # will be set to the directory where LIBOBJS objects are built.
39562 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
39563 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
39565 LIBOBJS=$ac_libobjs
39567 LTLIBOBJS=$ac_ltlibobjs
39570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
39571 $as_echo_n "checking that generated files are newer than configure... " >&6; }
39572 if test -n "$am_sleep_pid"; then
39573 # Hide warnings about reused PIDs.
39574 wait $am_sleep_pid 2>/dev/null
39576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
39577 $as_echo "done" >&6; }
39578 if test -n "$EXEEXT"; then
39580 am__EXEEXT_FALSE='#'
39582 am__EXEEXT_TRUE='#'
39586 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
39587 as_fn_error $? "conditional \"AMDEP\" was never defined.
39588 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39590 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
39591 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
39592 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39594 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
39595 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
39596 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39598 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
39599 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
39600 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39602 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
39603 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
39604 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
39605 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39607 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
39608 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
39609 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39613 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
39614 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
39615 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39617 CONFIG_INCLUDE=lib/config.h
39619 if test -z "${GL_GENERATE_SCHED_H_TRUE}" && test -z "${GL_GENERATE_SCHED_H_FALSE}"; then
39620 as_fn_error $? "conditional \"GL_GENERATE_SCHED_H\" was never defined.
39621 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39623 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
39624 as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
39625 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39627 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
39628 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
39629 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39631 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
39632 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
39633 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39635 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
39636 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
39637 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39642 if test -n "$M4_LIBOBJS"; then
39643 # Remove the extension.
39644 sed_drop_objext='s/\.o$//;s/\.obj$//'
39645 for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
39646 M4_libobjs="$M4_libobjs $i.$ac_objext"
39647 M4_ltlibobjs="$M4_ltlibobjs $i.lo"
39650 M4_LIBOBJS=$M4_libobjs
39652 M4_LTLIBOBJS=$M4_ltlibobjs
39655 if test -z "${ANSICXX_TRUE}" && test -z "${ANSICXX_FALSE}"; then
39656 as_fn_error $? "conditional \"ANSICXX\" was never defined.
39657 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39659 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
39660 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
39661 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39663 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
39664 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
39665 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39668 if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
39669 as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
39670 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39675 if test -n "$M4tests_LIBOBJS"; then
39676 # Remove the extension.
39677 sed_drop_objext='s/\.o$//;s/\.obj$//'
39678 for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
39679 M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
39680 M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
39683 M4tests_LIBOBJS=$M4tests_libobjs
39685 M4tests_LTLIBOBJS=$M4tests_ltlibobjs
39689 : "${CONFIG_STATUS=./config.status}"
39691 ac_clean_files_save=$ac_clean_files
39692 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
39693 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
39694 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
39696 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
39698 # Generated by $as_me.
39699 # Run this file to recreate the current configuration.
39700 # Compiler output produced by configure, useful for debugging
39701 # configure, is in config.log if it exists.
39704 ac_cs_recheck=false
39707 SHELL=\${CONFIG_SHELL-$SHELL}
39710 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
39711 ## -------------------- ##
39712 ## M4sh Initialization. ##
39713 ## -------------------- ##
39715 # Be more Bourne compatible
39716 DUALCASE=1; export DUALCASE # for MKS sh
39717 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
39720 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
39721 # is contrary to our usage. Disable this feature.
39722 alias -g '${1+"$@"}'='"$@"'
39723 setopt NO_GLOB_SUBST
39725 case `(set -o) 2>/dev/null` in #(
39737 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39738 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39739 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
39740 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
39741 # Prefer a ksh shell builtin over an external printf program on Solaris,
39742 # but without wasting forks for bash or zsh.
39743 if test -z "$BASH_VERSION$ZSH_VERSION" \
39744 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
39745 as_echo='print -r --'
39746 as_echo_n='print -rn --'
39747 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
39748 as_echo='printf %s\n'
39749 as_echo_n='printf %s'
39751 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
39752 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
39753 as_echo_n='/usr/ucb/echo -n'
39755 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
39756 as_echo_n_body='eval
39760 expr "X$arg" : "X\\(.*\\)$as_nl";
39761 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
39763 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
39765 export as_echo_n_body
39766 as_echo_n='sh -c $as_echo_n_body as_echo'
39768 export as_echo_body
39769 as_echo='sh -c $as_echo_body as_echo'
39772 # The user is always right.
39773 if test "${PATH_SEPARATOR+set}" != set; then
39775 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
39776 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
39783 # We need space, tab and new line, in precisely that order. Quoting is
39784 # there to prevent editors from complaining about space-tab.
39785 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
39786 # splitting by setting IFS to empty value.)
39789 # Find who we are. Look in the path if we contain no directory separator.
39792 *[\\/]* ) as_myself=$0 ;;
39793 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39794 for as_dir in $PATH
39797 test -z "$as_dir" && as_dir=.
39798 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
39804 # We did not find ourselves, most probably we were run as `sh COMMAND'
39805 # in which case we are not to be found in the path.
39806 if test "x$as_myself" = x; then
39809 if test ! -f "$as_myself"; then
39810 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
39814 # Unset variables that we do not need and which cause bugs (e.g. in
39815 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
39816 # suppresses any "Segmentation fault" message there. '((' could
39817 # trigger a bug in pdksh 5.2.14.
39818 for as_var in BASH_ENV ENV MAIL MAILPATH
39819 do eval test x\${$as_var+set} = xset \
39820 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
39833 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
39836 # as_fn_error STATUS ERROR [LINENO LOG_FD]
39837 # ----------------------------------------
39838 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
39839 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
39840 # script with STATUS, using 1 if that was 0.
39843 as_status=$1; test $as_status -eq 0 && as_status=1
39845 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
39846 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
39848 $as_echo "$as_me: error: $2" >&2
39849 as_fn_exit $as_status
39853 # as_fn_set_status STATUS
39854 # -----------------------
39855 # Set $? to STATUS, without forking.
39856 as_fn_set_status ()
39859 } # as_fn_set_status
39861 # as_fn_exit STATUS
39862 # -----------------
39863 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
39867 as_fn_set_status $1
39873 # Portably unset VAR.
39876 { eval $1=; unset $1;}
39878 as_unset=as_fn_unset
39879 # as_fn_append VAR VALUE
39880 # ----------------------
39881 # Append the text in VALUE to the end of the definition contained in VAR. Take
39882 # advantage of any shell optimizations that allow amortized linear growth over
39883 # repeated appends, instead of the typical quadratic growth present in naive
39885 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
39886 eval 'as_fn_append ()
39897 # as_fn_arith ARG...
39898 # ------------------
39899 # Perform arithmetic evaluation on the ARGs, and store the result in the
39900 # global $as_val. Take advantage of shells that can avoid forks. The arguments
39901 # must be portable across $(()) and expr.
39902 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
39903 eval 'as_fn_arith ()
39910 as_val=`expr "$@" || test $? -eq 1`
39915 if expr a : '\(a\)' >/dev/null 2>&1 &&
39916 test "X`expr 00001 : '.*\(...\)'`" = X001; then
39922 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
39923 as_basename=basename
39928 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
39934 as_me=`$as_basename -- "$0" ||
39935 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
39936 X"$0" : 'X\(//\)$' \| \
39937 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
39939 sed '/^.*\/\([^/][^/]*\)\/*$/{
39953 # Avoid depending upon Character Ranges.
39954 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
39955 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39956 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
39957 as_cr_digits='0123456789'
39958 as_cr_alnum=$as_cr_Letters$as_cr_digits
39960 ECHO_C= ECHO_N= ECHO_T=
39961 case `echo -n x` in #(((((
39963 case `echo 'xy\c'` in
39964 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
39966 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
39973 rm -f conf$$ conf$$.exe conf$$.file
39974 if test -d conf$$.dir; then
39975 rm -f conf$$.dir/conf$$.file
39978 mkdir conf$$.dir 2>/dev/null
39980 if (echo >conf$$.file) 2>/dev/null; then
39981 if ln -s conf$$.file conf$$ 2>/dev/null; then
39983 # ... but there are two gotchas:
39984 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
39985 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
39986 # In both cases, we have to default to `cp -pR'.
39987 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
39989 elif ln conf$$.file conf$$ 2>/dev/null; then
39997 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
39998 rmdir conf$$.dir 2>/dev/null
40003 # Create "$as_dir" as a directory, including parents if necessary.
40008 -*) as_dir=./$as_dir;;
40010 test -d "$as_dir" || eval $as_mkdir_p || {
40014 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
40015 *) as_qdir=$as_dir;;
40017 as_dirs="'$as_qdir' $as_dirs"
40018 as_dir=`$as_dirname -- "$as_dir" ||
40019 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40020 X"$as_dir" : 'X\(//\)[^/]' \| \
40021 X"$as_dir" : 'X\(//\)$' \| \
40022 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
40023 $as_echo X"$as_dir" |
40024 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40028 /^X\(\/\/\)[^/].*/{
40041 test -d "$as_dir" && break
40043 test -z "$as_dirs" || eval "mkdir $as_dirs"
40044 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
40048 if mkdir -p . 2>/dev/null; then
40049 as_mkdir_p='mkdir -p "$as_dir"'
40051 test -d ./-p && rmdir ./-p
40056 # as_fn_executable_p FILE
40057 # -----------------------
40058 # Test if FILE is an executable regular file.
40059 as_fn_executable_p ()
40061 test -f "$1" && test -x "$1"
40062 } # as_fn_executable_p
40063 as_test_x='test -x'
40064 as_executable_p=as_fn_executable_p
40066 # Sed expression to map a string onto a valid CPP name.
40067 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
40069 # Sed expression to map a string onto a valid variable name.
40070 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
40074 ## ----------------------------------- ##
40075 ## Main body of $CONFIG_STATUS script. ##
40076 ## ----------------------------------- ##
40078 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
40080 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40081 # Save the log message, to keep $0 and so on meaningful, and to
40082 # report actual input values of CONFIG_FILES etc. instead of their
40083 # values after options handling.
40085 This file was extended by GNU M4 $as_me 1.4.17, which was
40086 generated by GNU Autoconf 2.69. Invocation command line was
40088 CONFIG_FILES = $CONFIG_FILES
40089 CONFIG_HEADERS = $CONFIG_HEADERS
40090 CONFIG_LINKS = $CONFIG_LINKS
40091 CONFIG_COMMANDS = $CONFIG_COMMANDS
40094 on `(hostname || uname -n) 2>/dev/null | sed 1q`
40099 case $ac_config_files in *"
40100 "*) set x $ac_config_files; shift; ac_config_files=$*;;
40103 case $ac_config_headers in *"
40104 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
40108 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40109 # Files that config.status was made for.
40110 config_files="$ac_config_files"
40111 config_headers="$ac_config_headers"
40112 config_links="$ac_config_links"
40113 config_commands="$ac_config_commands"
40117 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40119 \`$as_me' instantiates files and other configuration actions
40120 from templates according to the current configuration. Unless the files
40121 and actions are specified as TAGs, all are instantiated by default.
40123 Usage: $0 [OPTION]... [TAG]...
40125 -h, --help print this help, then exit
40126 -V, --version print version number and configuration settings, then exit
40127 --config print configuration, then exit
40128 -q, --quiet, --silent
40129 do not print progress messages
40130 -d, --debug don't remove temporary files
40131 --recheck update $as_me by reconfiguring in the same conditions
40132 --file=FILE[:TEMPLATE]
40133 instantiate the configuration file FILE
40134 --header=FILE[:TEMPLATE]
40135 instantiate the configuration header FILE
40137 Configuration files:
40140 Configuration headers:
40143 Configuration links:
40146 Configuration commands:
40149 Report bugs to <bug-m4@gnu.org>.
40150 GNU M4 home page: <http://www.gnu.org/software/m4/>.
40151 General help using GNU software: <http://www.gnu.org/gethelp/>."
40154 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40155 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
40157 GNU M4 config.status 1.4.17
40158 configured by $0, generated by GNU Autoconf 2.69,
40159 with options \\"\$ac_cs_config\\"
40161 Copyright (C) 2012 Free Software Foundation, Inc.
40162 This config.status script is free software; the Free Software Foundation
40163 gives unlimited permission to copy, distribute and modify it."
40170 test -n "\$AWK" || AWK=awk
40173 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40174 # The default lists apply if the user does not specify any file.
40180 ac_option=`expr "X$1" : 'X\([^=]*\)='`
40181 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
40185 ac_option=`expr "X$1" : 'X\([^=]*\)='`
40197 # Handling of the options.
40198 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
40200 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
40201 $as_echo "$ac_cs_version"; exit ;;
40202 --config | --confi | --conf | --con | --co | --c )
40203 $as_echo "$ac_cs_config"; exit ;;
40204 --debug | --debu | --deb | --de | --d | -d )
40206 --file | --fil | --fi | --f )
40209 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
40210 '') as_fn_error $? "missing file argument" ;;
40212 as_fn_append CONFIG_FILES " '$ac_optarg'"
40213 ac_need_defaults=false;;
40214 --header | --heade | --head | --hea )
40217 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
40219 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
40220 ac_need_defaults=false;;
40222 # Conflict between --help and --header
40223 as_fn_error $? "ambiguous option: \`$1'
40224 Try \`$0 --help' for more information.";;
40225 --help | --hel | -h )
40226 $as_echo "$ac_cs_usage"; exit ;;
40227 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
40228 | -silent | --silent | --silen | --sile | --sil | --si | --s)
40231 # This is an error.
40232 -*) as_fn_error $? "unrecognized option: \`$1'
40233 Try \`$0 --help' for more information." ;;
40235 *) as_fn_append ac_config_targets " $1"
40236 ac_need_defaults=false ;;
40242 ac_configure_extra_args=
40244 if $ac_cs_silent; then
40246 ac_configure_extra_args="$ac_configure_extra_args --silent"
40250 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40251 if \$ac_cs_recheck; then
40252 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
40254 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
40255 CONFIG_SHELL='$SHELL'
40256 export CONFIG_SHELL
40261 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40265 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
40266 ## Running $as_me. ##
40272 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40276 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
40277 GNUmakefile=$GNUmakefile
40281 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40283 # Handling of arguments.
40284 for ac_config_target in $ac_config_targets
40286 case $ac_config_target in
40287 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
40288 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
40289 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
40290 "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
40291 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
40292 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
40293 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
40294 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
40295 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
40296 "checks/Makefile") CONFIG_FILES="$CONFIG_FILES checks/Makefile" ;;
40297 "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
40299 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
40304 # If the user did not use the arguments to specify the items to instantiate,
40305 # then the envvar interface is used. Set only those that are not.
40306 # We use the long form for the default assignment because of an extremely
40307 # bizarre bug on SunOS 4.1.3.
40308 if $ac_need_defaults; then
40309 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
40310 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
40311 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
40312 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
40315 # Have a temporary directory for convenience. Make it in the build tree
40316 # simply because there is no reason against having it here, and in addition,
40317 # creating and moving files from /tmp can sometimes cause problems.
40318 # Hook for its removal unless debugging.
40319 # Note that there is a small window in which the directory will not be cleaned:
40320 # after its creation but before its name has been assigned to `$tmp'.
40324 trap 'exit_status=$?
40325 : "${ac_tmp:=$tmp}"
40326 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
40328 trap 'as_fn_exit 1' 1 2 13 15
40330 # Create a (secure) tmp directory for tmp files.
40333 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
40337 tmp=./conf$$-$RANDOM
40338 (umask 077 && mkdir "$tmp")
40339 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
40342 # Set up the scripts for CONFIG_FILES section.
40343 # No need to generate them if there are no CONFIG_FILES.
40344 # This happens for instance with `./config.status config.h'.
40345 if test -n "$CONFIG_FILES"; then
40348 ac_cr=`echo X | tr X '\015'`
40349 # On cygwin, bash can eat \r inside `` if the user requested igncr.
40350 # But we know of no other shell where ac_cr would be empty at this
40351 # point, so we can use a bashism as a fallback.
40352 if test "x$ac_cr" = x; then
40353 eval ac_cr=\$\'\\r\'
40355 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
40356 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
40359 ac_cs_awk_cr=$ac_cr
40362 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
40367 echo "cat >conf$$subs.awk <<_ACEOF" &&
40368 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
40370 } >conf$$subs.sh ||
40371 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40372 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
40374 for ac_last_try in false false false false false :; do
40375 . ./conf$$subs.sh ||
40376 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40378 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
40379 if test $ac_delim_n = $ac_delim_num; then
40381 elif $ac_last_try; then
40382 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40384 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
40387 rm -f conf$$subs.sh
40389 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40390 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
40394 s/^/S["/; s/!.*/"]=/
40404 s/\(.\{148\}\)..*/\1/
40406 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
40411 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
40418 s/\(.\{148\}\)..*/\1/
40420 s/["\\]/\\&/g; s/^/"/; s/$/"/
40424 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
40429 ' <conf$$subs.awk | sed '
40434 ' >>$CONFIG_STATUS || ac_write_fail=1
40435 rm -f conf$$subs.awk
40436 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40438 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
40439 for (key in S) S_is_set[key] = 1
40445 nfields = split(line, field, "@")
40447 len = length(field[1])
40448 for (i = 2; i < nfields; i++) {
40450 keylen = length(key)
40451 if (S_is_set[key]) {
40453 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
40454 len += length(value) + length(field[++i])
40465 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40466 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
40467 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
40470 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
40471 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
40474 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
40475 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
40476 # trailing colons and then remove the whole line if VPATH becomes empty
40477 # (actually we leave an empty line to preserve line numbers).
40478 if test "x$srcdir" = x.; then
40479 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
40497 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40498 fi # test -n "$CONFIG_FILES"
40500 # Set up the scripts for CONFIG_HEADERS section.
40501 # No need to generate them if there are no CONFIG_HEADERS.
40502 # This happens for instance with `./config.status Makefile'.
40503 if test -n "$CONFIG_HEADERS"; then
40504 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
40508 # Transform confdefs.h into an awk script `defines.awk', embedded as
40509 # here-document in config.status, that substitutes the proper values into
40510 # config.h.in to produce config.h.
40512 # Create a delimiter string that does not exist in confdefs.h, to ease
40513 # handling of long lines.
40515 for ac_last_try in false false :; do
40516 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
40517 if test -z "$ac_tt"; then
40519 elif $ac_last_try; then
40520 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
40522 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
40526 # For the awk script, D is an array of macro values keyed by name,
40527 # likewise P contains macro parameters if any. Preserve backslash
40528 # newline sequences.
40530 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
40532 s/.\{148\}/&'"$ac_delim"'/g
40535 s/^[ ]*#[ ]*define[ ][ ]*/ /
40542 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
40544 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
40548 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
40549 D["\1"]=" \3\\\\\\n"\\/p
40551 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
40556 s/.\{148\}/&'"$ac_delim"'/g
40561 s/["\\]/\\&/g; s/^/"/; s/$/"/p
40564 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
40566 ' <confdefs.h | sed '
40567 s/'"$ac_delim"'/"\\\
40568 "/g' >>$CONFIG_STATUS || ac_write_fail=1
40570 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40571 for (key in D) D_is_set[key] = 1
40574 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
40576 split(line, arg, " ")
40577 if (arg[1] == "#") {
40581 defundef = substr(arg[1], 2)
40584 split(mac1, mac2, "(") #)
40586 prefix = substr(line, 1, index(line, defundef) - 1)
40587 if (D_is_set[macro]) {
40588 # Preserve the white space surrounding the "#".
40589 print prefix "define", macro P[macro] D[macro]
40592 # Replace #undef with comments. This is necessary, for example,
40593 # in the case of _POSIX_SOURCE, which is predefined and required
40594 # on some systems where configure will not decide to define it.
40595 if (defundef == "undef") {
40596 print "/*", prefix defundef, macro, "*/"
40604 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40605 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
40606 fi # test -n "$CONFIG_HEADERS"
40609 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
40614 :[FHLC]) ac_mode=$ac_tag; continue;;
40616 case $ac_mode$ac_tag in
40618 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
40619 :[FH]-) ac_tag=-:-;;
40620 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
40637 -) ac_f="$ac_tmp/stdin";;
40638 *) # Look for the file first in the build tree, then in the source tree
40639 # (if the path is not absolute). The absolute path cannot be DOS-style,
40640 # because $ac_f cannot contain `:'.
40644 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
40646 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
40648 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
40649 as_fn_append ac_file_inputs " '$ac_f'"
40652 # Let's still pretend it is `configure' which instantiates (i.e., don't
40653 # use $as_me), people would be surprised to read:
40654 # /* config.h. Generated by config.status. */
40655 configure_input='Generated from '`
40656 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
40658 if test x"$ac_file" != x-; then
40659 configure_input="$ac_file. $configure_input"
40660 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
40661 $as_echo "$as_me: creating $ac_file" >&6;}
40663 # Neutralize special characters interpreted by sed in replacement strings.
40664 case $configure_input in #(
40665 *\&* | *\|* | *\\* )
40666 ac_sed_conf_input=`$as_echo "$configure_input" |
40667 sed 's/[\\\\&|]/\\\\&/g'`;; #(
40668 *) ac_sed_conf_input=$configure_input;;
40672 *:-:* | *:-) cat >"$ac_tmp/stdin" \
40673 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
40678 ac_dir=`$as_dirname -- "$ac_file" ||
40679 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40680 X"$ac_file" : 'X\(//\)[^/]' \| \
40681 X"$ac_file" : 'X\(//\)$' \| \
40682 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
40683 $as_echo X"$ac_file" |
40684 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40688 /^X\(\/\/\)[^/].*/{
40701 as_dir="$ac_dir"; as_fn_mkdir_p
40705 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
40707 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
40708 # A ".." for each directory in $ac_dir_suffix.
40709 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
40710 case $ac_top_builddir_sub in
40711 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
40712 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
40715 ac_abs_top_builddir=$ac_pwd
40716 ac_abs_builddir=$ac_pwd$ac_dir_suffix
40717 # for backward compatibility:
40718 ac_top_builddir=$ac_top_build_prefix
40721 .) # We are building in place.
40723 ac_top_srcdir=$ac_top_builddir_sub
40724 ac_abs_top_srcdir=$ac_pwd ;;
40725 [\\/]* | ?:[\\/]* ) # Absolute name.
40726 ac_srcdir=$srcdir$ac_dir_suffix;
40727 ac_top_srcdir=$srcdir
40728 ac_abs_top_srcdir=$srcdir ;;
40729 *) # Relative name.
40730 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
40731 ac_top_srcdir=$ac_top_build_prefix$srcdir
40732 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
40734 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
40744 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
40745 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
40747 ac_MKDIR_P=$MKDIR_P
40749 [\\/$]* | ?:[\\/]* ) ;;
40750 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
40754 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40755 # If the template does not know about datarootdir, expand it.
40756 # FIXME: This hack should be removed a few years after 2.60.
40757 ac_datarootdir_hack=; ac_datarootdir_seen=
40768 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
40769 *datarootdir*) ac_datarootdir_seen=yes;;
40770 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
40771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
40772 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
40774 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40775 ac_datarootdir_hack='
40776 s&@datadir@&$datadir&g
40777 s&@docdir@&$docdir&g
40778 s&@infodir@&$infodir&g
40779 s&@localedir@&$localedir&g
40780 s&@mandir@&$mandir&g
40781 s&\\\${datarootdir}&$datarootdir&g' ;;
40785 # Neutralize VPATH when `$srcdir' = `.'.
40786 # Shell code in configure.ac might set extrasub.
40787 # FIXME: do we really want to maintain this feature?
40788 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40789 ac_sed_extra="$ac_vpsub
40792 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40794 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
40795 s|@configure_input@|$ac_sed_conf_input|;t t
40796 s&@top_builddir@&$ac_top_builddir_sub&;t t
40797 s&@top_build_prefix@&$ac_top_build_prefix&;t t
40798 s&@srcdir@&$ac_srcdir&;t t
40799 s&@abs_srcdir@&$ac_abs_srcdir&;t t
40800 s&@top_srcdir@&$ac_top_srcdir&;t t
40801 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
40802 s&@builddir@&$ac_builddir&;t t
40803 s&@abs_builddir@&$ac_abs_builddir&;t t
40804 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
40805 s&@INSTALL@&$ac_INSTALL&;t t
40806 s&@MKDIR_P@&$ac_MKDIR_P&;t t
40807 $ac_datarootdir_hack
40809 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
40810 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
40812 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
40813 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
40814 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
40815 "$ac_tmp/out"`; test -z "$ac_out"; } &&
40816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
40817 which seems to be undefined. Please make sure it is defined" >&5
40818 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
40819 which seems to be undefined. Please make sure it is defined" >&2;}
40821 rm -f "$ac_tmp/stdin"
40823 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
40824 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
40826 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
40832 if test x"$ac_file" != x-; then
40834 $as_echo "/* $configure_input */" \
40835 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
40836 } >"$ac_tmp/config.h" \
40837 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
40838 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
40839 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
40840 $as_echo "$as_me: $ac_file is unchanged" >&6;}
40843 mv "$ac_tmp/config.h" "$ac_file" \
40844 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
40847 $as_echo "/* $configure_input */" \
40848 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
40849 || as_fn_error $? "could not create -" "$LINENO" 5
40851 # Compute "$ac_file"'s index in $config_headers.
40854 for _am_header in $config_headers :; do
40855 case $_am_header in
40856 $_am_arg | $_am_arg:* )
40859 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
40862 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
40863 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40864 X"$_am_arg" : 'X\(//\)[^/]' \| \
40865 X"$_am_arg" : 'X\(//\)$' \| \
40866 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
40867 $as_echo X"$_am_arg" |
40868 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40872 /^X\(\/\/\)[^/].*/{
40884 s/.*/./; q'`/stamp-h$_am_stamp_count
40891 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
40894 # Prefer the file from the source tree if names are identical.
40895 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
40896 ac_source=$srcdir/$ac_source
40899 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
40900 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
40902 if test ! -r "$ac_source"; then
40903 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
40907 # Try a relative symlink, then a hard link, then a copy.
40909 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
40910 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
40912 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
40913 ln "$ac_source" "$ac_file" 2>/dev/null ||
40914 cp -p "$ac_source" "$ac_file" ||
40915 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
40918 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
40919 $as_echo "$as_me: executing $ac_file commands" >&6;}
40924 case $ac_file$ac_mode in
40925 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
40926 # Older Autoconf quotes --file arguments for eval, but not when files
40927 # are listed without --file. Let's play safe and only enable the eval
40928 # if we detect the quoting.
40929 case $CONFIG_FILES in
40930 *\'*) eval set x "$CONFIG_FILES" ;;
40931 *) set x $CONFIG_FILES ;;
40936 # Strip MF so we end up with the name of the file.
40937 mf=`echo "$mf" | sed -e 's/:.*$//'`
40938 # Check whether this is an Automake generated Makefile or not.
40939 # We used to match only the files named 'Makefile.in', but
40940 # some people rename them; so instead we look at the file content.
40941 # Grep'ing the first line is not enough: some people post-process
40942 # each Makefile.in and add a new line on top of each file to say so.
40943 # Grep'ing the whole file is not good either: AIX grep has a line
40944 # limit of 2048, but all sed's we know have understand at least 4000.
40945 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
40946 dirpart=`$as_dirname -- "$mf" ||
40947 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40948 X"$mf" : 'X\(//\)[^/]' \| \
40949 X"$mf" : 'X\(//\)$' \| \
40950 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
40952 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40956 /^X\(\/\/\)[^/].*/{
40972 # Extract the definition of DEPDIR, am__include, and am__quote
40973 # from the Makefile without running 'make'.
40974 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
40975 test -z "$DEPDIR" && continue
40976 am__include=`sed -n 's/^am__include = //p' < "$mf"`
40977 test -z "$am__include" && continue
40978 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
40979 # Find all dependency output files, they are included files with
40980 # $(DEPDIR) in their names. We invoke sed twice because it is the
40981 # simplest approach to changing $(DEPDIR) to its actual value in the
40983 for file in `sed -n "
40984 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
40985 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
40986 # Make sure the directory exists.
40987 test -f "$dirpart/$file" && continue
40988 fdir=`$as_dirname -- "$file" ||
40989 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40990 X"$file" : 'X\(//\)[^/]' \| \
40991 X"$file" : 'X\(//\)$' \| \
40992 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
40993 $as_echo X"$file" |
40994 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40998 /^X\(\/\/\)[^/].*/{
41011 as_dir=$dirpart/$fdir; as_fn_mkdir_p
41012 # echo "creating $dirpart/$file"
41013 echo '# dummy' > "$dirpart/$file"
41018 "stamp-h":C) test -z "$CONFIG_HEADERS" || date > stamp-h ;;
41026 ac_clean_files=$ac_clean_files_save
41028 test $ac_write_fail = 0 ||
41029 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
41032 # configure is writing to config.log, and then calls config.status.
41033 # config.status does its own redirection, appending to config.log.
41034 # Unfortunately, on DOS this fails, as config.log is still kept open
41035 # by configure, so config.status won't be able to write to it; its
41036 # output is simply discarded. So we exec the FD to /dev/null,
41037 # effectively closing config.log, so it can be properly (re)opened and
41038 # appended to by config.status. When coming back to configure, we
41039 # need to make the FD available again.
41040 if test "$no_create" != yes; then
41042 ac_config_status_args=
41043 test "$silent" = yes &&
41044 ac_config_status_args="$ac_config_status_args --quiet"
41046 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
41048 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
41049 # would make configure fail if this is the last instruction.
41050 $ac_cs_success || as_fn_exit 1
41052 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
41053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
41054 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}